@candidhealth/react-vitals 1.0.0-alpha.2 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,75 @@
1
+ // src/core/avatar/Avatar.tsx
2
+ import { forwardRef } from "react";
3
+ import { twJoin as twJoin2 } from "tailwind-merge";
4
+
5
+ // src/core/text/Text.tsx
6
+ import { twJoin } from "tailwind-merge";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var VARIANT_STYLES = {
9
+ "marketing-headline": "text-marketing-headline",
10
+ "headline-1": "text-headline-1",
11
+ "headline-2": "text-headline-2",
12
+ "headline-3": "text-headline-3",
13
+ "headline-4": "text-headline-4",
14
+ "title-1": "text-title-1",
15
+ "title-2": "text-title-2",
16
+ "title-3": "text-title-3",
17
+ "body-1": "text-body-1",
18
+ "body-2": "text-body-2",
19
+ label: "text-label",
20
+ footnote: "text-footnote",
21
+ smallcaps: "text-smallcaps uppercase"
22
+ };
23
+ var Text = ({ as, variant = "body-1", children, className, ...props }) => {
24
+ const Tag2 = as ?? "p";
25
+ return /* @__PURE__ */ jsx(Tag2, { ...props, className: twJoin(VARIANT_STYLES[variant], className), children });
26
+ };
27
+
28
+ // src/core/avatar/Avatar.tsx
29
+ import { jsx as jsx2 } from "react/jsx-runtime";
30
+ var getInitials = (name) => {
31
+ const trimmed = name.trim();
32
+ if (trimmed.includes(" ")) {
33
+ const parts = trimmed.split(" ");
34
+ return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
35
+ }
36
+ return trimmed.slice(0, 2).toUpperCase();
37
+ };
38
+ var Avatar = forwardRef(
39
+ ({ name, variant = "active", size = "md", className, ...props }, ref) => {
40
+ const initials = getInitials(name);
41
+ const isActive = variant === "active";
42
+ return /* @__PURE__ */ jsx2(
43
+ "div",
44
+ {
45
+ ref,
46
+ className: twJoin2(
47
+ "flex items-center justify-center rounded-full border border-indigo-200",
48
+ isActive ? "bg-indigo-100" : "bg-indigo-50",
49
+ size == "md" && "size-8.5",
50
+ size == "sm" && "size-7",
51
+ className
52
+ ),
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx2(Text, { className: twJoin2("font-semibold text-muted", !isActive && "opacity-50"), children: initials })
55
+ }
56
+ );
57
+ }
58
+ );
59
+
60
+ // src/core/avatar/AvatarGroup.tsx
61
+ import { twJoin as twJoin4 } from "tailwind-merge";
62
+
63
+ // src/core/popover/Popover.tsx
64
+ import * as RadixPopover from "@radix-ui/react-popover";
65
+ import { twMerge as twMerge2 } from "tailwind-merge";
66
+
1
67
  // src/core/button/Button.tsx
2
68
  import * as React from "react";
3
69
  import { twMerge } from "tailwind-merge";
4
70
 
5
71
  // src/core/button/buttonStyles.ts
6
- import { twJoin } from "tailwind-merge";
72
+ import { twJoin as twJoin3 } from "tailwind-merge";
7
73
  var linkStyles = "text-indigo-600 hover:underline active:text-indigo-400 focus:outline-indigo-400 focus:outline-offset-2";
8
74
  var roundedMdStyles = {
9
75
  none: "",
@@ -45,21 +111,21 @@ var sizeStyles = {
45
111
  };
46
112
  var colorStyles = {
47
113
  default: {
48
- primary: "bg-indigo-600 hover:bg-indigo-700 data-[state='open']:bg-indigo-700 border border-indigo-700 text-white",
49
- default: "bg-white hover:bg-gray-100 data-[state='open']:bg-gray-100 border border-gray-200 text-gray-700",
50
- danger: "bg-red-600 hover:bg-red-700 data-[state='open']:bg-red-700 border border-red-700 text-white",
114
+ primary: "bg-button-primary hover:bg-button-primary-hover data-[state='open']:bg-button-primary-hover border border-button-primary hover:border-button-primary-hover text-white",
115
+ default: "bg-button-white hover:bg-button-white-hover data-[state='open']:bg-button-white-hover border border-button-white text-neutral",
116
+ danger: "bg-button-danger hover:bg-button-danger-hover data-[state='open']:bg-button-danger-hover border border-button-danger text-white",
51
117
  error: "bg-white hover:bg-red-50 data-[state='open']:bg-red-50 text-red-500 border border-red-300"
52
118
  },
53
119
  transparent: {
54
120
  primary: "bg-indigo-900/0 hover:bg-indigo-900/10 data-[state='open']:bg-indigo-900/10 text-indigo-700",
55
- default: "bg-gray-900/0 hover:bg-gray-900/10 data-[state='open']:bg-gray-900/10 text-gray-700",
121
+ default: "bg-gray-900/0 hover:bg-gray-900/10 data-[state='open']:bg-gray-900/10 text-neutral",
56
122
  danger: "bg-red-900/0 hover:bg-red-900/10 data-[state='open']:bg-red-900/10 text-red-700",
57
123
  error: "bg-red-900/0 hover:bg-red-900/10 data-[state='open']:bg-red-900/10 text-red-500"
58
124
  },
59
125
  dark: {
60
- primary: "bg-indigo-600 hover:bg-indigo-700 data-[state='open']:bg-indigo-700 border border-indigo-700 text-white",
126
+ primary: "bg-indigo-600 hover:bg-indigo-700 data-[state='open']:bg-indigo-700 border border-button-primary text-white",
61
127
  default: "bg-gray-900 hover:bg-gray-600 data-[state='open']:bg-gray-600 text-white",
62
- danger: "bg-red-600 hover:bg-red-700 data-[state='open']:bg-red-700 text-white",
128
+ danger: "bg-button-danger hover:bg-button-danger-hover data-[state='open']:bg-button-danger-hover text-white",
63
129
  error: "bg-white hover:bg-red-50 data-[state='open']:bg-red-50 text-red-500"
64
130
  }
65
131
  };
@@ -72,10 +138,7 @@ var buttonStyles = ({
72
138
  loading,
73
139
  roundedness = "default"
74
140
  }) => {
75
- if (variant === "link") {
76
- return twJoin(fullWidth && "w-full", loading && "animate-loading-pulse", linkStyles);
77
- }
78
- return twJoin(
141
+ return twJoin3(
79
142
  "flex items-center justify-center whitespace-nowrap focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-inset disabled:pointer-events-none disabled:opacity-50",
80
143
  fullWidth && "w-full",
81
144
  borderRadiusStyles[roundedness][size][soften],
@@ -86,7 +149,7 @@ var buttonStyles = ({
86
149
  };
87
150
 
88
151
  // src/core/button/Button.tsx
89
- import { jsx } from "react/jsx-runtime";
152
+ import { jsx as jsx3 } from "react/jsx-runtime";
90
153
  var ButtonImpl = ({
91
154
  fullWidth,
92
155
  size,
@@ -100,7 +163,7 @@ var ButtonImpl = ({
100
163
  children,
101
164
  ...rest
102
165
  }, ref) => {
103
- return /* @__PURE__ */ jsx(
166
+ return /* @__PURE__ */ jsx3(
104
167
  "button",
105
168
  {
106
169
  type: "button",
@@ -115,13 +178,13 @@ var ButtonImpl = ({
115
178
  var Button = React.forwardRef(ButtonImpl);
116
179
 
117
180
  // src/core/button/ButtonGroup.tsx
118
- import { jsx as jsx2 } from "react/jsx-runtime";
181
+ import { jsx as jsx4 } from "react/jsx-runtime";
119
182
  var ButtonGroup = ({
120
183
  size,
121
184
  value,
122
185
  onChange,
123
186
  buttons
124
- }) => /* @__PURE__ */ jsx2("div", { className: "flex", children: buttons.map((button, i) => /* @__PURE__ */ jsx2(
187
+ }) => /* @__PURE__ */ jsx4("div", { className: "flex", children: buttons.map((button, i) => /* @__PURE__ */ jsx4(
125
188
  Button,
126
189
  {
127
190
  size,
@@ -133,38 +196,212 @@ var ButtonGroup = ({
133
196
  button.value
134
197
  )) });
135
198
 
199
+ // src/core/popover/Popover.tsx
200
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
201
+ var Popover = ({
202
+ open,
203
+ trigger,
204
+ triggerClassName,
205
+ children,
206
+ arrowClassName,
207
+ contentClassName,
208
+ disabled,
209
+ onOpenChange,
210
+ alignContent,
211
+ container,
212
+ ...props
213
+ }) => /* @__PURE__ */ jsxs(RadixPopover.Root, { open, onOpenChange, children: [
214
+ /* @__PURE__ */ jsx5(RadixPopover.Trigger, { asChild: true, disabled, className: triggerClassName, children: trigger }),
215
+ /* @__PURE__ */ jsx5(
216
+ PopoverBody,
217
+ {
218
+ align: alignContent,
219
+ ...props,
220
+ contentClassName,
221
+ arrowClassName,
222
+ container,
223
+ children
224
+ }
225
+ )
226
+ ] });
227
+ var PopoverBody = ({ children, arrowClassName, contentClassName, container, ...props }) => {
228
+ return /* @__PURE__ */ jsx5(RadixPopover.Portal, { container, children: /* @__PURE__ */ jsxs(
229
+ RadixPopover.Content,
230
+ {
231
+ ...props,
232
+ className: twMerge2("isolate z-50 rounded-lg bg-white shadow-lg focus:outline-hidden", contentClassName),
233
+ children: [
234
+ children,
235
+ /* @__PURE__ */ jsx5(RadixPopover.Arrow, { className: twMerge2("fill-white", arrowClassName), offset: 8 })
236
+ ]
237
+ }
238
+ ) });
239
+ };
240
+ Popover.Root = (props) => /* @__PURE__ */ jsx5(RadixPopover.Root, { ...props });
241
+ Popover.Trigger = (props) => /* @__PURE__ */ jsx5(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx5(Button, { ...props }) });
242
+ Popover.Body = PopoverBody;
243
+ Popover.Close = (props) => /* @__PURE__ */ jsx5(RadixPopover.Close, { asChild: true, ...props });
244
+
245
+ // src/core/tooltip/Tooltip.tsx
246
+ import * as RadixTooltip from "@radix-ui/react-tooltip";
247
+
248
+ // src/core/utils/useOverflowObserver.tsx
249
+ import * as React2 from "react";
250
+ var useOverflowObserver = () => {
251
+ const [hasOverflow, setHasOverflow] = React2.useState(false);
252
+ const elementRef = React2.useRef(null);
253
+ React2.useEffect(() => {
254
+ if (elementRef.current == null) return;
255
+ const resizeObserver = new ResizeObserver(([entry]) => {
256
+ window.requestAnimationFrame(() => {
257
+ const element = entry?.target;
258
+ const hasOverflowWidth = element.offsetWidth < element.scrollWidth;
259
+ const hasOverflowHeight = element.offsetHeight < element.scrollHeight;
260
+ const calcHasOverflow = hasOverflowWidth || hasOverflowHeight;
261
+ if (calcHasOverflow !== hasOverflow) {
262
+ setHasOverflow(calcHasOverflow);
263
+ }
264
+ });
265
+ });
266
+ resizeObserver.observe(elementRef.current);
267
+ return () => resizeObserver.disconnect();
268
+ }, [hasOverflow]);
269
+ return { elementRef, hasOverflow };
270
+ };
271
+
272
+ // src/core/tooltip/Tooltip.tsx
273
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
274
+ var TooltipContent = ({ children, variant = "dark", ...rest }) => {
275
+ return /* @__PURE__ */ jsx6(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs2(
276
+ RadixTooltip.Content,
277
+ {
278
+ ...rest,
279
+ hideWhenDetached: true,
280
+ sideOffset: 6,
281
+ className: `z-9000000000 max-w-prose rounded-lg px-5 py-3 text-sm break-words shadow-lg ${variant === "dark" ? "bg-gray-900 text-white" : "bg-white text-gray-600"}`,
282
+ children: [
283
+ children,
284
+ /* @__PURE__ */ jsx6(RadixTooltip.Arrow, { className: variant === "dark" ? "fill-gray-900" : "fill-white", offset: 8 })
285
+ ]
286
+ }
287
+ ) });
288
+ };
289
+ TooltipContent.displayName = RadixTooltip.Content.displayName;
290
+ var OverflowTrigger = ({
291
+ element,
292
+ ...rest
293
+ }) => {
294
+ const { elementRef, hasOverflow } = useOverflowObserver();
295
+ if (!hasOverflow) {
296
+ return element(elementRef);
297
+ }
298
+ return /* @__PURE__ */ jsx6(RadixTooltip.Trigger, { asChild: true, ...rest, children: element(elementRef) });
299
+ };
300
+ var TooltipTrigger = (props) => /* @__PURE__ */ jsx6(RadixTooltip.Trigger, { asChild: true, ...props });
301
+ var TooltipProvider = (props) => /* @__PURE__ */ jsx6(RadixTooltip.Provider, { disableHoverableContent: true, delayDuration: 0, ...props });
302
+ var TooltipRoot = (props) => /* @__PURE__ */ jsx6(RadixTooltip.Root, { ...props });
303
+ var Tooltip = ({ trigger, content, variant, side, ...rest }) => {
304
+ return /* @__PURE__ */ jsxs2(Tooltip.Root, { ...rest, children: [
305
+ /* @__PURE__ */ jsx6(Tooltip.Trigger, { children: trigger }),
306
+ content && /* @__PURE__ */ jsx6(Tooltip.Content, { side, variant, children: content })
307
+ ] });
308
+ };
309
+ Tooltip.Provider = TooltipProvider;
310
+ Tooltip.Root = TooltipRoot;
311
+ Tooltip.Trigger = TooltipTrigger;
312
+ Tooltip.OverflowTrigger = OverflowTrigger;
313
+ Tooltip.Content = TooltipContent;
314
+
315
+ // src/core/avatar/AvatarWithName.tsx
316
+ import { twMerge as twMerge3 } from "tailwind-merge";
317
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
318
+ var AvatarWithName = ({ name, variant, className }) => /* @__PURE__ */ jsxs3("div", { className: twMerge3("flex items-center gap-2", className), children: [
319
+ /* @__PURE__ */ jsx7(Avatar, { name, variant }),
320
+ /* @__PURE__ */ jsx7(Text, { children: name })
321
+ ] });
322
+
323
+ // src/core/avatar/AvatarGroup.tsx
324
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
325
+ var AvatarGroup = ({ items, maxVisible = 3, overflowTitle, size = "md" }) => {
326
+ const visibleItems = items.slice(0, maxVisible);
327
+ const overflowItems = items.slice(maxVisible);
328
+ return /* @__PURE__ */ jsxs4(
329
+ "div",
330
+ {
331
+ className: twJoin4("flex", size === "md" && "-space-x-2", size === "sm" && "-space-x-1.5"),
332
+ "fs-id": "FSRecentViewers",
333
+ children: [
334
+ visibleItems.map((item, i) => /* @__PURE__ */ jsx8(
335
+ Tooltip,
336
+ {
337
+ trigger: /* @__PURE__ */ jsx8("span", { className: "relative", style: { zIndex: visibleItems.length - i }, children: /* @__PURE__ */ jsx8(Avatar, { name: item.name, variant: item.variant, size }) }),
338
+ content: item.tooltipContent
339
+ },
340
+ `${item.name}-${i}`
341
+ )),
342
+ overflowItems.length > 0 && /* @__PURE__ */ jsxs4(
343
+ Popover,
344
+ {
345
+ trigger: /* @__PURE__ */ jsx8(
346
+ "button",
347
+ {
348
+ type: "button",
349
+ className: twJoin4(
350
+ "relative flex items-center justify-center rounded-full border border-surface-neutral bg-surface-neutral",
351
+ size === "md" && "size-8.5",
352
+ size === "sm" && "size-7"
353
+ ),
354
+ "fs-id": "FSRecentViewersOverflowTrigger",
355
+ children: /* @__PURE__ */ jsxs4(Text, { className: "font-semibold text-muted", children: [
356
+ "+",
357
+ overflowItems.length
358
+ ] })
359
+ }
360
+ ),
361
+ contentClassName: twJoin4(size === "md" && "p-3", size === "sm" && "p-2"),
362
+ children: [
363
+ overflowTitle && /* @__PURE__ */ jsx8(Text, { className: "mb-2 font-semibold text-muted", children: overflowTitle }),
364
+ /* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-2", children: overflowItems.map((item, i) => /* @__PURE__ */ jsx8(AvatarWithName, { name: item.name, variant: item.variant }, `${item.name}-${i}`)) })
365
+ ]
366
+ }
367
+ )
368
+ ]
369
+ }
370
+ );
371
+ };
372
+
136
373
  // src/core/callout/Callout.tsx
137
- import { faCircle, faCircleInfo, faDiamond, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
138
- import { twJoin as twJoin2 } from "tailwind-merge";
374
+ import { faCircle, faDiamond, faExclamationTriangle, faInfoCircle } from "@fortawesome/sharp-solid-svg-icons";
375
+ import { twJoin as twJoin5 } from "tailwind-merge";
139
376
 
140
377
  // src/core/icon/Icon.tsx
141
378
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
142
- import { jsx as jsx3 } from "react/jsx-runtime";
143
- var Icon = ({ icon }) => /* @__PURE__ */ jsx3(FontAwesomeIcon, { icon });
379
+ import { jsx as jsx9 } from "react/jsx-runtime";
380
+ var Icon = ({ icon }) => /* @__PURE__ */ jsx9(FontAwesomeIcon, { icon });
144
381
 
145
382
  // src/core/callout/Callout.tsx
146
- import { jsx as jsx4, jsxs } from "react/jsx-runtime";
383
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
147
384
  var calloutBackgroundStyles = {
148
- default: "bg-gray-100",
385
+ default: "bg-surface-neutral",
149
386
  warning: "bg-yellow-50",
150
- primary: "bg-indigo-50",
387
+ primary: "bg-surface-primary",
151
388
  danger: "bg-red-50"
152
389
  };
153
390
  var calloutIconStyles = {
154
- default: "text-gray-500",
155
- warning: "text-yellow-700",
391
+ default: "text-muted",
392
+ warning: "text-warning",
156
393
  primary: "text-indigo-500",
157
394
  danger: "text-red-800"
158
395
  };
159
396
  var calloutBorderStyles = {
160
- default: "border-[1px] border-gray-200",
161
- primary: "border-[1px] border-indigo-100",
162
- warning: "border-[1px] border-yellow-200",
397
+ default: "border-[1px] border-surface-neutral",
398
+ primary: "border-[1px] border-surface-primary",
399
+ warning: "border-[1px] border-surface-warning",
163
400
  danger: "border-[1px] border-red-100"
164
401
  };
165
402
  var calloutIcons = {
166
- default: faCircleInfo,
167
- warning: faTriangleExclamation,
403
+ default: faInfoCircle,
404
+ warning: faExclamationTriangle,
168
405
  primary: faDiamond,
169
406
  danger: faCircle
170
407
  };
@@ -176,10 +413,10 @@ var Callout = ({
176
413
  customIcon,
177
414
  isAttachedAtBottom,
178
415
  isCentered
179
- }) => /* @__PURE__ */ jsxs(
416
+ }) => /* @__PURE__ */ jsxs5(
180
417
  "div",
181
418
  {
182
- className: twJoin2(
419
+ className: twJoin5(
183
420
  "flex w-full justify-between rounded-lg p-2.5",
184
421
  calloutBackgroundStyles[intent],
185
422
  calloutBorderStyles[intent],
@@ -187,11 +424,11 @@ var Callout = ({
187
424
  isCentered ? "items-center" : "items-start"
188
425
  ),
189
426
  children: [
190
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
191
- /* @__PURE__ */ jsx4("div", { className: twJoin2("text-sm", title ? "leading-6.5" : "leading-5", calloutIconStyles[intent]), children: /* @__PURE__ */ jsx4(Icon, { icon: customIcon ?? calloutIcons[intent] }) }),
192
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-1", children: [
193
- title && /* @__PURE__ */ jsx4("div", { className: "leading-6.5 font-medium whitespace-pre-line text-gray-700", children: title }),
194
- children && /* @__PURE__ */ jsx4("div", { className: "text-sm leading-5 text-gray-500", children })
427
+ /* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
428
+ /* @__PURE__ */ jsx10("div", { className: twJoin5("text-sm", title ? "leading-6.5" : "leading-5", calloutIconStyles[intent]), children: /* @__PURE__ */ jsx10(Icon, { icon: customIcon ?? calloutIcons[intent] }) }),
429
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col gap-1", children: [
430
+ title && /* @__PURE__ */ jsx10("div", { className: "leading-6.5 font-medium whitespace-pre-line text-neutral", children: title }),
431
+ children && /* @__PURE__ */ jsx10("div", { className: "text-sm leading-5 text-muted", children })
195
432
  ] })
196
433
  ] }),
197
434
  rightSlot
@@ -199,18 +436,36 @@ var Callout = ({
199
436
  }
200
437
  );
201
438
 
439
+ // src/core/card/Card.tsx
440
+ import React3 from "react";
441
+ import { twMerge as twMerge4 } from "tailwind-merge";
442
+ import { jsx as jsx11 } from "react/jsx-runtime";
443
+ var Card = React3.forwardRef(({ className, children, onClick }, ref) => /* @__PURE__ */ jsx11(
444
+ "div",
445
+ {
446
+ ref,
447
+ className: twMerge4(
448
+ "mb-4 rounded-lg border-solid border-surface-neutral bg-white shadow",
449
+ onClick != null && "cursor-pointer transition-shadow duration-150 hover:shadow-md",
450
+ className
451
+ ),
452
+ onClick,
453
+ children
454
+ }
455
+ ));
456
+
202
457
  // src/core/checkbox/Checkbox.tsx
203
- import { forwardRef as forwardRef2, useEffect, useRef } from "react";
204
- import { twJoin as twJoin3 } from "tailwind-merge";
205
- import { jsx as jsx5 } from "react/jsx-runtime";
206
- var Checkbox = forwardRef2(({ className, hasError, ...rest }, ref) => /* @__PURE__ */ jsx5(
458
+ import { forwardRef as forwardRef3, useEffect as useEffect2, useRef as useRef2 } from "react";
459
+ import { twJoin as twJoin6 } from "tailwind-merge";
460
+ import { jsx as jsx12 } from "react/jsx-runtime";
461
+ var Checkbox = forwardRef3(({ className, hasError, ...rest }, ref) => /* @__PURE__ */ jsx12(
207
462
  "input",
208
463
  {
209
464
  type: "checkbox",
210
- className: twJoin3(
465
+ className: twJoin6(
211
466
  className,
212
- "block rounded-sm text-indigo-600 checked:bg-indigo-600 indeterminate:bg-indigo-600 focus:ring-0 focus:ring-offset-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400 disabled:cursor-not-allowed disabled:bg-gray-200 disabled:hover:bg-gray-200",
213
- hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-gray-200 disabled:border-gray-200"
467
+ "block rounded-sm text-indigo-600 checked:bg-indigo-600 indeterminate:bg-indigo-600 focus:ring-0 focus:ring-offset-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400 disabled:cursor-not-allowed disabled:bg-surface-dark disabled:hover:bg-surface-dark",
468
+ hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-surface-neutral disabled:border-surface-neutral"
214
469
  ),
215
470
  ...rest,
216
471
  ref
@@ -220,21 +475,21 @@ var IndeterminateCheckbox = ({
220
475
  indeterminate = false,
221
476
  ...rest
222
477
  }) => {
223
- const ref = useRef(null);
224
- useEffect(() => {
478
+ const ref = useRef2(null);
479
+ useEffect2(() => {
225
480
  if (ref.current) {
226
481
  ref.current.indeterminate = indeterminate;
227
482
  }
228
483
  }, [indeterminate]);
229
- return /* @__PURE__ */ jsx5(Checkbox, { ref, ...rest });
484
+ return /* @__PURE__ */ jsx12(Checkbox, { ref, ...rest });
230
485
  };
231
486
 
232
487
  // src/core/collapsible/Collapsible.tsx
233
- import { faChevronDown, faChevronRight } from "@fortawesome/free-solid-svg-icons";
234
- import { Content, Root, Trigger } from "@radix-ui/react-collapsible";
235
- import { useState } from "react";
236
- import { twMerge as twMerge2 } from "tailwind-merge";
237
- import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
488
+ import { faChevronDown, faChevronRight } from "@fortawesome/sharp-solid-svg-icons";
489
+ import { Content as Content3, Root as Root3, Trigger as Trigger3 } from "@radix-ui/react-collapsible";
490
+ import { useState as useState2 } from "react";
491
+ import { twMerge as twMerge5 } from "tailwind-merge";
492
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
238
493
  var Collapsible = ({
239
494
  title,
240
495
  children,
@@ -246,55 +501,45 @@ var Collapsible = ({
246
501
  triggerClassName
247
502
  }) => {
248
503
  const isControlled = controlledOpen !== void 0 && controlledSetOpen !== void 0;
249
- const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
504
+ const [uncontrolledOpen, setUncontrolledOpen] = useState2(defaultOpen);
250
505
  const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
251
506
  const setIsOpen = isControlled ? controlledSetOpen : setUncontrolledOpen;
252
- return /* @__PURE__ */ jsxs2(Root, { className: "flex flex-col gap-2", open: isOpen, onOpenChange: setIsOpen, children: [
253
- /* @__PURE__ */ jsx6(
254
- Trigger,
507
+ return /* @__PURE__ */ jsxs6(Root3, { className: "flex flex-col gap-2", open: isOpen, onOpenChange: setIsOpen, children: [
508
+ /* @__PURE__ */ jsx13(
509
+ Trigger3,
255
510
  {
256
511
  asChild: true,
257
- className: twMerge2("flex cursor-pointer items-center gap-2 font-medium text-gray-500", triggerClassName),
258
- children: /* @__PURE__ */ jsxs2("div", { children: [
259
- !hideIcon && iconPosition === "left" && /* @__PURE__ */ jsx6("div", { className: "min-w-3.5", children: /* @__PURE__ */ jsx6(
260
- Icon,
261
- {
262
- icon: isOpen ? faChevronDown : faChevronRight
263
- }
264
- ) }),
512
+ className: twMerge5("flex cursor-pointer items-center gap-2 font-medium text-muted", triggerClassName),
513
+ children: /* @__PURE__ */ jsxs6("div", { children: [
514
+ !hideIcon && iconPosition === "left" && /* @__PURE__ */ jsx13("div", { className: "min-w-3.5", children: /* @__PURE__ */ jsx13(Icon, { icon: isOpen ? faChevronDown : faChevronRight }) }),
265
515
  title,
266
- !hideIcon && iconPosition === "right" && /* @__PURE__ */ jsx6("div", { className: "min-w-3.5", children: /* @__PURE__ */ jsx6(
267
- Icon,
268
- {
269
- icon: isOpen ? faChevronDown : faChevronRight
270
- }
271
- ) })
516
+ !hideIcon && iconPosition === "right" && /* @__PURE__ */ jsx13("div", { className: "min-w-3.5", children: /* @__PURE__ */ jsx13(Icon, { icon: isOpen ? faChevronDown : faChevronRight }) })
272
517
  ] })
273
518
  }
274
519
  ),
275
- /* @__PURE__ */ jsx6(Content, { className: "overflow-y-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down", children: /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2", children }) })
520
+ /* @__PURE__ */ jsx13(Content3, { className: "overflow-y-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down", children: /* @__PURE__ */ jsx13("div", { className: "flex flex-col gap-2", children }) })
276
521
  ] });
277
522
  };
278
523
 
279
524
  // src/core/collapsible-section/CollapsibleSection.tsx
280
- import { faChevronDown as faChevronDown2 } from "@fortawesome/free-solid-svg-icons";
525
+ import { faChevronDown as faChevronDown2 } from "@fortawesome/sharp-solid-svg-icons";
281
526
  import { Slot } from "@radix-ui/react-slot";
282
- import { twJoin as twJoin4 } from "tailwind-merge";
527
+ import { twJoin as twJoin7 } from "tailwind-merge";
283
528
 
284
529
  // src/core/utils/useToggle.tsx
285
- import * as React3 from "react";
530
+ import * as React5 from "react";
286
531
 
287
532
  // src/core/utils/create-context-helper.tsx
288
- import * as React2 from "react";
289
- import { jsx as jsx7 } from "react/jsx-runtime";
533
+ import * as React4 from "react";
534
+ import { jsx as jsx14 } from "react/jsx-runtime";
290
535
  var createContextHelper = (defaultContext) => {
291
- const Context = React2.createContext(defaultContext);
536
+ const Context = React4.createContext(defaultContext);
292
537
  const Provider3 = ({ children, ...rest }) => {
293
- const value = React2.useMemo(() => rest, Object.values(rest));
294
- return /* @__PURE__ */ jsx7(Context.Provider, { value, children });
538
+ const value = React4.useMemo(() => rest, Object.values(rest));
539
+ return /* @__PURE__ */ jsx14(Context.Provider, { value, children });
295
540
  };
296
541
  const useContext7 = () => {
297
- const context = React2.useContext(Context);
542
+ const context = React4.useContext(Context);
298
543
  if (context) {
299
544
  return context;
300
545
  }
@@ -307,7 +552,7 @@ var createContextHelper = (defaultContext) => {
307
552
  };
308
553
 
309
554
  // src/core/utils/useToggle.tsx
310
- import { jsx as jsx8 } from "react/jsx-runtime";
555
+ import { jsx as jsx15 } from "react/jsx-runtime";
311
556
  var [ToggleProvider, useToggleHook] = createContextHelper({
312
557
  state: false,
313
558
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -320,7 +565,7 @@ var [ToggleProvider, useToggleHook] = createContextHelper({
320
565
  var createToggleContextHelper = (defaultState = false) => {
321
566
  const Provider3 = ({ children, state: initState }) => {
322
567
  const hook = useToggle(initState ?? defaultState);
323
- return /* @__PURE__ */ jsx8(ToggleProvider, { ...hook, children });
568
+ return /* @__PURE__ */ jsx15(ToggleProvider, { ...hook, children });
324
569
  };
325
570
  Provider3.displayName = "ToggleProvider";
326
571
  return [Provider3, useToggleHook];
@@ -328,108 +573,38 @@ var createToggleContextHelper = (defaultState = false) => {
328
573
  var [IsVisibleProvider, useIsVisible] = createToggleContextHelper(true);
329
574
  var [IsEditingProvider, useIsEditing] = createToggleContextHelper(false);
330
575
  var useToggle = (initState) => {
331
- const [state, update] = React3.useState(initState ?? false);
332
- const toggle = React3.useCallback(() => update((state2) => !state2), []);
576
+ const [state, update] = React5.useState(initState ?? false);
577
+ const toggle = React5.useCallback(() => update((state2) => !state2), []);
333
578
  return { state, update, toggle };
334
579
  };
335
580
 
336
581
  // src/core/collapsible-section/CollapsibleSection.tsx
337
- import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
582
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
338
583
  var ToggleButton = ({ children, ...rest }) => {
339
584
  const { state: isVisible, toggle } = useIsVisible();
340
- return /* @__PURE__ */ jsx9(Slot, { onClick: toggle, children: /* @__PURE__ */ jsxs3(Button, { variant: "transparent", size: "xs", ...rest, children: [
341
- /* @__PURE__ */ jsx9("span", { className: twJoin4("transition-transform", !isVisible && "-rotate-90"), children: /* @__PURE__ */ jsx9(Icon, { icon: faChevronDown2 }) }),
585
+ return /* @__PURE__ */ jsx16(Slot, { onClick: toggle, children: /* @__PURE__ */ jsxs7(Button, { variant: "transparent", size: "xs", ...rest, children: [
586
+ /* @__PURE__ */ jsx16("span", { className: twJoin7("transition-transform", !isVisible && "-rotate-90"), children: /* @__PURE__ */ jsx16(Icon, { icon: faChevronDown2 }) }),
342
587
  children
343
588
  ] }) });
344
589
  };
345
- var Content2 = ({ children }) => {
590
+ var Content4 = ({ children }) => {
346
591
  const { state: isVisible } = useIsVisible();
347
592
  if (isVisible) return children;
348
593
  return null;
349
594
  };
350
595
  var CollapsibleSection = ({ children, defaultOpen }) => {
351
- return /* @__PURE__ */ jsx9(IsVisibleProvider, { state: defaultOpen, children });
596
+ return /* @__PURE__ */ jsx16(IsVisibleProvider, { state: defaultOpen, children });
352
597
  };
353
598
  CollapsibleSection.ToggleButton = ToggleButton;
354
- CollapsibleSection.Content = Content2;
599
+ CollapsibleSection.Content = Content4;
355
600
 
356
601
  // src/core/copyable/Copyable.tsx
357
- import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
602
+ import { faCheck, faCopy } from "@fortawesome/sharp-solid-svg-icons";
358
603
  import * as RadixTooltip2 from "@radix-ui/react-tooltip";
359
- import { twJoin as twJoin5 } from "tailwind-merge";
360
-
361
- // src/core/tooltip/Tooltip.tsx
362
- import * as RadixTooltip from "@radix-ui/react-tooltip";
363
-
364
- // src/core/utils/useOverflowObserver.tsx
365
- import * as React4 from "react";
366
- var useOverflowObserver = () => {
367
- const [hasOverflow, setHasOverflow] = React4.useState(false);
368
- const elementRef = React4.useRef(null);
369
- React4.useEffect(() => {
370
- if (elementRef.current == null) return;
371
- const resizeObserver = new ResizeObserver(([entry]) => {
372
- window.requestAnimationFrame(() => {
373
- const element = entry?.target;
374
- const hasOverflowWidth = element.offsetWidth < element.scrollWidth;
375
- const hasOverflowHeight = element.offsetHeight < element.scrollHeight;
376
- const calcHasOverflow = hasOverflowWidth || hasOverflowHeight;
377
- if (calcHasOverflow !== hasOverflow) {
378
- setHasOverflow(calcHasOverflow);
379
- }
380
- });
381
- });
382
- resizeObserver.observe(elementRef.current);
383
- return () => resizeObserver.disconnect();
384
- }, [hasOverflow]);
385
- return { elementRef, hasOverflow };
386
- };
387
-
388
- // src/core/tooltip/Tooltip.tsx
389
- import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
390
- var TooltipContent = ({ children, variant = "dark", ...rest }) => {
391
- return /* @__PURE__ */ jsx10(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs4(
392
- RadixTooltip.Content,
393
- {
394
- ...rest,
395
- hideWhenDetached: true,
396
- sideOffset: 6,
397
- className: `z-9000000000 max-w-prose rounded-lg px-5 py-3 text-sm break-words shadow-lg ${variant === "dark" ? "bg-gray-900 text-white" : "bg-white text-gray-600"}`,
398
- children: [
399
- children,
400
- /* @__PURE__ */ jsx10(RadixTooltip.Arrow, { className: variant === "dark" ? "fill-gray-900" : "fill-white", offset: 8 })
401
- ]
402
- }
403
- ) });
404
- };
405
- TooltipContent.displayName = RadixTooltip.Content.displayName;
406
- var OverflowTrigger = ({
407
- element,
408
- ...rest
409
- }) => {
410
- const { elementRef, hasOverflow } = useOverflowObserver();
411
- if (!hasOverflow) {
412
- return element(elementRef);
413
- }
414
- return /* @__PURE__ */ jsx10(RadixTooltip.Trigger, { asChild: true, ...rest, children: element(elementRef) });
415
- };
416
- var TooltipTrigger = (props) => /* @__PURE__ */ jsx10(RadixTooltip.Trigger, { asChild: true, ...props });
417
- var TooltipProvider = (props) => /* @__PURE__ */ jsx10(RadixTooltip.Provider, { disableHoverableContent: true, delayDuration: 0, ...props });
418
- var TooltipRoot = (props) => /* @__PURE__ */ jsx10(RadixTooltip.Root, { ...props });
419
- var Tooltip = ({ trigger, content, variant, side, ...rest }) => {
420
- return /* @__PURE__ */ jsxs4(Tooltip.Root, { ...rest, children: [
421
- /* @__PURE__ */ jsx10(Tooltip.Trigger, { children: trigger }),
422
- content && /* @__PURE__ */ jsx10(Tooltip.Content, { side, variant, children: content })
423
- ] });
424
- };
425
- Tooltip.Provider = TooltipProvider;
426
- Tooltip.Root = TooltipRoot;
427
- Tooltip.Trigger = TooltipTrigger;
428
- Tooltip.OverflowTrigger = OverflowTrigger;
429
- Tooltip.Content = TooltipContent;
604
+ import { twJoin as twJoin8 } from "tailwind-merge";
430
605
 
431
606
  // src/core/copyable/use-copyable.ts
432
- import * as React5 from "react";
607
+ import * as React6 from "react";
433
608
  var waitMs = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
434
609
  var oldSchoolCopy = (text) => {
435
610
  const tempTextArea = document.createElement("textarea");
@@ -451,8 +626,8 @@ var copyToClipboard = async (value) => {
451
626
  }
452
627
  };
453
628
  var useCopyable = () => {
454
- const [state, setState] = React5.useState("idle");
455
- const copy = React5.useCallback(async (value, onClick) => {
629
+ const [state, setState] = React6.useState("idle");
630
+ const copy = React6.useCallback(async (value, onClick) => {
456
631
  if (!value) {
457
632
  return;
458
633
  }
@@ -467,49 +642,45 @@ var useCopyable = () => {
467
642
  };
468
643
 
469
644
  // src/core/copyable/Copyable.tsx
470
- import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
471
- var Copyable = ({ children, value, tooltip, onClick, asChild }) => {
645
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
646
+ var Copyable = ({ children, value, tooltip, onClick, asChild, className }) => {
472
647
  const { state, copy } = useCopyable();
473
648
  const handleCopy = async (e) => {
474
649
  e.stopPropagation();
475
650
  await copy(value, onClick);
476
651
  };
477
652
  if (!value && tooltip) {
478
- return /* @__PURE__ */ jsx11(Tooltip, { trigger: children, content: tooltip });
653
+ return /* @__PURE__ */ jsx17(Tooltip, { trigger: children, content: tooltip });
479
654
  }
480
655
  if (!value) {
481
656
  return children;
482
657
  }
483
- return /* @__PURE__ */ jsxs5(RadixTooltip2.Root, { open: state === "copied" ? true : void 0, delayDuration: 150, children: [
484
- /* @__PURE__ */ jsx11(
658
+ return /* @__PURE__ */ jsxs8(RadixTooltip2.Root, { open: state === "copied" ? true : void 0, delayDuration: 150, children: [
659
+ /* @__PURE__ */ jsx17(
485
660
  RadixTooltip2.Trigger,
486
661
  {
487
662
  asChild: true,
488
663
  onClick: handleCopy,
489
- className: twJoin5(
664
+ className: twJoin8(
490
665
  "w-fit cursor-pointer rounded-xs",
491
666
  state !== "copied" && "hover:bg-[#E8E8EB] hover:shadow-[0_0_0_2px_#E8E8EB] active:opacity-60",
492
- state === "copying" && "opacity-60"
667
+ state === "copying" && "opacity-60",
668
+ className
493
669
  ),
494
- children: asChild ? children : /* @__PURE__ */ jsx11("span", { children })
670
+ children: asChild ? children : /* @__PURE__ */ jsx17("span", { children })
495
671
  }
496
672
  ),
497
- tooltip && state === "idle" && /* @__PURE__ */ jsx11(TooltipContent, { side: "bottom", children: tooltip }),
498
- /* @__PURE__ */ jsx11(RadixTooltip2.Portal, { children: /* @__PURE__ */ jsx11(
673
+ tooltip && state === "idle" && /* @__PURE__ */ jsx17(TooltipContent, { side: "bottom", children: tooltip }),
674
+ /* @__PURE__ */ jsx17(RadixTooltip2.Portal, { children: /* @__PURE__ */ jsx17(
499
675
  RadixTooltip2.Content,
500
676
  {
501
677
  sideOffset: 6,
502
678
  side: "right",
503
- className: twJoin5(
679
+ className: twJoin8(
504
680
  "z-101 grid h-6 w-6 place-items-center rounded-sm bg-white shadow-lg",
505
681
  state !== "copying" && "animate-fade-in"
506
682
  ),
507
- children: /* @__PURE__ */ jsx11("div", { className: state === "copied" ? "text-green-500" : "text-gray-500", children: /* @__PURE__ */ jsx11(
508
- Icon,
509
- {
510
- icon: state === "copied" ? faCheck : faCopy
511
- }
512
- ) })
683
+ children: /* @__PURE__ */ jsx17("div", { className: state === "copied" ? "text-green-500" : "text-muted", children: /* @__PURE__ */ jsx17(Icon, { icon: state === "copied" ? faCheck : faCopy }) })
513
684
  }
514
685
  ) })
515
686
  ] });
@@ -520,11 +691,11 @@ import { useCallback as useCallback4 } from "react";
520
691
  import DatePickerLib from "react-datepicker";
521
692
 
522
693
  // src/core/date-picker/DatePickerHeader.tsx
523
- import { faChevronLeft, faChevronRight as faChevronRight2 } from "@fortawesome/free-solid-svg-icons";
694
+ import { faChevronLeft, faChevronRight as faChevronRight2 } from "@fortawesome/sharp-solid-svg-icons";
524
695
  import { getMonth, getYear } from "date-fns";
525
696
  import { range } from "lodash-es";
526
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
527
- var years = range(1920, getYear(/* @__PURE__ */ new Date()) + 1, 1).sort((a, b) => b - a);
697
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
698
+ var years = range(1920, getYear(/* @__PURE__ */ new Date()) + 6, 1).sort((a, b) => b - a);
528
699
  var months = [
529
700
  "January",
530
701
  "February",
@@ -549,9 +720,9 @@ var DatePickerHeader = ({
549
720
  nextMonthButtonDisabled
550
721
  }) => {
551
722
  const datePickerContainer = document.querySelector(".react-datepicker") ?? void 0;
552
- return /* @__PURE__ */ jsx12("div", { className: "space-y-2 p-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
553
- /* @__PURE__ */ jsx12(Button, { onClick: decreaseMonth, disabled: prevMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ jsx12(Icon, { icon: faChevronLeft }) }),
554
- /* @__PURE__ */ jsx12(
723
+ return /* @__PURE__ */ jsx18("div", { className: "space-y-2 p-2", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
724
+ /* @__PURE__ */ jsx18(Button, { onClick: decreaseMonth, disabled: prevMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ jsx18(Icon, { icon: faChevronLeft }) }),
725
+ /* @__PURE__ */ jsx18(
555
726
  Select,
556
727
  {
557
728
  size: "sm",
@@ -563,7 +734,7 @@ var DatePickerHeader = ({
563
734
  items: months.map((month) => ({ label: month, value: month }))
564
735
  }
565
736
  ),
566
- /* @__PURE__ */ jsx12(
737
+ /* @__PURE__ */ jsx18(
567
738
  Select,
568
739
  {
569
740
  size: "sm",
@@ -575,35 +746,31 @@ var DatePickerHeader = ({
575
746
  items: years.map((year) => ({ label: year.toString(), value: year.toString() }))
576
747
  }
577
748
  ),
578
- /* @__PURE__ */ jsx12(Button, { onClick: increaseMonth, disabled: nextMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ jsx12(Icon, { icon: faChevronRight2 }) })
749
+ /* @__PURE__ */ jsx18(Button, { onClick: increaseMonth, disabled: nextMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ jsx18(Icon, { icon: faChevronRight2 }) })
579
750
  ] }) });
580
751
  };
581
752
 
582
753
  // src/core/date-picker/shared.tsx
583
- import { faCalendar, faXmark } from "@fortawesome/free-solid-svg-icons";
754
+ import { faCalendar, faXmark } from "@fortawesome/sharp-solid-svg-icons";
584
755
 
585
756
  // src/core/date-picker/DatePickerInput.tsx
586
- import { forwardRef as forwardRef3 } from "react";
587
- import { twJoin as twJoin6, twMerge as twMerge3 } from "tailwind-merge";
588
-
589
- // src/core/types.ts
590
- var RING_COLOR_CLASSNAME = "focus:ring-2 focus:ring-indigo-200";
591
-
592
- // src/core/date-picker/DatePickerInput.tsx
593
- import { Fragment, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
594
- var DatePickerInput = forwardRef3(
757
+ import { forwardRef as forwardRef4 } from "react";
758
+ import { twJoin as twJoin9, twMerge as twMerge6 } from "tailwind-merge";
759
+ import { Fragment, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
760
+ var DatePickerInput = forwardRef4(
595
761
  ({ inputProps, errorNode, hasError, rightAction, disabled, className, ...rest }, ref) => {
596
- const ringClassName = disabled ? "focus:outline-hidden focus:ring-0" : hasError ? "focus:outline-hidden focus:ring-red-500 focus:border-red-500" : RING_COLOR_CLASSNAME;
597
- return /* @__PURE__ */ jsxs7(Fragment, { children: [
598
- /* @__PURE__ */ jsxs7("div", { className: "relative block w-full rounded-md shadow-sm", children: [
599
- /* @__PURE__ */ jsx13(
762
+ const ringClassName = disabled ? "focus:outline-hidden focus:ring-0" : hasError ? "focus:outline-hidden focus:ring-red-500 focus:border-red-500" : "focus:ring-2 focus:ring-indigo-200";
763
+ return /* @__PURE__ */ jsxs10(Fragment, { children: [
764
+ /* @__PURE__ */ jsxs10("div", { className: "relative block w-full rounded-md shadow-sm", children: [
765
+ /* @__PURE__ */ jsx19(
600
766
  "input",
601
767
  {
602
768
  type: "text",
603
- className: twMerge3(
604
- "block w-full rounded-md disabled:bg-gray-100",
769
+ ...inputProps,
770
+ className: twMerge6(
771
+ "block w-full rounded-md disabled:bg-surface-neutral",
605
772
  rightAction && "pr-8",
606
- hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-gray-200",
773
+ hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-surface-neutral",
607
774
  ringClassName,
608
775
  className,
609
776
  inputProps?.className
@@ -611,19 +778,18 @@ var DatePickerInput = forwardRef3(
611
778
  ref,
612
779
  disabled,
613
780
  autoComplete: "off",
614
- ...rest,
615
- ...inputProps
781
+ ...rest
616
782
  }
617
783
  ),
618
- rightAction && /* @__PURE__ */ jsx13("div", { className: twJoin6("absolute inset-y-0 right-0 flex items-center pr-3", disabled && "cursor-auto"), children: rightAction })
784
+ rightAction && /* @__PURE__ */ jsx19("div", { className: twJoin9("absolute inset-y-0 right-0 flex items-center pr-3", disabled && "cursor-auto"), children: rightAction })
619
785
  ] }),
620
- hasError != null && errorNode != null && /* @__PURE__ */ jsx13("p", { className: "mt-2 max-h-[100px] overflow-auto text-sm text-red-600", children: errorNode })
786
+ hasError != null && errorNode != null && /* @__PURE__ */ jsx19("p", { className: "mt-2 max-h-[100px] overflow-auto text-sm text-danger", children: errorNode })
621
787
  ] });
622
788
  }
623
789
  );
624
790
 
625
791
  // src/core/date-picker/shared.tsx
626
- import { jsx as jsx14 } from "react/jsx-runtime";
792
+ import { jsx as jsx20 } from "react/jsx-runtime";
627
793
  var customInputFieldFactory = ({
628
794
  inputProps,
629
795
  errorNode,
@@ -631,13 +797,13 @@ var customInputFieldFactory = ({
631
797
  isEmpty,
632
798
  disabled,
633
799
  onClearInput
634
- }) => /* @__PURE__ */ jsx14(
800
+ }) => /* @__PURE__ */ jsx20(
635
801
  DatePickerInput,
636
802
  {
637
803
  inputProps,
638
804
  errorNode,
639
805
  hasError,
640
- rightAction: isEmpty ? /* @__PURE__ */ jsx14("span", { className: "text-gray-300", children: /* @__PURE__ */ jsx14(Icon, { icon: faCalendar }) }) : !disabled ? /* @__PURE__ */ jsx14(Button, { size: "xs", onClick: onClearInput, variant: "transparent", children: /* @__PURE__ */ jsx14("span", { className: "text-gray-500", children: /* @__PURE__ */ jsx14(Icon, { icon: faXmark }) }) }) : null
806
+ rightAction: isEmpty ? /* @__PURE__ */ jsx20("span", { className: "text-disabled", children: /* @__PURE__ */ jsx20(Icon, { icon: faCalendar }) }) : !disabled ? /* @__PURE__ */ jsx20(Button, { size: "xs", onClick: onClearInput, variant: "transparent", children: /* @__PURE__ */ jsx20("span", { className: "text-muted", children: /* @__PURE__ */ jsx20(Icon, { icon: faXmark }) }) }) : null
641
807
  }
642
808
  );
643
809
 
@@ -645,11 +811,11 @@ var customInputFieldFactory = ({
645
811
  import { useCallback as useCallback3, useState as useState5 } from "react";
646
812
 
647
813
  // src/core/input/InputBox.tsx
648
- import * as React6 from "react";
649
- import { forwardRef as forwardRef5 } from "react";
814
+ import * as React7 from "react";
815
+ import { forwardRef as forwardRef6 } from "react";
650
816
 
651
817
  // src/core/input/inputBoxStyles.ts
652
- import { twJoin as twJoin7 } from "tailwind-merge";
818
+ import { twJoin as twJoin10 } from "tailwind-merge";
653
819
  var sizeStyles2 = {
654
820
  sm: "h-sm gap-1 px-2 text-sm [&>input]:text-sm",
655
821
  md: "h-md gap-2 px-2.5 text-base [&>input]:text-base",
@@ -659,27 +825,35 @@ var defaultVariantStyles = "rounded-md border bg-white focus-within:outline focu
659
825
  var transparentVariantStyles = "border-none bg-transparent focus-within:outline-hidden focus:outline-hidden";
660
826
  var variantStyles = {
661
827
  default: {
662
- default: `${defaultVariantStyles} disabled:bg-gray-100 disabled:text-gray-400 border-gray-200 focus-within:border-indigo-400 focus-within:outline-indigo-200 focus:border-indigo-400 focus:outline-indigo-200`,
828
+ default: `${defaultVariantStyles} disabled:bg-surface-neutral disabled:text-placeholder border-surface-neutral focus-within:border-indigo-400 focus-within:outline-indigo-200 focus:border-indigo-400 focus:outline-indigo-200`,
663
829
  error: `${defaultVariantStyles} border-red-300 focus-within:border-red-300 focus-within:outline-red-200 focus:border-red-300 focus:outline-red-200`,
664
- warning: `${defaultVariantStyles} border-yellow-300 focus-within:border-yellow-300 focus-within:outline-yellow-200 focus:border-yellow-300 focus:outline-yellow-200`
830
+ warning: `${defaultVariantStyles} border-yellow-300 focus-within:border-yellow-300 focus-within:outline-yellow-200 focus:border-yellow-300 focus:outline-yellow-200`,
831
+ success: `${defaultVariantStyles} border-green-300 focus-within:border-green-300 focus-within:outline-green-200 focus:border-green-300 focus:outline-green-200`
665
832
  },
666
833
  transparent: {
667
- default: `${transparentVariantStyles} disabled:bg-gray-100 disabled:text-gray-400`,
834
+ default: `${transparentVariantStyles} disabled:bg-surface-neutral disabled:text-placeholder`,
668
835
  error: transparentVariantStyles,
669
- warning: transparentVariantStyles
836
+ warning: transparentVariantStyles,
837
+ success: transparentVariantStyles
670
838
  }
671
839
  };
672
- var inputBoxStyles = ({ size = "md", variant = "default", hasError, hasWarning }) => twJoin7(
673
- "flex w-full items-center focus-within:ring-0 focus:ring-0 has-disabled:bg-gray-100 has-disabled:text-gray-400",
840
+ var inputBoxStyles = ({
841
+ size = "md",
842
+ variant = "default",
843
+ hasError,
844
+ hasWarning,
845
+ hasSuccess
846
+ }) => twJoin10(
847
+ "flex w-full items-center focus-within:ring-0 focus:ring-0 has-disabled:bg-surface-neutral has-disabled:text-placeholder",
674
848
  sizeStyles2[size],
675
- variantStyles[variant][hasError ? "error" : hasWarning ? "warning" : "default"]
849
+ variantStyles[variant][hasError ? "error" : hasWarning ? "warning" : hasSuccess ? "success" : "default"]
676
850
  );
677
- var inputStyles = "w-full text-gray-800 placeholder:text-gray-400 disabled:text-gray-400";
851
+ var inputStyles = "w-full text-gray-800 placeholder:text-placeholder disabled:text-placeholder";
678
852
 
679
853
  // src/core/input/InputBox.tsx
680
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
854
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
681
855
  var NestedInputImpl = (props, ref) => {
682
- return /* @__PURE__ */ jsx15(
856
+ return /* @__PURE__ */ jsx21(
683
857
  "input",
684
858
  {
685
859
  type: "text",
@@ -690,42 +864,49 @@ var NestedInputImpl = (props, ref) => {
690
864
  }
691
865
  );
692
866
  };
693
- var NestedInput = forwardRef5(NestedInputImpl);
867
+ var NestedInput = forwardRef6(NestedInputImpl);
694
868
  var InputBoxImpl = ({ children, ...style }, ref) => (
695
869
  // Styling text to propagate stateful text color inheritance for the children of InputBox
696
870
  // (think Icons, other non-input elements). Avoids style collisions when Input is used solo.
697
- /* @__PURE__ */ jsx15("label", { ref, className: `${style.hasError ? "text-red-300" : "text-gray-400"} ${inputBoxStyles(style)}`, children })
871
+ /* @__PURE__ */ jsx21(
872
+ "label",
873
+ {
874
+ ref,
875
+ className: `${style.hasError ? "text-red-300" : style.hasSuccess ? "text-green-300" : "text-placeholder"} ${inputBoxStyles(style)}`,
876
+ children
877
+ }
878
+ )
698
879
  );
699
- var InputBox = React6.forwardRef(InputBoxImpl);
880
+ var InputBox = React7.forwardRef(InputBoxImpl);
700
881
  InputBox.Input = NestedInput;
701
- var InputImpl = ({ size, variant, hasError, hasWarning, prefix, ...rest }, ref) => {
702
- return prefix ? /* @__PURE__ */ jsxs8("div", { className: "flex flex-row items-center", children: [
703
- /* @__PURE__ */ jsx15("label", { className: "p-1 text-gray-500", children: prefix }),
704
- /* @__PURE__ */ jsx15(
882
+ var InputImpl = ({ size, variant, hasError, hasWarning, hasSuccess, prefix, ...rest }, ref) => {
883
+ return prefix ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-row items-center", children: [
884
+ /* @__PURE__ */ jsx21("label", { className: "p-1 text-muted", children: prefix }),
885
+ /* @__PURE__ */ jsx21(
705
886
  "input",
706
887
  {
707
888
  type: "text",
708
- className: `${inputStyles} ${inputBoxStyles({ size, variant, hasError, hasWarning })}`,
889
+ className: `${inputStyles} ${inputBoxStyles({ size, variant, hasError, hasWarning, hasSuccess })}`,
709
890
  autoComplete: "off",
710
891
  ...rest,
711
892
  ref
712
893
  }
713
894
  )
714
- ] }) : /* @__PURE__ */ jsx15(
895
+ ] }) : /* @__PURE__ */ jsx21(
715
896
  "input",
716
897
  {
717
898
  type: "text",
718
- className: `${inputStyles} ${inputBoxStyles({ size, variant, hasError, hasWarning })}`,
899
+ className: `${inputStyles} ${inputBoxStyles({ size, variant, hasError, hasWarning, hasSuccess })}`,
719
900
  autoComplete: "off",
720
901
  ...rest,
721
902
  ref
722
903
  }
723
904
  );
724
905
  };
725
- var Input = forwardRef5(InputImpl);
906
+ var Input = forwardRef6(InputImpl);
726
907
 
727
908
  // src/core/date-picker/TimeInput.tsx
728
- import { jsx as jsx16 } from "react/jsx-runtime";
909
+ import { jsx as jsx22 } from "react/jsx-runtime";
729
910
  var TimeInput = ({
730
911
  value: inputValue,
731
912
  onChange
@@ -739,7 +920,7 @@ var TimeInput = ({
739
920
  handleUpdateTime();
740
921
  }
741
922
  };
742
- return /* @__PURE__ */ jsx16(
923
+ return /* @__PURE__ */ jsx22(
743
924
  Input,
744
925
  {
745
926
  value,
@@ -753,7 +934,7 @@ var TimeInput = ({
753
934
  };
754
935
 
755
936
  // src/core/date-picker/DatePickerRange.tsx
756
- import { jsx as jsx17 } from "react/jsx-runtime";
937
+ import { jsx as jsx23 } from "react/jsx-runtime";
757
938
  var DatePickerRange = ({
758
939
  value = [void 0, void 0],
759
940
  errorNode,
@@ -775,11 +956,11 @@ var DatePickerRange = ({
775
956
  },
776
957
  [onChange]
777
958
  );
778
- return /* @__PURE__ */ jsx17(
959
+ return /* @__PURE__ */ jsx23(
779
960
  DatePickerLib,
780
961
  {
781
962
  ...props,
782
- className: "placeholder:text-gray-400",
963
+ className: "placeholder:text-placeholder",
783
964
  selected: value[0],
784
965
  onChange: handleChange,
785
966
  startDate: value[0],
@@ -796,7 +977,7 @@ var DatePickerRange = ({
796
977
  hasError,
797
978
  onClearInput: clearDatePicker
798
979
  }) : void 0,
799
- customTimeInput: /* @__PURE__ */ jsx17(TimeInput, {}),
980
+ customTimeInput: /* @__PURE__ */ jsx23(TimeInput, {}),
800
981
  renderCustomHeader: DatePickerHeader
801
982
  }
802
983
  );
@@ -805,7 +986,7 @@ var DatePickerRange = ({
805
986
  // src/core/date-picker/DatePickerSingle.tsx
806
987
  import { useCallback as useCallback5 } from "react";
807
988
  import DatePickerLib2 from "react-datepicker";
808
- import { jsx as jsx18 } from "react/jsx-runtime";
989
+ import { jsx as jsx24 } from "react/jsx-runtime";
809
990
  var DatePickerSingle = ({
810
991
  value,
811
992
  errorNode,
@@ -825,11 +1006,11 @@ var DatePickerSingle = ({
825
1006
  },
826
1007
  [onChange]
827
1008
  );
828
- return /* @__PURE__ */ jsx18(
1009
+ return /* @__PURE__ */ jsx24(
829
1010
  DatePickerLib2,
830
1011
  {
831
1012
  ...props,
832
- className: "placeholder:text-gray-400",
1013
+ className: "placeholder:text-placeholder",
833
1014
  preventOpenOnFocus,
834
1015
  selected: value,
835
1016
  onChange: handleChange,
@@ -844,7 +1025,7 @@ var DatePickerSingle = ({
844
1025
  hasError,
845
1026
  onClearInput: clearDatePicker
846
1027
  }) : void 0,
847
- customTimeInput: /* @__PURE__ */ jsx18(TimeInput, {}),
1028
+ customTimeInput: /* @__PURE__ */ jsx24(TimeInput, {}),
848
1029
  renderCustomHeader: DatePickerHeader,
849
1030
  popperPlacement: position
850
1031
  }
@@ -852,62 +1033,44 @@ var DatePickerSingle = ({
852
1033
  };
853
1034
 
854
1035
  // src/core/date-picker/DatePicker.tsx
855
- import { jsx as jsx19 } from "react/jsx-runtime";
856
- var DatePicker = (props) => props.range ? /* @__PURE__ */ jsx19(DatePickerRange, { ...props }) : /* @__PURE__ */ jsx19(DatePickerSingle, { ...props });
1036
+ import { jsx as jsx25 } from "react/jsx-runtime";
1037
+ var DatePicker = (props) => props.range ? /* @__PURE__ */ jsx25(DatePickerRange, { ...props }) : /* @__PURE__ */ jsx25(DatePickerSingle, { ...props });
857
1038
 
858
1039
  // src/core/divider/Divider.tsx
859
- import { twMerge as twMerge4 } from "tailwind-merge";
860
- import { jsx as jsx20 } from "react/jsx-runtime";
861
- var Divider = ({ className }) => /* @__PURE__ */ jsx20("div", { className: twMerge4("h-[1px] w-full border-b border-gray-200", className) });
1040
+ import { twMerge as twMerge7 } from "tailwind-merge";
1041
+ import { jsx as jsx26 } from "react/jsx-runtime";
1042
+ var Divider = ({ className }) => /* @__PURE__ */ jsx26("div", { className: twMerge7("h-[1px] w-full border-b border-surface-neutral", className) });
862
1043
 
863
1044
  // src/core/error-text/ErrorText.tsx
864
- import { forwardRef as forwardRef6 } from "react";
865
- import { twJoin as twJoin8 } from "tailwind-merge";
866
- import { jsx as jsx21 } from "react/jsx-runtime";
1045
+ import { forwardRef as forwardRef7 } from "react";
1046
+ import { twJoin as twJoin11 } from "tailwind-merge";
1047
+ import { jsx as jsx27 } from "react/jsx-runtime";
867
1048
  var ErrorTextImpl = ({ className, ...props }, ref) => {
868
1049
  if (!props.children) {
869
1050
  return null;
870
1051
  }
871
- return /* @__PURE__ */ jsx21("p", { ...props, ref, className: twJoin8("text-red-600", className) });
1052
+ return /* @__PURE__ */ jsx27("p", { ...props, ref, className: twJoin11("text-danger", className) });
872
1053
  };
873
- var ErrorText = forwardRef6(ErrorTextImpl);
1054
+ var ErrorText = forwardRef7(ErrorTextImpl);
874
1055
 
875
1056
  // src/core/form/index.ts
876
- import { FormProvider, useFieldArray, useFormState as useFormState2, useWatch, useController as useController2 } from "react-hook-form";
1057
+ import { FormProvider, useFieldArray, useFormContext as useFormContext2, useFormState as useFormState2, useWatch, useController as useController2 } from "react-hook-form";
877
1058
 
878
1059
  // src/core/form/components/ControlledField.tsx
879
1060
  import { createContext as createContext2, useContext as useContext2, useMemo as useMemo2 } from "react";
880
1061
 
881
1062
  // src/core/form/hooks.ts
882
1063
  import { zodResolver } from "@hookform/resolvers/zod";
883
- import * as React8 from "react";
884
- import { useController, useForm as _useForm, useFormContext as _useFormContext, useFormState } from "react-hook-form";
1064
+ import * as React9 from "react";
1065
+ import { useController, useForm as _useForm, useFormContext, useFormState } from "react-hook-form";
885
1066
  var useForm = (schema, options) => {
886
- const methods = _useForm(
887
- options != null ? { resolver: zodResolver(schema), ...options } : { resolver: zodResolver(schema) }
888
- );
889
- const { setError } = methods;
890
- const setRootError = React8.useCallback(
891
- (message) => {
892
- setError("root", { type: "root", message });
893
- },
894
- [setError]
895
- );
896
- return { ...methods, setRootError };
1067
+ return _useForm({
1068
+ ...options,
1069
+ // Type assertion needed here for RHF internals
1070
+ resolver: zodResolver(schema)
1071
+ });
897
1072
  };
898
1073
  useForm.displayName = "useForm";
899
- var useFormContext = () => {
900
- const methods = _useFormContext();
901
- const { setError } = methods;
902
- const setRootError = React8.useCallback(
903
- (message) => {
904
- setError("root", { type: "root", message });
905
- },
906
- [setError]
907
- );
908
- return { ...methods, setRootError };
909
- };
910
- useFormContext.displayName = "useFormContext";
911
1074
  var useControlledFormField = ({ name: fieldName }) => {
912
1075
  const { field, fieldState } = useController({ name: fieldName });
913
1076
  const { error } = fieldState;
@@ -917,7 +1080,7 @@ useControlledFormField.displayName = "useControlledFormField";
917
1080
  var useUncontrolledFormField = ({ name: fieldName, ...changeHandlers }) => {
918
1081
  const { register, getFieldState } = useFormContext();
919
1082
  const formState = useFormState();
920
- const memoizedRegister = React8.useCallback(() => {
1083
+ const memoizedRegister = React9.useCallback(() => {
921
1084
  if (!changeHandlers) {
922
1085
  return register(fieldName);
923
1086
  }
@@ -944,12 +1107,12 @@ var useUncontrolledFormField = ({ name: fieldName, ...changeHandlers }) => {
944
1107
  useUncontrolledFormField.displayName = "useUncontrolledFormField";
945
1108
 
946
1109
  // src/core/form/components/ControlledField.tsx
947
- import { Fragment as Fragment2, jsx as jsx22 } from "react/jsx-runtime";
1110
+ import { Fragment as Fragment2, jsx as jsx28 } from "react/jsx-runtime";
948
1111
  var ControlledFieldContext = createContext2(void 0);
949
1112
  var ControlledFieldProvider = ({ children, ...restField }) => {
950
1113
  const field = useControlledFormField(restField);
951
1114
  const value = useMemo2(() => field, [field]);
952
- return /* @__PURE__ */ jsx22(ControlledFieldContext.Provider, { value, children });
1115
+ return /* @__PURE__ */ jsx28(ControlledFieldContext.Provider, { value, children });
953
1116
  };
954
1117
  ControlledFieldProvider.displayName = "ControlledFieldProvider";
955
1118
  var useControlledField = () => {
@@ -961,13 +1124,13 @@ var useControlledField = () => {
961
1124
  };
962
1125
  useControlledField.displayName = "useControlledField";
963
1126
  var ControlledField = ({ render, ...restField }) => {
964
- return /* @__PURE__ */ jsx22(Fragment2, { children: render(useControlledFormField(restField)) });
1127
+ return /* @__PURE__ */ jsx28(Fragment2, { children: render(useControlledFormField(restField)) });
965
1128
  };
966
1129
  ControlledField.displayName = "ControlledField";
967
1130
 
968
1131
  // src/core/form/components/UncontrolledField.tsx
969
1132
  import { createContext as createContext3, useContext as useContext3, useMemo as useMemo3 } from "react";
970
- import { Fragment as Fragment3, jsx as jsx23 } from "react/jsx-runtime";
1133
+ import { Fragment as Fragment3, jsx as jsx29 } from "react/jsx-runtime";
971
1134
  var UncontrolledFieldContext = createContext3(void 0);
972
1135
  var UncontrolledFieldProvider = ({
973
1136
  children,
@@ -975,7 +1138,7 @@ var UncontrolledFieldProvider = ({
975
1138
  }) => {
976
1139
  const field = useUncontrolledFormField(restField);
977
1140
  const value = useMemo3(() => field, [field]);
978
- return /* @__PURE__ */ jsx23(UncontrolledFieldContext.Provider, { value, children });
1141
+ return /* @__PURE__ */ jsx29(UncontrolledFieldContext.Provider, { value, children });
979
1142
  };
980
1143
  UncontrolledFieldProvider.displayName = "UncontrolledFieldProvider";
981
1144
  var useUncontrolledField = () => {
@@ -987,7 +1150,7 @@ var useUncontrolledField = () => {
987
1150
  };
988
1151
  useUncontrolledField.displayName = "useUncontrolledField";
989
1152
  var UncontrolledField = ({ render, ...restField }) => {
990
- return /* @__PURE__ */ jsx23(Fragment3, { children: render(useUncontrolledFormField(restField)) });
1153
+ return /* @__PURE__ */ jsx29(Fragment3, { children: render(useUncontrolledFormField(restField)) });
991
1154
  };
992
1155
  UncontrolledField.displayName = "UncontrolledField";
993
1156
 
@@ -1001,58 +1164,58 @@ var getFieldError = (errors, name) => {
1001
1164
  };
1002
1165
 
1003
1166
  // src/core/form/components/form-item/index.tsx
1004
- import { forwardRef as forwardRef11 } from "react";
1167
+ import { forwardRef as forwardRef12 } from "react";
1005
1168
 
1006
1169
  // src/core/form/components/form-item/InlineFormItem.tsx
1007
- import { forwardRef as forwardRef7 } from "react";
1170
+ import { forwardRef as forwardRef8 } from "react";
1008
1171
 
1009
1172
  // src/core/form/components/form-item/FieldErrorTooltip.tsx
1010
- import { jsx as jsx24 } from "react/jsx-runtime";
1173
+ import { jsx as jsx30 } from "react/jsx-runtime";
1011
1174
  var FieldErrorTooltip = ({ error, children }) => {
1012
- return /* @__PURE__ */ jsx24(
1175
+ return /* @__PURE__ */ jsx30(
1013
1176
  Tooltip,
1014
1177
  {
1015
1178
  variant: "light",
1016
1179
  open: error?.message ? void 0 : false,
1017
1180
  trigger: children,
1018
- content: /* @__PURE__ */ jsx24(ErrorText, { children: error?.message })
1181
+ content: /* @__PURE__ */ jsx30(ErrorText, { children: error?.message })
1019
1182
  }
1020
1183
  );
1021
1184
  };
1022
1185
 
1023
1186
  // src/core/form/components/form-item/InlineFormItem.tsx
1024
- import { jsx as jsx25 } from "react/jsx-runtime";
1025
- var InlineFormItem = forwardRef7(({ error, render }, ref) => {
1026
- return /* @__PURE__ */ jsx25(FieldErrorTooltip, { error, children: /* @__PURE__ */ jsx25("span", { ref, children: render }) });
1187
+ import { jsx as jsx31 } from "react/jsx-runtime";
1188
+ var InlineFormItem = forwardRef8(({ error, render }, ref) => {
1189
+ return /* @__PURE__ */ jsx31(FieldErrorTooltip, { error, children: /* @__PURE__ */ jsx31("span", { ref, children: render }) });
1027
1190
  });
1028
1191
 
1029
1192
  // src/core/form/components/form-item/NoneFormItem.tsx
1030
- import { forwardRef as forwardRef8 } from "react";
1193
+ import { forwardRef as forwardRef9 } from "react";
1031
1194
 
1032
1195
  // src/core/form/components/form-item/FieldDescription.tsx
1033
- import { twJoin as twJoin9 } from "tailwind-merge";
1034
- import { jsx as jsx26 } from "react/jsx-runtime";
1196
+ import { twJoin as twJoin12 } from "tailwind-merge";
1197
+ import { jsx as jsx32 } from "react/jsx-runtime";
1035
1198
  var FieldDescription = ({ styles, children }) => {
1036
1199
  if (children == null) {
1037
1200
  return null;
1038
1201
  }
1039
- return /* @__PURE__ */ jsx26("p", { className: twJoin9("text-sm text-gray-500", styles), children });
1202
+ return /* @__PURE__ */ jsx32("p", { className: twJoin12("text-sm text-muted", styles), children });
1040
1203
  };
1041
1204
 
1042
1205
  // src/core/form/components/form-item/FieldErrorMessage.tsx
1043
- import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
1206
+ import { faExclamationCircle } from "@fortawesome/sharp-solid-svg-icons";
1044
1207
 
1045
1208
  // src/core/overflow-tooltip/OverflowTooltip.tsx
1046
- import { jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
1209
+ import { jsx as jsx33, jsxs as jsxs12 } from "react/jsx-runtime";
1047
1210
  var OverflowTooltip = ({ element, tooltip, side, variant, ...props }) => {
1048
- return /* @__PURE__ */ jsxs9(Tooltip.Root, { ...props, children: [
1049
- /* @__PURE__ */ jsx27(Tooltip.OverflowTrigger, { element }),
1050
- /* @__PURE__ */ jsx27(Tooltip.Content, { side, variant, children: tooltip })
1211
+ return /* @__PURE__ */ jsxs12(Tooltip.Root, { ...props, children: [
1212
+ /* @__PURE__ */ jsx33(Tooltip.OverflowTrigger, { element }),
1213
+ /* @__PURE__ */ jsx33(Tooltip.Content, { side, variant, children: tooltip })
1051
1214
  ] });
1052
1215
  };
1053
1216
 
1054
1217
  // src/core/form/components/form-item/FieldErrorMessage.tsx
1055
- import { jsx as jsx28, jsxs as jsxs10 } from "react/jsx-runtime";
1218
+ import { jsx as jsx34, jsxs as jsxs13 } from "react/jsx-runtime";
1056
1219
  function handleErrorOrErrorArrayMessage(error) {
1057
1220
  if (!Array.isArray(error)) {
1058
1221
  return error.message;
@@ -1067,48 +1230,48 @@ var FieldErrorMessage = ({ error }) => {
1067
1230
  return null;
1068
1231
  }
1069
1232
  const message = handleErrorOrErrorArrayMessage(error);
1070
- return /* @__PURE__ */ jsxs10("div", { className: "flex h-4.5 items-center gap-x-1 pt-0.5 text-sm", children: [
1071
- /* @__PURE__ */ jsx28("span", { className: "text-red-400", children: /* @__PURE__ */ jsx28(Icon, { icon: faCircleExclamation }) }),
1072
- /* @__PURE__ */ jsx28(
1233
+ return /* @__PURE__ */ jsxs13("div", { className: "flex h-4.5 items-center gap-x-1 pt-0.5 text-sm", children: [
1234
+ /* @__PURE__ */ jsx34("span", { className: "text-red-400", children: /* @__PURE__ */ jsx34(Icon, { icon: faExclamationCircle }) }),
1235
+ /* @__PURE__ */ jsx34(
1073
1236
  OverflowTooltip,
1074
1237
  {
1075
1238
  tooltip: message,
1076
- element: (ref) => /* @__PURE__ */ jsx28(ErrorText, { ref, className: "line-clamp-1 cursor-default break-all", children: message })
1239
+ element: (ref) => /* @__PURE__ */ jsx34(ErrorText, { ref, className: "line-clamp-1 cursor-default break-all", children: message })
1077
1240
  }
1078
1241
  )
1079
1242
  ] });
1080
1243
  };
1081
1244
 
1082
1245
  // src/core/form/components/form-item/FieldLabelWithTooltip.tsx
1083
- import { faCircleQuestion } from "@fortawesome/free-solid-svg-icons";
1084
- import { twJoin as twJoin11 } from "tailwind-merge";
1246
+ import { faQuestionCircle } from "@fortawesome/sharp-solid-svg-icons";
1247
+ import { twJoin as twJoin14 } from "tailwind-merge";
1085
1248
 
1086
1249
  // src/core/form/components/form-item/FieldLabel.tsx
1087
- import { twJoin as twJoin10 } from "tailwind-merge";
1088
- import { jsx as jsx29 } from "react/jsx-runtime";
1250
+ import { twJoin as twJoin13 } from "tailwind-merge";
1251
+ import { jsx as jsx35 } from "react/jsx-runtime";
1089
1252
  var FieldLabel = ({ styles, htmlFor, children }) => {
1090
1253
  if (children == null) {
1091
1254
  return null;
1092
1255
  }
1093
- return /* @__PURE__ */ jsx29("label", { htmlFor, className: twJoin10("block text-sm font-normal text-gray-500", styles), children });
1256
+ return /* @__PURE__ */ jsx35(Text, { as: "label", htmlFor, variant: "body-2", className: twJoin13("block text-muted", styles), children });
1094
1257
  };
1095
1258
 
1096
1259
  // src/core/form/components/form-item/FieldLabelWithTooltip.tsx
1097
- import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
1098
- var FieldLabelWithTooltip = ({ styles, label, options }) => {
1260
+ import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
1261
+ var FieldLabelWithTooltip = ({ styles, htmlFor, label, options }) => {
1099
1262
  if (label == null) {
1100
1263
  return null;
1101
1264
  }
1102
- return /* @__PURE__ */ jsxs11(FieldLabel, { styles: twJoin11("space-x-1", styles), children: [
1103
- /* @__PURE__ */ jsx30("span", { children: label }),
1104
- options?.optionalLabel && /* @__PURE__ */ jsx30("span", { className: "text-gray-400", children: "(Optional)" }),
1105
- options?.tooltip && /* @__PURE__ */ jsx30(
1265
+ return /* @__PURE__ */ jsxs14(FieldLabel, { htmlFor, styles: twJoin14("space-x-1", styles), children: [
1266
+ /* @__PURE__ */ jsx36("span", { children: label }),
1267
+ options?.optionalLabel && /* @__PURE__ */ jsx36("span", { className: "text-placeholder", children: "(Optional)" }),
1268
+ options?.tooltip && /* @__PURE__ */ jsx36(
1106
1269
  Tooltip,
1107
1270
  {
1108
1271
  content: options?.tooltip,
1109
- trigger: /* @__PURE__ */ jsxs11("span", { className: "inline-flex items-baseline space-x-1", children: [
1110
- /* @__PURE__ */ jsx30("span", { className: "leading-none", children: options.tooltipIcon ? options.tooltipIcon : /* @__PURE__ */ jsx30("span", { className: "text-gray-500", children: /* @__PURE__ */ jsx30(Icon, { icon: faCircleQuestion }) }) }),
1111
- options?.tooltipLabel && /* @__PURE__ */ jsx30("span", { className: "font-normal text-gray-500", children: options?.tooltipLabel })
1272
+ trigger: /* @__PURE__ */ jsxs14("span", { className: "inline-flex items-baseline space-x-1", children: [
1273
+ /* @__PURE__ */ jsx36("span", { className: "leading-none", children: options.tooltipIcon ? options.tooltipIcon : /* @__PURE__ */ jsx36("span", { className: "text-muted", children: /* @__PURE__ */ jsx36(Icon, { icon: faQuestionCircle }) }) }),
1274
+ options?.tooltipLabel && /* @__PURE__ */ jsx36("span", { className: "font-normal text-muted", children: options?.tooltipLabel })
1112
1275
  ] })
1113
1276
  }
1114
1277
  ),
@@ -1117,78 +1280,79 @@ var FieldLabelWithTooltip = ({ styles, label, options }) => {
1117
1280
  };
1118
1281
 
1119
1282
  // src/core/form/components/form-item/NoneFormItem.tsx
1120
- import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
1121
- var NoneFormItemImpl = ({ label, options, render, error }, ref) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
1122
- /* @__PURE__ */ jsxs12("div", { children: [
1123
- /* @__PURE__ */ jsx31(FieldLabelWithTooltip, { label, options }),
1124
- /* @__PURE__ */ jsx31(FieldDescription, { styles: "pt-0.5", children: options?.description })
1283
+ import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
1284
+ var NoneFormItemImpl = ({ htmlFor, label, options, render, error }, ref) => /* @__PURE__ */ jsxs15(Fragment4, { children: [
1285
+ /* @__PURE__ */ jsxs15("div", { children: [
1286
+ /* @__PURE__ */ jsx37(FieldLabelWithTooltip, { htmlFor, label, options }),
1287
+ /* @__PURE__ */ jsx37(FieldDescription, { styles: "pt-0.5", children: options?.description })
1125
1288
  ] }),
1126
- /* @__PURE__ */ jsxs12("div", { ref, children: [
1289
+ /* @__PURE__ */ jsxs15("div", { ref, children: [
1127
1290
  render,
1128
- /* @__PURE__ */ jsx31(FieldErrorMessage, { error }),
1291
+ /* @__PURE__ */ jsx37(FieldErrorMessage, { error }),
1129
1292
  options?.bottomSlot
1130
1293
  ] })
1131
1294
  ] });
1132
- var NoneFormItem = forwardRef8(NoneFormItemImpl);
1295
+ var NoneFormItem = forwardRef9(NoneFormItemImpl);
1133
1296
 
1134
1297
  // src/core/form/components/form-item/SideBySideFormItem.tsx
1135
- import { forwardRef as forwardRef9 } from "react";
1136
- import { twJoin as twJoin12 } from "tailwind-merge";
1137
- import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
1138
- var SideBySideFormItem = forwardRef9(
1139
- ({ styles, label, options, render, error }, ref) => /* @__PURE__ */ jsxs13("div", { className: twJoin12("grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)] gap-x-1", styles), ref, children: [
1140
- /* @__PURE__ */ jsxs13("div", { className: "pt-2.5", children: [
1141
- /* @__PURE__ */ jsx32(FieldLabelWithTooltip, { label, options }),
1142
- /* @__PURE__ */ jsx32(FieldDescription, { styles: "pt-0.5", children: options?.description })
1298
+ import { forwardRef as forwardRef10 } from "react";
1299
+ import { twJoin as twJoin15 } from "tailwind-merge";
1300
+ import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
1301
+ var SideBySideFormItem = forwardRef10(
1302
+ ({ styles, htmlFor, label, options, render, error }, ref) => /* @__PURE__ */ jsxs16("div", { className: twJoin15("grid grid-cols-[minmax(0,2fr)_minmax(0,3fr)] gap-x-1", styles), ref, children: [
1303
+ /* @__PURE__ */ jsxs16("div", { className: "pt-2.5", children: [
1304
+ /* @__PURE__ */ jsx38(FieldLabelWithTooltip, { htmlFor, label, options }),
1305
+ /* @__PURE__ */ jsx38(FieldDescription, { styles: "pt-0.5", children: options?.description })
1143
1306
  ] }),
1144
- /* @__PURE__ */ jsxs13("div", { children: [
1307
+ /* @__PURE__ */ jsxs16("div", { children: [
1145
1308
  render,
1146
- /* @__PURE__ */ jsx32(FieldErrorMessage, { error }),
1309
+ /* @__PURE__ */ jsx38(FieldErrorMessage, { error }),
1147
1310
  options?.bottomSlot
1148
1311
  ] })
1149
1312
  ] })
1150
1313
  );
1151
1314
 
1152
1315
  // src/core/form/components/form-item/StackedFormItem.tsx
1153
- import { forwardRef as forwardRef10 } from "react";
1154
- import { twJoin as twJoin13 } from "tailwind-merge";
1155
- import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
1156
- var StackedFormItem = forwardRef10(
1157
- ({ styles, label, options, render, error }, ref) => /* @__PURE__ */ jsxs14("div", { className: styles || void 0, ref, children: [
1158
- /* @__PURE__ */ jsx33(
1316
+ import { forwardRef as forwardRef11 } from "react";
1317
+ import { twJoin as twJoin16 } from "tailwind-merge";
1318
+ import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
1319
+ var StackedFormItem = forwardRef11(
1320
+ ({ styles, htmlFor, label, options, render, error }, ref) => /* @__PURE__ */ jsxs17("div", { className: styles || void 0, ref, children: [
1321
+ /* @__PURE__ */ jsx39(
1159
1322
  FieldLabelWithTooltip,
1160
1323
  {
1161
- styles: twJoin13("flex items-baseline", options?.description == null && "pb-1"),
1324
+ styles: twJoin16("flex items-baseline", options?.description == null && "pb-1"),
1325
+ htmlFor,
1162
1326
  label,
1163
1327
  options
1164
1328
  }
1165
1329
  ),
1166
- /* @__PURE__ */ jsx33(FieldDescription, { styles: "pb-1", children: options?.description }),
1330
+ /* @__PURE__ */ jsx39(FieldDescription, { styles: "pb-1", children: options?.description }),
1167
1331
  render,
1168
- /* @__PURE__ */ jsx33(FieldErrorMessage, { error }),
1332
+ /* @__PURE__ */ jsx39(FieldErrorMessage, { error }),
1169
1333
  options?.bottomSlot
1170
1334
  ] })
1171
1335
  );
1172
1336
 
1173
1337
  // src/core/form/components/form-item/index.tsx
1174
- import { jsx as jsx34 } from "react/jsx-runtime";
1175
- var FormItem = forwardRef11(({ layout = "stacked", ...rest }, ref) => {
1338
+ import { jsx as jsx40 } from "react/jsx-runtime";
1339
+ var FormItem = forwardRef12(({ layout = "stacked", ...rest }, ref) => {
1176
1340
  switch (layout) {
1177
1341
  case "inline":
1178
- return /* @__PURE__ */ jsx34(InlineFormItem, { ...rest, ref });
1342
+ return /* @__PURE__ */ jsx40(InlineFormItem, { ...rest, ref });
1179
1343
  case "side-by-side":
1180
- return /* @__PURE__ */ jsx34(SideBySideFormItem, { ...rest, ref });
1344
+ return /* @__PURE__ */ jsx40(SideBySideFormItem, { ...rest, ref });
1181
1345
  case "stacked":
1182
- return /* @__PURE__ */ jsx34(StackedFormItem, { ...rest, ref });
1346
+ return /* @__PURE__ */ jsx40(StackedFormItem, { ...rest, ref });
1183
1347
  case "none":
1184
- return /* @__PURE__ */ jsx34(NoneFormItem, { ...rest, ref });
1348
+ return /* @__PURE__ */ jsx40(NoneFormItem, { ...rest, ref });
1185
1349
  default:
1186
1350
  throw new Error(`Unknown form item layout: ${layout}`);
1187
1351
  }
1188
1352
  });
1189
1353
 
1190
1354
  // src/core/form/components/FormInput.tsx
1191
- import { jsx as jsx35 } from "react/jsx-runtime";
1355
+ import { jsx as jsx41 } from "react/jsx-runtime";
1192
1356
  var FormInput = ({
1193
1357
  name,
1194
1358
  styles,
@@ -1199,20 +1363,30 @@ var FormInput = ({
1199
1363
  onBlur,
1200
1364
  disabled,
1201
1365
  ...rest
1202
- }) => /* @__PURE__ */ jsx35(
1366
+ }) => /* @__PURE__ */ jsx41(
1203
1367
  UncontrolledField,
1204
1368
  {
1205
1369
  name,
1206
1370
  onChange,
1207
1371
  onBlur,
1208
- render: ({ error, register }) => /* @__PURE__ */ jsx35(
1372
+ render: ({ error, register }) => /* @__PURE__ */ jsx41(
1209
1373
  FormItem,
1210
1374
  {
1211
1375
  layout,
1212
1376
  styles,
1377
+ htmlFor: name,
1213
1378
  label,
1214
1379
  options,
1215
- render: /* @__PURE__ */ jsx35(Input, { ...register(), ...rest, disabled, hasError: !disabled && (!!error || void 0) }),
1380
+ render: /* @__PURE__ */ jsx41(
1381
+ Input,
1382
+ {
1383
+ id: name,
1384
+ ...register(),
1385
+ ...rest,
1386
+ disabled,
1387
+ hasError: !disabled && (!!error || void 0)
1388
+ }
1389
+ ),
1216
1390
  error
1217
1391
  }
1218
1392
  )
@@ -1220,9 +1394,14 @@ var FormInput = ({
1220
1394
  );
1221
1395
 
1222
1396
  // src/core/form/components/FormDollarInput.tsx
1223
- import { faCircleExclamation as faCircleExclamation2, faDollarSign, faTriangleExclamation as faTriangleExclamation2 } from "@fortawesome/free-solid-svg-icons";
1224
- import { forwardRef as forwardRef12 } from "react";
1225
- import { twJoin as twJoin14 } from "tailwind-merge";
1397
+ import {
1398
+ faCheckCircle,
1399
+ faDollarSign,
1400
+ faExclamationCircle as faExclamationCircle2,
1401
+ faExclamationTriangle as faExclamationTriangle2
1402
+ } from "@fortawesome/sharp-solid-svg-icons";
1403
+ import { forwardRef as forwardRef13 } from "react";
1404
+ import { twJoin as twJoin17 } from "tailwind-merge";
1226
1405
 
1227
1406
  // src/core/utils/useSyncState.ts
1228
1407
  import { useState as useState6 } from "react";
@@ -1237,7 +1416,7 @@ var useSyncState = (upstream) => {
1237
1416
  };
1238
1417
 
1239
1418
  // src/core/form/components/FormDollarInput.tsx
1240
- import { jsx as jsx36, jsxs as jsxs15 } from "react/jsx-runtime";
1419
+ import { jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";
1241
1420
  var twoDecimalFormatter = Intl.NumberFormat("en-US", {
1242
1421
  minimumFractionDigits: 2,
1243
1422
  maximumFractionDigits: 2
@@ -1248,8 +1427,17 @@ var formatInput = (value) => {
1248
1427
  var roundToTwoDecimalPlaces = (value) => {
1249
1428
  return Math.round((value + Number.EPSILON) * 100) / 100;
1250
1429
  };
1251
- var DollarInput = forwardRef12(
1252
- ({ value, onChange, disabled = false, hasError = false, hasWarning = false, message }, ref) => {
1430
+ var DollarInput = forwardRef13(
1431
+ ({
1432
+ value,
1433
+ onChange,
1434
+ disabled = false,
1435
+ autoFocus = false,
1436
+ hasError = false,
1437
+ hasWarning = false,
1438
+ hasSuccess = false,
1439
+ message
1440
+ }, ref) => {
1253
1441
  const [strValue, setStrValue] = useSyncState(value == null ? "" : twoDecimalFormatter.format(value / 100));
1254
1442
  const handleChange = (event) => {
1255
1443
  const inputValue = formatInput(event.target.value);
@@ -1284,34 +1472,36 @@ var DollarInput = forwardRef12(
1284
1472
  onChange?.(roundToTwoDecimalPlaces(parsedValue * 100));
1285
1473
  }
1286
1474
  };
1287
- return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-0.5", children: [
1288
- /* @__PURE__ */ jsxs15(
1475
+ return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-0.5", children: [
1476
+ /* @__PURE__ */ jsxs18(
1289
1477
  "div",
1290
1478
  {
1291
- className: twJoin14(
1292
- "flex h-md w-full items-center rounded-sm py-2.5 text-base [&>input]:rounded-l-none! [&>input]:rounded-r-md!",
1293
- disabled && "cursor-not-allowed [&>input]:cursor-not-allowed [&>input]:bg-gray-50! [&>input]:text-gray-500!"
1479
+ className: twJoin17(
1480
+ "flex h-md w-full items-center rounded-sm py-2.5 text-base [&>input]:rounded-l-none! [&>input]:rounded-r-md! [&>input]:border-l-0!",
1481
+ disabled && "cursor-not-allowed [&>input]:cursor-not-allowed [&>input]:bg-surface-light! [&>input]:text-muted!"
1294
1482
  ),
1295
1483
  children: [
1296
- /* @__PURE__ */ jsx36(
1484
+ /* @__PURE__ */ jsx42(
1297
1485
  "div",
1298
1486
  {
1299
- className: twJoin14(
1300
- "flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-gray-500",
1301
- hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-yellow-100 text-yellow-700" : "border-gray-200 bg-gray-100"
1487
+ className: twJoin17(
1488
+ "flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-muted",
1489
+ hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-surface-warning text-warning" : hasSuccess ? "border-green-300 bg-surface-success text-success" : "border-surface-neutral bg-surface-neutral"
1302
1490
  ),
1303
- children: /* @__PURE__ */ jsx36(Icon, { icon: faDollarSign })
1491
+ children: /* @__PURE__ */ jsx42(Icon, { icon: faDollarSign })
1304
1492
  }
1305
1493
  ),
1306
- /* @__PURE__ */ jsx36(
1494
+ /* @__PURE__ */ jsx42(
1307
1495
  Input,
1308
1496
  {
1309
1497
  ref,
1310
1498
  variant: "default",
1311
1499
  disabled,
1500
+ autoFocus,
1312
1501
  value: strValue,
1313
1502
  hasError,
1314
1503
  hasWarning,
1504
+ hasSuccess,
1315
1505
  onChange: handleChange,
1316
1506
  onBlur: handleBlur,
1317
1507
  onPaste: handlePaste,
@@ -1321,30 +1511,34 @@ var DollarInput = forwardRef12(
1321
1511
  ]
1322
1512
  }
1323
1513
  ),
1324
- hasWarning && message && /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1 text-sm font-normal text-yellow-700", children: [
1325
- /* @__PURE__ */ jsx36(Icon, { icon: faTriangleExclamation2 }),
1514
+ hasWarning && message && /* @__PURE__ */ jsxs18(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-warning", children: [
1515
+ /* @__PURE__ */ jsx42(Icon, { icon: faExclamationTriangle2 }),
1516
+ message
1517
+ ] }),
1518
+ hasError && message && /* @__PURE__ */ jsxs18(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-red-700", children: [
1519
+ /* @__PURE__ */ jsx42(Icon, { icon: faExclamationCircle2 }),
1326
1520
  message
1327
1521
  ] }),
1328
- hasError && message && /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1 text-sm font-normal text-red-700", children: [
1329
- /* @__PURE__ */ jsx36(Icon, { icon: faCircleExclamation2 }),
1522
+ hasSuccess && message && /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1 text-sm font-normal text-success", children: [
1523
+ /* @__PURE__ */ jsx42(Icon, { icon: faCheckCircle }),
1330
1524
  message
1331
1525
  ] })
1332
1526
  ] });
1333
1527
  }
1334
1528
  );
1335
- var FormDollarInput = forwardRef12(
1336
- ({ name, layout, label, onChange, disabled, hasWarning = false, message, options }, ref) => /* @__PURE__ */ jsx36(
1529
+ var FormDollarInput = forwardRef13(
1530
+ ({ name, layout, label, onChange, disabled, autoFocus, hasWarning = false, hasSuccess = false, message, options }, ref) => /* @__PURE__ */ jsx42(
1337
1531
  ControlledField,
1338
1532
  {
1339
1533
  name,
1340
- render: (field) => /* @__PURE__ */ jsx36(
1534
+ render: (field) => /* @__PURE__ */ jsx42(
1341
1535
  FormItem,
1342
1536
  {
1343
1537
  label,
1344
1538
  layout,
1345
1539
  options,
1346
1540
  error: field.error,
1347
- render: /* @__PURE__ */ jsx36(
1541
+ render: /* @__PURE__ */ jsx42(
1348
1542
  DollarInput,
1349
1543
  {
1350
1544
  onChange: (cents) => {
@@ -1353,8 +1547,10 @@ var FormDollarInput = forwardRef12(
1353
1547
  },
1354
1548
  value: field.value,
1355
1549
  disabled,
1550
+ autoFocus,
1356
1551
  hasError: !disabled && (!!field.error || void 0),
1357
1552
  hasWarning: !disabled && hasWarning,
1553
+ hasSuccess: !disabled && hasSuccess,
1358
1554
  message,
1359
1555
  ref
1360
1556
  }
@@ -1366,10 +1562,15 @@ var FormDollarInput = forwardRef12(
1366
1562
  );
1367
1563
 
1368
1564
  // src/core/form/components/FormPercentInput.tsx
1369
- import { faCircleExclamation as faCircleExclamation3, faPercent, faTriangleExclamation as faTriangleExclamation3 } from "@fortawesome/free-solid-svg-icons";
1370
- import { forwardRef as forwardRef13 } from "react";
1371
- import { twJoin as twJoin15 } from "tailwind-merge";
1372
- import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
1565
+ import {
1566
+ faCheckCircle as faCheckCircle2,
1567
+ faExclamationCircle as faExclamationCircle3,
1568
+ faExclamationTriangle as faExclamationTriangle3,
1569
+ faPercent
1570
+ } from "@fortawesome/sharp-solid-svg-icons";
1571
+ import { forwardRef as forwardRef14 } from "react";
1572
+ import { twJoin as twJoin18 } from "tailwind-merge";
1573
+ import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
1373
1574
  var twoDecimalFormatter2 = Intl.NumberFormat("en-US", {
1374
1575
  minimumFractionDigits: 0,
1375
1576
  maximumFractionDigits: 2
@@ -1380,8 +1581,8 @@ var formatInput2 = (value) => {
1380
1581
  var roundToTwoDecimalPlaces2 = (value) => {
1381
1582
  return Math.round((value + Number.EPSILON) * 100) / 100;
1382
1583
  };
1383
- var PercentInput = forwardRef13(
1384
- ({ value, onChange, disabled = false, hasError = false, hasWarning = false, message }, ref) => {
1584
+ var PercentInput = forwardRef14(
1585
+ ({ value, onChange, disabled = false, hasError = false, hasWarning = false, hasSuccess = false, message }, ref) => {
1385
1586
  const [strValue, setStrValue] = useSyncState(value == null ? "" : twoDecimalFormatter2.format(value));
1386
1587
  const handleChange = (event) => {
1387
1588
  const inputValue = formatInput2(event.target.value);
@@ -1416,26 +1617,26 @@ var PercentInput = forwardRef13(
1416
1617
  onChange?.(roundToTwoDecimalPlaces2(parsedValue));
1417
1618
  }
1418
1619
  };
1419
- return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-0.5", children: [
1420
- /* @__PURE__ */ jsxs16(
1620
+ return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-0.5", children: [
1621
+ /* @__PURE__ */ jsxs19(
1421
1622
  "div",
1422
1623
  {
1423
- className: twJoin15(
1424
- "flex h-md w-full items-center rounded-sm py-2.5 text-base [&>input]:rounded-l-none! [&>input]:rounded-r-md!",
1425
- disabled && "cursor-not-allowed [&>input]:cursor-not-allowed [&>input]:bg-gray-50! [&>input]:text-gray-500!"
1624
+ className: twJoin18(
1625
+ "flex h-md w-full items-center rounded-sm py-2.5 text-base [&>input]:rounded-l-none! [&>input]:rounded-r-md! [&>input]:border-l-0!",
1626
+ disabled && "cursor-not-allowed [&>input]:cursor-not-allowed [&>input]:bg-surface-light! [&>input]:text-muted!"
1426
1627
  ),
1427
1628
  children: [
1428
- /* @__PURE__ */ jsx37(
1629
+ /* @__PURE__ */ jsx43(
1429
1630
  "div",
1430
1631
  {
1431
- className: twJoin15(
1432
- "flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-gray-500",
1433
- hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-yellow-100 text-yellow-700" : "border-gray-200 bg-gray-100"
1632
+ className: twJoin18(
1633
+ "flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-muted",
1634
+ hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-surface-warning text-warning" : hasSuccess ? "border-green-300 bg-surface-success text-success" : "border-surface-neutral bg-surface-neutral"
1434
1635
  ),
1435
- children: /* @__PURE__ */ jsx37(Icon, { icon: faPercent })
1636
+ children: /* @__PURE__ */ jsx43(Icon, { icon: faPercent })
1436
1637
  }
1437
1638
  ),
1438
- /* @__PURE__ */ jsx37(
1639
+ /* @__PURE__ */ jsx43(
1439
1640
  Input,
1440
1641
  {
1441
1642
  ref,
@@ -1444,6 +1645,7 @@ var PercentInput = forwardRef13(
1444
1645
  value: strValue,
1445
1646
  hasError,
1446
1647
  hasWarning,
1648
+ hasSuccess,
1447
1649
  onChange: handleChange,
1448
1650
  onBlur: handleBlur,
1449
1651
  onPaste: handlePaste,
@@ -1453,30 +1655,34 @@ var PercentInput = forwardRef13(
1453
1655
  ]
1454
1656
  }
1455
1657
  ),
1456
- hasWarning && message && /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1 text-sm font-normal text-yellow-700", children: [
1457
- /* @__PURE__ */ jsx37(Icon, { icon: faTriangleExclamation3 }),
1658
+ hasWarning && message && /* @__PURE__ */ jsxs19(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-warning", children: [
1659
+ /* @__PURE__ */ jsx43(Icon, { icon: faExclamationTriangle3 }),
1458
1660
  message
1459
1661
  ] }),
1460
- hasError && message && /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1 text-sm font-normal text-red-700", children: [
1461
- /* @__PURE__ */ jsx37(Icon, { icon: faCircleExclamation3 }),
1662
+ hasError && message && /* @__PURE__ */ jsxs19(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-red-700", children: [
1663
+ /* @__PURE__ */ jsx43(Icon, { icon: faExclamationCircle3 }),
1664
+ message
1665
+ ] }),
1666
+ hasSuccess && message && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1 text-sm font-normal text-success", children: [
1667
+ /* @__PURE__ */ jsx43(Icon, { icon: faCheckCircle2 }),
1462
1668
  message
1463
1669
  ] })
1464
1670
  ] });
1465
1671
  }
1466
1672
  );
1467
- var FormPercentInput = forwardRef13(
1468
- ({ name, layout, label, onChange, disabled, hasWarning = false, message, options }, ref) => /* @__PURE__ */ jsx37(
1673
+ var FormPercentInput = forwardRef14(
1674
+ ({ name, layout, label, onChange, disabled, hasWarning = false, hasSuccess = false, message, options }, ref) => /* @__PURE__ */ jsx43(
1469
1675
  ControlledField,
1470
1676
  {
1471
1677
  name,
1472
- render: (field) => /* @__PURE__ */ jsx37(
1678
+ render: (field) => /* @__PURE__ */ jsx43(
1473
1679
  FormItem,
1474
1680
  {
1475
1681
  label,
1476
1682
  layout,
1477
1683
  options,
1478
1684
  error: field.error,
1479
- render: /* @__PURE__ */ jsx37(
1685
+ render: /* @__PURE__ */ jsx43(
1480
1686
  PercentInput,
1481
1687
  {
1482
1688
  onChange: (percent) => {
@@ -1487,6 +1693,7 @@ var FormPercentInput = forwardRef13(
1487
1693
  disabled,
1488
1694
  hasError: !disabled && (!!field.error || void 0),
1489
1695
  hasWarning: !disabled && hasWarning,
1696
+ hasSuccess: !disabled && hasSuccess,
1490
1697
  message,
1491
1698
  ref
1492
1699
  }
@@ -1498,7 +1705,7 @@ var FormPercentInput = forwardRef13(
1498
1705
  );
1499
1706
 
1500
1707
  // src/core/form/components/FormCheckbox.tsx
1501
- import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
1708
+ import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs20 } from "react/jsx-runtime";
1502
1709
  var FormCheckbox = ({ name, disabled, onChange: propsOnChange, children }) => {
1503
1710
  const {
1504
1711
  onChange,
@@ -1513,8 +1720,8 @@ var FormCheckbox = ({ name, disabled, onChange: propsOnChange, children }) => {
1513
1720
  propsOnChange?.(checked);
1514
1721
  };
1515
1722
  if (children == null) {
1516
- return /* @__PURE__ */ jsxs17(Fragment5, { children: [
1517
- /* @__PURE__ */ jsx38(
1723
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
1724
+ /* @__PURE__ */ jsx44(
1518
1725
  Checkbox,
1519
1726
  {
1520
1727
  ...field,
@@ -1525,12 +1732,12 @@ var FormCheckbox = ({ name, disabled, onChange: propsOnChange, children }) => {
1525
1732
  hasError: !!error
1526
1733
  }
1527
1734
  ),
1528
- /* @__PURE__ */ jsx38(FieldErrorMessage, { error })
1735
+ /* @__PURE__ */ jsx44(FieldErrorMessage, { error })
1529
1736
  ] });
1530
1737
  }
1531
- return /* @__PURE__ */ jsxs17(ControlledFieldProvider, { name, children: [
1738
+ return /* @__PURE__ */ jsxs20(ControlledFieldProvider, { name, children: [
1532
1739
  children,
1533
- /* @__PURE__ */ jsx38(FieldErrorMessage, { error })
1740
+ /* @__PURE__ */ jsx44(FieldErrorMessage, { error })
1534
1741
  ] });
1535
1742
  };
1536
1743
  function CheckboxImpl({ onChange: propsOnChange }) {
@@ -1547,17 +1754,17 @@ function CheckboxImpl({ onChange: propsOnChange }) {
1547
1754
  onChange(checked);
1548
1755
  propsOnChange?.(checked);
1549
1756
  };
1550
- return /* @__PURE__ */ jsx38(Checkbox, { ...field, id: name, checked: !!value, onChange: handleChange, hasError: !!error });
1757
+ return /* @__PURE__ */ jsx44(Checkbox, { ...field, id: name, checked: !!value, onChange: handleChange, hasError: !!error });
1551
1758
  }
1552
1759
  function LabelImpl({ children, className }) {
1553
1760
  const { name } = useControlledField();
1554
- return /* @__PURE__ */ jsx38(FieldLabel, { htmlFor: name, styles: className, children });
1761
+ return /* @__PURE__ */ jsx44(FieldLabel, { htmlFor: name, styles: className, children });
1555
1762
  }
1556
1763
  FormCheckbox.Label = LabelImpl;
1557
1764
  FormCheckbox.Checkbox = CheckboxImpl;
1558
1765
 
1559
1766
  // src/core/form/components/ControlledFormItem.tsx
1560
- import { jsx as jsx39 } from "react/jsx-runtime";
1767
+ import { jsx as jsx45 } from "react/jsx-runtime";
1561
1768
  var ControlledFormItem = ({
1562
1769
  name,
1563
1770
  styles,
@@ -1567,7 +1774,7 @@ var ControlledFormItem = ({
1567
1774
  render
1568
1775
  }) => {
1569
1776
  const field = useControlledFormField({ name });
1570
- return /* @__PURE__ */ jsx39(
1777
+ return /* @__PURE__ */ jsx45(
1571
1778
  FormItem,
1572
1779
  {
1573
1780
  layout,
@@ -1651,6 +1858,7 @@ function useAsyncMultiSelect({
1651
1858
  }
1652
1859
  };
1653
1860
  return {
1861
+ query,
1654
1862
  setQuery,
1655
1863
  selectItems,
1656
1864
  loadProps,
@@ -1686,73 +1894,25 @@ var useAsyncSelect = ({
1686
1894
  // src/core/select/AsyncMultiSelect.tsx
1687
1895
  import { DndContext, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
1688
1896
  import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
1689
- import { faArrowTurnDown, faCheck as faCheck2, faMagnifyingGlass, faXmark as faXmark2 } from "@fortawesome/free-solid-svg-icons";
1897
+ import { faArrowTurnDownLeft, faCheck as faCheck2, faSearch, faTimes } from "@fortawesome/sharp-solid-svg-icons";
1690
1898
  import { useMemo as useMemo5, useRef as useRef4, useState as useState8 } from "react";
1691
- import { twJoin as twJoin18 } from "tailwind-merge";
1899
+ import { twJoin as twJoin21 } from "tailwind-merge";
1692
1900
 
1693
1901
  // src/core/dropdown-chevron/DropdownChevron.tsx
1694
- import { faChevronDown as faChevronDown3 } from "@fortawesome/free-solid-svg-icons";
1695
- import { twJoin as twJoin16 } from "tailwind-merge";
1696
- import { jsx as jsx40 } from "react/jsx-runtime";
1902
+ import { faChevronDown as faChevronDown3 } from "@fortawesome/sharp-solid-svg-icons";
1903
+ import { twJoin as twJoin19 } from "tailwind-merge";
1904
+ import { jsx as jsx46 } from "react/jsx-runtime";
1697
1905
  var DropdownChevron = () => {
1698
- return /* @__PURE__ */ jsx40("div", { className: twJoin16("w-3 text-sm text-gray-500"), children: /* @__PURE__ */ jsx40(Icon, { icon: faChevronDown3 }) });
1699
- };
1700
-
1701
- // src/core/popover/Popover.tsx
1702
- import * as RadixPopover from "@radix-ui/react-popover";
1703
- import { twMerge as twMerge5 } from "tailwind-merge";
1704
- import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
1705
- var Popover = ({
1706
- open,
1707
- trigger,
1708
- triggerClassName,
1709
- children,
1710
- arrowClassName,
1711
- contentClassName,
1712
- disabled,
1713
- onOpenChange,
1714
- alignContent,
1715
- container,
1716
- ...props
1717
- }) => /* @__PURE__ */ jsxs18(RadixPopover.Root, { open, onOpenChange, children: [
1718
- /* @__PURE__ */ jsx41(RadixPopover.Trigger, { asChild: true, disabled, className: triggerClassName, children: trigger }),
1719
- /* @__PURE__ */ jsx41(
1720
- PopoverBody,
1721
- {
1722
- align: alignContent,
1723
- ...props,
1724
- contentClassName,
1725
- arrowClassName,
1726
- container,
1727
- children
1728
- }
1729
- )
1730
- ] });
1731
- var PopoverBody = ({ children, arrowClassName, contentClassName, container, ...props }) => {
1732
- return /* @__PURE__ */ jsx41(RadixPopover.Portal, { container, children: /* @__PURE__ */ jsxs18(
1733
- RadixPopover.Content,
1734
- {
1735
- ...props,
1736
- className: twMerge5("isolate z-50 rounded-lg bg-white shadow-lg focus:outline-hidden", contentClassName),
1737
- children: [
1738
- children,
1739
- /* @__PURE__ */ jsx41(RadixPopover.Arrow, { className: twMerge5("fill-white", arrowClassName), offset: 8 })
1740
- ]
1741
- }
1742
- ) });
1906
+ return /* @__PURE__ */ jsx46("div", { className: twJoin19("w-3 text-sm text-muted"), children: /* @__PURE__ */ jsx46(Icon, { icon: faChevronDown3 }) });
1743
1907
  };
1744
- Popover.Root = (props) => /* @__PURE__ */ jsx41(RadixPopover.Root, { ...props });
1745
- Popover.Trigger = (props) => /* @__PURE__ */ jsx41(RadixPopover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx41(Button, { ...props }) });
1746
- Popover.Body = PopoverBody;
1747
- Popover.Close = (props) => /* @__PURE__ */ jsx41(RadixPopover.Close, { asChild: true, ...props });
1748
1908
 
1749
1909
  // src/core/select/SelectListItem.tsx
1750
1910
  import { useSortable } from "@dnd-kit/sortable";
1751
1911
  import { CSS } from "@dnd-kit/utilities";
1752
- import { faGripVertical } from "@fortawesome/free-solid-svg-icons";
1912
+ import { faGripDotsVertical } from "@fortawesome/sharp-solid-svg-icons";
1753
1913
  import { useEffect as useEffect4, useRef as useRef3 } from "react";
1754
- import { twJoin as twJoin17 } from "tailwind-merge";
1755
- import { jsx as jsx42, jsxs as jsxs19 } from "react/jsx-runtime";
1914
+ import { twJoin as twJoin20 } from "tailwind-merge";
1915
+ import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
1756
1916
  var SelectListItem = ({
1757
1917
  sortableId,
1758
1918
  children,
@@ -1767,7 +1927,7 @@ var SelectListItem = ({
1767
1927
  containerRef.current.scrollIntoView({ block: "nearest", inline: "nearest", behavior: "smooth" });
1768
1928
  }
1769
1929
  }, [focused]);
1770
- return /* @__PURE__ */ jsxs19(
1930
+ return /* @__PURE__ */ jsxs21(
1771
1931
  "li",
1772
1932
  {
1773
1933
  ref: (ref) => {
@@ -1775,10 +1935,10 @@ var SelectListItem = ({
1775
1935
  containerRef.current = ref;
1776
1936
  },
1777
1937
  onClick: disabled ? void 0 : onClick,
1778
- className: twJoin17(
1938
+ className: twJoin20(
1779
1939
  "flex w-full items-center gap-2 rounded-lg px-2 py-1.5",
1780
- disabled ? "cursor-not-allowed text-gray-400" : "cursor-pointer transition-colors duration-150 hover:bg-gray-100",
1781
- focused && "bg-gray-100"
1940
+ disabled ? "cursor-not-allowed text-placeholder" : "cursor-pointer transition-colors duration-150 hover:bg-surface-neutral",
1941
+ focused && "bg-surface-neutral"
1782
1942
  ),
1783
1943
  style: {
1784
1944
  transform: CSS.Transform.toString(transform),
@@ -1786,7 +1946,7 @@ var SelectListItem = ({
1786
1946
  },
1787
1947
  ...attributes,
1788
1948
  children: [
1789
- sortableId && /* @__PURE__ */ jsx42(
1949
+ sortableId && /* @__PURE__ */ jsx47(
1790
1950
  "div",
1791
1951
  {
1792
1952
  className: "cursor-grab font-medium active:cursor-grabbing",
@@ -1795,17 +1955,17 @@ var SelectListItem = ({
1795
1955
  e.stopPropagation();
1796
1956
  listeners?.onClick(e);
1797
1957
  },
1798
- children: /* @__PURE__ */ jsx42(Icon, { icon: faGripVertical })
1958
+ children: /* @__PURE__ */ jsx47(Icon, { icon: faGripDotsVertical })
1799
1959
  }
1800
1960
  ),
1801
- /* @__PURE__ */ jsx42("div", { className: "flex w-full flex-1 items-center justify-between", children })
1961
+ /* @__PURE__ */ jsx47("div", { className: "flex w-full flex-1 items-center justify-between", children })
1802
1962
  ]
1803
1963
  }
1804
1964
  );
1805
1965
  };
1806
1966
 
1807
1967
  // src/core/select/AsyncMultiSelect.tsx
1808
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs20 } from "react/jsx-runtime";
1968
+ import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
1809
1969
  var AsyncMultiSelect = ({
1810
1970
  value = [],
1811
1971
  onChange,
@@ -1827,9 +1987,7 @@ var AsyncMultiSelect = ({
1827
1987
  onSelectAll,
1828
1988
  numValuesToShow,
1829
1989
  emptyState,
1830
- size,
1831
- onOpen,
1832
- onClose
1990
+ size
1833
1991
  }) => {
1834
1992
  const [open, setOpen] = useState8(false);
1835
1993
  const [search, setSearch] = useState8("");
@@ -1844,7 +2002,6 @@ var AsyncMultiSelect = ({
1844
2002
  setOpen(false);
1845
2003
  resetSearch();
1846
2004
  setFocusIndex(0);
1847
- onClose?.();
1848
2005
  };
1849
2006
  const searchMatchesExistingOption = value.some((v) => v.toString().toLowerCase() === search.toLowerCase()) || unselectedOptions.find((opt) => opt.value?.toString().toLowerCase() === search.toLowerCase());
1850
2007
  const showCustomItem = allowCustomValues && !!search && !loadProps?.isLoading && !searchMatchesExistingOption && isValidCustomValue(search);
@@ -1906,9 +2063,8 @@ var AsyncMultiSelect = ({
1906
2063
  onSearchChange?.(val);
1907
2064
  };
1908
2065
  const handleTriggerKeyDown = (e) => {
1909
- if (!hideSearch && !e.ctrlKey && !e.metaKey && !e.altKey) {
2066
+ if (!hideSearch && e.key.length === 1) {
1910
2067
  setOpen(true);
1911
- onOpen?.();
1912
2068
  handleSearchTermChange(e.key);
1913
2069
  }
1914
2070
  };
@@ -1923,10 +2079,10 @@ var AsyncMultiSelect = ({
1923
2079
  );
1924
2080
  const triggerText = useMemo5(() => {
1925
2081
  if (value.length === 0) {
1926
- return /* @__PURE__ */ jsx43("span", { className: "truncate", children: triggerPlaceholder ?? `Select ${maxSelection === 1 ? "an item..." : "items..."}` });
2082
+ return /* @__PURE__ */ jsx48("span", { className: "truncate", children: triggerPlaceholder ?? `Select ${maxSelection === 1 ? "an item..." : "items..."}` });
1927
2083
  }
1928
2084
  if (!allValuesHaveOptions) {
1929
- return /* @__PURE__ */ jsx43("span", { className: "line-clamp-1", children: "Loading..." });
2085
+ return /* @__PURE__ */ jsx48("span", { className: "line-clamp-1", children: "Loading..." });
1930
2086
  }
1931
2087
  const optionMatchingFirstVal = valueToOptionMap.get(value[0]) || {
1932
2088
  label: value[0],
@@ -1934,20 +2090,19 @@ var AsyncMultiSelect = ({
1934
2090
  };
1935
2091
  const firstValText = optionMatchingFirstVal ? optionMatchingFirstVal.label : value[0];
1936
2092
  const icon = value.length === 1 ? optionMatchingFirstVal?.icon : void 0;
1937
- return /* @__PURE__ */ jsxs20(Fragment6, { children: [
1938
- icon && /* @__PURE__ */ jsx43("span", { className: "mr-1 inline-flex items-center", children: icon }),
1939
- /* @__PURE__ */ jsx43("span", { className: "line-clamp-1 text-left", children: `${firstValText}${value.length > 1 ? "," : ""}` }),
1940
- value.length > 1 && /* @__PURE__ */ jsx43("span", { className: "whitespace-nowrap", children: `+${value.length - 1} more` })
2093
+ return /* @__PURE__ */ jsxs22(Fragment6, { children: [
2094
+ icon && /* @__PURE__ */ jsx48("span", { className: "mr-1 inline-flex items-center", children: icon }),
2095
+ /* @__PURE__ */ jsx48("span", { className: "line-clamp-1 text-left", children: `${firstValText}${value.length > 1 ? "," : ""}` }),
2096
+ value.length > 1 && /* @__PURE__ */ jsx48("span", { className: "whitespace-nowrap", children: `+${value.length - 1} more` })
1941
2097
  ] });
1942
2098
  }, [maxSelection, valueToOptionMap, triggerPlaceholder, value, allValuesHaveOptions]);
1943
- return /* @__PURE__ */ jsx43(
2099
+ return /* @__PURE__ */ jsx48(
1944
2100
  Popover,
1945
2101
  {
1946
2102
  open: open && !disabled,
1947
2103
  onOpenChange: (val) => {
1948
2104
  if (val) {
1949
2105
  setOpen(true);
1950
- onOpen?.();
1951
2106
  } else {
1952
2107
  handleClose();
1953
2108
  }
@@ -1957,42 +2112,42 @@ var AsyncMultiSelect = ({
1957
2112
  triggerClassName: popover?.triggerClassName,
1958
2113
  contentClassName: popover?.contentClassName,
1959
2114
  container: popover?.container,
1960
- trigger: popover?.customTrigger ?? (variant === "simple" ? /* @__PURE__ */ jsxs20(
2115
+ trigger: popover?.customTrigger ?? (variant === "simple" ? /* @__PURE__ */ jsxs22(
1961
2116
  "div",
1962
2117
  {
1963
2118
  onKeyDown: handleTriggerKeyDown,
1964
- className: twJoin18(
2119
+ className: twJoin21(
1965
2120
  "-mx-2 -my-1.5 flex cursor-pointer items-center justify-between gap-1.5 rounded-md px-2 py-1.5 transition-all duration-150",
1966
- !disabled && "cursor-pointer hover:bg-gray-100"
2121
+ !disabled && "cursor-pointer hover:bg-surface-neutral"
1967
2122
  ),
1968
2123
  children: [
1969
- /* @__PURE__ */ jsx43(
2124
+ /* @__PURE__ */ jsx48(
1970
2125
  "div",
1971
2126
  {
1972
- className: twJoin18(
2127
+ className: twJoin21(
1973
2128
  "line-clamp-1 flex flex-1 items-center",
1974
- value.length !== 0 ? "text-inherit" : "text-gray-500"
2129
+ value.length !== 0 ? "text-inherit" : "text-muted"
1975
2130
  ),
1976
2131
  children: triggerText
1977
2132
  }
1978
2133
  ),
1979
- !disabled && /* @__PURE__ */ jsx43(DropdownChevron, {})
2134
+ !disabled && /* @__PURE__ */ jsx48(DropdownChevron, {})
1980
2135
  ]
1981
2136
  }
1982
- ) : /* @__PURE__ */ jsxs20("button", { onKeyDown: handleTriggerKeyDown, className: twJoin18("w-full", inputBoxStyles({ hasError, size })), children: [
1983
- /* @__PURE__ */ jsx43(
2137
+ ) : /* @__PURE__ */ jsxs22("button", { onKeyDown: handleTriggerKeyDown, className: twJoin21("w-full", inputBoxStyles({ hasError, size })), children: [
2138
+ /* @__PURE__ */ jsx48(
1984
2139
  "span",
1985
2140
  {
1986
- className: `mr-auto line-clamp-1 flex items-center space-x-1 text-left text-base ${value.length === 0 ? "text-gray-400" : "text-gray-800"}`,
2141
+ className: `mr-auto line-clamp-1 flex items-center space-x-1 text-left text-base ${value.length === 0 ? "text-placeholder" : "text-gray-800"}`,
1987
2142
  children: triggerText
1988
2143
  }
1989
2144
  ),
1990
- /* @__PURE__ */ jsx43(DropdownChevron, {})
2145
+ /* @__PURE__ */ jsx48(DropdownChevron, {})
1991
2146
  ] })),
1992
- children: /* @__PURE__ */ jsxs20("div", { className: "w-72", children: [
1993
- (!hideSearch || allowCustomValues) && /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsxs20(InputBox, { variant: "transparent", children: [
1994
- /* @__PURE__ */ jsx43("div", { className: "w-3 text-sm text-gray-400", children: /* @__PURE__ */ jsx43(Icon, { icon: faMagnifyingGlass }) }),
1995
- /* @__PURE__ */ jsx43(
2147
+ children: /* @__PURE__ */ jsxs22("div", { className: "w-72", children: [
2148
+ (!hideSearch || allowCustomValues) && /* @__PURE__ */ jsx48("div", { children: /* @__PURE__ */ jsxs22(InputBox, { variant: "transparent", children: [
2149
+ /* @__PURE__ */ jsx48("div", { className: "w-3 text-sm text-placeholder", children: /* @__PURE__ */ jsx48(Icon, { icon: faSearch }) }),
2150
+ /* @__PURE__ */ jsx48(
1996
2151
  InputBox.Input,
1997
2152
  {
1998
2153
  ref: inputRef,
@@ -2004,8 +2159,8 @@ var AsyncMultiSelect = ({
2004
2159
  }
2005
2160
  )
2006
2161
  ] }) }),
2007
- /* @__PURE__ */ jsxs20("ul", { className: "max-h-72 space-y-1 overflow-y-auto p-1", children: [
2008
- !allValuesHaveOptions ? /* @__PURE__ */ jsx43(SelectListItem, { disabled: true, children: "Loading..." }) : /* @__PURE__ */ jsx43(
2162
+ /* @__PURE__ */ jsxs22("ul", { className: "max-h-72 space-y-1 overflow-y-auto p-1", children: [
2163
+ !allValuesHaveOptions ? /* @__PURE__ */ jsx48(SelectListItem, { disabled: true, children: "Loading..." }) : /* @__PURE__ */ jsx48(
2009
2164
  SelectedItems,
2010
2165
  {
2011
2166
  value,
@@ -2018,8 +2173,8 @@ var AsyncMultiSelect = ({
2018
2173
  numValuesToShow
2019
2174
  }
2020
2175
  ),
2021
- showCustomItem && /* @__PURE__ */ jsx43(SelectOption, { onClick: handleAddCustomItem, focused: showCustomItem && focusIndex === 0, children: /* @__PURE__ */ jsx43("span", { children: `"${search}"` }) }),
2022
- unselectedOptions.map((item, i) => /* @__PURE__ */ jsx43(
2176
+ showCustomItem && /* @__PURE__ */ jsx48(SelectOption, { onClick: handleAddCustomItem, focused: showCustomItem && focusIndex === 0, children: /* @__PURE__ */ jsx48("span", { children: `"${search}"` }) }),
2177
+ unselectedOptions.map((item, i) => /* @__PURE__ */ jsx48(
2023
2178
  SelectOption,
2024
2179
  {
2025
2180
  onClick: () => handleOptionSelected(item.value),
@@ -2031,12 +2186,14 @@ var AsyncMultiSelect = ({
2031
2186
  )),
2032
2187
  !loadProps ? (
2033
2188
  // no asynchronous loading
2034
- unselectedOptions.length === 0 && (emptyState || /* @__PURE__ */ jsx43(SelectListItem, { disabled: true, children: "No results" }))
2035
- ) : loadProps.isLoading ? /* @__PURE__ */ jsx43(SelectListItem, { disabled: true, children: "Loading..." }) : loadProps.isError ? /* @__PURE__ */ jsx43(SelectListItem, { disabled: true, children: "An error occurred" }) : unselectedOptions.length === 0 ? emptyState || /* @__PURE__ */ jsx43(SelectListItem, { disabled: true, children: "No results" }) : loadProps.canLoadMore ? /* @__PURE__ */ jsx43(
2036
- "div",
2189
+ unselectedOptions.length === 0 && (emptyState || /* @__PURE__ */ jsx48(SelectListItem, { disabled: true, children: "No results" }))
2190
+ ) : loadProps.isLoading ? /* @__PURE__ */ jsx48(SelectListItem, { disabled: true, children: "Loading..." }) : loadProps.isError ? /* @__PURE__ */ jsx48(SelectListItem, { disabled: true, children: "An error occurred" }) : unselectedOptions.length === 0 ? emptyState || /* @__PURE__ */ jsx48(SelectListItem, { disabled: true, children: "No results" }) : loadProps.canLoadMore ? /* @__PURE__ */ jsx48(
2191
+ Text,
2037
2192
  {
2038
- className: "cursor-pointer px-2 py-1 text-sm font-medium text-indigo-600",
2193
+ as: "span",
2194
+ variant: "label",
2039
2195
  onClick: loadProps.onLoadMore,
2196
+ className: "cursor-pointer px-2 py-1 text-indigo-600",
2040
2197
  children: "Load more..."
2041
2198
  }
2042
2199
  ) : null
@@ -2045,9 +2202,9 @@ var AsyncMultiSelect = ({
2045
2202
  }
2046
2203
  );
2047
2204
  };
2048
- var SelectOption = ({ children, focused, ...rest }) => /* @__PURE__ */ jsxs20(SelectListItem, { focused, ...rest, children: [
2205
+ var SelectOption = ({ children, focused, ...rest }) => /* @__PURE__ */ jsxs22(SelectListItem, { focused, ...rest, children: [
2049
2206
  children,
2050
- focused && !rest.disabled && /* @__PURE__ */ jsx43("span", { className: "w-3 text-sm text-gray-500", children: /* @__PURE__ */ jsx43(Icon, { icon: faArrowTurnDown }) })
2207
+ focused && !rest.disabled && /* @__PURE__ */ jsx48("span", { className: "w-3 text-sm text-muted", children: /* @__PURE__ */ jsx48(Icon, { icon: faArrowTurnDownLeft }) })
2051
2208
  ] });
2052
2209
  var SelectedItems = ({
2053
2210
  value = [],
@@ -2090,25 +2247,25 @@ var SelectedItems = ({
2090
2247
  onChange?.(newOrder);
2091
2248
  }
2092
2249
  };
2093
- return /* @__PURE__ */ jsx43(DndContext, { sensors, onDragEnd, children: /* @__PURE__ */ jsxs20(
2250
+ return /* @__PURE__ */ jsx48(DndContext, { sensors, onDragEnd, children: /* @__PURE__ */ jsxs22(
2094
2251
  SortableContext,
2095
2252
  {
2096
2253
  disabled: !ordered,
2097
2254
  items: filteredSelectedValues.map((v) => ({ id: v, value: v })),
2098
2255
  strategy: verticalListSortingStrategy,
2099
2256
  children: [
2100
- (filteredSelectedValues.length > numValuesToShow || onSelectAll) && /* @__PURE__ */ jsxs20("div", { className: "flex justify-between px-2 pt-1.5 pb-px text-sm", children: [
2101
- /* @__PURE__ */ jsxs20("span", { className: "font-medium text-gray-500", children: [
2257
+ (filteredSelectedValues.length > numValuesToShow || onSelectAll) && /* @__PURE__ */ jsxs22("div", { className: "flex justify-between px-2 pt-1.5 pb-px text-sm", children: [
2258
+ /* @__PURE__ */ jsxs22("span", { className: "font-medium text-muted", children: [
2102
2259
  value.length,
2103
2260
  " selected",
2104
2261
  filteredSelectedValues.length < value.length ? ` (showing ${filteredSelectedValues.length})` : ""
2105
2262
  ] }),
2106
- value.length > 0 ? /* @__PURE__ */ jsx43("span", { className: "cursor-pointer text-red-600 hover:underline", onClick: () => onChange?.([]), children: "Clear" }) : onSelectAll ? /* @__PURE__ */ jsx43("span", { className: "cursor-pointer text-indigo-700 hover:underline", onClick: onSelectAll, children: "Select all" }) : null
2263
+ value.length > 0 ? /* @__PURE__ */ jsx48("span", { className: "cursor-pointer text-danger hover:underline", onClick: () => onChange?.([]), children: "Clear" }) : onSelectAll ? /* @__PURE__ */ jsx48("span", { className: "cursor-pointer text-indigo-700 hover:underline", onClick: onSelectAll, children: "Select all" }) : null
2107
2264
  ] }),
2108
- filteredSelectedValues.length > 0 && /* @__PURE__ */ jsxs20(Fragment6, { children: [
2265
+ filteredSelectedValues.length > 0 && /* @__PURE__ */ jsxs22(Fragment6, { children: [
2109
2266
  filteredSelectedValues.slice(0, showAllValues ? value.length : numValuesToShow).map((val) => {
2110
2267
  const item = valueToOptionMap.get(val);
2111
- return /* @__PURE__ */ jsxs20(
2268
+ return /* @__PURE__ */ jsxs22(
2112
2269
  SelectListItem,
2113
2270
  {
2114
2271
  sortableId: ordered ? val : void 0,
@@ -2119,38 +2276,35 @@ var SelectedItems = ({
2119
2276
  }
2120
2277
  },
2121
2278
  children: [
2122
- !item ? val : item.display ?? /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
2279
+ !item ? val : item.display ?? /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
2123
2280
  item.icon,
2124
- /* @__PURE__ */ jsx43("span", { children: item.label })
2281
+ /* @__PURE__ */ jsx48("span", { children: item.label })
2125
2282
  ] }),
2126
- /* @__PURE__ */ jsx43("div", { className: "flex w-3 justify-center text-sm text-gray-500", children: /* @__PURE__ */ jsx43(
2127
- Icon,
2128
- {
2129
- icon: minSelection === 1 ? faCheck2 : faXmark2
2130
- }
2131
- ) })
2283
+ /* @__PURE__ */ jsx48("div", { className: "flex w-3 justify-center text-sm text-muted", children: /* @__PURE__ */ jsx48(Icon, { icon: minSelection === 1 ? faCheck2 : faTimes }) })
2132
2284
  ]
2133
2285
  },
2134
2286
  val
2135
2287
  );
2136
2288
  }),
2137
- filteredSelectedValues.length > numValuesToShow && /* @__PURE__ */ jsx43(
2138
- "div",
2289
+ filteredSelectedValues.length > numValuesToShow && /* @__PURE__ */ jsx48(
2290
+ Text,
2139
2291
  {
2140
- className: "cursor-pointer px-2 py-1 text-sm font-medium text-indigo-600",
2292
+ as: "span",
2293
+ variant: "label",
2141
2294
  onClick: () => setShowAllValues((prev) => !prev),
2295
+ className: "cursor-pointer px-2 py-1 text-indigo-600",
2142
2296
  children: showAllValues ? "Show less" : `Show ${filteredSelectedValues.length - numValuesToShow} more selected`
2143
2297
  }
2144
2298
  )
2145
2299
  ] }),
2146
- (filteredSelectedValues.length > 0 || onSelectAll) && /* @__PURE__ */ jsx43("li", { className: "py-0.5", children: /* @__PURE__ */ jsx43("hr", { className: "h-px bg-gray-200" }) })
2300
+ (filteredSelectedValues.length > 0 || onSelectAll) && /* @__PURE__ */ jsx48("li", { className: "py-0.5", children: /* @__PURE__ */ jsx48("hr", { className: "h-px bg-surface-dark" }) })
2147
2301
  ]
2148
2302
  }
2149
2303
  ) });
2150
2304
  };
2151
2305
 
2152
2306
  // src/core/select/AsyncSelect.tsx
2153
- import { jsx as jsx44 } from "react/jsx-runtime";
2307
+ import { jsx as jsx49 } from "react/jsx-runtime";
2154
2308
  var AsyncSelect = ({
2155
2309
  value,
2156
2310
  onChange,
@@ -2158,7 +2312,7 @@ var AsyncSelect = ({
2158
2312
  ...rest
2159
2313
  }) => {
2160
2314
  const multiValue = value ? [value] : [];
2161
- return /* @__PURE__ */ jsx44(
2315
+ return /* @__PURE__ */ jsx49(
2162
2316
  AsyncMultiSelect,
2163
2317
  {
2164
2318
  minSelection: allowUnselect ? 0 : 1,
@@ -2172,7 +2326,7 @@ var AsyncSelect = ({
2172
2326
 
2173
2327
  // src/core/select/MultiSelect.tsx
2174
2328
  import { useMemo as useMemo6, useState as useState9 } from "react";
2175
- import { jsx as jsx45 } from "react/jsx-runtime";
2329
+ import { jsx as jsx50 } from "react/jsx-runtime";
2176
2330
  var MultiSelect = ({
2177
2331
  value,
2178
2332
  items: options,
@@ -2199,7 +2353,7 @@ var MultiSelect = ({
2199
2353
  () => options.filter((option) => doesSelectItemMatch(option, query)),
2200
2354
  [query, options]
2201
2355
  );
2202
- return /* @__PURE__ */ jsx45(
2356
+ return /* @__PURE__ */ jsx50(
2203
2357
  AsyncMultiSelect,
2204
2358
  {
2205
2359
  value,
@@ -2214,10 +2368,10 @@ var MultiSelect = ({
2214
2368
  };
2215
2369
 
2216
2370
  // src/core/select/Select.tsx
2217
- import { jsx as jsx46 } from "react/jsx-runtime";
2371
+ import { jsx as jsx51 } from "react/jsx-runtime";
2218
2372
  function Select({ value, onChange, allowUnselect, ...rest }) {
2219
2373
  const multivalue = value || value === 0 ? [value] : [];
2220
- return /* @__PURE__ */ jsx46(
2374
+ return /* @__PURE__ */ jsx51(
2221
2375
  MultiSelect,
2222
2376
  {
2223
2377
  value: multivalue,
@@ -2230,14 +2384,14 @@ function Select({ value, onChange, allowUnselect, ...rest }) {
2230
2384
  }
2231
2385
 
2232
2386
  // src/core/select/SelectWtihUnselect.tsx
2233
- import { jsx as jsx47 } from "react/jsx-runtime";
2387
+ import { jsx as jsx52 } from "react/jsx-runtime";
2234
2388
  function SelectWithUnselect({
2235
2389
  value,
2236
2390
  onChange,
2237
2391
  ...rest
2238
2392
  }) {
2239
2393
  const multivalue = value || value === 0 ? [value] : [];
2240
- return /* @__PURE__ */ jsx47(
2394
+ return /* @__PURE__ */ jsx52(
2241
2395
  MultiSelect,
2242
2396
  {
2243
2397
  value: multivalue,
@@ -2250,7 +2404,7 @@ function SelectWithUnselect({
2250
2404
  }
2251
2405
 
2252
2406
  // src/core/form/components/FormSelect.tsx
2253
- import { jsx as jsx48 } from "react/jsx-runtime";
2407
+ import { jsx as jsx53 } from "react/jsx-runtime";
2254
2408
  var FormSelect = ({
2255
2409
  name,
2256
2410
  styles,
@@ -2260,7 +2414,7 @@ var FormSelect = ({
2260
2414
  onChange,
2261
2415
  ...rest
2262
2416
  }) => {
2263
- return /* @__PURE__ */ jsx48(
2417
+ return /* @__PURE__ */ jsx53(
2264
2418
  ControlledFormItem,
2265
2419
  {
2266
2420
  name,
@@ -2268,7 +2422,7 @@ var FormSelect = ({
2268
2422
  styles,
2269
2423
  label,
2270
2424
  options,
2271
- render: (field) => /* @__PURE__ */ jsx48(
2425
+ render: (field) => /* @__PURE__ */ jsx53(
2272
2426
  Select,
2273
2427
  {
2274
2428
  ...rest,
@@ -2285,7 +2439,7 @@ var FormSelect = ({
2285
2439
  };
2286
2440
 
2287
2441
  // src/core/form/components/FormMultiSelect.tsx
2288
- import { jsx as jsx49 } from "react/jsx-runtime";
2442
+ import { jsx as jsx54 } from "react/jsx-runtime";
2289
2443
  var FormMultiSelect = ({
2290
2444
  name,
2291
2445
  styles,
@@ -2295,7 +2449,7 @@ var FormMultiSelect = ({
2295
2449
  onChange,
2296
2450
  ...rest
2297
2451
  }) => {
2298
- return /* @__PURE__ */ jsx49(
2452
+ return /* @__PURE__ */ jsx54(
2299
2453
  ControlledFormItem,
2300
2454
  {
2301
2455
  name,
@@ -2303,7 +2457,7 @@ var FormMultiSelect = ({
2303
2457
  styles,
2304
2458
  label,
2305
2459
  options,
2306
- render: (field) => /* @__PURE__ */ jsx49(
2460
+ render: (field) => /* @__PURE__ */ jsx54(
2307
2461
  MultiSelect,
2308
2462
  {
2309
2463
  ...rest,
@@ -2323,18 +2477,18 @@ var FormMultiSelect = ({
2323
2477
  import { debounce } from "lodash-es";
2324
2478
 
2325
2479
  // src/core/textarea/TextArea.tsx
2326
- import { forwardRef as forwardRef14 } from "react";
2327
- import { twMerge as twMerge6 } from "tailwind-merge";
2328
- import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs21 } from "react/jsx-runtime";
2329
- var TextAreaComp = forwardRef14(({ className, hasError, ...rest }, ref) => {
2330
- const ringClassName = rest.disabled ? "focus:outline-hidden focus:ring-0" : hasError ? "focus:outline-hidden focus:ring-red-500 focus:border-red-500" : RING_COLOR_CLASSNAME;
2331
- return /* @__PURE__ */ jsx50(
2480
+ import { forwardRef as forwardRef15 } from "react";
2481
+ import { twMerge as twMerge8 } from "tailwind-merge";
2482
+ import { Fragment as Fragment7, jsx as jsx55, jsxs as jsxs23 } from "react/jsx-runtime";
2483
+ var TextAreaComp = forwardRef15(({ className, hasError, ...rest }, ref) => {
2484
+ const ringClassName = rest.disabled ? "focus:outline-hidden focus:ring-0" : hasError ? "focus:outline-hidden focus:ring-red-500 focus:border-red-500" : "focus:ring-2 focus:ring-indigo-200";
2485
+ return /* @__PURE__ */ jsx55(
2332
2486
  "textarea",
2333
2487
  {
2334
2488
  ...rest,
2335
- className: twMerge6(
2336
- "block w-full resize-none rounded-md shadow-sm disabled:bg-gray-100",
2337
- hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-gray-200 placeholder-gray-400 focus:border-indigo-400",
2489
+ className: twMerge8(
2490
+ "block w-full resize-none rounded-md shadow-sm disabled:bg-surface-neutral",
2491
+ hasError ? "border-red-300 text-red-900 placeholder-red-300" : "border-surface-neutral placeholder-gray-400 focus:border-indigo-400",
2338
2492
  ringClassName,
2339
2493
  className
2340
2494
  ),
@@ -2342,13 +2496,13 @@ var TextAreaComp = forwardRef14(({ className, hasError, ...rest }, ref) => {
2342
2496
  }
2343
2497
  );
2344
2498
  });
2345
- var TextArea = forwardRef14(({ hasError, errorNode, ...rest }, ref) => /* @__PURE__ */ jsxs21(Fragment7, { children: [
2346
- /* @__PURE__ */ jsx50(TextAreaComp, { ...rest, hasError, ref }),
2347
- hasError && /* @__PURE__ */ jsx50(ErrorText, { className: "mt-2 text-sm", children: errorNode })
2499
+ var TextArea = forwardRef15(({ hasError, errorNode, ...rest }, ref) => /* @__PURE__ */ jsxs23(Fragment7, { children: [
2500
+ /* @__PURE__ */ jsx55(TextAreaComp, { ...rest, hasError, ref }),
2501
+ hasError && /* @__PURE__ */ jsx55(ErrorText, { className: "mt-2 text-sm", children: errorNode })
2348
2502
  ] }));
2349
2503
 
2350
2504
  // src/core/form/components/FormTextArea.tsx
2351
- import { jsx as jsx51 } from "react/jsx-runtime";
2505
+ import { jsx as jsx56 } from "react/jsx-runtime";
2352
2506
  var FormTextArea = ({
2353
2507
  name,
2354
2508
  styles,
@@ -2357,20 +2511,20 @@ var FormTextArea = ({
2357
2511
  options,
2358
2512
  debounce: debounceInterval,
2359
2513
  ...rest
2360
- }) => /* @__PURE__ */ jsx51(
2514
+ }) => /* @__PURE__ */ jsx56(
2361
2515
  UncontrolledField,
2362
2516
  {
2363
2517
  name,
2364
2518
  render: ({ error, register }) => {
2365
2519
  const controlFields = register();
2366
- return /* @__PURE__ */ jsx51(
2520
+ return /* @__PURE__ */ jsx56(
2367
2521
  FormItem,
2368
2522
  {
2369
2523
  layout,
2370
2524
  styles,
2371
2525
  label,
2372
2526
  options,
2373
- render: /* @__PURE__ */ jsx51(
2527
+ render: /* @__PURE__ */ jsx56(
2374
2528
  TextArea,
2375
2529
  {
2376
2530
  ...controlFields,
@@ -2387,74 +2541,71 @@ var FormTextArea = ({
2387
2541
  );
2388
2542
 
2389
2543
  // src/core/form/components/FormSwitch.tsx
2390
- import { twJoin as twJoin19 } from "tailwind-merge";
2544
+ import { twJoin as twJoin22 } from "tailwind-merge";
2391
2545
 
2392
2546
  // src/core/switch/Switch.tsx
2393
2547
  import * as RadixSwitch from "@radix-ui/react-switch";
2394
- import * as React10 from "react";
2395
- import { jsx as jsx52 } from "react/jsx-runtime";
2396
- var SwitchIdContext = React10.createContext(void 0);
2397
- var useSwitchId = () => React10.useContext(SwitchIdContext);
2548
+ import * as React11 from "react";
2549
+ import { jsx as jsx57 } from "react/jsx-runtime";
2550
+ var SwitchIdContext = React11.createContext(void 0);
2551
+ var useSwitchId = () => React11.useContext(SwitchIdContext);
2398
2552
  var SwitchControl = (props) => {
2399
2553
  const id = useSwitchId();
2400
- return /* @__PURE__ */ jsx52(
2554
+ return /* @__PURE__ */ jsx57(
2401
2555
  RadixSwitch.Root,
2402
2556
  {
2403
2557
  ...props,
2404
2558
  id,
2405
- className: "flex h-5 w-9 shrink-0 items-center rounded-full bg-gray-200 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:bg-gray-100 data-[state=checked]:bg-indigo-700",
2406
- children: /* @__PURE__ */ jsx52(RadixSwitch.SwitchThumb, { className: "block h-4 w-4 translate-x-0.5 rounded-full bg-white duration-100 data-disabled:shadow-none data-[state=checked]:translate-x-[18px]" })
2559
+ className: "flex h-5 w-9 shrink-0 items-center rounded-full bg-surface-dark focus:outline-hidden focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:bg-surface-neutral data-[state=checked]:bg-indigo-700",
2560
+ children: /* @__PURE__ */ jsx57(RadixSwitch.Thumb, { className: "block h-4 w-4 translate-x-0.5 rounded-full bg-white duration-100 data-disabled:shadow-none data-[state=checked]:translate-x-[18px]" })
2407
2561
  }
2408
2562
  );
2409
2563
  };
2410
2564
  var SwitchLabel = (props) => {
2411
2565
  const id = useSwitchId();
2412
- return /* @__PURE__ */ jsx52("label", { ...props, htmlFor: id });
2566
+ return /* @__PURE__ */ jsx57("label", { ...props, htmlFor: id });
2413
2567
  };
2414
2568
  var Switch = ({ children, className, ...rest }) => {
2415
- const autoId = React10.useId();
2569
+ const autoId = React11.useId();
2416
2570
  if (children == null) {
2417
- return /* @__PURE__ */ jsx52(SwitchControl, { ...rest });
2571
+ return /* @__PURE__ */ jsx57(SwitchControl, { ...rest });
2418
2572
  }
2419
- return /* @__PURE__ */ jsx52(SwitchIdContext.Provider, { value: autoId, children: /* @__PURE__ */ jsx52("span", { className, children }) });
2573
+ return /* @__PURE__ */ jsx57(SwitchIdContext.Provider, { value: autoId, children: /* @__PURE__ */ jsx57("span", { className, children }) });
2420
2574
  };
2421
2575
  Switch.Control = SwitchControl;
2422
2576
  Switch.Label = SwitchLabel;
2423
2577
 
2424
2578
  // src/core/form/components/FormSwitch.tsx
2425
- import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
2579
+ import { jsx as jsx58, jsxs as jsxs24 } from "react/jsx-runtime";
2426
2580
  var FormSwitch = ({ name, styles, layout, label, options, onChange, ...props }) => {
2427
2581
  if (layout === "side-by-side") {
2428
- return /* @__PURE__ */ jsx53(
2582
+ return /* @__PURE__ */ jsx58(
2429
2583
  ControlledField,
2430
2584
  {
2431
2585
  name,
2432
- render: (field) => /* @__PURE__ */ jsxs22("div", { className: twJoin19("flex items-start gap-x-2", styles), children: [
2433
- /* @__PURE__ */ jsx53("div", { children: /* @__PURE__ */ jsx53(
2586
+ render: (field) => /* @__PURE__ */ jsxs24("div", { className: twJoin22("flex items-start gap-x-2", styles), children: [
2587
+ /* @__PURE__ */ jsx58("div", { children: /* @__PURE__ */ jsx58(
2434
2588
  Switch,
2435
2589
  {
2436
2590
  ...props,
2437
- checked: (
2438
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
2439
- field.value
2440
- ),
2591
+ checked: !!field.value,
2441
2592
  onCheckedChange: (value) => {
2442
2593
  field.onChange(value);
2443
2594
  onChange?.(value);
2444
2595
  }
2445
2596
  }
2446
2597
  ) }),
2447
- /* @__PURE__ */ jsxs22("div", { className: "pt-1", children: [
2448
- /* @__PURE__ */ jsx53(FieldLabelWithTooltip, { label, options }),
2449
- /* @__PURE__ */ jsx53(FieldDescription, { styles: "pt-0.5", children: options?.description }),
2450
- /* @__PURE__ */ jsx53(FieldErrorMessage, { error: field.error }),
2598
+ /* @__PURE__ */ jsxs24("div", { className: "pt-1", children: [
2599
+ /* @__PURE__ */ jsx58(FieldLabelWithTooltip, { label, options }),
2600
+ /* @__PURE__ */ jsx58(FieldDescription, { styles: "pt-0.5", children: options?.description }),
2601
+ /* @__PURE__ */ jsx58(FieldErrorMessage, { error: field.error }),
2451
2602
  options?.bottomSlot
2452
2603
  ] })
2453
2604
  ] })
2454
2605
  }
2455
2606
  );
2456
2607
  }
2457
- return /* @__PURE__ */ jsx53(
2608
+ return /* @__PURE__ */ jsx58(
2458
2609
  ControlledFormItem,
2459
2610
  {
2460
2611
  name,
@@ -2462,14 +2613,17 @@ var FormSwitch = ({ name, styles, layout, label, options, onChange, ...props })
2462
2613
  styles,
2463
2614
  label,
2464
2615
  options,
2465
- render: (field) => /* @__PURE__ */ jsx53(Switch, { ...props, checked: field.value, onCheckedChange: field.onChange })
2616
+ render: (field) => /* @__PURE__ */ jsx58(Switch, { ...props, checked: !!field.value, onCheckedChange: field.onChange })
2466
2617
  }
2467
2618
  );
2468
2619
  };
2469
2620
 
2621
+ // src/core/radio-button-group/RadioButtonGroup.tsx
2622
+ import { forwardRef as forwardRef16 } from "react";
2623
+
2470
2624
  // src/core/radio-button-group/RadioButtonItem.tsx
2471
- import { twJoin as twJoin20 } from "tailwind-merge";
2472
- import { Fragment as Fragment8, jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
2625
+ import { twJoin as twJoin23 } from "tailwind-merge";
2626
+ import { Fragment as Fragment8, jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
2473
2627
  var RadioButtonItem = ({
2474
2628
  value,
2475
2629
  displayValue,
@@ -2480,26 +2634,26 @@ var RadioButtonItem = ({
2480
2634
  isChecked,
2481
2635
  onSelect,
2482
2636
  asCard = false
2483
- }) => /* @__PURE__ */ jsxs23(
2637
+ }) => /* @__PURE__ */ jsxs25(
2484
2638
  "div",
2485
2639
  {
2486
- className: twJoin20(
2640
+ className: twJoin23(
2487
2641
  "flex flex-col gap-2",
2488
2642
  asCard && "rounded-md border px-3 py-2",
2489
- asCard && !isChecked && "border-gray-200",
2643
+ asCard && !isChecked && "border-surface-neutral",
2490
2644
  asCard && isChecked && "border-indigo-500"
2491
2645
  ),
2492
2646
  children: [
2493
- /* @__PURE__ */ jsxs23(
2647
+ /* @__PURE__ */ jsxs25(
2494
2648
  "div",
2495
2649
  {
2496
- className: twJoin20(
2650
+ className: twJoin23(
2497
2651
  "relative flex gap-2",
2498
2652
  disabled && "cursor-not-allowed opacity-30 *:cursor-not-allowed",
2499
2653
  expandedContentsStyle === "inline" ? "items-center" : "items-start"
2500
2654
  ),
2501
2655
  children: [
2502
- /* @__PURE__ */ jsx54(
2656
+ /* @__PURE__ */ jsx59(
2503
2657
  "input",
2504
2658
  {
2505
2659
  onChange: (evt) => onSelect?.(evt.target.value),
@@ -2508,21 +2662,21 @@ var RadioButtonItem = ({
2508
2662
  checked: isChecked,
2509
2663
  disabled,
2510
2664
  type: "radio",
2511
- className: "mt-px border-gray-200 p-2 text-indigo-700 ring-0 ring-indigo-700"
2665
+ className: "mt-px border-surface-neutral p-2 text-indigo-700 ring-0 ring-indigo-700"
2512
2666
  }
2513
2667
  ),
2514
- expandedContentsStyle === "inline" ? /* @__PURE__ */ jsxs23("label", { htmlFor: value, className: "flex w-full flex-row gap-2.5", children: [
2515
- /* @__PURE__ */ jsxs23("div", { className: "flex w-9/12 items-center gap-2", children: [
2516
- /* @__PURE__ */ jsx54("div", { className: "font-medium", children: displayValue }),
2517
- description && /* @__PURE__ */ jsx54("div", { id: `${value}-description`, className: "text-gray-500", children: description })
2668
+ expandedContentsStyle === "inline" ? /* @__PURE__ */ jsxs25("label", { htmlFor: value, className: "flex w-full flex-row gap-2.5", children: [
2669
+ /* @__PURE__ */ jsxs25("div", { className: "flex w-9/12 items-center gap-2", children: [
2670
+ /* @__PURE__ */ jsx59("div", { className: "font-medium", children: displayValue }),
2671
+ description && /* @__PURE__ */ jsx59("div", { id: `${value}-description`, className: "text-muted", children: description })
2518
2672
  ] }),
2519
- /* @__PURE__ */ jsx54("div", { className: "flex w-3/12 items-center", children: expandedContents?.(!isChecked || !!disabled) })
2520
- ] }) : /* @__PURE__ */ jsx54("label", { htmlFor: value, className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx54("div", { className: "font-medium", children: displayValue }) })
2673
+ /* @__PURE__ */ jsx59("div", { className: "flex w-3/12 items-center", children: expandedContents?.(!isChecked || !!disabled) })
2674
+ ] }) : /* @__PURE__ */ jsx59("label", { htmlFor: value, className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx59("div", { className: "font-medium", children: displayValue }) })
2521
2675
  ]
2522
2676
  }
2523
2677
  ),
2524
- expandedContentsStyle !== "inline" && /* @__PURE__ */ jsxs23(Fragment8, { children: [
2525
- description && /* @__PURE__ */ jsx54("div", { id: `${value}-description`, className: "text-gray-500", children: description }),
2678
+ expandedContentsStyle !== "inline" && /* @__PURE__ */ jsxs25(Fragment8, { children: [
2679
+ description && /* @__PURE__ */ jsx59("div", { id: `${value}-description`, className: "text-muted", children: description }),
2526
2680
  expandedContents?.(!isChecked || !!disabled)
2527
2681
  ] })
2528
2682
  ]
@@ -2530,39 +2684,41 @@ var RadioButtonItem = ({
2530
2684
  );
2531
2685
 
2532
2686
  // src/core/radio-button-group/RadioButtonGroup.tsx
2533
- import { jsx as jsx55 } from "react/jsx-runtime";
2534
- var RadioButtonGroup = ({ className, items, onChange, value, asCards = false }) => /* @__PURE__ */ jsx55("fieldset", { className, children: /* @__PURE__ */ jsx55("div", { className: "space-y-3", children: items.map(
2535
- ({ value: itemValue, displayValue, description, expandedContents, expandedContentsStyle, disabled }, index) => /* @__PURE__ */ jsx55(
2536
- RadioButtonItem,
2537
- {
2538
- disabled,
2539
- onSelect: onChange,
2540
- isChecked: value === itemValue,
2541
- value: itemValue,
2542
- displayValue,
2543
- description,
2544
- expandedContents,
2545
- expandedContentsStyle,
2546
- asCard: asCards
2547
- },
2548
- index
2549
- )
2550
- ) }) });
2687
+ import { jsx as jsx60 } from "react/jsx-runtime";
2688
+ var RadioButtonGroup = forwardRef16(
2689
+ ({ className, items, onChange, value, asCards = false }, ref) => /* @__PURE__ */ jsx60("fieldset", { ref, className, children: /* @__PURE__ */ jsx60("div", { className: "space-y-3", children: items.map(
2690
+ ({ value: itemValue, displayValue, description, expandedContents, expandedContentsStyle, disabled }, index) => /* @__PURE__ */ jsx60(
2691
+ RadioButtonItem,
2692
+ {
2693
+ disabled,
2694
+ onSelect: onChange,
2695
+ isChecked: value === itemValue,
2696
+ value: itemValue,
2697
+ displayValue,
2698
+ description,
2699
+ expandedContents,
2700
+ expandedContentsStyle,
2701
+ asCard: asCards
2702
+ },
2703
+ index
2704
+ )
2705
+ ) }) })
2706
+ );
2551
2707
 
2552
2708
  // src/core/form/components/FormRadioButtonGroup.tsx
2553
- import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs24 } from "react/jsx-runtime";
2709
+ import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs26 } from "react/jsx-runtime";
2554
2710
  var FormRadioButtonGroup = ({
2555
2711
  name,
2556
2712
  items,
2557
2713
  onChange,
2558
2714
  asCards = false,
2559
2715
  className
2560
- }) => /* @__PURE__ */ jsx56(
2716
+ }) => /* @__PURE__ */ jsx61(
2561
2717
  ControlledField,
2562
2718
  {
2563
2719
  name,
2564
- render: (field) => /* @__PURE__ */ jsxs24(Fragment9, { children: [
2565
- /* @__PURE__ */ jsx56(
2720
+ render: (field) => /* @__PURE__ */ jsxs26(Fragment9, { children: [
2721
+ /* @__PURE__ */ jsx61(
2566
2722
  RadioButtonGroup,
2567
2723
  {
2568
2724
  ...field,
@@ -2575,15 +2731,15 @@ var FormRadioButtonGroup = ({
2575
2731
  asCards
2576
2732
  }
2577
2733
  ),
2578
- /* @__PURE__ */ jsx56(FieldErrorMessage, { error: field.error })
2734
+ /* @__PURE__ */ jsx61(FieldErrorMessage, { error: field.error })
2579
2735
  ] })
2580
2736
  }
2581
2737
  );
2582
2738
 
2583
2739
  // src/core/form/components/FormDatePicker.tsx
2584
2740
  import { useCallback as useCallback7 } from "react";
2585
- import { twJoin as twJoin21 } from "tailwind-merge";
2586
- import { jsx as jsx57 } from "react/jsx-runtime";
2741
+ import { twJoin as twJoin24 } from "tailwind-merge";
2742
+ import { jsx as jsx62 } from "react/jsx-runtime";
2587
2743
  var FormDatePicker = ({
2588
2744
  name,
2589
2745
  styles,
@@ -2608,7 +2764,7 @@ var FormDatePicker = ({
2608
2764
  },
2609
2765
  [onChangeInternal, onChange]
2610
2766
  );
2611
- return /* @__PURE__ */ jsx57(
2767
+ return /* @__PURE__ */ jsx62(
2612
2768
  FormItem,
2613
2769
  {
2614
2770
  layout,
@@ -2616,7 +2772,7 @@ var FormDatePicker = ({
2616
2772
  label,
2617
2773
  options,
2618
2774
  ref: containerRef,
2619
- render: /* @__PURE__ */ jsx57("div", { className: twJoin21(disabled && "text-gray-500"), children: /* @__PURE__ */ jsx57(
2775
+ render: /* @__PURE__ */ jsx62("div", { className: twJoin24(disabled && "text-muted"), children: /* @__PURE__ */ jsx62(
2620
2776
  DatePicker,
2621
2777
  {
2622
2778
  ...rest,
@@ -2634,114 +2790,81 @@ var FormDatePicker = ({
2634
2790
  );
2635
2791
  };
2636
2792
 
2637
- // src/core/form/components/schemas/currency-schemas.ts
2638
- import { z } from "zod";
2639
- var CURRENCY_REGEX = /^-?(?:\d{1,3}(?:,\d{3})*|\d+|\.\d{1,2})(?:\.\d{1,2})?$/;
2640
- var DOLLARS_STR_ERROR_MESSAGE = "Must use dollars and cents or whole numbers.";
2641
- var dollarsStrSchema = z.string().regex(CURRENCY_REGEX, DOLLARS_STR_ERROR_MESSAGE);
2642
- var requiredDollarsStrSchema = z.string().trim().nonempty("Required").regex(CURRENCY_REGEX, DOLLARS_STR_ERROR_MESSAGE);
2643
- var requiredDollarsStrSchemaWithCustomMessage = (requiredError, invalidTypeError) => z.string().trim().nonempty(requiredError).regex(CURRENCY_REGEX, invalidTypeError);
2644
- var requiredNonZeroDollarsStrSchema = requiredDollarsStrSchema.refine(
2645
- (value) => parseFloat(value) !== 0,
2646
- "Amount cannot be $0.00"
2647
- );
2648
- var requiredPositiveDollarsStrSchema = requiredDollarsStrSchema.refine(
2649
- (value) => parseFloat(value) > 0,
2650
- "Amount must be greater than $0.00"
2651
- );
2652
- var requiredPositiveOrZeroDollarsStrSchema = requiredDollarsStrSchema.refine(
2653
- (value) => parseFloat(value) >= 0,
2654
- "Amount must be greater than or equal to $0.00"
2655
- );
2656
-
2657
- // src/core/form/components/schemas/form-schemas.ts
2658
- import { z as z3 } from "zod";
2659
-
2660
- // src/core/form/components/schemas/helper-schemas.ts
2661
- import { z as z2 } from "zod";
2662
- var asOptional = (schema) => z2.union([
2663
- // order is important: the empty-like literals must precede actual schema
2664
- z2.literal(null).transform(() => void 0),
2665
- z2.literal("").transform(() => void 0),
2666
- z2.string().trim().transform((val) => val === "" ? void 0 : val).pipe(z2.undefined()),
2667
- schema.optional()
2668
- ]);
2669
- var asNullish = (schema) => z2.union([
2670
- // order is important: the empty-like literals must precede actual schema
2671
- z2.literal(null).transform(() => void 0),
2672
- z2.literal("").transform(() => void 0),
2673
- z2.string().trim().transform((val) => val === "" ? void 0 : val).pipe(z2.undefined()),
2674
- schema.nullish()
2675
- ]);
2676
- var asNumericStr = (schema, message = "Only numbers allowed") => schema.regex(/^\d+$/i, message);
2677
- var asRequiredCustom = (message = "Required") => {
2678
- return z2.custom((value) => {
2679
- if (value == null || typeof value !== "object") {
2680
- return !!value;
2681
- }
2682
- if (Array.isArray(value)) {
2683
- return value.length > 0;
2684
- }
2685
- return Object.keys(value).length > 0;
2686
- }, message);
2687
- };
2688
-
2689
- // src/core/form/components/schemas/form-schemas.ts
2690
- var npiSchema = asNumericStr(z3.string().trim().nonempty("Required").length(10, "Must have 10 numbers"));
2691
- var npiSchemaOptional = asOptional(asNumericStr(z3.string().trim()).length(10, "Must have 10 numbers"));
2692
- var taxonomyCodeSchema = z3.string().trim().nonempty("Must contain characters, not just whitespace").length(10, "Must have 10 characters");
2693
- var TAX_ID_REGEX = /^(([0-9]{9})|([0-9]{3}-[0-9]{2}-[0-9]{4})|([0-9]{2}-[0-9]{7}))$/i;
2694
- var taxIdSchema = z3.string().trim().nonempty("Required").regex(TAX_ID_REGEX, "Must have 9 numbers formatted: XXXXXXXXX or XXX-XX-XXXX or XX-XXXXXXX");
2695
-
2696
- // src/core/form/components/schemas/selected-amount-schema.ts
2697
- import { z as z4 } from "zod";
2698
- var selectedAmountSchema = z4.object({
2699
- selected: asOptional(z4.boolean()),
2700
- amountStr: asOptional(dollarsStrSchema)
2701
- });
2702
-
2703
- // src/core/form/components/schemas/utils.ts
2704
- import { z as z5 } from "zod";
2705
- var buildZodIssue = (path, message) => ({
2706
- path: Array.isArray(path) ? path : [path],
2707
- message,
2708
- code: z5.ZodIssueCode.custom
2709
- });
2710
-
2711
2793
  // src/core/drawer/Drawer.tsx
2712
- import { forwardRef as forwardRef15, Suspense, useEffect as useEffect6, useRef as useRef6 } from "react";
2713
- import { twJoin as twJoin23 } from "tailwind-merge";
2794
+ import { forwardRef as forwardRef17, Suspense, useEffect as useEffect6, useRef as useRef6 } from "react";
2795
+ import { twJoin as twJoin26 } from "tailwind-merge";
2714
2796
 
2715
2797
  // src/core/loaders/Spinner.tsx
2716
- import { faSpinner } from "@fortawesome/free-solid-svg-icons";
2717
2798
  import { FontAwesomeIcon as FontAwesomeIcon2 } from "@fortawesome/react-fontawesome";
2718
- import { twJoin as twJoin22 } from "tailwind-merge";
2719
- import { jsx as jsx58 } from "react/jsx-runtime";
2720
- var Spinner = ({ className, ...props }) => /* @__PURE__ */ jsx58(
2721
- FontAwesomeIcon2,
2722
- {
2723
- ...props,
2724
- className: twJoin22("animate-spin text-gray-400", className),
2725
- icon: faSpinner
2726
- }
2727
- );
2799
+ import { faSpinnerThird } from "@fortawesome/sharp-solid-svg-icons";
2800
+ import { twJoin as twJoin25 } from "tailwind-merge";
2801
+ import { jsx as jsx63 } from "react/jsx-runtime";
2802
+ var Spinner = ({ className, ...props }) => /* @__PURE__ */ jsx63(FontAwesomeIcon2, { ...props, className: twJoin25("animate-spin text-muted", className), icon: faSpinnerThird });
2728
2803
 
2729
2804
  // src/core/loaders/LoadingState.tsx
2730
- import { jsx as jsx59 } from "react/jsx-runtime";
2731
- var LoadingStateTemplate = ({ children }) => /* @__PURE__ */ jsx59("div", { className: "inset-0 z-10 flex h-full items-center justify-center", children });
2732
- var LoadingState = ({ size = "2x" }) => /* @__PURE__ */ jsx59(LoadingStateTemplate, { children: /* @__PURE__ */ jsx59(Spinner, { size }) });
2805
+ import { jsx as jsx64, jsxs as jsxs27 } from "react/jsx-runtime";
2806
+ var LoadingStateTemplate = ({ children }) => /* @__PURE__ */ jsx64("div", { className: "inset-0 z-10 flex h-full items-center justify-center", children });
2807
+ var LoadingState = ({ size = "2x", title, description }) => /* @__PURE__ */ jsx64(LoadingStateTemplate, { children: /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2808
+ /* @__PURE__ */ jsx64(Spinner, { size }),
2809
+ (title || description) && /* @__PURE__ */ jsxs27("div", { className: "flex max-w-prose flex-col text-center", children: [
2810
+ title && /* @__PURE__ */ jsx64(Text, { variant: "title-3", className: "text-muted", children: title }),
2811
+ description && /* @__PURE__ */ jsx64(Text, { variant: "footnote", className: "leading-5 text-muted", children: description })
2812
+ ] })
2813
+ ] }) });
2733
2814
 
2734
2815
  // src/core/loaders/LoadingBar.tsx
2735
- import { twMerge as twMerge7 } from "tailwind-merge";
2736
- import { jsx as jsx60 } from "react/jsx-runtime";
2737
- var LoadingBar = ({ className }) => /* @__PURE__ */ jsx60("div", { className: twMerge7("relative h-3 w-full overflow-hidden rounded-full bg-gray-100", className), children: /* @__PURE__ */ jsx60(
2816
+ import { twMerge as twMerge9 } from "tailwind-merge";
2817
+ import { jsx as jsx65 } from "react/jsx-runtime";
2818
+ var LoadingBar = ({ className }) => /* @__PURE__ */ jsx65("div", { className: twMerge9("relative h-3 w-full overflow-hidden rounded-full bg-surface-neutral", className), children: /* @__PURE__ */ jsx65(
2738
2819
  "div",
2739
2820
  {
2740
- className: "absolute inset-0 w-full animate-loading-slide bg-gradient-to-r from-transparent via-indigo-400/60 to-transparent",
2821
+ className: "absolute inset-0 w-full animate-loading-slide bg-linear-to-r from-transparent via-indigo-400/60 to-transparent",
2741
2822
  style: { width: "50%" }
2742
2823
  }
2743
2824
  ) });
2744
2825
 
2826
+ // src/core/loaders/TwoCirclesSpinner.tsx
2827
+ import { twMerge as twMerge10 } from "tailwind-merge";
2828
+ import { jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
2829
+ var sizeConfig = {
2830
+ sm: { className: "w-[30px] h-[30px]", strokeWidth: 8 },
2831
+ md: { className: "w-[50px] h-[50px]", strokeWidth: 5 },
2832
+ lg: { className: "w-[100px] h-[100px]", strokeWidth: 3 },
2833
+ xl: { className: "w-[200px] h-[200px]", strokeWidth: 2 }
2834
+ };
2835
+ var SpinnerSvg = ({ size = "md" }) => {
2836
+ const { className: sizeClass, strokeWidth } = sizeConfig[size];
2837
+ return /* @__PURE__ */ jsxs28("div", { className: twMerge10("relative", sizeClass), children: [
2838
+ /* @__PURE__ */ jsx66("svg", { className: "absolute inset-0 animate-orbit-large", viewBox: "0 0 100 100", fill: "none", children: /* @__PURE__ */ jsx66(
2839
+ "path",
2840
+ {
2841
+ d: "M 95 50 A 45 45 0 0 1 5 50",
2842
+ stroke: "currentColor",
2843
+ strokeWidth,
2844
+ strokeLinecap: "round",
2845
+ className: "text-indigo-600"
2846
+ }
2847
+ ) }),
2848
+ /* @__PURE__ */ jsx66("svg", { className: "absolute inset-0 animate-orbit-small", viewBox: "0 0 100 100", fill: "none", children: /* @__PURE__ */ jsx66(
2849
+ "path",
2850
+ {
2851
+ d: "M 75 50 A 25 25 0 0 1 25 50",
2852
+ stroke: "currentColor",
2853
+ strokeWidth,
2854
+ strokeLinecap: "round",
2855
+ className: "text-gray-200"
2856
+ }
2857
+ ) })
2858
+ ] });
2859
+ };
2860
+ var TwoCirclesSpinner = ({ className, size = "md", title, description }) => /* @__PURE__ */ jsxs28("div", { className: twMerge10("flex flex-col items-center justify-center gap-3", className), children: [
2861
+ /* @__PURE__ */ jsx66(SpinnerSvg, { size }),
2862
+ (title || description) && /* @__PURE__ */ jsxs28("div", { className: "flex max-w-prose flex-col text-center", children: [
2863
+ title && /* @__PURE__ */ jsx66(Text, { variant: "title-3", className: "text-muted", children: title }),
2864
+ description && /* @__PURE__ */ jsx66(Text, { variant: "footnote", className: "leading-5 text-muted", children: description })
2865
+ ] })
2866
+ ] });
2867
+
2745
2868
  // src/core/drawer/drawerState.ts
2746
2869
  import { createContext as createContext5, useContext as useContext5 } from "react";
2747
2870
  var DrawerStateContext = createContext5({
@@ -2865,7 +2988,7 @@ var useDrawerResize = ({ slider, drawer, isOpen, defaultSizePct, persistWidth })
2865
2988
  };
2866
2989
 
2867
2990
  // src/core/drawer/Drawer.tsx
2868
- import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
2991
+ import { jsx as jsx67, jsxs as jsxs29 } from "react/jsx-runtime";
2869
2992
  var useKeypress = (key, action) => {
2870
2993
  useEffect6(() => {
2871
2994
  const onKeyup = (e) => {
@@ -2880,7 +3003,7 @@ var drawerSizes = {
2880
3003
  md: 3 / 4,
2881
3004
  lg: 5 / 6
2882
3005
  };
2883
- var Drawer = forwardRef15(
3006
+ var Drawer = forwardRef17(
2884
3007
  ({ isOpen, onClose, onClickOutside, blurredOverlay, children, width = "md", persistWidth }, ref) => {
2885
3008
  const slider = useRef6(null);
2886
3009
  const drawer = useRef6(null);
@@ -2894,7 +3017,7 @@ var Drawer = forwardRef15(
2894
3017
  useKeypress("Escape", () => {
2895
3018
  onClose?.();
2896
3019
  });
2897
- return /* @__PURE__ */ jsxs25(
3020
+ return /* @__PURE__ */ jsxs29(
2898
3021
  DrawerStateContext.Provider,
2899
3022
  {
2900
3023
  value: {
@@ -2902,43 +3025,43 @@ var Drawer = forwardRef15(
2902
3025
  onClose: () => onClose?.()
2903
3026
  },
2904
3027
  children: [
2905
- /* @__PURE__ */ jsx61(
3028
+ /* @__PURE__ */ jsx67(
2906
3029
  "div",
2907
3030
  {
2908
- className: twJoin23(
3031
+ className: twJoin26(
2909
3032
  "absolute inset-0 z-30 transition-all",
2910
- isOpen && blurredOverlay && "bg-gray-500/10 backdrop-blur-sm",
3033
+ isOpen && blurredOverlay && "bg-surface-light0/10 backdrop-blur-sm",
2911
3034
  // If the drawer is open, and the blurredOverlay prop is given, stop the user from clicking through the overlay
2912
3035
  isOpen && blurredOverlay ? "pointer-events-auto" : "pointer-events-none"
2913
3036
  ),
2914
3037
  onClick: onClickOutside
2915
3038
  }
2916
3039
  ),
2917
- /* @__PURE__ */ jsx61(
3040
+ /* @__PURE__ */ jsx67(
2918
3041
  "div",
2919
3042
  {
2920
3043
  ref: slider,
2921
- className: twJoin23(
3044
+ className: twJoin26(
2922
3045
  "group absolute top-0 bottom-0 z-50 h-screen w-4 translate-x-1/2 cursor-col-resize",
2923
3046
  isOpen ? "block" : "hidden"
2924
3047
  ),
2925
- children: /* @__PURE__ */ jsx61("div", { className: "absolute top-0 right-1.5 bottom-0 left-1.5 bg-indigo-700 opacity-0 transition-opacity group-hover:opacity-100" })
3048
+ children: /* @__PURE__ */ jsx67("div", { className: "absolute top-0 right-1.5 bottom-0 left-1.5 bg-indigo-700 opacity-0 transition-opacity group-hover:opacity-100" })
2926
3049
  }
2927
3050
  ),
2928
- /* @__PURE__ */ jsx61(
3051
+ /* @__PURE__ */ jsx67(
2929
3052
  "div",
2930
3053
  {
2931
- className: "absolute top-0 right-0 bottom-0 z-drawer flex flex-col overflow-y-hidden bg-gray-50 shadow",
3054
+ className: "absolute top-0 right-0 bottom-0 z-drawer flex flex-col overflow-y-hidden bg-surface-light shadow",
2932
3055
  ref: drawer,
2933
- children: /* @__PURE__ */ jsx61(
3056
+ children: /* @__PURE__ */ jsx67(
2934
3057
  "div",
2935
3058
  {
2936
3059
  ref,
2937
- className: twJoin23(
3060
+ className: twJoin26(
2938
3061
  "relative flex w-full flex-1 flex-col overflow-hidden bg-white transition-all delay-100 duration-100 ease-in-out",
2939
3062
  isOpen ? "opacity-100" : "opacity-0"
2940
3063
  ),
2941
- children: isOpen ? /* @__PURE__ */ jsx61(Suspense, { fallback: /* @__PURE__ */ jsx61(LoadingState, {}), children }) : void 0
3064
+ children: isOpen ? /* @__PURE__ */ jsx67(Suspense, { fallback: /* @__PURE__ */ jsx67(LoadingState, {}), children }) : void 0
2942
3065
  }
2943
3066
  )
2944
3067
  }
@@ -2950,47 +3073,24 @@ var Drawer = forwardRef15(
2950
3073
  );
2951
3074
 
2952
3075
  // src/core/drawer/DrawerHeader.tsx
2953
- import { faBookmark, faChevronDown as faChevronDown4, faChevronUp, faXmark as faXmark3 } from "@fortawesome/free-solid-svg-icons";
2954
- import { twJoin as twJoin27 } from "tailwind-merge";
2955
-
2956
- // src/core/text/Text.tsx
2957
- import { twJoin as twJoin24 } from "tailwind-merge";
2958
- import { jsx as jsx62 } from "react/jsx-runtime";
2959
- var VARIANT_STYLES = {
2960
- "marketing-headline": "text-marketing-headline",
2961
- "headline-1": "text-headline-1",
2962
- "headline-2": "text-headline-2",
2963
- "headline-3": "text-headline-3",
2964
- "headline-4": "text-headline-4",
2965
- "title-1": "text-title-1",
2966
- "title-2": "text-title-2",
2967
- "title-3": "text-title-3",
2968
- "body-1": "text-body-1",
2969
- "body-2": "text-body-2",
2970
- label: "text-label",
2971
- footnote: "text-footnote",
2972
- smallcaps: "text-smallcaps"
2973
- };
2974
- var Text = ({ as, variant = "body-1", children, className, ...props }) => {
2975
- const Tag2 = as ?? "p";
2976
- return /* @__PURE__ */ jsx62(Tag2, { ...props, className: twJoin24(VARIANT_STYLES[variant], className), children });
2977
- };
3076
+ import { faBookmark, faChevronDown as faChevronDown4, faChevronUp, faClose } from "@fortawesome/sharp-solid-svg-icons";
3077
+ import { twJoin as twJoin29 } from "tailwind-merge";
2978
3078
 
2979
3079
  // src/core/skeleton/Skeleton.tsx
2980
- import { twMerge as twMerge8 } from "tailwind-merge";
2981
- import { jsx as jsx63 } from "react/jsx-runtime";
2982
- var Skeleton = ({ className }) => /* @__PURE__ */ jsx63("div", { className: twMerge8("animate-skeleton-pulse rounded-lg bg-gray-200", className) });
3080
+ import { twMerge as twMerge11 } from "tailwind-merge";
3081
+ import { jsx as jsx68 } from "react/jsx-runtime";
3082
+ var Skeleton = ({ className }) => /* @__PURE__ */ jsx68("div", { className: twMerge11("animate-skeleton-pulse rounded-lg bg-surface-dark", className) });
2983
3083
 
2984
3084
  // src/core/skeleton/TabsSkeleton/TabsSkeleton.tsx
2985
- import { twMerge as twMerge9 } from "tailwind-merge";
2986
- import { jsx as jsx64 } from "react/jsx-runtime";
3085
+ import { twMerge as twMerge12 } from "tailwind-merge";
3086
+ import { jsx as jsx69 } from "react/jsx-runtime";
2987
3087
  var TabsSkeleton = ({ numTabs = 3, className, tabClassName = "h-8 w-32" }) => {
2988
- return /* @__PURE__ */ jsx64("div", { className: twMerge9("flex gap-4", className), children: Array.from({ length: numTabs }).map((_, index) => /* @__PURE__ */ jsx64(Skeleton, { className: tabClassName }, index)) });
3088
+ return /* @__PURE__ */ jsx69("div", { className: twMerge12("flex gap-4", className), children: Array.from({ length: numTabs }).map((_, index) => /* @__PURE__ */ jsx69(Skeleton, { className: tabClassName }, index)) });
2989
3089
  };
2990
3090
 
2991
3091
  // src/core/skeleton/TableSkeleton/TableSkeleton.tsx
2992
- import { twJoin as twJoin25 } from "tailwind-merge";
2993
- import { jsx as jsx65 } from "react/jsx-runtime";
3092
+ import { twJoin as twJoin27 } from "tailwind-merge";
3093
+ import { jsx as jsx70 } from "react/jsx-runtime";
2994
3094
  var TableSkeleton = ({
2995
3095
  numTableCols = 4,
2996
3096
  numTableRows = 3,
@@ -2998,13 +3098,13 @@ var TableSkeleton = ({
2998
3098
  rowHeight,
2999
3099
  hasBorder = false
3000
3100
  }) => {
3001
- return /* @__PURE__ */ jsx65("table", { className: twJoin25("flex w-full flex-col gap-4", className), children: /* @__PURE__ */ jsx65("tbody", { className: twJoin25("flex flex-col", rowHeight === void 0 && "gap-4"), children: Array.from({ length: numTableRows }).map((_, index) => /* @__PURE__ */ jsx65(
3101
+ return /* @__PURE__ */ jsx70("table", { className: twJoin27("flex w-full flex-col gap-4", className), children: /* @__PURE__ */ jsx70("tbody", { className: twJoin27("flex flex-col", rowHeight === void 0 && "gap-4"), children: Array.from({ length: numTableRows }).map((_, index) => /* @__PURE__ */ jsx70(
3002
3102
  "tr",
3003
3103
  {
3004
- className: twJoin25("flex gap-4", hasBorder && "px-2 not-last:border-b"),
3104
+ className: twJoin27("flex gap-4", hasBorder && "px-2 not-last:border-b"),
3005
3105
  style: rowHeight ? { height: rowHeight } : void 0,
3006
3106
  children: Array.from({ length: numTableCols }).map((_2, index2) => {
3007
- return /* @__PURE__ */ jsx65("td", { className: "flex grow items-center px-1", children: /* @__PURE__ */ jsx65(Skeleton, { className: twJoin25("w-full", rowHeight ? "h-3" : "h-6") }, index2) }, index2);
3107
+ return /* @__PURE__ */ jsx70("td", { className: "flex grow items-center px-1", children: /* @__PURE__ */ jsx70(Skeleton, { className: twJoin27("w-full", rowHeight ? "h-3" : "h-6") }, index2) }, index2);
3008
3108
  })
3009
3109
  },
3010
3110
  index
@@ -3012,27 +3112,27 @@ var TableSkeleton = ({
3012
3112
  };
3013
3113
 
3014
3114
  // src/core/skeleton/TableSkeleton/TableCheckboxSkeleton.tsx
3015
- import { twJoin as twJoin26 } from "tailwind-merge";
3016
- import { jsx as jsx66 } from "react/jsx-runtime";
3115
+ import { twJoin as twJoin28 } from "tailwind-merge";
3116
+ import { jsx as jsx71 } from "react/jsx-runtime";
3017
3117
  var TableCheckboxSkeleton = ({
3018
3118
  numTableRows = 3,
3019
3119
  className,
3020
3120
  rowHeight,
3021
3121
  hasBorder = false
3022
3122
  }) => {
3023
- return /* @__PURE__ */ jsx66("table", { className: twJoin26("flex w-full flex-col gap-4", className), children: /* @__PURE__ */ jsx66("tbody", { className: twJoin26("flex flex-col", rowHeight === void 0 && "gap-4"), children: Array.from({ length: numTableRows }).map((_, index) => /* @__PURE__ */ jsx66(
3123
+ return /* @__PURE__ */ jsx71("table", { className: twJoin28("flex w-full flex-col gap-4", className), children: /* @__PURE__ */ jsx71("tbody", { className: twJoin28("flex flex-col", rowHeight === void 0 && "gap-4"), children: Array.from({ length: numTableRows }).map((_, index) => /* @__PURE__ */ jsx71(
3024
3124
  "tr",
3025
3125
  {
3026
- className: twJoin26("flex gap-4", hasBorder && "px-2 not-last:border-b"),
3126
+ className: twJoin28("flex gap-4", hasBorder && "px-2 not-last:border-b"),
3027
3127
  style: rowHeight ? { height: rowHeight } : void 0,
3028
- children: /* @__PURE__ */ jsx66("td", { className: "flex grow items-center px-1", children: /* @__PURE__ */ jsx66(Skeleton, { className: twJoin26("w-full, rounded-none", rowHeight ? "h-3" : "h-6") }, index) }, index)
3128
+ children: /* @__PURE__ */ jsx71("td", { className: "flex grow items-center px-1", children: /* @__PURE__ */ jsx71(Skeleton, { className: twJoin28("w-full, rounded-none", rowHeight ? "h-3" : "h-6") }, index) }, index)
3029
3129
  },
3030
3130
  index
3031
3131
  )) }) });
3032
3132
  };
3033
3133
 
3034
3134
  // src/core/drawer/DrawerHeader.tsx
3035
- import { Fragment as Fragment10, jsx as jsx67, jsxs as jsxs26 } from "react/jsx-runtime";
3135
+ import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs30 } from "react/jsx-runtime";
3036
3136
  var DrawerHeader = ({
3037
3137
  resource,
3038
3138
  pagination,
@@ -3043,67 +3143,67 @@ var DrawerHeader = ({
3043
3143
  label
3044
3144
  }) => {
3045
3145
  const { onClose } = useDrawer();
3046
- return /* @__PURE__ */ jsxs26("div", { className: "z-1 flex w-full flex-col items-stretch shadow", children: [
3047
- /* @__PURE__ */ jsxs26("div", { className: "flex justify-between px-8 py-1 shadow-sm", children: [
3048
- /* @__PURE__ */ jsx67("div", { className: "flex items-center gap-1.5 text-base text-gray-500", children: resource && /* @__PURE__ */ jsxs26(Fragment10, { children: [
3049
- /* @__PURE__ */ jsx67(Icon, { icon: resource.icon || faBookmark }),
3050
- /* @__PURE__ */ jsx67("div", { children: resource.name })
3146
+ return /* @__PURE__ */ jsxs30("div", { className: "z-1 flex w-full flex-col items-stretch shadow", children: [
3147
+ /* @__PURE__ */ jsxs30("div", { className: "flex justify-between px-8 py-1 shadow-sm", children: [
3148
+ /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-1.5 text-base text-muted", children: resource && /* @__PURE__ */ jsxs30(Fragment10, { children: [
3149
+ /* @__PURE__ */ jsx72(Icon, { icon: resource.icon || faBookmark }),
3150
+ /* @__PURE__ */ jsx72("div", { children: resource.name })
3051
3151
  ] }) }),
3052
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
3053
- pagination && /* @__PURE__ */ jsxs26("div", { className: "flex gap-1", children: [
3152
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
3153
+ pagination && /* @__PURE__ */ jsxs30("div", { className: "flex gap-1", children: [
3054
3154
  pagination.extra,
3055
- /* @__PURE__ */ jsx67(Button, { size: "sm", onClick: pagination.onPrevious, disabled: !pagination.hasPrevious, children: /* @__PURE__ */ jsx67(Icon, { icon: faChevronUp }) }),
3056
- /* @__PURE__ */ jsx67(Button, { size: "sm", onClick: pagination.onNext, disabled: !pagination.hasNext, children: /* @__PURE__ */ jsx67(Icon, { icon: faChevronDown4 }) })
3155
+ /* @__PURE__ */ jsx72(Button, { size: "sm", onClick: pagination.onPrevious, disabled: !pagination.hasPrevious, children: /* @__PURE__ */ jsx72(Icon, { icon: faChevronUp }) }),
3156
+ /* @__PURE__ */ jsx72(Button, { size: "sm", onClick: pagination.onNext, disabled: !pagination.hasNext, children: /* @__PURE__ */ jsx72(Icon, { icon: faChevronDown4 }) })
3057
3157
  ] }),
3058
- /* @__PURE__ */ jsx67("div", { "data-testid": "drawer-close", children: closeAction ? closeAction : /* @__PURE__ */ jsx67(Button, { size: "xs", variant: "transparent", onClick: onClose, children: /* @__PURE__ */ jsx67("span", { className: "text-xl text-gray-500", children: /* @__PURE__ */ jsx67(Icon, { icon: faXmark3 }) }) }) })
3158
+ closeAction ?? /* @__PURE__ */ jsx72(Button, { size: "xs", variant: "transparent", onClick: onClose, children: /* @__PURE__ */ jsx72("span", { className: "text-xl text-muted", children: /* @__PURE__ */ jsx72(Icon, { icon: faClose }) }) })
3059
3159
  ] })
3060
3160
  ] }),
3061
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 px-8 py-2", children: [
3062
- /* @__PURE__ */ jsxs26("div", { className: "flex min-w-0 shrink grow flex-col", children: [
3063
- /* @__PURE__ */ jsx67(Text, { variant: "title-1", className: twJoin27(typeof title === "string" && "truncate"), children: title }),
3064
- subtitle && /* @__PURE__ */ jsx67("div", { className: "text-base font-light", children: subtitle })
3161
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-8 py-2", children: [
3162
+ /* @__PURE__ */ jsxs30("div", { className: "flex min-w-0 shrink grow flex-col", children: [
3163
+ /* @__PURE__ */ jsx72(Text, { variant: "title-1", className: twJoin29(typeof title === "string" && "truncate"), children: title }),
3164
+ subtitle && /* @__PURE__ */ jsx72("div", { className: "text-base font-light", children: subtitle })
3065
3165
  ] }),
3066
- label && /* @__PURE__ */ jsx67("div", { className: "flex items-center gap-2", children: label }),
3067
- /* @__PURE__ */ jsx67("div", { className: "flex shrink-0 items-center gap-2", children: actions })
3166
+ label && /* @__PURE__ */ jsx72("div", { className: "flex items-center gap-2", children: label }),
3167
+ /* @__PURE__ */ jsx72("div", { className: "flex shrink-0 items-center gap-2", children: actions })
3068
3168
  ] })
3069
3169
  ] });
3070
3170
  };
3071
- var DrawerHeaderSkeleton = () => /* @__PURE__ */ jsxs26("div", { className: "space-y-2 px-8 py-2", children: [
3072
- /* @__PURE__ */ jsxs26("div", { className: "flex justify-between", children: [
3073
- /* @__PURE__ */ jsx67(Skeleton, { className: "h-6 w-36" }),
3074
- /* @__PURE__ */ jsx67(Skeleton, { className: "h-6 w-16" })
3171
+ var DrawerHeaderSkeleton = () => /* @__PURE__ */ jsxs30("div", { className: "space-y-2 px-8 py-2", children: [
3172
+ /* @__PURE__ */ jsxs30("div", { className: "flex justify-between", children: [
3173
+ /* @__PURE__ */ jsx72(Skeleton, { className: "h-6 w-36" }),
3174
+ /* @__PURE__ */ jsx72(Skeleton, { className: "h-6 w-16" })
3075
3175
  ] }),
3076
- /* @__PURE__ */ jsx67(Skeleton, { className: "h-8 w-28" })
3176
+ /* @__PURE__ */ jsx72(Skeleton, { className: "h-8 w-28" })
3077
3177
  ] });
3078
3178
 
3079
3179
  // src/core/empty-state/EmptyState.tsx
3080
- import { faCircle as faCircle2 } from "@fortawesome/free-solid-svg-icons";
3081
3180
  import { FontAwesomeIcon as FontAwesomeIcon3 } from "@fortawesome/react-fontawesome";
3082
- import { forwardRef as forwardRef16 } from "react";
3083
- import { jsx as jsx68, jsxs as jsxs27 } from "react/jsx-runtime";
3084
- var EmptyState = forwardRef16(
3085
- ({ icon = faCircle2, title, description }, ref) => /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center justify-center gap-3 p-4", ref, children: [
3086
- /* @__PURE__ */ jsx68(FontAwesomeIcon3, { className: "text-gray-500 ring-transparent", icon, size: "2x" }),
3087
- /* @__PURE__ */ jsxs27("div", { className: "flex max-w-prose flex-col text-center", children: [
3088
- title && /* @__PURE__ */ jsx68("h2", { className: "text-sm leading-6 font-medium text-gray-500", children: title }),
3089
- description && /* @__PURE__ */ jsx68("p", { className: "text-xs leading-5 font-normal text-gray-500", children: description })
3181
+ import { faCircleDashed } from "@fortawesome/sharp-solid-svg-icons";
3182
+ import { forwardRef as forwardRef18 } from "react";
3183
+ import { jsx as jsx73, jsxs as jsxs31 } from "react/jsx-runtime";
3184
+ var EmptyState = forwardRef18(
3185
+ ({ icon = faCircleDashed, title, description }, ref) => /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center gap-3 p-4", ref, children: [
3186
+ /* @__PURE__ */ jsx73(FontAwesomeIcon3, { className: "text-muted ring-transparent", icon, size: "2x" }),
3187
+ /* @__PURE__ */ jsxs31("div", { className: "flex max-w-prose flex-col text-center", children: [
3188
+ title && /* @__PURE__ */ jsx73(Text, { variant: "title-3", className: "text-muted", children: title }),
3189
+ description && /* @__PURE__ */ jsx73(Text, { variant: "footnote", className: "leading-5 text-muted", children: description })
3090
3190
  ] })
3091
3191
  ] })
3092
3192
  );
3093
3193
 
3094
3194
  // src/core/header-tile/HeaderTile.tsx
3095
- import { twJoin as twJoin28 } from "tailwind-merge";
3096
- import { jsx as jsx69, jsxs as jsxs28 } from "react/jsx-runtime";
3097
- var HeaderTileSimple = ({ title, content, className }) => /* @__PURE__ */ jsxs28(
3195
+ import { twJoin as twJoin30 } from "tailwind-merge";
3196
+ import { jsx as jsx74, jsxs as jsxs32 } from "react/jsx-runtime";
3197
+ var HeaderTileSimple = ({ title, content, className }) => /* @__PURE__ */ jsxs32(
3098
3198
  "div",
3099
3199
  {
3100
- className: twJoin28(
3101
- "flex min-h-18.5 flex-col items-start justify-between gap-2 rounded-md border border-gray-200 px-3 py-1.5",
3200
+ className: twJoin30(
3201
+ "flex min-h-18.5 flex-col items-start justify-between gap-2 rounded-md border border-surface-neutral px-3 py-1.5",
3102
3202
  className
3103
3203
  ),
3104
3204
  children: [
3105
- /* @__PURE__ */ jsx69("p", { className: "max-w-35 text-base text-gray-900", children: title }),
3106
- /* @__PURE__ */ jsx69(Text, { children: content })
3205
+ /* @__PURE__ */ jsx74("p", { className: "max-w-35 text-base text-dark", children: title }),
3206
+ /* @__PURE__ */ jsx74(Text, { children: content })
3107
3207
  ]
3108
3208
  }
3109
3209
  );
@@ -3112,25 +3212,25 @@ var HeaderTileWithPopover = ({
3112
3212
  content,
3113
3213
  popover,
3114
3214
  className
3115
- }) => /* @__PURE__ */ jsxs28(Popover.Root, { children: [
3116
- /* @__PURE__ */ jsx69(Popover.Trigger, { className: twJoin28("flex h-auto! min-h-18.5 justify-start py-1.5", className), children: /* @__PURE__ */ jsxs28("span", { className: "flex flex-col items-start justify-between gap-2", children: [
3117
- /* @__PURE__ */ jsx69("span", { className: "text-base text-gray-900", children: title }),
3118
- /* @__PURE__ */ jsx69("span", { children: content })
3215
+ }) => /* @__PURE__ */ jsxs32(Popover.Root, { children: [
3216
+ /* @__PURE__ */ jsx74(Popover.Trigger, { className: twJoin30("flex h-auto! min-h-18.5 justify-start py-1.5", className), children: /* @__PURE__ */ jsxs32("span", { className: "flex flex-col items-start justify-between gap-2", children: [
3217
+ /* @__PURE__ */ jsx74("span", { className: "text-base text-dark", children: title }),
3218
+ /* @__PURE__ */ jsx74("span", { children: content })
3119
3219
  ] }) }),
3120
- popover && /* @__PURE__ */ jsx69(Popover.Body, { contentClassName: "max-w-150 min-w-60 p-3", children: popover })
3220
+ popover && /* @__PURE__ */ jsx74(Popover.Body, { contentClassName: "max-w-150 min-w-60 p-3", children: popover })
3121
3221
  ] });
3122
3222
  var HeaderTile = (props) => {
3123
3223
  if (props.popover) {
3124
- return /* @__PURE__ */ jsx69(HeaderTileWithPopover, { ...props });
3224
+ return /* @__PURE__ */ jsx74(HeaderTileWithPopover, { ...props });
3125
3225
  }
3126
- return /* @__PURE__ */ jsx69(HeaderTileSimple, { ...props });
3226
+ return /* @__PURE__ */ jsx74(HeaderTileSimple, { ...props });
3127
3227
  };
3128
3228
 
3129
3229
  // src/core/label/Label.tsx
3130
- import * as React11 from "react";
3230
+ import * as React12 from "react";
3131
3231
 
3132
3232
  // src/core/label/labelStyles.ts
3133
- import { twJoin as twJoin29 } from "tailwind-merge";
3233
+ import { twJoin as twJoin31 } from "tailwind-merge";
3134
3234
  var sizeStyles3 = {
3135
3235
  xs: "px-1 text-xs gap-0.5 h-4 rounded-md",
3136
3236
  sm: "h-5 gap-0.5 px-1 text-sm rounded-md",
@@ -3139,12 +3239,12 @@ var sizeStyles3 = {
3139
3239
  };
3140
3240
  var colorStyles2 = {
3141
3241
  default: {
3142
- default: "bg-gray-100 text-gray-700 border border-gray-200",
3242
+ default: "bg-surface-neutral text-neutral border border-surface-neutral",
3143
3243
  primary: "bg-indigo-100 text-indigo-700 border border-indigo-200",
3144
- success: "bg-green-100 text-green-700 border border-green-200",
3145
- warning: "bg-yellow-100 text-yellow-700 border border-yellow-200",
3146
- danger: "bg-red-100 text-red-700 border border-red-200",
3147
- disabled: "bg-gray-100 text-gray-400 border border-gray-200"
3244
+ success: "bg-surface-success text-success border border-surface-success",
3245
+ warning: "bg-surface-warning text-warning border border-surface-warning",
3246
+ danger: "bg-surface-danger text-red-700 border border-surface-danger",
3247
+ disabled: "bg-surface-neutral text-placeholder border border-surface-neutral"
3148
3248
  },
3149
3249
  dark: {
3150
3250
  default: "bg-gray-700 text-gray-50 border border-gray-600",
@@ -3159,21 +3259,21 @@ var colorStyles2 = {
3159
3259
  disabled: "bg-gray-700 text-gray-50 border border-gray-600"
3160
3260
  }
3161
3261
  };
3162
- var labelStyles = ({ intent = "default", size = "sm", variant = "default" }) => twJoin29(
3262
+ var labelStyles = ({ intent = "default", size = "sm", variant = "default" }) => twJoin31(
3163
3263
  "inline-flex w-fit shrink-0 items-center justify-center truncate font-normal break-all",
3164
3264
  sizeStyles3[size],
3165
3265
  colorStyles2[variant][intent]
3166
3266
  );
3167
3267
 
3168
3268
  // src/core/label/Label.tsx
3169
- import { jsx as jsx70 } from "react/jsx-runtime";
3269
+ import { jsx as jsx75 } from "react/jsx-runtime";
3170
3270
  var LabelImpl2 = ({ children, intent, size, variant, ...rest }, ref) => {
3171
- return /* @__PURE__ */ jsx70("span", { ref, className: labelStyles({ intent, size, variant }), ...rest, children });
3271
+ return /* @__PURE__ */ jsx75("span", { ref, className: labelStyles({ intent, size, variant }), ...rest, children });
3172
3272
  };
3173
- var Label = React11.forwardRef(LabelImpl2);
3273
+ var Label = React12.forwardRef(LabelImpl2);
3174
3274
 
3175
3275
  // src/core/menu/Menu.tsx
3176
- import { faEllipsis } from "@fortawesome/free-solid-svg-icons";
3276
+ import { faEllipsis } from "@fortawesome/sharp-solid-svg-icons";
3177
3277
  import {
3178
3278
  Content as Content6,
3179
3279
  Item,
@@ -3182,21 +3282,21 @@ import {
3182
3282
  Separator,
3183
3283
  Trigger as Trigger5
3184
3284
  } from "@radix-ui/react-dropdown-menu";
3185
- import { twJoin as twJoin30 } from "tailwind-merge";
3186
- import { jsx as jsx71, jsxs as jsxs29 } from "react/jsx-runtime";
3285
+ import { twJoin as twJoin32 } from "tailwind-merge";
3286
+ import { jsx as jsx76, jsxs as jsxs33 } from "react/jsx-runtime";
3187
3287
  var MenuTrigger = ({ children, ...rest }) => {
3188
3288
  if (children == null) {
3189
- return /* @__PURE__ */ jsx71(Trigger5, { asChild: true, children: /* @__PURE__ */ jsx71(Button, { ...rest, children: /* @__PURE__ */ jsx71(Icon, { icon: faEllipsis }) }) });
3289
+ return /* @__PURE__ */ jsx76(Trigger5, { asChild: true, children: /* @__PURE__ */ jsx76(Button, { ...rest, children: /* @__PURE__ */ jsx76(Icon, { icon: faEllipsis }) }) });
3190
3290
  }
3191
3291
  if (typeof children === "string") {
3192
- return /* @__PURE__ */ jsx71(Trigger5, { asChild: true, children: /* @__PURE__ */ jsxs29(Button, { ...rest, children: [
3193
- /* @__PURE__ */ jsx71("span", { children }),
3194
- /* @__PURE__ */ jsx71(DropdownChevron, {})
3292
+ return /* @__PURE__ */ jsx76(Trigger5, { asChild: true, children: /* @__PURE__ */ jsxs33(Button, { ...rest, children: [
3293
+ /* @__PURE__ */ jsx76("span", { children }),
3294
+ /* @__PURE__ */ jsx76(DropdownChevron, {})
3195
3295
  ] }) });
3196
3296
  }
3197
- return /* @__PURE__ */ jsx71(Trigger5, { asChild: true, children: /* @__PURE__ */ jsx71(Button, { ...rest, children }) });
3297
+ return /* @__PURE__ */ jsx76(Trigger5, { asChild: true, children: /* @__PURE__ */ jsx76(Button, { ...rest, children }) });
3198
3298
  };
3199
- var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__PURE__ */ jsx71(Portal4, { children: /* @__PURE__ */ jsx71(
3299
+ var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__PURE__ */ jsx76(Portal4, { children: /* @__PURE__ */ jsx76(
3200
3300
  Content6,
3201
3301
  {
3202
3302
  collisionPadding: 8,
@@ -3204,16 +3304,16 @@ var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__
3204
3304
  align: "end",
3205
3305
  className: "z-100 min-w-48 rounded-lg bg-white p-1.5 shadow-lg",
3206
3306
  ...props,
3207
- children: /* @__PURE__ */ jsx71("div", { className: twJoin30("overflow-y-auto", !unrestrictedHeight && "max-h-[252px]"), children })
3307
+ children: /* @__PURE__ */ jsx76("div", { className: twJoin32("overflow-y-auto", !unrestrictedHeight && "max-h-[252px]"), children })
3208
3308
  }
3209
3309
  ) });
3210
- var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE__ */ jsx71(
3310
+ var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE__ */ jsx76(
3211
3311
  Item,
3212
3312
  {
3213
3313
  "data-loading": loading || void 0,
3214
3314
  disabled: loading || disabled,
3215
- className: twJoin30(
3216
- "on-menu-item-active group flex w-full cursor-pointer items-center rounded-md p-2 text-gray-700 outline-hidden select-none data-disabled:cursor-not-allowed data-disabled:text-gray-400 data-highlighted:bg-gray-100 data-loading:bg-transparent data-loading:text-gray-400",
3315
+ className: twJoin32(
3316
+ "on-menu-item-active group flex w-full cursor-pointer items-center rounded-md p-2 text-neutral outline-hidden select-none data-disabled:cursor-not-allowed data-disabled:text-placeholder data-highlighted:bg-surface-neutral data-loading:bg-transparent data-loading:text-placeholder",
3217
3317
  size === "default" ? "gap-1.5 text-sm" : "gap-2 text-base"
3218
3318
  ),
3219
3319
  ...rest
@@ -3221,31 +3321,31 @@ var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE_
3221
3321
  );
3222
3322
  var MenuItemWithDisabledTooltip = ({ tooltip, onSelect, ...props }) => {
3223
3323
  if (!props.disabled || !tooltip) {
3224
- return /* @__PURE__ */ jsx71(MenuItem, { ...props, onSelect });
3324
+ return /* @__PURE__ */ jsx76(MenuItem, { ...props, onSelect });
3225
3325
  }
3226
- return /* @__PURE__ */ jsx71(
3326
+ return /* @__PURE__ */ jsx76(
3227
3327
  Tooltip,
3228
3328
  {
3229
- trigger: /* @__PURE__ */ jsx71("span", { children: /* @__PURE__ */ jsx71(MenuItem, { ...props }) }),
3329
+ trigger: /* @__PURE__ */ jsx76("span", { children: /* @__PURE__ */ jsx76(MenuItem, { ...props }) }),
3230
3330
  content: tooltip,
3231
3331
  side: "left"
3232
3332
  }
3233
3333
  );
3234
3334
  };
3235
- var MenuRoot = (props) => /* @__PURE__ */ jsx71(Root6, { modal: false, ...props });
3236
- var MenuSeparator = () => /* @__PURE__ */ jsx71(Separator, { className: "my-[5px] h-px bg-gray-200" });
3335
+ var MenuRoot = (props) => /* @__PURE__ */ jsx76(Root6, { modal: false, ...props });
3336
+ var MenuSeparator = () => /* @__PURE__ */ jsx76(Separator, { className: "my-[5px] h-px bg-surface-dark" });
3237
3337
  var Menu = ({ children, trigger, align, variant = "default", triggerSize, ...rest }) => {
3238
3338
  switch (variant) {
3239
3339
  case "minimal":
3240
- return /* @__PURE__ */ jsxs29(MenuRoot, { ...rest, children: [
3241
- /* @__PURE__ */ jsx71(MenuTrigger, { ...rest, size: triggerSize || "xs", variant: "transparent", children: trigger }),
3242
- /* @__PURE__ */ jsx71(MenuContent, { align, children })
3340
+ return /* @__PURE__ */ jsxs33(MenuRoot, { ...rest, children: [
3341
+ /* @__PURE__ */ jsx76(MenuTrigger, { ...rest, size: triggerSize || "xs", variant: "transparent", children: trigger }),
3342
+ /* @__PURE__ */ jsx76(MenuContent, { align, children })
3243
3343
  ] });
3244
3344
  case "default":
3245
3345
  default:
3246
- return /* @__PURE__ */ jsxs29(MenuRoot, { ...rest, children: [
3247
- /* @__PURE__ */ jsx71(MenuTrigger, { size: triggerSize, ...rest, children: trigger }),
3248
- /* @__PURE__ */ jsx71(MenuContent, { align, children })
3346
+ return /* @__PURE__ */ jsxs33(MenuRoot, { ...rest, children: [
3347
+ /* @__PURE__ */ jsx76(MenuTrigger, { size: triggerSize, ...rest, children: trigger }),
3348
+ /* @__PURE__ */ jsx76(MenuContent, { align, children })
3249
3349
  ] });
3250
3350
  }
3251
3351
  };
@@ -3258,32 +3358,33 @@ Menu.ItemWithDisabledToolTip = MenuItemWithDisabledTooltip;
3258
3358
  Menu.Separator = MenuSeparator;
3259
3359
 
3260
3360
  // src/core/modal/components/ModalActions.tsx
3261
- import { jsx as jsx72 } from "react/jsx-runtime";
3361
+ import { jsx as jsx77 } from "react/jsx-runtime";
3262
3362
  var ModalActions = ({ children }) => {
3263
3363
  if (children == null) {
3264
3364
  return null;
3265
3365
  }
3266
- return /* @__PURE__ */ jsx72("div", { className: "sticky bottom-0 z-2 flex items-center justify-end gap-x-2 overflow-clip rounded-b-xl bg-white/80 px-8 pt-2 pb-6 backdrop-blur-sm", children });
3366
+ return /* @__PURE__ */ jsx77("div", { className: "sticky bottom-0 z-2 flex items-center justify-end gap-x-2 overflow-clip rounded-b-xl bg-white/80 px-8 pt-2 pb-6 backdrop-blur-sm", children });
3267
3367
  };
3268
3368
 
3269
3369
  // src/core/modal/components/ModalBody.tsx
3270
- import { jsx as jsx73 } from "react/jsx-runtime";
3370
+ import { jsx as jsx78 } from "react/jsx-runtime";
3271
3371
  var ModalBody = ({ children }) => {
3272
3372
  if (children == null) {
3273
3373
  return null;
3274
3374
  }
3275
- return /* @__PURE__ */ jsx73("div", { className: "px-8 py-1.5", children });
3375
+ return /* @__PURE__ */ jsx78("div", { className: "px-8 py-1.5", children });
3276
3376
  };
3277
3377
 
3278
3378
  // src/core/modal/components/ModalCloseButton.tsx
3279
3379
  import { Close as Close2 } from "@radix-ui/react-dialog";
3280
- import { jsx as jsx74 } from "react/jsx-runtime";
3281
- var ModalCloseButton = (props) => /* @__PURE__ */ jsx74(Close2, { asChild: true, children: /* @__PURE__ */ jsx74(Button, { ...props }) });
3380
+ import { jsx as jsx79 } from "react/jsx-runtime";
3381
+ var ModalCloseButton = (props) => /* @__PURE__ */ jsx79(Close2, { asChild: true, children: /* @__PURE__ */ jsx79(Button, { ...props }) });
3282
3382
 
3283
3383
  // src/core/modal/components/ModalContent.tsx
3284
3384
  import { Content as Content7, Overlay, Portal as Portal5 } from "@radix-ui/react-dialog";
3285
- import { twJoin as twJoin31 } from "tailwind-merge";
3286
- import { jsx as jsx75 } from "react/jsx-runtime";
3385
+ import { forwardRef as forwardRef20 } from "react";
3386
+ import { twJoin as twJoin33 } from "tailwind-merge";
3387
+ import { jsx as jsx80 } from "react/jsx-runtime";
3287
3388
  var preventDismiss = (e) => e.preventDefault();
3288
3389
  var handleDismiss = (dismissible) => {
3289
3390
  if (dismissible) {
@@ -3291,88 +3392,91 @@ var handleDismiss = (dismissible) => {
3291
3392
  }
3292
3393
  return preventDismiss;
3293
3394
  };
3294
- var ModalContent = ({
3295
- children,
3296
- maxWidthClassName = "max-w-prose",
3297
- overflowYClassName = "overflow-y-auto",
3298
- onDismiss,
3299
- dismissible = true,
3300
- fullscreen,
3301
- ...rest
3302
- }) => /* @__PURE__ */ jsx75(Portal5, { children: /* @__PURE__ */ jsx75(
3303
- Overlay,
3304
- {
3305
- className: "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-fade-in-custom-easing",
3306
- children: /* @__PURE__ */ jsx75(
3307
- Content7,
3308
- {
3309
- ...rest,
3310
- className: twJoin31(
3311
- fullscreen ? "h-[calc(100vh-1rem)] w-[calc(100vw-1rem)]" : `max-h-[calc(100vh-2rem)] w-[clamp(100vw-2rem,100%,100vw-2rem)] ${maxWidthClassName}`,
3312
- `fixed top-1/2 left-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl bg-white shadow-lg focus:outline-hidden data-[state=open]:animate-fade-in-subtle-movement ${overflowYClassName}`
3313
- ),
3314
- onPointerDownOutside: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
3315
- onEscapeKeyDown: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
3316
- children: /* @__PURE__ */ jsx75("div", { className: "relative flex h-full min-w-0 flex-1 flex-col", children })
3317
- }
3318
- )
3319
- }
3320
- ) });
3395
+ var ModalContent = forwardRef20(
3396
+ ({
3397
+ children,
3398
+ maxWidthClassName = "max-w-prose",
3399
+ overflowYClassName = "overflow-y-auto",
3400
+ onDismiss,
3401
+ dismissible = true,
3402
+ fullscreen,
3403
+ ...rest
3404
+ }, ref) => /* @__PURE__ */ jsx80(Portal5, { children: /* @__PURE__ */ jsx80(
3405
+ Overlay,
3406
+ {
3407
+ className: "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-fade-in-custom-easing",
3408
+ children: /* @__PURE__ */ jsx80(
3409
+ Content7,
3410
+ {
3411
+ ...rest,
3412
+ ref,
3413
+ className: twJoin33(
3414
+ fullscreen ? "h-[calc(100vh-1rem)] w-[calc(100vw-1rem)]" : `max-h-[calc(100vh-2rem)] w-[clamp(100vw-2rem,100%,100vw-2rem)] ${maxWidthClassName}`,
3415
+ `fixed top-1/2 left-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl bg-white shadow-lg focus:outline-hidden data-[state=open]:animate-fade-in-subtle-movement ${overflowYClassName}`
3416
+ ),
3417
+ onPointerDownOutside: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
3418
+ onEscapeKeyDown: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
3419
+ children: /* @__PURE__ */ jsx80("div", { className: "relative flex h-full min-w-0 flex-1 flex-col", children })
3420
+ }
3421
+ )
3422
+ }
3423
+ ) })
3424
+ );
3321
3425
 
3322
3426
  // src/core/modal/components/ModalDescription.tsx
3323
3427
  import { Description } from "@radix-ui/react-dialog";
3324
- import { jsx as jsx76 } from "react/jsx-runtime";
3428
+ import { jsx as jsx81 } from "react/jsx-runtime";
3325
3429
  var ModalDescription = ({ children }) => {
3326
3430
  if (children == null) {
3327
3431
  return null;
3328
3432
  }
3329
- return /* @__PURE__ */ jsx76(Description, { className: "pb-3 text-base/6 font-normal text-gray-700", children });
3433
+ return /* @__PURE__ */ jsx81(Description, { className: "pb-3 text-base/6 font-normal text-neutral", children });
3330
3434
  };
3331
3435
 
3332
3436
  // src/core/modal/components/ModalErrorCallout.tsx
3333
- import { jsx as jsx77 } from "react/jsx-runtime";
3437
+ import { jsx as jsx82 } from "react/jsx-runtime";
3334
3438
  var ModalErrorCallout = ({ children }) => {
3335
3439
  if (!children) {
3336
3440
  return null;
3337
3441
  }
3338
- return /* @__PURE__ */ jsx77("div", { className: "sticky top-14 z-10 px-5", children: /* @__PURE__ */ jsx77(Callout, { intent: "danger", children }) });
3442
+ return /* @__PURE__ */ jsx82("div", { className: "sticky top-14 z-10 px-5", children: /* @__PURE__ */ jsx82(Callout, { intent: "danger", children }) });
3339
3443
  };
3340
3444
 
3341
3445
  // src/core/modal/components/ModalRoot.tsx
3342
3446
  import { Root as Root7 } from "@radix-ui/react-dialog";
3343
- import { jsx as jsx78 } from "react/jsx-runtime";
3447
+ import { jsx as jsx83 } from "react/jsx-runtime";
3344
3448
  var ModalRoot = (props) => {
3345
- return /* @__PURE__ */ jsx78(Root7, { ...props });
3449
+ return /* @__PURE__ */ jsx83(Root7, { ...props });
3346
3450
  };
3347
3451
 
3348
3452
  // src/core/modal/components/ModalTitle.tsx
3349
3453
  import { Title } from "@radix-ui/react-dialog";
3350
3454
 
3351
3455
  // src/core/modal/components/ModalCloseX.tsx
3352
- import { faXmark as faXmark4 } from "@fortawesome/free-solid-svg-icons";
3456
+ import { faClose as faClose2 } from "@fortawesome/sharp-solid-svg-icons";
3353
3457
  import { Close as Close3 } from "@radix-ui/react-dialog";
3354
- import { jsx as jsx79 } from "react/jsx-runtime";
3355
- var ModalCloseX = () => /* @__PURE__ */ jsx79("span", { className: "absolute top-2.5 right-2.5", children: /* @__PURE__ */ jsx79(Close3, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx79(Button, { variant: "transparent", children: /* @__PURE__ */ jsx79("span", { className: "px-0.5 text-xl text-gray-500", children: /* @__PURE__ */ jsx79(Icon, { icon: faXmark4 }) }) }) }) });
3458
+ import { jsx as jsx84 } from "react/jsx-runtime";
3459
+ var ModalCloseX = () => /* @__PURE__ */ jsx84("span", { className: "absolute top-2.5 right-2.5", children: /* @__PURE__ */ jsx84(Close3, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ jsx84(Button, { variant: "transparent", children: /* @__PURE__ */ jsx84("span", { className: "px-0.5 text-xl text-muted", children: /* @__PURE__ */ jsx84(Icon, { icon: faClose2 }) }) }) }) });
3356
3460
 
3357
3461
  // src/core/modal/components/ModalTitle.tsx
3358
- import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3462
+ import { jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
3359
3463
  var ModalTitle = ({ children, showX = true }) => {
3360
3464
  if (children == null) {
3361
3465
  return null;
3362
3466
  }
3363
- return /* @__PURE__ */ jsxs30("div", { className: "sticky top-0 z-2 overflow-clip rounded-t-xl bg-white/80 px-8 pt-8 pb-1.5 backdrop-blur-sm", children: [
3364
- /* @__PURE__ */ jsx80(Title, { className: "text-xl font-semibold text-gray-900", children }),
3365
- showX && /* @__PURE__ */ jsx80(ModalCloseX, {})
3467
+ return /* @__PURE__ */ jsxs34("div", { className: "sticky top-0 z-2 overflow-clip rounded-t-xl bg-white/80 px-8 pt-8 pb-1.5 backdrop-blur-sm", children: [
3468
+ /* @__PURE__ */ jsx85(Title, { className: "text-xl font-semibold text-dark", children }),
3469
+ showX && /* @__PURE__ */ jsx85(ModalCloseX, {})
3366
3470
  ] });
3367
3471
  };
3368
3472
 
3369
3473
  // src/core/modal/components/ModalTriggerButton.tsx
3370
3474
  import { Trigger as Trigger6 } from "@radix-ui/react-dialog";
3371
- import { jsx as jsx81 } from "react/jsx-runtime";
3372
- var ModalTriggerButton = (props) => /* @__PURE__ */ jsx81(Trigger6, { asChild: true, children: /* @__PURE__ */ jsx81(Button, { ...props }) });
3475
+ import { jsx as jsx86 } from "react/jsx-runtime";
3476
+ var ModalTriggerButton = (props) => /* @__PURE__ */ jsx86(Trigger6, { asChild: true, children: /* @__PURE__ */ jsx86(Button, { ...props }) });
3373
3477
 
3374
3478
  // src/core/modal/Modal.tsx
3375
- import { Fragment as Fragment11, jsx as jsx82, jsxs as jsxs31 } from "react/jsx-runtime";
3479
+ import { Fragment as Fragment11, jsx as jsx87, jsxs as jsxs35 } from "react/jsx-runtime";
3376
3480
  var ModalBodyImpl = ({
3377
3481
  children,
3378
3482
  title,
@@ -3380,14 +3484,14 @@ var ModalBodyImpl = ({
3380
3484
  description,
3381
3485
  actions,
3382
3486
  showX = true
3383
- }) => /* @__PURE__ */ jsxs31(Fragment11, { children: [
3384
- /* @__PURE__ */ jsx82(ModalTitle, { showX, children: title }),
3385
- /* @__PURE__ */ jsx82(ModalErrorCallout, { children: error }),
3386
- (description || children) && /* @__PURE__ */ jsxs31(ModalBody, { children: [
3387
- /* @__PURE__ */ jsx82(ModalDescription, { children: description }),
3487
+ }) => /* @__PURE__ */ jsxs35(Fragment11, { children: [
3488
+ /* @__PURE__ */ jsx87(ModalTitle, { showX, children: title }),
3489
+ /* @__PURE__ */ jsx87(ModalErrorCallout, { children: error }),
3490
+ (description || children) && /* @__PURE__ */ jsxs35(ModalBody, { children: [
3491
+ /* @__PURE__ */ jsx87(ModalDescription, { children: description }),
3388
3492
  children
3389
3493
  ] }),
3390
- /* @__PURE__ */ jsx82(ModalActions, { children: actions })
3494
+ /* @__PURE__ */ jsx87(ModalActions, { children: actions })
3391
3495
  ] });
3392
3496
  var Modal = ({
3393
3497
  children,
@@ -3401,7 +3505,7 @@ var Modal = ({
3401
3505
  description,
3402
3506
  actions,
3403
3507
  ...rest
3404
- }) => /* @__PURE__ */ jsxs31(
3508
+ }) => /* @__PURE__ */ jsxs35(
3405
3509
  ModalRoot,
3406
3510
  {
3407
3511
  open: isOpen,
@@ -3414,7 +3518,7 @@ var Modal = ({
3414
3518
  },
3415
3519
  children: [
3416
3520
  trigger,
3417
- /* @__PURE__ */ jsx82(ModalContent, { "aria-describedby": description || void 0, ...rest, children: children !== void 0 ? children : /* @__PURE__ */ jsx82(ModalBodyImpl, { title, error, description, actions, children: content }) })
3521
+ /* @__PURE__ */ jsx87(ModalContent, { "aria-describedby": description || void 0, ...rest, children: children !== void 0 ? children : /* @__PURE__ */ jsx87(ModalBodyImpl, { title, error, description, actions, children: content }) })
3418
3522
  ]
3419
3523
  }
3420
3524
  );
@@ -3422,10 +3526,13 @@ Modal.Body = ModalBodyImpl;
3422
3526
  Modal.TriggerButton = ModalTriggerButton;
3423
3527
  Modal.CloseButton = ModalCloseButton;
3424
3528
 
3529
+ // src/core/modal/FullscreenModal.tsx
3530
+ import * as React13 from "react";
3531
+
3425
3532
  // src/core/modal/FullscreenModalHeader.tsx
3426
3533
  import { Title as Title2 } from "@radix-ui/react-dialog";
3427
- import { twJoin as twJoin32 } from "tailwind-merge";
3428
- import { jsx as jsx83, jsxs as jsxs32 } from "react/jsx-runtime";
3534
+ import { twJoin as twJoin34 } from "tailwind-merge";
3535
+ import { jsx as jsx88, jsxs as jsxs36 } from "react/jsx-runtime";
3429
3536
  var FullscreenModalHeader = ({
3430
3537
  className,
3431
3538
  title,
@@ -3433,61 +3540,55 @@ var FullscreenModalHeader = ({
3433
3540
  leftSlot,
3434
3541
  rightSlot
3435
3542
  }) => {
3436
- return /* @__PURE__ */ jsxs32("div", { className: twJoin32("flex items-center justify-between gap-4", className), children: [
3437
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-1 items-center gap-4", children: [
3543
+ return /* @__PURE__ */ jsxs36("div", { className: twJoin34("flex items-center justify-between gap-4", className), children: [
3544
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-1 items-center gap-4", children: [
3438
3545
  leftSlot,
3439
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-1", children: [
3440
- /* @__PURE__ */ jsx83(Title2, { className: "text-2xl font-medium text-gray-700", children: title }),
3441
- description && /* @__PURE__ */ jsx83("div", { className: "text-base/6 text-gray-500", children: description })
3546
+ /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-1", children: [
3547
+ /* @__PURE__ */ jsx88(Title2, { className: "text-2xl font-medium text-neutral", children: title }),
3548
+ description && /* @__PURE__ */ jsx88("div", { className: "text-base/6 text-muted", children: description })
3442
3549
  ] })
3443
3550
  ] }),
3444
- /* @__PURE__ */ jsx83("div", { className: "flex gap-2", children: rightSlot })
3551
+ /* @__PURE__ */ jsx88("div", { className: "flex gap-2", children: rightSlot })
3445
3552
  ] });
3446
3553
  };
3447
3554
 
3448
3555
  // src/core/modal/FullscreenModal.tsx
3449
- import { jsx as jsx84, jsxs as jsxs33 } from "react/jsx-runtime";
3450
- var FullscreenModal = ({
3451
- children,
3452
- trigger,
3453
- isOpen,
3454
- onClose,
3455
- onOpenChange,
3456
- fullscreen = true,
3457
- showX = false,
3458
- title,
3459
- ...rest
3460
- }) => /* @__PURE__ */ jsxs33(
3461
- ModalRoot,
3462
- {
3463
- open: isOpen,
3464
- onOpenChange: (open) => {
3465
- if (trigger) {
3466
- onOpenChange?.(open);
3467
- } else if (open === false) {
3468
- onClose?.();
3469
- }
3470
- },
3471
- children: [
3472
- trigger,
3473
- /* @__PURE__ */ jsx84(ModalContent, { fullscreen, ...rest, children: title ? /* @__PURE__ */ jsx84(Modal.Body, { title, showX, children }) : children })
3474
- ]
3475
- }
3556
+ import { jsx as jsx89, jsxs as jsxs37 } from "react/jsx-runtime";
3557
+ var FullscreenModal = React13.forwardRef(
3558
+ ({ children, trigger, isOpen, onClose, onOpenChange, fullscreen = true, showX = false, title, ...rest }, ref) => /* @__PURE__ */ jsxs37(
3559
+ ModalRoot,
3560
+ {
3561
+ open: isOpen,
3562
+ onOpenChange: (open) => {
3563
+ if (trigger) {
3564
+ onOpenChange?.(open);
3565
+ } else if (open === false) {
3566
+ onClose?.();
3567
+ }
3568
+ },
3569
+ children: [
3570
+ trigger,
3571
+ /* @__PURE__ */ jsx89(ModalContent, { fullscreen, ...rest, ref, children: title ? /* @__PURE__ */ jsx89(Modal.Body, { title, showX, children }) : children })
3572
+ ]
3573
+ }
3574
+ )
3476
3575
  );
3477
- FullscreenModal.TriggerButton = ModalTriggerButton;
3478
- FullscreenModal.CloseButton = ModalCloseButton;
3479
- FullscreenModal.Header = FullscreenModalHeader;
3576
+ var FullscreenModalNamespace = Object.assign(FullscreenModal, {
3577
+ TriggerButton: ModalTriggerButton,
3578
+ CloseButton: ModalCloseButton,
3579
+ Header: FullscreenModalHeader
3580
+ });
3480
3581
 
3481
3582
  // src/core/modal/AlertModal.tsx
3482
- import { Fragment as Fragment12, jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
3483
- var ModalBodyImpl2 = ({ children, title, error, description, actions }) => /* @__PURE__ */ jsxs34(Fragment12, { children: [
3484
- /* @__PURE__ */ jsx85(ModalTitle, { showX: false, children: title }),
3485
- /* @__PURE__ */ jsx85(ModalErrorCallout, { children: error }),
3486
- (description || children) && /* @__PURE__ */ jsxs34(ModalBody, { children: [
3487
- /* @__PURE__ */ jsx85(ModalDescription, { children: description }),
3583
+ import { Fragment as Fragment12, jsx as jsx90, jsxs as jsxs38 } from "react/jsx-runtime";
3584
+ var ModalBodyImpl2 = ({ children, title, error, description, actions }) => /* @__PURE__ */ jsxs38(Fragment12, { children: [
3585
+ /* @__PURE__ */ jsx90(ModalTitle, { showX: false, children: title }),
3586
+ /* @__PURE__ */ jsx90(ModalErrorCallout, { children: error }),
3587
+ (description || children) && /* @__PURE__ */ jsxs38(ModalBody, { children: [
3588
+ /* @__PURE__ */ jsx90(ModalDescription, { children: description }),
3488
3589
  children
3489
3590
  ] }),
3490
- /* @__PURE__ */ jsx85(ModalActions, { children: actions })
3591
+ /* @__PURE__ */ jsx90(ModalActions, { children: actions })
3491
3592
  ] });
3492
3593
  var AlertModal = ({
3493
3594
  children,
@@ -3501,7 +3602,7 @@ var AlertModal = ({
3501
3602
  description,
3502
3603
  actions,
3503
3604
  ...rest
3504
- }) => /* @__PURE__ */ jsxs34(
3605
+ }) => /* @__PURE__ */ jsxs38(
3505
3606
  ModalRoot,
3506
3607
  {
3507
3608
  open: isOpen,
@@ -3514,7 +3615,7 @@ var AlertModal = ({
3514
3615
  },
3515
3616
  children: [
3516
3617
  trigger,
3517
- /* @__PURE__ */ jsx85(ModalContent, { ...rest, dismissible: false, children: children !== void 0 ? children : /* @__PURE__ */ jsx85(ModalBodyImpl2, { title, error, description, actions, children: content }) })
3618
+ /* @__PURE__ */ jsx90(ModalContent, { ...rest, dismissible: false, children: children !== void 0 ? children : /* @__PURE__ */ jsx90(ModalBodyImpl2, { title, error, description, actions, children: content }) })
3518
3619
  ]
3519
3620
  }
3520
3621
  );
@@ -3525,21 +3626,24 @@ AlertModal.CloseButton = ModalCloseButton;
3525
3626
  // src/core/phone-number/PhoneNumber.tsx
3526
3627
  import "react-international-phone/style.css";
3527
3628
  import { getCountry, PhoneInput } from "react-international-phone";
3528
- import { twJoin as twJoin33 } from "tailwind-merge";
3529
- import { jsx as jsx86 } from "react/jsx-runtime";
3629
+ import { twJoin as twJoin35 } from "tailwind-merge";
3630
+ import { jsx as jsx91 } from "react/jsx-runtime";
3530
3631
  var PhoneNumber = ({
3531
3632
  hasError,
3532
3633
  onChange,
3533
3634
  ...props
3534
3635
  }) => {
3535
- return /* @__PURE__ */ jsx86(
3636
+ return /* @__PURE__ */ jsx91(
3536
3637
  PhoneInput,
3537
3638
  {
3538
3639
  defaultCountry: props.defaultCountry ?? "us",
3539
3640
  disableDialCodeAndPrefix: true,
3540
3641
  showDisabledDialCodeAndPrefix: true,
3541
- inputClassName: twJoin33("flex-1 placeholder:text-gray-400", hasError ? "border-red-300!" : "border-gray-200!"),
3542
- countrySelectorStyleProps: { className: "border-gray-200!" },
3642
+ inputClassName: twJoin35(
3643
+ "flex-1 placeholder:text-placeholder",
3644
+ hasError ? "border-red-300!" : "border-surface-neutral!"
3645
+ ),
3646
+ countrySelectorStyleProps: { className: "border-surface-neutral!" },
3543
3647
  onChange: (value, meta) => onChange(meta.inputValue ? value : void 0),
3544
3648
  ...props
3545
3649
  }
@@ -3585,13 +3689,42 @@ var isValidPhoneNumber = (input) => {
3585
3689
  };
3586
3690
 
3587
3691
  // src/core/table/Table.tsx
3588
- import { twJoin as twJoin35 } from "tailwind-merge";
3692
+ import { useEffect as useEffect7 } from "react";
3693
+ import { twJoin as twJoin38 } from "tailwind-merge";
3694
+
3695
+ // src/core/utils/useIntersectionObserver.ts
3696
+ import { useCallback as useCallback9, useRef as useRef7, useState as useState10 } from "react";
3697
+ var useIntersectionObserver = (options = {}) => {
3698
+ const { threshold = 1, root = null, rootMargin = "0px" } = options;
3699
+ const [entry, setEntry] = useState10(null);
3700
+ const previousObserver = useRef7(null);
3701
+ const customRef = useCallback9(
3702
+ (node) => {
3703
+ if (previousObserver.current) {
3704
+ previousObserver.current.disconnect();
3705
+ previousObserver.current = null;
3706
+ }
3707
+ if (node?.nodeType === Node.ELEMENT_NODE) {
3708
+ const observer = new IntersectionObserver(
3709
+ ([entry2]) => {
3710
+ setEntry(entry2);
3711
+ },
3712
+ { threshold, root, rootMargin }
3713
+ );
3714
+ observer.observe(node);
3715
+ previousObserver.current = observer;
3716
+ }
3717
+ },
3718
+ [threshold, root, rootMargin]
3719
+ );
3720
+ return [customRef, entry];
3721
+ };
3589
3722
 
3590
3723
  // src/core/table/TableBody.tsx
3591
- import { faTable } from "@fortawesome/free-solid-svg-icons";
3724
+ import { faTable } from "@fortawesome/sharp-solid-svg-icons";
3592
3725
 
3593
3726
  // src/core/table/TableRow.tsx
3594
- import { twJoin as twJoin34 } from "tailwind-merge";
3727
+ import { twJoin as twJoin36 } from "tailwind-merge";
3595
3728
 
3596
3729
  // src/core/table/utils.ts
3597
3730
  import { flexRender } from "@tanstack/react-table";
@@ -3646,8 +3779,17 @@ var handleStyle = (item, _style) => {
3646
3779
  if (!size) {
3647
3780
  return style;
3648
3781
  }
3649
- style.width = size;
3782
+ const table = item.getContext().table;
3783
+ const isResizable = table.options.enableColumnResizing;
3784
+ const isLastVisible = isResizable && table.getVisibleLeafColumns().at(-1)?.id === item.column.id;
3650
3785
  style.minWidth = size;
3786
+ if (!isLastVisible) {
3787
+ style.width = size;
3788
+ }
3789
+ if (isResizable) {
3790
+ style.overflow = "hidden";
3791
+ style.textOverflow = "ellipsis";
3792
+ }
3651
3793
  if (item.column.columnDef.meta?.sticky === "left") {
3652
3794
  style.position = "sticky";
3653
3795
  style.left = getLeftStickyOffset(item);
@@ -3662,28 +3804,28 @@ var handleHeaderStyle = handleStyle;
3662
3804
  var handleCellStyle = handleStyle;
3663
3805
 
3664
3806
  // src/core/table/TableRow.tsx
3665
- import { jsx as jsx87 } from "react/jsx-runtime";
3807
+ import { jsx as jsx92 } from "react/jsx-runtime";
3666
3808
  var TableRow = ({ table, rowClassName, cellClassName, row }) => {
3667
3809
  const hasRowClick = !!table.options.meta?.onRowClick;
3668
3810
  const isStaticSubRow = !!table.options.meta?.staticSubRows;
3669
3811
  const onRowClick = (ev, row2) => {
3670
3812
  if (ev.target === ev.currentTarget) {
3671
- table.options.meta?.onRowClick?.(row2);
3813
+ table.options.meta?.onRowClick?.(row2, ev);
3672
3814
  }
3673
3815
  };
3674
3816
  const cells = row.getVisibleCells();
3675
- return /* @__PURE__ */ jsx87(
3817
+ return /* @__PURE__ */ jsx92(
3676
3818
  "tr",
3677
3819
  {
3678
3820
  "data-active": table.options.meta?.activeRowId === row.id ? "" : void 0,
3679
3821
  "data-clickable": !isStaticSubRow && (hasRowClick || row.getCanExpand()) ? "" : void 0,
3680
3822
  "data-depth": isStaticSubRow ? row.depth : void 0,
3681
3823
  onClick: !isStaticSubRow && row.getCanExpand() ? row.getToggleExpandedHandler() : void 0,
3682
- className: twJoin34(
3683
- "data-[active]:bg-indigo-100 data-[clickable]:hover:cursor-pointer data-[clickable]:hover:bg-indigo-50 data-[active]:data-[clickable]:hover:bg-indigo-200",
3824
+ className: twJoin36(
3825
+ "data-[active]:bg-indigo-100 data-[clickable]:hover:cursor-pointer data-[clickable]:hover:bg-surface-primary data-[active]:data-[clickable]:hover:bg-indigo-200",
3684
3826
  rowClassName
3685
3827
  ),
3686
- children: cells.map((cell) => /* @__PURE__ */ jsx87(
3828
+ children: cells.map((cell) => /* @__PURE__ */ jsx92(
3687
3829
  "td",
3688
3830
  {
3689
3831
  onClickCapture: hasRowClick ? (ev) => onRowClick(ev, row) : void 0,
@@ -3698,27 +3840,48 @@ var TableRow = ({ table, rowClassName, cellClassName, row }) => {
3698
3840
  };
3699
3841
 
3700
3842
  // src/core/table/TableBody.tsx
3701
- import { jsx as jsx88, jsxs as jsxs35 } from "react/jsx-runtime";
3702
- var TableBody = ({ table, loading, rootClassName, ...props }) => {
3843
+ import { jsx as jsx93, jsxs as jsxs39 } from "react/jsx-runtime";
3844
+ var TableBody = ({ table, loading, rootClassName, afterRows, ...props }) => {
3703
3845
  const { rows } = table.getRowModel();
3704
- if (loading && rows.length === 0) {
3705
- return /* @__PURE__ */ jsx88("tbody", { className: rootClassName, children: /* @__PURE__ */ jsx88("tr", { children: /* @__PURE__ */ jsx88("td", { colSpan: table.getAllLeafColumns().length, className: "h-12 text-center align-middle text-gray-400", children: /* @__PURE__ */ jsx88(Spinner, {}) }) }) });
3706
- }
3707
3846
  if (rows.length === 0) {
3708
- return /* @__PURE__ */ jsx88("tbody", { className: rootClassName, children: /* @__PURE__ */ jsx88("tr", { children: /* @__PURE__ */ jsx88(EmptyRowsTd, { colSpan: table.getAllLeafColumns().length, emptyText: table.options.meta?.emptyText }) }) });
3847
+ if (loading) {
3848
+ const colCount = table.getAllLeafColumns().length;
3849
+ return /* @__PURE__ */ jsx93("tbody", { className: rootClassName, children: Array.from({ length: 20 }).map((_, i) => /* @__PURE__ */ jsx93(
3850
+ "tr",
3851
+ {
3852
+ className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200",
3853
+ children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ jsx93("td", { className: "p-2", children: /* @__PURE__ */ jsx93(Skeleton, { className: "h-3 w-full" }) }, j))
3854
+ },
3855
+ `skeleton-${i}`
3856
+ )) });
3857
+ }
3858
+ return /* @__PURE__ */ jsxs39("tbody", { className: rootClassName, children: [
3859
+ /* @__PURE__ */ jsx93("tr", { children: /* @__PURE__ */ jsx93(EmptyRowsTd, { colSpan: table.getAllLeafColumns().length, emptyText: table.options.meta?.emptyText }) }),
3860
+ afterRows
3861
+ ] });
3709
3862
  }
3710
- return /* @__PURE__ */ jsx88("tbody", { className: rootClassName, children: rows.map((row) => /* @__PURE__ */ jsx88(TableRow, { ...props, table, row }, row.id)) });
3863
+ return /* @__PURE__ */ jsxs39("tbody", { className: rootClassName, children: [
3864
+ rows.map((row) => /* @__PURE__ */ jsx93(TableRow, { ...props, table, row }, row.id)),
3865
+ afterRows
3866
+ ] });
3711
3867
  };
3712
- var EmptyRowsTd = ({ emptyText = "No rows found", ...props }) => /* @__PURE__ */ jsx88("td", { ...props, className: "h-12 text-center align-middle text-gray-400", children: /* @__PURE__ */ jsxs35("p", { className: "inline-flex items-center gap-2 text-2xl/none", children: [
3713
- /* @__PURE__ */ jsx88("span", { children: /* @__PURE__ */ jsx88(Icon, { icon: faTable }) }),
3714
- /* @__PURE__ */ jsx88("span", { className: "text-base/none font-medium", children: emptyText })
3868
+ var EmptyRowsTd = ({ emptyText = "No rows found", ...props }) => /* @__PURE__ */ jsx93("td", { ...props, className: "h-full", children: /* @__PURE__ */ jsxs39("p", { className: "flex h-full min-h-12 w-full items-center justify-center gap-2 text-2xl/none text-placeholder", children: [
3869
+ /* @__PURE__ */ jsx93("span", { children: /* @__PURE__ */ jsx93(Icon, { icon: faTable }) }),
3870
+ /* @__PURE__ */ jsx93("span", { className: "text-base/none font-medium", children: emptyText })
3715
3871
  ] }) });
3716
3872
 
3717
3873
  // src/core/table/TableHeader.tsx
3718
- import { faArrowDownWideShort, faArrowUpWideShort } from "@fortawesome/free-solid-svg-icons";
3719
- import { jsx as jsx89, jsxs as jsxs36 } from "react/jsx-runtime";
3720
- var TableHeader = ({ table, rootClassName, rowClassName, cellClassName }) => {
3721
- return /* @__PURE__ */ jsx89("thead", { className: rootClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx89("tr", { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx89(
3874
+ import { faArrowDownWideShort, faArrowUpWideShort } from "@fortawesome/sharp-solid-svg-icons";
3875
+ import { twJoin as twJoin37 } from "tailwind-merge";
3876
+ import { jsx as jsx94, jsxs as jsxs40 } from "react/jsx-runtime";
3877
+ var TableHeader = ({
3878
+ table,
3879
+ variant,
3880
+ rootClassName,
3881
+ rowClassName,
3882
+ cellClassName
3883
+ }) => {
3884
+ return /* @__PURE__ */ jsx94("thead", { className: rootClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx94("tr", { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx94(
3722
3885
  Th,
3723
3886
  {
3724
3887
  scope: "col",
@@ -3726,6 +3889,7 @@ var TableHeader = ({ table, rootClassName, rowClassName, cellClassName }) => {
3726
3889
  className: cellClassName,
3727
3890
  style: handleHeaderStyle(header),
3728
3891
  header,
3892
+ variant,
3729
3893
  children: renderHeader(header)
3730
3894
  },
3731
3895
  header.id
@@ -3733,36 +3897,77 @@ var TableHeader = ({ table, rootClassName, rowClassName, cellClassName }) => {
3733
3897
  };
3734
3898
  var Th = ({
3735
3899
  header,
3900
+ variant,
3736
3901
  children,
3737
3902
  ...props
3738
3903
  }) => {
3904
+ const isLastInRow = header.index === header.headerGroup.headers.length - 1;
3905
+ const canResize = !isLastInRow && !!header.getContext().table.options.columnResizeMode && header.column.getCanResize();
3906
+ const isSubtable = variant === "subtable";
3907
+ const resizeHandle = canResize && /* @__PURE__ */ jsx94(
3908
+ "div",
3909
+ {
3910
+ onMouseDown: header.getResizeHandler(),
3911
+ onTouchStart: header.getResizeHandler(),
3912
+ onClick: (e) => e.stopPropagation(),
3913
+ "data-resizing": header.column.getIsResizing() ? "" : void 0,
3914
+ className: twJoin37(
3915
+ "absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize touch-none select-none",
3916
+ "after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-screen after:w-0.5 after:transition-colors after:duration-150 after:content-['']",
3917
+ isSubtable ? "hover:after:bg-indigo-600 data-resizing:after:bg-indigo-600" : "group-hover:after:bg-gray-200 hover:after:bg-indigo-600 data-resizing:after:bg-indigo-600"
3918
+ )
3919
+ }
3920
+ );
3739
3921
  if (header.column.getIsSorted()) {
3740
- return /* @__PURE__ */ jsxs36("th", { ...props, "data-clickable": "ok", onClick: header.column.getToggleSortingHandler(), children: [
3741
- children,
3742
- /* @__PURE__ */ jsx89("span", { className: "ml-1.5", children: /* @__PURE__ */ jsx89(SortIcon, { dir: header.column.getIsSorted() }) })
3743
- ] });
3922
+ return /* @__PURE__ */ jsxs40(
3923
+ "th",
3924
+ {
3925
+ ...props,
3926
+ "data-clickable": "ok",
3927
+ onClick: header.column.getToggleSortingHandler(),
3928
+ className: twJoin37(props.className, canResize && "group relative"),
3929
+ children: [
3930
+ children,
3931
+ /* @__PURE__ */ jsx94("span", { className: "ml-1.5", children: /* @__PURE__ */ jsx94(SortIcon, { dir: header.column.getIsSorted() }) }),
3932
+ resizeHandle
3933
+ ]
3934
+ }
3935
+ );
3744
3936
  }
3745
3937
  if (header.column.getCanSort()) {
3746
- return /* @__PURE__ */ jsxs36("th", { ...props, "data-clickable": "ok", onClick: header.column.getToggleSortingHandler(), children: [
3747
- children,
3748
- /* @__PURE__ */ jsx89("span", { className: "invisible ml-1.5 group-hover:visible", children: /* @__PURE__ */ jsx89(SortIcon, { dir: header.column.getNextSortingOrder() }) })
3749
- ] });
3938
+ return /* @__PURE__ */ jsxs40(
3939
+ "th",
3940
+ {
3941
+ ...props,
3942
+ "data-clickable": "ok",
3943
+ onClick: header.column.getToggleSortingHandler(),
3944
+ className: twJoin37(props.className, canResize && "group relative"),
3945
+ children: [
3946
+ children,
3947
+ /* @__PURE__ */ jsx94("span", { className: "invisible ml-1.5 group-hover:visible", children: /* @__PURE__ */ jsx94(SortIcon, { dir: header.column.getNextSortingOrder() }) }),
3948
+ resizeHandle
3949
+ ]
3950
+ }
3951
+ );
3750
3952
  }
3751
- return /* @__PURE__ */ jsx89("th", { ...props, children });
3953
+ return /* @__PURE__ */ jsxs40("th", { ...props, className: twJoin37(props.className, canResize && "group relative"), children: [
3954
+ children,
3955
+ resizeHandle
3956
+ ] });
3752
3957
  };
3753
3958
  var SortIcon = ({ dir }) => {
3754
3959
  if (dir === "asc") {
3755
- return /* @__PURE__ */ jsx89(Icon, { icon: faArrowUpWideShort });
3960
+ return /* @__PURE__ */ jsx94(Icon, { icon: faArrowUpWideShort });
3756
3961
  }
3757
3962
  if (dir === "desc") {
3758
- return /* @__PURE__ */ jsx89(Icon, { icon: faArrowDownWideShort });
3963
+ return /* @__PURE__ */ jsx94(Icon, { icon: faArrowDownWideShort });
3759
3964
  }
3760
3965
  return null;
3761
3966
  };
3762
3967
 
3763
3968
  // src/core/table/Table.tsx
3764
- import { jsx as jsx90, jsxs as jsxs37 } from "react/jsx-runtime";
3765
- var variants = {
3969
+ import { Fragment as Fragment13, jsx as jsx95, jsxs as jsxs41 } from "react/jsx-runtime";
3970
+ var tableVariants = {
3766
3971
  default: "default",
3767
3972
  seamless: "seamless",
3768
3973
  transparent: "transparent",
@@ -3770,204 +3975,423 @@ var variants = {
3770
3975
  };
3771
3976
  var headerClassNames = (variant) => {
3772
3977
  switch (variant) {
3773
- case variants.transparent:
3978
+ case tableVariants.transparent:
3774
3979
  return {
3775
- cellClassName: "text-left text-sm font-medium text-gray-500 whitespace-nowrap px-2.5 py-3"
3980
+ cellClassName: "text-left text-sm font-medium text-muted whitespace-nowrap px-2.5 py-3"
3776
3981
  };
3777
- case variants.subtable:
3982
+ case tableVariants.subtable:
3778
3983
  return {
3779
3984
  rowClassName: "divide-x divide-gray-200",
3780
- cellClassName: "text-left text-sm font-medium text-gray-500 whitespace-nowrap border-b bg-gray-100 px-2 py-1.5"
3985
+ cellClassName: "text-left text-sm font-medium text-muted whitespace-nowrap sticky top-0 z-1 border-b bg-surface-neutral px-2 py-1.5"
3781
3986
  };
3782
- case variants.seamless:
3987
+ case tableVariants.seamless:
3783
3988
  return {
3784
- cellClassName: "text-left text-sm font-medium text-gray-500 whitespace-nowrap sticky top-0 z-1 border-b bg-gray-50 px-2 py-1.5 group data-[clickable]:cursor-pointer data-[clickable]:select-none data-[clickable]:hover:text-gray-800"
3989
+ cellClassName: "text-left text-sm font-medium text-muted whitespace-nowrap sticky top-0 z-1 border-b bg-surface-light px-2 py-1.5 group data-[clickable]:cursor-pointer data-[clickable]:select-none data-[clickable]:hover:text-gray-800"
3785
3990
  };
3786
- case variants.default:
3991
+ case tableVariants.default:
3787
3992
  default:
3788
3993
  return {
3789
- cellClassName: "text-left text-sm font-medium text-gray-500 whitespace-nowrap sticky top-0 z-1 border-b bg-gray-100 px-2 py-1.5 group data-[clickable]:cursor-pointer data-[clickable]:select-none data-[clickable]:hover:text-gray-800"
3994
+ cellClassName: "text-left text-sm font-medium text-muted whitespace-nowrap sticky top-0 z-1 border-b bg-surface-neutral px-2 py-1.5 group data-[clickable]:cursor-pointer data-[clickable]:select-none data-[clickable]:hover:text-gray-800"
3790
3995
  };
3791
3996
  }
3792
3997
  };
3793
3998
  var bodyClassNames = (variant) => {
3794
3999
  switch (variant) {
3795
- case variants.seamless:
4000
+ case tableVariants.seamless:
3796
4001
  return {
3797
- rowClassName: "[&:not(:last-child)_td]:border-gray-200",
3798
- cellClassName: "text-sm text-gray-700 whitespace-nowrap h-fit"
4002
+ rowClassName: "[&:not(:last-child)_td]:border-surface-neutral",
4003
+ cellClassName: "text-sm text-neutral whitespace-nowrap h-fit"
3799
4004
  };
3800
- case variants.transparent:
4005
+ case tableVariants.transparent:
3801
4006
  return {
3802
4007
  rootClassName: "rounded-lg bg-white outline outline-1 outline-gray-200",
3803
- rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-gray-200 [&:first-child_td:first-child]:rounded-tl-lg [&:first-child_td:last-child]:rounded-tr-lg [&:last-child_td:first-child]:rounded-bl-lg [&:last-child_td:last-child]:rounded-br-lg",
3804
- cellClassName: "text-sm text-gray-700 whitespace-nowrap p-2.5 py-1.5"
4008
+ rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-surface-neutral [&:first-child_td:first-child]:rounded-tl-lg [&:first-child_td:last-child]:rounded-tr-lg [&:last-child_td:first-child]:rounded-bl-lg [&:last-child_td:last-child]:rounded-br-lg",
4009
+ cellClassName: "text-sm text-neutral whitespace-nowrap p-2.5 py-1.5"
3805
4010
  };
3806
- case variants.subtable:
4011
+ case tableVariants.subtable:
3807
4012
  return {
3808
- rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-gray-200 divide-x divide-gray-200",
3809
- cellClassName: "text-sm text-gray-700 whitespace-nowrap p-2"
4013
+ rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-surface-neutral divide-x divide-gray-200",
4014
+ cellClassName: "text-sm text-neutral whitespace-nowrap p-2"
3810
4015
  };
3811
- case variants.default:
4016
+ case tableVariants.default:
3812
4017
  default:
3813
4018
  return {
3814
- rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-gray-200 data-[depth='0']:bg-gray-50",
3815
- cellClassName: "text-sm text-gray-700 whitespace-nowrap p-2"
4019
+ rowClassName: "[&:not(:last-child)_td]:border-b [&:not(:last-child)_td]:border-surface-neutral data-[depth='0']:bg-surface-light",
4020
+ cellClassName: "text-sm text-neutral whitespace-nowrap p-2"
3816
4021
  };
3817
4022
  }
3818
4023
  };
3819
- var Table = ({ variant = "default", loading, fillHeight, ...props }) => {
4024
+ var Table = ({ variant = "default", loading: loadingProp, ...props }) => {
4025
+ const loading = loadingProp ?? props.table.options.meta?.isLoading;
4026
+ const fetching = loadingProp ?? props.table.options.meta?.isFetching;
3820
4027
  const uiLoading = loading ? "loading" : void 0;
4028
+ const coreRows = props.table.getCoreRowModel().rows;
4029
+ const showLoadingBar = fetching && coreRows.length > 0;
4030
+ const resizeStyle = props.table.options.enableColumnResizing ? { width: props.table.getCenterTotalSize(), tableLayout: "fixed" } : void 0;
4031
+ const tableElementRef = props.table.options.meta?.tableElementRef ?? null;
3821
4032
  switch (variant) {
3822
- case variants.transparent:
3823
- return /* @__PURE__ */ jsxs37(
3824
- "table",
3825
- {
3826
- "data-ui": uiLoading,
3827
- className: "mb-auto min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none data-[ui=loading]:opacity-60 data-[ui=loading]:select-none",
3828
- children: [
3829
- /* @__PURE__ */ jsx90(TableHeader, { ...props, ...headerClassNames(variant) }),
3830
- /* @__PURE__ */ jsx90(TableBody, { ...props, ...bodyClassNames(variant), loading })
3831
- ]
3832
- }
3833
- );
3834
- case variants.subtable:
3835
- return /* @__PURE__ */ jsx90("div", { className: "mb-auto min-w-full", children: /* @__PURE__ */ jsxs37(
4033
+ case tableVariants.transparent:
4034
+ return /* @__PURE__ */ jsx95("div", { className: "relative mb-auto min-w-full", children: /* @__PURE__ */ jsxs41(
3836
4035
  "table",
3837
4036
  {
4037
+ ref: tableElementRef,
3838
4038
  "data-ui": uiLoading,
3839
- className: "min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none data-[ui=loading]:opacity-60 data-[ui=loading]:select-none",
4039
+ style: resizeStyle,
4040
+ className: twJoin38(
4041
+ "min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
4042
+ resizeStyle && "overflow-clip"
4043
+ ),
3840
4044
  children: [
3841
- /* @__PURE__ */ jsx90(TableHeader, { ...props, ...headerClassNames(variant) }),
3842
- /* @__PURE__ */ jsx90(TableBody, { ...props, ...bodyClassNames(variant), loading })
4045
+ /* @__PURE__ */ jsx95(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
4046
+ /* @__PURE__ */ jsx95(TableBody, { ...props, ...bodyClassNames(variant), loading })
3843
4047
  ]
3844
4048
  }
3845
4049
  ) });
3846
- case variants.seamless:
3847
- case variants.default:
3848
- default:
3849
- return /* @__PURE__ */ jsx90("div", { className: twJoin35("mb-auto overflow-auto rounded-md border border-gray-200 bg-white", fillHeight && "h-full min-h-0"), children: /* @__PURE__ */ jsx90("div", { className: "min-w-full", children: /* @__PURE__ */ jsxs37(
3850
- "table",
4050
+ case tableVariants.subtable:
4051
+ return /* @__PURE__ */ jsxs41("div", { className: "relative mb-auto min-w-full", children: [
4052
+ showLoadingBar && /* @__PURE__ */ jsx95(LoadingBar, { className: "absolute top-0 right-0 left-0 z-10 h-1 rounded-none" }),
4053
+ /* @__PURE__ */ jsxs41(
4054
+ "table",
4055
+ {
4056
+ ref: tableElementRef,
4057
+ "data-ui": uiLoading,
4058
+ style: resizeStyle,
4059
+ className: twJoin38(
4060
+ "min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
4061
+ resizeStyle && "overflow-clip"
4062
+ ),
4063
+ children: [
4064
+ /* @__PURE__ */ jsx95(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
4065
+ /* @__PURE__ */ jsx95(TableBody, { ...props, ...bodyClassNames(variant), loading })
4066
+ ]
4067
+ }
4068
+ )
4069
+ ] });
4070
+ case tableVariants.seamless:
4071
+ return /* @__PURE__ */ jsx95(
4072
+ "div",
3851
4073
  {
3852
- "data-ui": uiLoading,
3853
- className: "relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none data-[ui=loading]:opacity-60 data-[ui=loading]:select-none",
3854
- children: [
3855
- /* @__PURE__ */ jsx90(TableHeader, { ...props, ...headerClassNames(variant) }),
3856
- /* @__PURE__ */ jsx90(TableBody, { ...props, ...bodyClassNames(variant), loading })
3857
- ]
4074
+ className: twJoin38(
4075
+ "relative mb-auto rounded-md border bg-white",
4076
+ loading && coreRows.length === 0 ? "overflow-hidden" : "overflow-auto"
4077
+ ),
4078
+ children: /* @__PURE__ */ jsxs41(
4079
+ "table",
4080
+ {
4081
+ ref: tableElementRef,
4082
+ "data-ui": uiLoading,
4083
+ style: resizeStyle,
4084
+ className: twJoin38(
4085
+ "relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
4086
+ resizeStyle && "overflow-clip"
4087
+ ),
4088
+ children: [
4089
+ /* @__PURE__ */ jsx95(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
4090
+ /* @__PURE__ */ jsx95(TableBody, { ...props, ...bodyClassNames(variant), loading })
4091
+ ]
4092
+ }
4093
+ )
3858
4094
  }
3859
- ) }) });
4095
+ );
4096
+ case tableVariants.default:
4097
+ default:
4098
+ return /* @__PURE__ */ jsx95(DefaultTable, { ...props, loading, fetching });
3860
4099
  }
3861
4100
  };
4101
+ var DefaultTable = ({ table, loading, fetching }) => {
4102
+ const [sentinelRef, entry] = useIntersectionObserver();
4103
+ const infiniteScroll = table.options.meta?.infiniteScroll;
4104
+ const coreRows = table.getCoreRowModel().rows;
4105
+ const colCount = table.getAllLeafColumns().length;
4106
+ const uiLoading = loading ? "loading" : void 0;
4107
+ const showLoadingBar = fetching && coreRows.length > 0;
4108
+ const resizeStyle = table.options.enableColumnResizing ? { width: table.getCenterTotalSize(), tableLayout: "fixed" } : void 0;
4109
+ const tableElementRef = table.options.meta?.tableElementRef ?? null;
4110
+ useEffect7(() => {
4111
+ if (entry?.isIntersecting && infiniteScroll?.hasNextPage && !infiniteScroll.isFetchingNextPage) {
4112
+ infiniteScroll.fetchNextPage();
4113
+ }
4114
+ }, [entry?.isIntersecting, infiniteScroll]);
4115
+ const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx95("tr", { className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200", children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ jsx95("td", { className: "p-2", children: /* @__PURE__ */ jsx95(Skeleton, { className: "h-3 w-full" }) }, j)) }, `skeleton-${i}`)) : null;
4116
+ return /* @__PURE__ */ jsxs41(
4117
+ "div",
4118
+ {
4119
+ className: twJoin38(
4120
+ "relative mb-auto rounded-md border bg-white",
4121
+ coreRows.length === 0 ? twJoin38("h-full min-h-0", loading ? "overflow-hidden" : "overflow-auto") : "max-h-full min-h-0 overflow-auto"
4122
+ ),
4123
+ children: [
4124
+ showLoadingBar && /* @__PURE__ */ jsx95(LoadingBar, { className: "sticky top-0 right-0 left-0 z-10 -mb-1 h-1 rounded-none" }),
4125
+ /* @__PURE__ */ jsxs41(
4126
+ "table",
4127
+ {
4128
+ ref: tableElementRef,
4129
+ "data-ui": uiLoading,
4130
+ style: resizeStyle,
4131
+ className: twJoin38(
4132
+ "relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
4133
+ coreRows.length === 0 && !loading && "h-full",
4134
+ resizeStyle && "overflow-clip"
4135
+ ),
4136
+ children: [
4137
+ /* @__PURE__ */ jsx95(TableHeader, { table, variant: "default", ...headerClassNames("default") }),
4138
+ /* @__PURE__ */ jsx95(
4139
+ TableBody,
4140
+ {
4141
+ table,
4142
+ ...bodyClassNames("default"),
4143
+ loading,
4144
+ afterRows: /* @__PURE__ */ jsxs41(Fragment13, { children: [
4145
+ infiniteScroll?.hasNextPage && /* @__PURE__ */ jsx95("tr", { ref: sentinelRef, "aria-hidden": "true", style: { height: 0, border: "none", padding: 0 }, children: /* @__PURE__ */ jsx95("td", { colSpan: colCount, style: { height: 0, border: "none", padding: 0 } }) }),
4146
+ skeletonRows
4147
+ ] })
4148
+ }
4149
+ )
4150
+ ]
4151
+ }
4152
+ )
4153
+ ]
4154
+ }
4155
+ );
4156
+ };
4157
+
4158
+ // src/core/table/VirtualizedTable.tsx
4159
+ import { useVirtualizer } from "@tanstack/react-virtual";
4160
+ import { useEffect as useEffect8, useRef as useRef8 } from "react";
4161
+ import { twJoin as twJoin39 } from "tailwind-merge";
4162
+ import { jsx as jsx96, jsxs as jsxs42 } from "react/jsx-runtime";
4163
+ var DEFAULT_ROW_HEIGHT = 37;
4164
+ var DEFAULT_OVERSCAN = 5;
4165
+ var VirtualizedTable = ({
4166
+ table,
4167
+ variant = "default",
4168
+ loading: loadingProp,
4169
+ rowHeight = DEFAULT_ROW_HEIGHT,
4170
+ overscan = DEFAULT_OVERSCAN
4171
+ }) => {
4172
+ const loading = loadingProp ?? table.options.meta?.isLoading;
4173
+ const fetching = loadingProp ?? table.options.meta?.isFetching;
4174
+ const scrollRef = useRef8(null);
4175
+ const isSubtable = variant === "subtable";
4176
+ const infiniteScroll = table.options.meta?.infiniteScroll;
4177
+ const colCount = table.getVisibleLeafColumns().length;
4178
+ const coreRows = table.getCoreRowModel().rows;
4179
+ const rows = table.getRowModel().rows;
4180
+ const uiLoading = loading ? "loading" : void 0;
4181
+ const showLoadingBar = fetching && coreRows.length > 0;
4182
+ const resizeStyle = table.options.enableColumnResizing ? { width: table.getCenterTotalSize(), tableLayout: "fixed" } : void 0;
4183
+ const tableElementRef = table.options.meta?.tableElementRef ?? null;
4184
+ const rowVirtualizer = useVirtualizer({
4185
+ count: rows.length,
4186
+ getScrollElement: () => scrollRef.current,
4187
+ estimateSize: () => rowHeight,
4188
+ overscan
4189
+ });
4190
+ const virtualRows = rowVirtualizer.getVirtualItems();
4191
+ useEffect8(() => {
4192
+ const lastItem = virtualRows.at(-1);
4193
+ if (!lastItem) return;
4194
+ if (lastItem.index >= rows.length - 1 && infiniteScroll?.hasNextPage && !infiniteScroll.isFetchingNextPage) {
4195
+ infiniteScroll.fetchNextPage();
4196
+ }
4197
+ }, [virtualRows, rows.length, infiniteScroll]);
4198
+ const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx96("tr", { className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200", children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ jsx96("td", { className: "p-2", children: /* @__PURE__ */ jsx96(Skeleton, { className: "h-3 w-full" }) }, j)) }, `skeleton-${i}`)) : null;
4199
+ const paddingTop = virtualRows.length > 0 ? virtualRows[0]?.start ?? 0 : 0;
4200
+ const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (virtualRows.at(-1)?.end ?? 0) : 0;
4201
+ const { rootClassName: bodyRootClassName, ...bodyRowCellClassNames } = bodyClassNames(variant);
4202
+ return /* @__PURE__ */ jsxs42(
4203
+ "div",
4204
+ {
4205
+ ref: scrollRef,
4206
+ className: twJoin39(
4207
+ "relative mb-auto",
4208
+ isSubtable ? "min-w-full" : twJoin39(
4209
+ "rounded-md border bg-white",
4210
+ coreRows.length === 0 ? twJoin39("h-full", loading ? "overflow-hidden" : "overflow-auto overscroll-none") : "max-h-full min-h-0 overflow-auto overscroll-none"
4211
+ )
4212
+ ),
4213
+ children: [
4214
+ showLoadingBar && /* @__PURE__ */ jsx96(
4215
+ LoadingBar,
4216
+ {
4217
+ className: twJoin39("top-0 right-0 left-0 z-10 h-1 rounded-none", isSubtable ? "absolute" : "sticky -mb-1")
4218
+ }
4219
+ ),
4220
+ /* @__PURE__ */ jsxs42(
4221
+ "table",
4222
+ {
4223
+ ref: tableElementRef,
4224
+ "data-ui": uiLoading,
4225
+ style: resizeStyle,
4226
+ className: twJoin39(
4227
+ "relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
4228
+ !isSubtable && coreRows.length === 0 && !loading && "h-full",
4229
+ resizeStyle && "overflow-clip"
4230
+ ),
4231
+ children: [
4232
+ /* @__PURE__ */ jsx96(TableHeader, { table, variant, ...headerClassNames(variant) }),
4233
+ rows.length === 0 ? /* @__PURE__ */ jsx96(TableBody, { table, ...bodyClassNames(variant), loading }) : /* @__PURE__ */ jsxs42("tbody", { className: bodyRootClassName, children: [
4234
+ paddingTop > 0 && /* @__PURE__ */ jsx96("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx96("td", { colSpan: colCount, style: { height: paddingTop, padding: 0, border: "none" } }) }),
4235
+ virtualRows.map((virtualRow) => {
4236
+ const row = rows[virtualRow.index];
4237
+ return /* @__PURE__ */ jsx96(TableRow, { table, row, ...bodyRowCellClassNames }, row.id);
4238
+ }),
4239
+ paddingBottom > 0 && /* @__PURE__ */ jsx96("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx96("td", { colSpan: colCount, style: { height: paddingBottom, padding: 0, border: "none" } }) }),
4240
+ skeletonRows
4241
+ ] })
4242
+ ]
4243
+ }
4244
+ )
4245
+ ]
4246
+ }
4247
+ );
4248
+ };
3862
4249
 
3863
4250
  // src/core/table/useTable.ts
3864
4251
  import { getCoreRowModel, useReactTable } from "@tanstack/react-table";
3865
- var useTable = (options) => {
4252
+ import { useLayoutEffect } from "react";
4253
+ import { useEffectEvent } from "use-effect-event";
4254
+ var useTable = ({ tableRef, ...options }) => {
3866
4255
  const enableSorting = !!options.state?.sorting && !!options.onSortingChange;
3867
- return useReactTable({
4256
+ const table = useReactTable({
3868
4257
  ...options,
3869
4258
  getCoreRowModel: getCoreRowModel(),
3870
4259
  // This is a hack to allow the columns to flex by default,
3871
4260
  // and, then when size is overridden, they become fixed
3872
4261
  defaultColumn: {
3873
4262
  ...options.defaultColumn,
3874
- minSize: 0,
3875
- size: 0
4263
+ minSize: options.columnResizeMode ? options.defaultColumn?.minSize ?? 50 : 0,
4264
+ size: options.defaultColumn?.size ?? 0
3876
4265
  },
3877
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3878
4266
  meta: {
4267
+ isLoading: options.isLoading,
4268
+ isFetching: options.isFetching,
3879
4269
  emptyText: options.emptyText,
3880
4270
  activeRowId: options.activeRowId,
3881
4271
  onRowClick: options.onRowClick,
3882
- staticSubRows: options.staticSubRows
4272
+ staticSubRows: options.staticSubRows,
4273
+ tableElementRef: options.tableElementRef,
4274
+ infiniteScroll: options.infiniteScroll
3883
4275
  },
3884
- /* eslint-enable @typescript-eslint/no-unsafe-assignment */
3885
4276
  manualSorting: true,
3886
4277
  enableMultiSort: false,
3887
- enableSorting
4278
+ enableSorting,
4279
+ enableColumnResizing: !!options.columnResizeMode
3888
4280
  });
4281
+ const syncTableRef = useEffectEvent(() => {
4282
+ tableRef?.(table);
4283
+ });
4284
+ useLayoutEffect(() => {
4285
+ syncTableRef();
4286
+ }, [table]);
4287
+ return table;
3889
4288
  };
3890
4289
 
3891
4290
  // src/core/tab-group/TabGroup.tsx
3892
4291
  import { ToggleGroup, ToggleGroupItem } from "@radix-ui/react-toggle-group";
3893
- import { Fragment as Fragment13 } from "react";
3894
- import { twJoin as twJoin36 } from "tailwind-merge";
3895
- import { jsx as jsx91, jsxs as jsxs38 } from "react/jsx-runtime";
3896
- var TabGroup = ({ tabs, currentTab, setCurrentTab }) => {
3897
- return /* @__PURE__ */ jsx91(
4292
+ import { motion } from "motion/react";
4293
+ import { Fragment as Fragment14, useId as useId2 } from "react";
4294
+ import { twJoin as twJoin40 } from "tailwind-merge";
4295
+ import { jsx as jsx97, jsxs as jsxs43 } from "react/jsx-runtime";
4296
+ var TabGroup = ({
4297
+ tabs,
4298
+ currentTab,
4299
+ setCurrentTab,
4300
+ size = "md"
4301
+ }) => {
4302
+ const layoutId = useId2();
4303
+ return /* @__PURE__ */ jsx97(
3898
4304
  ToggleGroup,
3899
4305
  {
3900
4306
  type: "single",
3901
4307
  value: currentTab,
3902
4308
  onValueChange: (value) => {
3903
- if (value) {
3904
- setCurrentTab(value);
3905
- }
4309
+ setCurrentTab(value);
3906
4310
  },
3907
- className: "flex w-full justify-between gap-1 rounded-lg border border-gray-200 p-1",
3908
- children: tabs.map(({ id, label, disabled }, index) => /* @__PURE__ */ jsxs38(Fragment13, { children: [
3909
- /* @__PURE__ */ jsx91(
4311
+ className: twJoin40(
4312
+ "flex w-full justify-between gap-1 rounded-lg border border-surface-neutral bg-surface-light",
4313
+ size === "sm" ? "p-1" : "p-0.5"
4314
+ ),
4315
+ children: tabs.map(({ id, label, disabled }, index) => /* @__PURE__ */ jsxs43(Fragment14, { children: [
4316
+ /* @__PURE__ */ jsxs43(
3910
4317
  ToggleGroupItem,
3911
4318
  {
3912
4319
  value: id,
3913
4320
  disabled,
3914
- className: twJoin36(
3915
- "flex w-full items-center justify-center rounded-md border px-2 py-2 transition",
4321
+ className: twJoin40(
4322
+ "relative flex w-full items-center justify-center rounded-md border transition-colors",
3916
4323
  disabled && "cursor-not-allowed opacity-50",
3917
- !disabled && "hover:bg-indigo-50 focus-visible:border-indigo-700 focus-visible:outline-none",
4324
+ !disabled && "focus-visible:border-indigo-700 focus-visible:outline-none",
3918
4325
  id !== currentTab && "border-transparent",
3919
4326
  id !== currentTab && !disabled && "hover:border-indigo-200",
3920
- id === currentTab && !disabled && "border border-indigo-400 bg-white ring-2 ring-indigo-100"
4327
+ id === currentTab && !disabled && "border-indigo-400 bg-surface-neutral",
4328
+ size === "sm" ? "px-1.5 py-1" : "px-2 py-1"
3921
4329
  ),
3922
- children: label
4330
+ children: [
4331
+ id === currentTab && !disabled && /* @__PURE__ */ jsx97(
4332
+ motion.span,
4333
+ {
4334
+ layoutId,
4335
+ className: "absolute inset-0 rounded-md bg-button-white ring-2 ring-indigo-100",
4336
+ transition: { type: "spring", stiffness: 500, damping: 40 }
4337
+ }
4338
+ ),
4339
+ /* @__PURE__ */ jsx97("span", { className: "relative z-1", children: label })
4340
+ ]
3923
4341
  }
3924
4342
  ),
3925
- index !== tabs.length - 1 && /* @__PURE__ */ jsx91("div", { className: "my-1 flex w-[1px] bg-gray-300" })
4343
+ index !== tabs.length - 1 && /* @__PURE__ */ jsx97("div", { className: "z-2 my-1 flex w-px bg-gray-300" })
3926
4344
  ] }, id))
3927
4345
  }
3928
4346
  );
3929
4347
  };
3930
4348
 
3931
4349
  // src/core/tabs/Tabs.tsx
3932
- import {
3933
- Content as Content8,
3934
- List,
3935
- Root as Root8
3936
- } from "@radix-ui/react-tabs";
3937
- import { twJoin as twJoin37 } from "tailwind-merge";
4350
+ import { Content as Content8, List, Root as Root8 } from "@radix-ui/react-tabs";
4351
+ import { useId as useId3 } from "react";
4352
+ import { twJoin as twJoin41 } from "tailwind-merge";
3938
4353
 
3939
4354
  // src/core/tabs/Trigger.tsx
3940
4355
  import { Trigger as Trigger7 } from "@radix-ui/react-tabs";
3941
- import { twMerge as twMerge10 } from "tailwind-merge";
3942
- import { jsx as jsx92, jsxs as jsxs39 } from "react/jsx-runtime";
4356
+ import { motion as motion2 } from "motion/react";
4357
+ import { twMerge as twMerge13 } from "tailwind-merge";
4358
+ import { jsx as jsx98, jsxs as jsxs44 } from "react/jsx-runtime";
3943
4359
  var TabsTrigger = ({
3944
4360
  id,
3945
4361
  label,
3946
4362
  disabled,
3947
- dataTestId,
3948
4363
  fsId,
3949
4364
  extra,
3950
- className
3951
- }) => /* @__PURE__ */ jsxs39(
4365
+ className,
4366
+ isActive,
4367
+ layoutId
4368
+ }) => /* @__PURE__ */ jsxs44(
3952
4369
  Trigger7,
3953
4370
  {
3954
- className: twMerge10(
3955
- "h-full space-x-1 border-b-2 px-1 py-1 font-medium whitespace-nowrap transition-colors duration-150 data-[state='active']:border-indigo-500 data-[state='active']:text-indigo-700 data-[state='inactive']:border-transparent data-[state='inactive']:text-gray-500 data-[state='inactive']:hover:border-gray-200 data-[state='inactive']:hover:text-gray-700",
4371
+ className: twMerge13(
4372
+ "relative h-full border-b-2 border-transparent px-1 py-1 font-medium whitespace-nowrap transition-colors duration-150 data-[state='active']:text-indigo-700 data-[state='inactive']:text-muted data-[state='inactive']:hover:border-surface-neutral data-[state='inactive']:hover:text-neutral",
3956
4373
  className
3957
4374
  ),
3958
4375
  value: id,
3959
4376
  disabled,
3960
- "data-testid": dataTestId,
3961
4377
  "fs-id": fsId,
3962
4378
  children: [
3963
4379
  label,
3964
- extra && /* @__PURE__ */ jsx92("span", { children: extra })
4380
+ extra && /* @__PURE__ */ jsx98("span", { children: extra }),
4381
+ isActive && /* @__PURE__ */ jsx98(
4382
+ motion2.span,
4383
+ {
4384
+ layoutId,
4385
+ className: "absolute right-0 -bottom-0.5 left-0 h-0.5 bg-current",
4386
+ transition: { type: "spring", stiffness: 500, damping: 40 }
4387
+ }
4388
+ )
3965
4389
  ]
3966
4390
  }
3967
4391
  );
3968
4392
 
3969
4393
  // src/core/tabs/Tabs.tsx
3970
- import { jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
4394
+ import { jsx as jsx99, jsxs as jsxs45 } from "react/jsx-runtime";
3971
4395
  var [Provider2, useContext6] = createContextHelper();
3972
4396
  var Tabs = ({
3973
4397
  tabs,
@@ -3980,16 +4404,19 @@ var Tabs = ({
3980
4404
  children,
3981
4405
  extraNode
3982
4406
  }) => {
3983
- return /* @__PURE__ */ jsx93(Provider2, { currentTab, children: /* @__PURE__ */ jsxs40(Root8, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children: [
3984
- /* @__PURE__ */ jsxs40("div", { className: twJoin37("flex gap-4", tabsListContainerClassName), children: [
3985
- /* @__PURE__ */ jsx93(List, { className: twJoin37("flex space-x-4 overflow-x-auto", tabsListClassName), children: tabs.map(({ id, label, disabled, fsId }) => /* @__PURE__ */ jsx93(
4407
+ const layoutId = useId3();
4408
+ return /* @__PURE__ */ jsx99(Provider2, { currentTab, children: /* @__PURE__ */ jsxs45(Root8, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children: [
4409
+ /* @__PURE__ */ jsxs45("div", { className: twJoin41("flex gap-4", tabsListContainerClassName), children: [
4410
+ /* @__PURE__ */ jsx99(List, { className: twJoin41("flex space-x-4 overflow-x-auto", tabsListClassName), children: tabs.map(({ id, label, disabled, fsId }) => /* @__PURE__ */ jsx99(
3986
4411
  TabsTrigger,
3987
4412
  {
3988
4413
  id,
3989
4414
  label,
3990
4415
  disabled,
3991
4416
  className: tabsListTriggerClassName,
3992
- fsId
4417
+ fsId,
4418
+ isActive: currentTab === id,
4419
+ layoutId
3993
4420
  },
3994
4421
  id
3995
4422
  )) }),
@@ -3999,7 +4426,7 @@ var Tabs = ({
3999
4426
  ] }) });
4000
4427
  };
4001
4428
  var TabContent = ({ id, ...rest }) => {
4002
- return /* @__PURE__ */ jsx93(Content8, { value: id, ...rest });
4429
+ return /* @__PURE__ */ jsx99(Content8, { value: id, ...rest });
4003
4430
  };
4004
4431
  var AlwaysMountedTabContent = ({
4005
4432
  id,
@@ -4009,29 +4436,20 @@ var AlwaysMountedTabContent = ({
4009
4436
  }) => {
4010
4437
  const { currentTab } = useContext6();
4011
4438
  const visible = id === currentTab;
4012
- return /* @__PURE__ */ jsx93("div", { className: twJoin37(visible ? visibleClassName : "hidden", className), children });
4439
+ return /* @__PURE__ */ jsx99("div", { className: twJoin41(visible ? visibleClassName : "hidden", className), children });
4013
4440
  };
4014
4441
  Tabs.TabContent = TabContent;
4015
4442
  Tabs.AlwaysMountedTabContent = AlwaysMountedTabContent;
4016
- var createTypedTabs = () => ({
4017
- Root: ({ currentTab, setCurrentTab, ...props }) => {
4018
- const handleValueChange = setCurrentTab ? (value) => setCurrentTab(value) : void 0;
4019
- return /* @__PURE__ */ jsx93(Root8, { ...props, value: currentTab, onValueChange: handleValueChange });
4020
- },
4021
- List: ({ className, ...props }) => /* @__PURE__ */ jsx93(List, { ...props, className: twJoin37("flex space-x-4 overflow-x-auto", className) }),
4022
- Trigger: TabsTrigger,
4023
- Content: TabContent
4024
- });
4025
4443
 
4026
4444
  // src/core/tabs/ScrollTabsLayout.tsx
4027
- import { useCallback as useCallback9, useEffect as useEffect7, useRef as useRef7, useState as useState10 } from "react";
4028
- import { twJoin as twJoin38 } from "tailwind-merge";
4029
- import { Fragment as Fragment14, jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
4445
+ import { useCallback as useCallback10, useEffect as useEffect9, useRef as useRef9, useState as useState11 } from "react";
4446
+ import { twJoin as twJoin42 } from "tailwind-merge";
4447
+ import { Fragment as Fragment15, jsx as jsx100, jsxs as jsxs46 } from "react/jsx-runtime";
4030
4448
  var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
4031
- const [selectedTabName, setSelectedTabName] = useState10(tabs[0].tabName);
4032
- const scrollContainerRef = useRef7(null);
4033
- const tabRefs = useRef7({});
4034
- const handleSelectTab = useCallback9(
4449
+ const [selectedTabName, setSelectedTabName] = useState11(tabs[0].tabName);
4450
+ const scrollContainerRef = useRef9(null);
4451
+ const tabRefs = useRef9({});
4452
+ const handleSelectTab = useCallback10(
4035
4453
  (tabId) => {
4036
4454
  scrollContainerRef.current?.scrollTo({
4037
4455
  top: tabRefs.current[tabId].offsetTop,
@@ -4042,7 +4460,7 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
4042
4460
  },
4043
4461
  [onSelectTab]
4044
4462
  );
4045
- useEffect7(() => {
4463
+ useEffect9(() => {
4046
4464
  const scrollContainer = scrollContainerRef.current;
4047
4465
  const handleScroll = (e) => {
4048
4466
  Object.entries(tabRefs.current).forEach(([tabName, tabRef]) => {
@@ -4057,8 +4475,8 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
4057
4475
  scrollContainer?.removeEventListener("scroll", handleScroll);
4058
4476
  };
4059
4477
  });
4060
- return /* @__PURE__ */ jsxs41(Fragment14, { children: [
4061
- /* @__PURE__ */ jsx94(
4478
+ return /* @__PURE__ */ jsxs46(Fragment15, { children: [
4479
+ /* @__PURE__ */ jsx100(
4062
4480
  Tabs,
4063
4481
  {
4064
4482
  currentTab: selectedTabName,
@@ -4066,36 +4484,47 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
4066
4484
  tabs: tabs.map((tab) => ({ id: tab.tabName, label: tab.tabName }))
4067
4485
  }
4068
4486
  ),
4069
- /* @__PURE__ */ jsx94("hr", {}),
4070
- /* @__PURE__ */ jsxs41("div", { ref: scrollContainerRef, className: "relative h-screen overflow-y-auto", children: [
4071
- tabs.map((tab) => /* @__PURE__ */ jsx94(
4487
+ /* @__PURE__ */ jsx100("hr", {}),
4488
+ /* @__PURE__ */ jsxs46("div", { ref: scrollContainerRef, className: "relative h-screen overflow-y-auto", children: [
4489
+ tabs.map((tab) => /* @__PURE__ */ jsx100(
4072
4490
  "div",
4073
4491
  {
4074
4492
  ref: (el) => el ? tabRefs.current[tab.tabName] = el : void 0,
4075
- className: twJoin38("first:pt-4", sectionClassName),
4493
+ className: twJoin42("first:pt-4", sectionClassName),
4076
4494
  children: tab.content
4077
4495
  },
4078
4496
  tab.tabName
4079
4497
  )),
4080
- /* @__PURE__ */ jsx94("div", { className: "h-screen" })
4498
+ /* @__PURE__ */ jsx100("div", { className: "h-screen" })
4081
4499
  ] })
4082
4500
  ] });
4083
4501
  };
4084
4502
 
4085
4503
  // src/core/tabs/ComposableTabs.tsx
4086
4504
  import { Content as Content9, List as List2, Root as Root9 } from "@radix-ui/react-tabs";
4087
- import { twJoin as twJoin39 } from "tailwind-merge";
4088
- import { jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
4505
+ import { useId as useId4 } from "react";
4506
+ import { twJoin as twJoin43 } from "tailwind-merge";
4507
+ import { jsx as jsx101, jsxs as jsxs47 } from "react/jsx-runtime";
4089
4508
  var [TabsProvider, useTabsContext] = createContextHelper();
4090
4509
  var ComposableTabsList = ({ className, containerClassName, extraNode }) => {
4091
- const { tabs } = useTabsContext();
4092
- return /* @__PURE__ */ jsxs42("div", { className: twJoin39("flex gap-4", containerClassName), children: [
4093
- /* @__PURE__ */ jsx95(List2, { className: twJoin39("flex space-x-4 overflow-x-auto", className), children: tabs.map(({ id, label, disabled }) => /* @__PURE__ */ jsx95(TabsTrigger, { id, label, disabled }, id)) }),
4510
+ const { tabs, currentTab, layoutId } = useTabsContext();
4511
+ return /* @__PURE__ */ jsxs47("div", { className: twJoin43("flex gap-4", containerClassName), children: [
4512
+ /* @__PURE__ */ jsx101(List2, { className: twJoin43("flex space-x-4 overflow-x-auto", className), children: tabs.map(({ id, label, disabled }) => /* @__PURE__ */ jsx101(
4513
+ TabsTrigger,
4514
+ {
4515
+ id,
4516
+ label,
4517
+ disabled,
4518
+ isActive: currentTab === id,
4519
+ layoutId
4520
+ },
4521
+ id
4522
+ )) }),
4094
4523
  extraNode
4095
4524
  ] });
4096
4525
  };
4097
4526
  var ComposableTabContent = ({ id, ...rest }) => {
4098
- return /* @__PURE__ */ jsx95(Content9, { value: id, ...rest });
4527
+ return /* @__PURE__ */ jsx101(Content9, { value: id, ...rest });
4099
4528
  };
4100
4529
  var ComposableAlwaysMountedTabContent = ({
4101
4530
  id,
@@ -4105,7 +4534,7 @@ var ComposableAlwaysMountedTabContent = ({
4105
4534
  }) => {
4106
4535
  const { currentTab } = useTabsContext();
4107
4536
  const visible = id === currentTab;
4108
- return /* @__PURE__ */ jsx95("div", { className: twJoin39(visible ? visibleClassName : "hidden", className), children });
4537
+ return /* @__PURE__ */ jsx101("div", { className: twJoin43(visible ? visibleClassName : "hidden", className), children });
4109
4538
  };
4110
4539
  var ComposableTabsRoot = ({
4111
4540
  tabs,
@@ -4114,7 +4543,8 @@ var ComposableTabsRoot = ({
4114
4543
  className,
4115
4544
  children
4116
4545
  }) => {
4117
- return /* @__PURE__ */ jsx95(TabsProvider, { tabs, currentTab, children: /* @__PURE__ */ jsx95(Root9, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children }) });
4546
+ const layoutId = useId4();
4547
+ return /* @__PURE__ */ jsx101(TabsProvider, { tabs, currentTab, layoutId, children: /* @__PURE__ */ jsx101(Root9, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children }) });
4118
4548
  };
4119
4549
  var ComposableTabs = {
4120
4550
  Root: ComposableTabsRoot,
@@ -4124,33 +4554,33 @@ var ComposableTabs = {
4124
4554
  };
4125
4555
 
4126
4556
  // src/core/tag/Tag.tsx
4127
- import { faXmark as faXmark5 } from "@fortawesome/free-solid-svg-icons";
4128
- import * as React12 from "react";
4129
- import { jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
4130
- var TagLabel = ({ children, removable, onRemove, intent = "default", ...rest }, ref) => /* @__PURE__ */ jsxs43(Label, { ...rest, ref, intent, children: [
4557
+ import { faClose as faClose3 } from "@fortawesome/sharp-solid-svg-icons";
4558
+ import * as React14 from "react";
4559
+ import { jsx as jsx102, jsxs as jsxs48 } from "react/jsx-runtime";
4560
+ var TagLabel = ({ children, removable, onRemove, intent = "default", ...rest }, ref) => /* @__PURE__ */ jsxs48(Label, { ...rest, ref, intent, children: [
4131
4561
  children,
4132
- removable && /* @__PURE__ */ jsx96(
4562
+ removable && /* @__PURE__ */ jsx102(
4133
4563
  "button",
4134
4564
  {
4135
- className: "ml-1 inline-flex h-xs items-center px-1 text-gray-500 hover:text-gray-700 focus:outline-hidden",
4565
+ className: "ml-1 inline-flex h-xs items-center px-1 text-muted hover:text-neutral focus:outline-hidden",
4136
4566
  onClick: onRemove,
4137
- children: /* @__PURE__ */ jsx96(Icon, { icon: faXmark5 })
4567
+ children: /* @__PURE__ */ jsx102(Icon, { icon: faClose3 })
4138
4568
  }
4139
4569
  )
4140
4570
  ] });
4141
- var TagImpl = React12.forwardRef(TagLabel);
4571
+ var TagImpl = React14.forwardRef(TagLabel);
4142
4572
  var Tag = ({ tooltip, ...rest }) => {
4143
4573
  if (!tooltip) {
4144
- return /* @__PURE__ */ jsx96(TagImpl, { ...rest });
4574
+ return /* @__PURE__ */ jsx102(TagImpl, { ...rest });
4145
4575
  }
4146
- return /* @__PURE__ */ jsx96(Tooltip, { trigger: /* @__PURE__ */ jsx96(TagImpl, { ...rest }), content: /* @__PURE__ */ jsx96("p", { className: "text-sm", children: tooltip }) });
4576
+ return /* @__PURE__ */ jsx102(Tooltip, { trigger: /* @__PURE__ */ jsx102(TagImpl, { ...rest }), content: /* @__PURE__ */ jsx102("p", { className: "text-sm", children: tooltip }) });
4147
4577
  };
4148
4578
 
4149
4579
  // src/core/utils/useIsHovered.ts
4150
- import { useEffect as useEffect8, useState as useState11 } from "react";
4580
+ import { useEffect as useEffect10, useState as useState12 } from "react";
4151
4581
  var useIsHovered = (ref) => {
4152
- const [isHovered, setIsHovered] = useState11(false);
4153
- useEffect8(() => {
4582
+ const [isHovered, setIsHovered] = useState12(false);
4583
+ useEffect10(() => {
4154
4584
  const handleMouseMove = () => {
4155
4585
  if (ref.current?.matches(":hover")) {
4156
4586
  setIsHovered(true);
@@ -4178,10 +4608,13 @@ export {
4178
4608
  AlertModal,
4179
4609
  AsyncMultiSelect,
4180
4610
  AsyncSelect,
4611
+ Avatar,
4612
+ AvatarGroup,
4613
+ AvatarWithName,
4181
4614
  Button,
4182
4615
  ButtonGroup,
4183
- CURRENCY_REGEX,
4184
4616
  Callout,
4617
+ Card,
4185
4618
  Checkbox,
4186
4619
  Collapsible,
4187
4620
  CollapsibleSection,
@@ -4211,7 +4644,7 @@ export {
4211
4644
  FormSelect,
4212
4645
  FormSwitch,
4213
4646
  FormTextArea,
4214
- FullscreenModal,
4647
+ FullscreenModalNamespace as FullscreenModal,
4215
4648
  HeaderTile,
4216
4649
  Icon,
4217
4650
  IndeterminateCheckbox,
@@ -4231,7 +4664,6 @@ export {
4231
4664
  PercentInput,
4232
4665
  PhoneNumber,
4233
4666
  Popover,
4234
- RING_COLOR_CLASSNAME,
4235
4667
  RadioButtonGroup,
4236
4668
  RadioButtonItem,
4237
4669
  ScrollTabsLayout,
@@ -4254,39 +4686,28 @@ export {
4254
4686
  TextAreaComp,
4255
4687
  Tooltip,
4256
4688
  TooltipContent,
4689
+ TwoCirclesSpinner,
4257
4690
  UncontrolledField,
4258
4691
  UncontrolledFieldProvider,
4259
- asNullish,
4260
- asNumericStr,
4261
- asOptional,
4262
- asRequiredCustom,
4263
- buildZodIssue,
4692
+ VirtualizedTable,
4693
+ bodyClassNames,
4264
4694
  buttonStyles,
4265
4695
  copyToClipboard,
4266
4696
  createContextHelper,
4267
4697
  createToggleContextHelper,
4268
- createTypedTabs,
4269
4698
  doesSelectItemMatch,
4270
- dollarsStrSchema,
4271
4699
  formatPhoneNumber,
4272
4700
  formatPhoneNumberForDisplay,
4273
4701
  getCountry,
4274
4702
  getFieldError,
4703
+ getInitials,
4704
+ headerClassNames,
4275
4705
  inputBoxStyles,
4276
4706
  inputStyles,
4277
4707
  isValidPhoneNumber,
4278
4708
  linkStyles,
4279
4709
  localStoragePersist,
4280
- npiSchema,
4281
- npiSchemaOptional,
4282
- requiredDollarsStrSchema,
4283
- requiredDollarsStrSchemaWithCustomMessage,
4284
- requiredNonZeroDollarsStrSchema,
4285
- requiredPositiveDollarsStrSchema,
4286
- requiredPositiveOrZeroDollarsStrSchema,
4287
- selectedAmountSchema,
4288
- taxIdSchema,
4289
- taxonomyCodeSchema,
4710
+ tableVariants,
4290
4711
  useAsyncMultiSelect,
4291
4712
  useAsyncSelect,
4292
4713
  useControlledField,
@@ -4298,8 +4719,9 @@ export {
4298
4719
  useDrawerResize,
4299
4720
  useFieldArray,
4300
4721
  useForm,
4301
- useFormContext,
4722
+ useFormContext2 as useFormContext,
4302
4723
  useFormState2 as useFormState,
4724
+ useIntersectionObserver,
4303
4725
  useIsEditing,
4304
4726
  useIsHovered,
4305
4727
  useIsVisible,