@eqtylab/equality 4.14.0 → 4.15.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 +39 -0
- package/dist/code-block.module.module.css.module.css +2 -0
- package/dist/global-theme-config.css +1 -0
- package/dist/index.cjs +1002 -471
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +222 -3
- package/dist/index.d.ts +222 -3
- package/dist/index.js +939 -421
- package/dist/index.js.map +1 -1
- package/dist/nav-list.module.module.css.module.css +193 -0
- package/dist/nav.module.module.css.module.css +262 -0
- package/dist/theme-base.css +5 -0
- package/dist/theme-decisions-scoped.css +42 -0
- package/dist/theme-decisions.css +40 -0
- package/dist/theme.module.css +1 -0
- package/dist/theme.module.module.css.module.css +49 -0
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { forwardRef, useState, useRef,
|
|
1
|
+
import * as React16 from 'react';
|
|
2
|
+
import { forwardRef, useEffect, useLayoutEffect, useState, useRef, useMemo, useCallback, createElement, useSyncExternalStore } from 'react';
|
|
3
3
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
4
|
import styles2 from './alert-dialog.module.module.css.module.css';
|
|
5
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
import styles from './button.module.module.css.module.css';
|
|
8
8
|
import { clsx } from 'clsx';
|
|
@@ -10,7 +10,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import styles4 from './alert.module.module.css.module.css';
|
|
12
12
|
import * as LucideIcons from 'lucide-react';
|
|
13
|
-
import { Check, ChevronRight, Search, Circle, TriangleAlert, ChevronDown, X, SearchIcon, CalendarDays,
|
|
13
|
+
import { Check, ChevronRight, Search, Circle, TriangleAlert, ChevronLeft, ChevronDown, ChevronsUpDown, X, SearchIcon, CalendarDays, Grid3X3, List, AlertOctagon, Home, ChevronsLeft, ChevronsRight, ArrowUp, ArrowDown, ArrowUpDown } from 'lucide-react';
|
|
14
14
|
import styles3 from './icon.module.module.css.module.css';
|
|
15
15
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
16
16
|
import styles5 from './avatar.module.module.css.module.css';
|
|
@@ -56,50 +56,52 @@ import styles32 from './list-or-grid-view-toggle.module.module.css.module.css';
|
|
|
56
56
|
import styles34 from './loading-overlay.module.module.css.module.css';
|
|
57
57
|
import styles33 from './spinner.module.module.css.module.css';
|
|
58
58
|
import styles35 from './metric-card.module.module.css.module.css';
|
|
59
|
-
import
|
|
60
|
-
import
|
|
59
|
+
import styles37 from './nav-list.module.module.css.module.css';
|
|
60
|
+
import styles42 from './nav.module.module.css.module.css';
|
|
61
61
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
62
|
+
import styles40 from './select.module.module.css.module.css';
|
|
63
|
+
import styles41 from './skeleton.module.module.css.module.css';
|
|
64
|
+
import styles43 from './page-not-found.module.module.css.module.css';
|
|
65
|
+
import styles44 from './pagination.module.module.css.module.css';
|
|
66
|
+
import styles45 from './panel-label.module.module.css.module.css';
|
|
67
|
+
import styles47 from './progress-indicator.module.module.css.module.css';
|
|
65
68
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
+
import styles46 from './progress.module.module.css.module.css';
|
|
70
|
+
import styles48 from './radial-graph.module.module.css.module.css';
|
|
71
|
+
import styles49 from './radio-dropdown.module.module.css.module.css';
|
|
69
72
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
70
|
-
import
|
|
71
|
-
import
|
|
73
|
+
import styles50 from './radio-group.module.module.css.module.css';
|
|
74
|
+
import styles51 from './resource-badge.module.module.css.module.css';
|
|
72
75
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
76
|
+
import styles52 from './scroll-area.module.module.css.module.css';
|
|
77
|
+
import styles53 from './search-bar.module.module.css.module.css';
|
|
78
|
+
import styles54 from './section-heading.module.module.css.module.css';
|
|
79
|
+
import styles55 from './segmented-controls.module.module.css.module.css';
|
|
77
80
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import styles54 from './sort-selector.module.module.css.module.css';
|
|
81
|
+
import styles56 from './separator.module.module.css.module.css';
|
|
82
|
+
import styles57 from './sheet.module.module.css.module.css';
|
|
83
|
+
import styles58 from './sort-button.module.module.css.module.css';
|
|
84
|
+
import styles59 from './sort-selector.module.module.css.module.css';
|
|
83
85
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
+
import styles60 from './switch.module.module.css.module.css';
|
|
87
|
+
import styles61 from './table-components.module.module.css.module.css';
|
|
86
88
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
89
|
+
import styles62 from './tabs-components.module.module.css.module.css';
|
|
90
|
+
import styles63 from './tabs.module.module.css.module.css';
|
|
91
|
+
import styles64 from './textarea.module.module.css.module.css';
|
|
90
92
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
94
|
-
import
|
|
93
|
+
import styles65 from './toast-components.module.module.css.module.css';
|
|
94
|
+
import styles66 from './toast.module.module.css.module.css';
|
|
95
|
+
import styles67 from './truncated-description.module.module.css.module.css';
|
|
96
|
+
import styles68 from './theme.module.module.css.module.css';
|
|
95
97
|
|
|
96
98
|
// src/components/alert-dialog/alert-dialog.tsx
|
|
97
99
|
var PORTAL_ROOT_ID = "equality-theme-provider-root-portal";
|
|
98
|
-
var PortalContainerContext =
|
|
100
|
+
var PortalContainerContext = React16.createContext(
|
|
99
101
|
void 0
|
|
100
102
|
);
|
|
101
103
|
function usePortalContainer() {
|
|
102
|
-
const container =
|
|
104
|
+
const container = React16.useContext(PortalContainerContext);
|
|
103
105
|
if (container !== void 0) return container;
|
|
104
106
|
return typeof document === "undefined" ? null : document.getElementById(PORTAL_ROOT_ID);
|
|
105
107
|
}
|
|
@@ -130,7 +132,7 @@ var buttonVariants = cva(styles["button"], {
|
|
|
130
132
|
size: "md"
|
|
131
133
|
}
|
|
132
134
|
});
|
|
133
|
-
var Button =
|
|
135
|
+
var Button = React16.forwardRef(
|
|
134
136
|
({ className, variant, size, asChild = false, prefix, suffix, children, ...props }, ref) => {
|
|
135
137
|
const isLink = "href" in props && props.href;
|
|
136
138
|
if (isLink) {
|
|
@@ -173,7 +175,7 @@ Button.displayName = "Button";
|
|
|
173
175
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
174
176
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
175
177
|
var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
176
|
-
var AlertDialogOverlay =
|
|
178
|
+
var AlertDialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
177
179
|
AlertDialogPrimitive.Overlay,
|
|
178
180
|
{
|
|
179
181
|
className: cn(styles2["alert-dialog-overlay"], className),
|
|
@@ -182,7 +184,7 @@ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
182
184
|
}
|
|
183
185
|
));
|
|
184
186
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
185
|
-
var AlertDialogContent =
|
|
187
|
+
var AlertDialogContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
186
188
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
187
189
|
/* @__PURE__ */ jsx(
|
|
188
190
|
AlertDialogPrimitive.Content,
|
|
@@ -198,7 +200,7 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
|
|
|
198
200
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
199
201
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles2["alert-dialog-footer"], className), ...props });
|
|
200
202
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
201
|
-
var AlertDialogTitle =
|
|
203
|
+
var AlertDialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
202
204
|
AlertDialogPrimitive.Title,
|
|
203
205
|
{
|
|
204
206
|
ref,
|
|
@@ -207,7 +209,7 @@ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
207
209
|
}
|
|
208
210
|
));
|
|
209
211
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
210
|
-
var AlertDialogDescription =
|
|
212
|
+
var AlertDialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
211
213
|
AlertDialogPrimitive.Description,
|
|
212
214
|
{
|
|
213
215
|
ref,
|
|
@@ -216,7 +218,7 @@ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) =
|
|
|
216
218
|
}
|
|
217
219
|
));
|
|
218
220
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
219
|
-
var AlertDialogAction =
|
|
221
|
+
var AlertDialogAction = React16.forwardRef(({ className, variant = "primary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
220
222
|
AlertDialogPrimitive.Action,
|
|
221
223
|
{
|
|
222
224
|
ref,
|
|
@@ -230,7 +232,7 @@ var AlertDialogAction = React15.forwardRef(({ className, variant = "primary", si
|
|
|
230
232
|
}
|
|
231
233
|
));
|
|
232
234
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
233
|
-
var AlertDialogCancel =
|
|
235
|
+
var AlertDialogCancel = React16.forwardRef(({ className, variant = "tertiary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
234
236
|
AlertDialogPrimitive.Cancel,
|
|
235
237
|
{
|
|
236
238
|
ref,
|
|
@@ -250,12 +252,12 @@ var ELEVATION = {
|
|
|
250
252
|
RAISED: "raised",
|
|
251
253
|
OVERLAY: "overlay"
|
|
252
254
|
};
|
|
253
|
-
var generateElevationVariants = (
|
|
255
|
+
var generateElevationVariants = (styles69, baseClassName, defaultElevation) => {
|
|
254
256
|
const classNames = {};
|
|
255
257
|
Object.values(ELEVATION).forEach((elevation) => {
|
|
256
|
-
classNames[elevation] =
|
|
258
|
+
classNames[elevation] = styles69[`${baseClassName}--${elevation}`];
|
|
257
259
|
});
|
|
258
|
-
const variants = cva(
|
|
260
|
+
const variants = cva(styles69[baseClassName], {
|
|
259
261
|
variants: {
|
|
260
262
|
elevation: classNames
|
|
261
263
|
},
|
|
@@ -303,9 +305,9 @@ var Icon = forwardRef(
|
|
|
303
305
|
throw new Error(`Icon "${icon}" not found in lucide-react`);
|
|
304
306
|
}
|
|
305
307
|
renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles3["icon"]) });
|
|
306
|
-
} else if (
|
|
308
|
+
} else if (React16.isValidElement(icon)) {
|
|
307
309
|
const existingProps = icon.props;
|
|
308
|
-
renderedIcon =
|
|
310
|
+
renderedIcon = React16.cloneElement(
|
|
309
311
|
icon,
|
|
310
312
|
{
|
|
311
313
|
...existingProps,
|
|
@@ -350,7 +352,7 @@ var defaultVariantIcons = {
|
|
|
350
352
|
warning: "OctagonAlert",
|
|
351
353
|
danger: "TriangleAlert"
|
|
352
354
|
};
|
|
353
|
-
var Alert =
|
|
355
|
+
var Alert = React16.forwardRef(
|
|
354
356
|
({ className, variant, title, description, icon, children, as: Component = "div", ...props }, ref) => {
|
|
355
357
|
const effectiveIcon = icon === void 0 ? variant ? defaultVariantIcons[variant] : void 0 : icon;
|
|
356
358
|
const role = Component === "div" ? "alert" : void 0;
|
|
@@ -384,7 +386,7 @@ var Alert = React15.forwardRef(
|
|
|
384
386
|
}
|
|
385
387
|
);
|
|
386
388
|
Alert.displayName = "Alert";
|
|
387
|
-
var Avatar =
|
|
389
|
+
var Avatar = React16.forwardRef(
|
|
388
390
|
({ className, size = "md", shape = "circle", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
389
391
|
AvatarPrimitive.Root,
|
|
390
392
|
{
|
|
@@ -395,9 +397,9 @@ var Avatar = React15.forwardRef(
|
|
|
395
397
|
)
|
|
396
398
|
);
|
|
397
399
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
398
|
-
var AvatarImage =
|
|
400
|
+
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(styles5["avatar-image"], className), ...props }));
|
|
399
401
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
400
|
-
var AvatarFallback =
|
|
402
|
+
var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
401
403
|
AvatarPrimitive.Fallback,
|
|
402
404
|
{
|
|
403
405
|
ref,
|
|
@@ -410,7 +412,7 @@ var TooltipProvider = TooltipPrimitive.Provider;
|
|
|
410
412
|
var Tooltip = TooltipPrimitive.Root;
|
|
411
413
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
412
414
|
var TooltipPortal = ({ children }) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: usePortalContainer(), children });
|
|
413
|
-
var TooltipContent =
|
|
415
|
+
var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(
|
|
414
416
|
TooltipPrimitive.Content,
|
|
415
417
|
{
|
|
416
418
|
ref,
|
|
@@ -528,10 +530,10 @@ function Badge({
|
|
|
528
530
|
}
|
|
529
531
|
);
|
|
530
532
|
}
|
|
531
|
-
var BarGraphSegment =
|
|
533
|
+
var BarGraphSegment = React16.forwardRef(
|
|
532
534
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
533
535
|
({ value, color, label, tooltip, className, style, ...props }, ref) => {
|
|
534
|
-
const tooltipId =
|
|
536
|
+
const tooltipId = React16.useId();
|
|
535
537
|
return (
|
|
536
538
|
// Widths are proportional (`value / sum`): each segment grows by its `value`
|
|
537
539
|
// within the flex row, so the parent never needs to know the total.
|
|
@@ -582,9 +584,9 @@ var barVariants = cva(styles8["bar"], {
|
|
|
582
584
|
size: "md"
|
|
583
585
|
}
|
|
584
586
|
});
|
|
585
|
-
var BarGraph =
|
|
587
|
+
var BarGraph = React16.forwardRef(
|
|
586
588
|
({ className, children, showLabels = false, size, ...props }, ref) => {
|
|
587
|
-
const validChildren =
|
|
589
|
+
const validChildren = React16.Children.toArray(children).filter(React16.isValidElement);
|
|
588
590
|
const segments = validChildren.filter(
|
|
589
591
|
(child) => child.type === BarGraphSegment
|
|
590
592
|
);
|
|
@@ -791,7 +793,7 @@ var CardContentHeader = forwardRef(
|
|
|
791
793
|
);
|
|
792
794
|
CardContentHeader.displayName = "CardContentHeader";
|
|
793
795
|
var cardElevationVariants = generateElevationVariants(styles11, "card", ELEVATION.RAISED);
|
|
794
|
-
var Card =
|
|
796
|
+
var Card = React16.forwardRef(({ className, hoverGradientClassName, elevation = ELEVATION.RAISED, ...props }, ref) => {
|
|
795
797
|
const shouldHaveHoverStyle = props.onClick !== void 0;
|
|
796
798
|
return /* @__PURE__ */ jsxs(
|
|
797
799
|
"div",
|
|
@@ -812,28 +814,28 @@ var Card = React15.forwardRef(({ className, hoverGradientClassName, elevation =
|
|
|
812
814
|
);
|
|
813
815
|
});
|
|
814
816
|
Card.displayName = "Card";
|
|
815
|
-
var CardHeader =
|
|
817
|
+
var CardHeader = React16.forwardRef(
|
|
816
818
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-header"], className), ...props })
|
|
817
819
|
);
|
|
818
820
|
CardHeader.displayName = "CardHeader";
|
|
819
|
-
var CardTitle =
|
|
821
|
+
var CardTitle = React16.forwardRef(
|
|
820
822
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-title"], className), ...props })
|
|
821
823
|
);
|
|
822
824
|
CardTitle.displayName = "CardTitle";
|
|
823
|
-
var CardDescription =
|
|
825
|
+
var CardDescription = React16.forwardRef(
|
|
824
826
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-description"], className), ...props })
|
|
825
827
|
);
|
|
826
828
|
CardDescription.displayName = "CardDescription";
|
|
827
|
-
var CardContent =
|
|
829
|
+
var CardContent = React16.forwardRef(
|
|
828
830
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-content"], className), ...props })
|
|
829
831
|
);
|
|
830
832
|
CardContent.displayName = "CardContent";
|
|
831
|
-
var CardFooter =
|
|
833
|
+
var CardFooter = React16.forwardRef(
|
|
832
834
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-footer"], className), ...props })
|
|
833
835
|
);
|
|
834
836
|
CardFooter.displayName = "CardFooter";
|
|
835
837
|
var CheckIcon = Check;
|
|
836
|
-
var Checkbox =
|
|
838
|
+
var Checkbox = React16.forwardRef(
|
|
837
839
|
({ className, icon: Icon3, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
838
840
|
CheckboxPrimitive.Root,
|
|
839
841
|
{
|
|
@@ -867,51 +869,57 @@ var iconSizeMap = {
|
|
|
867
869
|
md: 22,
|
|
868
870
|
lg: 26
|
|
869
871
|
};
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
872
|
+
var IconButton = React16.forwardRef(
|
|
873
|
+
function IconButton2({
|
|
874
|
+
className,
|
|
875
|
+
size = "sm",
|
|
876
|
+
variant = "primary",
|
|
877
|
+
name,
|
|
878
|
+
label,
|
|
879
|
+
href,
|
|
880
|
+
target,
|
|
881
|
+
download,
|
|
882
|
+
disabled,
|
|
883
|
+
...props
|
|
884
|
+
}, ref) {
|
|
885
|
+
const Icon3 = LucideIcons[name];
|
|
886
|
+
const iconSize = iconSizeMap[size || "sm"];
|
|
887
|
+
const IconComponent = Icon3;
|
|
888
|
+
if (!Icon3) {
|
|
889
|
+
throw new Error(`Icon "${name}" not found in lucide-react`);
|
|
890
|
+
}
|
|
891
|
+
const content = /* @__PURE__ */ jsx(IconComponent, { size: iconSize });
|
|
892
|
+
if (href && !disabled) {
|
|
893
|
+
return /* @__PURE__ */ jsx(
|
|
894
|
+
"a",
|
|
895
|
+
{
|
|
896
|
+
ref,
|
|
897
|
+
href,
|
|
898
|
+
target,
|
|
899
|
+
download,
|
|
900
|
+
"aria-label": label,
|
|
901
|
+
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
902
|
+
className: cn(iconButtonVariants({ size, variant }), className),
|
|
903
|
+
...props,
|
|
904
|
+
children: content
|
|
905
|
+
}
|
|
906
|
+
);
|
|
907
|
+
}
|
|
890
908
|
return /* @__PURE__ */ jsx(
|
|
891
|
-
"
|
|
909
|
+
"button",
|
|
892
910
|
{
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
download,
|
|
911
|
+
ref,
|
|
912
|
+
type: "button",
|
|
896
913
|
"aria-label": label,
|
|
897
|
-
|
|
914
|
+
disabled,
|
|
898
915
|
className: cn(iconButtonVariants({ size, variant }), className),
|
|
916
|
+
...props,
|
|
899
917
|
children: content
|
|
900
918
|
}
|
|
901
919
|
);
|
|
902
920
|
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
{
|
|
906
|
-
type: "button",
|
|
907
|
-
"aria-label": label,
|
|
908
|
-
disabled,
|
|
909
|
-
className: cn(iconButtonVariants({ size, variant }), className),
|
|
910
|
-
...props,
|
|
911
|
-
children: content
|
|
912
|
-
}
|
|
913
|
-
);
|
|
914
|
-
}
|
|
921
|
+
);
|
|
922
|
+
IconButton.displayName = "IconButton";
|
|
915
923
|
function CopyButton({
|
|
916
924
|
value,
|
|
917
925
|
label = "Copy to clipboard",
|
|
@@ -919,7 +927,7 @@ function CopyButton({
|
|
|
919
927
|
className,
|
|
920
928
|
onClick
|
|
921
929
|
}) {
|
|
922
|
-
const [copied, setCopied] =
|
|
930
|
+
const [copied, setCopied] = React16.useState(false);
|
|
923
931
|
const handleCopy = async () => {
|
|
924
932
|
try {
|
|
925
933
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
@@ -1043,7 +1051,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
1043
1051
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1044
1052
|
var DialogPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1045
1053
|
var DialogClose = DialogPrimitive.Close;
|
|
1046
|
-
var DialogOverlay =
|
|
1054
|
+
var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1047
1055
|
DialogPrimitive.Overlay,
|
|
1048
1056
|
{
|
|
1049
1057
|
ref,
|
|
@@ -1052,7 +1060,7 @@ var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1052
1060
|
}
|
|
1053
1061
|
));
|
|
1054
1062
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1055
|
-
var DialogContainer =
|
|
1063
|
+
var DialogContainer = React16.forwardRef(({ className, children, size = "md", ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1056
1064
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1057
1065
|
/* @__PURE__ */ jsx(
|
|
1058
1066
|
DialogPrimitive.Content,
|
|
@@ -1072,12 +1080,12 @@ DialogContainer.displayName = DialogPrimitive.Content.displayName;
|
|
|
1072
1080
|
var DialogHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles15["dialog-header-icon"], className), ...props });
|
|
1073
1081
|
DialogHeaderIcon.displayName = "DialogHeaderIcon";
|
|
1074
1082
|
var DialogHeader = ({ className, children, ...props }) => {
|
|
1075
|
-
const childrenArray =
|
|
1083
|
+
const childrenArray = React16.Children.toArray(children);
|
|
1076
1084
|
const icon = childrenArray.find(
|
|
1077
|
-
(child) =>
|
|
1085
|
+
(child) => React16.isValidElement(child) && child.type === DialogHeaderIcon
|
|
1078
1086
|
);
|
|
1079
1087
|
const otherChildren = childrenArray.filter(
|
|
1080
|
-
(child) => !(
|
|
1088
|
+
(child) => !(React16.isValidElement(child) && child.type === DialogHeaderIcon)
|
|
1081
1089
|
);
|
|
1082
1090
|
return /* @__PURE__ */ jsxs("div", { className: cn(styles15["dialog-header"], className), ...props, children: [
|
|
1083
1091
|
icon,
|
|
@@ -1088,9 +1096,9 @@ var DialogHeader = ({ className, children, ...props }) => {
|
|
|
1088
1096
|
DialogHeader.displayName = "DialogHeader";
|
|
1089
1097
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles15["dialog-footer"], className), ...props });
|
|
1090
1098
|
DialogFooter.displayName = "DialogFooter";
|
|
1091
|
-
var DialogTitle =
|
|
1099
|
+
var DialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles15["dialog-title"], className), ...props }));
|
|
1092
1100
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1093
|
-
var DialogDescription =
|
|
1101
|
+
var DialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1094
1102
|
DialogPrimitive.Description,
|
|
1095
1103
|
{
|
|
1096
1104
|
ref,
|
|
@@ -1306,7 +1314,7 @@ var CircleCheckFillIcon = ({ className }) => {
|
|
|
1306
1314
|
var Popover = PopoverPrimitive.Root;
|
|
1307
1315
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1308
1316
|
var PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1309
|
-
var PopoverContent =
|
|
1317
|
+
var PopoverContent = React16.forwardRef(({ className, align = "center", sideOffset = 4, arrow = false, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsxs(
|
|
1310
1318
|
PopoverPrimitive.Content,
|
|
1311
1319
|
{
|
|
1312
1320
|
ref,
|
|
@@ -1616,7 +1624,7 @@ Drawer.displayName = "Drawer";
|
|
|
1616
1624
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
1617
1625
|
var DrawerPortal = ({ children }) => /* @__PURE__ */ jsx(Drawer$1.Portal, { container: usePortalContainer(), children });
|
|
1618
1626
|
var DrawerClose = Drawer$1.Close;
|
|
1619
|
-
var DrawerOverlay =
|
|
1627
|
+
var DrawerOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1620
1628
|
Drawer$1.Overlay,
|
|
1621
1629
|
{
|
|
1622
1630
|
ref,
|
|
@@ -1625,7 +1633,7 @@ var DrawerOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1625
1633
|
}
|
|
1626
1634
|
));
|
|
1627
1635
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
1628
|
-
var DrawerContent =
|
|
1636
|
+
var DrawerContent = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
1629
1637
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1630
1638
|
/* @__PURE__ */ jsxs(
|
|
1631
1639
|
Drawer$1.Content,
|
|
@@ -1643,7 +1651,7 @@ var DrawerContent = React15.forwardRef(({ className, children, ...props }, ref)
|
|
|
1643
1651
|
DrawerContent.displayName = "DrawerContent";
|
|
1644
1652
|
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles21["drawer-header"], className), ...props });
|
|
1645
1653
|
DrawerHeader.displayName = "DrawerHeader";
|
|
1646
|
-
var DrawerHeaderActions =
|
|
1654
|
+
var DrawerHeaderActions = React16.forwardRef(({ className, rowSpan, style, ...props }, ref) => {
|
|
1647
1655
|
return /* @__PURE__ */ jsx(
|
|
1648
1656
|
"div",
|
|
1649
1657
|
{
|
|
@@ -1657,9 +1665,9 @@ var DrawerHeaderActions = React15.forwardRef(({ className, rowSpan, style, ...pr
|
|
|
1657
1665
|
DrawerHeaderActions.displayName = "DrawerHeaderActions";
|
|
1658
1666
|
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles21["drawer-footer"], className), ...props });
|
|
1659
1667
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1660
|
-
var DrawerTitle =
|
|
1668
|
+
var DrawerTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Title, { ref, className: cn(styles21["drawer-title"], className), ...props }));
|
|
1661
1669
|
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
1662
|
-
var DrawerDescription =
|
|
1670
|
+
var DrawerDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1663
1671
|
Drawer$1.Description,
|
|
1664
1672
|
{
|
|
1665
1673
|
ref,
|
|
@@ -1671,58 +1679,58 @@ DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
|
1671
1679
|
var DrawerInnerContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles21["drawer-inner-content"], className), ...props });
|
|
1672
1680
|
DrawerInnerContent.displayName = "DrawerInnerContent";
|
|
1673
1681
|
function useMatchRegistry() {
|
|
1674
|
-
const itemsRef =
|
|
1675
|
-
const [matchCount, setMatchCount] =
|
|
1676
|
-
const registerItem =
|
|
1682
|
+
const itemsRef = React16.useRef(/* @__PURE__ */ new Map());
|
|
1683
|
+
const [matchCount, setMatchCount] = React16.useState(0);
|
|
1684
|
+
const registerItem = React16.useCallback((id, matches) => {
|
|
1677
1685
|
const delta = Number(matches) - Number(itemsRef.current.get(id) ?? false);
|
|
1678
1686
|
itemsRef.current.set(id, matches);
|
|
1679
1687
|
if (delta) setMatchCount((count2) => count2 + delta);
|
|
1680
1688
|
}, []);
|
|
1681
|
-
const unregisterItem =
|
|
1689
|
+
const unregisterItem = React16.useCallback((id) => {
|
|
1682
1690
|
if (itemsRef.current.get(id)) setMatchCount((count2) => count2 - 1);
|
|
1683
1691
|
itemsRef.current.delete(id);
|
|
1684
1692
|
}, []);
|
|
1685
|
-
return
|
|
1693
|
+
return React16.useMemo(
|
|
1686
1694
|
() => ({ registerItem, unregisterItem, matchCount }),
|
|
1687
1695
|
[registerItem, unregisterItem, matchCount]
|
|
1688
1696
|
);
|
|
1689
1697
|
}
|
|
1690
1698
|
function useListSearchState(open) {
|
|
1691
|
-
const [enabled, setEnabled] =
|
|
1692
|
-
const [visible, setVisible] =
|
|
1693
|
-
const [query, setQuery] =
|
|
1694
|
-
const [listId, setListId] =
|
|
1695
|
-
const [lockedSide, setLockedSide] =
|
|
1696
|
-
const interactedRef =
|
|
1697
|
-
const markInteracted =
|
|
1699
|
+
const [enabled, setEnabled] = React16.useState(false);
|
|
1700
|
+
const [visible, setVisible] = React16.useState(false);
|
|
1701
|
+
const [query, setQuery] = React16.useState("");
|
|
1702
|
+
const [listId, setListId] = React16.useState(void 0);
|
|
1703
|
+
const [lockedSide, setLockedSide] = React16.useState(void 0);
|
|
1704
|
+
const interactedRef = React16.useRef(false);
|
|
1705
|
+
const markInteracted = React16.useCallback(() => {
|
|
1698
1706
|
interactedRef.current = true;
|
|
1699
1707
|
}, []);
|
|
1700
|
-
const interactedSinceOpen =
|
|
1701
|
-
const [focusSignal, setFocusSignal] =
|
|
1702
|
-
const requestFocus =
|
|
1708
|
+
const interactedSinceOpen = React16.useCallback(() => interactedRef.current, []);
|
|
1709
|
+
const [focusSignal, setFocusSignal] = React16.useState(0);
|
|
1710
|
+
const requestFocus = React16.useCallback(() => setFocusSignal((n) => n + 1), []);
|
|
1703
1711
|
const { registerItem, unregisterItem, matchCount } = useMatchRegistry();
|
|
1704
|
-
const reveal =
|
|
1712
|
+
const reveal = React16.useCallback((seed) => {
|
|
1705
1713
|
setVisible(true);
|
|
1706
1714
|
setQuery(seed);
|
|
1707
1715
|
}, []);
|
|
1708
|
-
const resetStateForOpen =
|
|
1716
|
+
const resetStateForOpen = React16.useCallback(() => {
|
|
1709
1717
|
setVisible(false);
|
|
1710
1718
|
setQuery("");
|
|
1711
1719
|
setLockedSide(void 0);
|
|
1712
1720
|
}, []);
|
|
1713
|
-
const resetForOpen =
|
|
1721
|
+
const resetForOpen = React16.useCallback(() => {
|
|
1714
1722
|
resetStateForOpen();
|
|
1715
1723
|
interactedRef.current = false;
|
|
1716
1724
|
}, [resetStateForOpen]);
|
|
1717
|
-
const [previousOpen, setPreviousOpen] =
|
|
1725
|
+
const [previousOpen, setPreviousOpen] = React16.useState(open);
|
|
1718
1726
|
if (open !== previousOpen) {
|
|
1719
1727
|
setPreviousOpen(open);
|
|
1720
1728
|
if (open) resetStateForOpen();
|
|
1721
1729
|
}
|
|
1722
|
-
|
|
1730
|
+
React16.useEffect(() => {
|
|
1723
1731
|
if (open) interactedRef.current = false;
|
|
1724
1732
|
}, [open]);
|
|
1725
|
-
return
|
|
1733
|
+
return React16.useMemo(
|
|
1726
1734
|
() => ({
|
|
1727
1735
|
enabled,
|
|
1728
1736
|
setEnabled,
|
|
@@ -1769,7 +1777,7 @@ function useSearchSideLock(state, contentRef, {
|
|
|
1769
1777
|
const searching = isSearchActive(state);
|
|
1770
1778
|
const lockedSide = state?.lockedSide;
|
|
1771
1779
|
const lockSide = state?.lockSide;
|
|
1772
|
-
|
|
1780
|
+
React16.useEffect(() => {
|
|
1773
1781
|
if (!enabled || !searching || lockedSide) return;
|
|
1774
1782
|
const placed = contentRef.current?.dataset.side;
|
|
1775
1783
|
if (placed) lockSide?.(placed);
|
|
@@ -1783,7 +1791,7 @@ function getNodeText(node) {
|
|
|
1783
1791
|
if (node == null || typeof node === "boolean") return "";
|
|
1784
1792
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
1785
1793
|
if (Array.isArray(node)) return node.map(getNodeText).join("");
|
|
1786
|
-
if (
|
|
1794
|
+
if (React16.isValidElement(node)) {
|
|
1787
1795
|
return getNodeText(node.props.children);
|
|
1788
1796
|
}
|
|
1789
1797
|
return "";
|
|
@@ -1795,14 +1803,14 @@ var matchesQuery = (query, textValue, children) => {
|
|
|
1795
1803
|
function useRegisterMatch(registry, enabled, id, matches) {
|
|
1796
1804
|
const registerItem = registry?.registerItem;
|
|
1797
1805
|
const unregisterItem = registry?.unregisterItem;
|
|
1798
|
-
|
|
1806
|
+
React16.useEffect(() => {
|
|
1799
1807
|
if (!enabled || !registerItem || !unregisterItem) return;
|
|
1800
1808
|
registerItem(id, matches);
|
|
1801
1809
|
return () => unregisterItem(id);
|
|
1802
1810
|
}, [enabled, registerItem, unregisterItem, id, matches]);
|
|
1803
1811
|
}
|
|
1804
1812
|
function useFilterableItem(state, textValue, children, { group, persistent = false } = {}) {
|
|
1805
|
-
const id =
|
|
1813
|
+
const id = React16.useId();
|
|
1806
1814
|
const matches = persistent || matchesQuery(state?.query ?? "", textValue, children);
|
|
1807
1815
|
const enabled = state?.enabled ?? false;
|
|
1808
1816
|
useRegisterMatch(state, enabled && !persistent, id, matches);
|
|
@@ -1811,23 +1819,23 @@ function useFilterableItem(state, textValue, children, { group, persistent = fal
|
|
|
1811
1819
|
}
|
|
1812
1820
|
function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
1813
1821
|
const { setEnabled, reveal, visible, focusSignal } = state;
|
|
1814
|
-
const inputRef =
|
|
1815
|
-
const ref =
|
|
1822
|
+
const inputRef = React16.useRef(null);
|
|
1823
|
+
const ref = React16.useCallback(
|
|
1816
1824
|
(node) => assignRefs(node, inputRef, forwardedRef),
|
|
1817
1825
|
[forwardedRef]
|
|
1818
1826
|
);
|
|
1819
|
-
|
|
1827
|
+
React16.useEffect(() => {
|
|
1820
1828
|
setEnabled(true);
|
|
1821
1829
|
return () => setEnabled(false);
|
|
1822
1830
|
}, [setEnabled]);
|
|
1823
|
-
|
|
1831
|
+
React16.useEffect(() => {
|
|
1824
1832
|
if (!visible) return;
|
|
1825
1833
|
const input = inputRef.current;
|
|
1826
1834
|
if (!input) return;
|
|
1827
1835
|
input.focus();
|
|
1828
1836
|
input.setSelectionRange(input.value.length, input.value.length);
|
|
1829
1837
|
}, [visible, focusSignal]);
|
|
1830
|
-
|
|
1838
|
+
React16.useEffect(() => {
|
|
1831
1839
|
if (alwaysVisible && !visible) reveal("");
|
|
1832
1840
|
}, [alwaysVisible, visible, reveal]);
|
|
1833
1841
|
return { ref, isRendered: alwaysVisible || visible };
|
|
@@ -1835,7 +1843,7 @@ function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
|
1835
1843
|
function useSearchQuery(state) {
|
|
1836
1844
|
const { query } = state;
|
|
1837
1845
|
const isSearching = isSearchActive(state);
|
|
1838
|
-
return
|
|
1846
|
+
return React16.useMemo(
|
|
1839
1847
|
() => ({
|
|
1840
1848
|
query,
|
|
1841
1849
|
isSearching,
|
|
@@ -1890,8 +1898,8 @@ var CheckIcon2 = Check;
|
|
|
1890
1898
|
var ChevronRightIcon2 = ChevronRight;
|
|
1891
1899
|
var CircleIcon = Circle;
|
|
1892
1900
|
var SearchIcon2 = Search;
|
|
1893
|
-
var DropdownMenuSearchContext =
|
|
1894
|
-
var useDropdownMenuSearch = () =>
|
|
1901
|
+
var DropdownMenuSearchContext = React16.createContext(null);
|
|
1902
|
+
var useDropdownMenuSearch = () => React16.useContext(DropdownMenuSearchContext);
|
|
1895
1903
|
var useIsSearching = () => isSearchActive(useDropdownMenuSearch());
|
|
1896
1904
|
var useDropdownMenuSearchQuery = () => {
|
|
1897
1905
|
const ctx = useDropdownMenuSearch();
|
|
@@ -1900,12 +1908,12 @@ var useDropdownMenuSearchQuery = () => {
|
|
|
1900
1908
|
}
|
|
1901
1909
|
return useSearchQuery(ctx);
|
|
1902
1910
|
};
|
|
1903
|
-
var DropdownMenuBreadcrumbContext =
|
|
1904
|
-
var useBreadcrumbAncestry = () =>
|
|
1911
|
+
var DropdownMenuBreadcrumbContext = React16.createContext([]);
|
|
1912
|
+
var useBreadcrumbAncestry = () => React16.useContext(DropdownMenuBreadcrumbContext);
|
|
1905
1913
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
1906
1914
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
1907
1915
|
function hasDisplayName(node, name) {
|
|
1908
|
-
return
|
|
1916
|
+
return React16.isValidElement(node) && typeof node.type !== "string" && node.type.displayName === name;
|
|
1909
1917
|
}
|
|
1910
1918
|
var isSubContent = (node) => hasDisplayName(node, SUB_CONTENT_NAME);
|
|
1911
1919
|
var isSubTrigger = (node) => hasDisplayName(node, SUB_TRIGGER_NAME);
|
|
@@ -1913,8 +1921,8 @@ function findSubContentChildren(nodes) {
|
|
|
1913
1921
|
let result = null;
|
|
1914
1922
|
let done = false;
|
|
1915
1923
|
const walk = (ns) => {
|
|
1916
|
-
|
|
1917
|
-
if (done || !
|
|
1924
|
+
React16.Children.forEach(ns, (child) => {
|
|
1925
|
+
if (done || !React16.isValidElement(child)) return;
|
|
1918
1926
|
if (isSubContent(child)) {
|
|
1919
1927
|
result = child.props.children ?? null;
|
|
1920
1928
|
done = true;
|
|
@@ -1928,7 +1936,7 @@ function findSubContentChildren(nodes) {
|
|
|
1928
1936
|
return result;
|
|
1929
1937
|
}
|
|
1930
1938
|
function getSubTriggerLabel(nodes) {
|
|
1931
|
-
const trigger =
|
|
1939
|
+
const trigger = React16.Children.toArray(nodes).find(isSubTrigger);
|
|
1932
1940
|
return trigger ? getNodeText(trigger.props.children) : "";
|
|
1933
1941
|
}
|
|
1934
1942
|
var DropdownMenu = ({
|
|
@@ -1939,7 +1947,7 @@ var DropdownMenu = ({
|
|
|
1939
1947
|
}) => {
|
|
1940
1948
|
const search = useListSearchState(open);
|
|
1941
1949
|
const { resetForOpen } = search;
|
|
1942
|
-
const handleOpenChange =
|
|
1950
|
+
const handleOpenChange = React16.useCallback(
|
|
1943
1951
|
(nextOpen) => {
|
|
1944
1952
|
if (nextOpen) resetForOpen();
|
|
1945
1953
|
onOpenChange?.(nextOpen);
|
|
@@ -1953,7 +1961,7 @@ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
|
1953
1961
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1954
1962
|
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1955
1963
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1956
|
-
var DropdownMenuSubTrigger =
|
|
1964
|
+
var DropdownMenuSubTrigger = React16.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
1957
1965
|
const searching = useIsSearching();
|
|
1958
1966
|
if (searching) return null;
|
|
1959
1967
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1974,7 +1982,7 @@ var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, .
|
|
|
1974
1982
|
);
|
|
1975
1983
|
});
|
|
1976
1984
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1977
|
-
var DropdownMenuSubContent =
|
|
1985
|
+
var DropdownMenuSubContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1978
1986
|
DropdownMenuPrimitive.SubContent,
|
|
1979
1987
|
{
|
|
1980
1988
|
ref,
|
|
@@ -1999,7 +2007,7 @@ var DropdownMenuSub = ({
|
|
|
1999
2007
|
var SEARCH_INPUT_SELECTOR = "[data-dropdown-search]";
|
|
2000
2008
|
var MENU_ITEM_SELECTOR = ':is([role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]):not([data-disabled])';
|
|
2001
2009
|
var MATCHING_ITEM_SELECTOR = `${MENU_ITEM_SELECTOR}:not([data-persistent])`;
|
|
2002
|
-
var DropdownMenuContent =
|
|
2010
|
+
var DropdownMenuContent = React16.forwardRef(
|
|
2003
2011
|
({
|
|
2004
2012
|
className,
|
|
2005
2013
|
children,
|
|
@@ -2016,9 +2024,9 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
2016
2024
|
const setListId = ctx?.setListId;
|
|
2017
2025
|
const searching = isSearchActive(ctx);
|
|
2018
2026
|
const resultCount = ctx?.matchCount ?? 0;
|
|
2019
|
-
const contentRef =
|
|
2027
|
+
const contentRef = React16.useRef(null);
|
|
2020
2028
|
const sideProps = useSearchSideLock(ctx, contentRef, { side, avoidCollisions });
|
|
2021
|
-
const composedContentRef =
|
|
2029
|
+
const composedContentRef = React16.useCallback(
|
|
2022
2030
|
(node) => {
|
|
2023
2031
|
assignRefs(node, ref, contentRef);
|
|
2024
2032
|
setListId?.(node?.id || void 0);
|
|
@@ -2065,7 +2073,7 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
2065
2073
|
}
|
|
2066
2074
|
);
|
|
2067
2075
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2068
|
-
var DropdownMenuSearch =
|
|
2076
|
+
var DropdownMenuSearch = React16.forwardRef(
|
|
2069
2077
|
({
|
|
2070
2078
|
className,
|
|
2071
2079
|
placeholder = "Search...",
|
|
@@ -2144,12 +2152,12 @@ DropdownMenuEmpty.displayName = "DropdownMenuEmpty";
|
|
|
2144
2152
|
var ItemBreadcrumb = () => {
|
|
2145
2153
|
const ancestry = useBreadcrumbAncestry();
|
|
2146
2154
|
if (!ancestry.length) return null;
|
|
2147
|
-
return /* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-breadcrumb"], "aria-hidden": "true", children: ancestry.map((crumb, index) => /* @__PURE__ */ jsxs(
|
|
2155
|
+
return /* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-breadcrumb"], "aria-hidden": "true", children: ancestry.map((crumb, index) => /* @__PURE__ */ jsxs(React16.Fragment, { children: [
|
|
2148
2156
|
crumb,
|
|
2149
2157
|
/* @__PURE__ */ jsx(ChevronRightIcon2, {})
|
|
2150
2158
|
] }, index)) });
|
|
2151
2159
|
};
|
|
2152
|
-
var DropdownMenuItem =
|
|
2160
|
+
var DropdownMenuItem = React16.forwardRef(({ className, inset, variant = "neutral", textValue, persistent, children, ...props }, ref) => {
|
|
2153
2161
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2154
2162
|
if (!visible) return null;
|
|
2155
2163
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2174,7 +2182,7 @@ var DropdownMenuItem = React15.forwardRef(({ className, inset, variant = "neutra
|
|
|
2174
2182
|
);
|
|
2175
2183
|
});
|
|
2176
2184
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2177
|
-
var DropdownMenuCheckboxItem =
|
|
2185
|
+
var DropdownMenuCheckboxItem = React16.forwardRef(({ className, children, checked, textValue, persistent, ...props }, ref) => {
|
|
2178
2186
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2179
2187
|
if (!visible) return null;
|
|
2180
2188
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2195,7 +2203,7 @@ var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checke
|
|
|
2195
2203
|
);
|
|
2196
2204
|
});
|
|
2197
2205
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2198
|
-
var DropdownMenuRadioItem =
|
|
2206
|
+
var DropdownMenuRadioItem = React16.forwardRef(({ className, children, textValue, persistent, ...props }, ref) => {
|
|
2199
2207
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2200
2208
|
if (!visible) return null;
|
|
2201
2209
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2215,7 +2223,7 @@ var DropdownMenuRadioItem = React15.forwardRef(({ className, children, textValue
|
|
|
2215
2223
|
);
|
|
2216
2224
|
});
|
|
2217
2225
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2218
|
-
var DropdownMenuLabel =
|
|
2226
|
+
var DropdownMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref) => {
|
|
2219
2227
|
const searching = useIsSearching();
|
|
2220
2228
|
if (searching) return null;
|
|
2221
2229
|
return /* @__PURE__ */ jsx(
|
|
@@ -2232,7 +2240,7 @@ var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2232
2240
|
);
|
|
2233
2241
|
});
|
|
2234
2242
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2235
|
-
var DropdownMenuSeparator =
|
|
2243
|
+
var DropdownMenuSeparator = React16.forwardRef(({ className, persistent, ...props }, ref) => {
|
|
2236
2244
|
const searching = useIsSearching();
|
|
2237
2245
|
if (searching && !persistent) return null;
|
|
2238
2246
|
return /* @__PURE__ */ jsx(
|
|
@@ -2352,18 +2360,18 @@ var FilterDropdown = ({
|
|
|
2352
2360
|
] });
|
|
2353
2361
|
};
|
|
2354
2362
|
var labelVariants = cva(styles25["label"]);
|
|
2355
|
-
var Label2 =
|
|
2363
|
+
var Label2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
2356
2364
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2357
2365
|
var Form = FormProvider;
|
|
2358
|
-
var FormFieldContext =
|
|
2366
|
+
var FormFieldContext = React16.createContext({});
|
|
2359
2367
|
var FormField = ({
|
|
2360
2368
|
...props
|
|
2361
2369
|
}) => {
|
|
2362
2370
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
2363
2371
|
};
|
|
2364
2372
|
var useFormField = () => {
|
|
2365
|
-
const fieldContext =
|
|
2366
|
-
const itemContext =
|
|
2373
|
+
const fieldContext = React16.useContext(FormFieldContext);
|
|
2374
|
+
const itemContext = React16.useContext(FormItemContext);
|
|
2367
2375
|
const { getFieldState, formState } = useFormContext();
|
|
2368
2376
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2369
2377
|
if (!fieldContext) {
|
|
@@ -2379,15 +2387,15 @@ var useFormField = () => {
|
|
|
2379
2387
|
...fieldState
|
|
2380
2388
|
};
|
|
2381
2389
|
};
|
|
2382
|
-
var FormItemContext =
|
|
2383
|
-
var FormItem =
|
|
2390
|
+
var FormItemContext = React16.createContext({});
|
|
2391
|
+
var FormItem = React16.forwardRef(
|
|
2384
2392
|
({ className, ...props }, ref) => {
|
|
2385
|
-
const id =
|
|
2393
|
+
const id = React16.useId();
|
|
2386
2394
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(styles26["form-item"], className), ...props }) });
|
|
2387
2395
|
}
|
|
2388
2396
|
);
|
|
2389
2397
|
FormItem.displayName = "FormItem";
|
|
2390
|
-
var FormLabel =
|
|
2398
|
+
var FormLabel = React16.forwardRef(({ className, ...props }, ref) => {
|
|
2391
2399
|
const { error, formItemId } = useFormField();
|
|
2392
2400
|
return /* @__PURE__ */ jsx(
|
|
2393
2401
|
Label2,
|
|
@@ -2400,7 +2408,7 @@ var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
|
|
|
2400
2408
|
);
|
|
2401
2409
|
});
|
|
2402
2410
|
FormLabel.displayName = "FormLabel";
|
|
2403
|
-
var FormControl =
|
|
2411
|
+
var FormControl = React16.forwardRef(({ ...props }, ref) => {
|
|
2404
2412
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2405
2413
|
return /* @__PURE__ */ jsx(
|
|
2406
2414
|
Slot,
|
|
@@ -2414,7 +2422,7 @@ var FormControl = React15.forwardRef(({ ...props }, ref) => {
|
|
|
2414
2422
|
);
|
|
2415
2423
|
});
|
|
2416
2424
|
FormControl.displayName = "FormControl";
|
|
2417
|
-
var FormDescription =
|
|
2425
|
+
var FormDescription = React16.forwardRef(({ className, ...props }, ref) => {
|
|
2418
2426
|
const { formDescriptionId } = useFormField();
|
|
2419
2427
|
return /* @__PURE__ */ jsx(
|
|
2420
2428
|
"p",
|
|
@@ -2427,7 +2435,7 @@ var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
|
|
|
2427
2435
|
);
|
|
2428
2436
|
});
|
|
2429
2437
|
FormDescription.displayName = "FormDescription";
|
|
2430
|
-
var FormMessage =
|
|
2438
|
+
var FormMessage = React16.forwardRef(({ className, children, ...props }, ref) => {
|
|
2431
2439
|
const { error, formMessageId } = useFormField();
|
|
2432
2440
|
const body = error ? String(error?.message ?? "") : children;
|
|
2433
2441
|
if (!body) {
|
|
@@ -2536,12 +2544,12 @@ function FormatDate({
|
|
|
2536
2544
|
...props
|
|
2537
2545
|
}) {
|
|
2538
2546
|
const missing = isMissing(date);
|
|
2539
|
-
const parsed =
|
|
2540
|
-
const [now, setNow] =
|
|
2541
|
-
const [mounted, setMounted] =
|
|
2547
|
+
const parsed = React16.useMemo(() => isMissing(date) ? null : toDate(date), [date]);
|
|
2548
|
+
const [now, setNow] = React16.useState(() => /* @__PURE__ */ new Date());
|
|
2549
|
+
const [mounted, setMounted] = React16.useState(false);
|
|
2542
2550
|
const isAbsolute = displayAs === "absolute";
|
|
2543
|
-
|
|
2544
|
-
|
|
2551
|
+
React16.useEffect(() => setMounted(true), []);
|
|
2552
|
+
React16.useEffect(() => {
|
|
2545
2553
|
if (isAbsolute || !live) return;
|
|
2546
2554
|
const id = setInterval(() => setNow(/* @__PURE__ */ new Date()), LIVE_INTERVAL_MS);
|
|
2547
2555
|
return () => clearInterval(id);
|
|
@@ -2663,7 +2671,7 @@ var MotionCollapsibleContent = ({
|
|
|
2663
2671
|
"motion-content"
|
|
2664
2672
|
) });
|
|
2665
2673
|
};
|
|
2666
|
-
var Input =
|
|
2674
|
+
var Input = React16.forwardRef(
|
|
2667
2675
|
({
|
|
2668
2676
|
className,
|
|
2669
2677
|
containerClassName,
|
|
@@ -2676,7 +2684,7 @@ var Input = React15.forwardRef(
|
|
|
2676
2684
|
"aria-invalid": ariaInvalid,
|
|
2677
2685
|
...props
|
|
2678
2686
|
}, ref) => {
|
|
2679
|
-
const id =
|
|
2687
|
+
const id = React16.useId();
|
|
2680
2688
|
const helpTextId = `${id}-help-text`;
|
|
2681
2689
|
const errorTextId = `${id}-error-text`;
|
|
2682
2690
|
const errorList = Array.isArray(errorText) && errorText.every((message) => typeof message === "string") ? [...new Set(errorText.filter((message) => !!message))] : null;
|
|
@@ -2834,25 +2842,395 @@ var MetricCard = ({
|
|
|
2834
2842
|
/* @__PURE__ */ jsx("p", { className: styles35.label, children: label })
|
|
2835
2843
|
] });
|
|
2836
2844
|
};
|
|
2837
|
-
var
|
|
2838
|
-
var
|
|
2839
|
-
var
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2845
|
+
var NavDrillContext = React16.createContext(null);
|
|
2846
|
+
var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
2847
|
+
var MOTION = {
|
|
2848
|
+
drill: {
|
|
2849
|
+
current: [
|
|
2850
|
+
{ transform: "translateX(12px)", opacity: 0 },
|
|
2851
|
+
{ transform: "translateX(0)", opacity: 1 }
|
|
2852
|
+
],
|
|
2853
|
+
previous: [
|
|
2854
|
+
{ transform: "translateX(0)", opacity: 1 },
|
|
2855
|
+
{ opacity: 0, offset: 0.35 },
|
|
2856
|
+
{ transform: "translateX(-12px)", opacity: 0 }
|
|
2857
|
+
]
|
|
2858
|
+
},
|
|
2859
|
+
back: {
|
|
2860
|
+
current: [
|
|
2861
|
+
{ transform: "translateX(-12px)", opacity: 0 },
|
|
2862
|
+
{ transform: "translateX(0)", opacity: 1 }
|
|
2863
|
+
],
|
|
2864
|
+
previous: [
|
|
2865
|
+
{ transform: "translateX(0)", opacity: 1 },
|
|
2866
|
+
{ opacity: 0, offset: 0.35 },
|
|
2867
|
+
{ transform: "translateX(12px)", opacity: 0 }
|
|
2868
|
+
]
|
|
2869
|
+
}
|
|
2855
2870
|
};
|
|
2871
|
+
var TIMING = { duration: 300, easing: "cubic-bezier(.2, .8, .2, 1)" };
|
|
2872
|
+
var LEVEL = '[data-slot="nav-drill-level"]';
|
|
2873
|
+
var NavDrillBackContext = React16.createContext(() => {
|
|
2874
|
+
});
|
|
2875
|
+
var LEAVING_DRILL_CONTEXT = { requestDrill: () => {
|
|
2876
|
+
}, leaving: true };
|
|
2877
|
+
var NO_BACK = () => {
|
|
2878
|
+
};
|
|
2879
|
+
var NavDrill = React16.forwardRef(
|
|
2880
|
+
({
|
|
2881
|
+
value: valueProp,
|
|
2882
|
+
defaultValue,
|
|
2883
|
+
onValueChange,
|
|
2884
|
+
animate = true,
|
|
2885
|
+
className,
|
|
2886
|
+
children,
|
|
2887
|
+
...props
|
|
2888
|
+
}, ref) => {
|
|
2889
|
+
const [ownView, setOwnView] = React16.useState(defaultValue);
|
|
2890
|
+
const view = valueProp ?? ownView;
|
|
2891
|
+
const [shownView, setShownView] = React16.useState(view);
|
|
2892
|
+
const [request, setRequest] = React16.useState(null);
|
|
2893
|
+
const [leaving, setLeaving] = React16.useState(null);
|
|
2894
|
+
const rootRef = React16.useRef(null);
|
|
2895
|
+
const ghostRef = React16.useRef(null);
|
|
2896
|
+
const running = React16.useRef([]);
|
|
2897
|
+
const focusRequest = React16.useRef(null);
|
|
2898
|
+
const observer = React16.useRef(null);
|
|
2899
|
+
const previousView = React16.useRef(view);
|
|
2900
|
+
const level = React16.Children.toArray(children).find(
|
|
2901
|
+
(child) => React16.isValidElement(child) && child.props.value === view
|
|
2902
|
+
) ?? null;
|
|
2903
|
+
if (view !== shownView) {
|
|
2904
|
+
setShownView(view);
|
|
2905
|
+
setRequest(null);
|
|
2906
|
+
setLeaving(
|
|
2907
|
+
request?.slide && request.view === view && request.element && level ? {
|
|
2908
|
+
element: request.element,
|
|
2909
|
+
direction: request.direction,
|
|
2910
|
+
top: request.top,
|
|
2911
|
+
id: (leaving?.id ?? 0) + 1
|
|
2912
|
+
} : null
|
|
2913
|
+
);
|
|
2914
|
+
}
|
|
2915
|
+
const liveLevel = () => rootRef.current?.querySelector(`:scope > ${LEVEL}`) ?? null;
|
|
2916
|
+
const tryFocus = () => {
|
|
2917
|
+
const pending = focusRequest.current;
|
|
2918
|
+
const root = rootRef.current;
|
|
2919
|
+
if (!pending?.landed || !root) return;
|
|
2920
|
+
const active = document.activeElement;
|
|
2921
|
+
if (active && active !== document.body && !root.contains(active)) {
|
|
2922
|
+
focusRequest.current = null;
|
|
2923
|
+
return;
|
|
2924
|
+
}
|
|
2925
|
+
const live = liveLevel();
|
|
2926
|
+
const target = pending.direction === "drill" ? live?.querySelector('[data-slot="nav-drill-back"]') ?? live?.querySelector('[data-slot="nav-list-item"]') : live?.querySelector(`[data-drill="${CSS.escape(pending.from ?? "")}"]`) ?? live?.querySelector('[aria-current="page"]');
|
|
2927
|
+
if (!target) return;
|
|
2928
|
+
focusRequest.current = null;
|
|
2929
|
+
observer.current?.disconnect();
|
|
2930
|
+
target.focus({ preventScroll: true });
|
|
2931
|
+
target.scrollIntoView({ block: "nearest" });
|
|
2932
|
+
};
|
|
2933
|
+
const makeRequest = (target, direction) => {
|
|
2934
|
+
const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2935
|
+
setRequest({
|
|
2936
|
+
view: target,
|
|
2937
|
+
direction,
|
|
2938
|
+
element: level,
|
|
2939
|
+
top: liveLevel()?.getBoundingClientRect().top ?? 0,
|
|
2940
|
+
slide: animate && !reduced
|
|
2941
|
+
});
|
|
2942
|
+
focusRequest.current = { direction, view: target, from: view, landed: false };
|
|
2943
|
+
observer.current?.disconnect();
|
|
2944
|
+
if (direction === "back" && rootRef.current) {
|
|
2945
|
+
observer.current ??= new MutationObserver(() => tryFocus());
|
|
2946
|
+
observer.current.observe(rootRef.current, { childList: true, subtree: true });
|
|
2947
|
+
}
|
|
2948
|
+
if (valueProp === void 0) setOwnView(target);
|
|
2949
|
+
onValueChange?.(target, direction);
|
|
2950
|
+
};
|
|
2951
|
+
const makeRequestRef = React16.useRef(makeRequest);
|
|
2952
|
+
useIsomorphicLayoutEffect(() => {
|
|
2953
|
+
makeRequestRef.current = makeRequest;
|
|
2954
|
+
});
|
|
2955
|
+
const drillContext = React16.useMemo(
|
|
2956
|
+
() => ({
|
|
2957
|
+
requestDrill: (target) => makeRequestRef.current(target, "drill"),
|
|
2958
|
+
leaving: false
|
|
2959
|
+
}),
|
|
2960
|
+
[]
|
|
2961
|
+
);
|
|
2962
|
+
const requestBack = React16.useCallback(
|
|
2963
|
+
(parent) => makeRequestRef.current(parent, "back"),
|
|
2964
|
+
[]
|
|
2965
|
+
);
|
|
2966
|
+
useIsomorphicLayoutEffect(() => {
|
|
2967
|
+
if (previousView.current === view) return;
|
|
2968
|
+
previousView.current = view;
|
|
2969
|
+
const pending = focusRequest.current;
|
|
2970
|
+
if (pending && !pending.landed && pending.view === view) pending.landed = true;
|
|
2971
|
+
else {
|
|
2972
|
+
focusRequest.current = null;
|
|
2973
|
+
observer.current?.disconnect();
|
|
2974
|
+
}
|
|
2975
|
+
const scroller = rootRef.current?.closest("[data-nav-scroller]");
|
|
2976
|
+
if (scroller) scroller.scrollTop = 0;
|
|
2977
|
+
}, [view]);
|
|
2978
|
+
useIsomorphicLayoutEffect(() => {
|
|
2979
|
+
running.current.forEach((animation) => animation.cancel());
|
|
2980
|
+
running.current = [];
|
|
2981
|
+
const live = liveLevel();
|
|
2982
|
+
const ghost = ghostRef.current;
|
|
2983
|
+
const ghostLevel = ghost?.querySelector(LEVEL);
|
|
2984
|
+
if (!leaving || !live || !ghost || !ghostLevel) return;
|
|
2985
|
+
ghostLevel.style.marginTop = `${leaving.top - live.getBoundingClientRect().top}px`;
|
|
2986
|
+
const animations = [
|
|
2987
|
+
live.animate(MOTION[leaving.direction].current, TIMING),
|
|
2988
|
+
ghost.animate(MOTION[leaving.direction].previous, TIMING)
|
|
2989
|
+
];
|
|
2990
|
+
running.current = animations;
|
|
2991
|
+
Promise.all(animations.map((animation) => animation.finished)).then(
|
|
2992
|
+
() => {
|
|
2993
|
+
ghost.style.visibility = "hidden";
|
|
2994
|
+
setLeaving((current) => current === leaving ? null : current);
|
|
2995
|
+
},
|
|
2996
|
+
// Cancelled by a later change, which owns the ghost now
|
|
2997
|
+
() => {
|
|
2998
|
+
}
|
|
2999
|
+
);
|
|
3000
|
+
}, [leaving]);
|
|
3001
|
+
React16.useEffect(() => {
|
|
3002
|
+
tryFocus();
|
|
3003
|
+
});
|
|
3004
|
+
React16.useEffect(() => {
|
|
3005
|
+
const dropOutside = (event) => {
|
|
3006
|
+
if (rootRef.current?.contains(event.target)) return;
|
|
3007
|
+
focusRequest.current = null;
|
|
3008
|
+
observer.current?.disconnect();
|
|
3009
|
+
setRequest((current) => current ? null : current);
|
|
3010
|
+
};
|
|
3011
|
+
const events = ["pointerdown", "keydown", "focusin"];
|
|
3012
|
+
events.forEach((type) => document.addEventListener(type, dropOutside, true));
|
|
3013
|
+
return () => {
|
|
3014
|
+
events.forEach((type) => document.removeEventListener(type, dropOutside, true));
|
|
3015
|
+
running.current.forEach((animation) => animation.cancel());
|
|
3016
|
+
observer.current?.disconnect();
|
|
3017
|
+
};
|
|
3018
|
+
}, []);
|
|
3019
|
+
const setRootRef = React16.useCallback(
|
|
3020
|
+
(node) => {
|
|
3021
|
+
rootRef.current = node;
|
|
3022
|
+
if (typeof ref === "function") ref(node);
|
|
3023
|
+
else if (ref) ref.current = node;
|
|
3024
|
+
},
|
|
3025
|
+
[ref]
|
|
3026
|
+
);
|
|
3027
|
+
const setGhostRef = React16.useCallback((node) => {
|
|
3028
|
+
ghostRef.current = node;
|
|
3029
|
+
if (node) node.inert = true;
|
|
3030
|
+
}, []);
|
|
3031
|
+
return /* @__PURE__ */ jsxs(
|
|
3032
|
+
"div",
|
|
3033
|
+
{
|
|
3034
|
+
ref: setRootRef,
|
|
3035
|
+
"data-slot": "nav-drill",
|
|
3036
|
+
"data-motion": leaving?.direction,
|
|
3037
|
+
className: cn(styles37["nav-drill"], className),
|
|
3038
|
+
...props,
|
|
3039
|
+
children: [
|
|
3040
|
+
/* @__PURE__ */ jsx(NavDrillContext.Provider, { value: drillContext, children: /* @__PURE__ */ jsx(NavDrillBackContext.Provider, { value: requestBack, children: level && /* @__PURE__ */ jsx(React16.Fragment, { children: level }, view) }) }),
|
|
3041
|
+
leaving && /* @__PURE__ */ jsx(
|
|
3042
|
+
"div",
|
|
3043
|
+
{
|
|
3044
|
+
ref: setGhostRef,
|
|
3045
|
+
"data-slot": "nav-drill-ghost",
|
|
3046
|
+
"data-motion": leaving.direction,
|
|
3047
|
+
"aria-hidden": "true",
|
|
3048
|
+
className: styles37["nav-drill-ghost"],
|
|
3049
|
+
children: /* @__PURE__ */ jsx(NavDrillContext.Provider, { value: LEAVING_DRILL_CONTEXT, children: /* @__PURE__ */ jsx(NavDrillBackContext.Provider, { value: NO_BACK, children: leaving.element }) })
|
|
3050
|
+
},
|
|
3051
|
+
leaving.id
|
|
3052
|
+
)
|
|
3053
|
+
]
|
|
3054
|
+
}
|
|
3055
|
+
);
|
|
3056
|
+
}
|
|
3057
|
+
);
|
|
3058
|
+
NavDrill.displayName = "NavDrill";
|
|
3059
|
+
var NavDrillLevel = React16.forwardRef(
|
|
3060
|
+
({ value, parent, label, backLabel, className, children, ...props }, ref) => {
|
|
3061
|
+
const requestBack = React16.useContext(NavDrillBackContext);
|
|
3062
|
+
React16.useEffect(() => {
|
|
3063
|
+
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production" && parent !== void 0 && backLabel && label && !backLabel.startsWith(label)) {
|
|
3064
|
+
console.warn(
|
|
3065
|
+
`NavDrillLevel: backLabel "${backLabel}" must start with label "${label}", so voice users can say what they see (WCAG 2.5.3)`
|
|
3066
|
+
);
|
|
3067
|
+
}
|
|
3068
|
+
}, [parent, label, backLabel]);
|
|
3069
|
+
return /* @__PURE__ */ jsxs(
|
|
3070
|
+
"div",
|
|
3071
|
+
{
|
|
3072
|
+
ref,
|
|
3073
|
+
"data-slot": "nav-drill-level",
|
|
3074
|
+
"data-value": value,
|
|
3075
|
+
className: cn(styles37["nav-drill-level"], className),
|
|
3076
|
+
...props,
|
|
3077
|
+
children: [
|
|
3078
|
+
parent !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3079
|
+
/* @__PURE__ */ jsxs(
|
|
3080
|
+
"button",
|
|
3081
|
+
{
|
|
3082
|
+
type: "button",
|
|
3083
|
+
"data-slot": "nav-drill-back",
|
|
3084
|
+
"aria-label": backLabel ?? `${label}, back`,
|
|
3085
|
+
className: cn(styles37["nav-list-item"], styles37["nav-list-item--back"]),
|
|
3086
|
+
onClick: () => requestBack(parent),
|
|
3087
|
+
children: [
|
|
3088
|
+
/* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-prefix"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronLeft, {}) }),
|
|
3089
|
+
/* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-label"], title: label, children: label })
|
|
3090
|
+
]
|
|
3091
|
+
}
|
|
3092
|
+
),
|
|
3093
|
+
/* @__PURE__ */ jsx("hr", { className: styles37["nav-drill-rule"] })
|
|
3094
|
+
] }),
|
|
3095
|
+
children
|
|
3096
|
+
]
|
|
3097
|
+
}
|
|
3098
|
+
);
|
|
3099
|
+
}
|
|
3100
|
+
);
|
|
3101
|
+
NavDrillLevel.displayName = "NavDrillLevel";
|
|
3102
|
+
var ListDepthContext = React16.createContext(0);
|
|
3103
|
+
var NavList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles37["nav-list"], className), ...props }));
|
|
3104
|
+
NavList.displayName = "NavList";
|
|
3105
|
+
var NavListGroup = React16.forwardRef(
|
|
3106
|
+
({ label, className, children, ...props }, ref) => {
|
|
3107
|
+
const labelId = React16.useId();
|
|
3108
|
+
const depth = React16.useContext(ListDepthContext);
|
|
3109
|
+
const group = /* @__PURE__ */ jsxs(
|
|
3110
|
+
"div",
|
|
3111
|
+
{
|
|
3112
|
+
ref,
|
|
3113
|
+
className: cn(
|
|
3114
|
+
styles37["nav-list-group"],
|
|
3115
|
+
!label && styles37["nav-list-group--unlabelled"],
|
|
3116
|
+
className
|
|
3117
|
+
),
|
|
3118
|
+
...props,
|
|
3119
|
+
children: [
|
|
3120
|
+
label && /* @__PURE__ */ jsx("div", { id: labelId, className: styles37["nav-list-group-label"], children: label }),
|
|
3121
|
+
/* @__PURE__ */ jsx(
|
|
3122
|
+
"ul",
|
|
3123
|
+
{
|
|
3124
|
+
"data-depth": depth,
|
|
3125
|
+
"aria-labelledby": label ? labelId : void 0,
|
|
3126
|
+
className: styles37["nav-list-items"],
|
|
3127
|
+
children: /* @__PURE__ */ jsx(ListDepthContext.Provider, { value: depth + 1, children })
|
|
3128
|
+
}
|
|
3129
|
+
)
|
|
3130
|
+
]
|
|
3131
|
+
}
|
|
3132
|
+
);
|
|
3133
|
+
return depth > 0 ? /* @__PURE__ */ jsx("li", { children: group }) : group;
|
|
3134
|
+
}
|
|
3135
|
+
);
|
|
3136
|
+
NavListGroup.displayName = "NavListGroup";
|
|
3137
|
+
var NavListItem = React16.forwardRef(
|
|
3138
|
+
({
|
|
3139
|
+
label,
|
|
3140
|
+
prefix,
|
|
3141
|
+
suffix,
|
|
3142
|
+
current = false,
|
|
3143
|
+
drill,
|
|
3144
|
+
asChild = false,
|
|
3145
|
+
className,
|
|
3146
|
+
children,
|
|
3147
|
+
onClick,
|
|
3148
|
+
...props
|
|
3149
|
+
}, ref) => {
|
|
3150
|
+
const drillContext = React16.useContext(NavDrillContext);
|
|
3151
|
+
const Comp = asChild ? Slot : props.href ? "a" : "button";
|
|
3152
|
+
const leaving = drillContext?.leaving ?? false;
|
|
3153
|
+
const handleClick = (event) => {
|
|
3154
|
+
onClick?.(event);
|
|
3155
|
+
if (!drill || !drillContext) return;
|
|
3156
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
3157
|
+
return;
|
|
3158
|
+
drillContext.requestDrill(drill);
|
|
3159
|
+
};
|
|
3160
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
3161
|
+
Comp,
|
|
3162
|
+
{
|
|
3163
|
+
ref,
|
|
3164
|
+
type: Comp === "button" ? "button" : void 0,
|
|
3165
|
+
"data-slot": "nav-list-item",
|
|
3166
|
+
"data-drill": drill,
|
|
3167
|
+
"aria-current": current && !leaving ? "page" : void 0,
|
|
3168
|
+
"data-current": current && leaving ? "page" : void 0,
|
|
3169
|
+
className: cn(styles37["nav-list-item"], className),
|
|
3170
|
+
onClick: handleClick,
|
|
3171
|
+
...props,
|
|
3172
|
+
children: [
|
|
3173
|
+
prefix && /* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-prefix"], "aria-hidden": "true", children: prefix }),
|
|
3174
|
+
/* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-label"], title: label, children: label }),
|
|
3175
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
3176
|
+
suffix && /* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-suffix"], children: suffix }),
|
|
3177
|
+
drill && /* @__PURE__ */ jsx("span", { className: styles37["nav-list-item-caret"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronRight, {}) })
|
|
3178
|
+
]
|
|
3179
|
+
}
|
|
3180
|
+
) });
|
|
3181
|
+
}
|
|
3182
|
+
);
|
|
3183
|
+
NavListItem.displayName = "NavListItem";
|
|
3184
|
+
var NavListSeparator = React16.forwardRef(
|
|
3185
|
+
({ className, ...props }, ref) => {
|
|
3186
|
+
const nested = React16.useContext(ListDepthContext) > 0;
|
|
3187
|
+
const Comp = nested ? "li" : "hr";
|
|
3188
|
+
return /* @__PURE__ */ jsx(
|
|
3189
|
+
Comp,
|
|
3190
|
+
{
|
|
3191
|
+
ref,
|
|
3192
|
+
role: nested ? "separator" : void 0,
|
|
3193
|
+
className: cn(styles37["nav-list-separator"], className),
|
|
3194
|
+
...props
|
|
3195
|
+
}
|
|
3196
|
+
);
|
|
3197
|
+
}
|
|
3198
|
+
);
|
|
3199
|
+
NavListSeparator.displayName = "NavListSeparator";
|
|
3200
|
+
var NavPanel = React16.forwardRef(
|
|
3201
|
+
({ header, className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(styles42["nav-panel"], className), ...props, children: /* @__PURE__ */ jsxs("div", { className: styles42["nav-scroller"], "data-nav-scroller": "", children: [
|
|
3202
|
+
header && /* @__PURE__ */ jsx("div", { className: styles42["nav-panel-header"], children: header }),
|
|
3203
|
+
children
|
|
3204
|
+
] }) })
|
|
3205
|
+
);
|
|
3206
|
+
NavPanel.displayName = "NavPanel";
|
|
3207
|
+
var NavRail = React16.forwardRef(
|
|
3208
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(styles42["nav-rail"], className), ...props, children: /* @__PURE__ */ jsx("div", { className: styles42["nav-scroller"], children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsx("ul", { className: styles42["nav-rail-list"], children }) }) }) })
|
|
3209
|
+
);
|
|
3210
|
+
NavRail.displayName = "NavRail";
|
|
3211
|
+
var NavRailItem = React16.forwardRef(
|
|
3212
|
+
({ icon, label, current = false, asChild = false, className, children, ...props }, ref) => {
|
|
3213
|
+
const Comp = asChild ? Slot : "a";
|
|
3214
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
3215
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
3216
|
+
Comp,
|
|
3217
|
+
{
|
|
3218
|
+
ref,
|
|
3219
|
+
"aria-label": label,
|
|
3220
|
+
"aria-current": current ? "page" : void 0,
|
|
3221
|
+
className: cn(styles42["nav-rail-item"], className),
|
|
3222
|
+
...props,
|
|
3223
|
+
children: [
|
|
3224
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: icon }),
|
|
3225
|
+
/* @__PURE__ */ jsx(Slottable, { children })
|
|
3226
|
+
]
|
|
3227
|
+
}
|
|
3228
|
+
) }),
|
|
3229
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "right", children: label })
|
|
3230
|
+
] }) });
|
|
3231
|
+
}
|
|
3232
|
+
);
|
|
3233
|
+
NavRailItem.displayName = "NavRailItem";
|
|
2856
3234
|
var CheckIcon3 = Check;
|
|
2857
3235
|
var ChevronDownIcon2 = ChevronDown;
|
|
2858
3236
|
var SearchIcon3 = Search;
|
|
@@ -2860,8 +3238,8 @@ var SEARCH_INPUT_SELECTOR2 = "[data-select-search]";
|
|
|
2860
3238
|
var NAVIGABLE_OPTION_SELECTOR = '[role="option"]:not([data-disabled]):not([hidden])';
|
|
2861
3239
|
var MATCHING_OPTION_SELECTOR = `${NAVIGABLE_OPTION_SELECTOR}:not([data-persistent])`;
|
|
2862
3240
|
var RADIX_HANDLED_SEARCH_KEYS = ["ArrowDown", "ArrowUp", "Escape", "Tab"];
|
|
2863
|
-
var SelectSearchContext =
|
|
2864
|
-
var useSelectSearch = () =>
|
|
3241
|
+
var SelectSearchContext = React16.createContext(null);
|
|
3242
|
+
var useSelectSearch = () => React16.useContext(SelectSearchContext);
|
|
2865
3243
|
var useIsSearching2 = () => isSearchActive(useSelectSearch());
|
|
2866
3244
|
var useSelectSearchQuery = () => {
|
|
2867
3245
|
const ctx = useSelectSearch();
|
|
@@ -2870,7 +3248,7 @@ var useSelectSearchQuery = () => {
|
|
|
2870
3248
|
}
|
|
2871
3249
|
return useSearchQuery(ctx);
|
|
2872
3250
|
};
|
|
2873
|
-
var SelectGroupMatchContext =
|
|
3251
|
+
var SelectGroupMatchContext = React16.createContext(null);
|
|
2874
3252
|
var Select = ({
|
|
2875
3253
|
open,
|
|
2876
3254
|
onOpenChange,
|
|
@@ -2878,7 +3256,7 @@ var Select = ({
|
|
|
2878
3256
|
}) => {
|
|
2879
3257
|
const search = useListSearchState(open);
|
|
2880
3258
|
const { resetForOpen } = search;
|
|
2881
|
-
const handleOpenChange =
|
|
3259
|
+
const handleOpenChange = React16.useCallback(
|
|
2882
3260
|
(nextOpen) => {
|
|
2883
3261
|
if (nextOpen) resetForOpen();
|
|
2884
3262
|
onOpenChange?.(nextOpen);
|
|
@@ -2888,7 +3266,7 @@ var Select = ({
|
|
|
2888
3266
|
return /* @__PURE__ */ jsx(SelectSearchContext.Provider, { value: search, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
|
|
2889
3267
|
};
|
|
2890
3268
|
Select.displayName = "Select";
|
|
2891
|
-
var SelectGroup =
|
|
3269
|
+
var SelectGroup = React16.forwardRef(({ hidden, ...props }, ref) => {
|
|
2892
3270
|
const searching = useIsSearching2();
|
|
2893
3271
|
const registry = useMatchRegistry();
|
|
2894
3272
|
return /* @__PURE__ */ jsx(SelectGroupMatchContext.Provider, { value: registry, children: /* @__PURE__ */ jsx(
|
|
@@ -2902,18 +3280,18 @@ var SelectGroup = React15.forwardRef(({ hidden, ...props }, ref) => {
|
|
|
2902
3280
|
});
|
|
2903
3281
|
SelectGroup.displayName = SelectPrimitive.Group.displayName;
|
|
2904
3282
|
var SelectValue = SelectPrimitive.Value;
|
|
2905
|
-
var SelectTrigger =
|
|
3283
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn(styles40["select-trigger"], className), ...props, children: [
|
|
2906
3284
|
children,
|
|
2907
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(
|
|
3285
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(styles40["select-icon"], styles40["select-icon--low-opacity"]) }) })
|
|
2908
3286
|
] }));
|
|
2909
3287
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2910
3288
|
var SelectPortal = ({ children }) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container: usePortalContainer(), children });
|
|
2911
3289
|
var selectContentElevationVariants = generateElevationVariants(
|
|
2912
|
-
|
|
3290
|
+
styles40,
|
|
2913
3291
|
"select-content",
|
|
2914
3292
|
ELEVATION.OVERLAY
|
|
2915
3293
|
);
|
|
2916
|
-
var SelectContent =
|
|
3294
|
+
var SelectContent = React16.forwardRef(
|
|
2917
3295
|
({
|
|
2918
3296
|
className,
|
|
2919
3297
|
children,
|
|
@@ -2931,13 +3309,13 @@ var SelectContent = React15.forwardRef(
|
|
|
2931
3309
|
const setListId = ctx?.setListId;
|
|
2932
3310
|
const searching = isSearchActive(ctx);
|
|
2933
3311
|
const resultCount = ctx?.matchCount ?? 0;
|
|
2934
|
-
const contentRef =
|
|
3312
|
+
const contentRef = React16.useRef(null);
|
|
2935
3313
|
const sideProps = useSearchSideLock(ctx, contentRef, {
|
|
2936
3314
|
side,
|
|
2937
3315
|
avoidCollisions,
|
|
2938
3316
|
enabled: position === "popper"
|
|
2939
3317
|
});
|
|
2940
|
-
const composedContentRef =
|
|
3318
|
+
const composedContentRef = React16.useCallback(
|
|
2941
3319
|
(node) => {
|
|
2942
3320
|
assignRefs(node, ref, contentRef);
|
|
2943
3321
|
setListId?.(node?.id || void 0);
|
|
@@ -2962,8 +3340,8 @@ var SelectContent = React15.forwardRef(
|
|
|
2962
3340
|
{
|
|
2963
3341
|
ref: composedContentRef,
|
|
2964
3342
|
className: cn(
|
|
2965
|
-
|
|
2966
|
-
position === "popper" &&
|
|
3343
|
+
styles40["select-content"],
|
|
3344
|
+
position === "popper" && styles40["select-content--popper"],
|
|
2967
3345
|
selectContentElevationVariants({ elevation }),
|
|
2968
3346
|
className
|
|
2969
3347
|
),
|
|
@@ -2981,13 +3359,13 @@ var SelectContent = React15.forwardRef(
|
|
|
2981
3359
|
},
|
|
2982
3360
|
...props,
|
|
2983
3361
|
children: [
|
|
2984
|
-
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className:
|
|
3362
|
+
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className: styles40["select-sr-status"], role: "status", "aria-live": "polite", children: searching && resultCount > 0 ? formatResultCount(resultCount) : null }) : null,
|
|
2985
3363
|
/* @__PURE__ */ jsx(
|
|
2986
3364
|
SelectPrimitive.Viewport,
|
|
2987
3365
|
{
|
|
2988
3366
|
className: cn(
|
|
2989
|
-
|
|
2990
|
-
position === "popper" &&
|
|
3367
|
+
styles40["select-viewport"],
|
|
3368
|
+
position === "popper" && styles40["select-viewport--popper"]
|
|
2991
3369
|
),
|
|
2992
3370
|
children
|
|
2993
3371
|
}
|
|
@@ -2998,7 +3376,7 @@ var SelectContent = React15.forwardRef(
|
|
|
2998
3376
|
}
|
|
2999
3377
|
);
|
|
3000
3378
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3001
|
-
var SelectSearch =
|
|
3379
|
+
var SelectSearch = React16.forwardRef(
|
|
3002
3380
|
({
|
|
3003
3381
|
className,
|
|
3004
3382
|
placeholder = "Search...",
|
|
@@ -3014,15 +3392,15 @@ var SelectSearch = React15.forwardRef(
|
|
|
3014
3392
|
}
|
|
3015
3393
|
const { ref, isRendered } = useSearchInput(ctx, alwaysVisible, forwardedRef);
|
|
3016
3394
|
if (!isRendered) return null;
|
|
3017
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
3018
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className:
|
|
3395
|
+
return /* @__PURE__ */ jsxs("div", { className: styles40["select-search"], children: [
|
|
3396
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: styles40["select-search-icon"], children: icon ?? /* @__PURE__ */ jsx(SearchIcon3, { className: cn(styles40["select-icon"], styles40["select-icon--sm"]) }) }),
|
|
3019
3397
|
/* @__PURE__ */ jsx(
|
|
3020
3398
|
"input",
|
|
3021
3399
|
{
|
|
3022
3400
|
...props,
|
|
3023
3401
|
ref,
|
|
3024
3402
|
"data-select-search": "",
|
|
3025
|
-
className: cn(
|
|
3403
|
+
className: cn(styles40["select-search-input"], className),
|
|
3026
3404
|
value: ctx.query,
|
|
3027
3405
|
placeholder,
|
|
3028
3406
|
"aria-label": ariaLabel ?? placeholder,
|
|
@@ -3059,59 +3437,203 @@ var SelectEmpty = ({ className, children, ...props }) => {
|
|
|
3059
3437
|
...props,
|
|
3060
3438
|
role: "status",
|
|
3061
3439
|
"aria-live": "polite",
|
|
3062
|
-
className: isEmpty ? cn(
|
|
3440
|
+
className: isEmpty ? cn(styles40["select-empty"], className) : void 0,
|
|
3063
3441
|
children: isEmpty ? children : null
|
|
3064
3442
|
}
|
|
3065
3443
|
);
|
|
3066
3444
|
};
|
|
3067
3445
|
SelectEmpty.displayName = "SelectEmpty";
|
|
3068
|
-
var SelectLabel =
|
|
3446
|
+
var SelectLabel = React16.forwardRef(({ className, hidden, ...props }, ref) => {
|
|
3069
3447
|
const searching = useIsSearching2();
|
|
3070
3448
|
return /* @__PURE__ */ jsx(
|
|
3071
3449
|
SelectPrimitive.Label,
|
|
3072
3450
|
{
|
|
3073
3451
|
ref,
|
|
3074
|
-
className: cn(
|
|
3452
|
+
className: cn(styles40["select-label"], className),
|
|
3075
3453
|
...props,
|
|
3076
3454
|
hidden: hidden || searching || void 0
|
|
3077
3455
|
}
|
|
3078
3456
|
);
|
|
3079
3457
|
});
|
|
3080
3458
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3081
|
-
var SelectItem =
|
|
3459
|
+
var SelectItem = React16.forwardRef(({ className, children, textValue, hidden, persistent, ...props }, ref) => {
|
|
3082
3460
|
const search = useSelectSearch();
|
|
3083
|
-
const group =
|
|
3461
|
+
const group = React16.useContext(SelectGroupMatchContext);
|
|
3084
3462
|
const matches = useFilterableItem(search, textValue, children, { group, persistent });
|
|
3085
3463
|
return /* @__PURE__ */ jsxs(
|
|
3086
3464
|
SelectPrimitive.Item,
|
|
3087
3465
|
{
|
|
3088
3466
|
ref,
|
|
3089
|
-
className: cn(
|
|
3467
|
+
className: cn(styles40["select-item"], className),
|
|
3090
3468
|
...props,
|
|
3091
3469
|
"data-persistent": persistent ? "" : void 0,
|
|
3092
3470
|
textValue,
|
|
3093
3471
|
hidden: hidden || !matches || void 0,
|
|
3094
3472
|
children: [
|
|
3095
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3096
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3473
|
+
/* @__PURE__ */ jsx("span", { className: styles40["select-item-indicator"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon3, { className: styles40["select-icon"] }) }) }),
|
|
3474
|
+
/* @__PURE__ */ jsx("span", { className: styles40["select-item-text"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) })
|
|
3097
3475
|
]
|
|
3098
3476
|
}
|
|
3099
3477
|
);
|
|
3100
3478
|
});
|
|
3101
3479
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3102
|
-
var SelectSeparator =
|
|
3480
|
+
var SelectSeparator = React16.forwardRef(({ className, persistent, ...props }, ref) => {
|
|
3103
3481
|
const searching = useIsSearching2();
|
|
3104
3482
|
if (searching && !persistent) return null;
|
|
3105
3483
|
return /* @__PURE__ */ jsx(
|
|
3106
3484
|
SelectPrimitive.Separator,
|
|
3107
3485
|
{
|
|
3108
3486
|
ref,
|
|
3109
|
-
className: cn(
|
|
3487
|
+
className: cn(styles40["select-separator"], className),
|
|
3110
3488
|
...props
|
|
3111
3489
|
}
|
|
3112
3490
|
);
|
|
3113
3491
|
});
|
|
3114
3492
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
3493
|
+
|
|
3494
|
+
// src/components/select/select-typeahead.ts
|
|
3495
|
+
var blockClosedTypeahead = (event) => {
|
|
3496
|
+
const typed = event.key.length === 1 && event.key !== " ";
|
|
3497
|
+
if (typed && !event.ctrlKey && !event.metaKey && !event.altKey) event.preventDefault();
|
|
3498
|
+
};
|
|
3499
|
+
function Skeleton({ className, ...props }) {
|
|
3500
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles41["skeleton"], className), ...props });
|
|
3501
|
+
}
|
|
3502
|
+
var NavSwitcherSelect = React16.forwardRef(
|
|
3503
|
+
({ label, noun, collection, options, value, onValueChange, onHighlight, onHighlightEnd, action }, ref) => {
|
|
3504
|
+
const labelId = React16.useId();
|
|
3505
|
+
const actionValue = React16.useId();
|
|
3506
|
+
const actionPending = React16.useRef(false);
|
|
3507
|
+
if (options.length <= 1 && !action) {
|
|
3508
|
+
return /* @__PURE__ */ jsx("h2", { className: styles42["nav-switcher-heading"], children: /* @__PURE__ */ jsx(
|
|
3509
|
+
"span",
|
|
3510
|
+
{
|
|
3511
|
+
className: cn(styles42["nav-switcher-plain"], styles42["nav-switcher-name"]),
|
|
3512
|
+
title: label,
|
|
3513
|
+
children: label
|
|
3514
|
+
}
|
|
3515
|
+
) });
|
|
3516
|
+
}
|
|
3517
|
+
return /* @__PURE__ */ jsx("h2", { "aria-labelledby": labelId, className: styles42["nav-switcher-heading"], children: /* @__PURE__ */ jsxs(
|
|
3518
|
+
Select,
|
|
3519
|
+
{
|
|
3520
|
+
value,
|
|
3521
|
+
onValueChange: (next) => {
|
|
3522
|
+
if (next === actionValue) actionPending.current = true;
|
|
3523
|
+
else onValueChange(next);
|
|
3524
|
+
},
|
|
3525
|
+
children: [
|
|
3526
|
+
/* @__PURE__ */ jsxs(
|
|
3527
|
+
SelectTrigger,
|
|
3528
|
+
{
|
|
3529
|
+
ref,
|
|
3530
|
+
"aria-label": `${label}, switch ${noun}`,
|
|
3531
|
+
className: styles42["nav-switcher"],
|
|
3532
|
+
onKeyDown: blockClosedTypeahead,
|
|
3533
|
+
children: [
|
|
3534
|
+
/* @__PURE__ */ jsx(
|
|
3535
|
+
"span",
|
|
3536
|
+
{
|
|
3537
|
+
id: labelId,
|
|
3538
|
+
className: cn(styles42["nav-switcher-label"], styles42["nav-switcher-name"]),
|
|
3539
|
+
title: label,
|
|
3540
|
+
children: label
|
|
3541
|
+
}
|
|
3542
|
+
),
|
|
3543
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: styles42["nav-switcher-icon"], "aria-hidden": "true" })
|
|
3544
|
+
]
|
|
3545
|
+
}
|
|
3546
|
+
),
|
|
3547
|
+
/* @__PURE__ */ jsxs(
|
|
3548
|
+
SelectContent,
|
|
3549
|
+
{
|
|
3550
|
+
className: styles42["nav-switcher-list"],
|
|
3551
|
+
onCloseAutoFocus: () => {
|
|
3552
|
+
if (!actionPending.current) return;
|
|
3553
|
+
actionPending.current = false;
|
|
3554
|
+
action?.onSelect();
|
|
3555
|
+
},
|
|
3556
|
+
children: [
|
|
3557
|
+
/* @__PURE__ */ jsx(
|
|
3558
|
+
SelectSearch,
|
|
3559
|
+
{
|
|
3560
|
+
placeholder: `Search ${collection}...`,
|
|
3561
|
+
"aria-label": `Search ${collection}`
|
|
3562
|
+
}
|
|
3563
|
+
),
|
|
3564
|
+
/* @__PURE__ */ jsxs(SelectEmpty, { children: [
|
|
3565
|
+
"No ",
|
|
3566
|
+
collection,
|
|
3567
|
+
" found"
|
|
3568
|
+
] }),
|
|
3569
|
+
options.map((option) => /* @__PURE__ */ jsx(
|
|
3570
|
+
SelectItem,
|
|
3571
|
+
{
|
|
3572
|
+
value: option.value,
|
|
3573
|
+
textValue: [option.label, ...option.keywords ?? []].join(" "),
|
|
3574
|
+
onPointerEnter: () => onHighlight?.(option.value),
|
|
3575
|
+
onPointerLeave: onHighlightEnd,
|
|
3576
|
+
onFocus: () => onHighlight?.(option.value),
|
|
3577
|
+
onBlur: onHighlightEnd,
|
|
3578
|
+
children: /* @__PURE__ */ jsx("span", { className: styles42["nav-switcher-option"], title: option.label, children: option.label })
|
|
3579
|
+
},
|
|
3580
|
+
option.value
|
|
3581
|
+
)),
|
|
3582
|
+
action && /* @__PURE__ */ jsxs("div", { className: styles42["nav-switcher-footer"], children: [
|
|
3583
|
+
/* @__PURE__ */ jsx(SelectSeparator, { persistent: true }),
|
|
3584
|
+
/* @__PURE__ */ jsx(
|
|
3585
|
+
SelectItem,
|
|
3586
|
+
{
|
|
3587
|
+
value: actionValue,
|
|
3588
|
+
textValue: action.label,
|
|
3589
|
+
persistent: true,
|
|
3590
|
+
className: styles42["nav-switcher-action"],
|
|
3591
|
+
children: /* @__PURE__ */ jsx("span", { className: buttonVariants({ variant: "link", size: "sm" }), children: action.label })
|
|
3592
|
+
}
|
|
3593
|
+
)
|
|
3594
|
+
] })
|
|
3595
|
+
]
|
|
3596
|
+
}
|
|
3597
|
+
)
|
|
3598
|
+
]
|
|
3599
|
+
}
|
|
3600
|
+
) });
|
|
3601
|
+
}
|
|
3602
|
+
);
|
|
3603
|
+
NavSwitcherSelect.displayName = "NavSwitcherSelect";
|
|
3604
|
+
var NavSwitcher = React16.forwardRef(
|
|
3605
|
+
(props, ref) => props.loading ? /* @__PURE__ */ jsxs(
|
|
3606
|
+
"div",
|
|
3607
|
+
{
|
|
3608
|
+
className: cn(styles42["nav-switcher-heading"], styles42["nav-switcher-placeholder"]),
|
|
3609
|
+
"aria-busy": "true",
|
|
3610
|
+
children: [
|
|
3611
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles42["nav-switcher-skeleton"] }),
|
|
3612
|
+
/* @__PURE__ */ jsx("span", { className: styles42["nav-switcher-loading-label"], children: "Loading" })
|
|
3613
|
+
]
|
|
3614
|
+
}
|
|
3615
|
+
) : /* @__PURE__ */ jsx(NavSwitcherSelect, { ref, ...props })
|
|
3616
|
+
);
|
|
3617
|
+
NavSwitcher.displayName = "NavSwitcher";
|
|
3618
|
+
var OctagonAlert = AlertOctagon;
|
|
3619
|
+
var HomeIcon = Home;
|
|
3620
|
+
var NotFound = ({
|
|
3621
|
+
className,
|
|
3622
|
+
title = "Oops! Page Not Found",
|
|
3623
|
+
description = "The page or resource you're looking for doesn't exist or has been moved.",
|
|
3624
|
+
showHomeButton = true,
|
|
3625
|
+
onHomeClick = () => window.location.href = "/"
|
|
3626
|
+
}) => {
|
|
3627
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles43["page-not-found"], className), children: /* @__PURE__ */ jsxs("div", { className: styles43["page-not-found-inner"], children: [
|
|
3628
|
+
/* @__PURE__ */ jsx("div", { className: styles43["icon-container"], children: /* @__PURE__ */ jsx(OctagonAlert, { className: styles43["alert-icon"] }) }),
|
|
3629
|
+
/* @__PURE__ */ jsx("h1", { className: styles43["title"], children: title }),
|
|
3630
|
+
/* @__PURE__ */ jsx("p", { className: styles43["description"], children: description }),
|
|
3631
|
+
/* @__PURE__ */ jsx("div", { className: styles43["actions"], children: showHomeButton && /* @__PURE__ */ jsxs(Button, { onClick: onHomeClick, variant: "secondary", children: [
|
|
3632
|
+
/* @__PURE__ */ jsx(HomeIcon, { className: styles43["home-icon"] }),
|
|
3633
|
+
"Return Home"
|
|
3634
|
+
] }) })
|
|
3635
|
+
] }) });
|
|
3636
|
+
};
|
|
3115
3637
|
var ChevronLeftIcon2 = ChevronLeft;
|
|
3116
3638
|
var ChevronRightIcon3 = ChevronRight;
|
|
3117
3639
|
var ChevronsLeftIcon = ChevronsLeft;
|
|
@@ -3210,8 +3732,8 @@ var Pagination = ({
|
|
|
3210
3732
|
}
|
|
3211
3733
|
return pageButtons;
|
|
3212
3734
|
};
|
|
3213
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
3214
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3735
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles44["pagination"], className), children: [
|
|
3736
|
+
/* @__PURE__ */ jsx("div", { className: styles44["info-container"], children: showInfo && hasFilteredItems && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3215
3737
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
3216
3738
|
"Showing ",
|
|
3217
3739
|
startItem,
|
|
@@ -3221,7 +3743,7 @@ var Pagination = ({
|
|
|
3221
3743
|
/* @__PURE__ */ jsx(
|
|
3222
3744
|
SelectTrigger,
|
|
3223
3745
|
{
|
|
3224
|
-
className:
|
|
3746
|
+
className: styles44["items-per-page-trigger"],
|
|
3225
3747
|
"aria-label": "Items per page",
|
|
3226
3748
|
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
3227
3749
|
}
|
|
@@ -3235,7 +3757,7 @@ var Pagination = ({
|
|
|
3235
3757
|
type
|
|
3236
3758
|
] })
|
|
3237
3759
|
] }) }),
|
|
3238
|
-
/* @__PURE__ */ jsxs("nav", { className:
|
|
3760
|
+
/* @__PURE__ */ jsxs("nav", { className: styles44["page-navigation-container"], "aria-label": "Pagination", children: [
|
|
3239
3761
|
showFirstLastButtons && /* @__PURE__ */ jsx(
|
|
3240
3762
|
Button,
|
|
3241
3763
|
{
|
|
@@ -3285,13 +3807,13 @@ var Pagination = ({
|
|
|
3285
3807
|
] });
|
|
3286
3808
|
};
|
|
3287
3809
|
var PanelLabel = ({ className, label }) => {
|
|
3288
|
-
return /* @__PURE__ */ jsx("div", { className: cn(
|
|
3810
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles45["panel-label"], className), children: label });
|
|
3289
3811
|
};
|
|
3290
|
-
var Progress =
|
|
3291
|
-
({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(
|
|
3812
|
+
var Progress = React16.forwardRef(
|
|
3813
|
+
({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(styles46["progress"], className), ...props, children: /* @__PURE__ */ jsx(
|
|
3292
3814
|
ProgressPrimitive.Indicator,
|
|
3293
3815
|
{
|
|
3294
|
-
className: cn(
|
|
3816
|
+
className: cn(styles46["progress-indicator"], styles46[color]),
|
|
3295
3817
|
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3296
3818
|
}
|
|
3297
3819
|
) })
|
|
@@ -3313,29 +3835,29 @@ var STATUS_LABELS = {
|
|
|
3313
3835
|
info: "Information",
|
|
3314
3836
|
danger: "Error"
|
|
3315
3837
|
};
|
|
3316
|
-
var layoutVariants = cva(
|
|
3838
|
+
var layoutVariants = cva(styles47["progress-indicator"], {
|
|
3317
3839
|
variants: {
|
|
3318
3840
|
layout: {
|
|
3319
|
-
horizontal:
|
|
3320
|
-
vertical:
|
|
3841
|
+
horizontal: styles47["progress-indicator--horizontal"],
|
|
3842
|
+
vertical: styles47["progress-indicator--vertical"]
|
|
3321
3843
|
}
|
|
3322
3844
|
},
|
|
3323
3845
|
defaultVariants: {
|
|
3324
3846
|
layout: "horizontal"
|
|
3325
3847
|
}
|
|
3326
3848
|
});
|
|
3327
|
-
var markerVariants = cva(
|
|
3849
|
+
var markerVariants = cva(styles47["progress-indicator-step-marker"], {
|
|
3328
3850
|
variants: {
|
|
3329
3851
|
status: {
|
|
3330
3852
|
editing: "",
|
|
3331
3853
|
empty: "",
|
|
3332
3854
|
neutral: "",
|
|
3333
3855
|
info: "",
|
|
3334
|
-
success:
|
|
3335
|
-
danger:
|
|
3856
|
+
success: styles47["progress-indicator-step-marker--success"],
|
|
3857
|
+
danger: styles47["progress-indicator-step-marker--danger"]
|
|
3336
3858
|
},
|
|
3337
3859
|
active: {
|
|
3338
|
-
true:
|
|
3860
|
+
true: styles47["progress-indicator-step-marker--active"],
|
|
3339
3861
|
false: ""
|
|
3340
3862
|
}
|
|
3341
3863
|
},
|
|
@@ -3353,41 +3875,41 @@ function ProgressIndicator({
|
|
|
3353
3875
|
"aria-label": ariaLabel = "Progress",
|
|
3354
3876
|
...props
|
|
3355
3877
|
}) {
|
|
3356
|
-
const stepChildren =
|
|
3878
|
+
const stepChildren = React16.Children.toArray(children);
|
|
3357
3879
|
const stepCount = stepChildren.length;
|
|
3358
3880
|
const hasActive = currentIndex >= 0 && currentIndex < stepCount;
|
|
3359
3881
|
const segmentSize = stepCount > 0 ? 100 / stepCount : 0;
|
|
3360
3882
|
const isLastStep = currentIndex === stepCount - 1;
|
|
3361
3883
|
const fillSize = hasActive ? isLastStep ? 100 : (currentIndex + 0.5) * segmentSize : 0;
|
|
3362
3884
|
const steps = stepChildren.map((child, index) => {
|
|
3363
|
-
if (!
|
|
3885
|
+
if (!React16.isValidElement(child) || child.type !== ProgressIndicatorStep) {
|
|
3364
3886
|
throw new Error("ProgressIndicator only accepts <ProgressIndicatorStep> children.");
|
|
3365
3887
|
}
|
|
3366
|
-
return
|
|
3888
|
+
return React16.cloneElement(child, {
|
|
3367
3889
|
index,
|
|
3368
3890
|
currentIndex,
|
|
3369
3891
|
elevation
|
|
3370
3892
|
});
|
|
3371
3893
|
});
|
|
3372
3894
|
const interactive = stepChildren.some((child) => {
|
|
3373
|
-
if (!
|
|
3895
|
+
if (!React16.isValidElement(child)) return false;
|
|
3374
3896
|
const stepProps = child.props;
|
|
3375
3897
|
return Boolean(stepProps.href || stepProps.onClick);
|
|
3376
3898
|
});
|
|
3377
3899
|
const Container = interactive ? "nav" : "div";
|
|
3378
3900
|
return /* @__PURE__ */ jsxs(Container, { className: cn(layoutVariants({ layout }), className), ...props, children: [
|
|
3379
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3901
|
+
/* @__PURE__ */ jsx("div", { className: styles47["progress-indicator-track"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
3380
3902
|
Progress,
|
|
3381
3903
|
{
|
|
3382
3904
|
value: 100,
|
|
3383
3905
|
color: "primary",
|
|
3384
|
-
className:
|
|
3906
|
+
className: styles47["progress-indicator-rail"],
|
|
3385
3907
|
style: {
|
|
3386
3908
|
"--pi-fill-size": `${fillSize}%`
|
|
3387
3909
|
}
|
|
3388
3910
|
}
|
|
3389
3911
|
) }),
|
|
3390
|
-
/* @__PURE__ */ jsx("ul", { className:
|
|
3912
|
+
/* @__PURE__ */ jsx("ul", { className: styles47["progress-indicator-steps"], "aria-label": ariaLabel, children: steps })
|
|
3391
3913
|
] });
|
|
3392
3914
|
}
|
|
3393
3915
|
function ProgressIndicatorStep({
|
|
@@ -3419,15 +3941,15 @@ function ProgressIndicatorStep({
|
|
|
3419
3941
|
className: markerVariants({ status: effectiveStatus, active })
|
|
3420
3942
|
}
|
|
3421
3943
|
),
|
|
3422
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
3423
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3424
|
-
description && /* @__PURE__ */ jsx("span", { className:
|
|
3425
|
-
statusLabel && /* @__PURE__ */ jsx("span", { className:
|
|
3944
|
+
/* @__PURE__ */ jsxs("span", { className: styles47["progress-indicator-step-text"], children: [
|
|
3945
|
+
/* @__PURE__ */ jsx("span", { className: styles47["progress-indicator-step-name"], children: name }),
|
|
3946
|
+
description && /* @__PURE__ */ jsx("span", { className: styles47["progress-indicator-step-description"], children: description }),
|
|
3947
|
+
statusLabel && /* @__PURE__ */ jsx("span", { className: styles47["progress-indicator-step-status"], children: statusLabel })
|
|
3426
3948
|
] })
|
|
3427
3949
|
] });
|
|
3428
3950
|
const innerClassName = cn(
|
|
3429
|
-
|
|
3430
|
-
interactive &&
|
|
3951
|
+
styles47["progress-indicator-step-inner"],
|
|
3952
|
+
interactive && styles47["progress-indicator-step-inner--interactive"]
|
|
3431
3953
|
);
|
|
3432
3954
|
let inner;
|
|
3433
3955
|
if (href) {
|
|
@@ -3450,8 +3972,8 @@ function ProgressIndicatorStep({
|
|
|
3450
3972
|
"li",
|
|
3451
3973
|
{
|
|
3452
3974
|
className: cn(
|
|
3453
|
-
|
|
3454
|
-
active &&
|
|
3975
|
+
styles47["progress-indicator-step"],
|
|
3976
|
+
active && styles47["progress-indicator-step--active"],
|
|
3455
3977
|
className
|
|
3456
3978
|
),
|
|
3457
3979
|
...props,
|
|
@@ -3475,16 +3997,16 @@ var RadialGraph = forwardRef(
|
|
|
3475
3997
|
"div",
|
|
3476
3998
|
{
|
|
3477
3999
|
ref,
|
|
3478
|
-
className: cn(
|
|
4000
|
+
className: cn(styles48["radial-graph"], styles48[graphSize], className),
|
|
3479
4001
|
...props,
|
|
3480
4002
|
children: [
|
|
3481
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4003
|
+
/* @__PURE__ */ jsx("div", { className: styles48["bars-container"], children: bars.map((_, i) => {
|
|
3482
4004
|
const isActive = i < percentage;
|
|
3483
4005
|
const delay = `${i * 10}ms`;
|
|
3484
4006
|
return /* @__PURE__ */ jsx(
|
|
3485
4007
|
"div",
|
|
3486
4008
|
{
|
|
3487
|
-
className:
|
|
4009
|
+
className: styles48["bar"],
|
|
3488
4010
|
style: {
|
|
3489
4011
|
transform: `rotate(${i * 3.6}deg)`
|
|
3490
4012
|
},
|
|
@@ -3492,22 +4014,22 @@ var RadialGraph = forwardRef(
|
|
|
3492
4014
|
"div",
|
|
3493
4015
|
{
|
|
3494
4016
|
className: cn(
|
|
3495
|
-
|
|
3496
|
-
isActive ?
|
|
4017
|
+
styles48["bar-inner"],
|
|
4018
|
+
isActive ? styles48["bar-inner--active"] : styles48["bar-inner--inactive"]
|
|
3497
4019
|
),
|
|
3498
4020
|
style: {
|
|
3499
4021
|
transitionDelay: delay,
|
|
3500
4022
|
animationDelay: delay
|
|
3501
4023
|
},
|
|
3502
4024
|
children: [
|
|
3503
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4025
|
+
/* @__PURE__ */ jsx("div", { className: styles48["bar-background"] }),
|
|
3504
4026
|
/* @__PURE__ */ jsx(
|
|
3505
4027
|
"div",
|
|
3506
4028
|
{
|
|
3507
4029
|
className: cn(
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
isActive ?
|
|
4030
|
+
styles48["bar-gradient"],
|
|
4031
|
+
styles48[`bar-gradient--${variant}`],
|
|
4032
|
+
isActive ? styles48["bar-gradient--active"] : styles48["bar-gradient--inactive"]
|
|
3511
4033
|
),
|
|
3512
4034
|
style: {
|
|
3513
4035
|
transitionDelay: delay,
|
|
@@ -3522,9 +4044,9 @@ var RadialGraph = forwardRef(
|
|
|
3522
4044
|
i
|
|
3523
4045
|
);
|
|
3524
4046
|
}) }),
|
|
3525
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3526
|
-
/* @__PURE__ */ jsx("p", { className: cn(
|
|
3527
|
-
subLabel && /* @__PURE__ */ jsx("p", { className:
|
|
4047
|
+
/* @__PURE__ */ jsxs("div", { className: styles48["label-container"], children: [
|
|
4048
|
+
/* @__PURE__ */ jsx("p", { className: cn(styles48["label"], styles48[graphSize]), children: label }),
|
|
4049
|
+
subLabel && /* @__PURE__ */ jsx("p", { className: styles48["sub-label"], children: subLabel })
|
|
3528
4050
|
] })
|
|
3529
4051
|
]
|
|
3530
4052
|
}
|
|
@@ -3550,13 +4072,13 @@ var RadioDropdown = ({
|
|
|
3550
4072
|
);
|
|
3551
4073
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
3552
4074
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className, children: [
|
|
3553
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
4075
|
+
/* @__PURE__ */ jsxs("span", { className: styles49["selector-button-inner"], children: [
|
|
3554
4076
|
selectedOption?.label || label,
|
|
3555
4077
|
hasSelectedCount && /* @__PURE__ */ jsx(Badge, { variant: "primary", children: selectedOption.count })
|
|
3556
4078
|
] }),
|
|
3557
|
-
/* @__PURE__ */ jsx(ChevronDownIcon3, { className:
|
|
4079
|
+
/* @__PURE__ */ jsx(ChevronDownIcon3, { className: styles49["chevron-icon"] })
|
|
3558
4080
|
] }) }),
|
|
3559
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className:
|
|
4081
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: styles49["dropdown-menu-content"], children: [
|
|
3560
4082
|
searchable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3561
4083
|
/* @__PURE__ */ jsx(DropdownMenuSearch, { placeholder: searchPlaceholder, "aria-label": label }),
|
|
3562
4084
|
/* @__PURE__ */ jsx(DropdownMenuEmpty, { children: emptyPlaceholder })
|
|
@@ -3576,25 +4098,25 @@ var RadioDropdown = ({
|
|
|
3576
4098
|
] });
|
|
3577
4099
|
};
|
|
3578
4100
|
var CircleIcon2 = Circle;
|
|
3579
|
-
var RadioGroup2 =
|
|
4101
|
+
var RadioGroup2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
3580
4102
|
return /* @__PURE__ */ jsx(
|
|
3581
4103
|
RadioGroupPrimitive.Root,
|
|
3582
4104
|
{
|
|
3583
|
-
className: cn(
|
|
4105
|
+
className: cn(styles50["radio-group"], className),
|
|
3584
4106
|
...props,
|
|
3585
4107
|
ref
|
|
3586
4108
|
}
|
|
3587
4109
|
);
|
|
3588
4110
|
});
|
|
3589
4111
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3590
|
-
var RadioGroupItem =
|
|
4112
|
+
var RadioGroupItem = React16.forwardRef(({ className, ...props }, ref) => {
|
|
3591
4113
|
return /* @__PURE__ */ jsx(
|
|
3592
4114
|
RadioGroupPrimitive.Item,
|
|
3593
4115
|
{
|
|
3594
4116
|
ref,
|
|
3595
|
-
className: cn(
|
|
4117
|
+
className: cn(styles50["radio-group-item"], className),
|
|
3596
4118
|
...props,
|
|
3597
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className:
|
|
4119
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: styles50["radio-group-item-indicator"], children: /* @__PURE__ */ jsx(CircleIcon2, { className: styles50["indicator-icon"] }) })
|
|
3598
4120
|
}
|
|
3599
4121
|
);
|
|
3600
4122
|
});
|
|
@@ -3627,157 +4149,157 @@ var getTypeConfig = (type) => {
|
|
|
3627
4149
|
case "agent":
|
|
3628
4150
|
return {
|
|
3629
4151
|
icon: "Bot",
|
|
3630
|
-
className:
|
|
4152
|
+
className: styles51["badge--agent"],
|
|
3631
4153
|
label: "Agent"
|
|
3632
4154
|
};
|
|
3633
4155
|
case "benchmark":
|
|
3634
4156
|
return {
|
|
3635
4157
|
icon: "LineChart",
|
|
3636
|
-
className:
|
|
4158
|
+
className: styles51["badge--benchmark"],
|
|
3637
4159
|
label: "Benchmark"
|
|
3638
4160
|
};
|
|
3639
4161
|
case "benchmark-result":
|
|
3640
4162
|
return {
|
|
3641
4163
|
icon: "FileChartLine",
|
|
3642
|
-
className:
|
|
4164
|
+
className: styles51["badge--benchmark-result"],
|
|
3643
4165
|
label: "Benchmark Result"
|
|
3644
4166
|
};
|
|
3645
4167
|
case "code":
|
|
3646
4168
|
return {
|
|
3647
4169
|
icon: "Code",
|
|
3648
|
-
className:
|
|
4170
|
+
className: styles51["badge--code"],
|
|
3649
4171
|
label: "Code"
|
|
3650
4172
|
};
|
|
3651
4173
|
case "binary":
|
|
3652
4174
|
return {
|
|
3653
4175
|
icon: "Binary",
|
|
3654
|
-
className:
|
|
4176
|
+
className: styles51["badge--binary"],
|
|
3655
4177
|
label: "Binary"
|
|
3656
4178
|
};
|
|
3657
4179
|
case "certificate":
|
|
3658
4180
|
return {
|
|
3659
4181
|
icon: "Award",
|
|
3660
|
-
className:
|
|
4182
|
+
className: styles51["badge--certificate"],
|
|
3661
4183
|
label: "Certificate"
|
|
3662
4184
|
};
|
|
3663
4185
|
case "compute":
|
|
3664
4186
|
return {
|
|
3665
4187
|
icon: "Cpu",
|
|
3666
|
-
className:
|
|
4188
|
+
className: styles51["badge--compute"],
|
|
3667
4189
|
label: "Compute"
|
|
3668
4190
|
};
|
|
3669
4191
|
case "credential":
|
|
3670
4192
|
return {
|
|
3671
4193
|
icon: "IdCardLanyard",
|
|
3672
|
-
className:
|
|
4194
|
+
className: styles51["badge--credential"],
|
|
3673
4195
|
label: "Credential"
|
|
3674
4196
|
};
|
|
3675
4197
|
case "database":
|
|
3676
4198
|
return {
|
|
3677
4199
|
icon: "Database",
|
|
3678
|
-
className:
|
|
4200
|
+
className: styles51["badge--database"],
|
|
3679
4201
|
label: "Database"
|
|
3680
4202
|
};
|
|
3681
4203
|
case "dataset":
|
|
3682
4204
|
return {
|
|
3683
4205
|
icon: "Table",
|
|
3684
|
-
className:
|
|
4206
|
+
className: styles51["badge--dataset"],
|
|
3685
4207
|
label: "Dataset"
|
|
3686
4208
|
};
|
|
3687
4209
|
case "document":
|
|
3688
4210
|
return {
|
|
3689
4211
|
icon: "FileText",
|
|
3690
|
-
className:
|
|
4212
|
+
className: styles51["badge--document"],
|
|
3691
4213
|
label: "Document"
|
|
3692
4214
|
};
|
|
3693
4215
|
case "skill":
|
|
3694
4216
|
return {
|
|
3695
4217
|
icon: "FileCog",
|
|
3696
|
-
className:
|
|
4218
|
+
className: styles51["badge--skill"],
|
|
3697
4219
|
label: "Skill"
|
|
3698
4220
|
};
|
|
3699
4221
|
case "media":
|
|
3700
4222
|
return {
|
|
3701
4223
|
icon: "FileImage",
|
|
3702
|
-
className:
|
|
4224
|
+
className: styles51["badge--media"],
|
|
3703
4225
|
label: "Media"
|
|
3704
4226
|
};
|
|
3705
4227
|
case "guardrail":
|
|
3706
4228
|
return {
|
|
3707
4229
|
icon: "Fence",
|
|
3708
|
-
className:
|
|
4230
|
+
className: styles51["badge--guardrail"],
|
|
3709
4231
|
label: "Guardrail"
|
|
3710
4232
|
};
|
|
3711
4233
|
case "model":
|
|
3712
4234
|
return {
|
|
3713
4235
|
icon: "Brain",
|
|
3714
|
-
className:
|
|
4236
|
+
className: styles51["badge--model"],
|
|
3715
4237
|
label: "Model"
|
|
3716
4238
|
};
|
|
3717
4239
|
case "prompt":
|
|
3718
4240
|
return {
|
|
3719
4241
|
icon: "MessageSquareText",
|
|
3720
|
-
className:
|
|
4242
|
+
className: styles51["badge--prompt"],
|
|
3721
4243
|
label: "Prompt"
|
|
3722
4244
|
};
|
|
3723
4245
|
case "system-prompt":
|
|
3724
4246
|
return {
|
|
3725
4247
|
icon: "MessageSquareCode",
|
|
3726
|
-
className:
|
|
4248
|
+
className: styles51["badge--system-prompt"],
|
|
3727
4249
|
label: "System Prompt"
|
|
3728
4250
|
};
|
|
3729
4251
|
case "reasoning":
|
|
3730
4252
|
return {
|
|
3731
4253
|
icon: "MessageSquareMore",
|
|
3732
|
-
className:
|
|
4254
|
+
className: styles51["badge--reasoning"],
|
|
3733
4255
|
label: "Reasoning"
|
|
3734
4256
|
};
|
|
3735
4257
|
case "token":
|
|
3736
4258
|
return {
|
|
3737
4259
|
icon: "Coins",
|
|
3738
|
-
className:
|
|
4260
|
+
className: styles51["badge--token"],
|
|
3739
4261
|
label: "Token"
|
|
3740
4262
|
};
|
|
3741
4263
|
case "tool":
|
|
3742
4264
|
return {
|
|
3743
4265
|
icon: "Wrench",
|
|
3744
|
-
className:
|
|
4266
|
+
className: styles51["badge--tool"],
|
|
3745
4267
|
label: "Tool"
|
|
3746
4268
|
};
|
|
3747
4269
|
case "config":
|
|
3748
4270
|
return {
|
|
3749
4271
|
icon: "Settings2",
|
|
3750
|
-
className:
|
|
4272
|
+
className: styles51["badge--config"],
|
|
3751
4273
|
label: "Configuration"
|
|
3752
4274
|
};
|
|
3753
4275
|
case "unknown":
|
|
3754
4276
|
default:
|
|
3755
4277
|
return {
|
|
3756
4278
|
icon: "Box",
|
|
3757
|
-
className:
|
|
4279
|
+
className: styles51["badge--unknown"],
|
|
3758
4280
|
label: "Unknown"
|
|
3759
4281
|
};
|
|
3760
4282
|
}
|
|
3761
4283
|
};
|
|
3762
|
-
var ScrollArea =
|
|
3763
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className:
|
|
4284
|
+
var ScrollArea = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ref, className: cn(styles52["scroll-area"], className), ...props, children: [
|
|
4285
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: styles52["scroll-area-viewport"], children }),
|
|
3764
4286
|
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
3765
4287
|
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
3766
4288
|
] }));
|
|
3767
4289
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3768
|
-
var ScrollBar =
|
|
4290
|
+
var ScrollBar = React16.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3769
4291
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3770
4292
|
{
|
|
3771
4293
|
ref,
|
|
3772
4294
|
orientation,
|
|
3773
4295
|
className: cn(
|
|
3774
|
-
|
|
3775
|
-
orientation === "vertical" &&
|
|
3776
|
-
orientation === "horizontal" &&
|
|
4296
|
+
styles52["scroll-bar"],
|
|
4297
|
+
orientation === "vertical" && styles52["scroll-bar--vertical"],
|
|
4298
|
+
orientation === "horizontal" && styles52["scroll-bar--horizontal"],
|
|
3777
4299
|
className
|
|
3778
4300
|
),
|
|
3779
4301
|
...props,
|
|
3780
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className:
|
|
4302
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: styles52["scroll-area-thumb"] })
|
|
3781
4303
|
}
|
|
3782
4304
|
));
|
|
3783
4305
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
@@ -3794,20 +4316,20 @@ var SearchBar = ({
|
|
|
3794
4316
|
const handleClear = () => {
|
|
3795
4317
|
setSearchQuery("");
|
|
3796
4318
|
};
|
|
3797
|
-
return /* @__PURE__ */ jsx("search", { className: cn(
|
|
4319
|
+
return /* @__PURE__ */ jsx("search", { className: cn(styles53["search-bar"], className), children: /* @__PURE__ */ jsx(
|
|
3798
4320
|
Input,
|
|
3799
4321
|
{
|
|
3800
4322
|
placeholder,
|
|
3801
4323
|
value: searchQuery,
|
|
3802
4324
|
onChange: handleChange,
|
|
3803
|
-
className:
|
|
3804
|
-
prefix: /* @__PURE__ */ jsx(SearchIcon4, { className:
|
|
4325
|
+
className: styles53["input"],
|
|
4326
|
+
prefix: /* @__PURE__ */ jsx(SearchIcon4, { className: styles53["search-icon"] }),
|
|
3805
4327
|
suffix: searchQuery && /* @__PURE__ */ jsx(
|
|
3806
4328
|
IconButton,
|
|
3807
4329
|
{
|
|
3808
4330
|
name: "X",
|
|
3809
4331
|
onClick: handleClear,
|
|
3810
|
-
className:
|
|
4332
|
+
className: styles53["clear-button"],
|
|
3811
4333
|
label: "Clear search"
|
|
3812
4334
|
}
|
|
3813
4335
|
)
|
|
@@ -3821,15 +4343,14 @@ var SectionHeading = ({
|
|
|
3821
4343
|
className
|
|
3822
4344
|
}) => {
|
|
3823
4345
|
const hasRightContent = !!renderRightContent;
|
|
3824
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(hasRightContent &&
|
|
3825
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
3826
|
-
/* @__PURE__ */ jsx("h3", { className:
|
|
3827
|
-
description && /* @__PURE__ */ jsx("p", { className:
|
|
4346
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(hasRightContent && styles54["section-heading--right-content"], className), children: [
|
|
4347
|
+
/* @__PURE__ */ jsxs("div", { className: styles54["content"], children: [
|
|
4348
|
+
/* @__PURE__ */ jsx("h3", { className: styles54["heading"], children: heading }),
|
|
4349
|
+
description && /* @__PURE__ */ jsx("p", { className: styles54["description"], children: description })
|
|
3828
4350
|
] }),
|
|
3829
4351
|
hasRightContent && renderRightContent()
|
|
3830
4352
|
] });
|
|
3831
4353
|
};
|
|
3832
|
-
var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
3833
4354
|
var SegmentedControls = ({
|
|
3834
4355
|
options,
|
|
3835
4356
|
value,
|
|
@@ -3879,9 +4400,9 @@ var SegmentedControls = ({
|
|
|
3879
4400
|
"aria-label": ariaLabel,
|
|
3880
4401
|
"aria-labelledby": ariaLabelledBy,
|
|
3881
4402
|
className: cn(
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
4403
|
+
styles55["segmented-controls"],
|
|
4404
|
+
styles55[`size--${size}`],
|
|
4405
|
+
styles55[`variant--${activeVariant}`],
|
|
3885
4406
|
className
|
|
3886
4407
|
),
|
|
3887
4408
|
children: [
|
|
@@ -3900,15 +4421,15 @@ var SegmentedControls = ({
|
|
|
3900
4421
|
"aria-label": isIconOnly ? option.label : void 0,
|
|
3901
4422
|
title: isIconOnly ? option.label : void 0,
|
|
3902
4423
|
className: cn(
|
|
3903
|
-
|
|
3904
|
-
isIconOnly &&
|
|
3905
|
-
currentlyActive ?
|
|
4424
|
+
styles55["segment"],
|
|
4425
|
+
isIconOnly && styles55["segment--icon-only"],
|
|
4426
|
+
currentlyActive ? styles55["segment--active"] : styles55["segment--inactive"]
|
|
3906
4427
|
),
|
|
3907
4428
|
onClick: () => onValueChange(option.value),
|
|
3908
4429
|
children: [
|
|
3909
|
-
showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className:
|
|
4430
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className: styles55["segment-icon"] }),
|
|
3910
4431
|
showLabel && /* @__PURE__ */ jsx("span", { children: option.label }),
|
|
3911
|
-
!isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className:
|
|
4432
|
+
!isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className: styles55["segment-suffix"], children: option.suffix })
|
|
3912
4433
|
]
|
|
3913
4434
|
},
|
|
3914
4435
|
option.value
|
|
@@ -3918,8 +4439,8 @@ var SegmentedControls = ({
|
|
|
3918
4439
|
"div",
|
|
3919
4440
|
{
|
|
3920
4441
|
className: cn(
|
|
3921
|
-
|
|
3922
|
-
animateIndicator &&
|
|
4442
|
+
styles55["active-segment-indicator"],
|
|
4443
|
+
animateIndicator && styles55["active-segment-indicator--animated"]
|
|
3923
4444
|
),
|
|
3924
4445
|
style: {
|
|
3925
4446
|
transform: `translateX(${indicator.left}px)`,
|
|
@@ -3931,15 +4452,15 @@ var SegmentedControls = ({
|
|
|
3931
4452
|
}
|
|
3932
4453
|
);
|
|
3933
4454
|
};
|
|
3934
|
-
var Separator3 =
|
|
4455
|
+
var Separator3 = React16.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3935
4456
|
SeparatorPrimitive.Root,
|
|
3936
4457
|
{
|
|
3937
4458
|
ref,
|
|
3938
4459
|
decorative,
|
|
3939
4460
|
orientation,
|
|
3940
4461
|
className: cn(
|
|
3941
|
-
|
|
3942
|
-
orientation === "horizontal" ?
|
|
4462
|
+
styles56["separator"],
|
|
4463
|
+
orientation === "horizontal" ? styles56["separator--horizontal"] : styles56["separator--vertical"],
|
|
3943
4464
|
className
|
|
3944
4465
|
),
|
|
3945
4466
|
...props
|
|
@@ -3950,61 +4471,58 @@ var Sheet = DialogPrimitive.Root;
|
|
|
3950
4471
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
3951
4472
|
var SheetClose = DialogPrimitive.Close;
|
|
3952
4473
|
var SheetPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
3953
|
-
var SheetOverlay =
|
|
4474
|
+
var SheetOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cn(styles57["sheet-overlay"], className), ...props, ref }));
|
|
3954
4475
|
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
3955
|
-
var sheetVariants = cva(
|
|
4476
|
+
var sheetVariants = cva(styles57["sheet-content"], {
|
|
3956
4477
|
variants: {
|
|
3957
4478
|
side: {
|
|
3958
|
-
top:
|
|
3959
|
-
bottom:
|
|
3960
|
-
left:
|
|
3961
|
-
right:
|
|
4479
|
+
top: styles57["sheet-content--side-top"],
|
|
4480
|
+
bottom: styles57["sheet-content--side-bottom"],
|
|
4481
|
+
left: styles57["sheet-content--side-left"],
|
|
4482
|
+
right: styles57["sheet-content--side-right"]
|
|
3962
4483
|
}
|
|
3963
4484
|
},
|
|
3964
4485
|
defaultVariants: {
|
|
3965
4486
|
side: "right"
|
|
3966
4487
|
}
|
|
3967
4488
|
});
|
|
3968
|
-
var SheetContainer =
|
|
4489
|
+
var SheetContainer = React16.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
3969
4490
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3970
4491
|
/* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children })
|
|
3971
4492
|
] }));
|
|
3972
4493
|
SheetContainer.displayName = DialogPrimitive.Content.displayName;
|
|
3973
|
-
var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4494
|
+
var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles57["sheet-header-icon"], className), ...props });
|
|
3974
4495
|
SheetHeaderIcon.displayName = "SheetHeaderIcon";
|
|
3975
4496
|
var SheetHeader = ({ className, children, ...props }) => {
|
|
3976
|
-
const childrenArray =
|
|
4497
|
+
const childrenArray = React16.Children.toArray(children);
|
|
3977
4498
|
const icon = childrenArray.find(
|
|
3978
|
-
(child) =>
|
|
4499
|
+
(child) => React16.isValidElement(child) && child.type === SheetHeaderIcon
|
|
3979
4500
|
);
|
|
3980
4501
|
const otherChildren = childrenArray.filter(
|
|
3981
|
-
(child) => !(
|
|
4502
|
+
(child) => !(React16.isValidElement(child) && child.type === SheetHeaderIcon)
|
|
3982
4503
|
);
|
|
3983
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
4504
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles57["sheet-header"], className), ...props, children: [
|
|
3984
4505
|
icon,
|
|
3985
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3986
|
-
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", className:
|
|
4506
|
+
/* @__PURE__ */ jsx("div", { className: styles57["sheet-header-text-content"], children: otherChildren }),
|
|
4507
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", className: styles57["sheet-close"] }) })
|
|
3987
4508
|
] });
|
|
3988
4509
|
};
|
|
3989
4510
|
SheetHeader.displayName = "SheetHeader";
|
|
3990
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4511
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles57["sheet-footer"], className), ...props });
|
|
3991
4512
|
SheetFooter.displayName = "SheetFooter";
|
|
3992
|
-
var SheetTitle =
|
|
4513
|
+
var SheetTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles57["sheet-title"], className), ...props }));
|
|
3993
4514
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3994
|
-
var SheetDescription =
|
|
4515
|
+
var SheetDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3995
4516
|
DialogPrimitive.Description,
|
|
3996
4517
|
{
|
|
3997
4518
|
ref,
|
|
3998
|
-
className: cn(
|
|
4519
|
+
className: cn(styles57["sheet-description"], className),
|
|
3999
4520
|
...props
|
|
4000
4521
|
}
|
|
4001
4522
|
));
|
|
4002
4523
|
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
4003
|
-
var SheetContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4524
|
+
var SheetContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles57["sheet-body"], className), ...props });
|
|
4004
4525
|
SheetContent.displayName = "SheetContent";
|
|
4005
|
-
function Skeleton({ className, ...props }) {
|
|
4006
|
-
return /* @__PURE__ */ jsx("div", { className: cn(styles52["skeleton"], className), ...props });
|
|
4007
|
-
}
|
|
4008
4526
|
var ArrowDownIcon = ArrowDown;
|
|
4009
4527
|
var ArrowUpIcon = ArrowUp;
|
|
4010
4528
|
var ArrowUpDownIcon = ArrowUpDown;
|
|
@@ -4021,10 +4539,10 @@ function SortButton({
|
|
|
4021
4539
|
const handleClick = () => {
|
|
4022
4540
|
onSort(field);
|
|
4023
4541
|
};
|
|
4024
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleClick, className:
|
|
4542
|
+
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleClick, className: styles58["sort-button"], children: [
|
|
4025
4543
|
icon,
|
|
4026
4544
|
children,
|
|
4027
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4545
|
+
/* @__PURE__ */ jsx("div", { className: styles58["arrow-container"], children: isActive ? isAscending ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : /* @__PURE__ */ jsx(ArrowDownIcon, {}) : /* @__PURE__ */ jsx(ArrowUpDownIcon, { className: styles58["arrow-up-down-icon"] }) })
|
|
4028
4546
|
] });
|
|
4029
4547
|
}
|
|
4030
4548
|
var ChevronDownIcon4 = ChevronDown;
|
|
@@ -4069,9 +4587,9 @@ function SortSelector({
|
|
|
4069
4587
|
setCurrentPage?.(1);
|
|
4070
4588
|
};
|
|
4071
4589
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
4072
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(
|
|
4590
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(styles59["sort-selector-trigger"], className), children: [
|
|
4073
4591
|
/* @__PURE__ */ jsx("span", { children: currentLabel }),
|
|
4074
|
-
/* @__PURE__ */ jsx(ChevronDownIcon4, { className:
|
|
4592
|
+
/* @__PURE__ */ jsx(ChevronDownIcon4, { className: styles59["chevron-down-icon"] })
|
|
4075
4593
|
] }) }),
|
|
4076
4594
|
/* @__PURE__ */ jsxs(
|
|
4077
4595
|
DropdownMenuContent,
|
|
@@ -4098,55 +4616,55 @@ function SortSelector({
|
|
|
4098
4616
|
)
|
|
4099
4617
|
] });
|
|
4100
4618
|
}
|
|
4101
|
-
var Switch =
|
|
4619
|
+
var Switch = React16.forwardRef(
|
|
4102
4620
|
({ className, size = "md", variant = "default", thumbIcon, ...props }, ref) => {
|
|
4103
4621
|
const iconSize = size === "sm" ? "xs" : size === "md" ? "sm" : "md";
|
|
4104
4622
|
return /* @__PURE__ */ jsx(
|
|
4105
4623
|
SwitchPrimitives.Root,
|
|
4106
4624
|
{
|
|
4107
|
-
className: cn(
|
|
4625
|
+
className: cn(styles60["switch"], styles60[size], styles60[variant], className),
|
|
4108
4626
|
...props,
|
|
4109
4627
|
ref,
|
|
4110
|
-
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn(
|
|
4628
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn(styles60["thumb"], styles60[size]), children: thumbIcon && /* @__PURE__ */ jsx(Icon, { icon: thumbIcon, className: styles60["thumb-icon"], size: iconSize }) })
|
|
4111
4629
|
}
|
|
4112
4630
|
);
|
|
4113
4631
|
}
|
|
4114
4632
|
);
|
|
4115
4633
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
4116
|
-
var tableElevationVariants = generateElevationVariants(
|
|
4117
|
-
var TableContainer =
|
|
4634
|
+
var tableElevationVariants = generateElevationVariants(styles61, "table", ELEVATION.RAISED);
|
|
4635
|
+
var TableContainer = React16.forwardRef(({ className, style, elevation = ELEVATION.RAISED, border, columns, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4118
4636
|
"div",
|
|
4119
4637
|
{
|
|
4120
4638
|
className: cn(
|
|
4121
|
-
|
|
4639
|
+
styles61["table"],
|
|
4122
4640
|
tableElevationVariants({ elevation }),
|
|
4123
|
-
border &&
|
|
4641
|
+
border && styles61["table-border"],
|
|
4124
4642
|
className
|
|
4125
4643
|
),
|
|
4126
4644
|
style: columns ? { ...style, "--table-columns": columns } : style,
|
|
4127
|
-
children: /* @__PURE__ */ jsx("table", { ref, className:
|
|
4645
|
+
children: /* @__PURE__ */ jsx("table", { ref, className: styles61["table-inner"], ...props })
|
|
4128
4646
|
}
|
|
4129
4647
|
));
|
|
4130
4648
|
TableContainer.displayName = "Table";
|
|
4131
|
-
var TableHeader =
|
|
4649
|
+
var TableHeader = React16.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4132
4650
|
"thead",
|
|
4133
4651
|
{
|
|
4134
4652
|
ref,
|
|
4135
4653
|
className: cn(
|
|
4136
|
-
|
|
4137
|
-
sticky === "container" &&
|
|
4138
|
-
sticky === "page" &&
|
|
4654
|
+
styles61["table-header"],
|
|
4655
|
+
sticky === "container" && styles61["table-header--sticky-container"],
|
|
4656
|
+
sticky === "page" && styles61["table-header--sticky-page"],
|
|
4139
4657
|
className
|
|
4140
4658
|
),
|
|
4141
4659
|
...props
|
|
4142
4660
|
}
|
|
4143
4661
|
));
|
|
4144
4662
|
TableHeader.displayName = "TableHeader";
|
|
4145
|
-
var TableBody =
|
|
4663
|
+
var TableBody = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn(styles61["table-body"], className), ...props }));
|
|
4146
4664
|
TableBody.displayName = "TableBody";
|
|
4147
|
-
var TableFooter =
|
|
4665
|
+
var TableFooter = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles61["table-footer"], className), ...props }));
|
|
4148
4666
|
TableFooter.displayName = "TableFooter";
|
|
4149
|
-
var TableRow =
|
|
4667
|
+
var TableRow = React16.forwardRef(
|
|
4150
4668
|
({ className, clickable, href, hrefLabel = "View details", children, onClick, ...props }, ref) => {
|
|
4151
4669
|
const isClickable = clickable || !!href;
|
|
4152
4670
|
const handleClick = (e) => {
|
|
@@ -4161,15 +4679,15 @@ var TableRow = React15.forwardRef(
|
|
|
4161
4679
|
{
|
|
4162
4680
|
ref,
|
|
4163
4681
|
className: cn(
|
|
4164
|
-
|
|
4165
|
-
isClickable &&
|
|
4166
|
-
href &&
|
|
4682
|
+
styles61["table-row"],
|
|
4683
|
+
isClickable && styles61["table-row--clickable"],
|
|
4684
|
+
href && styles61["table-row--linked"],
|
|
4167
4685
|
className
|
|
4168
4686
|
),
|
|
4169
4687
|
onClick: onClick ? handleClick : void 0,
|
|
4170
4688
|
...props,
|
|
4171
4689
|
children: [
|
|
4172
|
-
href && /* @__PURE__ */ jsx("a", { href, className:
|
|
4690
|
+
href && /* @__PURE__ */ jsx("a", { href, className: styles61["table-row-link"], "data-table-row-link": true, children: /* @__PURE__ */ jsx("span", { className: styles61["table-row-link-label"], children: hrefLabel }) }),
|
|
4173
4691
|
children
|
|
4174
4692
|
]
|
|
4175
4693
|
}
|
|
@@ -4177,18 +4695,18 @@ var TableRow = React15.forwardRef(
|
|
|
4177
4695
|
}
|
|
4178
4696
|
);
|
|
4179
4697
|
TableRow.displayName = "TableRow";
|
|
4180
|
-
var TableHead =
|
|
4698
|
+
var TableHead = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles61["table-head"], className), ...props }));
|
|
4181
4699
|
TableHead.displayName = "TableHead";
|
|
4182
|
-
var TableCell =
|
|
4700
|
+
var TableCell = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className: cn(styles61["table-cell"], className), ...props }));
|
|
4183
4701
|
TableCell.displayName = "TableCell";
|
|
4184
|
-
var TableCaption =
|
|
4702
|
+
var TableCaption = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn(styles61["table-caption"], className), ...props }));
|
|
4185
4703
|
TableCaption.displayName = "TableCaption";
|
|
4186
4704
|
var TabsContainer = TabsPrimitive.Root;
|
|
4187
|
-
var TabsList =
|
|
4705
|
+
var TabsList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, className: cn(styles62["tabs-list"], className), ...props }));
|
|
4188
4706
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4189
|
-
var TabsTrigger =
|
|
4707
|
+
var TabsTrigger = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ref, className: cn(styles62["tabs-trigger"], className), ...props }));
|
|
4190
4708
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4191
|
-
var TabsContent =
|
|
4709
|
+
var TabsContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles62["tabs-content"], className), ...props }));
|
|
4192
4710
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
4193
4711
|
var Tabs = ({
|
|
4194
4712
|
items,
|
|
@@ -4251,13 +4769,13 @@ var Tabs = ({
|
|
|
4251
4769
|
};
|
|
4252
4770
|
const renderIcon = (icon) => {
|
|
4253
4771
|
if (icon) {
|
|
4254
|
-
return /* @__PURE__ */ jsx(Icon, { icon, size: "sm", className:
|
|
4772
|
+
return /* @__PURE__ */ jsx(Icon, { icon, size: "sm", className: styles63["tabs-icon"] });
|
|
4255
4773
|
}
|
|
4256
4774
|
return null;
|
|
4257
4775
|
};
|
|
4258
4776
|
const indicatorClass = cn(
|
|
4259
|
-
|
|
4260
|
-
isFilled ?
|
|
4777
|
+
styles63["active-tab-indicator"],
|
|
4778
|
+
isFilled ? styles63["active-tab-indicator--filled"] : styles63["active-tab-indicator--transparent"]
|
|
4261
4779
|
);
|
|
4262
4780
|
const renderTriggerIndicator = (value2) => {
|
|
4263
4781
|
if (staticRender) {
|
|
@@ -4266,7 +4784,7 @@ var Tabs = ({
|
|
|
4266
4784
|
{
|
|
4267
4785
|
"aria-hidden": true,
|
|
4268
4786
|
"data-slot": "tabs-indicator",
|
|
4269
|
-
className: cn(indicatorClass,
|
|
4787
|
+
className: cn(indicatorClass, styles63["active-tab-indicator--static"])
|
|
4270
4788
|
}
|
|
4271
4789
|
);
|
|
4272
4790
|
}
|
|
@@ -4280,15 +4798,15 @@ var Tabs = ({
|
|
|
4280
4798
|
{
|
|
4281
4799
|
value: activeTab,
|
|
4282
4800
|
onValueChange: handleValueChange,
|
|
4283
|
-
className: cn(
|
|
4801
|
+
className: cn(styles63["tabs"], className),
|
|
4284
4802
|
children: [
|
|
4285
4803
|
/* @__PURE__ */ jsxs(
|
|
4286
4804
|
TabsList,
|
|
4287
4805
|
{
|
|
4288
4806
|
ref: listRef,
|
|
4289
4807
|
className: cn(
|
|
4290
|
-
|
|
4291
|
-
isFilled ?
|
|
4808
|
+
styles63["tabs-list"],
|
|
4809
|
+
isFilled ? styles63["tabs-list--filled"] : styles63["tabs-list--transparent"]
|
|
4292
4810
|
),
|
|
4293
4811
|
children: [
|
|
4294
4812
|
items.map(({ label, value: value2, icon, suffix, triggerProps }) => {
|
|
@@ -4302,8 +4820,8 @@ var Tabs = ({
|
|
|
4302
4820
|
},
|
|
4303
4821
|
value: value2,
|
|
4304
4822
|
className: cn(
|
|
4305
|
-
|
|
4306
|
-
isFilled ?
|
|
4823
|
+
styles63["tabs-trigger"],
|
|
4824
|
+
isFilled ? styles63["tabs-trigger--filled"] : styles63["tabs-trigger--transparent"],
|
|
4307
4825
|
triggerProps?.className
|
|
4308
4826
|
)
|
|
4309
4827
|
},
|
|
@@ -4320,8 +4838,8 @@ var Tabs = ({
|
|
|
4320
4838
|
"data-slot": "tabs-indicator",
|
|
4321
4839
|
className: cn(
|
|
4322
4840
|
indicatorClass,
|
|
4323
|
-
|
|
4324
|
-
animateIndicator &&
|
|
4841
|
+
styles63["active-tab-indicator--shared"],
|
|
4842
|
+
animateIndicator && styles63["active-tab-indicator--animated"]
|
|
4325
4843
|
),
|
|
4326
4844
|
style: {
|
|
4327
4845
|
transform: `translateX(${indicator.left}px)`,
|
|
@@ -4337,7 +4855,7 @@ var Tabs = ({
|
|
|
4337
4855
|
TabsContent,
|
|
4338
4856
|
{
|
|
4339
4857
|
value: value2,
|
|
4340
|
-
className:
|
|
4858
|
+
className: styles63["content"],
|
|
4341
4859
|
forceMount: staticRender || void 0,
|
|
4342
4860
|
children: content
|
|
4343
4861
|
},
|
|
@@ -4347,37 +4865,37 @@ var Tabs = ({
|
|
|
4347
4865
|
}
|
|
4348
4866
|
);
|
|
4349
4867
|
};
|
|
4350
|
-
var Textarea =
|
|
4868
|
+
var Textarea = React16.forwardRef(
|
|
4351
4869
|
({ className, ...props }, ref) => {
|
|
4352
|
-
return /* @__PURE__ */ jsx("textarea", { className: cn(
|
|
4870
|
+
return /* @__PURE__ */ jsx("textarea", { className: cn(styles64["textarea"], className), ref, ...props });
|
|
4353
4871
|
}
|
|
4354
4872
|
);
|
|
4355
4873
|
Textarea.displayName = "Textarea";
|
|
4356
4874
|
var XIcon2 = X;
|
|
4357
4875
|
var ToastProvider = ToastPrimitives.Provider;
|
|
4358
|
-
var ToastViewport =
|
|
4876
|
+
var ToastViewport = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4359
4877
|
ToastPrimitives.Viewport,
|
|
4360
4878
|
{
|
|
4361
4879
|
ref,
|
|
4362
|
-
className: cn(
|
|
4880
|
+
className: cn(styles65["toast-viewport"], className),
|
|
4363
4881
|
...props
|
|
4364
4882
|
}
|
|
4365
4883
|
));
|
|
4366
4884
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
4367
|
-
var toastVariants = cva(
|
|
4885
|
+
var toastVariants = cva(styles65["toast"], {
|
|
4368
4886
|
variants: {
|
|
4369
4887
|
variant: {
|
|
4370
|
-
default:
|
|
4371
|
-
danger:
|
|
4372
|
-
warning:
|
|
4373
|
-
success:
|
|
4888
|
+
default: styles65["toast--default"],
|
|
4889
|
+
danger: styles65["toast--danger"],
|
|
4890
|
+
warning: styles65["toast--warning"],
|
|
4891
|
+
success: styles65["toast--success"]
|
|
4374
4892
|
}
|
|
4375
4893
|
},
|
|
4376
4894
|
defaultVariants: {
|
|
4377
4895
|
variant: "default"
|
|
4378
4896
|
}
|
|
4379
4897
|
});
|
|
4380
|
-
var ToastContainer =
|
|
4898
|
+
var ToastContainer = React16.forwardRef(({ className, variant, style, ...props }, ref) => {
|
|
4381
4899
|
return /* @__PURE__ */ jsx(
|
|
4382
4900
|
ToastPrimitives.Root,
|
|
4383
4901
|
{
|
|
@@ -4389,37 +4907,37 @@ var ToastContainer = React15.forwardRef(({ className, variant, style, ...props }
|
|
|
4389
4907
|
);
|
|
4390
4908
|
});
|
|
4391
4909
|
ToastContainer.displayName = ToastPrimitives.Root.displayName;
|
|
4392
|
-
var ToastAction =
|
|
4910
|
+
var ToastAction = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4393
4911
|
ToastPrimitives.Action,
|
|
4394
4912
|
{
|
|
4395
4913
|
ref,
|
|
4396
4914
|
className: cn(
|
|
4397
4915
|
buttonVariants({ variant: "secondary", size: "sm" }),
|
|
4398
|
-
|
|
4916
|
+
styles65["toast-action"],
|
|
4399
4917
|
className
|
|
4400
4918
|
),
|
|
4401
4919
|
...props
|
|
4402
4920
|
}
|
|
4403
4921
|
));
|
|
4404
4922
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
4405
|
-
var ToastClose =
|
|
4923
|
+
var ToastClose = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4406
4924
|
ToastPrimitives.Close,
|
|
4407
4925
|
{
|
|
4408
4926
|
ref,
|
|
4409
4927
|
"aria-label": "Close",
|
|
4410
|
-
className: cn(
|
|
4928
|
+
className: cn(styles65["toast-close"], className),
|
|
4411
4929
|
...props,
|
|
4412
|
-
children: /* @__PURE__ */ jsx(XIcon2, { className:
|
|
4930
|
+
children: /* @__PURE__ */ jsx(XIcon2, { className: styles65["toast-close-icon"] })
|
|
4413
4931
|
}
|
|
4414
4932
|
));
|
|
4415
4933
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
4416
|
-
var ToastTitle =
|
|
4934
|
+
var ToastTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles65["toast-title"], className), ...props }));
|
|
4417
4935
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
4418
|
-
var ToastDescription =
|
|
4936
|
+
var ToastDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4419
4937
|
ToastPrimitives.Description,
|
|
4420
4938
|
{
|
|
4421
4939
|
ref,
|
|
4422
|
-
className: cn(
|
|
4940
|
+
className: cn(styles65["toast-description"], className),
|
|
4423
4941
|
...props
|
|
4424
4942
|
}
|
|
4425
4943
|
));
|
|
@@ -4554,14 +5072,14 @@ var Toast = ({ toast: toast2 }) => {
|
|
|
4554
5072
|
};
|
|
4555
5073
|
const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
|
|
4556
5074
|
return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
|
|
4557
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4558
|
-
title && /* @__PURE__ */ jsxs("div", { className:
|
|
5075
|
+
/* @__PURE__ */ jsxs("div", { className: styles66["toast-copy"], children: [
|
|
5076
|
+
title && /* @__PURE__ */ jsxs("div", { className: styles66["toast-title-container"], children: [
|
|
4559
5077
|
displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
|
|
4560
5078
|
/* @__PURE__ */ jsx(ToastTitle, { children: title })
|
|
4561
5079
|
] }),
|
|
4562
5080
|
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
4563
5081
|
] }),
|
|
4564
|
-
action && /* @__PURE__ */ jsx("div", { className:
|
|
5082
|
+
action && /* @__PURE__ */ jsx("div", { className: styles66["toast-action"], children: action }),
|
|
4565
5083
|
/* @__PURE__ */ jsx(ToastClose, {})
|
|
4566
5084
|
] });
|
|
4567
5085
|
};
|
|
@@ -4596,7 +5114,7 @@ var TruncatedDescription = ({
|
|
|
4596
5114
|
e.stopPropagation();
|
|
4597
5115
|
setExpanded(!expanded);
|
|
4598
5116
|
};
|
|
4599
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
5117
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles67["truncated-description"], className), children: [
|
|
4600
5118
|
/* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: displayDescription } }),
|
|
4601
5119
|
isLongDescription && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: handleToggle, children: expanded ? "Show less" : "Show more" })
|
|
4602
5120
|
] });
|
|
@@ -4604,20 +5122,20 @@ var TruncatedDescription = ({
|
|
|
4604
5122
|
var removeHtmlTags = (html) => {
|
|
4605
5123
|
return html.replace(/<[^>]*>/g, "");
|
|
4606
5124
|
};
|
|
4607
|
-
var Portal8 =
|
|
5125
|
+
var Portal8 = React16.forwardRef((_props, ref) => {
|
|
4608
5126
|
return /* @__PURE__ */ jsx("div", { id: PORTAL_ROOT_ID, ref });
|
|
4609
5127
|
});
|
|
4610
5128
|
Portal8.displayName = "Portal";
|
|
4611
5129
|
var PortalContainerProvider = ({ container, children }) => /* @__PURE__ */ jsx(PortalContainerContext.Provider, { value: container, children });
|
|
4612
5130
|
var ThemeProvider = ({ customVars, portalContainer, children }) => {
|
|
4613
|
-
const [ownPortalContainer, setOwnPortalContainer] =
|
|
5131
|
+
const [ownPortalContainer, setOwnPortalContainer] = React16.useState(null);
|
|
4614
5132
|
const usesOwnPortal = portalContainer === void 0;
|
|
4615
5133
|
return /* @__PURE__ */ jsx(PortalContainerProvider, { container: usesOwnPortal ? ownPortalContainer : portalContainer, children: /* @__PURE__ */ jsxs(
|
|
4616
5134
|
"div",
|
|
4617
5135
|
{
|
|
4618
5136
|
id: "equality-theme-provider-root",
|
|
4619
5137
|
"data-equality-root": true,
|
|
4620
|
-
className:
|
|
5138
|
+
className: styles68.root,
|
|
4621
5139
|
style: customVars,
|
|
4622
5140
|
children: [
|
|
4623
5141
|
children,
|
|
@@ -4743,6 +5261,6 @@ var useTheme = () => {
|
|
|
4743
5261
|
return [theme, setTheme];
|
|
4744
5262
|
};
|
|
4745
5263
|
|
|
4746
|
-
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, SegmentedControls, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
|
|
5264
|
+
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, CODE_BLOCK_ATTRIBUTE, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NavDrill, NavDrillLevel, NavList, NavListGroup, NavListItem, NavListSeparator, NavPanel, NavRail, NavRailItem, NavSwitcher, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, SegmentedControls, Select, SelectContent, SelectEmpty, SelectGroup, SelectItem, SelectLabel, SelectSearch, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, blockClosedTypeahead, buttonVariants, reducer, scheduleHighlight, toast, useDropdownMenuSearchQuery, useFormField, usePortalContainer, useSelectSearchQuery, useTheme, useToast };
|
|
4747
5265
|
//# sourceMappingURL=index.js.map
|
|
4748
5266
|
//# sourceMappingURL=index.js.map
|