@eqtylab/equality 5.0.2 → 5.1.1
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 +23 -0
- package/dist/alert.module.module.css.module.css +26 -0
- package/dist/banner.module.module.css.module.css +137 -0
- package/dist/index.cjs +795 -742
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -10
- package/dist/index.d.ts +44 -10
- package/dist/index.js +731 -680
- package/dist/index.js.map +1 -1
- package/dist/theme.module.module.css.module.css +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { forwardRef,
|
|
1
|
+
import * as React16 from 'react';
|
|
2
|
+
import { forwardRef, useState, useRef, useEffect, useLayoutEffect, 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
5
|
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
@@ -17,86 +17,87 @@ import styles5 from './avatar.module.module.css.module.css';
|
|
|
17
17
|
import styles7 from './badge.module.module.css.module.css';
|
|
18
18
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
19
19
|
import styles6 from './tooltip.module.module.css.module.css';
|
|
20
|
-
import styles8 from './
|
|
21
|
-
import styles9 from './
|
|
22
|
-
import styles10 from './
|
|
23
|
-
import styles11 from './card.module.module.css.module.css';
|
|
20
|
+
import styles8 from './banner.module.module.css.module.css';
|
|
21
|
+
import styles9 from './bar-graph.module.module.css.module.css';
|
|
22
|
+
import styles10 from './bg-gradient.module.module.css.module.css';
|
|
23
|
+
import styles11 from './card-content-header.module.module.css.module.css';
|
|
24
|
+
import styles12 from './card.module.module.css.module.css';
|
|
24
25
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
26
|
+
import styles13 from './checkbox.module.module.css.module.css';
|
|
27
|
+
import styles15 from './code-block.module.module.css.module.css';
|
|
28
|
+
import styles14 from './icon-button.module.module.css.module.css';
|
|
28
29
|
import { highlightAll } from 'microlighter';
|
|
29
30
|
import { Command as Command$1 } from 'cmdk';
|
|
30
|
-
import
|
|
31
|
+
import styles17 from './command.module.module.css.module.css';
|
|
31
32
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
33
|
+
import styles16 from './dialog.module.module.css.module.css';
|
|
34
|
+
import styles18 from './control-status-badge.module.module.css.module.css';
|
|
35
|
+
import styles20 from './date-range-picker.module.module.css.module.css';
|
|
35
36
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
36
|
-
import
|
|
37
|
+
import styles19 from './popover.module.module.css.module.css';
|
|
37
38
|
import Truncate from 'react-truncate-inside';
|
|
38
|
-
import
|
|
39
|
+
import styles21 from './display-field.module.module.css.module.css';
|
|
39
40
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
41
|
+
import styles22 from './dropdown-menu.module.module.css.module.css';
|
|
42
|
+
import styles23 from './empty-table-state.module.module.css.module.css';
|
|
43
|
+
import styles24 from './filter-dropdown.module.module.css.module.css';
|
|
43
44
|
import { useFormContext, FormProvider, Controller } from 'react-hook-form';
|
|
44
|
-
import
|
|
45
|
+
import styles26 from './form.module.module.css.module.css';
|
|
45
46
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
47
|
+
import styles25 from './label.module.module.css.module.css';
|
|
48
|
+
import styles27 from './format-date.module.module.css.module.css';
|
|
49
|
+
import styles28 from './heading.module.module.css.module.css';
|
|
50
|
+
import styles29 from './info-card.module.module.css.module.css';
|
|
51
|
+
import styles31 from './input.module.module.css.module.css';
|
|
51
52
|
import { AnimatePresence, motion } from 'motion/react';
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
53
|
+
import styles30 from './motion-collapsible.module.module.css.module.css';
|
|
54
|
+
import styles33 from './loading-overlay.module.module.css.module.css';
|
|
55
|
+
import styles32 from './spinner.module.module.css.module.css';
|
|
56
|
+
import styles34 from './metric-card.module.module.css.module.css';
|
|
57
|
+
import styles36 from './nav-list.module.module.css.module.css';
|
|
58
|
+
import styles41 from './nav.module.module.css.module.css';
|
|
58
59
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
60
|
+
import styles39 from './select.module.module.css.module.css';
|
|
61
|
+
import styles40 from './skeleton.module.module.css.module.css';
|
|
62
|
+
import styles42 from './page-not-found.module.module.css.module.css';
|
|
63
|
+
import styles43 from './pagination.module.module.css.module.css';
|
|
64
|
+
import styles44 from './panel-label.module.module.css.module.css';
|
|
65
|
+
import styles46 from './progress-indicator.module.module.css.module.css';
|
|
65
66
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
67
|
+
import styles45 from './progress.module.module.css.module.css';
|
|
68
|
+
import styles47 from './radial-graph.module.module.css.module.css';
|
|
69
|
+
import styles48 from './radio-dropdown.module.module.css.module.css';
|
|
69
70
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
71
|
+
import styles49 from './radio-group.module.module.css.module.css';
|
|
72
|
+
import styles50 from './resource-badge.module.module.css.module.css';
|
|
73
|
+
import styles51 from './search-bar.module.module.css.module.css';
|
|
74
|
+
import styles52 from './section-heading.module.module.css.module.css';
|
|
75
|
+
import styles53 from './segmented-controls.module.module.css.module.css';
|
|
75
76
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
77
|
+
import styles54 from './separator.module.module.css.module.css';
|
|
78
|
+
import styles55 from './sheet.module.module.css.module.css';
|
|
79
|
+
import styles56 from './sort-button.module.module.css.module.css';
|
|
80
|
+
import styles57 from './sort-selector.module.module.css.module.css';
|
|
80
81
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
81
|
-
import
|
|
82
|
-
import
|
|
82
|
+
import styles58 from './switch.module.module.css.module.css';
|
|
83
|
+
import styles59 from './table-components.module.module.css.module.css';
|
|
83
84
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
85
|
+
import styles60 from './tabs-components.module.module.css.module.css';
|
|
86
|
+
import styles61 from './tabs.module.module.css.module.css';
|
|
87
|
+
import styles62 from './textarea.module.module.css.module.css';
|
|
87
88
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
89
|
+
import styles63 from './toast-components.module.module.css.module.css';
|
|
90
|
+
import styles64 from './toast.module.module.css.module.css';
|
|
91
|
+
import styles65 from './truncated-description.module.module.css.module.css';
|
|
92
|
+
import styles66 from './theme.module.module.css.module.css';
|
|
92
93
|
|
|
93
94
|
// src/components/alert-dialog/alert-dialog.tsx
|
|
94
95
|
var PORTAL_ROOT_ID = "equality-theme-provider-root-portal";
|
|
95
|
-
var PortalContainerContext =
|
|
96
|
+
var PortalContainerContext = React16.createContext(
|
|
96
97
|
void 0
|
|
97
98
|
);
|
|
98
99
|
function usePortalContainer() {
|
|
99
|
-
const container =
|
|
100
|
+
const container = React16.useContext(PortalContainerContext);
|
|
100
101
|
if (container !== void 0) return container;
|
|
101
102
|
return typeof document === "undefined" ? null : document.getElementById(PORTAL_ROOT_ID);
|
|
102
103
|
}
|
|
@@ -127,7 +128,7 @@ var buttonVariants = cva(styles["button"], {
|
|
|
127
128
|
size: "md"
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
|
-
var Button =
|
|
131
|
+
var Button = React16.forwardRef(
|
|
131
132
|
({ className, variant, size, asChild = false, prefix, suffix, children, ...props }, ref) => {
|
|
132
133
|
const isLink = "href" in props && props.href;
|
|
133
134
|
if (isLink) {
|
|
@@ -170,7 +171,7 @@ Button.displayName = "Button";
|
|
|
170
171
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
171
172
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
172
173
|
var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
173
|
-
var AlertDialogOverlay =
|
|
174
|
+
var AlertDialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
174
175
|
AlertDialogPrimitive.Overlay,
|
|
175
176
|
{
|
|
176
177
|
className: cn(styles2["alert-dialog-overlay"], className),
|
|
@@ -179,7 +180,7 @@ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
179
180
|
}
|
|
180
181
|
));
|
|
181
182
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
182
|
-
var AlertDialogContent =
|
|
183
|
+
var AlertDialogContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
183
184
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
184
185
|
/* @__PURE__ */ jsx(
|
|
185
186
|
AlertDialogPrimitive.Content,
|
|
@@ -195,7 +196,7 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
|
|
|
195
196
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
196
197
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles2["alert-dialog-footer"], className), ...props });
|
|
197
198
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
198
|
-
var AlertDialogTitle =
|
|
199
|
+
var AlertDialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
199
200
|
AlertDialogPrimitive.Title,
|
|
200
201
|
{
|
|
201
202
|
ref,
|
|
@@ -204,7 +205,7 @@ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
204
205
|
}
|
|
205
206
|
));
|
|
206
207
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
207
|
-
var AlertDialogDescription =
|
|
208
|
+
var AlertDialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
208
209
|
AlertDialogPrimitive.Description,
|
|
209
210
|
{
|
|
210
211
|
ref,
|
|
@@ -213,7 +214,7 @@ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) =
|
|
|
213
214
|
}
|
|
214
215
|
));
|
|
215
216
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
216
|
-
var AlertDialogAction =
|
|
217
|
+
var AlertDialogAction = React16.forwardRef(({ className, variant = "primary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
217
218
|
AlertDialogPrimitive.Action,
|
|
218
219
|
{
|
|
219
220
|
ref,
|
|
@@ -227,7 +228,7 @@ var AlertDialogAction = React15.forwardRef(({ className, variant = "primary", si
|
|
|
227
228
|
}
|
|
228
229
|
));
|
|
229
230
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
230
|
-
var AlertDialogCancel =
|
|
231
|
+
var AlertDialogCancel = React16.forwardRef(({ className, variant = "tertiary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
231
232
|
AlertDialogPrimitive.Cancel,
|
|
232
233
|
{
|
|
233
234
|
ref,
|
|
@@ -247,12 +248,12 @@ var ELEVATION = {
|
|
|
247
248
|
RAISED: "raised",
|
|
248
249
|
OVERLAY: "overlay"
|
|
249
250
|
};
|
|
250
|
-
var generateElevationVariants = (
|
|
251
|
+
var generateElevationVariants = (styles67, baseClassName, defaultElevation) => {
|
|
251
252
|
const classNames = {};
|
|
252
253
|
Object.values(ELEVATION).forEach((elevation) => {
|
|
253
|
-
classNames[elevation] =
|
|
254
|
+
classNames[elevation] = styles67[`${baseClassName}--${elevation}`];
|
|
254
255
|
});
|
|
255
|
-
const variants = cva(
|
|
256
|
+
const variants = cva(styles67[baseClassName], {
|
|
256
257
|
variants: {
|
|
257
258
|
elevation: classNames
|
|
258
259
|
},
|
|
@@ -300,9 +301,9 @@ var Icon = forwardRef(
|
|
|
300
301
|
throw new Error(`Icon "${icon}" not found in lucide-react`);
|
|
301
302
|
}
|
|
302
303
|
renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles3["icon"]) });
|
|
303
|
-
} else if (
|
|
304
|
+
} else if (React16.isValidElement(icon)) {
|
|
304
305
|
const existingProps = icon.props;
|
|
305
|
-
renderedIcon =
|
|
306
|
+
renderedIcon = React16.cloneElement(
|
|
306
307
|
icon,
|
|
307
308
|
{
|
|
308
309
|
...existingProps,
|
|
@@ -347,8 +348,18 @@ var defaultVariantIcons = {
|
|
|
347
348
|
warning: "OctagonAlert",
|
|
348
349
|
danger: "TriangleAlert"
|
|
349
350
|
};
|
|
350
|
-
var Alert =
|
|
351
|
-
({
|
|
351
|
+
var Alert = React16.forwardRef(
|
|
352
|
+
({
|
|
353
|
+
className,
|
|
354
|
+
variant,
|
|
355
|
+
title,
|
|
356
|
+
description,
|
|
357
|
+
icon,
|
|
358
|
+
children,
|
|
359
|
+
action,
|
|
360
|
+
as: Component = "div",
|
|
361
|
+
...props
|
|
362
|
+
}, ref) => {
|
|
352
363
|
const effectiveIcon = icon === void 0 ? variant ? defaultVariantIcons[variant] : void 0 : icon;
|
|
353
364
|
const role = Component === "div" ? "alert" : void 0;
|
|
354
365
|
return /* @__PURE__ */ jsxs(
|
|
@@ -359,6 +370,7 @@ var Alert = React15.forwardRef(
|
|
|
359
370
|
className: cn(
|
|
360
371
|
alertVariants({ variant }),
|
|
361
372
|
effectiveIcon ? styles4["alert--with-icon"] : "",
|
|
373
|
+
action ? styles4["alert--with-action"] : "",
|
|
362
374
|
className
|
|
363
375
|
),
|
|
364
376
|
...props,
|
|
@@ -374,14 +386,15 @@ var Alert = React15.forwardRef(
|
|
|
374
386
|
) : null,
|
|
375
387
|
/* @__PURE__ */ jsx("h4", { className: styles4["alert-title"], children: title }),
|
|
376
388
|
description ? /* @__PURE__ */ jsx("p", { className: styles4["alert-description"], children: description }) : null,
|
|
377
|
-
children ? /* @__PURE__ */ jsx("div", { className: styles4["alert-body"], children }) : null
|
|
389
|
+
children ? /* @__PURE__ */ jsx("div", { className: styles4["alert-body"], children }) : null,
|
|
390
|
+
action ? /* @__PURE__ */ jsx("div", { className: styles4["alert-action"], children: action }) : null
|
|
378
391
|
]
|
|
379
392
|
}
|
|
380
393
|
);
|
|
381
394
|
}
|
|
382
395
|
);
|
|
383
396
|
Alert.displayName = "Alert";
|
|
384
|
-
var Avatar =
|
|
397
|
+
var Avatar = React16.forwardRef(
|
|
385
398
|
({ className, size = "md", shape = "circle", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
386
399
|
AvatarPrimitive.Root,
|
|
387
400
|
{
|
|
@@ -392,9 +405,9 @@ var Avatar = React15.forwardRef(
|
|
|
392
405
|
)
|
|
393
406
|
);
|
|
394
407
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
395
|
-
var AvatarImage =
|
|
408
|
+
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(styles5["avatar-image"], className), ...props }));
|
|
396
409
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
397
|
-
var AvatarFallback =
|
|
410
|
+
var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
398
411
|
AvatarPrimitive.Fallback,
|
|
399
412
|
{
|
|
400
413
|
ref,
|
|
@@ -407,7 +420,7 @@ var TooltipProvider = TooltipPrimitive.Provider;
|
|
|
407
420
|
var Tooltip = TooltipPrimitive.Root;
|
|
408
421
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
409
422
|
var TooltipPortal = ({ children }) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: usePortalContainer(), children });
|
|
410
|
-
var TooltipContent =
|
|
423
|
+
var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(
|
|
411
424
|
TooltipPrimitive.Content,
|
|
412
425
|
{
|
|
413
426
|
ref,
|
|
@@ -525,10 +538,49 @@ function Badge({
|
|
|
525
538
|
}
|
|
526
539
|
);
|
|
527
540
|
}
|
|
528
|
-
var
|
|
541
|
+
var bannerVariants = cva(styles8["banner"], {
|
|
542
|
+
variants: {
|
|
543
|
+
/** The status the strip's colour reports */
|
|
544
|
+
variant: {
|
|
545
|
+
primary: styles8["banner--primary"],
|
|
546
|
+
neutral: styles8["banner--neutral"],
|
|
547
|
+
success: styles8["banner--success"],
|
|
548
|
+
warning: styles8["banner--warning"],
|
|
549
|
+
danger: styles8["banner--danger"]
|
|
550
|
+
},
|
|
551
|
+
/** The edge that draws the rule. `top` for a banner at the foot of a page header */
|
|
552
|
+
border: {
|
|
553
|
+
bottom: styles8["banner--border-bottom"],
|
|
554
|
+
top: styles8["banner--border-top"]
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
defaultVariants: {
|
|
558
|
+
variant: "neutral",
|
|
559
|
+
border: "bottom"
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
var Banner = React16.forwardRef(
|
|
563
|
+
({ className, variant, border, icon, action, as: Component = "div", children, ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, className: cn(bannerVariants({ variant, border }), className), ...props, children: /* @__PURE__ */ jsxs("div", { className: styles8["banner-content"], children: [
|
|
564
|
+
/* @__PURE__ */ jsxs("div", { className: styles8["banner-lead"], children: [
|
|
565
|
+
/* @__PURE__ */ jsx("div", { className: styles8["banner-icon"], children: /* @__PURE__ */ jsx(
|
|
566
|
+
Icon,
|
|
567
|
+
{
|
|
568
|
+
icon,
|
|
569
|
+
size: "sm",
|
|
570
|
+
background: "transparent",
|
|
571
|
+
className: styles8["banner-glyph"]
|
|
572
|
+
}
|
|
573
|
+
) }),
|
|
574
|
+
/* @__PURE__ */ jsx("p", { className: styles8["banner-message"], children })
|
|
575
|
+
] }),
|
|
576
|
+
action ? /* @__PURE__ */ jsx("div", { className: styles8["banner-action"], children: action }) : null
|
|
577
|
+
] }) })
|
|
578
|
+
);
|
|
579
|
+
Banner.displayName = "Banner";
|
|
580
|
+
var BarGraphSegment = React16.forwardRef(
|
|
529
581
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
530
582
|
({ value, color, label, tooltip, className, style, ...props }, ref) => {
|
|
531
|
-
const tooltipId =
|
|
583
|
+
const tooltipId = React16.useId();
|
|
532
584
|
return (
|
|
533
585
|
// Widths are proportional (`value / sum`): each segment grows by its `value`
|
|
534
586
|
// within the flex row, so the parent never needs to know the total.
|
|
@@ -549,7 +601,7 @@ var BarGraphSegment = React15.forwardRef(
|
|
|
549
601
|
tabIndex: 0,
|
|
550
602
|
"aria-labelledby": tooltipId,
|
|
551
603
|
"aria-describedby": void 0,
|
|
552
|
-
className: cn(
|
|
604
|
+
className: cn(styles9["segment"], className),
|
|
553
605
|
style: {
|
|
554
606
|
flexGrow: value,
|
|
555
607
|
// Floor every segment at 2px so small (and zero) values stay visible.
|
|
@@ -558,7 +610,7 @@ var BarGraphSegment = React15.forwardRef(
|
|
|
558
610
|
...style
|
|
559
611
|
},
|
|
560
612
|
...props,
|
|
561
|
-
children: /* @__PURE__ */ jsx("div", { id: tooltipId, className:
|
|
613
|
+
children: /* @__PURE__ */ jsx("div", { id: tooltipId, className: styles9["visually-hidden"], "aria-hidden": "true", children: tooltip })
|
|
562
614
|
}
|
|
563
615
|
) }),
|
|
564
616
|
/* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("span", { children: tooltip }) })
|
|
@@ -567,35 +619,35 @@ var BarGraphSegment = React15.forwardRef(
|
|
|
567
619
|
}
|
|
568
620
|
);
|
|
569
621
|
BarGraphSegment.displayName = "BarGraphSegment";
|
|
570
|
-
var barVariants = cva(
|
|
622
|
+
var barVariants = cva(styles9["bar"], {
|
|
571
623
|
variants: {
|
|
572
624
|
size: {
|
|
573
|
-
sm:
|
|
574
|
-
md:
|
|
575
|
-
lg:
|
|
625
|
+
sm: styles9["size--sm"],
|
|
626
|
+
md: styles9["size--md"],
|
|
627
|
+
lg: styles9["size--lg"]
|
|
576
628
|
}
|
|
577
629
|
},
|
|
578
630
|
defaultVariants: {
|
|
579
631
|
size: "md"
|
|
580
632
|
}
|
|
581
633
|
});
|
|
582
|
-
var BarGraph =
|
|
634
|
+
var BarGraph = React16.forwardRef(
|
|
583
635
|
({ className, children, showLabels = false, size, ...props }, ref) => {
|
|
584
|
-
const validChildren =
|
|
636
|
+
const validChildren = React16.Children.toArray(children).filter(React16.isValidElement);
|
|
585
637
|
const segments = validChildren.filter(
|
|
586
638
|
(child) => child.type === BarGraphSegment
|
|
587
639
|
);
|
|
588
|
-
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("div", { ref, className: cn(
|
|
640
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs("div", { ref, className: cn(styles9["bar-graph"], className), ...props, children: [
|
|
589
641
|
/* @__PURE__ */ jsx("div", { className: barVariants({ size }), children: segments }),
|
|
590
|
-
showLabels && /* @__PURE__ */ jsx("ul", { className:
|
|
642
|
+
showLabels && /* @__PURE__ */ jsx("ul", { className: styles9["legend"], "aria-hidden": "true", children: segments.map((child, index) => /* @__PURE__ */ jsxs("li", { className: styles9["legend-item"], children: [
|
|
591
643
|
/* @__PURE__ */ jsx(
|
|
592
644
|
"span",
|
|
593
645
|
{
|
|
594
|
-
className:
|
|
646
|
+
className: styles9["legend-swatch"],
|
|
595
647
|
style: { backgroundColor: child.props.color }
|
|
596
648
|
}
|
|
597
649
|
),
|
|
598
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
650
|
+
/* @__PURE__ */ jsx("span", { className: styles9["legend-label"], children: child.props.label })
|
|
599
651
|
] }, index)) })
|
|
600
652
|
] }) });
|
|
601
653
|
}
|
|
@@ -758,7 +810,7 @@ var BgGradient = ({
|
|
|
758
810
|
cancelAnimationFrame(animationFrame);
|
|
759
811
|
};
|
|
760
812
|
}, [theme, placement, brandColors]);
|
|
761
|
-
return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className:
|
|
813
|
+
return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className: styles10["bg-gradient"] });
|
|
762
814
|
};
|
|
763
815
|
var CardContentHeader = forwardRef(
|
|
764
816
|
({ className, icon, heading, onButtonClick, ...props }, ref) => {
|
|
@@ -772,86 +824,86 @@ var CardContentHeader = forwardRef(
|
|
|
772
824
|
{
|
|
773
825
|
ref,
|
|
774
826
|
className: cn(
|
|
775
|
-
|
|
776
|
-
shouldWrap &&
|
|
827
|
+
styles11["card-content-header"],
|
|
828
|
+
shouldWrap && styles11["card-content-header--wrap"],
|
|
777
829
|
className
|
|
778
830
|
),
|
|
779
831
|
...props,
|
|
780
832
|
children: [
|
|
781
833
|
/* @__PURE__ */ jsx(Icon, { icon, background: "circle", elevation: "overlay" }),
|
|
782
|
-
onButtonClick && /* @__PURE__ */ jsx(Button, { className:
|
|
783
|
-
heading && /* @__PURE__ */ jsx("h3", { className: cn(
|
|
834
|
+
onButtonClick && /* @__PURE__ */ jsx(Button, { className: styles11.button, variant: "tertiary", size: "sm", onClick: onButtonClick, children: "See All" }),
|
|
835
|
+
heading && /* @__PURE__ */ jsx("h3", { className: cn(styles11.title, onButtonClick && styles11["title--button-click"]), children: heading })
|
|
784
836
|
]
|
|
785
837
|
}
|
|
786
838
|
);
|
|
787
839
|
}
|
|
788
840
|
);
|
|
789
841
|
CardContentHeader.displayName = "CardContentHeader";
|
|
790
|
-
var cardElevationVariants = generateElevationVariants(
|
|
791
|
-
var Card =
|
|
842
|
+
var cardElevationVariants = generateElevationVariants(styles12, "card", ELEVATION.RAISED);
|
|
843
|
+
var Card = React16.forwardRef(({ className, hoverGradientClassName, elevation = ELEVATION.RAISED, ...props }, ref) => {
|
|
792
844
|
const shouldHaveHoverStyle = props.onClick !== void 0;
|
|
793
845
|
return /* @__PURE__ */ jsxs(
|
|
794
846
|
"div",
|
|
795
847
|
{
|
|
796
848
|
ref,
|
|
797
849
|
className: cn(
|
|
798
|
-
|
|
799
|
-
shouldHaveHoverStyle &&
|
|
850
|
+
styles12.card,
|
|
851
|
+
shouldHaveHoverStyle && styles12["card--hover"],
|
|
800
852
|
cardElevationVariants({ elevation }),
|
|
801
853
|
className
|
|
802
854
|
),
|
|
803
855
|
...props,
|
|
804
856
|
children: [
|
|
805
|
-
shouldHaveHoverStyle && /* @__PURE__ */ jsx("div", { className: cn(
|
|
857
|
+
shouldHaveHoverStyle && /* @__PURE__ */ jsx("div", { className: cn(styles12["card-hover-gradient"], hoverGradientClassName) }),
|
|
806
858
|
props.children
|
|
807
859
|
]
|
|
808
860
|
}
|
|
809
861
|
);
|
|
810
862
|
});
|
|
811
863
|
Card.displayName = "Card";
|
|
812
|
-
var CardHeader =
|
|
813
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
864
|
+
var CardHeader = React16.forwardRef(
|
|
865
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-header"], className), ...props })
|
|
814
866
|
);
|
|
815
867
|
CardHeader.displayName = "CardHeader";
|
|
816
|
-
var CardTitle =
|
|
817
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
868
|
+
var CardTitle = React16.forwardRef(
|
|
869
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-title"], className), ...props })
|
|
818
870
|
);
|
|
819
871
|
CardTitle.displayName = "CardTitle";
|
|
820
|
-
var CardDescription =
|
|
821
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
872
|
+
var CardDescription = React16.forwardRef(
|
|
873
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-description"], className), ...props })
|
|
822
874
|
);
|
|
823
875
|
CardDescription.displayName = "CardDescription";
|
|
824
|
-
var CardContent =
|
|
825
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
876
|
+
var CardContent = React16.forwardRef(
|
|
877
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-content"], className), ...props })
|
|
826
878
|
);
|
|
827
879
|
CardContent.displayName = "CardContent";
|
|
828
|
-
var CardFooter =
|
|
829
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
880
|
+
var CardFooter = React16.forwardRef(
|
|
881
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-footer"], className), ...props })
|
|
830
882
|
);
|
|
831
883
|
CardFooter.displayName = "CardFooter";
|
|
832
884
|
var CheckIcon = Check;
|
|
833
|
-
var Checkbox =
|
|
885
|
+
var Checkbox = React16.forwardRef(
|
|
834
886
|
({ className, icon: Icon3, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
835
887
|
CheckboxPrimitive.Root,
|
|
836
888
|
{
|
|
837
889
|
ref,
|
|
838
|
-
className: cn(
|
|
890
|
+
className: cn(styles13.checkbox, styles13[size], className),
|
|
839
891
|
...props,
|
|
840
|
-
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className:
|
|
892
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: styles13.indicator, children: Icon3 ? /* @__PURE__ */ jsx(Icon3, { className: styles13.check }) : /* @__PURE__ */ jsx(CheckIcon, { className: styles13.check }) })
|
|
841
893
|
}
|
|
842
894
|
)
|
|
843
895
|
);
|
|
844
896
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
845
|
-
var iconButtonVariants = cva(
|
|
897
|
+
var iconButtonVariants = cva(styles14["icon-btn"], {
|
|
846
898
|
variants: {
|
|
847
899
|
size: {
|
|
848
|
-
sm:
|
|
849
|
-
md:
|
|
850
|
-
lg:
|
|
900
|
+
sm: styles14["size--sm"],
|
|
901
|
+
md: styles14["size--md"],
|
|
902
|
+
lg: styles14["size--lg"]
|
|
851
903
|
},
|
|
852
904
|
variant: {
|
|
853
|
-
primary:
|
|
854
|
-
danger:
|
|
905
|
+
primary: styles14["icon-btn--primary"],
|
|
906
|
+
danger: styles14["icon-btn--danger"]
|
|
855
907
|
}
|
|
856
908
|
},
|
|
857
909
|
defaultVariants: {
|
|
@@ -864,7 +916,7 @@ var iconSizeMap = {
|
|
|
864
916
|
md: 22,
|
|
865
917
|
lg: 26
|
|
866
918
|
};
|
|
867
|
-
var IconButton =
|
|
919
|
+
var IconButton = React16.forwardRef(
|
|
868
920
|
function IconButton2({
|
|
869
921
|
className,
|
|
870
922
|
size = "sm",
|
|
@@ -922,7 +974,7 @@ function CopyButton({
|
|
|
922
974
|
className,
|
|
923
975
|
onClick
|
|
924
976
|
}) {
|
|
925
|
-
const [copied, setCopied] =
|
|
977
|
+
const [copied, setCopied] = React16.useState(false);
|
|
926
978
|
const handleCopy = async () => {
|
|
927
979
|
try {
|
|
928
980
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
@@ -1012,56 +1064,56 @@ var CodeBlock = ({
|
|
|
1012
1064
|
const lines = code.replace(/\n$/, "").split("\n").length;
|
|
1013
1065
|
return Array.from({ length: lines }, (_, index) => index + 1).join("\n");
|
|
1014
1066
|
}, [code, lineNumbers]);
|
|
1015
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1016
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1017
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1018
|
-
title && /* @__PURE__ */ jsx("span", { className:
|
|
1019
|
-
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className:
|
|
1067
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles15["code-block"], styles15[variant], className), children: [
|
|
1068
|
+
/* @__PURE__ */ jsxs("div", { className: styles15.header, children: [
|
|
1069
|
+
/* @__PURE__ */ jsxs("div", { className: styles15["header-left"], children: [
|
|
1070
|
+
title && /* @__PURE__ */ jsx("span", { className: styles15.title, children: title }),
|
|
1071
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: styles15.badge, children: language })
|
|
1020
1072
|
] }),
|
|
1021
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1073
|
+
/* @__PURE__ */ jsx("div", { className: styles15["header-right"], children: /* @__PURE__ */ jsx(CopyButton, { value: copy || code, size: "sm" }) })
|
|
1022
1074
|
] }),
|
|
1023
1075
|
/* @__PURE__ */ jsx(
|
|
1024
1076
|
"div",
|
|
1025
1077
|
{
|
|
1026
|
-
className:
|
|
1078
|
+
className: styles15.content,
|
|
1027
1079
|
tabIndex: 0,
|
|
1028
1080
|
role: "group",
|
|
1029
1081
|
"aria-label": title ? `${title}, code block` : "Code block",
|
|
1030
|
-
children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1031
|
-
gutter && /* @__PURE__ */ jsx("pre", { "aria-hidden": "true", className:
|
|
1032
|
-
/* @__PURE__ */ jsx("pre", { ref: preRef, className:
|
|
1082
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn(styles15.body, { [styles15.numbered]: lineNumbers }), children: [
|
|
1083
|
+
gutter && /* @__PURE__ */ jsx("pre", { "aria-hidden": "true", className: styles15.gutter, children: gutter }),
|
|
1084
|
+
/* @__PURE__ */ jsx("pre", { ref: preRef, className: styles15.pre, ...{ [CODE_BLOCK_ATTRIBUTE]: "" }, children: /* @__PURE__ */ jsx(
|
|
1033
1085
|
"code",
|
|
1034
1086
|
{
|
|
1035
|
-
className: cn(
|
|
1087
|
+
className: cn(styles15.code, `language-${language}`, { [styles15.wrap]: !lineNumbers }),
|
|
1036
1088
|
children: code
|
|
1037
1089
|
}
|
|
1038
1090
|
) })
|
|
1039
1091
|
] })
|
|
1040
1092
|
}
|
|
1041
1093
|
),
|
|
1042
|
-
codeLabel && /* @__PURE__ */ jsx("div", { className:
|
|
1094
|
+
codeLabel && /* @__PURE__ */ jsx("div", { className: styles15["code-label"], children: /* @__PURE__ */ jsx("p", { className: styles15["code-label-text"], children: codeLabel }) })
|
|
1043
1095
|
] });
|
|
1044
1096
|
};
|
|
1045
1097
|
var Dialog = DialogPrimitive.Root;
|
|
1046
1098
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1047
1099
|
var DialogPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1048
1100
|
var DialogClose = DialogPrimitive.Close;
|
|
1049
|
-
var DialogOverlay =
|
|
1101
|
+
var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1050
1102
|
DialogPrimitive.Overlay,
|
|
1051
1103
|
{
|
|
1052
1104
|
ref,
|
|
1053
|
-
className: cn(
|
|
1105
|
+
className: cn(styles16["dialog-overlay"], className),
|
|
1054
1106
|
...props
|
|
1055
1107
|
}
|
|
1056
1108
|
));
|
|
1057
1109
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1058
|
-
var DialogContainer =
|
|
1110
|
+
var DialogContainer = React16.forwardRef(({ className, children, size = "md", ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1059
1111
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1060
1112
|
/* @__PURE__ */ jsx(
|
|
1061
1113
|
DialogPrimitive.Content,
|
|
1062
1114
|
{
|
|
1063
1115
|
ref,
|
|
1064
|
-
className: cn(
|
|
1116
|
+
className: cn(styles16["dialog-content"], styles16[`dialog-content--size-${size}`], className),
|
|
1065
1117
|
onCloseAutoFocus: (event) => {
|
|
1066
1118
|
event.preventDefault();
|
|
1067
1119
|
document.body.style.pointerEvents = "";
|
|
@@ -1072,40 +1124,40 @@ var DialogContainer = React15.forwardRef(({ className, children, size = "md", ..
|
|
|
1072
1124
|
)
|
|
1073
1125
|
] }));
|
|
1074
1126
|
DialogContainer.displayName = DialogPrimitive.Content.displayName;
|
|
1075
|
-
var DialogHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
1127
|
+
var DialogHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles16["dialog-header-icon"], className), ...props });
|
|
1076
1128
|
DialogHeaderIcon.displayName = "DialogHeaderIcon";
|
|
1077
1129
|
var DialogHeader = ({ className, children, ...props }) => {
|
|
1078
|
-
const childrenArray =
|
|
1130
|
+
const childrenArray = React16.Children.toArray(children);
|
|
1079
1131
|
const icon = childrenArray.find(
|
|
1080
|
-
(child) =>
|
|
1132
|
+
(child) => React16.isValidElement(child) && child.type === DialogHeaderIcon
|
|
1081
1133
|
);
|
|
1082
1134
|
const otherChildren = childrenArray.filter(
|
|
1083
|
-
(child) => !(
|
|
1135
|
+
(child) => !(React16.isValidElement(child) && child.type === DialogHeaderIcon)
|
|
1084
1136
|
);
|
|
1085
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1137
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles16["dialog-header"], className), ...props, children: [
|
|
1086
1138
|
icon,
|
|
1087
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1139
|
+
/* @__PURE__ */ jsx("div", { className: styles16["dialog-header-content"], children: otherChildren }),
|
|
1088
1140
|
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", size: "sm" }) })
|
|
1089
1141
|
] });
|
|
1090
1142
|
};
|
|
1091
1143
|
DialogHeader.displayName = "DialogHeader";
|
|
1092
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
1144
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles16["dialog-footer"], className), ...props });
|
|
1093
1145
|
DialogFooter.displayName = "DialogFooter";
|
|
1094
|
-
var DialogTitle =
|
|
1146
|
+
var DialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles16["dialog-title"], className), ...props }));
|
|
1095
1147
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1096
|
-
var DialogDescription =
|
|
1148
|
+
var DialogDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1097
1149
|
DialogPrimitive.Description,
|
|
1098
1150
|
{
|
|
1099
1151
|
ref,
|
|
1100
|
-
className: cn(
|
|
1152
|
+
className: cn(styles16["dialog-description"], className),
|
|
1101
1153
|
...props
|
|
1102
1154
|
}
|
|
1103
1155
|
));
|
|
1104
1156
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1105
|
-
var DialogContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
1157
|
+
var DialogContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles16["dialog-body"], className), ...props });
|
|
1106
1158
|
DialogContent.displayName = "DialogContent";
|
|
1107
1159
|
function Command({ className, ...props }) {
|
|
1108
|
-
return /* @__PURE__ */ jsx(Command$1, { "data-slot": "command", className: cn(
|
|
1160
|
+
return /* @__PURE__ */ jsx(Command$1, { "data-slot": "command", className: cn(styles17.command, className), ...props });
|
|
1109
1161
|
}
|
|
1110
1162
|
function CommandDialog({
|
|
1111
1163
|
title = "Command Palette",
|
|
@@ -1114,24 +1166,24 @@ function CommandDialog({
|
|
|
1114
1166
|
...props
|
|
1115
1167
|
}) {
|
|
1116
1168
|
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
1117
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className:
|
|
1169
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: styles17["command-dialog-header"], children: [
|
|
1118
1170
|
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
1119
1171
|
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
1120
1172
|
] }),
|
|
1121
|
-
/* @__PURE__ */ jsx(DialogContent, { className:
|
|
1173
|
+
/* @__PURE__ */ jsx(DialogContent, { className: styles17["command-dialog-content"], children: /* @__PURE__ */ jsx(Command, { className: styles17["command-dialog-content-inner"], children }) })
|
|
1122
1174
|
] });
|
|
1123
1175
|
}
|
|
1124
1176
|
function CommandInput({
|
|
1125
1177
|
className,
|
|
1126
1178
|
...props
|
|
1127
1179
|
}) {
|
|
1128
|
-
return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className:
|
|
1129
|
-
/* @__PURE__ */ jsx(SearchIcon, { className:
|
|
1180
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className: styles17["command-input"], children: [
|
|
1181
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: styles17["command-input-icon"] }),
|
|
1130
1182
|
/* @__PURE__ */ jsx(
|
|
1131
1183
|
Command$1.Input,
|
|
1132
1184
|
{
|
|
1133
1185
|
"data-slot": "command-input",
|
|
1134
|
-
className: cn(
|
|
1186
|
+
className: cn(styles17["command-input-input"], className),
|
|
1135
1187
|
...props
|
|
1136
1188
|
}
|
|
1137
1189
|
)
|
|
@@ -1142,7 +1194,7 @@ function CommandList({ className, ...props }) {
|
|
|
1142
1194
|
Command$1.List,
|
|
1143
1195
|
{
|
|
1144
1196
|
"data-slot": "command-list",
|
|
1145
|
-
className: cn(
|
|
1197
|
+
className: cn(styles17["command-list"], className),
|
|
1146
1198
|
...props
|
|
1147
1199
|
}
|
|
1148
1200
|
);
|
|
@@ -1152,7 +1204,7 @@ function CommandEmpty({ ...props }) {
|
|
|
1152
1204
|
Command$1.Empty,
|
|
1153
1205
|
{
|
|
1154
1206
|
"data-slot": "command-empty",
|
|
1155
|
-
className:
|
|
1207
|
+
className: styles17["command-empty"],
|
|
1156
1208
|
...props
|
|
1157
1209
|
}
|
|
1158
1210
|
);
|
|
@@ -1165,7 +1217,7 @@ function CommandGroup({
|
|
|
1165
1217
|
Command$1.Group,
|
|
1166
1218
|
{
|
|
1167
1219
|
"data-slot": "command-group",
|
|
1168
|
-
className: cn(
|
|
1220
|
+
className: cn(styles17["command-group"], className),
|
|
1169
1221
|
...props
|
|
1170
1222
|
}
|
|
1171
1223
|
);
|
|
@@ -1178,7 +1230,7 @@ function CommandSeparator({
|
|
|
1178
1230
|
Command$1.Separator,
|
|
1179
1231
|
{
|
|
1180
1232
|
"data-slot": "command-separator",
|
|
1181
|
-
className: cn(
|
|
1233
|
+
className: cn(styles17["command-separator"], className),
|
|
1182
1234
|
...props
|
|
1183
1235
|
}
|
|
1184
1236
|
);
|
|
@@ -1188,7 +1240,7 @@ function CommandItem({ className, ...props }) {
|
|
|
1188
1240
|
Command$1.Item,
|
|
1189
1241
|
{
|
|
1190
1242
|
"data-slot": "command-item",
|
|
1191
|
-
className: cn(
|
|
1243
|
+
className: cn(styles17["command-item"], className),
|
|
1192
1244
|
...props
|
|
1193
1245
|
}
|
|
1194
1246
|
);
|
|
@@ -1198,7 +1250,7 @@ function CommandShortcut({ className, ...props }) {
|
|
|
1198
1250
|
"span",
|
|
1199
1251
|
{
|
|
1200
1252
|
"data-slot": "command-shortcut",
|
|
1201
|
-
className: cn(
|
|
1253
|
+
className: cn(styles17["command-shortcut"], className),
|
|
1202
1254
|
...props
|
|
1203
1255
|
}
|
|
1204
1256
|
);
|
|
@@ -1209,12 +1261,12 @@ var ControlStatusBadge = ({ status, display = "both" }) => {
|
|
|
1209
1261
|
if (display === "icon-only") {
|
|
1210
1262
|
return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display: "icon-only", className: config.className, variant: null, children: config.label });
|
|
1211
1263
|
}
|
|
1212
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1213
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
1214
|
-
display !== "text-only" && /* @__PURE__ */ jsx(Icon, { icon: config.icon, size: "xs", className:
|
|
1264
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles18["split-badge"], config.className), children: [
|
|
1265
|
+
/* @__PURE__ */ jsxs("span", { className: styles18["split-badge__status"], children: [
|
|
1266
|
+
display !== "text-only" && /* @__PURE__ */ jsx(Icon, { icon: config.icon, size: "xs", className: styles18["icon"] }),
|
|
1215
1267
|
config.label
|
|
1216
1268
|
] }),
|
|
1217
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
1269
|
+
/* @__PURE__ */ jsx("span", { className: styles18["split-badge__sub-status"], children: config.subLabel })
|
|
1218
1270
|
] });
|
|
1219
1271
|
}
|
|
1220
1272
|
return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display, className: config.className, variant: null, children: config.label });
|
|
@@ -1224,70 +1276,70 @@ var getStatusConfig = (status) => {
|
|
|
1224
1276
|
case "in-progress":
|
|
1225
1277
|
return {
|
|
1226
1278
|
icon: "Clock",
|
|
1227
|
-
className:
|
|
1279
|
+
className: styles18["badge--in-progress"],
|
|
1228
1280
|
label: "In Progress"
|
|
1229
1281
|
};
|
|
1230
1282
|
case "not-started":
|
|
1231
1283
|
return {
|
|
1232
1284
|
icon: "CircleDashed",
|
|
1233
|
-
className:
|
|
1285
|
+
className: styles18["badge--not-started"],
|
|
1234
1286
|
label: "Not Started"
|
|
1235
1287
|
};
|
|
1236
1288
|
case "ready-for-review":
|
|
1237
1289
|
return {
|
|
1238
1290
|
icon: "ClipboardCheck",
|
|
1239
|
-
className:
|
|
1291
|
+
className: styles18["badge--ready-for-review"],
|
|
1240
1292
|
label: "Ready for Review"
|
|
1241
1293
|
};
|
|
1242
1294
|
case "in-review":
|
|
1243
1295
|
return {
|
|
1244
1296
|
icon: "Eye",
|
|
1245
|
-
className:
|
|
1297
|
+
className: styles18["badge--in-review"],
|
|
1246
1298
|
label: "In Review"
|
|
1247
1299
|
};
|
|
1248
1300
|
case "comment":
|
|
1249
1301
|
return {
|
|
1250
1302
|
icon: "Eye",
|
|
1251
|
-
className:
|
|
1303
|
+
className: styles18["badge--comment"],
|
|
1252
1304
|
label: "In Review",
|
|
1253
1305
|
subLabel: "General"
|
|
1254
1306
|
};
|
|
1255
1307
|
case "not-applicable":
|
|
1256
1308
|
return {
|
|
1257
1309
|
icon: "MinusCircle",
|
|
1258
|
-
className:
|
|
1310
|
+
className: styles18["badge--not-applicable"],
|
|
1259
1311
|
label: "Not Applicable"
|
|
1260
1312
|
};
|
|
1261
1313
|
case "accepted":
|
|
1262
1314
|
return {
|
|
1263
1315
|
icon: "Eye",
|
|
1264
|
-
className:
|
|
1316
|
+
className: styles18["badge--accepted"],
|
|
1265
1317
|
label: "In Review",
|
|
1266
1318
|
subLabel: "Accepted"
|
|
1267
1319
|
};
|
|
1268
1320
|
case "questioned":
|
|
1269
1321
|
return {
|
|
1270
1322
|
icon: "Eye",
|
|
1271
|
-
className:
|
|
1323
|
+
className: styles18["badge--question"],
|
|
1272
1324
|
label: "In Review",
|
|
1273
1325
|
subLabel: "Questioned"
|
|
1274
1326
|
};
|
|
1275
1327
|
case "compliant":
|
|
1276
1328
|
return {
|
|
1277
1329
|
icon: /* @__PURE__ */ jsx(CircleCheckFillIcon, {}),
|
|
1278
|
-
className:
|
|
1330
|
+
className: styles18["badge--compliant"],
|
|
1279
1331
|
label: "Compliant"
|
|
1280
1332
|
};
|
|
1281
1333
|
case "non-compliant":
|
|
1282
1334
|
return {
|
|
1283
1335
|
icon: "X",
|
|
1284
|
-
className:
|
|
1336
|
+
className: styles18["badge--non-compliant"],
|
|
1285
1337
|
label: "Non-compliant"
|
|
1286
1338
|
};
|
|
1287
1339
|
default:
|
|
1288
1340
|
return {
|
|
1289
1341
|
icon: "CircleDashed",
|
|
1290
|
-
className:
|
|
1342
|
+
className: styles18["badge--not-started"],
|
|
1291
1343
|
label: status
|
|
1292
1344
|
};
|
|
1293
1345
|
}
|
|
@@ -1309,16 +1361,16 @@ var CircleCheckFillIcon = ({ className }) => {
|
|
|
1309
1361
|
var Popover = PopoverPrimitive.Root;
|
|
1310
1362
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1311
1363
|
var PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1312
|
-
var PopoverContent =
|
|
1364
|
+
var PopoverContent = React16.forwardRef(({ className, align = "center", sideOffset = 4, arrow = false, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsxs(
|
|
1313
1365
|
PopoverPrimitive.Content,
|
|
1314
1366
|
{
|
|
1315
1367
|
ref,
|
|
1316
1368
|
align,
|
|
1317
1369
|
sideOffset,
|
|
1318
|
-
className: cn(
|
|
1370
|
+
className: cn(styles19["popover-content"], className),
|
|
1319
1371
|
...props,
|
|
1320
1372
|
children: [
|
|
1321
|
-
arrow && /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, { className:
|
|
1373
|
+
arrow && /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, { className: styles19["popover-arrow"] }),
|
|
1322
1374
|
children
|
|
1323
1375
|
]
|
|
1324
1376
|
}
|
|
@@ -1430,7 +1482,7 @@ var DateRangePicker = ({ dateRange, onSelect, className }) => {
|
|
|
1430
1482
|
clearSelection();
|
|
1431
1483
|
};
|
|
1432
1484
|
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
1433
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1485
|
+
/* @__PURE__ */ jsx("div", { className: styles20["popover-header"], children: /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
1434
1486
|
Button,
|
|
1435
1487
|
{
|
|
1436
1488
|
variant: "tertiary",
|
|
@@ -1445,38 +1497,38 @@ var DateRangePicker = ({ dateRange, onSelect, className }) => {
|
|
|
1445
1497
|
}
|
|
1446
1498
|
),
|
|
1447
1499
|
className,
|
|
1448
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
1500
|
+
children: /* @__PURE__ */ jsx("span", { className: styles20["date-range"], children: formatRange(dateRange) })
|
|
1449
1501
|
}
|
|
1450
1502
|
) }) }),
|
|
1451
|
-
/* @__PURE__ */ jsxs(PopoverContent, { className:
|
|
1452
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1503
|
+
/* @__PURE__ */ jsxs(PopoverContent, { className: styles20["popover-content"], align: "end", children: [
|
|
1504
|
+
/* @__PURE__ */ jsxs("div", { className: styles20["month-navigation"], children: [
|
|
1453
1505
|
/* @__PURE__ */ jsx(
|
|
1454
1506
|
Button,
|
|
1455
1507
|
{
|
|
1456
1508
|
variant: "tertiary",
|
|
1457
1509
|
size: "sm",
|
|
1458
|
-
className:
|
|
1510
|
+
className: styles20["month-navigation-btn"],
|
|
1459
1511
|
onClick: goToPreviousMonth,
|
|
1460
1512
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
1461
1513
|
}
|
|
1462
1514
|
),
|
|
1463
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1464
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1465
|
-
selecting && /* @__PURE__ */ jsx("div", { className:
|
|
1515
|
+
/* @__PURE__ */ jsxs("div", { className: styles20["month-date-display"], children: [
|
|
1516
|
+
/* @__PURE__ */ jsx("div", { className: styles20["month-date-display-title"], children: `${MONTHS[displayedMonth]} ${displayedYear}` }),
|
|
1517
|
+
selecting && /* @__PURE__ */ jsx("div", { className: styles20["month-date-display-subtitle"], children: selecting === "from" ? "Select start date" : "Select end date" })
|
|
1466
1518
|
] }),
|
|
1467
1519
|
/* @__PURE__ */ jsx(
|
|
1468
1520
|
Button,
|
|
1469
1521
|
{
|
|
1470
1522
|
variant: "tertiary",
|
|
1471
1523
|
size: "sm",
|
|
1472
|
-
className:
|
|
1524
|
+
className: styles20["month-navigation-btn"],
|
|
1473
1525
|
onClick: goToNextMonth,
|
|
1474
1526
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
1475
1527
|
}
|
|
1476
1528
|
)
|
|
1477
1529
|
] }),
|
|
1478
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
1479
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1530
|
+
/* @__PURE__ */ jsx("div", { className: styles20["day-headers"], children: DAY_HEADERS.map((day) => /* @__PURE__ */ jsx("div", { className: styles20["day-headers-inner"], children: day }, day)) }),
|
|
1531
|
+
/* @__PURE__ */ jsxs("div", { className: styles20["calendar-grid"], children: [
|
|
1480
1532
|
paddingDays.map((_, index) => /* @__PURE__ */ jsx("div", {}, `padding-${index}`)),
|
|
1481
1533
|
days.map((day, index) => {
|
|
1482
1534
|
const isSelected = isDateSelected(day, dateRange);
|
|
@@ -1487,10 +1539,10 @@ var DateRangePicker = ({ dateRange, onSelect, className }) => {
|
|
|
1487
1539
|
{
|
|
1488
1540
|
variant: "tertiary",
|
|
1489
1541
|
className: cn(
|
|
1490
|
-
|
|
1491
|
-
isSelected &&
|
|
1492
|
-
isToday && !isSelected &&
|
|
1493
|
-
inRange && !isSelected &&
|
|
1542
|
+
styles20["calendar-day-btn"],
|
|
1543
|
+
isSelected && styles20["calendar-day-btn--selected"],
|
|
1544
|
+
isToday && !isSelected && styles20["calendar-day-btn--today"],
|
|
1545
|
+
inRange && !isSelected && styles20["calendar-day-btn--in-range"]
|
|
1494
1546
|
),
|
|
1495
1547
|
onClick: () => handleDateSelect(day),
|
|
1496
1548
|
children: day.getDate()
|
|
@@ -1505,10 +1557,10 @@ var DateRangePicker = ({ dateRange, onSelect, className }) => {
|
|
|
1505
1557
|
var displayFieldVariants = cva("", {
|
|
1506
1558
|
variants: {
|
|
1507
1559
|
variant: {
|
|
1508
|
-
neutral:
|
|
1509
|
-
neutralCheck:
|
|
1510
|
-
success:
|
|
1511
|
-
failure:
|
|
1560
|
+
neutral: styles21["display-field--neutral"],
|
|
1561
|
+
neutralCheck: styles21["display-field--neutral"],
|
|
1562
|
+
success: styles21["display-field--success"],
|
|
1563
|
+
failure: styles21["display-field--failure"]
|
|
1512
1564
|
}
|
|
1513
1565
|
},
|
|
1514
1566
|
defaultVariants: {
|
|
@@ -1516,7 +1568,7 @@ var displayFieldVariants = cva("", {
|
|
|
1516
1568
|
}
|
|
1517
1569
|
});
|
|
1518
1570
|
var displayFieldElevationVariants = generateElevationVariants(
|
|
1519
|
-
|
|
1571
|
+
styles21,
|
|
1520
1572
|
"display-field",
|
|
1521
1573
|
ELEVATION.BASE
|
|
1522
1574
|
);
|
|
@@ -1536,10 +1588,10 @@ function DisplayField({
|
|
|
1536
1588
|
const [middleTruncationWidth, setMiddleTruncationWidth] = useState(void 0);
|
|
1537
1589
|
const getIcon = () => {
|
|
1538
1590
|
if (variant === "success" || variant === "neutralCheck") {
|
|
1539
|
-
return /* @__PURE__ */ jsx(Check, { className:
|
|
1591
|
+
return /* @__PURE__ */ jsx(Check, { className: styles21["icon-width"] });
|
|
1540
1592
|
}
|
|
1541
1593
|
if (variant === "failure") {
|
|
1542
|
-
return /* @__PURE__ */ jsx(TriangleAlert, { className:
|
|
1594
|
+
return /* @__PURE__ */ jsx(TriangleAlert, { className: styles21["icon-width"] });
|
|
1543
1595
|
}
|
|
1544
1596
|
return null;
|
|
1545
1597
|
};
|
|
@@ -1550,9 +1602,9 @@ function DisplayField({
|
|
|
1550
1602
|
return children;
|
|
1551
1603
|
};
|
|
1552
1604
|
const getTruncateClass = () => {
|
|
1553
|
-
if (truncate === "middle") return
|
|
1554
|
-
if (truncate === true) return
|
|
1555
|
-
return
|
|
1605
|
+
if (truncate === "middle") return styles21["overflow-hidden"];
|
|
1606
|
+
if (truncate === true) return styles21["truncate"];
|
|
1607
|
+
return styles21["overflow-x-scroll"];
|
|
1556
1608
|
};
|
|
1557
1609
|
const getValueForCopy = () => {
|
|
1558
1610
|
if (typeof children === "string") {
|
|
@@ -1582,88 +1634,88 @@ function DisplayField({
|
|
|
1582
1634
|
"div",
|
|
1583
1635
|
{
|
|
1584
1636
|
className: cn(
|
|
1585
|
-
|
|
1637
|
+
styles21["display-field"],
|
|
1586
1638
|
displayFieldElevationVariants({ elevation }),
|
|
1587
1639
|
className
|
|
1588
1640
|
),
|
|
1589
1641
|
...props,
|
|
1590
1642
|
children: [
|
|
1591
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
1592
|
-
prefix && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
1643
|
+
/* @__PURE__ */ jsxs("div", { className: styles21["display-field-inner"], children: [
|
|
1644
|
+
prefix && /* @__PURE__ */ jsxs("div", { className: cn(styles21["prefix"], displayFieldVariants({ variant })), children: [
|
|
1593
1645
|
getIcon(),
|
|
1594
1646
|
prefix
|
|
1595
1647
|
] }),
|
|
1596
1648
|
/* @__PURE__ */ jsx(
|
|
1597
1649
|
"span",
|
|
1598
1650
|
{
|
|
1599
|
-
className: cn(
|
|
1651
|
+
className: cn(styles21["content"], getTruncateClass()),
|
|
1600
1652
|
style: { scrollbarWidth: "thin" },
|
|
1601
1653
|
children: renderContent()
|
|
1602
1654
|
}
|
|
1603
1655
|
),
|
|
1604
|
-
showActions && /* @__PURE__ */ jsxs("div", { className:
|
|
1656
|
+
showActions && /* @__PURE__ */ jsxs("div", { className: styles21["actions"], children: [
|
|
1605
1657
|
actions,
|
|
1606
1658
|
copy && /* @__PURE__ */ jsx(CopyButton, { value: getValueForCopy(), size: "sm" })
|
|
1607
1659
|
] })
|
|
1608
1660
|
] }),
|
|
1609
|
-
slot && /* @__PURE__ */ jsx("div", { className:
|
|
1661
|
+
slot && /* @__PURE__ */ jsx("div", { className: styles21["slot"], children: /* @__PURE__ */ jsx("div", { className: styles21["slot-inner"], children: slot }) })
|
|
1610
1662
|
]
|
|
1611
1663
|
}
|
|
1612
1664
|
);
|
|
1613
1665
|
}
|
|
1614
1666
|
function useMatchRegistry() {
|
|
1615
|
-
const itemsRef =
|
|
1616
|
-
const [matchCount, setMatchCount] =
|
|
1617
|
-
const registerItem =
|
|
1667
|
+
const itemsRef = React16.useRef(/* @__PURE__ */ new Map());
|
|
1668
|
+
const [matchCount, setMatchCount] = React16.useState(0);
|
|
1669
|
+
const registerItem = React16.useCallback((id, matches) => {
|
|
1618
1670
|
const delta = Number(matches) - Number(itemsRef.current.get(id) ?? false);
|
|
1619
1671
|
itemsRef.current.set(id, matches);
|
|
1620
1672
|
if (delta) setMatchCount((count2) => count2 + delta);
|
|
1621
1673
|
}, []);
|
|
1622
|
-
const unregisterItem =
|
|
1674
|
+
const unregisterItem = React16.useCallback((id) => {
|
|
1623
1675
|
if (itemsRef.current.get(id)) setMatchCount((count2) => count2 - 1);
|
|
1624
1676
|
itemsRef.current.delete(id);
|
|
1625
1677
|
}, []);
|
|
1626
|
-
return
|
|
1678
|
+
return React16.useMemo(
|
|
1627
1679
|
() => ({ registerItem, unregisterItem, matchCount }),
|
|
1628
1680
|
[registerItem, unregisterItem, matchCount]
|
|
1629
1681
|
);
|
|
1630
1682
|
}
|
|
1631
1683
|
function useListSearchState(open) {
|
|
1632
|
-
const [enabled, setEnabled] =
|
|
1633
|
-
const [visible, setVisible] =
|
|
1634
|
-
const [query, setQuery] =
|
|
1635
|
-
const [listId, setListId] =
|
|
1636
|
-
const [lockedSide, setLockedSide] =
|
|
1637
|
-
const interactedRef =
|
|
1638
|
-
const markInteracted =
|
|
1684
|
+
const [enabled, setEnabled] = React16.useState(false);
|
|
1685
|
+
const [visible, setVisible] = React16.useState(false);
|
|
1686
|
+
const [query, setQuery] = React16.useState("");
|
|
1687
|
+
const [listId, setListId] = React16.useState(void 0);
|
|
1688
|
+
const [lockedSide, setLockedSide] = React16.useState(void 0);
|
|
1689
|
+
const interactedRef = React16.useRef(false);
|
|
1690
|
+
const markInteracted = React16.useCallback(() => {
|
|
1639
1691
|
interactedRef.current = true;
|
|
1640
1692
|
}, []);
|
|
1641
|
-
const interactedSinceOpen =
|
|
1642
|
-
const [focusSignal, setFocusSignal] =
|
|
1643
|
-
const requestFocus =
|
|
1693
|
+
const interactedSinceOpen = React16.useCallback(() => interactedRef.current, []);
|
|
1694
|
+
const [focusSignal, setFocusSignal] = React16.useState(0);
|
|
1695
|
+
const requestFocus = React16.useCallback(() => setFocusSignal((n) => n + 1), []);
|
|
1644
1696
|
const { registerItem, unregisterItem, matchCount } = useMatchRegistry();
|
|
1645
|
-
const reveal =
|
|
1697
|
+
const reveal = React16.useCallback((seed) => {
|
|
1646
1698
|
setVisible(true);
|
|
1647
1699
|
setQuery(seed);
|
|
1648
1700
|
}, []);
|
|
1649
|
-
const resetStateForOpen =
|
|
1701
|
+
const resetStateForOpen = React16.useCallback(() => {
|
|
1650
1702
|
setVisible(false);
|
|
1651
1703
|
setQuery("");
|
|
1652
1704
|
setLockedSide(void 0);
|
|
1653
1705
|
}, []);
|
|
1654
|
-
const resetForOpen =
|
|
1706
|
+
const resetForOpen = React16.useCallback(() => {
|
|
1655
1707
|
resetStateForOpen();
|
|
1656
1708
|
interactedRef.current = false;
|
|
1657
1709
|
}, [resetStateForOpen]);
|
|
1658
|
-
const [previousOpen, setPreviousOpen] =
|
|
1710
|
+
const [previousOpen, setPreviousOpen] = React16.useState(open);
|
|
1659
1711
|
if (open !== previousOpen) {
|
|
1660
1712
|
setPreviousOpen(open);
|
|
1661
1713
|
if (open) resetStateForOpen();
|
|
1662
1714
|
}
|
|
1663
|
-
|
|
1715
|
+
React16.useEffect(() => {
|
|
1664
1716
|
if (open) interactedRef.current = false;
|
|
1665
1717
|
}, [open]);
|
|
1666
|
-
return
|
|
1718
|
+
return React16.useMemo(
|
|
1667
1719
|
() => ({
|
|
1668
1720
|
enabled,
|
|
1669
1721
|
setEnabled,
|
|
@@ -1710,7 +1762,7 @@ function useSearchSideLock(state, contentRef, {
|
|
|
1710
1762
|
const searching = isSearchActive(state);
|
|
1711
1763
|
const lockedSide = state?.lockedSide;
|
|
1712
1764
|
const lockSide = state?.lockSide;
|
|
1713
|
-
|
|
1765
|
+
React16.useEffect(() => {
|
|
1714
1766
|
if (!enabled || !searching || lockedSide) return;
|
|
1715
1767
|
const placed = contentRef.current?.dataset.side;
|
|
1716
1768
|
if (placed) lockSide?.(placed);
|
|
@@ -1724,7 +1776,7 @@ function getNodeText(node) {
|
|
|
1724
1776
|
if (node == null || typeof node === "boolean") return "";
|
|
1725
1777
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
1726
1778
|
if (Array.isArray(node)) return node.map(getNodeText).join("");
|
|
1727
|
-
if (
|
|
1779
|
+
if (React16.isValidElement(node)) {
|
|
1728
1780
|
return getNodeText(node.props.children);
|
|
1729
1781
|
}
|
|
1730
1782
|
return "";
|
|
@@ -1736,14 +1788,14 @@ var matchesQuery = (query, textValue, children) => {
|
|
|
1736
1788
|
function useRegisterMatch(registry, enabled, id, matches) {
|
|
1737
1789
|
const registerItem = registry?.registerItem;
|
|
1738
1790
|
const unregisterItem = registry?.unregisterItem;
|
|
1739
|
-
|
|
1791
|
+
React16.useEffect(() => {
|
|
1740
1792
|
if (!enabled || !registerItem || !unregisterItem) return;
|
|
1741
1793
|
registerItem(id, matches);
|
|
1742
1794
|
return () => unregisterItem(id);
|
|
1743
1795
|
}, [enabled, registerItem, unregisterItem, id, matches]);
|
|
1744
1796
|
}
|
|
1745
1797
|
function useFilterableItem(state, textValue, children, { group, persistent = false } = {}) {
|
|
1746
|
-
const id =
|
|
1798
|
+
const id = React16.useId();
|
|
1747
1799
|
const matches = persistent || matchesQuery(state?.query ?? "", textValue, children);
|
|
1748
1800
|
const enabled = state?.enabled ?? false;
|
|
1749
1801
|
useRegisterMatch(state, enabled && !persistent, id, matches);
|
|
@@ -1752,23 +1804,23 @@ function useFilterableItem(state, textValue, children, { group, persistent = fal
|
|
|
1752
1804
|
}
|
|
1753
1805
|
function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
1754
1806
|
const { setEnabled, reveal, visible, focusSignal } = state;
|
|
1755
|
-
const inputRef =
|
|
1756
|
-
const ref =
|
|
1807
|
+
const inputRef = React16.useRef(null);
|
|
1808
|
+
const ref = React16.useCallback(
|
|
1757
1809
|
(node) => assignRefs(node, inputRef, forwardedRef),
|
|
1758
1810
|
[forwardedRef]
|
|
1759
1811
|
);
|
|
1760
|
-
|
|
1812
|
+
React16.useEffect(() => {
|
|
1761
1813
|
setEnabled(true);
|
|
1762
1814
|
return () => setEnabled(false);
|
|
1763
1815
|
}, [setEnabled]);
|
|
1764
|
-
|
|
1816
|
+
React16.useEffect(() => {
|
|
1765
1817
|
if (!visible) return;
|
|
1766
1818
|
const input = inputRef.current;
|
|
1767
1819
|
if (!input) return;
|
|
1768
1820
|
input.focus();
|
|
1769
1821
|
input.setSelectionRange(input.value.length, input.value.length);
|
|
1770
1822
|
}, [visible, focusSignal]);
|
|
1771
|
-
|
|
1823
|
+
React16.useEffect(() => {
|
|
1772
1824
|
if (alwaysVisible && !visible) reveal("");
|
|
1773
1825
|
}, [alwaysVisible, visible, reveal]);
|
|
1774
1826
|
return { ref, isRendered: alwaysVisible || visible };
|
|
@@ -1776,7 +1828,7 @@ function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
|
1776
1828
|
function useSearchQuery(state) {
|
|
1777
1829
|
const { query } = state;
|
|
1778
1830
|
const isSearching = isSearchActive(state);
|
|
1779
|
-
return
|
|
1831
|
+
return React16.useMemo(
|
|
1780
1832
|
() => ({
|
|
1781
1833
|
query,
|
|
1782
1834
|
isSearching,
|
|
@@ -1831,8 +1883,8 @@ var CheckIcon2 = Check;
|
|
|
1831
1883
|
var ChevronRightIcon2 = ChevronRight;
|
|
1832
1884
|
var CircleIcon = Circle;
|
|
1833
1885
|
var SearchIcon2 = Search;
|
|
1834
|
-
var DropdownMenuSearchContext =
|
|
1835
|
-
var useDropdownMenuSearch = () =>
|
|
1886
|
+
var DropdownMenuSearchContext = React16.createContext(null);
|
|
1887
|
+
var useDropdownMenuSearch = () => React16.useContext(DropdownMenuSearchContext);
|
|
1836
1888
|
var useIsSearching = () => isSearchActive(useDropdownMenuSearch());
|
|
1837
1889
|
var useDropdownMenuSearchQuery = () => {
|
|
1838
1890
|
const ctx = useDropdownMenuSearch();
|
|
@@ -1841,12 +1893,12 @@ var useDropdownMenuSearchQuery = () => {
|
|
|
1841
1893
|
}
|
|
1842
1894
|
return useSearchQuery(ctx);
|
|
1843
1895
|
};
|
|
1844
|
-
var DropdownMenuBreadcrumbContext =
|
|
1845
|
-
var useBreadcrumbAncestry = () =>
|
|
1896
|
+
var DropdownMenuBreadcrumbContext = React16.createContext([]);
|
|
1897
|
+
var useBreadcrumbAncestry = () => React16.useContext(DropdownMenuBreadcrumbContext);
|
|
1846
1898
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
1847
1899
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
1848
1900
|
function hasDisplayName(node, name) {
|
|
1849
|
-
return
|
|
1901
|
+
return React16.isValidElement(node) && typeof node.type !== "string" && node.type.displayName === name;
|
|
1850
1902
|
}
|
|
1851
1903
|
var isSubContent = (node) => hasDisplayName(node, SUB_CONTENT_NAME);
|
|
1852
1904
|
var isSubTrigger = (node) => hasDisplayName(node, SUB_TRIGGER_NAME);
|
|
@@ -1854,8 +1906,8 @@ function findSubContentChildren(nodes) {
|
|
|
1854
1906
|
let result = null;
|
|
1855
1907
|
let done = false;
|
|
1856
1908
|
const walk = (ns) => {
|
|
1857
|
-
|
|
1858
|
-
if (done || !
|
|
1909
|
+
React16.Children.forEach(ns, (child) => {
|
|
1910
|
+
if (done || !React16.isValidElement(child)) return;
|
|
1859
1911
|
if (isSubContent(child)) {
|
|
1860
1912
|
result = child.props.children ?? null;
|
|
1861
1913
|
done = true;
|
|
@@ -1869,7 +1921,7 @@ function findSubContentChildren(nodes) {
|
|
|
1869
1921
|
return result;
|
|
1870
1922
|
}
|
|
1871
1923
|
function getSubTriggerLabel(nodes) {
|
|
1872
|
-
const trigger =
|
|
1924
|
+
const trigger = React16.Children.toArray(nodes).find(isSubTrigger);
|
|
1873
1925
|
return trigger ? getNodeText(trigger.props.children) : "";
|
|
1874
1926
|
}
|
|
1875
1927
|
var DropdownMenu = ({
|
|
@@ -1880,7 +1932,7 @@ var DropdownMenu = ({
|
|
|
1880
1932
|
}) => {
|
|
1881
1933
|
const search = useListSearchState(open);
|
|
1882
1934
|
const { resetForOpen } = search;
|
|
1883
|
-
const handleOpenChange =
|
|
1935
|
+
const handleOpenChange = React16.useCallback(
|
|
1884
1936
|
(nextOpen) => {
|
|
1885
1937
|
if (nextOpen) resetForOpen();
|
|
1886
1938
|
onOpenChange?.(nextOpen);
|
|
@@ -1894,7 +1946,7 @@ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
|
1894
1946
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1895
1947
|
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1896
1948
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1897
|
-
var DropdownMenuSubTrigger =
|
|
1949
|
+
var DropdownMenuSubTrigger = React16.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
1898
1950
|
const searching = useIsSearching();
|
|
1899
1951
|
if (searching) return null;
|
|
1900
1952
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1902,24 +1954,24 @@ var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, .
|
|
|
1902
1954
|
{
|
|
1903
1955
|
ref,
|
|
1904
1956
|
className: cn(
|
|
1905
|
-
|
|
1906
|
-
inset &&
|
|
1957
|
+
styles22["dropdown-menu-trigger"],
|
|
1958
|
+
inset && styles22["dropdown-menu-inset"],
|
|
1907
1959
|
className
|
|
1908
1960
|
),
|
|
1909
1961
|
...props,
|
|
1910
1962
|
children: [
|
|
1911
1963
|
children,
|
|
1912
|
-
/* @__PURE__ */ jsx(ChevronRightIcon2, { className:
|
|
1964
|
+
/* @__PURE__ */ jsx(ChevronRightIcon2, { className: styles22["dropdown-menu-subtrigger-chevron"] })
|
|
1913
1965
|
]
|
|
1914
1966
|
}
|
|
1915
1967
|
);
|
|
1916
1968
|
});
|
|
1917
1969
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1918
|
-
var DropdownMenuSubContent =
|
|
1970
|
+
var DropdownMenuSubContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1919
1971
|
DropdownMenuPrimitive.SubContent,
|
|
1920
1972
|
{
|
|
1921
1973
|
ref,
|
|
1922
|
-
className: cn(
|
|
1974
|
+
className: cn(styles22["dropdown-menu-sub-content"], className),
|
|
1923
1975
|
...props
|
|
1924
1976
|
}
|
|
1925
1977
|
));
|
|
@@ -1940,7 +1992,7 @@ var DropdownMenuSub = ({
|
|
|
1940
1992
|
var SEARCH_INPUT_SELECTOR = "[data-dropdown-search]";
|
|
1941
1993
|
var MENU_ITEM_SELECTOR = ':is([role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]):not([data-disabled])';
|
|
1942
1994
|
var MATCHING_ITEM_SELECTOR = `${MENU_ITEM_SELECTOR}:not([data-persistent])`;
|
|
1943
|
-
var DropdownMenuContent =
|
|
1995
|
+
var DropdownMenuContent = React16.forwardRef(
|
|
1944
1996
|
({
|
|
1945
1997
|
className,
|
|
1946
1998
|
children,
|
|
@@ -1957,9 +2009,9 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
1957
2009
|
const setListId = ctx?.setListId;
|
|
1958
2010
|
const searching = isSearchActive(ctx);
|
|
1959
2011
|
const resultCount = ctx?.matchCount ?? 0;
|
|
1960
|
-
const contentRef =
|
|
2012
|
+
const contentRef = React16.useRef(null);
|
|
1961
2013
|
const sideProps = useSearchSideLock(ctx, contentRef, { side, avoidCollisions });
|
|
1962
|
-
const composedContentRef =
|
|
2014
|
+
const composedContentRef = React16.useCallback(
|
|
1963
2015
|
(node) => {
|
|
1964
2016
|
assignRefs(node, ref, contentRef);
|
|
1965
2017
|
setListId?.(node?.id || void 0);
|
|
@@ -1983,7 +2035,7 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
1983
2035
|
DropdownMenuPrimitive.Content,
|
|
1984
2036
|
{
|
|
1985
2037
|
ref: composedContentRef,
|
|
1986
|
-
className: cn(
|
|
2038
|
+
className: cn(styles22["dropdown-menu-content"], className),
|
|
1987
2039
|
sideOffset,
|
|
1988
2040
|
...sideProps,
|
|
1989
2041
|
onFocus: handleFocus,
|
|
@@ -1998,7 +2050,7 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
1998
2050
|
},
|
|
1999
2051
|
...props,
|
|
2000
2052
|
children: [
|
|
2001
|
-
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className:
|
|
2053
|
+
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className: styles22["dropdown-menu-sr-status"], role: "status", "aria-live": "polite", children: searching && resultCount > 0 ? formatResultCount(resultCount) : null }) : null,
|
|
2002
2054
|
children
|
|
2003
2055
|
]
|
|
2004
2056
|
}
|
|
@@ -2006,7 +2058,7 @@ var DropdownMenuContent = React15.forwardRef(
|
|
|
2006
2058
|
}
|
|
2007
2059
|
);
|
|
2008
2060
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2009
|
-
var DropdownMenuSearch =
|
|
2061
|
+
var DropdownMenuSearch = React16.forwardRef(
|
|
2010
2062
|
({
|
|
2011
2063
|
className,
|
|
2012
2064
|
placeholder = "Search...",
|
|
@@ -2022,15 +2074,15 @@ var DropdownMenuSearch = React15.forwardRef(
|
|
|
2022
2074
|
}
|
|
2023
2075
|
const { ref, isRendered } = useSearchInput(ctx, alwaysVisible, forwardedRef);
|
|
2024
2076
|
if (!isRendered) return null;
|
|
2025
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2026
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className:
|
|
2077
|
+
return /* @__PURE__ */ jsxs("div", { className: styles22["dropdown-menu-search"], children: [
|
|
2078
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: styles22["dropdown-menu-item-icon"], children: icon ?? /* @__PURE__ */ jsx(SearchIcon2, { className: styles22["icon-size"] }) }),
|
|
2027
2079
|
/* @__PURE__ */ jsx(
|
|
2028
2080
|
"input",
|
|
2029
2081
|
{
|
|
2030
2082
|
...props,
|
|
2031
2083
|
ref,
|
|
2032
2084
|
"data-dropdown-search": "",
|
|
2033
|
-
className: cn(
|
|
2085
|
+
className: cn(styles22["dropdown-menu-search-input"], className),
|
|
2034
2086
|
value: ctx.query,
|
|
2035
2087
|
placeholder,
|
|
2036
2088
|
"aria-label": ariaLabel ?? placeholder,
|
|
@@ -2076,7 +2128,7 @@ var DropdownMenuEmpty = ({
|
|
|
2076
2128
|
...props,
|
|
2077
2129
|
role: "status",
|
|
2078
2130
|
"aria-live": "polite",
|
|
2079
|
-
className: isEmpty ? cn(
|
|
2131
|
+
className: isEmpty ? cn(styles22["dropdown-menu-empty"], className) : void 0,
|
|
2080
2132
|
children: isEmpty ? children : null
|
|
2081
2133
|
}
|
|
2082
2134
|
);
|
|
@@ -2085,12 +2137,12 @@ DropdownMenuEmpty.displayName = "DropdownMenuEmpty";
|
|
|
2085
2137
|
var ItemBreadcrumb = () => {
|
|
2086
2138
|
const ancestry = useBreadcrumbAncestry();
|
|
2087
2139
|
if (!ancestry.length) return null;
|
|
2088
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
2140
|
+
return /* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-breadcrumb"], "aria-hidden": "true", children: ancestry.map((crumb, index) => /* @__PURE__ */ jsxs(React16.Fragment, { children: [
|
|
2089
2141
|
crumb,
|
|
2090
2142
|
/* @__PURE__ */ jsx(ChevronRightIcon2, {})
|
|
2091
2143
|
] }, index)) });
|
|
2092
2144
|
};
|
|
2093
|
-
var DropdownMenuItem =
|
|
2145
|
+
var DropdownMenuItem = React16.forwardRef(({ className, inset, variant = "neutral", textValue, persistent, children, ...props }, ref) => {
|
|
2094
2146
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2095
2147
|
if (!visible) return null;
|
|
2096
2148
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2099,10 +2151,10 @@ var DropdownMenuItem = React15.forwardRef(({ className, inset, variant = "neutra
|
|
|
2099
2151
|
ref,
|
|
2100
2152
|
textValue,
|
|
2101
2153
|
className: cn(
|
|
2102
|
-
|
|
2103
|
-
inset &&
|
|
2104
|
-
variant === "warning" &&
|
|
2105
|
-
variant === "danger" &&
|
|
2154
|
+
styles22["dropdown-menu-item"],
|
|
2155
|
+
inset && styles22["dropdown-menu-inset"],
|
|
2156
|
+
variant === "warning" && styles22["dropdown-menu-item-warning"],
|
|
2157
|
+
variant === "danger" && styles22["dropdown-menu-item-danger"],
|
|
2106
2158
|
className
|
|
2107
2159
|
),
|
|
2108
2160
|
...props,
|
|
@@ -2115,7 +2167,7 @@ var DropdownMenuItem = React15.forwardRef(({ className, inset, variant = "neutra
|
|
|
2115
2167
|
);
|
|
2116
2168
|
});
|
|
2117
2169
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2118
|
-
var DropdownMenuCheckboxItem =
|
|
2170
|
+
var DropdownMenuCheckboxItem = React16.forwardRef(({ className, children, checked, textValue, persistent, ...props }, ref) => {
|
|
2119
2171
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2120
2172
|
if (!visible) return null;
|
|
2121
2173
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2123,12 +2175,12 @@ var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checke
|
|
|
2123
2175
|
{
|
|
2124
2176
|
ref,
|
|
2125
2177
|
textValue,
|
|
2126
|
-
className: cn(
|
|
2178
|
+
className: cn(styles22["dropdown-menu-checkbox-item"], className),
|
|
2127
2179
|
checked,
|
|
2128
2180
|
...props,
|
|
2129
2181
|
"data-persistent": persistent ? "" : void 0,
|
|
2130
2182
|
children: [
|
|
2131
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2183
|
+
/* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-item-indicator-checkbox"], children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon2, { className: styles22["icon-size"] }) }) }),
|
|
2132
2184
|
/* @__PURE__ */ jsx(ItemBreadcrumb, {}),
|
|
2133
2185
|
children
|
|
2134
2186
|
]
|
|
@@ -2136,7 +2188,7 @@ var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checke
|
|
|
2136
2188
|
);
|
|
2137
2189
|
});
|
|
2138
2190
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2139
|
-
var DropdownMenuRadioItem =
|
|
2191
|
+
var DropdownMenuRadioItem = React16.forwardRef(({ className, children, textValue, persistent, ...props }, ref) => {
|
|
2140
2192
|
const visible = useFilterableItem(useDropdownMenuSearch(), textValue, children, { persistent });
|
|
2141
2193
|
if (!visible) return null;
|
|
2142
2194
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2144,11 +2196,11 @@ var DropdownMenuRadioItem = React15.forwardRef(({ className, children, textValue
|
|
|
2144
2196
|
{
|
|
2145
2197
|
ref,
|
|
2146
2198
|
textValue,
|
|
2147
|
-
className: cn(
|
|
2199
|
+
className: cn(styles22["dropdown-menu-radio-item"], className),
|
|
2148
2200
|
...props,
|
|
2149
2201
|
"data-persistent": persistent ? "" : void 0,
|
|
2150
2202
|
children: [
|
|
2151
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2203
|
+
/* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-item-indicator-radio"], children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: styles22["radio-icon"] }) }) }),
|
|
2152
2204
|
/* @__PURE__ */ jsx(ItemBreadcrumb, {}),
|
|
2153
2205
|
children
|
|
2154
2206
|
]
|
|
@@ -2156,7 +2208,7 @@ var DropdownMenuRadioItem = React15.forwardRef(({ className, children, textValue
|
|
|
2156
2208
|
);
|
|
2157
2209
|
});
|
|
2158
2210
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2159
|
-
var DropdownMenuLabel =
|
|
2211
|
+
var DropdownMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref) => {
|
|
2160
2212
|
const searching = useIsSearching();
|
|
2161
2213
|
if (searching) return null;
|
|
2162
2214
|
return /* @__PURE__ */ jsx(
|
|
@@ -2164,8 +2216,8 @@ var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2164
2216
|
{
|
|
2165
2217
|
ref,
|
|
2166
2218
|
className: cn(
|
|
2167
|
-
|
|
2168
|
-
inset &&
|
|
2219
|
+
styles22["dropdown-menu-label"],
|
|
2220
|
+
inset && styles22["dropdown-menu-inset"],
|
|
2169
2221
|
className
|
|
2170
2222
|
),
|
|
2171
2223
|
...props
|
|
@@ -2173,21 +2225,21 @@ var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2173
2225
|
);
|
|
2174
2226
|
});
|
|
2175
2227
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2176
|
-
var DropdownMenuSeparator =
|
|
2228
|
+
var DropdownMenuSeparator = React16.forwardRef(({ className, persistent, ...props }, ref) => {
|
|
2177
2229
|
const searching = useIsSearching();
|
|
2178
2230
|
if (searching && !persistent) return null;
|
|
2179
2231
|
return /* @__PURE__ */ jsx(
|
|
2180
2232
|
DropdownMenuPrimitive.Separator,
|
|
2181
2233
|
{
|
|
2182
2234
|
ref,
|
|
2183
|
-
className: cn(
|
|
2235
|
+
className: cn(styles22["dropdown-menu-separator"], className),
|
|
2184
2236
|
...props
|
|
2185
2237
|
}
|
|
2186
2238
|
);
|
|
2187
2239
|
});
|
|
2188
2240
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2189
2241
|
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
2190
|
-
return /* @__PURE__ */ jsx("span", { className: cn(
|
|
2242
|
+
return /* @__PURE__ */ jsx("span", { className: cn(styles22["dropdown-menu-shortcut"], className), ...props });
|
|
2191
2243
|
};
|
|
2192
2244
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2193
2245
|
var EmptyTableState = ({
|
|
@@ -2200,13 +2252,13 @@ var EmptyTableState = ({
|
|
|
2200
2252
|
className
|
|
2201
2253
|
}) => {
|
|
2202
2254
|
const showButton = showClearButton && onClear;
|
|
2203
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
2204
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2255
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles23["empty-table-state"], className), children: [
|
|
2256
|
+
/* @__PURE__ */ jsxs("div", { className: styles23["icon-and-title-container"], children: [
|
|
2205
2257
|
/* @__PURE__ */ jsx(Icon, { icon, size: "md", background: "circle", elevation }),
|
|
2206
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2258
|
+
/* @__PURE__ */ jsx("span", { className: styles23["title"], children: title })
|
|
2207
2259
|
] }),
|
|
2208
|
-
description && /* @__PURE__ */ jsx("span", { className:
|
|
2209
|
-
showButton && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "sm", onClick: onClear, className:
|
|
2260
|
+
description && /* @__PURE__ */ jsx("span", { className: styles23["description"], children: description }),
|
|
2261
|
+
showButton && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "sm", onClick: onClear, className: styles23["clear-button"], children: "Clear Filters" })
|
|
2210
2262
|
] });
|
|
2211
2263
|
};
|
|
2212
2264
|
var ChevronDownIcon = ChevronDown;
|
|
@@ -2243,13 +2295,13 @@ var FilterDropdown = ({
|
|
|
2243
2295
|
{
|
|
2244
2296
|
variant: "tertiary",
|
|
2245
2297
|
disabled,
|
|
2246
|
-
className: cn(
|
|
2298
|
+
className: cn(styles24["selector-button"], buttonClassName),
|
|
2247
2299
|
children: [
|
|
2248
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
2300
|
+
/* @__PURE__ */ jsxs("span", { className: styles24["selector-button-content"], children: [
|
|
2249
2301
|
label,
|
|
2250
2302
|
hasSelectedFilters && /* @__PURE__ */ jsx(Badge, { variant: "primary", children: selectedFilters.length })
|
|
2251
2303
|
] }),
|
|
2252
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { className:
|
|
2304
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: styles24["chevron-icon"] })
|
|
2253
2305
|
]
|
|
2254
2306
|
}
|
|
2255
2307
|
) }),
|
|
@@ -2257,16 +2309,16 @@ var FilterDropdown = ({
|
|
|
2257
2309
|
DropdownMenuContent,
|
|
2258
2310
|
{
|
|
2259
2311
|
align: "end",
|
|
2260
|
-
className: cn(
|
|
2312
|
+
className: cn(styles24["dropdown-menu-content"], contentClassName),
|
|
2261
2313
|
children: [
|
|
2262
2314
|
searchable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2263
2315
|
/* @__PURE__ */ jsx(DropdownMenuSearch, { placeholder: searchPlaceholder, "aria-label": label }),
|
|
2264
2316
|
/* @__PURE__ */ jsx(DropdownMenuEmpty, { children: emptyPlaceholder })
|
|
2265
2317
|
] }),
|
|
2266
2318
|
!searchable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2267
|
-
/* @__PURE__ */ jsxs(DropdownMenuLabel, { className:
|
|
2319
|
+
/* @__PURE__ */ jsxs(DropdownMenuLabel, { className: styles24["filters-header"], children: [
|
|
2268
2320
|
"Filters",
|
|
2269
|
-
hasSelectedFilters && clearAll(
|
|
2321
|
+
hasSelectedFilters && clearAll(styles24["clear-all-inline"])
|
|
2270
2322
|
] }),
|
|
2271
2323
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
2272
2324
|
] }),
|
|
@@ -2278,33 +2330,33 @@ var FilterDropdown = ({
|
|
|
2278
2330
|
checked: isSelected,
|
|
2279
2331
|
onCheckedChange: () => onToggleFilter(option.value),
|
|
2280
2332
|
onSelect: (e) => e.preventDefault(),
|
|
2281
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
2333
|
+
children: /* @__PURE__ */ jsx("span", { className: styles24["option-label"], title: option.label, children: option.label })
|
|
2282
2334
|
},
|
|
2283
2335
|
option.value
|
|
2284
2336
|
);
|
|
2285
2337
|
}),
|
|
2286
|
-
searchable && hasSelectedFilters && /* @__PURE__ */ jsxs("div", { className:
|
|
2338
|
+
searchable && hasSelectedFilters && /* @__PURE__ */ jsxs("div", { className: styles24["clear-all-footer"], children: [
|
|
2287
2339
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, { persistent: true }),
|
|
2288
|
-
clearAll(
|
|
2340
|
+
clearAll(styles24["clear-all"])
|
|
2289
2341
|
] })
|
|
2290
2342
|
]
|
|
2291
2343
|
}
|
|
2292
2344
|
)
|
|
2293
2345
|
] });
|
|
2294
2346
|
};
|
|
2295
|
-
var labelVariants = cva(
|
|
2296
|
-
var Label2 =
|
|
2347
|
+
var labelVariants = cva(styles25["label"]);
|
|
2348
|
+
var Label2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
2297
2349
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2298
2350
|
var Form = FormProvider;
|
|
2299
|
-
var FormFieldContext =
|
|
2351
|
+
var FormFieldContext = React16.createContext({});
|
|
2300
2352
|
var FormField = ({
|
|
2301
2353
|
...props
|
|
2302
2354
|
}) => {
|
|
2303
2355
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
2304
2356
|
};
|
|
2305
2357
|
var useFormField = () => {
|
|
2306
|
-
const fieldContext =
|
|
2307
|
-
const itemContext =
|
|
2358
|
+
const fieldContext = React16.useContext(FormFieldContext);
|
|
2359
|
+
const itemContext = React16.useContext(FormItemContext);
|
|
2308
2360
|
const { getFieldState, formState } = useFormContext();
|
|
2309
2361
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2310
2362
|
if (!fieldContext) {
|
|
@@ -2320,28 +2372,28 @@ var useFormField = () => {
|
|
|
2320
2372
|
...fieldState
|
|
2321
2373
|
};
|
|
2322
2374
|
};
|
|
2323
|
-
var FormItemContext =
|
|
2324
|
-
var FormItem =
|
|
2375
|
+
var FormItemContext = React16.createContext({});
|
|
2376
|
+
var FormItem = React16.forwardRef(
|
|
2325
2377
|
({ className, ...props }, ref) => {
|
|
2326
|
-
const id =
|
|
2327
|
-
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(
|
|
2378
|
+
const id = React16.useId();
|
|
2379
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(styles26["form-item"], className), ...props }) });
|
|
2328
2380
|
}
|
|
2329
2381
|
);
|
|
2330
2382
|
FormItem.displayName = "FormItem";
|
|
2331
|
-
var FormLabel =
|
|
2383
|
+
var FormLabel = React16.forwardRef(({ className, ...props }, ref) => {
|
|
2332
2384
|
const { error, formItemId } = useFormField();
|
|
2333
2385
|
return /* @__PURE__ */ jsx(
|
|
2334
2386
|
Label2,
|
|
2335
2387
|
{
|
|
2336
2388
|
ref,
|
|
2337
|
-
className: cn(
|
|
2389
|
+
className: cn(styles26["form-label"], error && styles26["form-label--failure"], className),
|
|
2338
2390
|
htmlFor: formItemId,
|
|
2339
2391
|
...props
|
|
2340
2392
|
}
|
|
2341
2393
|
);
|
|
2342
2394
|
});
|
|
2343
2395
|
FormLabel.displayName = "FormLabel";
|
|
2344
|
-
var FormControl =
|
|
2396
|
+
var FormControl = React16.forwardRef(({ ...props }, ref) => {
|
|
2345
2397
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2346
2398
|
return /* @__PURE__ */ jsx(
|
|
2347
2399
|
Slot,
|
|
@@ -2355,26 +2407,26 @@ var FormControl = React15.forwardRef(({ ...props }, ref) => {
|
|
|
2355
2407
|
);
|
|
2356
2408
|
});
|
|
2357
2409
|
FormControl.displayName = "FormControl";
|
|
2358
|
-
var FormDescription =
|
|
2410
|
+
var FormDescription = React16.forwardRef(({ className, ...props }, ref) => {
|
|
2359
2411
|
const { formDescriptionId } = useFormField();
|
|
2360
2412
|
return /* @__PURE__ */ jsx(
|
|
2361
2413
|
"p",
|
|
2362
2414
|
{
|
|
2363
2415
|
ref,
|
|
2364
2416
|
id: formDescriptionId,
|
|
2365
|
-
className: cn(
|
|
2417
|
+
className: cn(styles26["form-description"], className),
|
|
2366
2418
|
...props
|
|
2367
2419
|
}
|
|
2368
2420
|
);
|
|
2369
2421
|
});
|
|
2370
2422
|
FormDescription.displayName = "FormDescription";
|
|
2371
|
-
var FormMessage =
|
|
2423
|
+
var FormMessage = React16.forwardRef(({ className, children, ...props }, ref) => {
|
|
2372
2424
|
const { error, formMessageId } = useFormField();
|
|
2373
2425
|
const body = error ? String(error?.message ?? "") : children;
|
|
2374
2426
|
if (!body) {
|
|
2375
2427
|
return null;
|
|
2376
2428
|
}
|
|
2377
|
-
return /* @__PURE__ */ jsx("p", { ref, id: formMessageId, className: cn(
|
|
2429
|
+
return /* @__PURE__ */ jsx("p", { ref, id: formMessageId, className: cn(styles26["form-message"], className), ...props, children: body });
|
|
2378
2430
|
});
|
|
2379
2431
|
FormMessage.displayName = "FormMessage";
|
|
2380
2432
|
var DEFAULT_LOCALE = "en-US";
|
|
@@ -2460,8 +2512,8 @@ function DatePlaceholder({
|
|
|
2460
2512
|
className,
|
|
2461
2513
|
...props
|
|
2462
2514
|
}) {
|
|
2463
|
-
return /* @__PURE__ */ jsxs("span", { className: cn(
|
|
2464
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2515
|
+
return /* @__PURE__ */ jsxs("span", { className: cn(styles27["format-date"], className), ...props, children: [
|
|
2516
|
+
/* @__PURE__ */ jsx("span", { className: styles27["visually-hidden"], children: label }),
|
|
2465
2517
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: NO_DATE_PLACEHOLDER })
|
|
2466
2518
|
] });
|
|
2467
2519
|
}
|
|
@@ -2477,12 +2529,12 @@ function FormatDate({
|
|
|
2477
2529
|
...props
|
|
2478
2530
|
}) {
|
|
2479
2531
|
const missing = isMissing(date);
|
|
2480
|
-
const parsed =
|
|
2481
|
-
const [now, setNow] =
|
|
2482
|
-
const [mounted, setMounted] =
|
|
2532
|
+
const parsed = React16.useMemo(() => isMissing(date) ? null : toDate(date), [date]);
|
|
2533
|
+
const [now, setNow] = React16.useState(() => /* @__PURE__ */ new Date());
|
|
2534
|
+
const [mounted, setMounted] = React16.useState(false);
|
|
2483
2535
|
const isAbsolute = displayAs === "absolute";
|
|
2484
|
-
|
|
2485
|
-
|
|
2536
|
+
React16.useEffect(() => setMounted(true), []);
|
|
2537
|
+
React16.useEffect(() => {
|
|
2486
2538
|
if (isAbsolute || !live) return;
|
|
2487
2539
|
const id = setInterval(() => setNow(/* @__PURE__ */ new Date()), LIVE_INTERVAL_MS);
|
|
2488
2540
|
return () => clearInterval(id);
|
|
@@ -2491,7 +2543,7 @@ function FormatDate({
|
|
|
2491
2543
|
return /* @__PURE__ */ jsx(DatePlaceholder, { label: "No date", className, ...props });
|
|
2492
2544
|
}
|
|
2493
2545
|
if (!parsed) {
|
|
2494
|
-
return /* @__PURE__ */ jsx("span", { className: cn(
|
|
2546
|
+
return /* @__PURE__ */ jsx("span", { className: cn(styles27["format-date"], className), ...props, children: "Invalid date" });
|
|
2495
2547
|
}
|
|
2496
2548
|
const machineValue = parsed.toISOString();
|
|
2497
2549
|
const absolute = formatAbsolute(
|
|
@@ -2501,14 +2553,14 @@ function FormatDate({
|
|
|
2501
2553
|
locale
|
|
2502
2554
|
);
|
|
2503
2555
|
if (isAbsolute) {
|
|
2504
|
-
return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(
|
|
2556
|
+
return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(styles27["format-date"], className), ...props, children: absolute });
|
|
2505
2557
|
}
|
|
2506
2558
|
const measured = !mounted ? absolute : displayAs === "relative" ? formatRelative(parsed, now, locale) : formatCountdown(parsed, now, locale);
|
|
2507
2559
|
if (measured === null) {
|
|
2508
2560
|
return /* @__PURE__ */ jsx(DatePlaceholder, { label: "Date has passed", className, ...props });
|
|
2509
2561
|
}
|
|
2510
2562
|
if (!tooltip) {
|
|
2511
|
-
return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(
|
|
2563
|
+
return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(styles27["format-date"], className), ...props, children: measured });
|
|
2512
2564
|
}
|
|
2513
2565
|
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
2514
2566
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
@@ -2516,7 +2568,7 @@ function FormatDate({
|
|
|
2516
2568
|
{
|
|
2517
2569
|
dateTime: machineValue,
|
|
2518
2570
|
tabIndex: 0,
|
|
2519
|
-
className: cn(
|
|
2571
|
+
className: cn(styles27["format-date"], styles27["format-date--interactive"], className),
|
|
2520
2572
|
...props,
|
|
2521
2573
|
children: measured
|
|
2522
2574
|
}
|
|
@@ -2527,12 +2579,12 @@ function FormatDate({
|
|
|
2527
2579
|
var Heading = forwardRef(
|
|
2528
2580
|
({ className, as, displayAs, children, ...props }, ref) => {
|
|
2529
2581
|
const displayClasses = {
|
|
2530
|
-
h1:
|
|
2531
|
-
h2:
|
|
2532
|
-
h3:
|
|
2533
|
-
h4:
|
|
2534
|
-
h5:
|
|
2535
|
-
h6:
|
|
2582
|
+
h1: styles28["h1"],
|
|
2583
|
+
h2: styles28["h2"],
|
|
2584
|
+
h3: styles28["h3"],
|
|
2585
|
+
h4: styles28["h4"],
|
|
2586
|
+
h5: styles28["h5"],
|
|
2587
|
+
h6: styles28["h6"]
|
|
2536
2588
|
};
|
|
2537
2589
|
const displayClass = displayClasses[displayAs] || displayClasses[as];
|
|
2538
2590
|
const HeadingTag = as;
|
|
@@ -2549,7 +2601,7 @@ var InfoCard = ({
|
|
|
2549
2601
|
onClick,
|
|
2550
2602
|
...props
|
|
2551
2603
|
}) => {
|
|
2552
|
-
return /* @__PURE__ */ jsx(Card, { className, onClick, elevation, ...props, children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className:
|
|
2604
|
+
return /* @__PURE__ */ jsx(Card, { className, onClick, elevation, ...props, children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: styles29["info-card-content"], children: [
|
|
2553
2605
|
/* @__PURE__ */ jsx(
|
|
2554
2606
|
Icon,
|
|
2555
2607
|
{
|
|
@@ -2559,9 +2611,9 @@ var InfoCard = ({
|
|
|
2559
2611
|
elevation: elevation === ELEVATION.SUNKEN ? ELEVATION.BASE : getRelativeElevation(elevation, -1)
|
|
2560
2612
|
}
|
|
2561
2613
|
),
|
|
2562
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2563
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
2564
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2614
|
+
/* @__PURE__ */ jsxs("div", { className: styles29["copy-container"], children: [
|
|
2615
|
+
/* @__PURE__ */ jsx("p", { className: styles29["label"], children: label }),
|
|
2616
|
+
/* @__PURE__ */ jsx("div", { className: styles29["description"], children: description })
|
|
2565
2617
|
] })
|
|
2566
2618
|
] }) }) });
|
|
2567
2619
|
};
|
|
@@ -2595,8 +2647,8 @@ var MotionCollapsibleContent = ({
|
|
|
2595
2647
|
onAnimationStart: () => setIsSettled(false),
|
|
2596
2648
|
onAnimationComplete: () => setIsSettled(isOpen),
|
|
2597
2649
|
className: cn(
|
|
2598
|
-
|
|
2599
|
-
isSettled &&
|
|
2650
|
+
styles30["motion-collapsible"],
|
|
2651
|
+
isSettled && styles30["motion-collapsible--settled"],
|
|
2600
2652
|
className
|
|
2601
2653
|
),
|
|
2602
2654
|
children: /* @__PURE__ */ jsx("div", { ref: contentRef, children })
|
|
@@ -2604,7 +2656,7 @@ var MotionCollapsibleContent = ({
|
|
|
2604
2656
|
"motion-content"
|
|
2605
2657
|
) });
|
|
2606
2658
|
};
|
|
2607
|
-
var Input =
|
|
2659
|
+
var Input = React16.forwardRef(
|
|
2608
2660
|
({
|
|
2609
2661
|
className,
|
|
2610
2662
|
containerClassName,
|
|
@@ -2617,7 +2669,7 @@ var Input = React15.forwardRef(
|
|
|
2617
2669
|
"aria-invalid": ariaInvalid,
|
|
2618
2670
|
...props
|
|
2619
2671
|
}, ref) => {
|
|
2620
|
-
const id =
|
|
2672
|
+
const id = React16.useId();
|
|
2621
2673
|
const helpTextId = `${id}-help-text`;
|
|
2622
2674
|
const errorTextId = `${id}-error-text`;
|
|
2623
2675
|
const errorList = Array.isArray(errorText) && errorText.every((message) => typeof message === "string") ? [...new Set(errorText.filter((message) => !!message))] : null;
|
|
@@ -2626,84 +2678,84 @@ var Input = React15.forwardRef(
|
|
|
2626
2678
|
const hasError = hasErrorText || isMarkedInvalid;
|
|
2627
2679
|
const showHelpText = !!helpText && !hasErrorText;
|
|
2628
2680
|
const describedBy = [ariaDescribedBy, showHelpText && helpTextId, hasErrorText && errorTextId].filter(Boolean).join(" ") || void 0;
|
|
2629
|
-
const errorIcon = /* @__PURE__ */ jsx(TriangleAlert, { className:
|
|
2630
|
-
const errorMessage = errorList && errorList.length > 1 ? /* @__PURE__ */ jsx("ul", { id: errorTextId, role: "alert", className:
|
|
2681
|
+
const errorIcon = /* @__PURE__ */ jsx(TriangleAlert, { className: styles31["input-error-icon"], "aria-hidden": "true" });
|
|
2682
|
+
const errorMessage = errorList && errorList.length > 1 ? /* @__PURE__ */ jsx("ul", { id: errorTextId, role: "alert", className: styles31["input-error-list"], children: errorList.map((message) => /* @__PURE__ */ jsxs("li", { className: styles31["input-error-text"], children: [
|
|
2631
2683
|
errorIcon,
|
|
2632
2684
|
/* @__PURE__ */ jsx("span", { children: message })
|
|
2633
|
-
] }, message)) }) : /* @__PURE__ */ jsxs("p", { id: errorTextId, role: "alert", className:
|
|
2685
|
+
] }, message)) }) : /* @__PURE__ */ jsxs("p", { id: errorTextId, role: "alert", className: styles31["input-error-text"], children: [
|
|
2634
2686
|
errorIcon,
|
|
2635
2687
|
/* @__PURE__ */ jsx("span", { children: errorList ? errorList[0] : errorText })
|
|
2636
2688
|
] });
|
|
2637
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
2689
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles31["input-container"], containerClassName), children: [
|
|
2638
2690
|
/* @__PURE__ */ jsxs(
|
|
2639
2691
|
"div",
|
|
2640
2692
|
{
|
|
2641
2693
|
className: cn(
|
|
2642
|
-
|
|
2643
|
-
hasError &&
|
|
2694
|
+
styles31["input-wrapper"],
|
|
2695
|
+
hasError && styles31["input-wrapper--error"],
|
|
2644
2696
|
className
|
|
2645
2697
|
),
|
|
2646
2698
|
children: [
|
|
2647
|
-
prefix && /* @__PURE__ */ jsx("span", { className:
|
|
2699
|
+
prefix && /* @__PURE__ */ jsx("span", { className: styles31["input-prefix"], children: prefix }),
|
|
2648
2700
|
/* @__PURE__ */ jsx(
|
|
2649
2701
|
"input",
|
|
2650
2702
|
{
|
|
2651
2703
|
type,
|
|
2652
|
-
className:
|
|
2704
|
+
className: styles31["input-element"],
|
|
2653
2705
|
ref,
|
|
2654
2706
|
"aria-invalid": isMarkedInvalid ? ariaInvalid : hasErrorText || void 0,
|
|
2655
2707
|
"aria-describedby": describedBy,
|
|
2656
2708
|
...props
|
|
2657
2709
|
}
|
|
2658
2710
|
),
|
|
2659
|
-
suffix && /* @__PURE__ */ jsx("span", { className:
|
|
2711
|
+
suffix && /* @__PURE__ */ jsx("span", { className: styles31["input-suffix"], children: suffix })
|
|
2660
2712
|
]
|
|
2661
2713
|
}
|
|
2662
2714
|
),
|
|
2663
2715
|
helpText ? hasErrorText && errorMessage : /* @__PURE__ */ jsx(MotionCollapsibleContent, { isOpen: hasErrorText, children: errorMessage }),
|
|
2664
|
-
showHelpText && /* @__PURE__ */ jsx("p", { id: helpTextId, className:
|
|
2716
|
+
showHelpText && /* @__PURE__ */ jsx("p", { id: helpTextId, className: styles31["input-help-text"], children: helpText })
|
|
2665
2717
|
] });
|
|
2666
2718
|
}
|
|
2667
2719
|
);
|
|
2668
2720
|
Input.displayName = "Input";
|
|
2669
2721
|
var Spinner = ({ size = "md", variant = "primary" }) => {
|
|
2670
|
-
return /* @__PURE__ */ jsxs("span", { className:
|
|
2671
|
-
/* @__PURE__ */ jsx("span", { className: cn(
|
|
2672
|
-
/* @__PURE__ */ jsx("span", { className: cn(
|
|
2722
|
+
return /* @__PURE__ */ jsxs("span", { className: styles32["spinner-container"], children: [
|
|
2723
|
+
/* @__PURE__ */ jsx("span", { className: cn(styles32["spinner"], styles32[size], styles32[variant]) }),
|
|
2724
|
+
/* @__PURE__ */ jsx("span", { className: cn(styles32["spinner-background"], styles32[size]) })
|
|
2673
2725
|
] });
|
|
2674
2726
|
};
|
|
2675
2727
|
function LoadingOverlay({ isVisible, message = "Loading..." }) {
|
|
2676
2728
|
if (!isVisible) return null;
|
|
2677
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
2729
|
+
return /* @__PURE__ */ jsx("div", { className: styles33["loading-overlay"], children: /* @__PURE__ */ jsxs("div", { className: styles33["content"], children: [
|
|
2678
2730
|
/* @__PURE__ */ jsx(Spinner, { variant: "primary" }),
|
|
2679
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
2731
|
+
/* @__PURE__ */ jsx("p", { className: styles33["message"], children: message })
|
|
2680
2732
|
] }) });
|
|
2681
2733
|
}
|
|
2682
2734
|
var metricCardElevationVariants = generateElevationVariants(
|
|
2683
|
-
|
|
2735
|
+
styles34,
|
|
2684
2736
|
"metric-card",
|
|
2685
2737
|
ELEVATION.RAISED
|
|
2686
2738
|
);
|
|
2687
2739
|
var VARIANTS = {
|
|
2688
2740
|
default: {
|
|
2689
|
-
text:
|
|
2690
|
-
iconBg:
|
|
2741
|
+
text: styles34["text-default"],
|
|
2742
|
+
iconBg: styles34["bg-default"]
|
|
2691
2743
|
},
|
|
2692
2744
|
primary: {
|
|
2693
|
-
text:
|
|
2694
|
-
iconBg:
|
|
2745
|
+
text: styles34["text-primary"],
|
|
2746
|
+
iconBg: styles34["bg-primary"]
|
|
2695
2747
|
},
|
|
2696
2748
|
danger: {
|
|
2697
|
-
text:
|
|
2698
|
-
iconBg:
|
|
2749
|
+
text: styles34["text-danger"],
|
|
2750
|
+
iconBg: styles34["bg-danger"]
|
|
2699
2751
|
},
|
|
2700
2752
|
success: {
|
|
2701
|
-
text:
|
|
2702
|
-
iconBg:
|
|
2753
|
+
text: styles34["text-success"],
|
|
2754
|
+
iconBg: styles34["bg-success"]
|
|
2703
2755
|
},
|
|
2704
2756
|
warning: {
|
|
2705
|
-
text:
|
|
2706
|
-
iconBg:
|
|
2757
|
+
text: styles34["text-warning"],
|
|
2758
|
+
iconBg: styles34["bg-warning"]
|
|
2707
2759
|
}
|
|
2708
2760
|
};
|
|
2709
2761
|
var MetricCard = ({
|
|
@@ -2716,8 +2768,8 @@ var MetricCard = ({
|
|
|
2716
2768
|
}) => {
|
|
2717
2769
|
const variantStyles = VARIANTS[variant];
|
|
2718
2770
|
return /* @__PURE__ */ jsxs("div", { className: cn(metricCardElevationVariants({ elevation }), className), children: [
|
|
2719
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2720
|
-
/* @__PURE__ */ jsx("p", { className: cn(
|
|
2771
|
+
/* @__PURE__ */ jsxs("div", { className: styles34["value-container"], children: [
|
|
2772
|
+
/* @__PURE__ */ jsx("p", { className: cn(styles34.value), children: value }),
|
|
2721
2773
|
icon && /* @__PURE__ */ jsx(
|
|
2722
2774
|
Icon,
|
|
2723
2775
|
{
|
|
@@ -2728,10 +2780,10 @@ var MetricCard = ({
|
|
|
2728
2780
|
}
|
|
2729
2781
|
)
|
|
2730
2782
|
] }),
|
|
2731
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
2783
|
+
/* @__PURE__ */ jsx("p", { className: styles34.label, children: label })
|
|
2732
2784
|
] });
|
|
2733
2785
|
};
|
|
2734
|
-
var NavDrillContext =
|
|
2786
|
+
var NavDrillContext = React16.createContext(null);
|
|
2735
2787
|
var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
2736
2788
|
var MOTION = {
|
|
2737
2789
|
drill: {
|
|
@@ -2759,13 +2811,13 @@ var MOTION = {
|
|
|
2759
2811
|
};
|
|
2760
2812
|
var TIMING = { duration: 300, easing: "cubic-bezier(.2, .8, .2, 1)" };
|
|
2761
2813
|
var LEVEL = '[data-slot="nav-drill-level"]';
|
|
2762
|
-
var NavDrillBackContext =
|
|
2814
|
+
var NavDrillBackContext = React16.createContext(() => {
|
|
2763
2815
|
});
|
|
2764
2816
|
var LEAVING_DRILL_CONTEXT = { requestDrill: () => {
|
|
2765
2817
|
}, leaving: true };
|
|
2766
2818
|
var NO_BACK = () => {
|
|
2767
2819
|
};
|
|
2768
|
-
var NavDrill =
|
|
2820
|
+
var NavDrill = React16.forwardRef(
|
|
2769
2821
|
({
|
|
2770
2822
|
value: valueProp,
|
|
2771
2823
|
defaultValue,
|
|
@@ -2775,19 +2827,19 @@ var NavDrill = React15.forwardRef(
|
|
|
2775
2827
|
children,
|
|
2776
2828
|
...props
|
|
2777
2829
|
}, ref) => {
|
|
2778
|
-
const [ownView, setOwnView] =
|
|
2830
|
+
const [ownView, setOwnView] = React16.useState(defaultValue);
|
|
2779
2831
|
const view = valueProp ?? ownView;
|
|
2780
|
-
const [shownView, setShownView] =
|
|
2781
|
-
const [request, setRequest] =
|
|
2782
|
-
const [leaving, setLeaving] =
|
|
2783
|
-
const rootRef =
|
|
2784
|
-
const ghostRef =
|
|
2785
|
-
const running =
|
|
2786
|
-
const focusRequest =
|
|
2787
|
-
const observer =
|
|
2788
|
-
const previousView =
|
|
2789
|
-
const level =
|
|
2790
|
-
(child) =>
|
|
2832
|
+
const [shownView, setShownView] = React16.useState(view);
|
|
2833
|
+
const [request, setRequest] = React16.useState(null);
|
|
2834
|
+
const [leaving, setLeaving] = React16.useState(null);
|
|
2835
|
+
const rootRef = React16.useRef(null);
|
|
2836
|
+
const ghostRef = React16.useRef(null);
|
|
2837
|
+
const running = React16.useRef([]);
|
|
2838
|
+
const focusRequest = React16.useRef(null);
|
|
2839
|
+
const observer = React16.useRef(null);
|
|
2840
|
+
const previousView = React16.useRef(view);
|
|
2841
|
+
const level = React16.Children.toArray(children).find(
|
|
2842
|
+
(child) => React16.isValidElement(child) && child.props.value === view
|
|
2791
2843
|
) ?? null;
|
|
2792
2844
|
if (view !== shownView) {
|
|
2793
2845
|
setShownView(view);
|
|
@@ -2837,18 +2889,18 @@ var NavDrill = React15.forwardRef(
|
|
|
2837
2889
|
if (valueProp === void 0) setOwnView(target);
|
|
2838
2890
|
onValueChange?.(target, direction);
|
|
2839
2891
|
};
|
|
2840
|
-
const makeRequestRef =
|
|
2892
|
+
const makeRequestRef = React16.useRef(makeRequest);
|
|
2841
2893
|
useIsomorphicLayoutEffect(() => {
|
|
2842
2894
|
makeRequestRef.current = makeRequest;
|
|
2843
2895
|
});
|
|
2844
|
-
const drillContext =
|
|
2896
|
+
const drillContext = React16.useMemo(
|
|
2845
2897
|
() => ({
|
|
2846
2898
|
requestDrill: (target) => makeRequestRef.current(target, "drill"),
|
|
2847
2899
|
leaving: false
|
|
2848
2900
|
}),
|
|
2849
2901
|
[]
|
|
2850
2902
|
);
|
|
2851
|
-
const requestBack =
|
|
2903
|
+
const requestBack = React16.useCallback(
|
|
2852
2904
|
(parent) => makeRequestRef.current(parent, "back"),
|
|
2853
2905
|
[]
|
|
2854
2906
|
);
|
|
@@ -2887,10 +2939,10 @@ var NavDrill = React15.forwardRef(
|
|
|
2887
2939
|
}
|
|
2888
2940
|
);
|
|
2889
2941
|
}, [leaving]);
|
|
2890
|
-
|
|
2942
|
+
React16.useEffect(() => {
|
|
2891
2943
|
tryFocus();
|
|
2892
2944
|
});
|
|
2893
|
-
|
|
2945
|
+
React16.useEffect(() => {
|
|
2894
2946
|
const dropOutside = (event) => {
|
|
2895
2947
|
if (rootRef.current?.contains(event.target)) return;
|
|
2896
2948
|
focusRequest.current = null;
|
|
@@ -2905,7 +2957,7 @@ var NavDrill = React15.forwardRef(
|
|
|
2905
2957
|
observer.current?.disconnect();
|
|
2906
2958
|
};
|
|
2907
2959
|
}, []);
|
|
2908
|
-
const setRootRef =
|
|
2960
|
+
const setRootRef = React16.useCallback(
|
|
2909
2961
|
(node) => {
|
|
2910
2962
|
rootRef.current = node;
|
|
2911
2963
|
if (typeof ref === "function") ref(node);
|
|
@@ -2913,7 +2965,7 @@ var NavDrill = React15.forwardRef(
|
|
|
2913
2965
|
},
|
|
2914
2966
|
[ref]
|
|
2915
2967
|
);
|
|
2916
|
-
const setGhostRef =
|
|
2968
|
+
const setGhostRef = React16.useCallback((node) => {
|
|
2917
2969
|
ghostRef.current = node;
|
|
2918
2970
|
if (node) node.inert = true;
|
|
2919
2971
|
}, []);
|
|
@@ -2923,10 +2975,10 @@ var NavDrill = React15.forwardRef(
|
|
|
2923
2975
|
ref: setRootRef,
|
|
2924
2976
|
"data-slot": "nav-drill",
|
|
2925
2977
|
"data-motion": leaving?.direction,
|
|
2926
|
-
className: cn(
|
|
2978
|
+
className: cn(styles36["nav-drill"], className),
|
|
2927
2979
|
...props,
|
|
2928
2980
|
children: [
|
|
2929
|
-
/* @__PURE__ */ jsx(NavDrillContext.Provider, { value: drillContext, children: /* @__PURE__ */ jsx(NavDrillBackContext.Provider, { value: requestBack, children: level && /* @__PURE__ */ jsx(
|
|
2981
|
+
/* @__PURE__ */ jsx(NavDrillContext.Provider, { value: drillContext, children: /* @__PURE__ */ jsx(NavDrillBackContext.Provider, { value: requestBack, children: level && /* @__PURE__ */ jsx(React16.Fragment, { children: level }, view) }) }),
|
|
2930
2982
|
leaving && /* @__PURE__ */ jsx(
|
|
2931
2983
|
"div",
|
|
2932
2984
|
{
|
|
@@ -2934,7 +2986,7 @@ var NavDrill = React15.forwardRef(
|
|
|
2934
2986
|
"data-slot": "nav-drill-ghost",
|
|
2935
2987
|
"data-motion": leaving.direction,
|
|
2936
2988
|
"aria-hidden": "true",
|
|
2937
|
-
className:
|
|
2989
|
+
className: styles36["nav-drill-ghost"],
|
|
2938
2990
|
children: /* @__PURE__ */ jsx(NavDrillContext.Provider, { value: LEAVING_DRILL_CONTEXT, children: /* @__PURE__ */ jsx(NavDrillBackContext.Provider, { value: NO_BACK, children: leaving.element }) })
|
|
2939
2991
|
},
|
|
2940
2992
|
leaving.id
|
|
@@ -2945,10 +2997,10 @@ var NavDrill = React15.forwardRef(
|
|
|
2945
2997
|
}
|
|
2946
2998
|
);
|
|
2947
2999
|
NavDrill.displayName = "NavDrill";
|
|
2948
|
-
var NavDrillLevel =
|
|
3000
|
+
var NavDrillLevel = React16.forwardRef(
|
|
2949
3001
|
({ value, parent, label, backLabel, className, children, ...props }, ref) => {
|
|
2950
|
-
const requestBack =
|
|
2951
|
-
|
|
3002
|
+
const requestBack = React16.useContext(NavDrillBackContext);
|
|
3003
|
+
React16.useEffect(() => {
|
|
2952
3004
|
if (typeof process !== "undefined" && process.env.NODE_ENV !== "production" && parent !== void 0 && backLabel && label && !backLabel.startsWith(label)) {
|
|
2953
3005
|
console.warn(
|
|
2954
3006
|
`NavDrillLevel: backLabel "${backLabel}" must start with label "${label}", so voice users can say what they see (WCAG 2.5.3)`
|
|
@@ -2961,7 +3013,7 @@ var NavDrillLevel = React15.forwardRef(
|
|
|
2961
3013
|
ref,
|
|
2962
3014
|
"data-slot": "nav-drill-level",
|
|
2963
3015
|
"data-value": value,
|
|
2964
|
-
className: cn(
|
|
3016
|
+
className: cn(styles36["nav-drill-level"], className),
|
|
2965
3017
|
...props,
|
|
2966
3018
|
children: [
|
|
2967
3019
|
parent !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -2971,15 +3023,15 @@ var NavDrillLevel = React15.forwardRef(
|
|
|
2971
3023
|
type: "button",
|
|
2972
3024
|
"data-slot": "nav-drill-back",
|
|
2973
3025
|
"aria-label": backLabel ?? `${label}, back`,
|
|
2974
|
-
className: cn(
|
|
3026
|
+
className: cn(styles36["nav-list-item"], styles36["nav-list-item--back"]),
|
|
2975
3027
|
onClick: () => requestBack(parent),
|
|
2976
3028
|
children: [
|
|
2977
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2978
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3029
|
+
/* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-prefix"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronLeft, {}) }),
|
|
3030
|
+
/* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-label"], title: label, children: label })
|
|
2979
3031
|
]
|
|
2980
3032
|
}
|
|
2981
3033
|
),
|
|
2982
|
-
/* @__PURE__ */ jsx("hr", { className:
|
|
3034
|
+
/* @__PURE__ */ jsx("hr", { className: styles36["nav-drill-rule"] })
|
|
2983
3035
|
] }),
|
|
2984
3036
|
children
|
|
2985
3037
|
]
|
|
@@ -2988,31 +3040,31 @@ var NavDrillLevel = React15.forwardRef(
|
|
|
2988
3040
|
}
|
|
2989
3041
|
);
|
|
2990
3042
|
NavDrillLevel.displayName = "NavDrillLevel";
|
|
2991
|
-
var ListDepthContext =
|
|
2992
|
-
var NavList =
|
|
3043
|
+
var ListDepthContext = React16.createContext(0);
|
|
3044
|
+
var NavList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles36["nav-list"], className), ...props }));
|
|
2993
3045
|
NavList.displayName = "NavList";
|
|
2994
|
-
var NavListGroup =
|
|
3046
|
+
var NavListGroup = React16.forwardRef(
|
|
2995
3047
|
({ label, className, children, ...props }, ref) => {
|
|
2996
|
-
const labelId =
|
|
2997
|
-
const depth =
|
|
3048
|
+
const labelId = React16.useId();
|
|
3049
|
+
const depth = React16.useContext(ListDepthContext);
|
|
2998
3050
|
const group = /* @__PURE__ */ jsxs(
|
|
2999
3051
|
"div",
|
|
3000
3052
|
{
|
|
3001
3053
|
ref,
|
|
3002
3054
|
className: cn(
|
|
3003
|
-
|
|
3004
|
-
!label &&
|
|
3055
|
+
styles36["nav-list-group"],
|
|
3056
|
+
!label && styles36["nav-list-group--unlabelled"],
|
|
3005
3057
|
className
|
|
3006
3058
|
),
|
|
3007
3059
|
...props,
|
|
3008
3060
|
children: [
|
|
3009
|
-
label && /* @__PURE__ */ jsx("div", { id: labelId, className:
|
|
3061
|
+
label && /* @__PURE__ */ jsx("div", { id: labelId, className: styles36["nav-list-group-label"], children: label }),
|
|
3010
3062
|
/* @__PURE__ */ jsx(
|
|
3011
3063
|
"ul",
|
|
3012
3064
|
{
|
|
3013
3065
|
"data-depth": depth,
|
|
3014
3066
|
"aria-labelledby": label ? labelId : void 0,
|
|
3015
|
-
className:
|
|
3067
|
+
className: styles36["nav-list-items"],
|
|
3016
3068
|
children: /* @__PURE__ */ jsx(ListDepthContext.Provider, { value: depth + 1, children })
|
|
3017
3069
|
}
|
|
3018
3070
|
)
|
|
@@ -3023,7 +3075,7 @@ var NavListGroup = React15.forwardRef(
|
|
|
3023
3075
|
}
|
|
3024
3076
|
);
|
|
3025
3077
|
NavListGroup.displayName = "NavListGroup";
|
|
3026
|
-
var NavListItem =
|
|
3078
|
+
var NavListItem = React16.forwardRef(
|
|
3027
3079
|
({
|
|
3028
3080
|
label,
|
|
3029
3081
|
prefix,
|
|
@@ -3036,7 +3088,7 @@ var NavListItem = React15.forwardRef(
|
|
|
3036
3088
|
onClick,
|
|
3037
3089
|
...props
|
|
3038
3090
|
}, ref) => {
|
|
3039
|
-
const drillContext =
|
|
3091
|
+
const drillContext = React16.useContext(NavDrillContext);
|
|
3040
3092
|
const Comp = asChild ? Slot : props.href ? "a" : "button";
|
|
3041
3093
|
const leaving = drillContext?.leaving ?? false;
|
|
3042
3094
|
const handleClick = (event) => {
|
|
@@ -3055,49 +3107,49 @@ var NavListItem = React15.forwardRef(
|
|
|
3055
3107
|
"data-drill": drill,
|
|
3056
3108
|
"aria-current": current && !leaving ? "page" : void 0,
|
|
3057
3109
|
"data-current": current && leaving ? "page" : void 0,
|
|
3058
|
-
className: cn(
|
|
3110
|
+
className: cn(styles36["nav-list-item"], className),
|
|
3059
3111
|
onClick: handleClick,
|
|
3060
3112
|
...props,
|
|
3061
3113
|
children: [
|
|
3062
|
-
prefix && /* @__PURE__ */ jsx("span", { className:
|
|
3063
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3114
|
+
prefix && /* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-prefix"], "aria-hidden": "true", children: prefix }),
|
|
3115
|
+
/* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-label"], title: label, children: label }),
|
|
3064
3116
|
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
3065
|
-
suffix && /* @__PURE__ */ jsx("span", { className:
|
|
3066
|
-
drill && /* @__PURE__ */ jsx("span", { className:
|
|
3117
|
+
suffix && /* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-suffix"], children: suffix }),
|
|
3118
|
+
drill && /* @__PURE__ */ jsx("span", { className: styles36["nav-list-item-caret"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronRight, {}) })
|
|
3067
3119
|
]
|
|
3068
3120
|
}
|
|
3069
3121
|
) });
|
|
3070
3122
|
}
|
|
3071
3123
|
);
|
|
3072
3124
|
NavListItem.displayName = "NavListItem";
|
|
3073
|
-
var NavListSeparator =
|
|
3125
|
+
var NavListSeparator = React16.forwardRef(
|
|
3074
3126
|
({ className, ...props }, ref) => {
|
|
3075
|
-
const nested =
|
|
3127
|
+
const nested = React16.useContext(ListDepthContext) > 0;
|
|
3076
3128
|
const Comp = nested ? "li" : "hr";
|
|
3077
3129
|
return /* @__PURE__ */ jsx(
|
|
3078
3130
|
Comp,
|
|
3079
3131
|
{
|
|
3080
3132
|
ref,
|
|
3081
3133
|
role: nested ? "separator" : void 0,
|
|
3082
|
-
className: cn(
|
|
3134
|
+
className: cn(styles36["nav-list-separator"], className),
|
|
3083
3135
|
...props
|
|
3084
3136
|
}
|
|
3085
3137
|
);
|
|
3086
3138
|
}
|
|
3087
3139
|
);
|
|
3088
3140
|
NavListSeparator.displayName = "NavListSeparator";
|
|
3089
|
-
var NavPanel =
|
|
3090
|
-
({ header, className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(
|
|
3091
|
-
header && /* @__PURE__ */ jsx("div", { className:
|
|
3141
|
+
var NavPanel = React16.forwardRef(
|
|
3142
|
+
({ header, className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(styles41["nav-panel"], className), ...props, children: /* @__PURE__ */ jsxs("div", { className: styles41["nav-scroller"], "data-nav-scroller": "", children: [
|
|
3143
|
+
header && /* @__PURE__ */ jsx("div", { className: styles41["nav-panel-header"], children: header }),
|
|
3092
3144
|
children
|
|
3093
3145
|
] }) })
|
|
3094
3146
|
);
|
|
3095
3147
|
NavPanel.displayName = "NavPanel";
|
|
3096
|
-
var NavRail =
|
|
3097
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(
|
|
3148
|
+
var NavRail = React16.forwardRef(
|
|
3149
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, className: cn(styles41["nav-rail"], className), ...props, children: /* @__PURE__ */ jsx("div", { className: styles41["nav-scroller"], children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsx("ul", { className: styles41["nav-rail-list"], children }) }) }) })
|
|
3098
3150
|
);
|
|
3099
3151
|
NavRail.displayName = "NavRail";
|
|
3100
|
-
var NavRailItem =
|
|
3152
|
+
var NavRailItem = React16.forwardRef(
|
|
3101
3153
|
({ icon, label, current = false, asChild = false, className, children, ...props }, ref) => {
|
|
3102
3154
|
const Comp = asChild ? Slot : "a";
|
|
3103
3155
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
@@ -3107,7 +3159,7 @@ var NavRailItem = React15.forwardRef(
|
|
|
3107
3159
|
ref,
|
|
3108
3160
|
"aria-label": label,
|
|
3109
3161
|
"aria-current": current ? "page" : void 0,
|
|
3110
|
-
className: cn(
|
|
3162
|
+
className: cn(styles41["nav-rail-item"], className),
|
|
3111
3163
|
...props,
|
|
3112
3164
|
children: [
|
|
3113
3165
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: icon }),
|
|
@@ -3127,8 +3179,8 @@ var SEARCH_INPUT_SELECTOR2 = "[data-select-search]";
|
|
|
3127
3179
|
var NAVIGABLE_OPTION_SELECTOR = '[role="option"]:not([data-disabled]):not([hidden])';
|
|
3128
3180
|
var MATCHING_OPTION_SELECTOR = `${NAVIGABLE_OPTION_SELECTOR}:not([data-persistent])`;
|
|
3129
3181
|
var RADIX_HANDLED_SEARCH_KEYS = ["ArrowDown", "ArrowUp", "Escape", "Tab"];
|
|
3130
|
-
var SelectSearchContext =
|
|
3131
|
-
var useSelectSearch = () =>
|
|
3182
|
+
var SelectSearchContext = React16.createContext(null);
|
|
3183
|
+
var useSelectSearch = () => React16.useContext(SelectSearchContext);
|
|
3132
3184
|
var useIsSearching2 = () => isSearchActive(useSelectSearch());
|
|
3133
3185
|
var useSelectSearchQuery = () => {
|
|
3134
3186
|
const ctx = useSelectSearch();
|
|
@@ -3137,7 +3189,7 @@ var useSelectSearchQuery = () => {
|
|
|
3137
3189
|
}
|
|
3138
3190
|
return useSearchQuery(ctx);
|
|
3139
3191
|
};
|
|
3140
|
-
var SelectGroupMatchContext =
|
|
3192
|
+
var SelectGroupMatchContext = React16.createContext(null);
|
|
3141
3193
|
var Select = ({
|
|
3142
3194
|
open,
|
|
3143
3195
|
onOpenChange,
|
|
@@ -3145,7 +3197,7 @@ var Select = ({
|
|
|
3145
3197
|
}) => {
|
|
3146
3198
|
const search = useListSearchState(open);
|
|
3147
3199
|
const { resetForOpen } = search;
|
|
3148
|
-
const handleOpenChange =
|
|
3200
|
+
const handleOpenChange = React16.useCallback(
|
|
3149
3201
|
(nextOpen) => {
|
|
3150
3202
|
if (nextOpen) resetForOpen();
|
|
3151
3203
|
onOpenChange?.(nextOpen);
|
|
@@ -3155,7 +3207,7 @@ var Select = ({
|
|
|
3155
3207
|
return /* @__PURE__ */ jsx(SelectSearchContext.Provider, { value: search, children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
|
|
3156
3208
|
};
|
|
3157
3209
|
Select.displayName = "Select";
|
|
3158
|
-
var SelectGroup =
|
|
3210
|
+
var SelectGroup = React16.forwardRef(({ hidden, ...props }, ref) => {
|
|
3159
3211
|
const searching = useIsSearching2();
|
|
3160
3212
|
const registry = useMatchRegistry();
|
|
3161
3213
|
return /* @__PURE__ */ jsx(SelectGroupMatchContext.Provider, { value: registry, children: /* @__PURE__ */ jsx(
|
|
@@ -3169,18 +3221,18 @@ var SelectGroup = React15.forwardRef(({ hidden, ...props }, ref) => {
|
|
|
3169
3221
|
});
|
|
3170
3222
|
SelectGroup.displayName = SelectPrimitive.Group.displayName;
|
|
3171
3223
|
var SelectValue = SelectPrimitive.Value;
|
|
3172
|
-
var SelectTrigger =
|
|
3224
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn(styles39["select-trigger"], className), ...props, children: [
|
|
3173
3225
|
children,
|
|
3174
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(
|
|
3226
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(styles39["select-icon"], styles39["select-icon--low-opacity"]) }) })
|
|
3175
3227
|
] }));
|
|
3176
3228
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
3177
3229
|
var SelectPortal = ({ children }) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container: usePortalContainer(), children });
|
|
3178
3230
|
var selectContentElevationVariants = generateElevationVariants(
|
|
3179
|
-
|
|
3231
|
+
styles39,
|
|
3180
3232
|
"select-content",
|
|
3181
3233
|
ELEVATION.OVERLAY
|
|
3182
3234
|
);
|
|
3183
|
-
var SelectContent =
|
|
3235
|
+
var SelectContent = React16.forwardRef(
|
|
3184
3236
|
({
|
|
3185
3237
|
className,
|
|
3186
3238
|
children,
|
|
@@ -3198,13 +3250,13 @@ var SelectContent = React15.forwardRef(
|
|
|
3198
3250
|
const setListId = ctx?.setListId;
|
|
3199
3251
|
const searching = isSearchActive(ctx);
|
|
3200
3252
|
const resultCount = ctx?.matchCount ?? 0;
|
|
3201
|
-
const contentRef =
|
|
3253
|
+
const contentRef = React16.useRef(null);
|
|
3202
3254
|
const sideProps = useSearchSideLock(ctx, contentRef, {
|
|
3203
3255
|
side,
|
|
3204
3256
|
avoidCollisions,
|
|
3205
3257
|
enabled: position === "popper"
|
|
3206
3258
|
});
|
|
3207
|
-
const composedContentRef =
|
|
3259
|
+
const composedContentRef = React16.useCallback(
|
|
3208
3260
|
(node) => {
|
|
3209
3261
|
assignRefs(node, ref, contentRef);
|
|
3210
3262
|
setListId?.(node?.id || void 0);
|
|
@@ -3229,8 +3281,8 @@ var SelectContent = React15.forwardRef(
|
|
|
3229
3281
|
{
|
|
3230
3282
|
ref: composedContentRef,
|
|
3231
3283
|
className: cn(
|
|
3232
|
-
|
|
3233
|
-
position === "popper" &&
|
|
3284
|
+
styles39["select-content"],
|
|
3285
|
+
position === "popper" && styles39["select-content--popper"],
|
|
3234
3286
|
selectContentElevationVariants({ elevation }),
|
|
3235
3287
|
className
|
|
3236
3288
|
),
|
|
@@ -3248,13 +3300,13 @@ var SelectContent = React15.forwardRef(
|
|
|
3248
3300
|
},
|
|
3249
3301
|
...props,
|
|
3250
3302
|
children: [
|
|
3251
|
-
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className:
|
|
3303
|
+
ctx?.enabled ? /* @__PURE__ */ jsx("div", { className: styles39["select-sr-status"], role: "status", "aria-live": "polite", children: searching && resultCount > 0 ? formatResultCount(resultCount) : null }) : null,
|
|
3252
3304
|
/* @__PURE__ */ jsx(
|
|
3253
3305
|
SelectPrimitive.Viewport,
|
|
3254
3306
|
{
|
|
3255
3307
|
className: cn(
|
|
3256
|
-
|
|
3257
|
-
position === "popper" &&
|
|
3308
|
+
styles39["select-viewport"],
|
|
3309
|
+
position === "popper" && styles39["select-viewport--popper"]
|
|
3258
3310
|
),
|
|
3259
3311
|
children
|
|
3260
3312
|
}
|
|
@@ -3265,7 +3317,7 @@ var SelectContent = React15.forwardRef(
|
|
|
3265
3317
|
}
|
|
3266
3318
|
);
|
|
3267
3319
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3268
|
-
var SelectSearch =
|
|
3320
|
+
var SelectSearch = React16.forwardRef(
|
|
3269
3321
|
({
|
|
3270
3322
|
className,
|
|
3271
3323
|
placeholder = "Search...",
|
|
@@ -3281,15 +3333,15 @@ var SelectSearch = React15.forwardRef(
|
|
|
3281
3333
|
}
|
|
3282
3334
|
const { ref, isRendered } = useSearchInput(ctx, alwaysVisible, forwardedRef);
|
|
3283
3335
|
if (!isRendered) return null;
|
|
3284
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
3285
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className:
|
|
3336
|
+
return /* @__PURE__ */ jsxs("div", { className: styles39["select-search"], children: [
|
|
3337
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: styles39["select-search-icon"], children: icon ?? /* @__PURE__ */ jsx(SearchIcon3, { className: cn(styles39["select-icon"], styles39["select-icon--sm"]) }) }),
|
|
3286
3338
|
/* @__PURE__ */ jsx(
|
|
3287
3339
|
"input",
|
|
3288
3340
|
{
|
|
3289
3341
|
...props,
|
|
3290
3342
|
ref,
|
|
3291
3343
|
"data-select-search": "",
|
|
3292
|
-
className: cn(
|
|
3344
|
+
className: cn(styles39["select-search-input"], className),
|
|
3293
3345
|
value: ctx.query,
|
|
3294
3346
|
placeholder,
|
|
3295
3347
|
"aria-label": ariaLabel ?? placeholder,
|
|
@@ -3326,54 +3378,54 @@ var SelectEmpty = ({ className, children, ...props }) => {
|
|
|
3326
3378
|
...props,
|
|
3327
3379
|
role: "status",
|
|
3328
3380
|
"aria-live": "polite",
|
|
3329
|
-
className: isEmpty ? cn(
|
|
3381
|
+
className: isEmpty ? cn(styles39["select-empty"], className) : void 0,
|
|
3330
3382
|
children: isEmpty ? children : null
|
|
3331
3383
|
}
|
|
3332
3384
|
);
|
|
3333
3385
|
};
|
|
3334
3386
|
SelectEmpty.displayName = "SelectEmpty";
|
|
3335
|
-
var SelectLabel =
|
|
3387
|
+
var SelectLabel = React16.forwardRef(({ className, hidden, ...props }, ref) => {
|
|
3336
3388
|
const searching = useIsSearching2();
|
|
3337
3389
|
return /* @__PURE__ */ jsx(
|
|
3338
3390
|
SelectPrimitive.Label,
|
|
3339
3391
|
{
|
|
3340
3392
|
ref,
|
|
3341
|
-
className: cn(
|
|
3393
|
+
className: cn(styles39["select-label"], className),
|
|
3342
3394
|
...props,
|
|
3343
3395
|
hidden: hidden || searching || void 0
|
|
3344
3396
|
}
|
|
3345
3397
|
);
|
|
3346
3398
|
});
|
|
3347
3399
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3348
|
-
var SelectItem =
|
|
3400
|
+
var SelectItem = React16.forwardRef(({ className, children, textValue, hidden, persistent, ...props }, ref) => {
|
|
3349
3401
|
const search = useSelectSearch();
|
|
3350
|
-
const group =
|
|
3402
|
+
const group = React16.useContext(SelectGroupMatchContext);
|
|
3351
3403
|
const matches = useFilterableItem(search, textValue, children, { group, persistent });
|
|
3352
3404
|
return /* @__PURE__ */ jsxs(
|
|
3353
3405
|
SelectPrimitive.Item,
|
|
3354
3406
|
{
|
|
3355
3407
|
ref,
|
|
3356
|
-
className: cn(
|
|
3408
|
+
className: cn(styles39["select-item"], className),
|
|
3357
3409
|
...props,
|
|
3358
3410
|
"data-persistent": persistent ? "" : void 0,
|
|
3359
3411
|
textValue,
|
|
3360
3412
|
hidden: hidden || !matches || void 0,
|
|
3361
3413
|
children: [
|
|
3362
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3363
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3414
|
+
/* @__PURE__ */ jsx("span", { className: styles39["select-item-indicator"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon3, { className: styles39["select-icon"] }) }) }),
|
|
3415
|
+
/* @__PURE__ */ jsx("span", { className: styles39["select-item-text"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }) })
|
|
3364
3416
|
]
|
|
3365
3417
|
}
|
|
3366
3418
|
);
|
|
3367
3419
|
});
|
|
3368
3420
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3369
|
-
var SelectSeparator =
|
|
3421
|
+
var SelectSeparator = React16.forwardRef(({ className, persistent, ...props }, ref) => {
|
|
3370
3422
|
const searching = useIsSearching2();
|
|
3371
3423
|
if (searching && !persistent) return null;
|
|
3372
3424
|
return /* @__PURE__ */ jsx(
|
|
3373
3425
|
SelectPrimitive.Separator,
|
|
3374
3426
|
{
|
|
3375
3427
|
ref,
|
|
3376
|
-
className: cn(
|
|
3428
|
+
className: cn(styles39["select-separator"], className),
|
|
3377
3429
|
...props
|
|
3378
3430
|
}
|
|
3379
3431
|
);
|
|
@@ -3386,9 +3438,9 @@ var blockClosedTypeahead = (event) => {
|
|
|
3386
3438
|
if (typed && !event.ctrlKey && !event.metaKey && !event.altKey) event.preventDefault();
|
|
3387
3439
|
};
|
|
3388
3440
|
function Skeleton({ className, ...props }) {
|
|
3389
|
-
return /* @__PURE__ */ jsx("div", { className: cn(
|
|
3441
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles40["skeleton"], className), ...props });
|
|
3390
3442
|
}
|
|
3391
|
-
var NavSwitcherSelect =
|
|
3443
|
+
var NavSwitcherSelect = React16.forwardRef(
|
|
3392
3444
|
({
|
|
3393
3445
|
label,
|
|
3394
3446
|
noun,
|
|
@@ -3403,35 +3455,36 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3403
3455
|
retrying,
|
|
3404
3456
|
onRetry
|
|
3405
3457
|
}, ref) => {
|
|
3406
|
-
const labelId =
|
|
3407
|
-
const actionValue =
|
|
3408
|
-
const retryValue =
|
|
3409
|
-
const errorId =
|
|
3410
|
-
const actionPending =
|
|
3411
|
-
const [open, setOpen] =
|
|
3412
|
-
const keepOpen =
|
|
3413
|
-
const [announcement, setAnnouncement] =
|
|
3414
|
-
const [listState, setListState] =
|
|
3458
|
+
const labelId = React16.useId();
|
|
3459
|
+
const actionValue = React16.useId();
|
|
3460
|
+
const retryValue = React16.useId();
|
|
3461
|
+
const errorId = React16.useId();
|
|
3462
|
+
const actionPending = React16.useRef(false);
|
|
3463
|
+
const [open, setOpen] = React16.useState(false);
|
|
3464
|
+
const keepOpen = React16.useRef(false);
|
|
3465
|
+
const [announcement, setAnnouncement] = React16.useState("");
|
|
3466
|
+
const [listState, setListState] = React16.useState({ error, retrying });
|
|
3467
|
+
const errorMessage = options.length > 0 ? `Some ${collection} couldn't be loaded.` : `Couldn't load ${collection}.`;
|
|
3415
3468
|
if (listState.error !== error || listState.retrying !== retrying) {
|
|
3416
3469
|
setListState({ error, retrying });
|
|
3417
3470
|
if (error || listState.error) {
|
|
3418
3471
|
setAnnouncement(
|
|
3419
|
-
error ? retrying ? "Retrying..." :
|
|
3472
|
+
error ? retrying ? "Retrying..." : errorMessage : options.length > 0 ? `Loaded ${collection}.` : `No ${collection} found.`
|
|
3420
3473
|
);
|
|
3421
3474
|
}
|
|
3422
3475
|
}
|
|
3423
3476
|
const empty = options.length === 0 && !action && !error;
|
|
3424
3477
|
if (empty && !open) {
|
|
3425
|
-
return /* @__PURE__ */ jsx("h2", { className:
|
|
3478
|
+
return /* @__PURE__ */ jsx("h2", { className: styles41["nav-switcher-heading"], children: /* @__PURE__ */ jsx(
|
|
3426
3479
|
"span",
|
|
3427
3480
|
{
|
|
3428
|
-
className: cn(
|
|
3481
|
+
className: cn(styles41["nav-switcher-plain"], styles41["nav-switcher-name"]),
|
|
3429
3482
|
title: label,
|
|
3430
3483
|
children: label
|
|
3431
3484
|
}
|
|
3432
3485
|
) });
|
|
3433
3486
|
}
|
|
3434
|
-
return /* @__PURE__ */ jsx("h2", { "aria-labelledby": labelId, className:
|
|
3487
|
+
return /* @__PURE__ */ jsx("h2", { "aria-labelledby": labelId, className: styles41["nav-switcher-heading"], children: /* @__PURE__ */ jsxs(
|
|
3435
3488
|
Select,
|
|
3436
3489
|
{
|
|
3437
3490
|
value,
|
|
@@ -3460,33 +3513,33 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3460
3513
|
{
|
|
3461
3514
|
ref,
|
|
3462
3515
|
"aria-label": `${label}, switch ${noun}`,
|
|
3463
|
-
className:
|
|
3516
|
+
className: styles41["nav-switcher"],
|
|
3464
3517
|
onKeyDown: blockClosedTypeahead,
|
|
3465
3518
|
children: [
|
|
3466
3519
|
/* @__PURE__ */ jsx(
|
|
3467
3520
|
"span",
|
|
3468
3521
|
{
|
|
3469
3522
|
id: labelId,
|
|
3470
|
-
className: cn(
|
|
3523
|
+
className: cn(styles41["nav-switcher-label"], styles41["nav-switcher-name"]),
|
|
3471
3524
|
title: label,
|
|
3472
3525
|
children: label
|
|
3473
3526
|
}
|
|
3474
3527
|
),
|
|
3475
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className:
|
|
3528
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: styles41["nav-switcher-icon"], "aria-hidden": "true" })
|
|
3476
3529
|
]
|
|
3477
3530
|
}
|
|
3478
3531
|
),
|
|
3479
3532
|
/* @__PURE__ */ jsxs(
|
|
3480
3533
|
SelectContent,
|
|
3481
3534
|
{
|
|
3482
|
-
className:
|
|
3535
|
+
className: styles41["nav-switcher-list"],
|
|
3483
3536
|
onCloseAutoFocus: () => {
|
|
3484
3537
|
if (!actionPending.current) return;
|
|
3485
3538
|
actionPending.current = false;
|
|
3486
3539
|
action?.onSelect();
|
|
3487
3540
|
},
|
|
3488
3541
|
children: [
|
|
3489
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3542
|
+
/* @__PURE__ */ jsx("div", { className: styles41["nav-switcher-status"], role: "status", "aria-live": "polite", children: announcement }),
|
|
3490
3543
|
/* @__PURE__ */ jsx(
|
|
3491
3544
|
SelectSearch,
|
|
3492
3545
|
{
|
|
@@ -3499,31 +3552,29 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3499
3552
|
SelectItem,
|
|
3500
3553
|
{
|
|
3501
3554
|
value: retryValue,
|
|
3502
|
-
textValue:
|
|
3555
|
+
textValue: `${errorMessage} ${retrying ? "Retrying" : "Retry"}`,
|
|
3503
3556
|
persistent: true,
|
|
3504
3557
|
"aria-disabled": retrying || void 0,
|
|
3505
|
-
className:
|
|
3506
|
-
children: /* @__PURE__ */ jsxs("span", { className:
|
|
3507
|
-
/* @__PURE__ */ jsxs("span", { id: errorId, className:
|
|
3558
|
+
className: styles41["nav-switcher-retry"],
|
|
3559
|
+
children: /* @__PURE__ */ jsxs("span", { className: styles41["nav-switcher-error"], children: [
|
|
3560
|
+
/* @__PURE__ */ jsxs("span", { id: errorId, className: styles41["nav-switcher-error-message"], children: [
|
|
3508
3561
|
/* @__PURE__ */ jsx(
|
|
3509
3562
|
TriangleAlert,
|
|
3510
3563
|
{
|
|
3511
|
-
className:
|
|
3564
|
+
className: styles41["nav-switcher-error-icon"],
|
|
3512
3565
|
"aria-hidden": "true"
|
|
3513
3566
|
}
|
|
3514
3567
|
),
|
|
3515
|
-
|
|
3516
|
-
collection,
|
|
3517
|
-
"."
|
|
3568
|
+
errorMessage
|
|
3518
3569
|
] }),
|
|
3519
|
-
retrying ? /* @__PURE__ */ jsxs("span", { className:
|
|
3570
|
+
retrying ? /* @__PURE__ */ jsxs("span", { className: styles41["nav-switcher-error-message"], children: [
|
|
3520
3571
|
/* @__PURE__ */ jsx(Spinner, { size: "xs", variant: "neutral" }),
|
|
3521
3572
|
"Retrying..."
|
|
3522
3573
|
] }) : /* @__PURE__ */ jsx("span", { className: buttonVariants({ variant: "link", size: "sm" }), children: "Retry" })
|
|
3523
3574
|
] })
|
|
3524
3575
|
}
|
|
3525
3576
|
),
|
|
3526
|
-
empty ? /* @__PURE__ */ jsxs("div", { className:
|
|
3577
|
+
empty ? /* @__PURE__ */ jsxs("div", { className: styles41["nav-switcher-empty"], children: [
|
|
3527
3578
|
"No ",
|
|
3528
3579
|
collection,
|
|
3529
3580
|
" found"
|
|
@@ -3541,11 +3592,11 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3541
3592
|
onPointerLeave: onHighlightEnd,
|
|
3542
3593
|
onFocus: () => onHighlight?.(option.value),
|
|
3543
3594
|
onBlur: onHighlightEnd,
|
|
3544
|
-
children: /* @__PURE__ */ jsx("span", { className:
|
|
3595
|
+
children: /* @__PURE__ */ jsx("span", { className: styles41["nav-switcher-option"], title: option.label, children: option.label })
|
|
3545
3596
|
},
|
|
3546
3597
|
option.value
|
|
3547
3598
|
)),
|
|
3548
|
-
action && /* @__PURE__ */ jsxs("div", { className:
|
|
3599
|
+
action && /* @__PURE__ */ jsxs("div", { className: styles41["nav-switcher-footer"], children: [
|
|
3549
3600
|
/* @__PURE__ */ jsx(SelectSeparator, { persistent: true }),
|
|
3550
3601
|
/* @__PURE__ */ jsx(
|
|
3551
3602
|
SelectItem,
|
|
@@ -3553,7 +3604,7 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3553
3604
|
value: actionValue,
|
|
3554
3605
|
textValue: action.label,
|
|
3555
3606
|
persistent: true,
|
|
3556
|
-
className:
|
|
3607
|
+
className: styles41["nav-switcher-action"],
|
|
3557
3608
|
children: /* @__PURE__ */ jsx("span", { className: buttonVariants({ variant: "link", size: "sm" }), children: action.label })
|
|
3558
3609
|
}
|
|
3559
3610
|
)
|
|
@@ -3567,15 +3618,15 @@ var NavSwitcherSelect = React15.forwardRef(
|
|
|
3567
3618
|
}
|
|
3568
3619
|
);
|
|
3569
3620
|
NavSwitcherSelect.displayName = "NavSwitcherSelect";
|
|
3570
|
-
var NavSwitcher =
|
|
3621
|
+
var NavSwitcher = React16.forwardRef(
|
|
3571
3622
|
(props, ref) => props.loading ? /* @__PURE__ */ jsxs(
|
|
3572
3623
|
"div",
|
|
3573
3624
|
{
|
|
3574
|
-
className: cn(
|
|
3625
|
+
className: cn(styles41["nav-switcher-heading"], styles41["nav-switcher-placeholder"]),
|
|
3575
3626
|
"aria-busy": "true",
|
|
3576
3627
|
children: [
|
|
3577
|
-
/* @__PURE__ */ jsx(Skeleton, { className:
|
|
3578
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3628
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles41["nav-switcher-skeleton"] }),
|
|
3629
|
+
/* @__PURE__ */ jsx("span", { className: styles41["nav-switcher-loading-label"], children: "Loading" })
|
|
3579
3630
|
]
|
|
3580
3631
|
}
|
|
3581
3632
|
) : /* @__PURE__ */ jsx(NavSwitcherSelect, { ref, ...props })
|
|
@@ -3590,12 +3641,12 @@ var NotFound = ({
|
|
|
3590
3641
|
showHomeButton = true,
|
|
3591
3642
|
onHomeClick = () => window.location.href = "/"
|
|
3592
3643
|
}) => {
|
|
3593
|
-
return /* @__PURE__ */ jsx("div", { className: cn(
|
|
3594
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3595
|
-
/* @__PURE__ */ jsx("h1", { className:
|
|
3596
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
3597
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3598
|
-
/* @__PURE__ */ jsx(HomeIcon, { className:
|
|
3644
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles42["page-not-found"], className), children: /* @__PURE__ */ jsxs("div", { className: styles42["page-not-found-inner"], children: [
|
|
3645
|
+
/* @__PURE__ */ jsx("div", { className: styles42["icon-container"], children: /* @__PURE__ */ jsx(OctagonAlert, { className: styles42["alert-icon"] }) }),
|
|
3646
|
+
/* @__PURE__ */ jsx("h1", { className: styles42["title"], children: title }),
|
|
3647
|
+
/* @__PURE__ */ jsx("p", { className: styles42["description"], children: description }),
|
|
3648
|
+
/* @__PURE__ */ jsx("div", { className: styles42["actions"], children: showHomeButton && /* @__PURE__ */ jsxs(Button, { onClick: onHomeClick, variant: "secondary", children: [
|
|
3649
|
+
/* @__PURE__ */ jsx(HomeIcon, { className: styles42["home-icon"] }),
|
|
3599
3650
|
"Return Home"
|
|
3600
3651
|
] }) })
|
|
3601
3652
|
] }) });
|
|
@@ -3694,8 +3745,8 @@ var Pagination = ({
|
|
|
3694
3745
|
}
|
|
3695
3746
|
return pageButtons;
|
|
3696
3747
|
};
|
|
3697
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
3698
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3748
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles43["pagination"], className), children: [
|
|
3749
|
+
/* @__PURE__ */ jsx("div", { className: styles43["info-container"], children: showInfo && hasFilteredItems && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3699
3750
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
3700
3751
|
"Showing ",
|
|
3701
3752
|
startItem,
|
|
@@ -3705,7 +3756,7 @@ var Pagination = ({
|
|
|
3705
3756
|
/* @__PURE__ */ jsx(
|
|
3706
3757
|
SelectTrigger,
|
|
3707
3758
|
{
|
|
3708
|
-
className:
|
|
3759
|
+
className: styles43["items-per-page-trigger"],
|
|
3709
3760
|
"aria-label": "Items per page",
|
|
3710
3761
|
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
3711
3762
|
}
|
|
@@ -3719,7 +3770,7 @@ var Pagination = ({
|
|
|
3719
3770
|
type
|
|
3720
3771
|
] })
|
|
3721
3772
|
] }) }),
|
|
3722
|
-
/* @__PURE__ */ jsxs("nav", { className:
|
|
3773
|
+
/* @__PURE__ */ jsxs("nav", { className: styles43["page-navigation-container"], "aria-label": "Pagination", children: [
|
|
3723
3774
|
showFirstLastButtons && /* @__PURE__ */ jsx(
|
|
3724
3775
|
Button,
|
|
3725
3776
|
{
|
|
@@ -3769,13 +3820,13 @@ var Pagination = ({
|
|
|
3769
3820
|
] });
|
|
3770
3821
|
};
|
|
3771
3822
|
var PanelLabel = ({ className, label }) => {
|
|
3772
|
-
return /* @__PURE__ */ jsx("div", { className: cn(
|
|
3823
|
+
return /* @__PURE__ */ jsx("div", { className: cn(styles44["panel-label"], className), children: label });
|
|
3773
3824
|
};
|
|
3774
|
-
var Progress =
|
|
3775
|
-
({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(
|
|
3825
|
+
var Progress = React16.forwardRef(
|
|
3826
|
+
({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(styles45["progress"], className), ...props, children: /* @__PURE__ */ jsx(
|
|
3776
3827
|
ProgressPrimitive.Indicator,
|
|
3777
3828
|
{
|
|
3778
|
-
className: cn(
|
|
3829
|
+
className: cn(styles45["progress-indicator"], styles45[color]),
|
|
3779
3830
|
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
3780
3831
|
}
|
|
3781
3832
|
) })
|
|
@@ -3797,29 +3848,29 @@ var STATUS_LABELS = {
|
|
|
3797
3848
|
info: "Information",
|
|
3798
3849
|
danger: "Error"
|
|
3799
3850
|
};
|
|
3800
|
-
var layoutVariants = cva(
|
|
3851
|
+
var layoutVariants = cva(styles46["progress-indicator"], {
|
|
3801
3852
|
variants: {
|
|
3802
3853
|
layout: {
|
|
3803
|
-
horizontal:
|
|
3804
|
-
vertical:
|
|
3854
|
+
horizontal: styles46["progress-indicator--horizontal"],
|
|
3855
|
+
vertical: styles46["progress-indicator--vertical"]
|
|
3805
3856
|
}
|
|
3806
3857
|
},
|
|
3807
3858
|
defaultVariants: {
|
|
3808
3859
|
layout: "horizontal"
|
|
3809
3860
|
}
|
|
3810
3861
|
});
|
|
3811
|
-
var markerVariants = cva(
|
|
3862
|
+
var markerVariants = cva(styles46["progress-indicator-step-marker"], {
|
|
3812
3863
|
variants: {
|
|
3813
3864
|
status: {
|
|
3814
3865
|
editing: "",
|
|
3815
3866
|
empty: "",
|
|
3816
3867
|
neutral: "",
|
|
3817
3868
|
info: "",
|
|
3818
|
-
success:
|
|
3819
|
-
danger:
|
|
3869
|
+
success: styles46["progress-indicator-step-marker--success"],
|
|
3870
|
+
danger: styles46["progress-indicator-step-marker--danger"]
|
|
3820
3871
|
},
|
|
3821
3872
|
active: {
|
|
3822
|
-
true:
|
|
3873
|
+
true: styles46["progress-indicator-step-marker--active"],
|
|
3823
3874
|
false: ""
|
|
3824
3875
|
}
|
|
3825
3876
|
},
|
|
@@ -3837,41 +3888,41 @@ function ProgressIndicator({
|
|
|
3837
3888
|
"aria-label": ariaLabel = "Progress",
|
|
3838
3889
|
...props
|
|
3839
3890
|
}) {
|
|
3840
|
-
const stepChildren =
|
|
3891
|
+
const stepChildren = React16.Children.toArray(children);
|
|
3841
3892
|
const stepCount = stepChildren.length;
|
|
3842
3893
|
const hasActive = currentIndex >= 0 && currentIndex < stepCount;
|
|
3843
3894
|
const segmentSize = stepCount > 0 ? 100 / stepCount : 0;
|
|
3844
3895
|
const isLastStep = currentIndex === stepCount - 1;
|
|
3845
3896
|
const fillSize = hasActive ? isLastStep ? 100 : (currentIndex + 0.5) * segmentSize : 0;
|
|
3846
3897
|
const steps = stepChildren.map((child, index) => {
|
|
3847
|
-
if (!
|
|
3898
|
+
if (!React16.isValidElement(child) || child.type !== ProgressIndicatorStep) {
|
|
3848
3899
|
throw new Error("ProgressIndicator only accepts <ProgressIndicatorStep> children.");
|
|
3849
3900
|
}
|
|
3850
|
-
return
|
|
3901
|
+
return React16.cloneElement(child, {
|
|
3851
3902
|
index,
|
|
3852
3903
|
currentIndex,
|
|
3853
3904
|
elevation
|
|
3854
3905
|
});
|
|
3855
3906
|
});
|
|
3856
3907
|
const interactive = stepChildren.some((child) => {
|
|
3857
|
-
if (!
|
|
3908
|
+
if (!React16.isValidElement(child)) return false;
|
|
3858
3909
|
const stepProps = child.props;
|
|
3859
3910
|
return Boolean(stepProps.href || stepProps.onClick);
|
|
3860
3911
|
});
|
|
3861
3912
|
const Container = interactive ? "nav" : "div";
|
|
3862
3913
|
return /* @__PURE__ */ jsxs(Container, { className: cn(layoutVariants({ layout }), className), ...props, children: [
|
|
3863
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
3914
|
+
/* @__PURE__ */ jsx("div", { className: styles46["progress-indicator-track"], "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
3864
3915
|
Progress,
|
|
3865
3916
|
{
|
|
3866
3917
|
value: 100,
|
|
3867
3918
|
color: "primary",
|
|
3868
|
-
className:
|
|
3919
|
+
className: styles46["progress-indicator-rail"],
|
|
3869
3920
|
style: {
|
|
3870
3921
|
"--pi-fill-size": `${fillSize}%`
|
|
3871
3922
|
}
|
|
3872
3923
|
}
|
|
3873
3924
|
) }),
|
|
3874
|
-
/* @__PURE__ */ jsx("ul", { className:
|
|
3925
|
+
/* @__PURE__ */ jsx("ul", { className: styles46["progress-indicator-steps"], "aria-label": ariaLabel, children: steps })
|
|
3875
3926
|
] });
|
|
3876
3927
|
}
|
|
3877
3928
|
function ProgressIndicatorStep({
|
|
@@ -3903,15 +3954,15 @@ function ProgressIndicatorStep({
|
|
|
3903
3954
|
className: markerVariants({ status: effectiveStatus, active })
|
|
3904
3955
|
}
|
|
3905
3956
|
),
|
|
3906
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
3907
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
3908
|
-
description && /* @__PURE__ */ jsx("span", { className:
|
|
3909
|
-
statusLabel && /* @__PURE__ */ jsx("span", { className:
|
|
3957
|
+
/* @__PURE__ */ jsxs("span", { className: styles46["progress-indicator-step-text"], children: [
|
|
3958
|
+
/* @__PURE__ */ jsx("span", { className: styles46["progress-indicator-step-name"], children: name }),
|
|
3959
|
+
description && /* @__PURE__ */ jsx("span", { className: styles46["progress-indicator-step-description"], children: description }),
|
|
3960
|
+
statusLabel && /* @__PURE__ */ jsx("span", { className: styles46["progress-indicator-step-status"], children: statusLabel })
|
|
3910
3961
|
] })
|
|
3911
3962
|
] });
|
|
3912
3963
|
const innerClassName = cn(
|
|
3913
|
-
|
|
3914
|
-
interactive &&
|
|
3964
|
+
styles46["progress-indicator-step-inner"],
|
|
3965
|
+
interactive && styles46["progress-indicator-step-inner--interactive"]
|
|
3915
3966
|
);
|
|
3916
3967
|
let inner;
|
|
3917
3968
|
if (href) {
|
|
@@ -3934,8 +3985,8 @@ function ProgressIndicatorStep({
|
|
|
3934
3985
|
"li",
|
|
3935
3986
|
{
|
|
3936
3987
|
className: cn(
|
|
3937
|
-
|
|
3938
|
-
active &&
|
|
3988
|
+
styles46["progress-indicator-step"],
|
|
3989
|
+
active && styles46["progress-indicator-step--active"],
|
|
3939
3990
|
className
|
|
3940
3991
|
),
|
|
3941
3992
|
...props,
|
|
@@ -3959,16 +4010,16 @@ var RadialGraph = forwardRef(
|
|
|
3959
4010
|
"div",
|
|
3960
4011
|
{
|
|
3961
4012
|
ref,
|
|
3962
|
-
className: cn(
|
|
4013
|
+
className: cn(styles47["radial-graph"], styles47[graphSize], className),
|
|
3963
4014
|
...props,
|
|
3964
4015
|
children: [
|
|
3965
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4016
|
+
/* @__PURE__ */ jsx("div", { className: styles47["bars-container"], children: bars.map((_, i) => {
|
|
3966
4017
|
const isActive = i < percentage;
|
|
3967
4018
|
const delay = `${i * 10}ms`;
|
|
3968
4019
|
return /* @__PURE__ */ jsx(
|
|
3969
4020
|
"div",
|
|
3970
4021
|
{
|
|
3971
|
-
className:
|
|
4022
|
+
className: styles47["bar"],
|
|
3972
4023
|
style: {
|
|
3973
4024
|
transform: `rotate(${i * 3.6}deg)`
|
|
3974
4025
|
},
|
|
@@ -3976,22 +4027,22 @@ var RadialGraph = forwardRef(
|
|
|
3976
4027
|
"div",
|
|
3977
4028
|
{
|
|
3978
4029
|
className: cn(
|
|
3979
|
-
|
|
3980
|
-
isActive ?
|
|
4030
|
+
styles47["bar-inner"],
|
|
4031
|
+
isActive ? styles47["bar-inner--active"] : styles47["bar-inner--inactive"]
|
|
3981
4032
|
),
|
|
3982
4033
|
style: {
|
|
3983
4034
|
transitionDelay: delay,
|
|
3984
4035
|
animationDelay: delay
|
|
3985
4036
|
},
|
|
3986
4037
|
children: [
|
|
3987
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4038
|
+
/* @__PURE__ */ jsx("div", { className: styles47["bar-background"] }),
|
|
3988
4039
|
/* @__PURE__ */ jsx(
|
|
3989
4040
|
"div",
|
|
3990
4041
|
{
|
|
3991
4042
|
className: cn(
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
isActive ?
|
|
4043
|
+
styles47["bar-gradient"],
|
|
4044
|
+
styles47[`bar-gradient--${variant}`],
|
|
4045
|
+
isActive ? styles47["bar-gradient--active"] : styles47["bar-gradient--inactive"]
|
|
3995
4046
|
),
|
|
3996
4047
|
style: {
|
|
3997
4048
|
transitionDelay: delay,
|
|
@@ -4006,9 +4057,9 @@ var RadialGraph = forwardRef(
|
|
|
4006
4057
|
i
|
|
4007
4058
|
);
|
|
4008
4059
|
}) }),
|
|
4009
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4010
|
-
/* @__PURE__ */ jsx("p", { className: cn(
|
|
4011
|
-
subLabel && /* @__PURE__ */ jsx("p", { className:
|
|
4060
|
+
/* @__PURE__ */ jsxs("div", { className: styles47["label-container"], children: [
|
|
4061
|
+
/* @__PURE__ */ jsx("p", { className: cn(styles47["label"], styles47[graphSize]), children: label }),
|
|
4062
|
+
subLabel && /* @__PURE__ */ jsx("p", { className: styles47["sub-label"], children: subLabel })
|
|
4012
4063
|
] })
|
|
4013
4064
|
]
|
|
4014
4065
|
}
|
|
@@ -4034,13 +4085,13 @@ var RadioDropdown = ({
|
|
|
4034
4085
|
);
|
|
4035
4086
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
4036
4087
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className, children: [
|
|
4037
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
4088
|
+
/* @__PURE__ */ jsxs("span", { className: styles48["selector-button-inner"], children: [
|
|
4038
4089
|
selectedOption?.label || label,
|
|
4039
4090
|
hasSelectedCount && /* @__PURE__ */ jsx(Badge, { variant: "primary", children: selectedOption.count })
|
|
4040
4091
|
] }),
|
|
4041
|
-
/* @__PURE__ */ jsx(ChevronDownIcon3, { className:
|
|
4092
|
+
/* @__PURE__ */ jsx(ChevronDownIcon3, { className: styles48["chevron-icon"] })
|
|
4042
4093
|
] }) }),
|
|
4043
|
-
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className:
|
|
4094
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: styles48["dropdown-menu-content"], children: [
|
|
4044
4095
|
searchable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4045
4096
|
/* @__PURE__ */ jsx(DropdownMenuSearch, { placeholder: searchPlaceholder, "aria-label": label }),
|
|
4046
4097
|
/* @__PURE__ */ jsx(DropdownMenuEmpty, { children: emptyPlaceholder })
|
|
@@ -4060,25 +4111,25 @@ var RadioDropdown = ({
|
|
|
4060
4111
|
] });
|
|
4061
4112
|
};
|
|
4062
4113
|
var CircleIcon2 = Circle;
|
|
4063
|
-
var RadioGroup2 =
|
|
4114
|
+
var RadioGroup2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
4064
4115
|
return /* @__PURE__ */ jsx(
|
|
4065
4116
|
RadioGroupPrimitive.Root,
|
|
4066
4117
|
{
|
|
4067
|
-
className: cn(
|
|
4118
|
+
className: cn(styles49["radio-group"], className),
|
|
4068
4119
|
...props,
|
|
4069
4120
|
ref
|
|
4070
4121
|
}
|
|
4071
4122
|
);
|
|
4072
4123
|
});
|
|
4073
4124
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
4074
|
-
var RadioGroupItem =
|
|
4125
|
+
var RadioGroupItem = React16.forwardRef(({ className, ...props }, ref) => {
|
|
4075
4126
|
return /* @__PURE__ */ jsx(
|
|
4076
4127
|
RadioGroupPrimitive.Item,
|
|
4077
4128
|
{
|
|
4078
4129
|
ref,
|
|
4079
|
-
className: cn(
|
|
4130
|
+
className: cn(styles49["radio-group-item"], className),
|
|
4080
4131
|
...props,
|
|
4081
|
-
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className:
|
|
4132
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: styles49["radio-group-item-indicator"], children: /* @__PURE__ */ jsx(CircleIcon2, { className: styles49["indicator-icon"] }) })
|
|
4082
4133
|
}
|
|
4083
4134
|
);
|
|
4084
4135
|
});
|
|
@@ -4111,134 +4162,134 @@ var getTypeConfig = (type) => {
|
|
|
4111
4162
|
case "agent":
|
|
4112
4163
|
return {
|
|
4113
4164
|
icon: "Bot",
|
|
4114
|
-
className:
|
|
4165
|
+
className: styles50["badge--agent"],
|
|
4115
4166
|
label: "Agent"
|
|
4116
4167
|
};
|
|
4117
4168
|
case "benchmark":
|
|
4118
4169
|
return {
|
|
4119
4170
|
icon: "LineChart",
|
|
4120
|
-
className:
|
|
4171
|
+
className: styles50["badge--benchmark"],
|
|
4121
4172
|
label: "Benchmark"
|
|
4122
4173
|
};
|
|
4123
4174
|
case "benchmark-result":
|
|
4124
4175
|
return {
|
|
4125
4176
|
icon: "FileChartLine",
|
|
4126
|
-
className:
|
|
4177
|
+
className: styles50["badge--benchmark-result"],
|
|
4127
4178
|
label: "Benchmark Result"
|
|
4128
4179
|
};
|
|
4129
4180
|
case "code":
|
|
4130
4181
|
return {
|
|
4131
4182
|
icon: "Code",
|
|
4132
|
-
className:
|
|
4183
|
+
className: styles50["badge--code"],
|
|
4133
4184
|
label: "Code"
|
|
4134
4185
|
};
|
|
4135
4186
|
case "binary":
|
|
4136
4187
|
return {
|
|
4137
4188
|
icon: "Binary",
|
|
4138
|
-
className:
|
|
4189
|
+
className: styles50["badge--binary"],
|
|
4139
4190
|
label: "Binary"
|
|
4140
4191
|
};
|
|
4141
4192
|
case "certificate":
|
|
4142
4193
|
return {
|
|
4143
4194
|
icon: "Award",
|
|
4144
|
-
className:
|
|
4195
|
+
className: styles50["badge--certificate"],
|
|
4145
4196
|
label: "Certificate"
|
|
4146
4197
|
};
|
|
4147
4198
|
case "compute":
|
|
4148
4199
|
return {
|
|
4149
4200
|
icon: "Cpu",
|
|
4150
|
-
className:
|
|
4201
|
+
className: styles50["badge--compute"],
|
|
4151
4202
|
label: "Compute"
|
|
4152
4203
|
};
|
|
4153
4204
|
case "credential":
|
|
4154
4205
|
return {
|
|
4155
4206
|
icon: "IdCardLanyard",
|
|
4156
|
-
className:
|
|
4207
|
+
className: styles50["badge--credential"],
|
|
4157
4208
|
label: "Credential"
|
|
4158
4209
|
};
|
|
4159
4210
|
case "database":
|
|
4160
4211
|
return {
|
|
4161
4212
|
icon: "Database",
|
|
4162
|
-
className:
|
|
4213
|
+
className: styles50["badge--database"],
|
|
4163
4214
|
label: "Database"
|
|
4164
4215
|
};
|
|
4165
4216
|
case "dataset":
|
|
4166
4217
|
return {
|
|
4167
4218
|
icon: "Table",
|
|
4168
|
-
className:
|
|
4219
|
+
className: styles50["badge--dataset"],
|
|
4169
4220
|
label: "Dataset"
|
|
4170
4221
|
};
|
|
4171
4222
|
case "document":
|
|
4172
4223
|
return {
|
|
4173
4224
|
icon: "FileText",
|
|
4174
|
-
className:
|
|
4225
|
+
className: styles50["badge--document"],
|
|
4175
4226
|
label: "Document"
|
|
4176
4227
|
};
|
|
4177
4228
|
case "skill":
|
|
4178
4229
|
return {
|
|
4179
4230
|
icon: "FileCog",
|
|
4180
|
-
className:
|
|
4231
|
+
className: styles50["badge--skill"],
|
|
4181
4232
|
label: "Skill"
|
|
4182
4233
|
};
|
|
4183
4234
|
case "media":
|
|
4184
4235
|
return {
|
|
4185
4236
|
icon: "FileImage",
|
|
4186
|
-
className:
|
|
4237
|
+
className: styles50["badge--media"],
|
|
4187
4238
|
label: "Media"
|
|
4188
4239
|
};
|
|
4189
4240
|
case "guardrail":
|
|
4190
4241
|
return {
|
|
4191
4242
|
icon: "Fence",
|
|
4192
|
-
className:
|
|
4243
|
+
className: styles50["badge--guardrail"],
|
|
4193
4244
|
label: "Guardrail"
|
|
4194
4245
|
};
|
|
4195
4246
|
case "model":
|
|
4196
4247
|
return {
|
|
4197
4248
|
icon: "Brain",
|
|
4198
|
-
className:
|
|
4249
|
+
className: styles50["badge--model"],
|
|
4199
4250
|
label: "Model"
|
|
4200
4251
|
};
|
|
4201
4252
|
case "prompt":
|
|
4202
4253
|
return {
|
|
4203
4254
|
icon: "MessageSquareText",
|
|
4204
|
-
className:
|
|
4255
|
+
className: styles50["badge--prompt"],
|
|
4205
4256
|
label: "Prompt"
|
|
4206
4257
|
};
|
|
4207
4258
|
case "system-prompt":
|
|
4208
4259
|
return {
|
|
4209
4260
|
icon: "MessageSquareCode",
|
|
4210
|
-
className:
|
|
4261
|
+
className: styles50["badge--system-prompt"],
|
|
4211
4262
|
label: "System Prompt"
|
|
4212
4263
|
};
|
|
4213
4264
|
case "reasoning":
|
|
4214
4265
|
return {
|
|
4215
4266
|
icon: "MessageSquareMore",
|
|
4216
|
-
className:
|
|
4267
|
+
className: styles50["badge--reasoning"],
|
|
4217
4268
|
label: "Reasoning"
|
|
4218
4269
|
};
|
|
4219
4270
|
case "token":
|
|
4220
4271
|
return {
|
|
4221
4272
|
icon: "Coins",
|
|
4222
|
-
className:
|
|
4273
|
+
className: styles50["badge--token"],
|
|
4223
4274
|
label: "Token"
|
|
4224
4275
|
};
|
|
4225
4276
|
case "tool":
|
|
4226
4277
|
return {
|
|
4227
4278
|
icon: "Wrench",
|
|
4228
|
-
className:
|
|
4279
|
+
className: styles50["badge--tool"],
|
|
4229
4280
|
label: "Tool"
|
|
4230
4281
|
};
|
|
4231
4282
|
case "config":
|
|
4232
4283
|
return {
|
|
4233
4284
|
icon: "Settings2",
|
|
4234
|
-
className:
|
|
4285
|
+
className: styles50["badge--config"],
|
|
4235
4286
|
label: "Configuration"
|
|
4236
4287
|
};
|
|
4237
4288
|
case "unknown":
|
|
4238
4289
|
default:
|
|
4239
4290
|
return {
|
|
4240
4291
|
icon: "Box",
|
|
4241
|
-
className:
|
|
4292
|
+
className: styles50["badge--unknown"],
|
|
4242
4293
|
label: "Unknown"
|
|
4243
4294
|
};
|
|
4244
4295
|
}
|
|
@@ -4256,20 +4307,20 @@ var SearchBar = ({
|
|
|
4256
4307
|
const handleClear = () => {
|
|
4257
4308
|
setSearchQuery("");
|
|
4258
4309
|
};
|
|
4259
|
-
return /* @__PURE__ */ jsx("search", { className: cn(
|
|
4310
|
+
return /* @__PURE__ */ jsx("search", { className: cn(styles51["search-bar"], className), children: /* @__PURE__ */ jsx(
|
|
4260
4311
|
Input,
|
|
4261
4312
|
{
|
|
4262
4313
|
placeholder,
|
|
4263
4314
|
value: searchQuery,
|
|
4264
4315
|
onChange: handleChange,
|
|
4265
|
-
className:
|
|
4266
|
-
prefix: /* @__PURE__ */ jsx(SearchIcon4, { className:
|
|
4316
|
+
className: styles51["input"],
|
|
4317
|
+
prefix: /* @__PURE__ */ jsx(SearchIcon4, { className: styles51["search-icon"] }),
|
|
4267
4318
|
suffix: searchQuery && /* @__PURE__ */ jsx(
|
|
4268
4319
|
IconButton,
|
|
4269
4320
|
{
|
|
4270
4321
|
name: "X",
|
|
4271
4322
|
onClick: handleClear,
|
|
4272
|
-
className:
|
|
4323
|
+
className: styles51["clear-button"],
|
|
4273
4324
|
label: "Clear search"
|
|
4274
4325
|
}
|
|
4275
4326
|
)
|
|
@@ -4283,10 +4334,10 @@ var SectionHeading = ({
|
|
|
4283
4334
|
className
|
|
4284
4335
|
}) => {
|
|
4285
4336
|
const hasRightContent = !!renderRightContent;
|
|
4286
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(hasRightContent &&
|
|
4287
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
4288
|
-
/* @__PURE__ */ jsx("h3", { className:
|
|
4289
|
-
description && /* @__PURE__ */ jsx("p", { className:
|
|
4337
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(hasRightContent && styles52["section-heading--right-content"], className), children: [
|
|
4338
|
+
/* @__PURE__ */ jsxs("div", { className: styles52["content"], children: [
|
|
4339
|
+
/* @__PURE__ */ jsx("h3", { className: styles52["heading"], children: heading }),
|
|
4340
|
+
description && /* @__PURE__ */ jsx("p", { className: styles52["description"], children: description })
|
|
4290
4341
|
] }),
|
|
4291
4342
|
hasRightContent && renderRightContent()
|
|
4292
4343
|
] });
|
|
@@ -4340,9 +4391,9 @@ var SegmentedControls = ({
|
|
|
4340
4391
|
"aria-label": ariaLabel,
|
|
4341
4392
|
"aria-labelledby": ariaLabelledBy,
|
|
4342
4393
|
className: cn(
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4394
|
+
styles53["segmented-controls"],
|
|
4395
|
+
styles53[`size--${size}`],
|
|
4396
|
+
styles53[`variant--${activeVariant}`],
|
|
4346
4397
|
className
|
|
4347
4398
|
),
|
|
4348
4399
|
children: [
|
|
@@ -4361,15 +4412,15 @@ var SegmentedControls = ({
|
|
|
4361
4412
|
"aria-label": isIconOnly ? option.label : void 0,
|
|
4362
4413
|
title: isIconOnly ? option.label : void 0,
|
|
4363
4414
|
className: cn(
|
|
4364
|
-
|
|
4365
|
-
isIconOnly &&
|
|
4366
|
-
currentlyActive ?
|
|
4415
|
+
styles53["segment"],
|
|
4416
|
+
isIconOnly && styles53["segment--icon-only"],
|
|
4417
|
+
currentlyActive ? styles53["segment--active"] : styles53["segment--inactive"]
|
|
4367
4418
|
),
|
|
4368
4419
|
onClick: () => onValueChange(option.value),
|
|
4369
4420
|
children: [
|
|
4370
|
-
showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className:
|
|
4421
|
+
showIcon && /* @__PURE__ */ jsx(Icon, { icon: option.icon, size: "xs", className: styles53["segment-icon"] }),
|
|
4371
4422
|
showLabel && /* @__PURE__ */ jsx("span", { children: option.label }),
|
|
4372
|
-
!isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className:
|
|
4423
|
+
!isIconOnly && option.suffix && /* @__PURE__ */ jsx("span", { className: styles53["segment-suffix"], children: option.suffix })
|
|
4373
4424
|
]
|
|
4374
4425
|
},
|
|
4375
4426
|
option.value
|
|
@@ -4379,8 +4430,8 @@ var SegmentedControls = ({
|
|
|
4379
4430
|
"div",
|
|
4380
4431
|
{
|
|
4381
4432
|
className: cn(
|
|
4382
|
-
|
|
4383
|
-
animateIndicator &&
|
|
4433
|
+
styles53["active-segment-indicator"],
|
|
4434
|
+
animateIndicator && styles53["active-segment-indicator--animated"]
|
|
4384
4435
|
),
|
|
4385
4436
|
style: {
|
|
4386
4437
|
transform: `translateX(${indicator.left}px)`,
|
|
@@ -4392,15 +4443,15 @@ var SegmentedControls = ({
|
|
|
4392
4443
|
}
|
|
4393
4444
|
);
|
|
4394
4445
|
};
|
|
4395
|
-
var Separator3 =
|
|
4446
|
+
var Separator3 = React16.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4396
4447
|
SeparatorPrimitive.Root,
|
|
4397
4448
|
{
|
|
4398
4449
|
ref,
|
|
4399
4450
|
decorative,
|
|
4400
4451
|
orientation,
|
|
4401
4452
|
className: cn(
|
|
4402
|
-
|
|
4403
|
-
orientation === "horizontal" ?
|
|
4453
|
+
styles54["separator"],
|
|
4454
|
+
orientation === "horizontal" ? styles54["separator--horizontal"] : styles54["separator--vertical"],
|
|
4404
4455
|
className
|
|
4405
4456
|
),
|
|
4406
4457
|
...props
|
|
@@ -4411,57 +4462,57 @@ var Sheet = DialogPrimitive.Root;
|
|
|
4411
4462
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
4412
4463
|
var SheetClose = DialogPrimitive.Close;
|
|
4413
4464
|
var SheetPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
4414
|
-
var SheetOverlay =
|
|
4465
|
+
var SheetOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cn(styles55["sheet-overlay"], className), ...props, ref }));
|
|
4415
4466
|
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
4416
|
-
var sheetVariants = cva(
|
|
4467
|
+
var sheetVariants = cva(styles55["sheet-content"], {
|
|
4417
4468
|
variants: {
|
|
4418
4469
|
side: {
|
|
4419
|
-
top:
|
|
4420
|
-
bottom:
|
|
4421
|
-
left:
|
|
4422
|
-
right:
|
|
4470
|
+
top: styles55["sheet-content--side-top"],
|
|
4471
|
+
bottom: styles55["sheet-content--side-bottom"],
|
|
4472
|
+
left: styles55["sheet-content--side-left"],
|
|
4473
|
+
right: styles55["sheet-content--side-right"]
|
|
4423
4474
|
}
|
|
4424
4475
|
},
|
|
4425
4476
|
defaultVariants: {
|
|
4426
4477
|
side: "right"
|
|
4427
4478
|
}
|
|
4428
4479
|
});
|
|
4429
|
-
var SheetContainer =
|
|
4480
|
+
var SheetContainer = React16.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
4430
4481
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
4431
4482
|
/* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children })
|
|
4432
4483
|
] }));
|
|
4433
4484
|
SheetContainer.displayName = DialogPrimitive.Content.displayName;
|
|
4434
|
-
var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4485
|
+
var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles55["sheet-header-icon"], className), ...props });
|
|
4435
4486
|
SheetHeaderIcon.displayName = "SheetHeaderIcon";
|
|
4436
4487
|
var SheetHeader = ({ className, children, ...props }) => {
|
|
4437
|
-
const childrenArray =
|
|
4488
|
+
const childrenArray = React16.Children.toArray(children);
|
|
4438
4489
|
const icon = childrenArray.find(
|
|
4439
|
-
(child) =>
|
|
4490
|
+
(child) => React16.isValidElement(child) && child.type === SheetHeaderIcon
|
|
4440
4491
|
);
|
|
4441
4492
|
const otherChildren = childrenArray.filter(
|
|
4442
|
-
(child) => !(
|
|
4493
|
+
(child) => !(React16.isValidElement(child) && child.type === SheetHeaderIcon)
|
|
4443
4494
|
);
|
|
4444
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
4495
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles55["sheet-header"], className), ...props, children: [
|
|
4445
4496
|
icon,
|
|
4446
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4447
|
-
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", className:
|
|
4497
|
+
/* @__PURE__ */ jsx("div", { className: styles55["sheet-header-text-content"], children: otherChildren }),
|
|
4498
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", className: styles55["sheet-close"] }) })
|
|
4448
4499
|
] });
|
|
4449
4500
|
};
|
|
4450
4501
|
SheetHeader.displayName = "SheetHeader";
|
|
4451
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4502
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles55["sheet-footer"], className), ...props });
|
|
4452
4503
|
SheetFooter.displayName = "SheetFooter";
|
|
4453
|
-
var SheetTitle =
|
|
4504
|
+
var SheetTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles55["sheet-title"], className), ...props }));
|
|
4454
4505
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
4455
|
-
var SheetDescription =
|
|
4506
|
+
var SheetDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4456
4507
|
DialogPrimitive.Description,
|
|
4457
4508
|
{
|
|
4458
4509
|
ref,
|
|
4459
|
-
className: cn(
|
|
4510
|
+
className: cn(styles55["sheet-description"], className),
|
|
4460
4511
|
...props
|
|
4461
4512
|
}
|
|
4462
4513
|
));
|
|
4463
4514
|
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
4464
|
-
var SheetContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
4515
|
+
var SheetContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles55["sheet-body"], className), ...props });
|
|
4465
4516
|
SheetContent.displayName = "SheetContent";
|
|
4466
4517
|
var ArrowDownIcon = ArrowDown;
|
|
4467
4518
|
var ArrowUpIcon = ArrowUp;
|
|
@@ -4479,10 +4530,10 @@ function SortButton({
|
|
|
4479
4530
|
const handleClick = () => {
|
|
4480
4531
|
onSort(field);
|
|
4481
4532
|
};
|
|
4482
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleClick, className:
|
|
4533
|
+
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleClick, className: styles56["sort-button"], children: [
|
|
4483
4534
|
icon,
|
|
4484
4535
|
children,
|
|
4485
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
4536
|
+
/* @__PURE__ */ jsx("div", { className: styles56["arrow-container"], children: isActive ? isAscending ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : /* @__PURE__ */ jsx(ArrowDownIcon, {}) : /* @__PURE__ */ jsx(ArrowUpDownIcon, { className: styles56["arrow-up-down-icon"] }) })
|
|
4486
4537
|
] });
|
|
4487
4538
|
}
|
|
4488
4539
|
var ChevronDownIcon4 = ChevronDown;
|
|
@@ -4527,9 +4578,9 @@ function SortSelector({
|
|
|
4527
4578
|
setCurrentPage?.(1);
|
|
4528
4579
|
};
|
|
4529
4580
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
4530
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(
|
|
4581
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(styles57["sort-selector-trigger"], className), children: [
|
|
4531
4582
|
/* @__PURE__ */ jsx("span", { children: currentLabel }),
|
|
4532
|
-
/* @__PURE__ */ jsx(ChevronDownIcon4, { className:
|
|
4583
|
+
/* @__PURE__ */ jsx(ChevronDownIcon4, { className: styles57["chevron-down-icon"] })
|
|
4533
4584
|
] }) }),
|
|
4534
4585
|
/* @__PURE__ */ jsxs(
|
|
4535
4586
|
DropdownMenuContent,
|
|
@@ -4556,55 +4607,55 @@ function SortSelector({
|
|
|
4556
4607
|
)
|
|
4557
4608
|
] });
|
|
4558
4609
|
}
|
|
4559
|
-
var Switch =
|
|
4610
|
+
var Switch = React16.forwardRef(
|
|
4560
4611
|
({ className, size = "md", variant = "default", thumbIcon, ...props }, ref) => {
|
|
4561
4612
|
const iconSize = size === "sm" ? "xs" : size === "md" ? "sm" : "md";
|
|
4562
4613
|
return /* @__PURE__ */ jsx(
|
|
4563
4614
|
SwitchPrimitives.Root,
|
|
4564
4615
|
{
|
|
4565
|
-
className: cn(
|
|
4616
|
+
className: cn(styles58["switch"], styles58[size], styles58[variant], className),
|
|
4566
4617
|
...props,
|
|
4567
4618
|
ref,
|
|
4568
|
-
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn(
|
|
4619
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn(styles58["thumb"], styles58[size]), children: thumbIcon && /* @__PURE__ */ jsx(Icon, { icon: thumbIcon, className: styles58["thumb-icon"], size: iconSize }) })
|
|
4569
4620
|
}
|
|
4570
4621
|
);
|
|
4571
4622
|
}
|
|
4572
4623
|
);
|
|
4573
4624
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
4574
|
-
var tableElevationVariants = generateElevationVariants(
|
|
4575
|
-
var TableContainer =
|
|
4625
|
+
var tableElevationVariants = generateElevationVariants(styles59, "table", ELEVATION.RAISED);
|
|
4626
|
+
var TableContainer = React16.forwardRef(({ className, style, elevation = ELEVATION.RAISED, border, columns, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4576
4627
|
"div",
|
|
4577
4628
|
{
|
|
4578
4629
|
className: cn(
|
|
4579
|
-
|
|
4630
|
+
styles59["table"],
|
|
4580
4631
|
tableElevationVariants({ elevation }),
|
|
4581
|
-
border &&
|
|
4632
|
+
border && styles59["table-border"],
|
|
4582
4633
|
className
|
|
4583
4634
|
),
|
|
4584
4635
|
style: columns ? { ...style, "--table-columns": columns } : style,
|
|
4585
|
-
children: /* @__PURE__ */ jsx("table", { ref, className:
|
|
4636
|
+
children: /* @__PURE__ */ jsx("table", { ref, className: styles59["table-inner"], ...props })
|
|
4586
4637
|
}
|
|
4587
4638
|
));
|
|
4588
4639
|
TableContainer.displayName = "Table";
|
|
4589
|
-
var TableHeader =
|
|
4640
|
+
var TableHeader = React16.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4590
4641
|
"thead",
|
|
4591
4642
|
{
|
|
4592
4643
|
ref,
|
|
4593
4644
|
className: cn(
|
|
4594
|
-
|
|
4595
|
-
sticky === "container" &&
|
|
4596
|
-
sticky === "page" &&
|
|
4645
|
+
styles59["table-header"],
|
|
4646
|
+
sticky === "container" && styles59["table-header--sticky-container"],
|
|
4647
|
+
sticky === "page" && styles59["table-header--sticky-page"],
|
|
4597
4648
|
className
|
|
4598
4649
|
),
|
|
4599
4650
|
...props
|
|
4600
4651
|
}
|
|
4601
4652
|
));
|
|
4602
4653
|
TableHeader.displayName = "TableHeader";
|
|
4603
|
-
var TableBody =
|
|
4654
|
+
var TableBody = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn(styles59["table-body"], className), ...props }));
|
|
4604
4655
|
TableBody.displayName = "TableBody";
|
|
4605
|
-
var TableFooter =
|
|
4656
|
+
var TableFooter = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles59["table-footer"], className), ...props }));
|
|
4606
4657
|
TableFooter.displayName = "TableFooter";
|
|
4607
|
-
var TableRow =
|
|
4658
|
+
var TableRow = React16.forwardRef(
|
|
4608
4659
|
({ className, clickable, href, hrefLabel = "View details", children, onClick, ...props }, ref) => {
|
|
4609
4660
|
const isClickable = clickable || !!href;
|
|
4610
4661
|
const handleClick = (e) => {
|
|
@@ -4619,15 +4670,15 @@ var TableRow = React15.forwardRef(
|
|
|
4619
4670
|
{
|
|
4620
4671
|
ref,
|
|
4621
4672
|
className: cn(
|
|
4622
|
-
|
|
4623
|
-
isClickable &&
|
|
4624
|
-
href &&
|
|
4673
|
+
styles59["table-row"],
|
|
4674
|
+
isClickable && styles59["table-row--clickable"],
|
|
4675
|
+
href && styles59["table-row--linked"],
|
|
4625
4676
|
className
|
|
4626
4677
|
),
|
|
4627
4678
|
onClick: onClick ? handleClick : void 0,
|
|
4628
4679
|
...props,
|
|
4629
4680
|
children: [
|
|
4630
|
-
href && /* @__PURE__ */ jsx("a", { href, className:
|
|
4681
|
+
href && /* @__PURE__ */ jsx("a", { href, className: styles59["table-row-link"], "data-table-row-link": true, children: /* @__PURE__ */ jsx("span", { className: styles59["table-row-link-label"], children: hrefLabel }) }),
|
|
4631
4682
|
children
|
|
4632
4683
|
]
|
|
4633
4684
|
}
|
|
@@ -4635,18 +4686,18 @@ var TableRow = React15.forwardRef(
|
|
|
4635
4686
|
}
|
|
4636
4687
|
);
|
|
4637
4688
|
TableRow.displayName = "TableRow";
|
|
4638
|
-
var TableHead =
|
|
4689
|
+
var TableHead = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles59["table-head"], className), ...props }));
|
|
4639
4690
|
TableHead.displayName = "TableHead";
|
|
4640
|
-
var TableCell =
|
|
4691
|
+
var TableCell = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className: cn(styles59["table-cell"], className), ...props }));
|
|
4641
4692
|
TableCell.displayName = "TableCell";
|
|
4642
|
-
var TableCaption =
|
|
4693
|
+
var TableCaption = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn(styles59["table-caption"], className), ...props }));
|
|
4643
4694
|
TableCaption.displayName = "TableCaption";
|
|
4644
4695
|
var TabsContainer = TabsPrimitive.Root;
|
|
4645
|
-
var TabsList =
|
|
4696
|
+
var TabsList = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, className: cn(styles60["tabs-list"], className), ...props }));
|
|
4646
4697
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
4647
|
-
var TabsTrigger =
|
|
4698
|
+
var TabsTrigger = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ref, className: cn(styles60["tabs-trigger"], className), ...props }));
|
|
4648
4699
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4649
|
-
var TabsContent =
|
|
4700
|
+
var TabsContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles60["tabs-content"], className), ...props }));
|
|
4650
4701
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
4651
4702
|
var Tabs = ({
|
|
4652
4703
|
items,
|
|
@@ -4709,13 +4760,13 @@ var Tabs = ({
|
|
|
4709
4760
|
};
|
|
4710
4761
|
const renderIcon = (icon) => {
|
|
4711
4762
|
if (icon) {
|
|
4712
|
-
return /* @__PURE__ */ jsx(Icon, { icon, size: "sm", className:
|
|
4763
|
+
return /* @__PURE__ */ jsx(Icon, { icon, size: "sm", className: styles61["tabs-icon"] });
|
|
4713
4764
|
}
|
|
4714
4765
|
return null;
|
|
4715
4766
|
};
|
|
4716
4767
|
const indicatorClass = cn(
|
|
4717
|
-
|
|
4718
|
-
isFilled ?
|
|
4768
|
+
styles61["active-tab-indicator"],
|
|
4769
|
+
isFilled ? styles61["active-tab-indicator--filled"] : styles61["active-tab-indicator--transparent"]
|
|
4719
4770
|
);
|
|
4720
4771
|
const renderTriggerIndicator = (value2) => {
|
|
4721
4772
|
if (staticRender) {
|
|
@@ -4724,7 +4775,7 @@ var Tabs = ({
|
|
|
4724
4775
|
{
|
|
4725
4776
|
"aria-hidden": true,
|
|
4726
4777
|
"data-slot": "tabs-indicator",
|
|
4727
|
-
className: cn(indicatorClass,
|
|
4778
|
+
className: cn(indicatorClass, styles61["active-tab-indicator--static"])
|
|
4728
4779
|
}
|
|
4729
4780
|
);
|
|
4730
4781
|
}
|
|
@@ -4738,15 +4789,15 @@ var Tabs = ({
|
|
|
4738
4789
|
{
|
|
4739
4790
|
value: activeTab,
|
|
4740
4791
|
onValueChange: handleValueChange,
|
|
4741
|
-
className: cn(
|
|
4792
|
+
className: cn(styles61["tabs"], className),
|
|
4742
4793
|
children: [
|
|
4743
4794
|
/* @__PURE__ */ jsxs(
|
|
4744
4795
|
TabsList,
|
|
4745
4796
|
{
|
|
4746
4797
|
ref: listRef,
|
|
4747
4798
|
className: cn(
|
|
4748
|
-
|
|
4749
|
-
isFilled ?
|
|
4799
|
+
styles61["tabs-list"],
|
|
4800
|
+
isFilled ? styles61["tabs-list--filled"] : styles61["tabs-list--transparent"]
|
|
4750
4801
|
),
|
|
4751
4802
|
children: [
|
|
4752
4803
|
items.map(({ label, value: value2, icon, suffix, triggerProps }) => {
|
|
@@ -4760,8 +4811,8 @@ var Tabs = ({
|
|
|
4760
4811
|
},
|
|
4761
4812
|
value: value2,
|
|
4762
4813
|
className: cn(
|
|
4763
|
-
|
|
4764
|
-
isFilled ?
|
|
4814
|
+
styles61["tabs-trigger"],
|
|
4815
|
+
isFilled ? styles61["tabs-trigger--filled"] : styles61["tabs-trigger--transparent"],
|
|
4765
4816
|
triggerProps?.className
|
|
4766
4817
|
)
|
|
4767
4818
|
},
|
|
@@ -4778,8 +4829,8 @@ var Tabs = ({
|
|
|
4778
4829
|
"data-slot": "tabs-indicator",
|
|
4779
4830
|
className: cn(
|
|
4780
4831
|
indicatorClass,
|
|
4781
|
-
|
|
4782
|
-
animateIndicator &&
|
|
4832
|
+
styles61["active-tab-indicator--shared"],
|
|
4833
|
+
animateIndicator && styles61["active-tab-indicator--animated"]
|
|
4783
4834
|
),
|
|
4784
4835
|
style: {
|
|
4785
4836
|
transform: `translateX(${indicator.left}px)`,
|
|
@@ -4795,7 +4846,7 @@ var Tabs = ({
|
|
|
4795
4846
|
TabsContent,
|
|
4796
4847
|
{
|
|
4797
4848
|
value: value2,
|
|
4798
|
-
className:
|
|
4849
|
+
className: styles61["content"],
|
|
4799
4850
|
forceMount: staticRender || void 0,
|
|
4800
4851
|
children: content
|
|
4801
4852
|
},
|
|
@@ -4805,37 +4856,37 @@ var Tabs = ({
|
|
|
4805
4856
|
}
|
|
4806
4857
|
);
|
|
4807
4858
|
};
|
|
4808
|
-
var Textarea =
|
|
4859
|
+
var Textarea = React16.forwardRef(
|
|
4809
4860
|
({ className, ...props }, ref) => {
|
|
4810
|
-
return /* @__PURE__ */ jsx("textarea", { className: cn(
|
|
4861
|
+
return /* @__PURE__ */ jsx("textarea", { className: cn(styles62["textarea"], className), ref, ...props });
|
|
4811
4862
|
}
|
|
4812
4863
|
);
|
|
4813
4864
|
Textarea.displayName = "Textarea";
|
|
4814
4865
|
var XIcon2 = X;
|
|
4815
4866
|
var ToastProvider = ToastPrimitives.Provider;
|
|
4816
|
-
var ToastViewport =
|
|
4867
|
+
var ToastViewport = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4817
4868
|
ToastPrimitives.Viewport,
|
|
4818
4869
|
{
|
|
4819
4870
|
ref,
|
|
4820
|
-
className: cn(
|
|
4871
|
+
className: cn(styles63["toast-viewport"], className),
|
|
4821
4872
|
...props
|
|
4822
4873
|
}
|
|
4823
4874
|
));
|
|
4824
4875
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
4825
|
-
var toastVariants = cva(
|
|
4876
|
+
var toastVariants = cva(styles63["toast"], {
|
|
4826
4877
|
variants: {
|
|
4827
4878
|
variant: {
|
|
4828
|
-
default:
|
|
4829
|
-
danger:
|
|
4830
|
-
warning:
|
|
4831
|
-
success:
|
|
4879
|
+
default: styles63["toast--default"],
|
|
4880
|
+
danger: styles63["toast--danger"],
|
|
4881
|
+
warning: styles63["toast--warning"],
|
|
4882
|
+
success: styles63["toast--success"]
|
|
4832
4883
|
}
|
|
4833
4884
|
},
|
|
4834
4885
|
defaultVariants: {
|
|
4835
4886
|
variant: "default"
|
|
4836
4887
|
}
|
|
4837
4888
|
});
|
|
4838
|
-
var ToastContainer =
|
|
4889
|
+
var ToastContainer = React16.forwardRef(({ className, variant, style, ...props }, ref) => {
|
|
4839
4890
|
return /* @__PURE__ */ jsx(
|
|
4840
4891
|
ToastPrimitives.Root,
|
|
4841
4892
|
{
|
|
@@ -4847,37 +4898,37 @@ var ToastContainer = React15.forwardRef(({ className, variant, style, ...props }
|
|
|
4847
4898
|
);
|
|
4848
4899
|
});
|
|
4849
4900
|
ToastContainer.displayName = ToastPrimitives.Root.displayName;
|
|
4850
|
-
var ToastAction =
|
|
4901
|
+
var ToastAction = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4851
4902
|
ToastPrimitives.Action,
|
|
4852
4903
|
{
|
|
4853
4904
|
ref,
|
|
4854
4905
|
className: cn(
|
|
4855
4906
|
buttonVariants({ variant: "secondary", size: "sm" }),
|
|
4856
|
-
|
|
4907
|
+
styles63["toast-action"],
|
|
4857
4908
|
className
|
|
4858
4909
|
),
|
|
4859
4910
|
...props
|
|
4860
4911
|
}
|
|
4861
4912
|
));
|
|
4862
4913
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
4863
|
-
var ToastClose =
|
|
4914
|
+
var ToastClose = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4864
4915
|
ToastPrimitives.Close,
|
|
4865
4916
|
{
|
|
4866
4917
|
ref,
|
|
4867
4918
|
"aria-label": "Close",
|
|
4868
|
-
className: cn(
|
|
4919
|
+
className: cn(styles63["toast-close"], className),
|
|
4869
4920
|
...props,
|
|
4870
|
-
children: /* @__PURE__ */ jsx(XIcon2, { className:
|
|
4921
|
+
children: /* @__PURE__ */ jsx(XIcon2, { className: styles63["toast-close-icon"] })
|
|
4871
4922
|
}
|
|
4872
4923
|
));
|
|
4873
4924
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
4874
|
-
var ToastTitle =
|
|
4925
|
+
var ToastTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles63["toast-title"], className), ...props }));
|
|
4875
4926
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
4876
|
-
var ToastDescription =
|
|
4927
|
+
var ToastDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4877
4928
|
ToastPrimitives.Description,
|
|
4878
4929
|
{
|
|
4879
4930
|
ref,
|
|
4880
|
-
className: cn(
|
|
4931
|
+
className: cn(styles63["toast-description"], className),
|
|
4881
4932
|
...props
|
|
4882
4933
|
}
|
|
4883
4934
|
));
|
|
@@ -5012,14 +5063,14 @@ var Toast = ({ toast: toast2 }) => {
|
|
|
5012
5063
|
};
|
|
5013
5064
|
const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
|
|
5014
5065
|
return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
|
|
5015
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
5016
|
-
title && /* @__PURE__ */ jsxs("div", { className:
|
|
5066
|
+
/* @__PURE__ */ jsxs("div", { className: styles64["toast-copy"], children: [
|
|
5067
|
+
title && /* @__PURE__ */ jsxs("div", { className: styles64["toast-title-container"], children: [
|
|
5017
5068
|
displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
|
|
5018
5069
|
/* @__PURE__ */ jsx(ToastTitle, { children: title })
|
|
5019
5070
|
] }),
|
|
5020
5071
|
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
5021
5072
|
] }),
|
|
5022
|
-
action && /* @__PURE__ */ jsx("div", { className:
|
|
5073
|
+
action && /* @__PURE__ */ jsx("div", { className: styles64["toast-action"], children: action }),
|
|
5023
5074
|
/* @__PURE__ */ jsx(ToastClose, {})
|
|
5024
5075
|
] });
|
|
5025
5076
|
};
|
|
@@ -5054,7 +5105,7 @@ var TruncatedDescription = ({
|
|
|
5054
5105
|
e.stopPropagation();
|
|
5055
5106
|
setExpanded(!expanded);
|
|
5056
5107
|
};
|
|
5057
|
-
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
5108
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(styles65["truncated-description"], className), children: [
|
|
5058
5109
|
/* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: displayDescription } }),
|
|
5059
5110
|
isLongDescription && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: handleToggle, children: expanded ? "Show less" : "Show more" })
|
|
5060
5111
|
] });
|
|
@@ -5062,20 +5113,20 @@ var TruncatedDescription = ({
|
|
|
5062
5113
|
var removeHtmlTags = (html) => {
|
|
5063
5114
|
return html.replace(/<[^>]*>/g, "");
|
|
5064
5115
|
};
|
|
5065
|
-
var Portal8 =
|
|
5116
|
+
var Portal8 = React16.forwardRef((_props, ref) => {
|
|
5066
5117
|
return /* @__PURE__ */ jsx("div", { id: PORTAL_ROOT_ID, ref });
|
|
5067
5118
|
});
|
|
5068
5119
|
Portal8.displayName = "Portal";
|
|
5069
5120
|
var PortalContainerProvider = ({ container, children }) => /* @__PURE__ */ jsx(PortalContainerContext.Provider, { value: container, children });
|
|
5070
5121
|
var ThemeProvider = ({ customVars, portalContainer, children }) => {
|
|
5071
|
-
const [ownPortalContainer, setOwnPortalContainer] =
|
|
5122
|
+
const [ownPortalContainer, setOwnPortalContainer] = React16.useState(null);
|
|
5072
5123
|
const usesOwnPortal = portalContainer === void 0;
|
|
5073
5124
|
return /* @__PURE__ */ jsx(PortalContainerProvider, { container: usesOwnPortal ? ownPortalContainer : portalContainer, children: /* @__PURE__ */ jsxs(
|
|
5074
5125
|
"div",
|
|
5075
5126
|
{
|
|
5076
5127
|
id: "equality-theme-provider-root",
|
|
5077
5128
|
"data-equality-root": true,
|
|
5078
|
-
className:
|
|
5129
|
+
className: styles66.root,
|
|
5079
5130
|
style: customVars,
|
|
5080
5131
|
children: [
|
|
5081
5132
|
children,
|
|
@@ -5201,6 +5252,6 @@ var useTheme = () => {
|
|
|
5201
5252
|
return [theme, setTheme];
|
|
5202
5253
|
};
|
|
5203
5254
|
|
|
5204
|
-
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, 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, 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, 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 };
|
|
5255
|
+
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Banner, 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, 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, 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, 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 };
|
|
5205
5256
|
//# sourceMappingURL=index.js.map
|
|
5206
5257
|
//# sourceMappingURL=index.js.map
|