@eqtylab/equality 2.4.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-dialog.module.module.css.module.css +5 -5
- package/dist/alert.module.module.css.module.css +15 -15
- package/dist/avatar.module.module.css.module.css +6 -6
- package/dist/bar-graph.module.module.css.module.css +3 -3
- package/dist/button.module.module.css.module.css +17 -17
- package/dist/card-content-header.module.module.css.module.css +1 -1
- package/dist/card.module.module.css.module.css +14 -14
- package/dist/checkbox.module.module.css.module.css +6 -6
- package/dist/code-block.module.module.css.module.css +12 -12
- package/dist/command.module.module.css.module.css +23 -23
- package/dist/date-range-picker.module.module.css.module.css +10 -10
- package/dist/dialog.module.module.css.module.css +6 -6
- package/dist/display-field.module.module.css.module.css +27 -27
- package/dist/drawer.module.module.css.module.css +6 -6
- package/dist/dropdown-menu.module.module.css.module.css +39 -39
- package/dist/empty-table-state.module.module.css.module.css +2 -2
- package/dist/filter-dropdown.module.module.css.module.css +1 -1
- package/dist/form.module.module.css.module.css +3 -3
- package/dist/format-date.module.module.css.module.css +2 -2
- package/dist/generated/tailwind-tokens.css +262 -260
- package/dist/global-theme-config.css +9 -1
- package/dist/icon-button.module.module.css.module.css +16 -16
- package/dist/icon.module.module.css.module.css +9 -9
- package/dist/index.cjs +212 -188
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -4
- package/dist/index.d.ts +44 -4
- package/dist/index.js +181 -160
- package/dist/index.js.map +1 -1
- package/dist/info-card.module.module.css.module.css +2 -2
- package/dist/input.module.module.css.module.css +16 -16
- package/dist/list-or-grid-view-toggle.module.module.css.module.css +6 -6
- package/dist/loading-overlay.module.module.css.module.css +5 -5
- package/dist/metric-card.module.module.css.module.css +19 -19
- package/dist/page-not-found.module.module.css.module.css +4 -4
- package/dist/pagination.module.module.css.module.css +1 -1
- package/dist/popover.module.module.css.module.css +4 -4
- package/dist/progress-indicator.module.module.css.module.css +11 -11
- package/dist/progress.module.module.css.module.css +6 -6
- package/dist/radial-graph.module.module.css.module.css +5 -5
- package/dist/radio-dropdown.module.module.css.module.css +1 -1
- package/dist/radio-group.module.module.css.module.css +4 -4
- package/dist/scroll-area.module.module.css.module.css +1 -1
- package/dist/search-bar.module.module.css.module.css +1 -1
- package/dist/section-heading.module.module.css.module.css +2 -2
- package/dist/segmented-controls.module.module.css.module.css +6 -6
- package/dist/select.module.module.css.module.css +29 -29
- package/dist/separator.module.module.css.module.css +1 -1
- package/dist/sheet.module.module.css.module.css +9 -9
- package/dist/skeleton.module.module.css.module.css +1 -1
- package/dist/sort-button.module.module.css.module.css +1 -1
- package/dist/sort-selector.module.module.css.module.css +1 -1
- package/dist/spinner.module.module.css.module.css +11 -11
- package/dist/switch.module.module.css.module.css +10 -10
- package/dist/table-components.module.module.css.module.css +25 -25
- package/dist/tabs-components.module.module.css.module.css +5 -5
- package/dist/tabs.module.module.css.module.css +6 -6
- package/dist/textarea.module.module.css.module.css +6 -6
- package/dist/theme-preflight-global.css +229 -222
- package/dist/theme-preflight-scoped.css +229 -223
- package/dist/theme.module.css +1 -1
- package/dist/theme.module.module.css.module.css +199 -297
- package/dist/toast-components.module.module.css.module.css +24 -24
- package/dist/tooltip.module.module.css.module.css +5 -5
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React15 from 'react';
|
|
2
2
|
import { forwardRef, useRef, useMemo, useEffect, useSyncExternalStore, useState, useCallback, useLayoutEffect, createElement } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import styles2 from './alert.module.module.css.module.css';
|
|
@@ -126,12 +126,20 @@ var getRelativeElevation = (elevation, offset) => {
|
|
|
126
126
|
}
|
|
127
127
|
return relativeElevation || elevation;
|
|
128
128
|
};
|
|
129
|
+
var PORTAL_ROOT_ID = "equality-theme-provider-root-portal";
|
|
130
|
+
var PortalContainerContext = React15.createContext(
|
|
131
|
+
void 0
|
|
132
|
+
);
|
|
133
|
+
function usePortalContainer() {
|
|
134
|
+
const container = React15.useContext(PortalContainerContext);
|
|
135
|
+
if (container !== void 0) return container;
|
|
136
|
+
return typeof document === "undefined" ? null : document.getElementById(PORTAL_ROOT_ID);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/lib/utils.ts
|
|
129
140
|
function cn(...inputs) {
|
|
130
141
|
return twMerge(clsx(inputs));
|
|
131
142
|
}
|
|
132
|
-
function getThemeProviderRoot() {
|
|
133
|
-
return document.getElementById("equality-theme-provider-root-portal");
|
|
134
|
-
}
|
|
135
143
|
var iconVariants = cva(styles["icon-container"], {
|
|
136
144
|
variants: {
|
|
137
145
|
size: {
|
|
@@ -161,9 +169,9 @@ var Icon = forwardRef(
|
|
|
161
169
|
throw new Error(`Icon "${icon}" not found in lucide-react`);
|
|
162
170
|
}
|
|
163
171
|
renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles["icon"]) });
|
|
164
|
-
} else if (
|
|
172
|
+
} else if (React15.isValidElement(icon)) {
|
|
165
173
|
const existingProps = icon.props;
|
|
166
|
-
renderedIcon =
|
|
174
|
+
renderedIcon = React15.cloneElement(
|
|
167
175
|
icon,
|
|
168
176
|
{
|
|
169
177
|
...existingProps,
|
|
@@ -208,7 +216,7 @@ var defaultVariantIcons = {
|
|
|
208
216
|
warning: "OctagonAlert",
|
|
209
217
|
danger: "TriangleAlert"
|
|
210
218
|
};
|
|
211
|
-
var Alert =
|
|
219
|
+
var Alert = React15.forwardRef(
|
|
212
220
|
({ className, variant, title, description, icon, ...props }, ref) => {
|
|
213
221
|
const effectiveIcon = icon === void 0 ? variant ? defaultVariantIcons[variant] : void 0 : icon;
|
|
214
222
|
return /* @__PURE__ */ jsxs(
|
|
@@ -261,7 +269,7 @@ var buttonVariants = cva(styles3["button"], {
|
|
|
261
269
|
size: "md"
|
|
262
270
|
}
|
|
263
271
|
});
|
|
264
|
-
var Button =
|
|
272
|
+
var Button = React15.forwardRef(
|
|
265
273
|
({ className, variant, size, asChild = false, prefix, suffix, children, ...props }, ref) => {
|
|
266
274
|
const isLink = "href" in props && props.href;
|
|
267
275
|
if (isLink) {
|
|
@@ -303,8 +311,8 @@ var Button = React14.forwardRef(
|
|
|
303
311
|
Button.displayName = "Button";
|
|
304
312
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
305
313
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
306
|
-
var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { container:
|
|
307
|
-
var AlertDialogOverlay =
|
|
314
|
+
var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
315
|
+
var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
308
316
|
AlertDialogPrimitive.Overlay,
|
|
309
317
|
{
|
|
310
318
|
className: cn(styles4["alert-dialog-overlay"], className),
|
|
@@ -313,7 +321,7 @@ var AlertDialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /*
|
|
|
313
321
|
}
|
|
314
322
|
));
|
|
315
323
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
316
|
-
var AlertDialogContent =
|
|
324
|
+
var AlertDialogContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
317
325
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
318
326
|
/* @__PURE__ */ jsx(
|
|
319
327
|
AlertDialogPrimitive.Content,
|
|
@@ -329,7 +337,7 @@ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div",
|
|
|
329
337
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
330
338
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles4["alert-dialog-footer"], className), ...props });
|
|
331
339
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
332
|
-
var AlertDialogTitle =
|
|
340
|
+
var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
333
341
|
AlertDialogPrimitive.Title,
|
|
334
342
|
{
|
|
335
343
|
ref,
|
|
@@ -338,7 +346,7 @@ var AlertDialogTitle = React14.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
338
346
|
}
|
|
339
347
|
));
|
|
340
348
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
341
|
-
var AlertDialogDescription =
|
|
349
|
+
var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
342
350
|
AlertDialogPrimitive.Description,
|
|
343
351
|
{
|
|
344
352
|
ref,
|
|
@@ -347,7 +355,7 @@ var AlertDialogDescription = React14.forwardRef(({ className, ...props }, ref) =
|
|
|
347
355
|
}
|
|
348
356
|
));
|
|
349
357
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
350
|
-
var AlertDialogAction =
|
|
358
|
+
var AlertDialogAction = React15.forwardRef(({ className, variant = "primary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
351
359
|
AlertDialogPrimitive.Action,
|
|
352
360
|
{
|
|
353
361
|
ref,
|
|
@@ -361,7 +369,7 @@ var AlertDialogAction = React14.forwardRef(({ className, variant = "primary", si
|
|
|
361
369
|
}
|
|
362
370
|
));
|
|
363
371
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
364
|
-
var AlertDialogCancel =
|
|
372
|
+
var AlertDialogCancel = React15.forwardRef(({ className, variant = "tertiary", size = "sm", prefix, suffix, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
365
373
|
AlertDialogPrimitive.Cancel,
|
|
366
374
|
{
|
|
367
375
|
ref,
|
|
@@ -375,7 +383,7 @@ var AlertDialogCancel = React14.forwardRef(({ className, variant = "tertiary", s
|
|
|
375
383
|
}
|
|
376
384
|
));
|
|
377
385
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
378
|
-
var Avatar =
|
|
386
|
+
var Avatar = React15.forwardRef(
|
|
379
387
|
({ className, size = "md", shape = "circle", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
380
388
|
AvatarPrimitive.Root,
|
|
381
389
|
{
|
|
@@ -386,9 +394,9 @@ var Avatar = React14.forwardRef(
|
|
|
386
394
|
)
|
|
387
395
|
);
|
|
388
396
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
389
|
-
var AvatarImage =
|
|
397
|
+
var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(styles5["avatar-image"], className), ...props }));
|
|
390
398
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
391
|
-
var AvatarFallback =
|
|
399
|
+
var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
392
400
|
AvatarPrimitive.Fallback,
|
|
393
401
|
{
|
|
394
402
|
ref,
|
|
@@ -400,8 +408,8 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
|
400
408
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
401
409
|
var Tooltip = TooltipPrimitive.Root;
|
|
402
410
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
403
|
-
var TooltipPortal = ({ children }) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container:
|
|
404
|
-
var TooltipContent =
|
|
411
|
+
var TooltipPortal = ({ children }) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: usePortalContainer(), children });
|
|
412
|
+
var TooltipContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(
|
|
405
413
|
TooltipPrimitive.Content,
|
|
406
414
|
{
|
|
407
415
|
ref,
|
|
@@ -519,10 +527,10 @@ function Badge({
|
|
|
519
527
|
}
|
|
520
528
|
);
|
|
521
529
|
}
|
|
522
|
-
var BarGraphSegment =
|
|
530
|
+
var BarGraphSegment = React15.forwardRef(
|
|
523
531
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
524
532
|
({ value, color, label, tooltip, className, style, ...props }, ref) => {
|
|
525
|
-
const tooltipId =
|
|
533
|
+
const tooltipId = React15.useId();
|
|
526
534
|
return (
|
|
527
535
|
// Widths are proportional (`value / sum`): each segment grows by its `value`
|
|
528
536
|
// within the flex row, so the parent never needs to know the total.
|
|
@@ -573,9 +581,9 @@ var barVariants = cva(styles8["bar"], {
|
|
|
573
581
|
size: "md"
|
|
574
582
|
}
|
|
575
583
|
});
|
|
576
|
-
var BarGraph =
|
|
584
|
+
var BarGraph = React15.forwardRef(
|
|
577
585
|
({ className, children, showLabels = false, size, ...props }, ref) => {
|
|
578
|
-
const validChildren =
|
|
586
|
+
const validChildren = React15.Children.toArray(children).filter(React15.isValidElement);
|
|
579
587
|
const segments = validChildren.filter(
|
|
580
588
|
(child) => child.type === BarGraphSegment
|
|
581
589
|
);
|
|
@@ -937,7 +945,7 @@ var CardContentHeader = forwardRef(
|
|
|
937
945
|
);
|
|
938
946
|
CardContentHeader.displayName = "CardContentHeader";
|
|
939
947
|
var cardElevationVariants = generateElevationVariants(styles12, "card", ELEVATION.RAISED);
|
|
940
|
-
var Card =
|
|
948
|
+
var Card = React15.forwardRef(({ className, hoverGradientClassName, elevation = ELEVATION.RAISED, ...props }, ref) => {
|
|
941
949
|
const shouldHaveHoverStyle = props.onClick !== void 0;
|
|
942
950
|
return /* @__PURE__ */ jsxs(
|
|
943
951
|
"div",
|
|
@@ -958,28 +966,28 @@ var Card = React14.forwardRef(({ className, hoverGradientClassName, elevation =
|
|
|
958
966
|
);
|
|
959
967
|
});
|
|
960
968
|
Card.displayName = "Card";
|
|
961
|
-
var CardHeader =
|
|
969
|
+
var CardHeader = React15.forwardRef(
|
|
962
970
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-header"], className), ...props })
|
|
963
971
|
);
|
|
964
972
|
CardHeader.displayName = "CardHeader";
|
|
965
|
-
var CardTitle =
|
|
973
|
+
var CardTitle = React15.forwardRef(
|
|
966
974
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-title"], className), ...props })
|
|
967
975
|
);
|
|
968
976
|
CardTitle.displayName = "CardTitle";
|
|
969
|
-
var CardDescription =
|
|
977
|
+
var CardDescription = React15.forwardRef(
|
|
970
978
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-description"], className), ...props })
|
|
971
979
|
);
|
|
972
980
|
CardDescription.displayName = "CardDescription";
|
|
973
|
-
var CardContent =
|
|
981
|
+
var CardContent = React15.forwardRef(
|
|
974
982
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-content"], className), ...props })
|
|
975
983
|
);
|
|
976
984
|
CardContent.displayName = "CardContent";
|
|
977
|
-
var CardFooter =
|
|
985
|
+
var CardFooter = React15.forwardRef(
|
|
978
986
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles12["card-footer"], className), ...props })
|
|
979
987
|
);
|
|
980
988
|
CardFooter.displayName = "CardFooter";
|
|
981
989
|
var CheckIcon = Check;
|
|
982
|
-
var Checkbox =
|
|
990
|
+
var Checkbox = React15.forwardRef(
|
|
983
991
|
({ className, icon: Icon3, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
984
992
|
CheckboxPrimitive.Root,
|
|
985
993
|
{
|
|
@@ -1065,7 +1073,7 @@ function CopyButton({
|
|
|
1065
1073
|
className,
|
|
1066
1074
|
onClick
|
|
1067
1075
|
}) {
|
|
1068
|
-
const [copied, setCopied] =
|
|
1076
|
+
const [copied, setCopied] = React15.useState(false);
|
|
1069
1077
|
const handleCopy = async () => {
|
|
1070
1078
|
try {
|
|
1071
1079
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
@@ -1261,9 +1269,9 @@ var CodeBlock = ({
|
|
|
1261
1269
|
};
|
|
1262
1270
|
var Dialog = DialogPrimitive.Root;
|
|
1263
1271
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1264
|
-
var DialogPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container:
|
|
1272
|
+
var DialogPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1265
1273
|
var DialogClose = DialogPrimitive.Close;
|
|
1266
|
-
var DialogOverlay =
|
|
1274
|
+
var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1267
1275
|
DialogPrimitive.Overlay,
|
|
1268
1276
|
{
|
|
1269
1277
|
ref,
|
|
@@ -1272,7 +1280,7 @@ var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1272
1280
|
}
|
|
1273
1281
|
));
|
|
1274
1282
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1275
|
-
var DialogContainer =
|
|
1283
|
+
var DialogContainer = React15.forwardRef(({ className, children, size = "md", ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
1276
1284
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
1277
1285
|
/* @__PURE__ */ jsx(
|
|
1278
1286
|
DialogPrimitive.Content,
|
|
@@ -1292,12 +1300,12 @@ DialogContainer.displayName = DialogPrimitive.Content.displayName;
|
|
|
1292
1300
|
var DialogHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles16["dialog-header-icon"], className), ...props });
|
|
1293
1301
|
DialogHeaderIcon.displayName = "DialogHeaderIcon";
|
|
1294
1302
|
var DialogHeader = ({ className, children, ...props }) => {
|
|
1295
|
-
const childrenArray =
|
|
1303
|
+
const childrenArray = React15.Children.toArray(children);
|
|
1296
1304
|
const icon = childrenArray.find(
|
|
1297
|
-
(child) =>
|
|
1305
|
+
(child) => React15.isValidElement(child) && child.type === DialogHeaderIcon
|
|
1298
1306
|
);
|
|
1299
1307
|
const otherChildren = childrenArray.filter(
|
|
1300
|
-
(child) => !(
|
|
1308
|
+
(child) => !(React15.isValidElement(child) && child.type === DialogHeaderIcon)
|
|
1301
1309
|
);
|
|
1302
1310
|
return /* @__PURE__ */ jsxs("div", { className: cn(styles16["dialog-header"], className), ...props, children: [
|
|
1303
1311
|
icon,
|
|
@@ -1308,9 +1316,9 @@ var DialogHeader = ({ className, children, ...props }) => {
|
|
|
1308
1316
|
DialogHeader.displayName = "DialogHeader";
|
|
1309
1317
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles16["dialog-footer"], className), ...props });
|
|
1310
1318
|
DialogFooter.displayName = "DialogFooter";
|
|
1311
|
-
var DialogTitle =
|
|
1319
|
+
var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles16["dialog-title"], className), ...props }));
|
|
1312
1320
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1313
|
-
var DialogDescription =
|
|
1321
|
+
var DialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1314
1322
|
DialogPrimitive.Description,
|
|
1315
1323
|
{
|
|
1316
1324
|
ref,
|
|
@@ -1422,8 +1430,8 @@ function CommandShortcut({ className, ...props }) {
|
|
|
1422
1430
|
}
|
|
1423
1431
|
var Popover = PopoverPrimitive.Root;
|
|
1424
1432
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1425
|
-
var PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container:
|
|
1426
|
-
var PopoverContent =
|
|
1433
|
+
var PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1434
|
+
var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, arrow = false, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsxs(
|
|
1427
1435
|
PopoverPrimitive.Content,
|
|
1428
1436
|
{
|
|
1429
1437
|
ref,
|
|
@@ -1731,9 +1739,9 @@ var Drawer = ({
|
|
|
1731
1739
|
}) => /* @__PURE__ */ jsx(Drawer$1.Root, { shouldScaleBackground, ...props });
|
|
1732
1740
|
Drawer.displayName = "Drawer";
|
|
1733
1741
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
1734
|
-
var DrawerPortal = ({ children }) => /* @__PURE__ */ jsx(Drawer$1.Portal, { container:
|
|
1742
|
+
var DrawerPortal = ({ children }) => /* @__PURE__ */ jsx(Drawer$1.Portal, { container: usePortalContainer(), children });
|
|
1735
1743
|
var DrawerClose = Drawer$1.Close;
|
|
1736
|
-
var DrawerOverlay =
|
|
1744
|
+
var DrawerOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1737
1745
|
Drawer$1.Overlay,
|
|
1738
1746
|
{
|
|
1739
1747
|
ref,
|
|
@@ -1742,7 +1750,7 @@ var DrawerOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1742
1750
|
}
|
|
1743
1751
|
));
|
|
1744
1752
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
1745
|
-
var DrawerContent =
|
|
1753
|
+
var DrawerContent = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
1746
1754
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
1747
1755
|
/* @__PURE__ */ jsxs(
|
|
1748
1756
|
Drawer$1.Content,
|
|
@@ -1760,7 +1768,7 @@ var DrawerContent = React14.forwardRef(({ className, children, ...props }, ref)
|
|
|
1760
1768
|
DrawerContent.displayName = "DrawerContent";
|
|
1761
1769
|
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles21["drawer-header"], className), ...props });
|
|
1762
1770
|
DrawerHeader.displayName = "DrawerHeader";
|
|
1763
|
-
var DrawerHeaderActions =
|
|
1771
|
+
var DrawerHeaderActions = React15.forwardRef(({ className, rowSpan, style, ...props }, ref) => {
|
|
1764
1772
|
return /* @__PURE__ */ jsx(
|
|
1765
1773
|
"div",
|
|
1766
1774
|
{
|
|
@@ -1774,9 +1782,9 @@ var DrawerHeaderActions = React14.forwardRef(({ className, rowSpan, style, ...pr
|
|
|
1774
1782
|
DrawerHeaderActions.displayName = "DrawerHeaderActions";
|
|
1775
1783
|
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles21["drawer-footer"], className), ...props });
|
|
1776
1784
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1777
|
-
var DrawerTitle =
|
|
1785
|
+
var DrawerTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Title, { ref, className: cn(styles21["drawer-title"], className), ...props }));
|
|
1778
1786
|
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
1779
|
-
var DrawerDescription =
|
|
1787
|
+
var DrawerDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1780
1788
|
Drawer$1.Description,
|
|
1781
1789
|
{
|
|
1782
1790
|
ref,
|
|
@@ -1791,19 +1799,19 @@ var CheckIcon2 = Check;
|
|
|
1791
1799
|
var ChevronRightIcon2 = ChevronRight;
|
|
1792
1800
|
var CircleIcon = Circle;
|
|
1793
1801
|
var SearchIcon2 = Search;
|
|
1794
|
-
var DropdownMenuSearchContext =
|
|
1795
|
-
var useDropdownMenuSearch = () =>
|
|
1802
|
+
var DropdownMenuSearchContext = React15.createContext(null);
|
|
1803
|
+
var useDropdownMenuSearch = () => React15.useContext(DropdownMenuSearchContext);
|
|
1796
1804
|
var useIsSearching = () => {
|
|
1797
1805
|
const ctx = useDropdownMenuSearch();
|
|
1798
1806
|
return !!ctx && ctx.query.trim().length > 0;
|
|
1799
1807
|
};
|
|
1800
|
-
var DropdownMenuBreadcrumbContext =
|
|
1801
|
-
var useBreadcrumbAncestry = () =>
|
|
1808
|
+
var DropdownMenuBreadcrumbContext = React15.createContext([]);
|
|
1809
|
+
var useBreadcrumbAncestry = () => React15.useContext(DropdownMenuBreadcrumbContext);
|
|
1802
1810
|
function getNodeText(node) {
|
|
1803
1811
|
if (node == null || typeof node === "boolean") return "";
|
|
1804
1812
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
1805
1813
|
if (Array.isArray(node)) return node.map(getNodeText).join("");
|
|
1806
|
-
if (
|
|
1814
|
+
if (React15.isValidElement(node)) {
|
|
1807
1815
|
return getNodeText(node.props.children);
|
|
1808
1816
|
}
|
|
1809
1817
|
return "";
|
|
@@ -1811,7 +1819,7 @@ function getNodeText(node) {
|
|
|
1811
1819
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
1812
1820
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
1813
1821
|
function hasDisplayName(node, name) {
|
|
1814
|
-
return
|
|
1822
|
+
return React15.isValidElement(node) && typeof node.type !== "string" && node.type.displayName === name;
|
|
1815
1823
|
}
|
|
1816
1824
|
var isSubContent = (node) => hasDisplayName(node, SUB_CONTENT_NAME);
|
|
1817
1825
|
var isSubTrigger = (node) => hasDisplayName(node, SUB_TRIGGER_NAME);
|
|
@@ -1819,8 +1827,8 @@ function findSubContentChildren(nodes) {
|
|
|
1819
1827
|
let result = null;
|
|
1820
1828
|
let done = false;
|
|
1821
1829
|
const walk = (ns) => {
|
|
1822
|
-
|
|
1823
|
-
if (done || !
|
|
1830
|
+
React15.Children.forEach(ns, (child) => {
|
|
1831
|
+
if (done || !React15.isValidElement(child)) return;
|
|
1824
1832
|
if (isSubContent(child)) {
|
|
1825
1833
|
result = child.props.children ?? null;
|
|
1826
1834
|
done = true;
|
|
@@ -1834,18 +1842,18 @@ function findSubContentChildren(nodes) {
|
|
|
1834
1842
|
return result;
|
|
1835
1843
|
}
|
|
1836
1844
|
function getSubTriggerLabel(nodes) {
|
|
1837
|
-
const trigger =
|
|
1845
|
+
const trigger = React15.Children.toArray(nodes).find(isSubTrigger);
|
|
1838
1846
|
return trigger ? getNodeText(trigger.props.children) : "";
|
|
1839
1847
|
}
|
|
1840
1848
|
function useFilterableItem(textValue, children) {
|
|
1841
1849
|
const ctx = useDropdownMenuSearch();
|
|
1842
|
-
const id =
|
|
1850
|
+
const id = React15.useId();
|
|
1843
1851
|
const query = ctx?.query.trim().toLowerCase() ?? "";
|
|
1844
1852
|
const visible = !query || (textValue ?? getNodeText(children)).toLowerCase().includes(query);
|
|
1845
1853
|
const enabled = ctx?.enabled ?? false;
|
|
1846
1854
|
const registerItem = ctx?.registerItem;
|
|
1847
1855
|
const unregisterItem = ctx?.unregisterItem;
|
|
1848
|
-
|
|
1856
|
+
React15.useEffect(() => {
|
|
1849
1857
|
if (!enabled || !registerItem || !unregisterItem) return;
|
|
1850
1858
|
registerItem(id, visible);
|
|
1851
1859
|
return () => unregisterItem(id);
|
|
@@ -1857,40 +1865,40 @@ var DropdownMenu = ({
|
|
|
1857
1865
|
onOpenChange,
|
|
1858
1866
|
...props
|
|
1859
1867
|
}) => {
|
|
1860
|
-
const [enabled, setEnabled] =
|
|
1861
|
-
const [visible, setVisible] =
|
|
1862
|
-
const [query, setQuery] =
|
|
1863
|
-
const [focusSignal, setFocusSignal] =
|
|
1864
|
-
const requestFocus =
|
|
1865
|
-
const [listId, setListId] =
|
|
1866
|
-
const itemsRef =
|
|
1867
|
-
const [matchCount, setMatchCount] =
|
|
1868
|
-
const recount =
|
|
1868
|
+
const [enabled, setEnabled] = React15.useState(false);
|
|
1869
|
+
const [visible, setVisible] = React15.useState(false);
|
|
1870
|
+
const [query, setQuery] = React15.useState("");
|
|
1871
|
+
const [focusSignal, setFocusSignal] = React15.useState(0);
|
|
1872
|
+
const requestFocus = React15.useCallback(() => setFocusSignal((n) => n + 1), []);
|
|
1873
|
+
const [listId, setListId] = React15.useState(void 0);
|
|
1874
|
+
const itemsRef = React15.useRef(/* @__PURE__ */ new Map());
|
|
1875
|
+
const [matchCount, setMatchCount] = React15.useState(0);
|
|
1876
|
+
const recount = React15.useCallback(() => {
|
|
1869
1877
|
let count2 = 0;
|
|
1870
1878
|
itemsRef.current.forEach((matches) => {
|
|
1871
1879
|
if (matches) count2 += 1;
|
|
1872
1880
|
});
|
|
1873
1881
|
setMatchCount(count2);
|
|
1874
1882
|
}, []);
|
|
1875
|
-
const registerItem =
|
|
1883
|
+
const registerItem = React15.useCallback(
|
|
1876
1884
|
(id, matches) => {
|
|
1877
1885
|
itemsRef.current.set(id, matches);
|
|
1878
1886
|
recount();
|
|
1879
1887
|
},
|
|
1880
1888
|
[recount]
|
|
1881
1889
|
);
|
|
1882
|
-
const unregisterItem =
|
|
1890
|
+
const unregisterItem = React15.useCallback(
|
|
1883
1891
|
(id) => {
|
|
1884
1892
|
itemsRef.current.delete(id);
|
|
1885
1893
|
recount();
|
|
1886
1894
|
},
|
|
1887
1895
|
[recount]
|
|
1888
1896
|
);
|
|
1889
|
-
const reveal =
|
|
1897
|
+
const reveal = React15.useCallback((seed) => {
|
|
1890
1898
|
setVisible(true);
|
|
1891
1899
|
setQuery(seed);
|
|
1892
1900
|
}, []);
|
|
1893
|
-
const handleOpenChange =
|
|
1901
|
+
const handleOpenChange = React15.useCallback(
|
|
1894
1902
|
(open) => {
|
|
1895
1903
|
if (open) {
|
|
1896
1904
|
setVisible(false);
|
|
@@ -1900,7 +1908,7 @@ var DropdownMenu = ({
|
|
|
1900
1908
|
},
|
|
1901
1909
|
[onOpenChange]
|
|
1902
1910
|
);
|
|
1903
|
-
const value =
|
|
1911
|
+
const value = React15.useMemo(
|
|
1904
1912
|
() => ({
|
|
1905
1913
|
enabled,
|
|
1906
1914
|
setEnabled,
|
|
@@ -1933,9 +1941,9 @@ var DropdownMenu = ({
|
|
|
1933
1941
|
};
|
|
1934
1942
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1935
1943
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1936
|
-
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container:
|
|
1944
|
+
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: usePortalContainer(), children });
|
|
1937
1945
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1938
|
-
var DropdownMenuSubTrigger =
|
|
1946
|
+
var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
1939
1947
|
const searching = useIsSearching();
|
|
1940
1948
|
if (searching) return null;
|
|
1941
1949
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1956,7 +1964,7 @@ var DropdownMenuSubTrigger = React14.forwardRef(({ className, inset, children, .
|
|
|
1956
1964
|
);
|
|
1957
1965
|
});
|
|
1958
1966
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1959
|
-
var DropdownMenuSubContent =
|
|
1967
|
+
var DropdownMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1960
1968
|
DropdownMenuPrimitive.SubContent,
|
|
1961
1969
|
{
|
|
1962
1970
|
ref,
|
|
@@ -1979,12 +1987,12 @@ var DropdownMenuSub = ({
|
|
|
1979
1987
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { ...props, children });
|
|
1980
1988
|
};
|
|
1981
1989
|
var MENU_ITEM_SELECTOR = '[role="menuitem"]:not([data-disabled]),[role="menuitemcheckbox"]:not([data-disabled]),[role="menuitemradio"]:not([data-disabled])';
|
|
1982
|
-
var DropdownMenuContent =
|
|
1990
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, onKeyDown, children, ...props }, ref) => {
|
|
1983
1991
|
const ctx = useDropdownMenuSearch();
|
|
1984
1992
|
const setListId = ctx?.setListId;
|
|
1985
1993
|
const searching = !!ctx && ctx.query.trim().length > 0;
|
|
1986
1994
|
const resultCount = ctx?.matchCount ?? 0;
|
|
1987
|
-
const composedContentRef =
|
|
1995
|
+
const composedContentRef = React15.useCallback(
|
|
1988
1996
|
(node) => {
|
|
1989
1997
|
assignRefs(node, ref);
|
|
1990
1998
|
setListId?.(node?.id || void 0);
|
|
@@ -2041,7 +2049,7 @@ function assignRefs(node, ...refs) {
|
|
|
2041
2049
|
else if (ref) ref.current = node;
|
|
2042
2050
|
});
|
|
2043
2051
|
}
|
|
2044
|
-
var DropdownMenuSearch =
|
|
2052
|
+
var DropdownMenuSearch = React15.forwardRef(
|
|
2045
2053
|
({
|
|
2046
2054
|
className,
|
|
2047
2055
|
placeholder = "Search...",
|
|
@@ -2058,12 +2066,12 @@ var DropdownMenuSearch = React14.forwardRef(
|
|
|
2058
2066
|
throw new Error("DropdownMenuSearch must be used within a DropdownMenu");
|
|
2059
2067
|
}
|
|
2060
2068
|
const { setEnabled, reveal, visible, focusSignal } = ctx;
|
|
2061
|
-
const inputRef =
|
|
2062
|
-
|
|
2069
|
+
const inputRef = React15.useRef(null);
|
|
2070
|
+
React15.useEffect(() => {
|
|
2063
2071
|
setEnabled(true);
|
|
2064
2072
|
return () => setEnabled(false);
|
|
2065
2073
|
}, [setEnabled]);
|
|
2066
|
-
|
|
2074
|
+
React15.useEffect(() => {
|
|
2067
2075
|
if (!visible) return;
|
|
2068
2076
|
const el = inputRef.current;
|
|
2069
2077
|
if (!el) return;
|
|
@@ -2071,7 +2079,7 @@ var DropdownMenuSearch = React14.forwardRef(
|
|
|
2071
2079
|
const end = el.value.length;
|
|
2072
2080
|
el.setSelectionRange(end, end);
|
|
2073
2081
|
}, [visible, focusSignal]);
|
|
2074
|
-
|
|
2082
|
+
React15.useEffect(() => {
|
|
2075
2083
|
if (alwaysVisible && !visible) reveal("");
|
|
2076
2084
|
}, [alwaysVisible, visible, reveal]);
|
|
2077
2085
|
if (!alwaysVisible && !visible) return null;
|
|
@@ -2137,12 +2145,12 @@ DropdownMenuEmpty.displayName = "DropdownMenuEmpty";
|
|
|
2137
2145
|
var ItemBreadcrumb = () => {
|
|
2138
2146
|
const ancestry = useBreadcrumbAncestry();
|
|
2139
2147
|
if (!ancestry.length) return null;
|
|
2140
|
-
return /* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-breadcrumb"], "aria-hidden": "true", children: ancestry.map((crumb, index) => /* @__PURE__ */ jsxs(
|
|
2148
|
+
return /* @__PURE__ */ jsx("span", { className: styles22["dropdown-menu-breadcrumb"], "aria-hidden": "true", children: ancestry.map((crumb, index) => /* @__PURE__ */ jsxs(React15.Fragment, { children: [
|
|
2141
2149
|
crumb,
|
|
2142
2150
|
/* @__PURE__ */ jsx(ChevronRightIcon2, {})
|
|
2143
2151
|
] }, index)) });
|
|
2144
2152
|
};
|
|
2145
|
-
var DropdownMenuItem =
|
|
2153
|
+
var DropdownMenuItem = React15.forwardRef(({ className, inset, variant = "neutral", textValue, children, ...props }, ref) => {
|
|
2146
2154
|
const visible = useFilterableItem(textValue, children);
|
|
2147
2155
|
if (!visible) return null;
|
|
2148
2156
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2165,7 +2173,7 @@ var DropdownMenuItem = React14.forwardRef(({ className, inset, variant = "neutra
|
|
|
2165
2173
|
);
|
|
2166
2174
|
});
|
|
2167
2175
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2168
|
-
var DropdownMenuCheckboxItem =
|
|
2176
|
+
var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checked, textValue, ...props }, ref) => {
|
|
2169
2177
|
const visible = useFilterableItem(textValue, children);
|
|
2170
2178
|
if (!visible) return null;
|
|
2171
2179
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2185,7 +2193,7 @@ var DropdownMenuCheckboxItem = React14.forwardRef(({ className, children, checke
|
|
|
2185
2193
|
);
|
|
2186
2194
|
});
|
|
2187
2195
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2188
|
-
var DropdownMenuRadioItem =
|
|
2196
|
+
var DropdownMenuRadioItem = React15.forwardRef(({ className, children, textValue, ...props }, ref) => {
|
|
2189
2197
|
const visible = useFilterableItem(textValue, children);
|
|
2190
2198
|
if (!visible) return null;
|
|
2191
2199
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2204,7 +2212,7 @@ var DropdownMenuRadioItem = React14.forwardRef(({ className, children, textValue
|
|
|
2204
2212
|
);
|
|
2205
2213
|
});
|
|
2206
2214
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2207
|
-
var DropdownMenuLabel =
|
|
2215
|
+
var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => {
|
|
2208
2216
|
const searching = useIsSearching();
|
|
2209
2217
|
if (searching) return null;
|
|
2210
2218
|
return /* @__PURE__ */ jsx(
|
|
@@ -2221,7 +2229,7 @@ var DropdownMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2221
2229
|
);
|
|
2222
2230
|
});
|
|
2223
2231
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2224
|
-
var DropdownMenuSeparator =
|
|
2232
|
+
var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2225
2233
|
const searching = useIsSearching();
|
|
2226
2234
|
if (searching) return null;
|
|
2227
2235
|
return /* @__PURE__ */ jsx(
|
|
@@ -2325,18 +2333,18 @@ var FilterDropdown = ({
|
|
|
2325
2333
|
] });
|
|
2326
2334
|
};
|
|
2327
2335
|
var labelVariants = cva(styles25["label"]);
|
|
2328
|
-
var Label2 =
|
|
2336
|
+
var Label2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
2329
2337
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2330
2338
|
var Form = FormProvider;
|
|
2331
|
-
var FormFieldContext =
|
|
2339
|
+
var FormFieldContext = React15.createContext({});
|
|
2332
2340
|
var FormField = ({
|
|
2333
2341
|
...props
|
|
2334
2342
|
}) => {
|
|
2335
2343
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
2336
2344
|
};
|
|
2337
2345
|
var useFormField = () => {
|
|
2338
|
-
const fieldContext =
|
|
2339
|
-
const itemContext =
|
|
2346
|
+
const fieldContext = React15.useContext(FormFieldContext);
|
|
2347
|
+
const itemContext = React15.useContext(FormItemContext);
|
|
2340
2348
|
const { getFieldState, formState } = useFormContext();
|
|
2341
2349
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2342
2350
|
if (!fieldContext) {
|
|
@@ -2352,15 +2360,15 @@ var useFormField = () => {
|
|
|
2352
2360
|
...fieldState
|
|
2353
2361
|
};
|
|
2354
2362
|
};
|
|
2355
|
-
var FormItemContext =
|
|
2356
|
-
var FormItem =
|
|
2363
|
+
var FormItemContext = React15.createContext({});
|
|
2364
|
+
var FormItem = React15.forwardRef(
|
|
2357
2365
|
({ className, ...props }, ref) => {
|
|
2358
|
-
const id =
|
|
2366
|
+
const id = React15.useId();
|
|
2359
2367
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(styles26["form-item"], className), ...props }) });
|
|
2360
2368
|
}
|
|
2361
2369
|
);
|
|
2362
2370
|
FormItem.displayName = "FormItem";
|
|
2363
|
-
var FormLabel =
|
|
2371
|
+
var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2364
2372
|
const { error, formItemId } = useFormField();
|
|
2365
2373
|
return /* @__PURE__ */ jsx(
|
|
2366
2374
|
Label2,
|
|
@@ -2373,7 +2381,7 @@ var FormLabel = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
2373
2381
|
);
|
|
2374
2382
|
});
|
|
2375
2383
|
FormLabel.displayName = "FormLabel";
|
|
2376
|
-
var FormControl =
|
|
2384
|
+
var FormControl = React15.forwardRef(({ ...props }, ref) => {
|
|
2377
2385
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2378
2386
|
return /* @__PURE__ */ jsx(
|
|
2379
2387
|
Slot,
|
|
@@ -2387,7 +2395,7 @@ var FormControl = React14.forwardRef(({ ...props }, ref) => {
|
|
|
2387
2395
|
);
|
|
2388
2396
|
});
|
|
2389
2397
|
FormControl.displayName = "FormControl";
|
|
2390
|
-
var FormDescription =
|
|
2398
|
+
var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
|
|
2391
2399
|
const { formDescriptionId } = useFormField();
|
|
2392
2400
|
return /* @__PURE__ */ jsx(
|
|
2393
2401
|
"p",
|
|
@@ -2400,7 +2408,7 @@ var FormDescription = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
2400
2408
|
);
|
|
2401
2409
|
});
|
|
2402
2410
|
FormDescription.displayName = "FormDescription";
|
|
2403
|
-
var FormMessage =
|
|
2411
|
+
var FormMessage = React15.forwardRef(({ className, children, ...props }, ref) => {
|
|
2404
2412
|
const { error, formMessageId } = useFormField();
|
|
2405
2413
|
const body = error ? String(error?.message ?? "") : children;
|
|
2406
2414
|
if (!body) {
|
|
@@ -2434,7 +2442,7 @@ var InfoCard = ({
|
|
|
2434
2442
|
] })
|
|
2435
2443
|
] }) }) });
|
|
2436
2444
|
};
|
|
2437
|
-
var Input =
|
|
2445
|
+
var Input = React15.forwardRef(
|
|
2438
2446
|
({ className, type, prefix, suffix, ...props }, ref) => {
|
|
2439
2447
|
return /* @__PURE__ */ jsxs("div", { className: cn(styles28["input-wrapper"], className), children: [
|
|
2440
2448
|
prefix && /* @__PURE__ */ jsx("span", { className: styles28["input-prefix"], children: prefix }),
|
|
@@ -2610,12 +2618,12 @@ var ChevronUpIcon = ChevronUp;
|
|
|
2610
2618
|
var Select = SelectPrimitive.Root;
|
|
2611
2619
|
var SelectGroup = SelectPrimitive.Group;
|
|
2612
2620
|
var SelectValue = SelectPrimitive.Value;
|
|
2613
|
-
var SelectTrigger =
|
|
2621
|
+
var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn(styles35["select-trigger"], className), ...props, children: [
|
|
2614
2622
|
children,
|
|
2615
2623
|
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(styles35["select-icon"], styles35["select-icon--low-opacity"]) }) })
|
|
2616
2624
|
] }));
|
|
2617
2625
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2618
|
-
var SelectScrollUpButton =
|
|
2626
|
+
var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2619
2627
|
SelectPrimitive.ScrollUpButton,
|
|
2620
2628
|
{
|
|
2621
2629
|
ref,
|
|
@@ -2625,7 +2633,7 @@ var SelectScrollUpButton = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
2625
2633
|
}
|
|
2626
2634
|
));
|
|
2627
2635
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2628
|
-
var SelectScrollDownButton =
|
|
2636
|
+
var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2629
2637
|
SelectPrimitive.ScrollDownButton,
|
|
2630
2638
|
{
|
|
2631
2639
|
ref,
|
|
@@ -2635,13 +2643,13 @@ var SelectScrollDownButton = React14.forwardRef(({ className, ...props }, ref) =
|
|
|
2635
2643
|
}
|
|
2636
2644
|
));
|
|
2637
2645
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2638
|
-
var SelectPortal = ({ children }) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container:
|
|
2646
|
+
var SelectPortal = ({ children }) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container: usePortalContainer(), children });
|
|
2639
2647
|
var selectContentElevationVariants = generateElevationVariants(
|
|
2640
2648
|
styles35,
|
|
2641
2649
|
"select-content",
|
|
2642
2650
|
ELEVATION.OVERLAY
|
|
2643
2651
|
);
|
|
2644
|
-
var SelectContent =
|
|
2652
|
+
var SelectContent = React15.forwardRef(({ className, children, position = "popper", elevation = ELEVATION.OVERLAY, ...props }, ref) => /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsxs(
|
|
2645
2653
|
SelectPrimitive.Content,
|
|
2646
2654
|
{
|
|
2647
2655
|
ref,
|
|
@@ -2670,14 +2678,14 @@ var SelectContent = React14.forwardRef(({ className, children, position = "poppe
|
|
|
2670
2678
|
}
|
|
2671
2679
|
) }));
|
|
2672
2680
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2673
|
-
var SelectLabel =
|
|
2681
|
+
var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn(styles35["select-label"], className), ...props }));
|
|
2674
2682
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2675
|
-
var SelectItem =
|
|
2683
|
+
var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, { ref, className: cn(styles35["select-item"], className), ...props, children: [
|
|
2676
2684
|
/* @__PURE__ */ jsx("span", { className: styles35["select-item-indicator"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon3, { className: styles35["select-icon"] }) }) }),
|
|
2677
2685
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
2678
2686
|
] }));
|
|
2679
2687
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2680
|
-
var SelectSeparator =
|
|
2688
|
+
var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2681
2689
|
SelectPrimitive.Separator,
|
|
2682
2690
|
{
|
|
2683
2691
|
ref,
|
|
@@ -2820,7 +2828,7 @@ var Pagination = ({
|
|
|
2820
2828
|
var PanelLabel = ({ className, label }) => {
|
|
2821
2829
|
return /* @__PURE__ */ jsx("div", { className: cn(styles37["panel-label"], className), children: label });
|
|
2822
2830
|
};
|
|
2823
|
-
var Progress =
|
|
2831
|
+
var Progress = React15.forwardRef(
|
|
2824
2832
|
({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(styles38["progress"], className), ...props, children: /* @__PURE__ */ jsx(
|
|
2825
2833
|
ProgressPrimitive.Indicator,
|
|
2826
2834
|
{
|
|
@@ -2886,24 +2894,24 @@ function ProgressIndicator({
|
|
|
2886
2894
|
"aria-label": ariaLabel = "Progress",
|
|
2887
2895
|
...props
|
|
2888
2896
|
}) {
|
|
2889
|
-
const stepChildren =
|
|
2897
|
+
const stepChildren = React15.Children.toArray(children);
|
|
2890
2898
|
const stepCount = stepChildren.length;
|
|
2891
2899
|
const hasActive = currentIndex >= 0 && currentIndex < stepCount;
|
|
2892
2900
|
const segmentSize = stepCount > 0 ? 100 / stepCount : 0;
|
|
2893
2901
|
const isLastStep = currentIndex === stepCount - 1;
|
|
2894
2902
|
const fillSize = hasActive ? isLastStep ? 100 : (currentIndex + 0.5) * segmentSize : 0;
|
|
2895
2903
|
const steps = stepChildren.map((child, index) => {
|
|
2896
|
-
if (!
|
|
2904
|
+
if (!React15.isValidElement(child) || child.type !== ProgressIndicatorStep) {
|
|
2897
2905
|
throw new Error("ProgressIndicator only accepts <ProgressIndicatorStep> children.");
|
|
2898
2906
|
}
|
|
2899
|
-
return
|
|
2907
|
+
return React15.cloneElement(child, {
|
|
2900
2908
|
index,
|
|
2901
2909
|
currentIndex,
|
|
2902
2910
|
elevation
|
|
2903
2911
|
});
|
|
2904
2912
|
});
|
|
2905
2913
|
const interactive = stepChildren.some((child) => {
|
|
2906
|
-
if (!
|
|
2914
|
+
if (!React15.isValidElement(child)) return false;
|
|
2907
2915
|
const stepProps = child.props;
|
|
2908
2916
|
return Boolean(stepProps.href || stepProps.onClick);
|
|
2909
2917
|
});
|
|
@@ -3107,7 +3115,7 @@ var RadioDropdown = ({
|
|
|
3107
3115
|
] });
|
|
3108
3116
|
};
|
|
3109
3117
|
var CircleIcon2 = Circle;
|
|
3110
|
-
var RadioGroup2 =
|
|
3118
|
+
var RadioGroup2 = React15.forwardRef(({ className, ...props }, ref) => {
|
|
3111
3119
|
return /* @__PURE__ */ jsx(
|
|
3112
3120
|
RadioGroupPrimitive.Root,
|
|
3113
3121
|
{
|
|
@@ -3118,7 +3126,7 @@ var RadioGroup2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
3118
3126
|
);
|
|
3119
3127
|
});
|
|
3120
3128
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3121
|
-
var RadioGroupItem =
|
|
3129
|
+
var RadioGroupItem = React15.forwardRef(({ className, ...props }, ref) => {
|
|
3122
3130
|
return /* @__PURE__ */ jsx(
|
|
3123
3131
|
RadioGroupPrimitive.Item,
|
|
3124
3132
|
{
|
|
@@ -3130,13 +3138,13 @@ var RadioGroupItem = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
3130
3138
|
);
|
|
3131
3139
|
});
|
|
3132
3140
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
3133
|
-
var ScrollArea =
|
|
3141
|
+
var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ref, className: cn(styles43["scroll-area"], className), ...props, children: [
|
|
3134
3142
|
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: styles43["scroll-area-viewport"], children }),
|
|
3135
3143
|
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
3136
3144
|
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
3137
3145
|
] }));
|
|
3138
3146
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3139
|
-
var ScrollBar =
|
|
3147
|
+
var ScrollBar = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3140
3148
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3141
3149
|
{
|
|
3142
3150
|
ref,
|
|
@@ -3271,7 +3279,7 @@ var SegmentedControls = ({
|
|
|
3271
3279
|
)
|
|
3272
3280
|
] });
|
|
3273
3281
|
};
|
|
3274
|
-
var Separator3 =
|
|
3282
|
+
var Separator3 = React15.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3275
3283
|
SeparatorPrimitive.Root,
|
|
3276
3284
|
{
|
|
3277
3285
|
ref,
|
|
@@ -3289,8 +3297,8 @@ Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
3289
3297
|
var Sheet = DialogPrimitive.Root;
|
|
3290
3298
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
3291
3299
|
var SheetClose = DialogPrimitive.Close;
|
|
3292
|
-
var SheetPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container:
|
|
3293
|
-
var SheetOverlay =
|
|
3300
|
+
var SheetPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: usePortalContainer(), children });
|
|
3301
|
+
var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cn(styles48["sheet-overlay"], className), ...props, ref }));
|
|
3294
3302
|
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
3295
3303
|
var sheetVariants = cva(styles48["sheet-content"], {
|
|
3296
3304
|
variants: {
|
|
@@ -3305,7 +3313,7 @@ var sheetVariants = cva(styles48["sheet-content"], {
|
|
|
3305
3313
|
side: "right"
|
|
3306
3314
|
}
|
|
3307
3315
|
});
|
|
3308
|
-
var SheetContainer =
|
|
3316
|
+
var SheetContainer = React15.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
3309
3317
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
3310
3318
|
/* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children })
|
|
3311
3319
|
] }));
|
|
@@ -3313,12 +3321,12 @@ SheetContainer.displayName = DialogPrimitive.Content.displayName;
|
|
|
3313
3321
|
var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles48["sheet-header-icon"], className), ...props });
|
|
3314
3322
|
SheetHeaderIcon.displayName = "SheetHeaderIcon";
|
|
3315
3323
|
var SheetHeader = ({ className, children, ...props }) => {
|
|
3316
|
-
const childrenArray =
|
|
3324
|
+
const childrenArray = React15.Children.toArray(children);
|
|
3317
3325
|
const icon = childrenArray.find(
|
|
3318
|
-
(child) =>
|
|
3326
|
+
(child) => React15.isValidElement(child) && child.type === SheetHeaderIcon
|
|
3319
3327
|
);
|
|
3320
3328
|
const otherChildren = childrenArray.filter(
|
|
3321
|
-
(child) => !(
|
|
3329
|
+
(child) => !(React15.isValidElement(child) && child.type === SheetHeaderIcon)
|
|
3322
3330
|
);
|
|
3323
3331
|
return /* @__PURE__ */ jsxs("div", { className: cn(styles48["sheet-header"], className), ...props, children: [
|
|
3324
3332
|
icon,
|
|
@@ -3329,9 +3337,9 @@ var SheetHeader = ({ className, children, ...props }) => {
|
|
|
3329
3337
|
SheetHeader.displayName = "SheetHeader";
|
|
3330
3338
|
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles48["sheet-footer"], className), ...props });
|
|
3331
3339
|
SheetFooter.displayName = "SheetFooter";
|
|
3332
|
-
var SheetTitle =
|
|
3340
|
+
var SheetTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles48["sheet-title"], className), ...props }));
|
|
3333
3341
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3334
|
-
var SheetDescription =
|
|
3342
|
+
var SheetDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3335
3343
|
DialogPrimitive.Description,
|
|
3336
3344
|
{
|
|
3337
3345
|
ref,
|
|
@@ -3416,7 +3424,7 @@ function SortSelector({
|
|
|
3416
3424
|
)
|
|
3417
3425
|
] });
|
|
3418
3426
|
}
|
|
3419
|
-
var Switch =
|
|
3427
|
+
var Switch = React15.forwardRef(
|
|
3420
3428
|
({ className, size = "md", variant = "default", thumbIcon, ...props }, ref) => {
|
|
3421
3429
|
const iconSize = size === "sm" ? "xs" : size === "md" ? "sm" : "md";
|
|
3422
3430
|
return /* @__PURE__ */ jsx(
|
|
@@ -3454,7 +3462,7 @@ function SortButton({
|
|
|
3454
3462
|
] });
|
|
3455
3463
|
}
|
|
3456
3464
|
var tableElevationVariants = generateElevationVariants(styles53, "table", ELEVATION.RAISED);
|
|
3457
|
-
var TableContainer =
|
|
3465
|
+
var TableContainer = React15.forwardRef(({ className, style, elevation = ELEVATION.RAISED, border, columns, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3458
3466
|
"div",
|
|
3459
3467
|
{
|
|
3460
3468
|
className: cn(
|
|
@@ -3468,7 +3476,7 @@ var TableContainer = React14.forwardRef(({ className, style, elevation = ELEVATI
|
|
|
3468
3476
|
}
|
|
3469
3477
|
));
|
|
3470
3478
|
TableContainer.displayName = "Table";
|
|
3471
|
-
var TableHeader =
|
|
3479
|
+
var TableHeader = React15.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3472
3480
|
"thead",
|
|
3473
3481
|
{
|
|
3474
3482
|
ref,
|
|
@@ -3482,11 +3490,11 @@ var TableHeader = React14.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
3482
3490
|
}
|
|
3483
3491
|
));
|
|
3484
3492
|
TableHeader.displayName = "TableHeader";
|
|
3485
|
-
var TableBody =
|
|
3493
|
+
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn(styles53["table-body"], className), ...props }));
|
|
3486
3494
|
TableBody.displayName = "TableBody";
|
|
3487
|
-
var TableFooter =
|
|
3495
|
+
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles53["table-footer"], className), ...props }));
|
|
3488
3496
|
TableFooter.displayName = "TableFooter";
|
|
3489
|
-
var TableRow =
|
|
3497
|
+
var TableRow = React15.forwardRef(
|
|
3490
3498
|
({ className, clickable, href, hrefLabel = "View details", children, onClick, ...props }, ref) => {
|
|
3491
3499
|
const isClickable = clickable || !!href;
|
|
3492
3500
|
const handleClick = (e) => {
|
|
@@ -3517,18 +3525,18 @@ var TableRow = React14.forwardRef(
|
|
|
3517
3525
|
}
|
|
3518
3526
|
);
|
|
3519
3527
|
TableRow.displayName = "TableRow";
|
|
3520
|
-
var TableHead =
|
|
3528
|
+
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles53["table-head"], className), ...props }));
|
|
3521
3529
|
TableHead.displayName = "TableHead";
|
|
3522
|
-
var TableCell =
|
|
3530
|
+
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className: cn(styles53["table-cell"], className), ...props }));
|
|
3523
3531
|
TableCell.displayName = "TableCell";
|
|
3524
|
-
var TableCaption =
|
|
3532
|
+
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn(styles53["table-caption"], className), ...props }));
|
|
3525
3533
|
TableCaption.displayName = "TableCaption";
|
|
3526
3534
|
var TabsContainer = TabsPrimitive.Root;
|
|
3527
|
-
var TabsList =
|
|
3535
|
+
var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, className: cn(styles54["tabs-list"], className), ...props }));
|
|
3528
3536
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3529
|
-
var TabsTrigger =
|
|
3537
|
+
var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ref, className: cn(styles54["tabs-trigger"], className), ...props }));
|
|
3530
3538
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3531
|
-
var TabsContent =
|
|
3539
|
+
var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles54["tabs-content"], className), ...props }));
|
|
3532
3540
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3533
3541
|
var Tabs = ({
|
|
3534
3542
|
id,
|
|
@@ -3607,7 +3615,7 @@ var Tabs = ({
|
|
|
3607
3615
|
}
|
|
3608
3616
|
);
|
|
3609
3617
|
};
|
|
3610
|
-
var Textarea =
|
|
3618
|
+
var Textarea = React15.forwardRef(
|
|
3611
3619
|
({ className, ...props }, ref) => {
|
|
3612
3620
|
return /* @__PURE__ */ jsx("textarea", { className: cn(styles56["textarea"], className), ref, ...props });
|
|
3613
3621
|
}
|
|
@@ -3669,12 +3677,12 @@ function FormatDate({
|
|
|
3669
3677
|
...props
|
|
3670
3678
|
}) {
|
|
3671
3679
|
const missing = isMissing(date);
|
|
3672
|
-
const parsed =
|
|
3673
|
-
const [now, setNow] =
|
|
3674
|
-
const [mounted, setMounted] =
|
|
3680
|
+
const parsed = React15.useMemo(() => isMissing(date) ? null : toDate(date), [date]);
|
|
3681
|
+
const [now, setNow] = React15.useState(() => /* @__PURE__ */ new Date());
|
|
3682
|
+
const [mounted, setMounted] = React15.useState(false);
|
|
3675
3683
|
const isRelative = displayAs === "relative";
|
|
3676
|
-
|
|
3677
|
-
|
|
3684
|
+
React15.useEffect(() => setMounted(true), []);
|
|
3685
|
+
React15.useEffect(() => {
|
|
3678
3686
|
if (!isRelative || !live) return;
|
|
3679
3687
|
const id = setInterval(() => setNow(/* @__PURE__ */ new Date()), LIVE_INTERVAL_MS);
|
|
3680
3688
|
return () => clearInterval(id);
|
|
@@ -3715,7 +3723,7 @@ function FormatDate({
|
|
|
3715
3723
|
}
|
|
3716
3724
|
var XIcon2 = X;
|
|
3717
3725
|
var ToastProvider = ToastPrimitives.Provider;
|
|
3718
|
-
var ToastViewport =
|
|
3726
|
+
var ToastViewport = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3719
3727
|
ToastPrimitives.Viewport,
|
|
3720
3728
|
{
|
|
3721
3729
|
ref,
|
|
@@ -3737,7 +3745,7 @@ var toastVariants = cva(styles58["toast"], {
|
|
|
3737
3745
|
variant: "default"
|
|
3738
3746
|
}
|
|
3739
3747
|
});
|
|
3740
|
-
var ToastContainer =
|
|
3748
|
+
var ToastContainer = React15.forwardRef(({ className, variant, ...props }, ref) => {
|
|
3741
3749
|
return /* @__PURE__ */ jsx(
|
|
3742
3750
|
ToastPrimitives.Root,
|
|
3743
3751
|
{
|
|
@@ -3748,13 +3756,13 @@ var ToastContainer = React14.forwardRef(({ className, variant, ...props }, ref)
|
|
|
3748
3756
|
);
|
|
3749
3757
|
});
|
|
3750
3758
|
ToastContainer.displayName = ToastPrimitives.Root.displayName;
|
|
3751
|
-
var ToastAction =
|
|
3759
|
+
var ToastAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, { ref, className: cn(styles58["toast-action"], className), ...props }));
|
|
3752
3760
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
3753
|
-
var ToastClose =
|
|
3761
|
+
var ToastClose = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, { ref, className: cn(styles58["toast-close"], className), ...props, children: /* @__PURE__ */ jsx(XIcon2, { className: styles58["toast-close-icon"] }) }));
|
|
3754
3762
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
3755
|
-
var ToastTitle =
|
|
3763
|
+
var ToastTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles58["toast-title"], className), ...props }));
|
|
3756
3764
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
3757
|
-
var ToastDescription =
|
|
3765
|
+
var ToastDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3758
3766
|
ToastPrimitives.Description,
|
|
3759
3767
|
{
|
|
3760
3768
|
ref,
|
|
@@ -4057,16 +4065,29 @@ var CircleCheckFillIcon = ({ className }) => {
|
|
|
4057
4065
|
}
|
|
4058
4066
|
);
|
|
4059
4067
|
};
|
|
4060
|
-
var Portal8 = () => {
|
|
4061
|
-
return /* @__PURE__ */ jsx("div", { id:
|
|
4062
|
-
};
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
+
var Portal8 = React15.forwardRef((_props, ref) => {
|
|
4069
|
+
return /* @__PURE__ */ jsx("div", { id: PORTAL_ROOT_ID, ref });
|
|
4070
|
+
});
|
|
4071
|
+
Portal8.displayName = "Portal";
|
|
4072
|
+
var PortalContainerProvider = ({ container, children }) => /* @__PURE__ */ jsx(PortalContainerContext.Provider, { value: container, children });
|
|
4073
|
+
var ThemeProvider = ({ customVars, portalContainer, children }) => {
|
|
4074
|
+
const [ownPortalContainer, setOwnPortalContainer] = React15.useState(null);
|
|
4075
|
+
const usesOwnPortal = portalContainer === void 0;
|
|
4076
|
+
return /* @__PURE__ */ jsx(PortalContainerProvider, { container: usesOwnPortal ? ownPortalContainer : portalContainer, children: /* @__PURE__ */ jsxs(
|
|
4077
|
+
"div",
|
|
4078
|
+
{
|
|
4079
|
+
id: "equality-theme-provider-root",
|
|
4080
|
+
"data-equality-root": true,
|
|
4081
|
+
className: styles63.root,
|
|
4082
|
+
style: customVars,
|
|
4083
|
+
children: [
|
|
4084
|
+
children,
|
|
4085
|
+
usesOwnPortal && /* @__PURE__ */ jsx(Portal8, { ref: setOwnPortalContainer })
|
|
4086
|
+
]
|
|
4087
|
+
}
|
|
4088
|
+
) });
|
|
4068
4089
|
};
|
|
4069
4090
|
|
|
4070
|
-
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, SegmentedControls, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
|
|
4091
|
+
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEmpty, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSearch, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, PORTAL_ROOT_ID, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, SegmentedControls, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, toast, useFormField, usePortalContainer, useTheme, useToast };
|
|
4071
4092
|
//# sourceMappingURL=index.js.map
|
|
4072
4093
|
//# sourceMappingURL=index.js.map
|