@eqtylab/equality 0.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.
Files changed (94) hide show
  1. package/LICENSE +190 -0
  2. package/dist/alert-dialog.module.module.css.module.css +275 -0
  3. package/dist/alert.module.module.css.module.css +112 -0
  4. package/dist/avatar.module.module.css.module.css +119 -0
  5. package/dist/badge.module.module.css.module.css +141 -0
  6. package/dist/bg-gradient.module.module.css.module.css +7 -0
  7. package/dist/button.module.module.css.module.css +253 -0
  8. package/dist/card-content-header.module.module.css.module.css +27 -0
  9. package/dist/card.module.module.css.module.css +246 -0
  10. package/dist/checkbox.module.module.css.module.css +124 -0
  11. package/dist/code-block.module.module.css.module.css +100 -0
  12. package/dist/command.module.module.css.module.css +210 -0
  13. package/dist/control-status-badge.module.module.css.module.css +49 -0
  14. package/dist/date-range-picker.module.module.css.module.css +147 -0
  15. package/dist/dialog.module.module.css.module.css +300 -0
  16. package/dist/display-field.module.module.css.module.css +250 -0
  17. package/dist/drawer.module.module.css.module.css +202 -0
  18. package/dist/dropdown-menu.module.module.css.module.css +271 -0
  19. package/dist/empty-table-state.module.module.css.module.css +34 -0
  20. package/dist/filter-dropdown.module.module.css.module.css +18 -0
  21. package/dist/form.module.module.css.module.css +35 -0
  22. package/dist/generated/color-vars.css +354 -0
  23. package/dist/generated/dark-tokens.css +105 -0
  24. package/dist/generated/global-dark-tokens.css +105 -0
  25. package/dist/generated/global-light-tokens.css +254 -0
  26. package/dist/generated/light-tokens.css +254 -0
  27. package/dist/generated/tailwind-tokens.css +252 -0
  28. package/dist/global-theme-config.css +15 -0
  29. package/dist/heading.module.module.css.module.css +41 -0
  30. package/dist/icon-button.module.module.css.module.css +196 -0
  31. package/dist/icon.module.module.css.module.css +155 -0
  32. package/dist/index.cjs +3419 -0
  33. package/dist/index.cjs.map +1 -0
  34. package/dist/index.d.cts +819 -0
  35. package/dist/index.d.ts +819 -0
  36. package/dist/index.js +3134 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/info-card.module.module.css.module.css +25 -0
  39. package/dist/input.module.module.css.module.css +231 -0
  40. package/dist/label.module.module.css.module.css +23 -0
  41. package/dist/list-or-grid-view-toggle.module.module.css.module.css +52 -0
  42. package/dist/loading-overlay.module.module.css.module.css +151 -0
  43. package/dist/metric-card.module.module.css.module.css +171 -0
  44. package/dist/motion-collapsible.module.module.css.module.css +4 -0
  45. package/dist/page-not-found.module.module.css.module.css +71 -0
  46. package/dist/pagination.module.module.css.module.css +21 -0
  47. package/dist/panel-label.module.module.css.module.css +17 -0
  48. package/dist/popover.module.module.css.module.css +136 -0
  49. package/dist/progress.module.module.css.module.css +32 -0
  50. package/dist/radial-graph.module.module.css.module.css +223 -0
  51. package/dist/radio-dropdown.module.module.css.module.css +16 -0
  52. package/dist/radio-group.module.module.css.module.css +118 -0
  53. package/dist/resource-badge.module.module.css.module.css +77 -0
  54. package/dist/scripts.cjs +116 -0
  55. package/dist/scripts.cjs.map +1 -0
  56. package/dist/scripts.d.cts +5 -0
  57. package/dist/scripts.d.ts +5 -0
  58. package/dist/scripts.js +114 -0
  59. package/dist/scripts.js.map +1 -0
  60. package/dist/scroll-area.module.module.css.module.css +46 -0
  61. package/dist/search-bar.module.module.css.module.css +9 -0
  62. package/dist/section-heading.module.module.css.module.css +42 -0
  63. package/dist/select.module.module.css.module.css +362 -0
  64. package/dist/separator.module.module.css.module.css +13 -0
  65. package/dist/sheet.module.module.css.module.css +377 -0
  66. package/dist/skeleton.module.module.css.module.css +11 -0
  67. package/dist/sort-button.module.module.css.module.css +42 -0
  68. package/dist/sort-selector.module.module.css.module.css +11 -0
  69. package/dist/spinner.module.module.css.module.css +82 -0
  70. package/dist/switch.module.module.css.module.css +226 -0
  71. package/dist/table-components.module.module.css.module.css +116 -0
  72. package/dist/table.module.module.css.module.css +145 -0
  73. package/dist/tabs-components.module.module.css.module.css +136 -0
  74. package/dist/tabs.module.module.css.module.css +139 -0
  75. package/dist/textarea.module.module.css.module.css +115 -0
  76. package/dist/theme/lib/utils.cjs +125 -0
  77. package/dist/theme/lib/utils.cjs.map +1 -0
  78. package/dist/theme/lib/utils.d.cts +26 -0
  79. package/dist/theme/lib/utils.d.ts +26 -0
  80. package/dist/theme/lib/utils.js +110 -0
  81. package/dist/theme/lib/utils.js.map +1 -0
  82. package/dist/theme-base.css +51 -0
  83. package/dist/theme-components.css +27 -0
  84. package/dist/theme-preflight-global.css +260 -0
  85. package/dist/theme-preflight-scoped.css +261 -0
  86. package/dist/theme-utilities.css +54 -0
  87. package/dist/theme.module.css +15 -0
  88. package/dist/theme.module.module.css.module.css +978 -0
  89. package/dist/toast-components.module.module.css.module.css +393 -0
  90. package/dist/toast.module.module.css.module.css +11 -0
  91. package/dist/tokens.css +3 -0
  92. package/dist/tooltip.module.module.css.module.css +139 -0
  93. package/dist/truncated-description.module.module.css.module.css +15 -0
  94. package/package.json +101 -0
package/dist/index.js ADDED
@@ -0,0 +1,3134 @@
1
+ import * as React15 from 'react';
2
+ import { forwardRef, useRef, useMemo, useEffect, useSyncExternalStore, useState } from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import styles from './alert.module.module.css.module.css';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
9
+ import styles3 from './alert-dialog.module.module.css.module.css';
10
+ import { Slot } from '@radix-ui/react-slot';
11
+ import styles2 from './button.module.module.css.module.css';
12
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
13
+ import styles4 from './avatar.module.module.css.module.css';
14
+ import * as LucideIcons from 'lucide-react';
15
+ import { Check, ChevronRight, Circle, ChevronDown, ChevronUp, X, SearchIcon, CalendarDays, ChevronLeft, Grid3X3, List, AlertOctagon, Home, Search, ArrowUp, ArrowDown, ArrowUpDown, TriangleAlert } from 'lucide-react';
16
+ import styles7 from './badge.module.module.css.module.css';
17
+ import styles5 from './icon.module.module.css.module.css';
18
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
19
+ import styles6 from './tooltip.module.module.css.module.css';
20
+ import styles8 from './bg-gradient.module.module.css.module.css';
21
+ import styles9 from './resource-badge.module.module.css.module.css';
22
+ import styles10 from './card-content-header.module.module.css.module.css';
23
+ import styles11 from './card.module.module.css.module.css';
24
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
25
+ import styles12 from './checkbox.module.module.css.module.css';
26
+ import { Prism } from 'react-syntax-highlighter';
27
+ import darkStyle from 'react-syntax-highlighter/dist/esm/styles/prism/a11y-dark';
28
+ import lightStyle from 'react-syntax-highlighter/dist/esm/styles/prism/prism';
29
+ import styles14 from './code-block.module.module.css.module.css';
30
+ import styles13 from './icon-button.module.module.css.module.css';
31
+ import { Command as Command$1 } from 'cmdk';
32
+ import styles16 from './command.module.module.css.module.css';
33
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
34
+ import styles15 from './dialog.module.module.css.module.css';
35
+ import styles18 from './date-range-picker.module.module.css.module.css';
36
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
37
+ import styles17 from './popover.module.module.css.module.css';
38
+ import Truncate from 'react-truncate-inside';
39
+ import styles19 from './display-field.module.module.css.module.css';
40
+ import { Drawer as Drawer$1 } from 'vaul';
41
+ import styles20 from './drawer.module.module.css.module.css';
42
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
43
+ import styles21 from './dropdown-menu.module.module.css.module.css';
44
+ import styles22 from './empty-table-state.module.module.css.module.css';
45
+ import styles23 from './filter-dropdown.module.module.css.module.css';
46
+ import { useFormContext, FormProvider, Controller } from 'react-hook-form';
47
+ import styles25 from './form.module.module.css.module.css';
48
+ import * as LabelPrimitive from '@radix-ui/react-label';
49
+ import styles24 from './label.module.module.css.module.css';
50
+ import styles26 from './info-card.module.module.css.module.css';
51
+ import styles27 from './input.module.module.css.module.css';
52
+ import styles28 from './list-or-grid-view-toggle.module.module.css.module.css';
53
+ import styles30 from './loading-overlay.module.module.css.module.css';
54
+ import styles29 from './spinner.module.module.css.module.css';
55
+ import styles31 from './metric-card.module.module.css.module.css';
56
+ import { AnimatePresence, motion } from 'motion/react';
57
+ import styles32 from './motion-collapsible.module.module.css.module.css';
58
+ import styles33 from './page-not-found.module.module.css.module.css';
59
+ import styles35 from './pagination.module.module.css.module.css';
60
+ import * as SelectPrimitive from '@radix-ui/react-select';
61
+ import styles34 from './select.module.module.css.module.css';
62
+ import styles36 from './panel-label.module.module.css.module.css';
63
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
64
+ import styles37 from './progress.module.module.css.module.css';
65
+ import styles38 from './radial-graph.module.module.css.module.css';
66
+ import styles39 from './radio-dropdown.module.module.css.module.css';
67
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
68
+ import styles40 from './radio-group.module.module.css.module.css';
69
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
70
+ import styles41 from './scroll-area.module.module.css.module.css';
71
+ import styles42 from './search-bar.module.module.css.module.css';
72
+ import styles43 from './section-heading.module.module.css.module.css';
73
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
74
+ import styles44 from './separator.module.module.css.module.css';
75
+ import styles45 from './sheet.module.module.css.module.css';
76
+ import styles46 from './skeleton.module.module.css.module.css';
77
+ import styles47 from './sort-selector.module.module.css.module.css';
78
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
79
+ import styles48 from './switch.module.module.css.module.css';
80
+ import styles49 from './sort-button.module.module.css.module.css';
81
+ import styles50 from './table-components.module.module.css.module.css';
82
+ import styles51 from './table.module.module.css.module.css';
83
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
84
+ import styles52 from './tabs-components.module.module.css.module.css';
85
+ import styles53 from './tabs.module.module.css.module.css';
86
+ import styles54 from './textarea.module.module.css.module.css';
87
+ import * as ToastPrimitives from '@radix-ui/react-toast';
88
+ import styles55 from './toast-components.module.module.css.module.css';
89
+ import styles56 from './toast.module.module.css.module.css';
90
+ import styles57 from './truncated-description.module.module.css.module.css';
91
+ import styles58 from './heading.module.module.css.module.css';
92
+ import styles59 from './control-status-badge.module.module.css.module.css';
93
+ import styles60 from './theme.module.module.css.module.css';
94
+
95
+ // src/components/alert/alert.tsx
96
+ function cn(...inputs) {
97
+ return twMerge(clsx(inputs));
98
+ }
99
+ function getThemeProviderRoot() {
100
+ return document.getElementById("equality-theme-provider-root-portal");
101
+ }
102
+ var alertVariants = cva(styles["alert"], {
103
+ variants: {
104
+ variant: {
105
+ default: styles["alert--default"],
106
+ success: styles["alert--success"],
107
+ warning: styles["alert--warning"],
108
+ danger: styles["alert--danger"]
109
+ }
110
+ },
111
+ defaultVariants: {
112
+ variant: "default"
113
+ }
114
+ });
115
+ var Alert = React15.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
116
+ Alert.displayName = "Alert";
117
+ var AlertTitle = React15.forwardRef(
118
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("h5", { ref, className: cn(styles["alert-title"], className), ...props })
119
+ );
120
+ AlertTitle.displayName = "AlertTitle";
121
+ var AlertDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles["alert-description"], className), ...props }));
122
+ AlertDescription.displayName = "AlertDescription";
123
+ var buttonVariants = cva(styles2["button"], {
124
+ variants: {
125
+ variant: {
126
+ primary: styles2["button--primary"],
127
+ danger: styles2["button--danger"],
128
+ secondary: styles2["button--secondary"],
129
+ tertiary: styles2["button--tertiary"],
130
+ link: styles2["button--link"]
131
+ },
132
+ size: {
133
+ sm: styles2["size--sm"],
134
+ md: styles2["size--md"],
135
+ lg: styles2["size--lg"]
136
+ }
137
+ },
138
+ defaultVariants: {
139
+ variant: "primary",
140
+ size: "md"
141
+ }
142
+ });
143
+ var Button = React15.forwardRef(
144
+ ({ className, variant, size, asChild = false, prefix, suffix, children, ...props }, ref) => {
145
+ const isLink = "href" in props && props.href;
146
+ if (isLink) {
147
+ const { href, target, rel, download, ...anchorProps } = props;
148
+ return /* @__PURE__ */ jsxs(
149
+ "a",
150
+ {
151
+ href,
152
+ target,
153
+ rel,
154
+ download,
155
+ className: cn(buttonVariants({ variant, size, className })),
156
+ ref,
157
+ ...anchorProps,
158
+ children: [
159
+ prefix,
160
+ children,
161
+ suffix
162
+ ]
163
+ }
164
+ );
165
+ }
166
+ const Comp = asChild ? Slot : "button";
167
+ return /* @__PURE__ */ jsxs(
168
+ Comp,
169
+ {
170
+ className: cn(buttonVariants({ variant, size, className })),
171
+ ref,
172
+ ...props,
173
+ children: [
174
+ prefix,
175
+ children,
176
+ suffix
177
+ ]
178
+ }
179
+ );
180
+ }
181
+ );
182
+ Button.displayName = "Button";
183
+ var AlertDialog = AlertDialogPrimitive.Root;
184
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
185
+ var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { container: getThemeProviderRoot(), children });
186
+ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
187
+ AlertDialogPrimitive.Overlay,
188
+ {
189
+ className: cn(styles3["alert-dialog-overlay"], className),
190
+ ...props,
191
+ ref
192
+ }
193
+ ));
194
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
195
+ var AlertDialogContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
196
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
197
+ /* @__PURE__ */ jsx(
198
+ AlertDialogPrimitive.Content,
199
+ {
200
+ ref,
201
+ className: cn(styles3["alert-dialog-content"], className),
202
+ ...props
203
+ }
204
+ )
205
+ ] }));
206
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
207
+ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles3["alert-dialog-header"], className), ...props });
208
+ AlertDialogHeader.displayName = "AlertDialogHeader";
209
+ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles3["alert-dialog-footer"], className), ...props });
210
+ AlertDialogFooter.displayName = "AlertDialogFooter";
211
+ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
212
+ AlertDialogPrimitive.Title,
213
+ {
214
+ ref,
215
+ className: cn(styles3["alert-dialog-title"], className),
216
+ ...props
217
+ }
218
+ ));
219
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
220
+ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
221
+ AlertDialogPrimitive.Description,
222
+ {
223
+ ref,
224
+ className: cn(styles3["alert-dialog-description"], className),
225
+ ...props
226
+ }
227
+ ));
228
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
229
+ var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
230
+ AlertDialogPrimitive.Action,
231
+ {
232
+ ref,
233
+ className: cn(buttonVariants({ variant: "primary", size: "sm" }), className),
234
+ ...props
235
+ }
236
+ ));
237
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
238
+ var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
239
+ AlertDialogPrimitive.Cancel,
240
+ {
241
+ ref,
242
+ className: cn(
243
+ buttonVariants({ variant: "tertiary", size: "sm" }),
244
+ styles3["alert-dialog-cancel"],
245
+ className
246
+ ),
247
+ ...props
248
+ }
249
+ ));
250
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
251
+ var Avatar = React15.forwardRef(
252
+ ({ className, size = "md", shape = "circle", ...props }, ref) => /* @__PURE__ */ jsx(
253
+ AvatarPrimitive.Root,
254
+ {
255
+ ref,
256
+ className: cn(styles4.avatar, styles4[size], styles4[shape], className),
257
+ ...props
258
+ }
259
+ )
260
+ );
261
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
262
+ var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(styles4["avatar-image"], className), ...props }));
263
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
264
+ var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
265
+ AvatarPrimitive.Fallback,
266
+ {
267
+ ref,
268
+ className: cn(styles4["avatar-fallback"], className),
269
+ ...props
270
+ }
271
+ ));
272
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
273
+ var ELEVATION = {
274
+ SUNKEN: "sunken",
275
+ BASE: "base",
276
+ RAISED: "raised",
277
+ OVERLAY: "overlay",
278
+ FLOATING: "floating"
279
+ };
280
+ var generateElevationVariants = (styles61, baseClassName, defaultElevation) => {
281
+ const classNames = {};
282
+ Object.values(ELEVATION).forEach((elevation) => {
283
+ classNames[elevation] = styles61[`${baseClassName}--${elevation}`];
284
+ });
285
+ const variants = cva(styles61[baseClassName], {
286
+ variants: {
287
+ elevation: classNames
288
+ },
289
+ defaultVariants: {
290
+ elevation: defaultElevation
291
+ }
292
+ });
293
+ return variants;
294
+ };
295
+ var getRelativeElevation = (elevation, offset) => {
296
+ const elevationIndex = Object.values(ELEVATION).indexOf(elevation);
297
+ const newElevationIndex = elevationIndex + offset;
298
+ const relativeElevation = Object.values(ELEVATION)[newElevationIndex];
299
+ if (!relativeElevation) {
300
+ console.warn(`Invalid elevation offset: from ${elevation} with offset ${offset}`);
301
+ }
302
+ return relativeElevation || elevation;
303
+ };
304
+ var iconVariants = cva(styles5["icon-container"], {
305
+ variants: {
306
+ size: {
307
+ xs: styles5["size--xs"],
308
+ sm: styles5["size--sm"],
309
+ md: styles5["size--md"],
310
+ lg: styles5["size--lg"]
311
+ },
312
+ background: {
313
+ square: styles5["background--square"],
314
+ circle: styles5["background--circle"],
315
+ transparent: styles5["background--transparent"]
316
+ }
317
+ },
318
+ defaultVariants: {
319
+ size: "md",
320
+ background: "transparent"
321
+ }
322
+ });
323
+ var iconElevationVariants = generateElevationVariants(styles5, "icon-container", ELEVATION.RAISED);
324
+ var Icon = forwardRef(
325
+ ({ className, size, background, icon, elevation = ELEVATION.RAISED, ...props }, ref) => {
326
+ let renderedIcon;
327
+ if (typeof icon === "string") {
328
+ const LucideIcon = LucideIcons[icon];
329
+ if (!LucideIcon) {
330
+ throw new Error(`Icon "${icon}" not found in lucide-react`);
331
+ }
332
+ renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles5["icon"]) });
333
+ } else if (React15.isValidElement(icon)) {
334
+ const existingProps = icon.props;
335
+ renderedIcon = React15.cloneElement(
336
+ icon,
337
+ {
338
+ ...existingProps,
339
+ className: cn(styles5["icon"], existingProps.className)
340
+ }
341
+ );
342
+ } else {
343
+ throw new Error("Icon must be either a string (Lucide icon name) or a React element");
344
+ }
345
+ return /* @__PURE__ */ jsx(
346
+ "div",
347
+ {
348
+ ref,
349
+ className: cn(
350
+ iconVariants({ size, background }),
351
+ iconElevationVariants({ elevation }),
352
+ className
353
+ ),
354
+ ...props,
355
+ children: renderedIcon
356
+ }
357
+ );
358
+ }
359
+ );
360
+ Icon.displayName = "Icon";
361
+ var TooltipProvider = TooltipPrimitive.Provider;
362
+ var Tooltip = TooltipPrimitive.Root;
363
+ var TooltipTrigger = TooltipPrimitive.Trigger;
364
+ var TooltipPortal = ({ children }) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { container: getThemeProviderRoot(), children });
365
+ var TooltipContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsxs(
366
+ TooltipPrimitive.Content,
367
+ {
368
+ ref,
369
+ sideOffset,
370
+ className: cn(styles6["tooltip-content"], className),
371
+ ...props,
372
+ children: [
373
+ props.children,
374
+ /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { width: 18, height: 6, className: styles6["tooltip-arrow"] })
375
+ ]
376
+ }
377
+ ) }));
378
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
379
+ var XIcon = X;
380
+ var badgeVariants = cva(styles7["badge"], {
381
+ variants: {
382
+ variant: {
383
+ primary: styles7["badge--primary"],
384
+ danger: styles7["badge--danger"],
385
+ neutral: styles7["badge--neutral"],
386
+ warning: styles7["badge--warning"],
387
+ success: styles7["badge--success"]
388
+ }
389
+ },
390
+ defaultVariants: {
391
+ variant: "primary"
392
+ }
393
+ });
394
+ var defaultVariantIcons = {
395
+ success: "Check",
396
+ warning: "OctagonAlert",
397
+ danger: "TriangleAlert"
398
+ };
399
+ function Badge({
400
+ className,
401
+ variant,
402
+ closeable,
403
+ handleClosable,
404
+ truncate = false,
405
+ truncateLength = 50,
406
+ icon,
407
+ display = "both",
408
+ ...props
409
+ }) {
410
+ const effectiveIcon = icon ?? (variant ? defaultVariantIcons[variant] : void 0);
411
+ const renderClosable = () => {
412
+ if (closeable && handleClosable)
413
+ return /* @__PURE__ */ jsx(
414
+ Button,
415
+ {
416
+ variant: "tertiary",
417
+ size: "sm",
418
+ onClick: handleClosable,
419
+ className: styles7["closable-btn"],
420
+ children: /* @__PURE__ */ jsx(XIcon, {})
421
+ }
422
+ );
423
+ return null;
424
+ };
425
+ const renderChildren = () => {
426
+ const children = props.children;
427
+ if (truncate && typeof children === "string" && children.length > truncateLength) {
428
+ const displayLabel = children.slice(0, truncateLength) + "...";
429
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
430
+ /* @__PURE__ */ jsx(TooltipTrigger, { children: displayLabel }),
431
+ /* @__PURE__ */ jsx(TooltipContent, { className: styles7["tooltip"], children })
432
+ ] }) });
433
+ }
434
+ return children;
435
+ };
436
+ const renderIcon = () => {
437
+ if (effectiveIcon && display !== "text-only") {
438
+ return /* @__PURE__ */ jsx(Icon, { icon: effectiveIcon, size: "xs", className: styles7["icon"] });
439
+ }
440
+ return null;
441
+ };
442
+ const effectiveDisplay = display === "icon-only" && !effectiveIcon ? "both" : display;
443
+ const shouldShowChildren = effectiveDisplay !== "icon-only";
444
+ const isIconOnly = effectiveDisplay === "icon-only" && effectiveIcon;
445
+ return /* @__PURE__ */ jsxs(
446
+ "div",
447
+ {
448
+ className: cn(
449
+ variant !== null && badgeVariants({ variant }),
450
+ variant === null && styles7["badge"],
451
+ isIconOnly && styles7["badge--icon-only"],
452
+ className
453
+ ),
454
+ ...props,
455
+ children: [
456
+ renderIcon(),
457
+ shouldShowChildren && renderChildren(),
458
+ renderClosable()
459
+ ]
460
+ }
461
+ );
462
+ }
463
+
464
+ // ../tokens/equality-tokens.json
465
+ var equality_tokens_default = {
466
+ Light: {
467
+ color: {
468
+ brand: {
469
+ green: {
470
+ $type: "color",
471
+ $value: {
472
+ colorSpace: "display-p3",
473
+ components: [0.4374, 0.6383, 0.4134],
474
+ hex: "#70A369"
475
+ }
476
+ },
477
+ primary: {
478
+ $type: "color",
479
+ $value: {
480
+ colorSpace: "display-p3",
481
+ components: [0.7319, 0.6108, 0.8873],
482
+ hex: "#BB9CE2"
483
+ }
484
+ },
485
+ red: {
486
+ $type: "color",
487
+ $value: {
488
+ colorSpace: "display-p3",
489
+ components: [0.8114, 0.4167, 0.3761],
490
+ hex: "#CF6A60"
491
+ }
492
+ },
493
+ secondary: {
494
+ $type: "color",
495
+ $value: {
496
+ colorSpace: "display-p3",
497
+ components: [0.3895, 0.4853, 0.8187],
498
+ hex: "#637CD1"
499
+ }
500
+ },
501
+ yellow: {
502
+ $type: "color",
503
+ $value: {
504
+ colorSpace: "display-p3",
505
+ components: [0.863, 0.6958, 0.4108],
506
+ hex: "#DCB169"
507
+ }
508
+ }
509
+ }}
510
+ }
511
+ };
512
+ var getBrandColors = () => {
513
+ const brandColors = equality_tokens_default.Light.color.brand;
514
+ const colors = {};
515
+ Object.entries(brandColors).forEach(([key, value]) => {
516
+ if (value.$value) {
517
+ const hex = value.$value.hex;
518
+ colors[key] = // Remove alpha channel on hex string (last 2 chars)
519
+ hex.slice(0, 7) || "#000000";
520
+ }
521
+ });
522
+ return colors;
523
+ };
524
+ var getThemeColour = (theme, brandColors) => {
525
+ return brandColors[theme] || "#000000";
526
+ };
527
+ var BgGradient = ({
528
+ theme,
529
+ placement = "full"
530
+ }) => {
531
+ const canvasRef = useRef(null);
532
+ const brandColors = useMemo(() => getBrandColors(), []);
533
+ useEffect(() => {
534
+ const canvas = canvasRef.current;
535
+ if (!canvas) return;
536
+ const ctx = canvas.getContext("2d");
537
+ if (!ctx) return;
538
+ const updateSize = () => {
539
+ canvas.width = window.innerWidth;
540
+ canvas.height = window.innerHeight;
541
+ };
542
+ updateSize();
543
+ window.addEventListener("resize", updateSize);
544
+ const blobs = placement === "full" ? [
545
+ {
546
+ x: -0.15,
547
+ y: -0.15,
548
+ size: 0.45,
549
+ animation: { duration: 1e4, offset: 0 }
550
+ },
551
+ {
552
+ x: 1.25,
553
+ y: 0,
554
+ size: 0.45,
555
+ animation: { duration: 12e3, offset: 2e3 }
556
+ },
557
+ {
558
+ x: 0,
559
+ y: 1.5,
560
+ size: 0.4,
561
+ animation: { duration: 14e3, offset: 1e3 }
562
+ },
563
+ {
564
+ x: 0.9,
565
+ y: 1.25,
566
+ size: 0.6,
567
+ animation: { duration: 14e3, offset: 0 }
568
+ }
569
+ ] : [
570
+ {
571
+ x: -0.1,
572
+ y: -0.25,
573
+ size: 0.3,
574
+ animation: { duration: 1e4, offset: 0 }
575
+ },
576
+ {
577
+ x: 1,
578
+ y: -0.25,
579
+ size: 0.3,
580
+ animation: { duration: 12e3, offset: 2e3 }
581
+ }
582
+ ];
583
+ const themeColourBlobs = getThemeColour(theme, brandColors);
584
+ let animationFrame;
585
+ const animate = () => {
586
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
587
+ const currentTime = Date.now();
588
+ blobs.forEach((blob) => {
589
+ const progress = (currentTime + blob.animation.offset) % blob.animation.duration / blob.animation.duration;
590
+ const scale = 1 + Math.sin(progress * Math.PI * 2) * 0.2;
591
+ const moveX = Math.sin(progress * Math.PI * 2) * 0.1;
592
+ const moveY = Math.cos(progress * Math.PI * 2) * 0.1;
593
+ const gradient = ctx.createRadialGradient(
594
+ (blob.x + moveX) * canvas.width,
595
+ (blob.y + moveY) * canvas.height,
596
+ 0,
597
+ (blob.x + moveX) * canvas.width,
598
+ (blob.y + moveY) * canvas.height,
599
+ blob.size * Math.max(canvas.width, 800) * scale
600
+ );
601
+ const opacity = 85;
602
+ gradient.addColorStop(0, `${themeColourBlobs}${opacity}` || "#00000040");
603
+ gradient.addColorStop(1, "transparent");
604
+ ctx.fillStyle = gradient;
605
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
606
+ });
607
+ animationFrame = requestAnimationFrame(animate);
608
+ };
609
+ animate();
610
+ return () => {
611
+ window.removeEventListener("resize", updateSize);
612
+ cancelAnimationFrame(animationFrame);
613
+ };
614
+ }, [theme, placement, brandColors]);
615
+ return /* @__PURE__ */ jsx("canvas", { ref: canvasRef, className: styles8["bg-gradient"] });
616
+ };
617
+ var ResourceBadge = ({ type, display = "both" }) => {
618
+ const config = getTypeConfig(type);
619
+ return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display, className: config.className, variant: null, children: config.label });
620
+ };
621
+ var getTypeConfig = (type) => {
622
+ switch (type) {
623
+ case "agent":
624
+ return {
625
+ icon: "Bot",
626
+ className: styles9["badge--agent"],
627
+ label: "Agent"
628
+ };
629
+ case "benchmark":
630
+ return {
631
+ icon: "LineChart",
632
+ className: styles9["badge--benchmark"],
633
+ label: "Benchmark"
634
+ };
635
+ case "code":
636
+ return {
637
+ icon: "Code",
638
+ className: styles9["badge--code"],
639
+ label: "Code"
640
+ };
641
+ case "compute":
642
+ return {
643
+ icon: "Cpu",
644
+ className: styles9["badge--compute"],
645
+ label: "Compute"
646
+ };
647
+ case "database":
648
+ return {
649
+ icon: "Database",
650
+ className: styles9["badge--database"],
651
+ label: "Database"
652
+ };
653
+ case "dataset":
654
+ return {
655
+ icon: "Table",
656
+ className: styles9["badge--dataset"],
657
+ label: "Dataset"
658
+ };
659
+ case "document":
660
+ return {
661
+ icon: "FileText",
662
+ className: styles9["badge--document"],
663
+ label: "Document"
664
+ };
665
+ case "guard":
666
+ return {
667
+ icon: "Shield",
668
+ className: styles9["badge--guard"],
669
+ label: "Guard"
670
+ };
671
+ case "guardrail":
672
+ return {
673
+ icon: "Fence",
674
+ className: styles9["badge--guardrail"],
675
+ label: "Guardrail"
676
+ };
677
+ case "inference":
678
+ return {
679
+ icon: "Zap",
680
+ className: styles9["badge--inference"],
681
+ label: "Inference"
682
+ };
683
+ case "model":
684
+ return {
685
+ icon: "Brain",
686
+ className: styles9["badge--model"],
687
+ label: "Model"
688
+ };
689
+ case "prompt":
690
+ return {
691
+ icon: "MessageSquareText",
692
+ className: styles9["badge--prompt"],
693
+ label: "Prompt"
694
+ };
695
+ case "system-prompt":
696
+ return {
697
+ icon: "MessageSquareCode",
698
+ className: styles9["badge--system-prompt"],
699
+ label: "System Prompt"
700
+ };
701
+ case "context":
702
+ return {
703
+ icon: "MessageSquareQuote",
704
+ className: styles9["badge--context"],
705
+ label: "Context"
706
+ };
707
+ case "reasoning":
708
+ return {
709
+ icon: "MessageSquareMore",
710
+ className: styles9["badge--reasoning"],
711
+ label: "Reasoning"
712
+ };
713
+ case "token":
714
+ return {
715
+ icon: "Coins",
716
+ className: styles9["badge--token"],
717
+ label: "Token"
718
+ };
719
+ case "tools":
720
+ return {
721
+ icon: "Wrench",
722
+ className: styles9["badge--tools"],
723
+ label: "Tools"
724
+ };
725
+ case "system-parameters":
726
+ return {
727
+ icon: "Settings2",
728
+ className: styles9["badge--system-parameters"],
729
+ label: "System Parameters"
730
+ };
731
+ case "unknown":
732
+ return {
733
+ icon: "Box",
734
+ className: styles9["badge--unknown"],
735
+ label: "Unknown"
736
+ };
737
+ }
738
+ };
739
+ var CardContentHeader = forwardRef(
740
+ ({ className, icon, heading, onButtonClick, ...props }, ref) => {
741
+ const shouldRender = heading || onButtonClick;
742
+ const shouldWrap = !!onButtonClick;
743
+ if (!shouldRender) {
744
+ return null;
745
+ }
746
+ return /* @__PURE__ */ jsxs(
747
+ "div",
748
+ {
749
+ ref,
750
+ className: cn(
751
+ styles10["card-content-header"],
752
+ shouldWrap && styles10["card-content-header--wrap"],
753
+ className
754
+ ),
755
+ ...props,
756
+ children: [
757
+ /* @__PURE__ */ jsx(Icon, { icon, background: "circle", elevation: "overlay" }),
758
+ onButtonClick && /* @__PURE__ */ jsx(Button, { className: styles10.button, variant: "tertiary", size: "sm", onClick: onButtonClick, children: "See All" }),
759
+ heading && /* @__PURE__ */ jsx("h3", { className: cn(styles10.title, onButtonClick && styles10["title--button-click"]), children: heading })
760
+ ]
761
+ }
762
+ );
763
+ }
764
+ );
765
+ CardContentHeader.displayName = "CardContentHeader";
766
+ var cardElevationVariants = generateElevationVariants(styles11, "card", ELEVATION.RAISED);
767
+ var Card = React15.forwardRef(({ className, hoverGradientClassName, elevation = ELEVATION.RAISED, ...props }, ref) => {
768
+ const shouldHaveHoverStyle = props.onClick !== void 0;
769
+ return /* @__PURE__ */ jsxs(
770
+ "div",
771
+ {
772
+ ref,
773
+ className: cn(
774
+ styles11.card,
775
+ shouldHaveHoverStyle && styles11["card--hover"],
776
+ cardElevationVariants({ elevation }),
777
+ className
778
+ ),
779
+ ...props,
780
+ children: [
781
+ shouldHaveHoverStyle && /* @__PURE__ */ jsx("div", { className: cn(styles11["card-hover-gradient"], hoverGradientClassName) }),
782
+ props.children
783
+ ]
784
+ }
785
+ );
786
+ });
787
+ Card.displayName = "Card";
788
+ var CardHeader = React15.forwardRef(
789
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-header"], className), ...props })
790
+ );
791
+ CardHeader.displayName = "CardHeader";
792
+ var CardTitle = React15.forwardRef(
793
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-title"], className), ...props })
794
+ );
795
+ CardTitle.displayName = "CardTitle";
796
+ var CardDescription = React15.forwardRef(
797
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-description"], className), ...props })
798
+ );
799
+ CardDescription.displayName = "CardDescription";
800
+ var CardContent = React15.forwardRef(
801
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-content"], className), ...props })
802
+ );
803
+ CardContent.displayName = "CardContent";
804
+ var CardFooter = React15.forwardRef(
805
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(styles11["card-footer"], className), ...props })
806
+ );
807
+ CardFooter.displayName = "CardFooter";
808
+ var CheckIcon = Check;
809
+ var Checkbox = React15.forwardRef(
810
+ ({ className, icon: Icon3, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(
811
+ CheckboxPrimitive.Root,
812
+ {
813
+ ref,
814
+ className: cn(styles12.checkbox, styles12[size], className),
815
+ ...props,
816
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: styles12.indicator, children: /* @__PURE__ */ jsx(CheckIcon, { className: styles12.check }) })
817
+ }
818
+ )
819
+ );
820
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
821
+ var iconButtonVariants = cva(styles13["icon-btn"], {
822
+ variants: {
823
+ size: {
824
+ sm: styles13["size--sm"],
825
+ md: styles13["size--md"],
826
+ lg: styles13["size--lg"]
827
+ },
828
+ variant: {
829
+ primary: styles13["icon-btn--primary"],
830
+ danger: styles13["icon-btn--danger"]
831
+ }
832
+ },
833
+ defaultVariants: {
834
+ size: "sm",
835
+ variant: "primary"
836
+ }
837
+ });
838
+ var iconSizeMap = {
839
+ sm: 16,
840
+ md: 20,
841
+ lg: 32
842
+ };
843
+ function IconButton({
844
+ className,
845
+ size = "sm",
846
+ variant = "primary",
847
+ name,
848
+ label,
849
+ href,
850
+ target,
851
+ download,
852
+ disabled,
853
+ ...props
854
+ }) {
855
+ const Icon3 = LucideIcons[name];
856
+ const iconSize = iconSizeMap[size || "sm"];
857
+ const IconComponent = Icon3;
858
+ if (!Icon3) {
859
+ console.warn(`Icon "${name}" not found in lucide-react`);
860
+ return null;
861
+ }
862
+ const content = /* @__PURE__ */ jsx(IconComponent, { size: iconSize });
863
+ if (href && !disabled) {
864
+ return /* @__PURE__ */ jsx(
865
+ "a",
866
+ {
867
+ href,
868
+ target,
869
+ download,
870
+ "aria-label": label,
871
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
872
+ className: cn(iconButtonVariants({ size, variant }), className),
873
+ children: content
874
+ }
875
+ );
876
+ }
877
+ return /* @__PURE__ */ jsx(
878
+ "button",
879
+ {
880
+ type: "button",
881
+ "aria-label": label,
882
+ disabled,
883
+ className: cn(iconButtonVariants({ size, variant }), className),
884
+ ...props,
885
+ children: content
886
+ }
887
+ );
888
+ }
889
+ function CopyButton({
890
+ value,
891
+ label = "Copy to clipboard",
892
+ size = "sm",
893
+ className,
894
+ onClick
895
+ }) {
896
+ const [copied, setCopied] = React15.useState(false);
897
+ const handleCopy = async () => {
898
+ try {
899
+ if (navigator.clipboard && navigator.clipboard.writeText) {
900
+ await navigator.clipboard.writeText(value);
901
+ setCopied(true);
902
+ setTimeout(() => setCopied(false), 2e3);
903
+ return;
904
+ }
905
+ const textArea = document.createElement("textarea");
906
+ textArea.value = value;
907
+ textArea.style.position = "fixed";
908
+ textArea.style.left = "-999999px";
909
+ textArea.style.top = "-999999px";
910
+ document.body.appendChild(textArea);
911
+ textArea.focus();
912
+ textArea.select();
913
+ const successful = document.execCommand("copy");
914
+ document.body.removeChild(textArea);
915
+ if (successful) {
916
+ setCopied(true);
917
+ setTimeout(() => setCopied(false), 2e3);
918
+ } else {
919
+ throw new Error("Copy command failed");
920
+ }
921
+ } catch (err) {
922
+ console.error("Failed to copy text:", err);
923
+ }
924
+ };
925
+ const handleClick = () => {
926
+ handleCopy();
927
+ onClick?.();
928
+ };
929
+ return /* @__PURE__ */ jsx(
930
+ IconButton,
931
+ {
932
+ name: copied ? "Check" : "Copy",
933
+ label: copied ? "Copied!" : label,
934
+ size,
935
+ onClick: handleClick,
936
+ className
937
+ }
938
+ );
939
+ }
940
+
941
+ // src/theme/lib/utils.ts
942
+ var STORAGE_KEY = "equality-theme";
943
+ var UPDATE_EVENT = "equality-theme-change";
944
+ var FALLBACK_THEME = "light";
945
+ var getFallbackTheme = (options = {}) => {
946
+ const { canFallbackToBrowserSettings = false } = options;
947
+ if (typeof window === "undefined" || !canFallbackToBrowserSettings) {
948
+ return FALLBACK_THEME;
949
+ }
950
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
951
+ };
952
+ var getDefaultTheme = () => {
953
+ const themeProviderRootElement = document.querySelector("[data-equality-theme]") || document.documentElement;
954
+ if (themeProviderRootElement) {
955
+ return themeProviderRootElement.getAttribute("data-equality-theme") || void 0;
956
+ } else {
957
+ return void 0;
958
+ }
959
+ };
960
+ var getThemeFromLocalStorage = () => {
961
+ const safeReadStorage = (key) => {
962
+ try {
963
+ return window.localStorage.getItem(key);
964
+ } catch {
965
+ return null;
966
+ }
967
+ };
968
+ const themeLocalStorageValue = safeReadStorage(STORAGE_KEY);
969
+ return themeLocalStorageValue;
970
+ };
971
+ var getThemeFromWindow = () => {
972
+ return window.__equalityTheme;
973
+ };
974
+ var applyThemeToDom = (theme) => {
975
+ const themeProviderRootElement = document.querySelector("[data-equality-theme]") || document.documentElement;
976
+ if (themeProviderRootElement) {
977
+ themeProviderRootElement.setAttribute("data-equality-theme", theme);
978
+ }
979
+ };
980
+ var setThemeInLocalStorage = (theme) => {
981
+ try {
982
+ window.localStorage.setItem(STORAGE_KEY, theme);
983
+ window.dispatchEvent(new CustomEvent(UPDATE_EVENT, { detail: theme }));
984
+ } catch {
985
+ console.error("Failed to set theme in localStorage");
986
+ }
987
+ };
988
+ var setThemeOnWindow = (theme) => {
989
+ window.__equalityTheme = theme;
990
+ window.dispatchEvent(new CustomEvent(UPDATE_EVENT, { detail: theme }));
991
+ };
992
+ var setTheme = (theme) => {
993
+ const isUsingLocalStorage = window.__equalityIsUsingLocalStorage;
994
+ if (isUsingLocalStorage) {
995
+ setThemeInLocalStorage(theme);
996
+ } else {
997
+ setThemeOnWindow(theme);
998
+ }
999
+ applyThemeToDom(theme);
1000
+ };
1001
+ var getCurrentThemeState = (options = {}) => {
1002
+ const { canFallbackToBrowserSettings = false } = options;
1003
+ if (typeof window === "undefined") {
1004
+ return void 0;
1005
+ }
1006
+ const isUsingLocalStorage = window.__equalityIsUsingLocalStorage;
1007
+ const storedTheme = isUsingLocalStorage ? getThemeFromLocalStorage() : getThemeFromWindow();
1008
+ const theme = storedTheme || getDefaultTheme() || getFallbackTheme({ canFallbackToBrowserSettings });
1009
+ if (!storedTheme) {
1010
+ setTheme(theme);
1011
+ }
1012
+ return theme;
1013
+ };
1014
+ var subscribeToThemeChange = (listener) => {
1015
+ if (typeof window === "undefined") {
1016
+ return () => {
1017
+ };
1018
+ }
1019
+ const isUsingLocalStorage = window.__equalityIsUsingLocalStorage;
1020
+ if (isUsingLocalStorage) {
1021
+ const storageListener = (event) => {
1022
+ if (event.key === STORAGE_KEY) listener();
1023
+ };
1024
+ const updateListener = () => listener();
1025
+ window.addEventListener("storage", storageListener);
1026
+ window.addEventListener(UPDATE_EVENT, updateListener);
1027
+ return () => {
1028
+ window.removeEventListener("storage", storageListener);
1029
+ window.removeEventListener(UPDATE_EVENT, updateListener);
1030
+ };
1031
+ } else {
1032
+ const windowListener = () => {
1033
+ listener();
1034
+ };
1035
+ window.addEventListener(UPDATE_EVENT, windowListener);
1036
+ return () => {
1037
+ window.removeEventListener(UPDATE_EVENT, windowListener);
1038
+ };
1039
+ }
1040
+ };
1041
+
1042
+ // src/theme/hooks/use-theme.ts
1043
+ var subscribe = (listener) => {
1044
+ return subscribeToThemeChange(listener);
1045
+ };
1046
+ var getSnapshot = () => {
1047
+ return getCurrentThemeState();
1048
+ };
1049
+ var getServerSnapshot = () => {
1050
+ return void 0;
1051
+ };
1052
+ var useTheme = () => {
1053
+ const theme = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1054
+ return [theme, setTheme];
1055
+ };
1056
+ var WRAP = true;
1057
+ var CodeBlock = ({
1058
+ className,
1059
+ title,
1060
+ code,
1061
+ language = "text",
1062
+ variant = "neutral",
1063
+ codeLabel,
1064
+ copy
1065
+ }) => {
1066
+ const [theme] = useTheme();
1067
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles14["code-block"], styles14[variant], className), children: [
1068
+ /* @__PURE__ */ jsxs("div", { className: styles14.header, children: [
1069
+ /* @__PURE__ */ jsxs("div", { className: styles14["header-left"], children: [
1070
+ title && /* @__PURE__ */ jsx("span", { className: styles14.title, children: title }),
1071
+ /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: styles14["badge"], children: language })
1072
+ ] }),
1073
+ /* @__PURE__ */ jsx("div", { className: styles14["header-right"], children: /* @__PURE__ */ jsx(CopyButton, { value: copy || code, size: "sm" }) })
1074
+ ] }),
1075
+ /* @__PURE__ */ jsx("div", { className: cn(styles14.content), children: /* @__PURE__ */ jsx(
1076
+ Prism,
1077
+ {
1078
+ language,
1079
+ style: theme === "dark" ? darkStyle : lightStyle,
1080
+ wrapLines: WRAP,
1081
+ wrapLongLines: WRAP,
1082
+ className: styles14.pre,
1083
+ codeTagProps: { className: cn(styles14.code, { [styles14.wrap]: WRAP }) },
1084
+ children: code
1085
+ }
1086
+ ) }),
1087
+ codeLabel && /* @__PURE__ */ jsx("div", { className: styles14["code-label"], children: /* @__PURE__ */ jsx("p", { className: styles14["code-label-text"], children: codeLabel }) })
1088
+ ] });
1089
+ };
1090
+ var Dialog = DialogPrimitive.Root;
1091
+ var DialogTrigger = DialogPrimitive.Trigger;
1092
+ var DialogPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: getThemeProviderRoot(), children });
1093
+ var DialogClose = DialogPrimitive.Close;
1094
+ var DialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1095
+ DialogPrimitive.Overlay,
1096
+ {
1097
+ ref,
1098
+ className: cn(styles15["dialog-overlay"], className),
1099
+ ...props
1100
+ }
1101
+ ));
1102
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1103
+ var DialogContainer = React15.forwardRef(({ className, children, size = "md", ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1104
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
1105
+ /* @__PURE__ */ jsx(
1106
+ DialogPrimitive.Content,
1107
+ {
1108
+ ref,
1109
+ className: cn(styles15["dialog-content"], styles15[`dialog-content--size-${size}`], className),
1110
+ onCloseAutoFocus: (event) => {
1111
+ event.preventDefault();
1112
+ document.body.style.pointerEvents = "";
1113
+ },
1114
+ ...props,
1115
+ children
1116
+ }
1117
+ )
1118
+ ] }));
1119
+ DialogContainer.displayName = DialogPrimitive.Content.displayName;
1120
+ var DialogHeader = ({ className, children, ...props }) => /* @__PURE__ */ jsxs("div", { className: cn(styles15["dialog-header"], className), ...props, children: [
1121
+ /* @__PURE__ */ jsx("div", { className: styles15["dialog-header-content"], children }),
1122
+ /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", size: "sm" }) })
1123
+ ] });
1124
+ DialogHeader.displayName = "DialogHeader";
1125
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles15["dialog-footer"], className), ...props });
1126
+ DialogFooter.displayName = "DialogFooter";
1127
+ var DialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles15["dialog-title"], className), ...props }));
1128
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
1129
+ var DialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1130
+ DialogPrimitive.Description,
1131
+ {
1132
+ ref,
1133
+ className: cn(styles15["dialog-description"], className),
1134
+ ...props
1135
+ }
1136
+ ));
1137
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
1138
+ var DialogContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles15["dialog-body"], "styled-vertical-scrollbar", className), ...props });
1139
+ DialogContent.displayName = "DialogContent";
1140
+ function Command({ className, ...props }) {
1141
+ return /* @__PURE__ */ jsx(Command$1, { "data-slot": "command", className: cn(styles16.command, className), ...props });
1142
+ }
1143
+ function CommandDialog({
1144
+ title = "Command Palette",
1145
+ description = "Search for a command to run...",
1146
+ children,
1147
+ ...props
1148
+ }) {
1149
+ return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
1150
+ /* @__PURE__ */ jsxs(DialogHeader, { className: styles16["command-dialog-header"], children: [
1151
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
1152
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
1153
+ ] }),
1154
+ /* @__PURE__ */ jsx(DialogContent, { className: styles16["command-dialog-content"], children: /* @__PURE__ */ jsx(Command, { className: styles16["command-dialog-content-inner"], children }) })
1155
+ ] });
1156
+ }
1157
+ function CommandInput({
1158
+ className,
1159
+ ...props
1160
+ }) {
1161
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className: styles16["command-input"], children: [
1162
+ /* @__PURE__ */ jsx(SearchIcon, { className: styles16["command-input-icon"] }),
1163
+ /* @__PURE__ */ jsx(
1164
+ Command$1.Input,
1165
+ {
1166
+ "data-slot": "command-input",
1167
+ className: cn(styles16["command-input-input"], className),
1168
+ ...props
1169
+ }
1170
+ )
1171
+ ] });
1172
+ }
1173
+ function CommandList({ className, ...props }) {
1174
+ return /* @__PURE__ */ jsx(
1175
+ Command$1.List,
1176
+ {
1177
+ "data-slot": "command-list",
1178
+ className: cn(styles16["command-list"], className),
1179
+ ...props
1180
+ }
1181
+ );
1182
+ }
1183
+ function CommandEmpty({ ...props }) {
1184
+ return /* @__PURE__ */ jsx(
1185
+ Command$1.Empty,
1186
+ {
1187
+ "data-slot": "command-empty",
1188
+ className: styles16["command-empty"],
1189
+ ...props
1190
+ }
1191
+ );
1192
+ }
1193
+ function CommandGroup({
1194
+ className,
1195
+ ...props
1196
+ }) {
1197
+ return /* @__PURE__ */ jsx(
1198
+ Command$1.Group,
1199
+ {
1200
+ "data-slot": "command-group",
1201
+ className: cn(styles16["command-group"], className),
1202
+ ...props
1203
+ }
1204
+ );
1205
+ }
1206
+ function CommandSeparator({
1207
+ className,
1208
+ ...props
1209
+ }) {
1210
+ return /* @__PURE__ */ jsx(
1211
+ Command$1.Separator,
1212
+ {
1213
+ "data-slot": "command-separator",
1214
+ className: cn(styles16["command-separator"], className),
1215
+ ...props
1216
+ }
1217
+ );
1218
+ }
1219
+ function CommandItem({ className, ...props }) {
1220
+ return /* @__PURE__ */ jsx(
1221
+ Command$1.Item,
1222
+ {
1223
+ "data-slot": "command-item",
1224
+ className: cn(styles16["command-item"], className),
1225
+ ...props
1226
+ }
1227
+ );
1228
+ }
1229
+ function CommandShortcut({ className, ...props }) {
1230
+ return /* @__PURE__ */ jsx(
1231
+ "span",
1232
+ {
1233
+ "data-slot": "command-shortcut",
1234
+ className: cn(styles16["command-shortcut"], className),
1235
+ ...props
1236
+ }
1237
+ );
1238
+ }
1239
+ var Popover = PopoverPrimitive.Root;
1240
+ var PopoverTrigger = PopoverPrimitive.Trigger;
1241
+ var PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: getThemeProviderRoot(), children });
1242
+ var PopoverContent = React15.forwardRef(({ className, align = "center", sideOffset = 4, arrow = false, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsxs(
1243
+ PopoverPrimitive.Content,
1244
+ {
1245
+ ref,
1246
+ align,
1247
+ sideOffset,
1248
+ className: cn(styles17["popover-content"], className),
1249
+ ...props,
1250
+ children: [
1251
+ arrow && /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, { className: styles17["popover-arrow"] }),
1252
+ children
1253
+ ]
1254
+ }
1255
+ ) }));
1256
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1257
+ var CalendarDaysIcon = CalendarDays;
1258
+ var ChevronLeftIcon = ChevronLeft;
1259
+ var ChevronRightIcon = ChevronRight;
1260
+ var DateRangePicker = ({ dateRange, onSelect, className }) => {
1261
+ const [selecting, setSelecting] = useState(null);
1262
+ const [displayedMonth, setDisplayedMonth] = useState((/* @__PURE__ */ new Date()).getMonth());
1263
+ const [displayedYear, setDisplayedYear] = useState((/* @__PURE__ */ new Date()).getFullYear());
1264
+ const daysInMonth = new Date(displayedYear, displayedMonth + 1, 0).getDate();
1265
+ const firstDayOfMonth = new Date(displayedYear, displayedMonth, 1).getDay();
1266
+ const days = Array.from(
1267
+ { length: daysInMonth },
1268
+ (_, i) => new Date(displayedYear, displayedMonth, i + 1)
1269
+ );
1270
+ const paddingDays = Array.from({ length: firstDayOfMonth }, (_, _i) => null);
1271
+ const hasSelection = dateRange.from || dateRange.to;
1272
+ const MONTHS = [
1273
+ "January",
1274
+ "February",
1275
+ "March",
1276
+ "April",
1277
+ "May",
1278
+ "June",
1279
+ "July",
1280
+ "August",
1281
+ "September",
1282
+ "October",
1283
+ "November",
1284
+ "December"
1285
+ ];
1286
+ const DAY_HEADERS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
1287
+ const formatDate = (date) => {
1288
+ return date.toLocaleDateString("en-US", {
1289
+ year: "numeric",
1290
+ month: "2-digit",
1291
+ day: "2-digit"
1292
+ });
1293
+ };
1294
+ const formatRange = (range) => {
1295
+ if (!range.from && !range.to) return "Select Date Range";
1296
+ if (!range.to) return `From ${formatDate(range.from)}`;
1297
+ if (!range.from) return `Until ${formatDate(range.to)}`;
1298
+ return `${formatDate(range.from)} - ${formatDate(range.to)}`;
1299
+ };
1300
+ const isDateSelected = (day, dateRange2) => {
1301
+ const matchesFrom = dateRange2.from && day.getDate() === dateRange2.from.getDate() && day.getMonth() === dateRange2.from.getMonth() && day.getFullYear() === dateRange2.from.getFullYear();
1302
+ const matchesTo = dateRange2.to && day.getDate() === dateRange2.to.getDate() && day.getMonth() === dateRange2.to.getMonth() && day.getFullYear() === dateRange2.to.getFullYear();
1303
+ return !!matchesFrom || !!matchesTo;
1304
+ };
1305
+ const checkIsToday = (day) => {
1306
+ const today = /* @__PURE__ */ new Date();
1307
+ return day.getDate() === today.getDate() && day.getMonth() === today.getMonth() && day.getFullYear() === today.getFullYear();
1308
+ };
1309
+ const goToPreviousMonth = () => {
1310
+ if (displayedMonth === 0) {
1311
+ setDisplayedMonth(11);
1312
+ setDisplayedYear(displayedYear - 1);
1313
+ } else {
1314
+ setDisplayedMonth(displayedMonth - 1);
1315
+ }
1316
+ };
1317
+ const goToNextMonth = () => {
1318
+ if (displayedMonth === 11) {
1319
+ setDisplayedMonth(0);
1320
+ setDisplayedYear(displayedYear + 1);
1321
+ } else {
1322
+ setDisplayedMonth(displayedMonth + 1);
1323
+ }
1324
+ };
1325
+ const isInRange = (date) => {
1326
+ if (!dateRange.from || !dateRange.to) return false;
1327
+ return date >= dateRange.from && date <= dateRange.to;
1328
+ };
1329
+ const handleDateSelect = (selectedDate) => {
1330
+ const startOfDay = (date) => {
1331
+ const d = new Date(date);
1332
+ d.setHours(0, 0, 0, 0);
1333
+ return d;
1334
+ };
1335
+ const endOfDay = (date) => {
1336
+ const d = new Date(date);
1337
+ d.setHours(23, 59, 59, 999);
1338
+ return d;
1339
+ };
1340
+ if (!selecting || !dateRange) {
1341
+ onSelect({ from: startOfDay(selectedDate), to: void 0 });
1342
+ setSelecting("to");
1343
+ return;
1344
+ }
1345
+ if (selecting === "to") {
1346
+ if (dateRange.from && selectedDate < dateRange.from) {
1347
+ onSelect({ from: startOfDay(selectedDate), to: endOfDay(dateRange.from) });
1348
+ } else {
1349
+ onSelect({ from: startOfDay(dateRange.from), to: endOfDay(selectedDate) });
1350
+ }
1351
+ setSelecting(null);
1352
+ }
1353
+ };
1354
+ const clearSelection = () => {
1355
+ onSelect({ from: void 0, to: void 0 });
1356
+ setSelecting(null);
1357
+ };
1358
+ const handleClearClick = (e) => {
1359
+ e.stopPropagation();
1360
+ clearSelection();
1361
+ };
1362
+ return /* @__PURE__ */ jsxs(Popover, { children: [
1363
+ /* @__PURE__ */ jsx("div", { className: styles18["popover-header"], children: /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
1364
+ Button,
1365
+ {
1366
+ variant: "tertiary",
1367
+ prefix: /* @__PURE__ */ jsx(CalendarDaysIcon, {}),
1368
+ suffix: hasSelection && /* @__PURE__ */ jsx(
1369
+ IconButton,
1370
+ {
1371
+ name: "X",
1372
+ size: "sm",
1373
+ onClick: handleClearClick,
1374
+ label: "Clear dates"
1375
+ }
1376
+ ),
1377
+ className: cn(dateRange.from && dateRange.to && styles18, className),
1378
+ children: /* @__PURE__ */ jsx("span", { className: styles18["date-range"], children: formatRange(dateRange) })
1379
+ }
1380
+ ) }) }),
1381
+ /* @__PURE__ */ jsxs(PopoverContent, { className: styles18["popover-content"], align: "end", children: [
1382
+ /* @__PURE__ */ jsxs("div", { className: styles18["month-navigation"], children: [
1383
+ /* @__PURE__ */ jsx(
1384
+ Button,
1385
+ {
1386
+ variant: "tertiary",
1387
+ size: "sm",
1388
+ className: styles18["month-navigation-btn"],
1389
+ onClick: goToPreviousMonth,
1390
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ jsxs("div", { className: styles18["month-date-display"], children: [
1394
+ /* @__PURE__ */ jsx("div", { className: styles18["month-date-display-title"], children: `${MONTHS[displayedMonth]} ${displayedYear}` }),
1395
+ selecting && /* @__PURE__ */ jsx("div", { className: styles18["month-date-display-subtitle"], children: selecting === "from" ? "Select start date" : "Select end date" })
1396
+ ] }),
1397
+ /* @__PURE__ */ jsx(
1398
+ Button,
1399
+ {
1400
+ variant: "tertiary",
1401
+ size: "sm",
1402
+ className: styles18["month-navigation-btn"],
1403
+ onClick: goToNextMonth,
1404
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
1405
+ }
1406
+ )
1407
+ ] }),
1408
+ /* @__PURE__ */ jsx("div", { className: styles18["day-headers"], children: DAY_HEADERS.map((day) => /* @__PURE__ */ jsx("div", { className: styles18["day-headers-inner"], children: day }, day)) }),
1409
+ /* @__PURE__ */ jsxs("div", { className: styles18["calendar-grid"], children: [
1410
+ paddingDays.map((_, index) => /* @__PURE__ */ jsx("div", {}, `padding-${index}`)),
1411
+ days.map((day, index) => {
1412
+ const isSelected = isDateSelected(day, dateRange);
1413
+ const isToday = checkIsToday(day);
1414
+ const inRange = isInRange(day);
1415
+ return /* @__PURE__ */ jsx(
1416
+ Button,
1417
+ {
1418
+ variant: "tertiary",
1419
+ className: cn(
1420
+ styles18["calendar-day-btn"],
1421
+ isSelected && styles18["calendar-day-btn--selected"],
1422
+ isToday && !isSelected && styles18["calendar-day-btn--today"],
1423
+ inRange && !isSelected && styles18["calendar-day-btn--in-range"]
1424
+ ),
1425
+ onClick: () => handleDateSelect(day),
1426
+ children: day.getDate()
1427
+ },
1428
+ index
1429
+ );
1430
+ })
1431
+ ] })
1432
+ ] })
1433
+ ] });
1434
+ };
1435
+ var displayFieldVariants = cva("", {
1436
+ variants: {
1437
+ variant: {
1438
+ neutral: styles19["display-field--neutral"],
1439
+ neutralCheck: styles19["display-field--neutral"],
1440
+ success: styles19["display-field--success"],
1441
+ failure: styles19["display-field--failure"]
1442
+ }
1443
+ },
1444
+ defaultVariants: {
1445
+ variant: "neutral"
1446
+ }
1447
+ });
1448
+ var displayFieldElevationVariants = generateElevationVariants(
1449
+ styles19,
1450
+ "display-field",
1451
+ ELEVATION.BASE
1452
+ );
1453
+ function DisplayField({
1454
+ className,
1455
+ variant,
1456
+ elevation = ELEVATION.BASE,
1457
+ children,
1458
+ prefix,
1459
+ truncate = false,
1460
+ copy = true,
1461
+ actions,
1462
+ slot,
1463
+ ...props
1464
+ }) {
1465
+ const middleTruncationContainerRef = useRef(null);
1466
+ const [middleTruncationWidth, setMiddleTruncationWidth] = useState(void 0);
1467
+ const getIcon = () => {
1468
+ if (variant === "success" || variant === "neutralCheck") {
1469
+ return /* @__PURE__ */ jsx(Check, { className: styles19["icon-width"] });
1470
+ }
1471
+ if (variant === "failure") {
1472
+ return /* @__PURE__ */ jsx(TriangleAlert, { className: styles19["icon-width"] });
1473
+ }
1474
+ return null;
1475
+ };
1476
+ const renderContent = () => {
1477
+ if (truncate === "middle" && typeof children === "string") {
1478
+ return /* @__PURE__ */ jsx("div", { ref: middleTruncationContainerRef, children: /* @__PURE__ */ jsx(Truncate, { text: children, offset: 8, ellipsis: "\u2026", width: middleTruncationWidth }) });
1479
+ }
1480
+ return children;
1481
+ };
1482
+ const getTruncateClass = () => {
1483
+ if (truncate === "middle") return styles19["overflow-hidden"];
1484
+ if (truncate === true) return styles19["truncate"];
1485
+ return styles19["overflow-x-scroll"];
1486
+ };
1487
+ const getValueForCopy = () => {
1488
+ if (typeof children === "string") {
1489
+ return children;
1490
+ }
1491
+ return "";
1492
+ };
1493
+ const showActions = copy || actions;
1494
+ useEffect(() => {
1495
+ const calcMiddleTruncationWidth = () => {
1496
+ const targetW = middleTruncationContainerRef.current?.getBoundingClientRect().width;
1497
+ setMiddleTruncationWidth(targetW);
1498
+ };
1499
+ const observer = new ResizeObserver((entries) => {
1500
+ if (entries.length > 0) {
1501
+ calcMiddleTruncationWidth();
1502
+ }
1503
+ });
1504
+ if (middleTruncationContainerRef.current) {
1505
+ observer.observe(middleTruncationContainerRef.current);
1506
+ }
1507
+ return () => {
1508
+ observer.disconnect();
1509
+ };
1510
+ }, []);
1511
+ return /* @__PURE__ */ jsxs(
1512
+ "div",
1513
+ {
1514
+ className: cn(
1515
+ styles19["display-field"],
1516
+ displayFieldElevationVariants({ elevation }),
1517
+ className
1518
+ ),
1519
+ ...props,
1520
+ children: [
1521
+ /* @__PURE__ */ jsxs("div", { className: styles19["display-field-inner"], children: [
1522
+ prefix && /* @__PURE__ */ jsxs("div", { className: cn(styles19["prefix"], displayFieldVariants({ variant })), children: [
1523
+ getIcon(),
1524
+ prefix
1525
+ ] }),
1526
+ /* @__PURE__ */ jsx(
1527
+ "span",
1528
+ {
1529
+ className: cn(styles19["content"], getTruncateClass()),
1530
+ style: { scrollbarWidth: "thin" },
1531
+ children: renderContent()
1532
+ }
1533
+ ),
1534
+ showActions && /* @__PURE__ */ jsxs("div", { className: styles19["actions"], children: [
1535
+ actions,
1536
+ copy && /* @__PURE__ */ jsx(CopyButton, { value: getValueForCopy(), size: "sm" })
1537
+ ] })
1538
+ ] }),
1539
+ slot && /* @__PURE__ */ jsx("div", { className: styles19["slot"], children: /* @__PURE__ */ jsx("div", { className: styles19["slot-inner"], children: slot }) })
1540
+ ]
1541
+ }
1542
+ );
1543
+ }
1544
+ var Drawer = ({
1545
+ shouldScaleBackground = true,
1546
+ ...props
1547
+ }) => /* @__PURE__ */ jsx(Drawer$1.Root, { shouldScaleBackground, ...props });
1548
+ Drawer.displayName = "Drawer";
1549
+ var DrawerTrigger = Drawer$1.Trigger;
1550
+ var DrawerPortal = ({ children }) => /* @__PURE__ */ jsx(Drawer$1.Portal, { container: getThemeProviderRoot(), children });
1551
+ var DrawerClose = Drawer$1.Close;
1552
+ var DrawerOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1553
+ Drawer$1.Overlay,
1554
+ {
1555
+ ref,
1556
+ className: cn(styles20["drawer-overlay"], className),
1557
+ ...props
1558
+ }
1559
+ ));
1560
+ DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
1561
+ var DrawerContent = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPortal, { children: [
1562
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
1563
+ /* @__PURE__ */ jsxs(
1564
+ Drawer$1.Content,
1565
+ {
1566
+ ref,
1567
+ className: cn(styles20["drawer-content"], className),
1568
+ ...props,
1569
+ children: [
1570
+ /* @__PURE__ */ jsx("div", { className: styles20["drawer-content-divider"] }),
1571
+ children
1572
+ ]
1573
+ }
1574
+ )
1575
+ ] }));
1576
+ DrawerContent.displayName = "DrawerContent";
1577
+ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles20["drawer-header"], className), ...props });
1578
+ DrawerHeader.displayName = "DrawerHeader";
1579
+ var DrawerHeaderActions = React15.forwardRef(({ className, rowSpan, style, ...props }, ref) => {
1580
+ return /* @__PURE__ */ jsx(
1581
+ "div",
1582
+ {
1583
+ ref,
1584
+ className: cn(styles20["drawer-header-actions"], className),
1585
+ style: { "--row-span": rowSpan },
1586
+ ...props
1587
+ }
1588
+ );
1589
+ });
1590
+ DrawerHeaderActions.displayName = "DrawerHeaderActions";
1591
+ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles20["drawer-footer"], className), ...props });
1592
+ DrawerFooter.displayName = "DrawerFooter";
1593
+ var DrawerTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Title, { ref, className: cn(styles20["drawer-title"], className), ...props }));
1594
+ DrawerTitle.displayName = Drawer$1.Title.displayName;
1595
+ var DrawerDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1596
+ Drawer$1.Description,
1597
+ {
1598
+ ref,
1599
+ className: cn(styles20["drawer-description"], className),
1600
+ ...props
1601
+ }
1602
+ ));
1603
+ DrawerDescription.displayName = Drawer$1.Description.displayName;
1604
+ var DrawerInnerContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles20["drawer-inner-content"], className), ...props });
1605
+ DrawerInnerContent.displayName = "DrawerInnerContent";
1606
+ var CheckIcon2 = Check;
1607
+ var ChevronRightIcon2 = ChevronRight;
1608
+ var CircleIcon = Circle;
1609
+ var DropdownMenu = DropdownMenuPrimitive.Root;
1610
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1611
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
1612
+ var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { container: getThemeProviderRoot(), children });
1613
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1614
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
1615
+ var DropdownMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1616
+ DropdownMenuPrimitive.SubTrigger,
1617
+ {
1618
+ ref,
1619
+ className: cn(
1620
+ styles21["dropdown-menu-trigger"],
1621
+ inset && styles21["dropdown-menu-inset"],
1622
+ className
1623
+ ),
1624
+ ...props,
1625
+ children: [
1626
+ children,
1627
+ /* @__PURE__ */ jsx(ChevronRightIcon2, { className: "ml-auto" })
1628
+ ]
1629
+ }
1630
+ ));
1631
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1632
+ var DropdownMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1633
+ DropdownMenuPrimitive.SubContent,
1634
+ {
1635
+ ref,
1636
+ className: cn(styles21["dropdown-menu-sub-content"], className),
1637
+ ...props
1638
+ }
1639
+ ));
1640
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1641
+ var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(
1642
+ DropdownMenuPrimitive.Content,
1643
+ {
1644
+ ref,
1645
+ sideOffset,
1646
+ className: cn(styles21["dropdown-menu-content"], className),
1647
+ ...props
1648
+ }
1649
+ ) }));
1650
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1651
+ var DropdownMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1652
+ DropdownMenuPrimitive.Item,
1653
+ {
1654
+ ref,
1655
+ className: cn(styles21["dropdown-menu-item"], inset && styles21["dropdown-menu-inset"], className),
1656
+ ...props
1657
+ }
1658
+ ));
1659
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1660
+ var DropdownMenuCheckboxItem = React15.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
1661
+ DropdownMenuPrimitive.CheckboxItem,
1662
+ {
1663
+ ref,
1664
+ className: cn(styles21["dropdown-menu-checkbox-item"], className),
1665
+ checked,
1666
+ ...props,
1667
+ children: [
1668
+ /* @__PURE__ */ jsx("span", { className: styles21["dropdown-menu-item-indicator-checkbox"], children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon2, { className: styles21["icon-size"] }) }) }),
1669
+ children
1670
+ ]
1671
+ }
1672
+ ));
1673
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1674
+ var DropdownMenuRadioItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1675
+ DropdownMenuPrimitive.RadioItem,
1676
+ {
1677
+ ref,
1678
+ className: cn(styles21["dropdown-menu-radio-item"], className),
1679
+ ...props,
1680
+ children: [
1681
+ /* @__PURE__ */ jsx("span", { className: styles21["dropdown-menu-item-indicator-radio"], children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: styles21["radio-icon"] }) }) }),
1682
+ children
1683
+ ]
1684
+ }
1685
+ ));
1686
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1687
+ var DropdownMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1688
+ DropdownMenuPrimitive.Label,
1689
+ {
1690
+ ref,
1691
+ className: cn(styles21["dropdown-menu-label"], inset && styles21["dropdown-menu-inset"], className),
1692
+ ...props
1693
+ }
1694
+ ));
1695
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1696
+ var DropdownMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1697
+ DropdownMenuPrimitive.Separator,
1698
+ {
1699
+ ref,
1700
+ className: cn(styles21["dropdown-menu-separator"], className),
1701
+ ...props
1702
+ }
1703
+ ));
1704
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1705
+ var DropdownMenuShortcut = ({ className, ...props }) => {
1706
+ return /* @__PURE__ */ jsx("span", { className: cn(styles21["dropdown-menu-shortcut"], className), ...props });
1707
+ };
1708
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1709
+ var EmptyTableState = ({
1710
+ icon,
1711
+ title,
1712
+ description,
1713
+ showClearButton = false,
1714
+ onClear,
1715
+ className
1716
+ }) => {
1717
+ const showButton = showClearButton && onClear;
1718
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles22["empty-table-state"], className), children: [
1719
+ /* @__PURE__ */ jsxs("div", { className: styles22["icon-and-title-container"], children: [
1720
+ /* @__PURE__ */ jsx(Icon, { icon, size: "md", background: "circle" }),
1721
+ /* @__PURE__ */ jsx("span", { className: styles22["title"], children: title })
1722
+ ] }),
1723
+ description && /* @__PURE__ */ jsx("span", { className: styles22["description"], children: description }),
1724
+ showButton && /* @__PURE__ */ jsx(Button, { variant: "tertiary", size: "sm", onClick: onClear, className: styles22["clear-button"], children: "Clear Filters" })
1725
+ ] });
1726
+ };
1727
+ var ChevronDownIcon = ChevronDown;
1728
+ var FilterDropdown = ({
1729
+ label,
1730
+ options,
1731
+ selectedFilters,
1732
+ onToggleFilter,
1733
+ onClearAll,
1734
+ buttonClassName,
1735
+ contentClassName
1736
+ }) => {
1737
+ const hasSelectedFilters = selectedFilters.length > 0;
1738
+ const filteredOptions = options.filter(
1739
+ (option) => option.value && option.value.trim() !== "" && option.label && option.label.trim() !== ""
1740
+ ).sort((a, b) => a.label.localeCompare(b.label));
1741
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1742
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(styles23["selector-button"], buttonClassName), children: [
1743
+ /* @__PURE__ */ jsxs("span", { className: styles23["selector-button-inner"], children: [
1744
+ label,
1745
+ hasSelectedFilters && /* @__PURE__ */ jsx(Badge, { variant: "primary", children: selectedFilters.length })
1746
+ ] }),
1747
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: styles23["chevron-icon"] })
1748
+ ] }) }),
1749
+ /* @__PURE__ */ jsxs(
1750
+ DropdownMenuContent,
1751
+ {
1752
+ align: "end",
1753
+ className: cn(styles23["dropdown-menu-content"], contentClassName),
1754
+ children: [
1755
+ /* @__PURE__ */ jsxs(DropdownMenuLabel, { children: [
1756
+ "Filters",
1757
+ hasSelectedFilters && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: onClearAll, children: "Clear all" })
1758
+ ] }),
1759
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
1760
+ filteredOptions.map((option) => {
1761
+ const isSelected = selectedFilters.includes(option.value);
1762
+ return /* @__PURE__ */ jsx(
1763
+ DropdownMenuCheckboxItem,
1764
+ {
1765
+ checked: isSelected,
1766
+ onCheckedChange: () => onToggleFilter(option.value),
1767
+ onSelect: (e) => e.preventDefault(),
1768
+ children: option.label
1769
+ },
1770
+ option.value
1771
+ );
1772
+ })
1773
+ ]
1774
+ }
1775
+ )
1776
+ ] });
1777
+ };
1778
+ var labelVariants = cva(styles24["label"]);
1779
+ var Label2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
1780
+ Label2.displayName = LabelPrimitive.Root.displayName;
1781
+ var Form = FormProvider;
1782
+ var FormFieldContext = React15.createContext({});
1783
+ var FormField = ({
1784
+ ...props
1785
+ }) => {
1786
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1787
+ };
1788
+ var useFormField = () => {
1789
+ const fieldContext = React15.useContext(FormFieldContext);
1790
+ const itemContext = React15.useContext(FormItemContext);
1791
+ const { getFieldState, formState } = useFormContext();
1792
+ const fieldState = getFieldState(fieldContext.name, formState);
1793
+ if (!fieldContext) {
1794
+ throw new Error("useFormField should be used within <FormField>");
1795
+ }
1796
+ const { id } = itemContext;
1797
+ return {
1798
+ id,
1799
+ name: fieldContext.name,
1800
+ formItemId: `${id}-form-item`,
1801
+ formDescriptionId: `${id}-form-item-description`,
1802
+ formMessageId: `${id}-form-item-message`,
1803
+ ...fieldState
1804
+ };
1805
+ };
1806
+ var FormItemContext = React15.createContext({});
1807
+ var FormItem = React15.forwardRef(
1808
+ ({ className, ...props }, ref) => {
1809
+ const id = React15.useId();
1810
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn(styles25["form-item"], className), ...props }) });
1811
+ }
1812
+ );
1813
+ FormItem.displayName = "FormItem";
1814
+ var FormLabel = React15.forwardRef(({ className, ...props }, ref) => {
1815
+ const { error, formItemId } = useFormField();
1816
+ return /* @__PURE__ */ jsx(
1817
+ Label2,
1818
+ {
1819
+ ref,
1820
+ className: cn(styles25["form-label"], error && styles25["form-label--failure"], className),
1821
+ htmlFor: formItemId,
1822
+ ...props
1823
+ }
1824
+ );
1825
+ });
1826
+ FormLabel.displayName = "FormLabel";
1827
+ var FormControl = React15.forwardRef(({ ...props }, ref) => {
1828
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1829
+ return /* @__PURE__ */ jsx(
1830
+ Slot,
1831
+ {
1832
+ ref,
1833
+ id: formItemId,
1834
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1835
+ "aria-invalid": !!error,
1836
+ ...props
1837
+ }
1838
+ );
1839
+ });
1840
+ FormControl.displayName = "FormControl";
1841
+ var FormDescription = React15.forwardRef(({ className, ...props }, ref) => {
1842
+ const { formDescriptionId } = useFormField();
1843
+ return /* @__PURE__ */ jsx(
1844
+ "p",
1845
+ {
1846
+ ref,
1847
+ id: formDescriptionId,
1848
+ className: cn(styles25["form-description"], className),
1849
+ ...props
1850
+ }
1851
+ );
1852
+ });
1853
+ FormDescription.displayName = "FormDescription";
1854
+ var FormMessage = React15.forwardRef(({ className, children, ...props }, ref) => {
1855
+ const { error, formMessageId } = useFormField();
1856
+ const body = error ? String(error?.message ?? "") : children;
1857
+ if (!body) {
1858
+ return null;
1859
+ }
1860
+ return /* @__PURE__ */ jsx("p", { ref, id: formMessageId, className: cn(styles25["form-message"], className), ...props, children: body });
1861
+ });
1862
+ FormMessage.displayName = "FormMessage";
1863
+ var InfoCard = ({
1864
+ label,
1865
+ description,
1866
+ icon,
1867
+ elevation = ELEVATION.RAISED,
1868
+ className,
1869
+ onClick,
1870
+ ...props
1871
+ }) => {
1872
+ return /* @__PURE__ */ jsx(Card, { className, onClick, elevation, ...props, children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: styles26["info-card-content"], children: [
1873
+ /* @__PURE__ */ jsx(
1874
+ Icon,
1875
+ {
1876
+ icon,
1877
+ size: "sm",
1878
+ background: "square",
1879
+ elevation: elevation === ELEVATION.SUNKEN ? ELEVATION.BASE : getRelativeElevation(elevation, -1)
1880
+ }
1881
+ ),
1882
+ /* @__PURE__ */ jsxs("div", { className: styles26["copy-container"], children: [
1883
+ /* @__PURE__ */ jsx("p", { className: styles26["label"], children: label }),
1884
+ /* @__PURE__ */ jsx("div", { className: styles26["description"], children: description })
1885
+ ] })
1886
+ ] }) }) });
1887
+ };
1888
+ var Input = React15.forwardRef(
1889
+ ({ className, type, prefix, suffix, ...props }, ref) => {
1890
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles27["input-wrapper"], className), children: [
1891
+ prefix && /* @__PURE__ */ jsx("span", { className: styles27["input-prefix"], children: prefix }),
1892
+ /* @__PURE__ */ jsx("input", { type, className: styles27["input-element"], ref, ...props }),
1893
+ suffix && /* @__PURE__ */ jsx("span", { className: styles27["input-suffix"], children: suffix })
1894
+ ] });
1895
+ }
1896
+ );
1897
+ Input.displayName = "Input";
1898
+ var ListOrGridViewToggle = ({
1899
+ viewMode,
1900
+ onViewModeChange,
1901
+ order = ["grid", "list"],
1902
+ className
1903
+ }) => {
1904
+ const currentActiveIndex = order.indexOf(viewMode);
1905
+ const handleGridClick = () => {
1906
+ onViewModeChange("grid");
1907
+ };
1908
+ const handleListClick = () => {
1909
+ onViewModeChange("list");
1910
+ };
1911
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles28["list-or-grid-view-toggle"], className), children: [
1912
+ order.map((mode) => {
1913
+ const currentlyActive = mode === viewMode;
1914
+ const Icon3 = mode === "grid" ? Grid3X3 : List;
1915
+ return /* @__PURE__ */ jsx(
1916
+ "button",
1917
+ {
1918
+ type: "button",
1919
+ "aria-label": mode === "grid" ? "Grid view" : "List view",
1920
+ className: cn(
1921
+ styles28["icon-button"],
1922
+ currentlyActive ? styles28["icon-button--active"] : styles28["icon-button--inactive"]
1923
+ ),
1924
+ onClick: mode === "grid" ? handleGridClick : handleListClick,
1925
+ children: /* @__PURE__ */ jsx(Icon3, { size: 16 })
1926
+ },
1927
+ mode
1928
+ );
1929
+ }),
1930
+ /* @__PURE__ */ jsx(
1931
+ "div",
1932
+ {
1933
+ className: styles28["active-button-indicator"],
1934
+ style: {
1935
+ transform: `translateX(${currentActiveIndex * 100}%)`,
1936
+ width: `${100 / order.length}%`
1937
+ }
1938
+ }
1939
+ )
1940
+ ] });
1941
+ };
1942
+ var Spinner = ({ size = "md", variant = "neutral" }) => {
1943
+ return /* @__PURE__ */ jsxs("div", { className: styles29["spinner-container"], children: [
1944
+ /* @__PURE__ */ jsx("div", { className: cn(styles29["spinner"], styles29[size], styles29[variant]) }),
1945
+ /* @__PURE__ */ jsx("div", { className: cn(styles29["spinner-background"], styles29[size]) })
1946
+ ] });
1947
+ };
1948
+ function LoadingOverlay({ isVisible, message = "Loading..." }) {
1949
+ if (!isVisible) return null;
1950
+ return /* @__PURE__ */ jsx("div", { className: styles30["loading-overlay"], children: /* @__PURE__ */ jsxs("div", { className: styles30["content"], children: [
1951
+ /* @__PURE__ */ jsx(Spinner, { variant: "primary" }),
1952
+ /* @__PURE__ */ jsx("p", { className: styles30["message"], children: message })
1953
+ ] }) });
1954
+ }
1955
+ var metricCardElevationVariants = generateElevationVariants(
1956
+ styles31,
1957
+ "metric-card",
1958
+ ELEVATION.RAISED
1959
+ );
1960
+ var VARIANTS = {
1961
+ default: {
1962
+ text: styles31["text-default"],
1963
+ iconBg: styles31["bg-default"]
1964
+ },
1965
+ primary: {
1966
+ text: styles31["text-primary"],
1967
+ iconBg: styles31["bg-primary"]
1968
+ },
1969
+ danger: {
1970
+ text: styles31["text-danger"],
1971
+ iconBg: styles31["bg-danger"]
1972
+ },
1973
+ success: {
1974
+ text: styles31["text-success"],
1975
+ iconBg: styles31["bg-success"]
1976
+ },
1977
+ warning: {
1978
+ text: styles31["text-warning"],
1979
+ iconBg: styles31["bg-warning"]
1980
+ }
1981
+ };
1982
+ var MetricCard = ({
1983
+ value,
1984
+ label,
1985
+ icon,
1986
+ variant = "default",
1987
+ elevation = ELEVATION.RAISED,
1988
+ className
1989
+ }) => {
1990
+ const variantStyles = VARIANTS[variant];
1991
+ return /* @__PURE__ */ jsxs("div", { className: cn(metricCardElevationVariants({ elevation }), className), children: [
1992
+ /* @__PURE__ */ jsxs("div", { className: styles31["value-container"], children: [
1993
+ /* @__PURE__ */ jsx("p", { className: cn(styles31.value), children: value }),
1994
+ /* @__PURE__ */ jsx(
1995
+ Icon,
1996
+ {
1997
+ icon,
1998
+ size: "md",
1999
+ background: "circle",
2000
+ className: cn(variantStyles.iconBg, variantStyles.text)
2001
+ }
2002
+ )
2003
+ ] }),
2004
+ /* @__PURE__ */ jsx("p", { className: styles31.label, children: label })
2005
+ ] });
2006
+ };
2007
+ var MotionCollapsibleContent = ({
2008
+ isOpen,
2009
+ children,
2010
+ className
2011
+ }) => {
2012
+ const [contentHeight, setContentHeight] = useState(0);
2013
+ const contentRef = useRef(null);
2014
+ useEffect(() => {
2015
+ if (contentRef.current) {
2016
+ const resizeObserver = new ResizeObserver(() => {
2017
+ if (contentRef.current) {
2018
+ setContentHeight(contentRef.current.scrollHeight);
2019
+ }
2020
+ });
2021
+ resizeObserver.observe(contentRef.current);
2022
+ setContentHeight(contentRef.current.scrollHeight);
2023
+ return () => resizeObserver.disconnect();
2024
+ }
2025
+ }, [children]);
2026
+ return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, mode: "wait", children: isOpen && /* @__PURE__ */ jsx(
2027
+ motion.div,
2028
+ {
2029
+ initial: { height: 0, opacity: 0 },
2030
+ animate: { height: contentHeight, opacity: 1 },
2031
+ exit: { height: 0, opacity: 0 },
2032
+ transition: { duration: 0.3, ease: "easeInOut" },
2033
+ className: cn(styles32["motion-collapsible"], className),
2034
+ children: /* @__PURE__ */ jsx("div", { ref: contentRef, children })
2035
+ },
2036
+ "motion-content"
2037
+ ) });
2038
+ };
2039
+ var OctagonAlert = AlertOctagon;
2040
+ var HomeIcon = Home;
2041
+ var NotFound = ({
2042
+ className,
2043
+ title = "Oops! Page Not Found",
2044
+ description = "The page or resource you're looking for doesn't exist or has been moved.",
2045
+ showHomeButton = true,
2046
+ onHomeClick = () => window.location.href = "/"
2047
+ }) => {
2048
+ return /* @__PURE__ */ jsx("div", { className: cn(styles33["page-not-found"], className), children: /* @__PURE__ */ jsxs("div", { className: styles33["page-not-found-inner"], children: [
2049
+ /* @__PURE__ */ jsx("div", { className: styles33["icon-container"], children: /* @__PURE__ */ jsx(OctagonAlert, { className: styles33["alert-icon"] }) }),
2050
+ /* @__PURE__ */ jsx("h1", { className: styles33["title"], children: title }),
2051
+ /* @__PURE__ */ jsx("p", { className: styles33["description"], children: description }),
2052
+ /* @__PURE__ */ jsx("div", { className: styles33["actions"], children: showHomeButton && /* @__PURE__ */ jsxs(Button, { onClick: onHomeClick, variant: "secondary", children: [
2053
+ /* @__PURE__ */ jsx(HomeIcon, { className: styles33["home-icon"] }),
2054
+ "Return Home"
2055
+ ] }) })
2056
+ ] }) });
2057
+ };
2058
+ var CheckIcon3 = Check;
2059
+ var ChevronDownIcon2 = ChevronDown;
2060
+ var ChevronUpIcon = ChevronUp;
2061
+ var Select = SelectPrimitive.Root;
2062
+ var SelectGroup = SelectPrimitive.Group;
2063
+ var SelectValue = SelectPrimitive.Value;
2064
+ var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn(styles34["select-trigger"], className), ...props, children: [
2065
+ children,
2066
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: cn(styles34["select-icon"], styles34["select-icon--low-opacity"]) }) })
2067
+ ] }));
2068
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2069
+ var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2070
+ SelectPrimitive.ScrollUpButton,
2071
+ {
2072
+ ref,
2073
+ className: cn(styles34["select-scroll-button"], className),
2074
+ ...props,
2075
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: styles34["select-icon"] })
2076
+ }
2077
+ ));
2078
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2079
+ var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2080
+ SelectPrimitive.ScrollDownButton,
2081
+ {
2082
+ ref,
2083
+ className: cn(styles34["select-scroll-button"], className),
2084
+ ...props,
2085
+ children: /* @__PURE__ */ jsx(ChevronDownIcon2, { className: styles34["select-icon"] })
2086
+ }
2087
+ ));
2088
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2089
+ var SelectPortal = ({ children }) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { container: getThemeProviderRoot(), children });
2090
+ var selectContentElevationVariants = generateElevationVariants(
2091
+ styles34,
2092
+ "select-content",
2093
+ ELEVATION.OVERLAY
2094
+ );
2095
+ var SelectContent = React15.forwardRef(({ className, children, position = "popper", elevation = ELEVATION.OVERLAY, ...props }, ref) => /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsxs(
2096
+ SelectPrimitive.Content,
2097
+ {
2098
+ ref,
2099
+ className: cn(
2100
+ styles34["select-content"],
2101
+ position === "popper" && styles34["select-content--popper"],
2102
+ selectContentElevationVariants({ elevation }),
2103
+ className
2104
+ ),
2105
+ position,
2106
+ ...props,
2107
+ children: [
2108
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
2109
+ /* @__PURE__ */ jsx(
2110
+ SelectPrimitive.Viewport,
2111
+ {
2112
+ className: cn(
2113
+ styles34["select-viewport"],
2114
+ position === "popper" && styles34["select-viewport--popper"]
2115
+ ),
2116
+ children
2117
+ }
2118
+ ),
2119
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
2120
+ ]
2121
+ }
2122
+ ) }));
2123
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
2124
+ var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn(styles34["select-label"], className), ...props }));
2125
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
2126
+ var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, { ref, className: cn(styles34["select-item"], className), ...props, children: [
2127
+ /* @__PURE__ */ jsx("span", { className: styles34["select-item-indicator"], children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon3, { className: styles34["select-icon"] }) }) }),
2128
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
2129
+ ] }));
2130
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
2131
+ var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2132
+ SelectPrimitive.Separator,
2133
+ {
2134
+ ref,
2135
+ className: cn(styles34["select-separator"], className),
2136
+ ...props
2137
+ }
2138
+ ));
2139
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
2140
+ var ChevronLeftIcon2 = ChevronLeft;
2141
+ var ChevronRightIcon3 = ChevronRight;
2142
+ var Pagination = ({
2143
+ currentPage,
2144
+ totalItems,
2145
+ filteredItems,
2146
+ itemsPerPage,
2147
+ onPageChange,
2148
+ onItemsPerPageChange,
2149
+ itemsPerPageOptions = [10, 25, 50, 100],
2150
+ showInfo = true,
2151
+ maxVisiblePages = 5,
2152
+ className = "",
2153
+ type = "",
2154
+ scrollTargetRef
2155
+ }) => {
2156
+ const totalPages = Math.ceil(filteredItems / itemsPerPage);
2157
+ const startItem = Math.min(filteredItems, 1 + (currentPage - 1) * itemsPerPage);
2158
+ const endItem = Math.min(currentPage * itemsPerPage, filteredItems);
2159
+ const hasFilteredItems = filteredItems > 0;
2160
+ const isFirstPage = currentPage === 1;
2161
+ const isLastPage = currentPage === totalPages;
2162
+ if (totalItems <= itemsPerPageOptions[0]) {
2163
+ return null;
2164
+ }
2165
+ const handlePageChange = (page) => {
2166
+ onPageChange(page);
2167
+ if (scrollTargetRef) {
2168
+ if (typeof scrollTargetRef === "string") {
2169
+ const target = document.getElementById(scrollTargetRef);
2170
+ if (target) {
2171
+ target.scrollIntoView({ behavior: "smooth" });
2172
+ }
2173
+ } else {
2174
+ if (scrollTargetRef.current) {
2175
+ scrollTargetRef.current.scrollIntoView({ behavior: "smooth" });
2176
+ }
2177
+ }
2178
+ const viewport = document.querySelector("[data-radix-scroll-area-viewport]");
2179
+ if (viewport) {
2180
+ viewport.scrollTop = 0;
2181
+ }
2182
+ }
2183
+ };
2184
+ const handleItemsPerPageChange = (value) => {
2185
+ const newItemsPerPage = parseInt(value);
2186
+ onItemsPerPageChange?.(newItemsPerPage);
2187
+ onPageChange(1);
2188
+ };
2189
+ const handlePreviousPage = () => {
2190
+ handlePageChange(Math.max(1, currentPage - 1));
2191
+ };
2192
+ const handleNextPage = () => {
2193
+ handlePageChange(Math.min(totalPages, currentPage + 1));
2194
+ };
2195
+ const getVisiblePages = () => {
2196
+ const pageButtons = [];
2197
+ let startPage = 1;
2198
+ let endPage = totalPages;
2199
+ if (totalPages > maxVisiblePages) {
2200
+ const halfVisible = Math.floor(maxVisiblePages / 2);
2201
+ if (currentPage <= halfVisible + 1) {
2202
+ endPage = maxVisiblePages;
2203
+ } else if (currentPage >= totalPages - halfVisible) {
2204
+ startPage = totalPages - maxVisiblePages + 1;
2205
+ } else {
2206
+ startPage = currentPage - halfVisible;
2207
+ endPage = currentPage + halfVisible;
2208
+ }
2209
+ }
2210
+ for (let i = startPage; i <= endPage; i++) {
2211
+ pageButtons.push(
2212
+ /* @__PURE__ */ jsx(
2213
+ Button,
2214
+ {
2215
+ variant: currentPage === i ? "primary" : "tertiary",
2216
+ size: "sm",
2217
+ onClick: () => handlePageChange(i),
2218
+ children: i
2219
+ },
2220
+ i
2221
+ )
2222
+ );
2223
+ }
2224
+ return pageButtons;
2225
+ };
2226
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles35["pagination"], className), children: [
2227
+ /* @__PURE__ */ jsx("div", { className: styles35["info-container"], children: showInfo && hasFilteredItems && /* @__PURE__ */ jsxs(Fragment, { children: [
2228
+ /* @__PURE__ */ jsxs("span", { children: [
2229
+ "Showing ",
2230
+ startItem,
2231
+ " to"
2232
+ ] }),
2233
+ onItemsPerPageChange ? /* @__PURE__ */ jsxs(Select, { value: itemsPerPage.toString(), onValueChange: handleItemsPerPageChange, children: [
2234
+ /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, {}) }),
2235
+ /* @__PURE__ */ jsx(SelectContent, { children: itemsPerPageOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.toString(), children: option }, option)) })
2236
+ ] }) : /* @__PURE__ */ jsx("span", { children: endItem }),
2237
+ /* @__PURE__ */ jsxs("span", { children: [
2238
+ "of ",
2239
+ filteredItems,
2240
+ " ",
2241
+ type
2242
+ ] })
2243
+ ] }) }),
2244
+ /* @__PURE__ */ jsxs("div", { className: styles35["page-navigation-container"], children: [
2245
+ /* @__PURE__ */ jsx(
2246
+ Button,
2247
+ {
2248
+ variant: "tertiary",
2249
+ size: "sm",
2250
+ onClick: handlePreviousPage,
2251
+ disabled: isFirstPage,
2252
+ "aria-label": "Previous page",
2253
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon2, {})
2254
+ }
2255
+ ),
2256
+ getVisiblePages(),
2257
+ /* @__PURE__ */ jsx(
2258
+ Button,
2259
+ {
2260
+ variant: "tertiary",
2261
+ size: "sm",
2262
+ onClick: handleNextPage,
2263
+ disabled: isLastPage,
2264
+ "aria-label": "Next page",
2265
+ children: /* @__PURE__ */ jsx(ChevronRightIcon3, {})
2266
+ }
2267
+ )
2268
+ ] })
2269
+ ] });
2270
+ };
2271
+ var PanelLabel = ({ className, label }) => {
2272
+ return /* @__PURE__ */ jsx("div", { className: cn(styles36["panel-label"], className), children: label });
2273
+ };
2274
+ var Progress = React15.forwardRef(
2275
+ ({ className, value, color = "primary", ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, { ref, className: cn(styles37["progress"], className), ...props, children: /* @__PURE__ */ jsx(
2276
+ ProgressPrimitive.Indicator,
2277
+ {
2278
+ className: cn(styles37["progress-indicator"], styles37[color]),
2279
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
2280
+ }
2281
+ ) })
2282
+ );
2283
+ Progress.displayName = ProgressPrimitive.Root.displayName;
2284
+ var RadialGraph = forwardRef(
2285
+ ({
2286
+ percentage,
2287
+ displayLabel,
2288
+ className,
2289
+ subLabel,
2290
+ graphSize = "md",
2291
+ variant = "primary",
2292
+ ...props
2293
+ }, ref) => {
2294
+ const bars = Array.from({ length: 100 });
2295
+ const label = displayLabel ?? `${Math.round(percentage)}%`;
2296
+ return /* @__PURE__ */ jsxs(
2297
+ "div",
2298
+ {
2299
+ ref,
2300
+ className: cn(styles38["radial-graph"], styles38[graphSize], className),
2301
+ ...props,
2302
+ children: [
2303
+ /* @__PURE__ */ jsx("div", { className: styles38["bars-container"], children: bars.map((_, i) => {
2304
+ const isActive = i < percentage;
2305
+ const delay = `${i * 10}ms`;
2306
+ return /* @__PURE__ */ jsx(
2307
+ "div",
2308
+ {
2309
+ className: styles38["bar"],
2310
+ style: {
2311
+ transform: `rotate(${i * 3.6}deg)`
2312
+ },
2313
+ children: /* @__PURE__ */ jsxs(
2314
+ "div",
2315
+ {
2316
+ className: cn(
2317
+ styles38["bar-inner"],
2318
+ isActive ? styles38["bar-inner--active"] : styles38["bar-inner--inactive"]
2319
+ ),
2320
+ style: {
2321
+ transitionDelay: delay,
2322
+ animationDelay: delay
2323
+ },
2324
+ children: [
2325
+ /* @__PURE__ */ jsx("div", { className: styles38["bar-background"] }),
2326
+ /* @__PURE__ */ jsx(
2327
+ "div",
2328
+ {
2329
+ className: cn(
2330
+ styles38["bar-gradient"],
2331
+ styles38[`bar-gradient--${variant}`],
2332
+ isActive ? styles38["bar-gradient--active"] : styles38["bar-gradient--inactive"]
2333
+ ),
2334
+ style: {
2335
+ transitionDelay: delay,
2336
+ animationDelay: delay
2337
+ }
2338
+ }
2339
+ )
2340
+ ]
2341
+ }
2342
+ )
2343
+ },
2344
+ i
2345
+ );
2346
+ }) }),
2347
+ /* @__PURE__ */ jsxs("div", { className: styles38["label-container"], children: [
2348
+ /* @__PURE__ */ jsx("p", { className: cn(styles38["label"], styles38[graphSize]), children: label }),
2349
+ subLabel && /* @__PURE__ */ jsx("p", { className: styles38["sub-label"], children: subLabel })
2350
+ ] })
2351
+ ]
2352
+ }
2353
+ );
2354
+ }
2355
+ );
2356
+ RadialGraph.displayName = "RadialGraph";
2357
+ var ChevronDownIcon3 = ChevronDown;
2358
+ var RadioDropdown = ({
2359
+ label,
2360
+ options,
2361
+ selectedValue,
2362
+ onSelect,
2363
+ className
2364
+ }) => {
2365
+ const selectedOption = options.find((opt) => opt.value === selectedValue);
2366
+ const hasSelectedCount = selectedOption?.count !== void 0;
2367
+ const filteredOptions = options.filter(
2368
+ (option) => option.value && option.value.trim() !== "" && option.label && option.label.trim() !== ""
2369
+ );
2370
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
2371
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className, children: [
2372
+ /* @__PURE__ */ jsxs("span", { className: styles39["selector-button-inner"], children: [
2373
+ selectedOption?.label || label,
2374
+ hasSelectedCount && /* @__PURE__ */ jsx(Badge, { variant: "primary", children: selectedOption.count })
2375
+ ] }),
2376
+ /* @__PURE__ */ jsx(ChevronDownIcon3, { className: styles39["chevron-icon"] })
2377
+ ] }) }),
2378
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: styles39["dropdown-menu-content"], children: [
2379
+ /* @__PURE__ */ jsx(DropdownMenuLabel, { children: label }),
2380
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
2381
+ /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { value: selectedValue, onValueChange: onSelect, children: filteredOptions.map((option) => {
2382
+ const hasCount = option.count !== void 0;
2383
+ return /* @__PURE__ */ jsxs(DropdownMenuRadioItem, { value: option.value, children: [
2384
+ option.label,
2385
+ hasCount && ` (${option.count})`
2386
+ ] }, option.value);
2387
+ }) })
2388
+ ] })
2389
+ ] });
2390
+ };
2391
+ var CircleIcon2 = Circle;
2392
+ var RadioGroup2 = React15.forwardRef(({ className, ...props }, ref) => {
2393
+ return /* @__PURE__ */ jsx(
2394
+ RadioGroupPrimitive.Root,
2395
+ {
2396
+ className: cn(styles40["radio-group"], className),
2397
+ ...props,
2398
+ ref
2399
+ }
2400
+ );
2401
+ });
2402
+ RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
2403
+ var RadioGroupItem = React15.forwardRef(({ className, ...props }, ref) => {
2404
+ return /* @__PURE__ */ jsx(
2405
+ RadioGroupPrimitive.Item,
2406
+ {
2407
+ ref,
2408
+ className: cn(styles40["radio-group-item"], className),
2409
+ ...props,
2410
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: styles40["radio-group-item-indicator"], children: /* @__PURE__ */ jsx(CircleIcon2, { className: styles40["indicator-icon"] }) })
2411
+ }
2412
+ );
2413
+ });
2414
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
2415
+ var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ref, className: cn(styles41["scroll-area"], className), ...props, children: [
2416
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: styles41["scroll-area-viewport"], children }),
2417
+ /* @__PURE__ */ jsx(ScrollBar, {}),
2418
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
2419
+ ] }));
2420
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
2421
+ var ScrollBar = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
2422
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
2423
+ {
2424
+ ref,
2425
+ orientation,
2426
+ className: cn(
2427
+ styles41["scroll-bar"],
2428
+ orientation === "vertical" && styles41["scroll-bar--vertical"],
2429
+ orientation === "horizontal" && styles41["scroll-bar--horizontal"],
2430
+ className
2431
+ ),
2432
+ ...props,
2433
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: styles41["scroll-area-thumb"] })
2434
+ }
2435
+ ));
2436
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2437
+ var SearchIcon2 = Search;
2438
+ var SearchBar = ({
2439
+ searchQuery,
2440
+ setSearchQuery,
2441
+ placeholder = "Search...",
2442
+ className
2443
+ }) => {
2444
+ const handleChange = (e) => {
2445
+ setSearchQuery(e.target.value);
2446
+ };
2447
+ const handleClear = () => {
2448
+ setSearchQuery("");
2449
+ };
2450
+ return /* @__PURE__ */ jsx("div", { className: cn(styles42["search-bar"], className), children: /* @__PURE__ */ jsx(
2451
+ Input,
2452
+ {
2453
+ placeholder,
2454
+ value: searchQuery,
2455
+ onChange: handleChange,
2456
+ className: styles42["input"],
2457
+ prefix: /* @__PURE__ */ jsx(SearchIcon2, { className: styles42["search-icon"] }),
2458
+ suffix: searchQuery && /* @__PURE__ */ jsx(
2459
+ IconButton,
2460
+ {
2461
+ name: "XIcon",
2462
+ onClick: handleClear,
2463
+ className: styles42["clear-button"],
2464
+ label: "Clear search"
2465
+ }
2466
+ )
2467
+ }
2468
+ ) });
2469
+ };
2470
+ var SectionHeading = ({
2471
+ heading,
2472
+ description,
2473
+ renderRightContent,
2474
+ className
2475
+ }) => {
2476
+ const hasRightContent = !!renderRightContent;
2477
+ return /* @__PURE__ */ jsxs("div", { className: cn(hasRightContent && styles43["section-heading--right-content"], className), children: [
2478
+ /* @__PURE__ */ jsxs("div", { className: styles43["content"], children: [
2479
+ /* @__PURE__ */ jsx("h3", { className: styles43["heading"], children: heading }),
2480
+ description && /* @__PURE__ */ jsx("p", { className: styles43["description"], children: description })
2481
+ ] }),
2482
+ hasRightContent && renderRightContent()
2483
+ ] });
2484
+ };
2485
+ var Separator3 = React15.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
2486
+ SeparatorPrimitive.Root,
2487
+ {
2488
+ ref,
2489
+ decorative,
2490
+ orientation,
2491
+ className: cn(
2492
+ styles44["separator"],
2493
+ orientation === "horizontal" ? styles44["separator--horizontal"] : styles44["separator--vertical"],
2494
+ className
2495
+ ),
2496
+ ...props
2497
+ }
2498
+ ));
2499
+ Separator3.displayName = SeparatorPrimitive.Root.displayName;
2500
+ var Sheet = DialogPrimitive.Root;
2501
+ var SheetTrigger = DialogPrimitive.Trigger;
2502
+ var SheetClose = DialogPrimitive.Close;
2503
+ var SheetPortal = ({ children }) => /* @__PURE__ */ jsx(DialogPrimitive.Portal, { container: getThemeProviderRoot(), children });
2504
+ var SheetOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: cn(styles45["sheet-overlay"], className), ...props, ref }));
2505
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
2506
+ var sheetVariants = cva(styles45["sheet-content"], {
2507
+ variants: {
2508
+ side: {
2509
+ top: styles45["sheet-content--side-top"],
2510
+ bottom: styles45["sheet-content--side-bottom"],
2511
+ left: styles45["sheet-content--side-left"],
2512
+ right: styles45["sheet-content--side-right"]
2513
+ }
2514
+ },
2515
+ defaultVariants: {
2516
+ side: "right"
2517
+ }
2518
+ });
2519
+ var SheetContainer = React15.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
2520
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
2521
+ /* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children })
2522
+ ] }));
2523
+ SheetContainer.displayName = DialogPrimitive.Content.displayName;
2524
+ var SheetHeaderIcon = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles45["sheet-header-icon"], className), ...props });
2525
+ SheetHeaderIcon.displayName = "SheetHeaderIcon";
2526
+ var SheetHeader = ({ className, children, ...props }) => {
2527
+ const childrenArray = React15.Children.toArray(children);
2528
+ const icon = childrenArray.find(
2529
+ (child) => React15.isValidElement(child) && child.type === SheetHeaderIcon
2530
+ );
2531
+ const otherChildren = childrenArray.filter(
2532
+ (child) => !(React15.isValidElement(child) && child.type === SheetHeaderIcon)
2533
+ );
2534
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles45["sheet-header"], className), ...props, children: [
2535
+ icon,
2536
+ /* @__PURE__ */ jsx("div", { className: styles45["sheet-header-text-content"], children: otherChildren }),
2537
+ /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { name: "X", label: "Close", className: styles45["sheet-close"] }) })
2538
+ ] });
2539
+ };
2540
+ SheetHeader.displayName = "SheetHeader";
2541
+ var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles45["sheet-footer"], className), ...props });
2542
+ SheetFooter.displayName = "SheetFooter";
2543
+ var SheetTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn(styles45["sheet-title"], className), ...props }));
2544
+ SheetTitle.displayName = DialogPrimitive.Title.displayName;
2545
+ var SheetDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2546
+ DialogPrimitive.Description,
2547
+ {
2548
+ ref,
2549
+ className: cn(styles45["sheet-description"], className),
2550
+ ...props
2551
+ }
2552
+ ));
2553
+ SheetDescription.displayName = DialogPrimitive.Description.displayName;
2554
+ var SheetContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles45["sheet-body"], "styled-vertical-scrollbar", className), ...props });
2555
+ SheetContent.displayName = "SheetContent";
2556
+ function Skeleton({ className, ...props }) {
2557
+ return /* @__PURE__ */ jsx("div", { className: cn(styles46["skeleton"], className), ...props });
2558
+ }
2559
+ var ChevronDownIcon4 = ChevronDown;
2560
+ function SortSelector({
2561
+ sortField,
2562
+ defaultSortField = "name",
2563
+ sortOrder,
2564
+ defaultSortOrder = "asc",
2565
+ sortMode = "created",
2566
+ setSortField,
2567
+ setSortOrder,
2568
+ setCurrentPage,
2569
+ showDateOptions = true,
2570
+ className
2571
+ }) {
2572
+ const options = [
2573
+ { value: "name-asc", label: "Name (A-Z)" },
2574
+ { value: "name-desc", label: "Name (Z-A)" },
2575
+ ...showDateOptions ? sortMode === "created" ? [
2576
+ { value: "createdAt-desc", label: "Recently Created" },
2577
+ { value: "createdAt-asc", label: "Oldest Created" }
2578
+ ] : [
2579
+ { value: "updatedAt-desc", label: "Recently Updated" },
2580
+ { value: "updatedAt-asc", label: "Oldest Updated" }
2581
+ ] : []
2582
+ ];
2583
+ const currentValue = `${sortField}-${sortOrder}`;
2584
+ const currentLabel = options.find((option) => option.value === currentValue)?.label || "Sort";
2585
+ const isDefaultSort = sortField === defaultSortField && sortOrder === defaultSortOrder;
2586
+ const filteredOptions = options.filter(
2587
+ (option) => option.value && option.value.trim() !== "" && option.label && option.label.trim() !== ""
2588
+ );
2589
+ const handleChange = (value) => {
2590
+ const [field, order] = value.split("-");
2591
+ setSortField(field);
2592
+ setSortOrder(order);
2593
+ setCurrentPage?.(1);
2594
+ };
2595
+ const handleReset = () => {
2596
+ setSortField(defaultSortField);
2597
+ setSortOrder(defaultSortOrder);
2598
+ setCurrentPage?.(1);
2599
+ };
2600
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
2601
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "tertiary", className: cn(styles47["sort-selector-trigger"], className), children: [
2602
+ /* @__PURE__ */ jsx("span", { children: currentLabel }),
2603
+ /* @__PURE__ */ jsx(ChevronDownIcon4, { className: styles47["chevron-down-icon"] })
2604
+ ] }) }),
2605
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: styles47["dropdown-menu-content"], children: [
2606
+ /* @__PURE__ */ jsxs(DropdownMenuLabel, { children: [
2607
+ "Sort",
2608
+ !isDefaultSort && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: handleReset, children: "Reset" })
2609
+ ] }),
2610
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
2611
+ filteredOptions.map((option) => {
2612
+ const isSelected = currentValue === option.value;
2613
+ return /* @__PURE__ */ jsx(
2614
+ DropdownMenuCheckboxItem,
2615
+ {
2616
+ checked: isSelected,
2617
+ onCheckedChange: () => handleChange(option.value),
2618
+ onSelect: (e) => e.preventDefault(),
2619
+ children: option.label
2620
+ },
2621
+ option.value
2622
+ );
2623
+ })
2624
+ ] })
2625
+ ] });
2626
+ }
2627
+ var Switch = React15.forwardRef(
2628
+ ({ className, size = "md", variant = "default", thumbIcon, ...props }, ref) => {
2629
+ const iconSize = size === "sm" ? "xs" : size === "md" ? "sm" : "md";
2630
+ return /* @__PURE__ */ jsx(
2631
+ SwitchPrimitives.Root,
2632
+ {
2633
+ className: cn(styles48["switch"], styles48[size], styles48[variant], className),
2634
+ ...props,
2635
+ ref,
2636
+ children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn(styles48["thumb"], styles48[size]), children: thumbIcon && /* @__PURE__ */ jsx(Icon, { icon: thumbIcon, className: styles48["thumb-icon"], size: iconSize }) })
2637
+ }
2638
+ );
2639
+ }
2640
+ );
2641
+ Switch.displayName = SwitchPrimitives.Root.displayName;
2642
+ var ArrowDownIcon = ArrowDown;
2643
+ var ArrowUpIcon = ArrowUp;
2644
+ var ArrowUpDownIcon = ArrowUpDown;
2645
+ function SortButton({
2646
+ field,
2647
+ children,
2648
+ icon,
2649
+ sortField,
2650
+ sortDirection,
2651
+ onSort
2652
+ }) {
2653
+ const isActive = sortField === field;
2654
+ const isAscending = sortDirection === "asc";
2655
+ const handleClick = () => {
2656
+ onSort(field);
2657
+ };
2658
+ return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleClick, className: styles49["sort-button"], children: [
2659
+ icon,
2660
+ children,
2661
+ /* @__PURE__ */ jsx("div", { className: styles49["arrow-container"], children: isActive ? isAscending ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : /* @__PURE__ */ jsx(ArrowDownIcon, {}) : /* @__PURE__ */ jsx(ArrowUpDownIcon, { className: styles49["arrow-up-down-icon"] }) })
2662
+ ] });
2663
+ }
2664
+ var tableElevationVariants = generateElevationVariants(styles50, "table", ELEVATION.RAISED);
2665
+ var TableContainer = React15.forwardRef(({ className, elevation = ELEVATION.RAISED, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: (styles50["table"], tableElevationVariants({ elevation })), children: /* @__PURE__ */ jsx("table", { ref, className: styles50["table-inner"], ...props }) }));
2666
+ TableContainer.displayName = "Table";
2667
+ var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn(styles50["table-header"], className), ...props }));
2668
+ TableHeader.displayName = "TableHeader";
2669
+ var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn(styles50["table-body"], className), ...props }));
2670
+ TableBody.displayName = "TableBody";
2671
+ var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles50["table-footer"], className), ...props }));
2672
+ TableFooter.displayName = "TableFooter";
2673
+ var TableRow = React15.forwardRef(
2674
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { ref, className: cn(styles50["table-row"], className), ...props })
2675
+ );
2676
+ TableRow.displayName = "TableRow";
2677
+ var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles50["table-head"], className), ...props }));
2678
+ TableHead.displayName = "TableHead";
2679
+ var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className: styles50["table-cell"], ...props }));
2680
+ TableCell.displayName = "TableCell";
2681
+ var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: styles50["table-caption"], ...props }));
2682
+ TableCaption.displayName = "TableCaption";
2683
+ var tableElevationVariants2 = generateElevationVariants(styles51, "table", ELEVATION.BASE);
2684
+ var Table = ({
2685
+ columns,
2686
+ rows,
2687
+ className,
2688
+ border = false,
2689
+ elevation = ELEVATION.BASE
2690
+ }) => {
2691
+ return /* @__PURE__ */ jsx(
2692
+ "div",
2693
+ {
2694
+ className: cn(
2695
+ styles51["table"],
2696
+ border && styles51["table-border"],
2697
+ tableElevationVariants2({ elevation }),
2698
+ className
2699
+ ),
2700
+ children: /* @__PURE__ */ jsxs(TableContainer, { elevation, children: [
2701
+ /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx(TableHead, { className: column.className, children: column.content }, column.key)) }) }),
2702
+ /* @__PURE__ */ jsx(TableBody, { children: rows.map((row) => /* @__PURE__ */ jsx(
2703
+ TableRow,
2704
+ {
2705
+ className: cn(row.className, row.onClick && styles51["table-row-clickable"]),
2706
+ onClick: row.onClick,
2707
+ children: row.cells.map((cell) => /* @__PURE__ */ jsx(TableCell, { className: cell.className, children: cell.content }, cell.key))
2708
+ },
2709
+ row.key
2710
+ )) })
2711
+ ] })
2712
+ }
2713
+ );
2714
+ };
2715
+ var TabsContainer = TabsPrimitive.Root;
2716
+ var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.List, { ref, className: cn(styles52["tabs-list"], className), ...props }));
2717
+ TabsList.displayName = TabsPrimitive.List.displayName;
2718
+ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ref, className: cn(styles52["tabs-trigger"], className), ...props }));
2719
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
2720
+ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Content, { ref, className: cn(styles52["tabs-content"], className), ...props }));
2721
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
2722
+ var Tabs = ({ id, items, className, tabsListBackground = "transparent" }) => {
2723
+ const [activeTab, setActiveTab] = useState(items[0].value);
2724
+ const isFilled = tabsListBackground === "filled";
2725
+ const handleValueChange = (newTab) => {
2726
+ setActiveTab(newTab);
2727
+ };
2728
+ const renderIcon = (icon) => {
2729
+ if (icon) {
2730
+ return /* @__PURE__ */ jsx(Icon, { icon, size: "sm", className: styles53["tabs-icon"] });
2731
+ }
2732
+ return null;
2733
+ };
2734
+ const renderActiveStyle = (isActive) => {
2735
+ if (isActive) {
2736
+ return /* @__PURE__ */ jsx(
2737
+ motion.span,
2738
+ {
2739
+ className: cn(
2740
+ styles53["active-tab-indicator"],
2741
+ isFilled ? styles53["active-tab-indicator--filled"] : styles53["active-tab-indicator--transparent"]
2742
+ ),
2743
+ initial: false,
2744
+ layoutId: `${id}-active-tab-indicator`
2745
+ }
2746
+ );
2747
+ }
2748
+ return null;
2749
+ };
2750
+ return /* @__PURE__ */ jsxs(
2751
+ TabsContainer,
2752
+ {
2753
+ value: activeTab,
2754
+ onValueChange: handleValueChange,
2755
+ className: cn(styles53["tabs"], className),
2756
+ children: [
2757
+ /* @__PURE__ */ jsx(
2758
+ TabsList,
2759
+ {
2760
+ className: cn(
2761
+ styles53["tabs-list"],
2762
+ isFilled ? styles53["tabs-list--filled"] : styles53["tabs-list--transparent"]
2763
+ ),
2764
+ children: items.map(({ label, value, icon }) => {
2765
+ const isActive = activeTab === value;
2766
+ return /* @__PURE__ */ jsxs(
2767
+ TabsTrigger,
2768
+ {
2769
+ value,
2770
+ className: cn(
2771
+ styles53["tabs-trigger"],
2772
+ isFilled ? styles53["tabs-trigger--filled"] : styles53["tabs-trigger--transparent"]
2773
+ ),
2774
+ "data-tour": `${value}-tab-overview`,
2775
+ children: [
2776
+ renderIcon(icon),
2777
+ label,
2778
+ renderActiveStyle(isActive)
2779
+ ]
2780
+ },
2781
+ value
2782
+ );
2783
+ })
2784
+ }
2785
+ ),
2786
+ items.map(({ value, content }) => /* @__PURE__ */ jsx(TabsContent, { value, className: styles53["content"], children: content }, value))
2787
+ ]
2788
+ }
2789
+ );
2790
+ };
2791
+ var Textarea = React15.forwardRef(
2792
+ ({ className, ...props }, ref) => {
2793
+ return /* @__PURE__ */ jsx("textarea", { className: cn(styles54["textarea"], className), ref, ...props });
2794
+ }
2795
+ );
2796
+ Textarea.displayName = "Textarea";
2797
+ var XIcon2 = X;
2798
+ var ToastProvider = ToastPrimitives.Provider;
2799
+ var ToastViewport = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2800
+ ToastPrimitives.Viewport,
2801
+ {
2802
+ ref,
2803
+ className: cn(styles55["toast-viewport"], className),
2804
+ ...props
2805
+ }
2806
+ ));
2807
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
2808
+ var toastVariants = cva(styles55["toast"], {
2809
+ variants: {
2810
+ variant: {
2811
+ default: styles55["toast--default"],
2812
+ danger: styles55["toast--danger"],
2813
+ warning: styles55["toast--warning"],
2814
+ success: styles55["toast--success"]
2815
+ }
2816
+ },
2817
+ defaultVariants: {
2818
+ variant: "default"
2819
+ }
2820
+ });
2821
+ var ToastContainer = React15.forwardRef(({ className, variant, ...props }, ref) => {
2822
+ return /* @__PURE__ */ jsx(
2823
+ ToastPrimitives.Root,
2824
+ {
2825
+ ref,
2826
+ className: cn(toastVariants({ variant }), className),
2827
+ ...props
2828
+ }
2829
+ );
2830
+ });
2831
+ ToastContainer.displayName = ToastPrimitives.Root.displayName;
2832
+ var ToastAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, { ref, className: cn(styles55["toast-action"], className), ...props }));
2833
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
2834
+ var ToastClose = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, { ref, className: cn(styles55["toast-close"], className), ...props, children: /* @__PURE__ */ jsx(XIcon2, { className: styles55["toast-close-icon"] }) }));
2835
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
2836
+ var ToastTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles55["toast-title"], className), ...props }));
2837
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
2838
+ var ToastDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2839
+ ToastPrimitives.Description,
2840
+ {
2841
+ ref,
2842
+ className: cn(styles55["toast-description"], className),
2843
+ ...props
2844
+ }
2845
+ ));
2846
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
2847
+ var TOAST_LIMIT = 1;
2848
+ var TOAST_REMOVE_DELAY = 1e6;
2849
+ var count = 0;
2850
+ function genId() {
2851
+ count = (count + 1) % Number.MAX_SAFE_INTEGER;
2852
+ return count.toString();
2853
+ }
2854
+ var toastTimeouts = /* @__PURE__ */ new Map();
2855
+ var addToRemoveQueue = (toastId) => {
2856
+ if (toastTimeouts.has(toastId)) {
2857
+ return;
2858
+ }
2859
+ const timeout = setTimeout(() => {
2860
+ toastTimeouts.delete(toastId);
2861
+ dispatch({
2862
+ type: "REMOVE_TOAST",
2863
+ toastId
2864
+ });
2865
+ }, TOAST_REMOVE_DELAY);
2866
+ toastTimeouts.set(toastId, timeout);
2867
+ };
2868
+ var reducer = (state, action) => {
2869
+ switch (action.type) {
2870
+ case "ADD_TOAST":
2871
+ return {
2872
+ ...state,
2873
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
2874
+ };
2875
+ case "UPDATE_TOAST":
2876
+ return {
2877
+ ...state,
2878
+ toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t)
2879
+ };
2880
+ case "DISMISS_TOAST": {
2881
+ const { toastId } = action;
2882
+ if (toastId) {
2883
+ addToRemoveQueue(toastId);
2884
+ } else {
2885
+ state.toasts.forEach((toast2) => {
2886
+ addToRemoveQueue(toast2.id);
2887
+ });
2888
+ }
2889
+ return {
2890
+ ...state,
2891
+ toasts: state.toasts.map(
2892
+ (t) => t.id === toastId || toastId === void 0 ? {
2893
+ ...t,
2894
+ open: false
2895
+ } : t
2896
+ )
2897
+ };
2898
+ }
2899
+ case "REMOVE_TOAST":
2900
+ if (action.toastId === void 0) {
2901
+ return {
2902
+ ...state,
2903
+ toasts: []
2904
+ };
2905
+ }
2906
+ return {
2907
+ ...state,
2908
+ toasts: state.toasts.filter((t) => t.id !== action.toastId)
2909
+ };
2910
+ }
2911
+ };
2912
+ var listeners = [];
2913
+ var memoryState = { toasts: [] };
2914
+ function dispatch(action) {
2915
+ memoryState = reducer(memoryState, action);
2916
+ listeners.forEach((listener) => {
2917
+ listener(memoryState);
2918
+ });
2919
+ }
2920
+ function toast({ ...props }) {
2921
+ const id = genId();
2922
+ const update = (props2) => dispatch({
2923
+ type: "UPDATE_TOAST",
2924
+ toast: { ...props2, id }
2925
+ });
2926
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
2927
+ dispatch({
2928
+ type: "ADD_TOAST",
2929
+ toast: {
2930
+ ...props,
2931
+ id,
2932
+ open: true,
2933
+ onOpenChange: (open) => {
2934
+ if (!open) dismiss();
2935
+ }
2936
+ }
2937
+ });
2938
+ return {
2939
+ id,
2940
+ dismiss,
2941
+ update
2942
+ };
2943
+ }
2944
+ function useToast() {
2945
+ const [state, setState] = useState(memoryState);
2946
+ useEffect(() => {
2947
+ listeners.push(setState);
2948
+ return () => {
2949
+ const index = listeners.indexOf(setState);
2950
+ if (index > -1) {
2951
+ listeners.splice(index, 1);
2952
+ }
2953
+ };
2954
+ }, []);
2955
+ return {
2956
+ ...state,
2957
+ toast,
2958
+ dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
2959
+ };
2960
+ }
2961
+ var Toast = ({ toast: toast2 }) => {
2962
+ const { id, title, description, action, ...props } = toast2;
2963
+ return /* @__PURE__ */ jsxs(ToastContainer, { ...props, children: [
2964
+ /* @__PURE__ */ jsxs("div", { className: styles56["toast-copy"], children: [
2965
+ title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
2966
+ description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
2967
+ ] }),
2968
+ action && /* @__PURE__ */ jsx("div", { className: styles56["toast-action"], children: action }),
2969
+ /* @__PURE__ */ jsx(ToastClose, {})
2970
+ ] });
2971
+ };
2972
+ var Toaster = () => {
2973
+ const { toasts } = useToast();
2974
+ return toasts.map(function(toast2) {
2975
+ return /* @__PURE__ */ jsx(Toast, { toast: toast2 }, toast2.id);
2976
+ });
2977
+ };
2978
+ var ToastRoot = () => {
2979
+ return /* @__PURE__ */ jsxs(ToastProvider, { children: [
2980
+ /* @__PURE__ */ jsx(Toaster, {}),
2981
+ /* @__PURE__ */ jsx(ToastViewport, {})
2982
+ ] });
2983
+ };
2984
+ var TruncatedDescription = ({
2985
+ className,
2986
+ description,
2987
+ maxLength = 120
2988
+ }) => {
2989
+ const plainText = removeHtmlTags(description);
2990
+ const isLongDescription = plainText.length > maxLength;
2991
+ const truncatedDescription = isLongDescription ? `${description.slice(0, maxLength)}...` : description;
2992
+ const [expanded, setExpanded] = useState(!isLongDescription);
2993
+ const displayDescription = expanded ? description : truncatedDescription;
2994
+ const handleToggle = (e) => {
2995
+ e.stopPropagation();
2996
+ setExpanded(!expanded);
2997
+ };
2998
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles57["truncated-description"], className), children: [
2999
+ /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: displayDescription } }),
3000
+ isLongDescription && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: handleToggle, children: expanded ? "Show less" : "Show more" })
3001
+ ] });
3002
+ };
3003
+ var removeHtmlTags = (html) => {
3004
+ return html.replace(/<[^>]*>/g, "");
3005
+ };
3006
+ var Heading = forwardRef(
3007
+ ({ className, as, displayAs, children, ...props }, ref) => {
3008
+ const displayClasses = {
3009
+ h1: styles58["h1"],
3010
+ h2: styles58["h2"],
3011
+ h3: styles58["h3"],
3012
+ h4: styles58["h4"],
3013
+ h5: styles58["h5"],
3014
+ h6: styles58["h6"]
3015
+ };
3016
+ const displayClass = displayClasses[displayAs] || displayClasses[as];
3017
+ const HeadingTag = as;
3018
+ return /* @__PURE__ */ jsx(HeadingTag, { ref, className: cn(displayClass, className), ...props, children });
3019
+ }
3020
+ );
3021
+ Heading.displayName = "Heading";
3022
+ var ControlStatusBadge = ({ status, display = "both" }) => {
3023
+ const config = getStatusConfig(status);
3024
+ return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display, className: config.className, variant: null, children: config.label });
3025
+ };
3026
+ var getStatusConfig = (status) => {
3027
+ switch (status) {
3028
+ case "in-progress":
3029
+ return {
3030
+ icon: "Clock",
3031
+ className: styles59["badge--in-progress"],
3032
+ label: "In Progress"
3033
+ };
3034
+ case "not-started":
3035
+ return {
3036
+ icon: "Circle",
3037
+ className: styles59["badge--not-started"],
3038
+ label: "Not Started"
3039
+ };
3040
+ case "ready-for-review":
3041
+ return {
3042
+ icon: "ClipboardCheck",
3043
+ className: styles59["badge--ready-for-review"],
3044
+ label: "Ready for Review"
3045
+ };
3046
+ case "in-review":
3047
+ return {
3048
+ icon: "Eye",
3049
+ className: styles59["badge--in-review"],
3050
+ label: "In Review"
3051
+ };
3052
+ case "comment":
3053
+ return {
3054
+ icon: "MessageCircle",
3055
+ className: styles59["badge--comment"],
3056
+ label: "Comment"
3057
+ };
3058
+ case "not-applicable":
3059
+ return {
3060
+ icon: "MinusCircle",
3061
+ className: styles59["badge--not-applicable"],
3062
+ label: "Not Applicable"
3063
+ };
3064
+ case "accepted":
3065
+ return {
3066
+ icon: /* @__PURE__ */ jsx(MessageCircleCheckIcon, {}),
3067
+ className: styles59["badge--accepted"],
3068
+ label: "Accepted"
3069
+ };
3070
+ case "questioned":
3071
+ return {
3072
+ icon: "MessageCircleQuestion",
3073
+ className: styles59["badge--question"],
3074
+ label: "Questioned"
3075
+ };
3076
+ case "general":
3077
+ return {
3078
+ icon: "MessageCircle",
3079
+ className: styles59["badge--comment"],
3080
+ label: "General"
3081
+ };
3082
+ case "compliant":
3083
+ return {
3084
+ icon: "Check",
3085
+ className: styles59["badge--compliant"],
3086
+ label: "Compliant"
3087
+ };
3088
+ case "non-compliant":
3089
+ return {
3090
+ icon: "X",
3091
+ className: styles59["badge--non-compliant"],
3092
+ label: "Non-compliant"
3093
+ };
3094
+ default:
3095
+ return {
3096
+ icon: "Circle",
3097
+ className: styles59["badge--not-started"],
3098
+ label: status
3099
+ };
3100
+ }
3101
+ };
3102
+ var MessageCircleCheckIcon = ({ className }) => {
3103
+ return /* @__PURE__ */ jsxs(
3104
+ "svg",
3105
+ {
3106
+ xmlns: "http://www.w3.org/2000/svg",
3107
+ width: "12",
3108
+ height: "12",
3109
+ viewBox: "0 0 24 24",
3110
+ fill: "none",
3111
+ stroke: "currentColor",
3112
+ "stroke-width": "2",
3113
+ "stroke-linecap": "round",
3114
+ "stroke-linejoin": "round",
3115
+ children: [
3116
+ /* @__PURE__ */ jsx("path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }),
3117
+ /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
3118
+ ]
3119
+ }
3120
+ );
3121
+ };
3122
+ var Portal8 = () => {
3123
+ return /* @__PURE__ */ jsx("div", { id: "equality-theme-provider-root-portal" });
3124
+ };
3125
+ var ThemeProvider = ({ customVars, children }) => {
3126
+ return /* @__PURE__ */ jsxs("div", { id: "equality-theme-provider-root", className: styles60.root, style: customVars, children: [
3127
+ children,
3128
+ /* @__PURE__ */ jsx(Portal8, {})
3129
+ ] });
3130
+ };
3131
+
3132
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, 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, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, 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, Table, 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, displayFieldVariants, iconButtonVariants, reducer, toast, useFormField, useTheme, useToast };
3133
+ //# sourceMappingURL=index.js.map
3134
+ //# sourceMappingURL=index.js.map