@timbal-ai/timbal-react 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +43 -4
  3. package/dist/app.cjs +3770 -1506
  4. package/dist/app.d.cts +76 -31
  5. package/dist/app.d.ts +76 -31
  6. package/dist/app.esm.js +30 -8
  7. package/dist/{chart-artifact-C8-Py6lc.d.cts → chart-artifact-C2pZQsaP.d.ts} +247 -41
  8. package/dist/{chart-artifact-CMnDys2t.d.ts → chart-artifact-VAqgH-My.d.cts} +247 -41
  9. package/dist/{chat-ClmzWzCX.d.cts → chat-DDsp-Vzz.d.cts} +1 -1
  10. package/dist/{chat-ClmzWzCX.d.ts → chat-DDsp-Vzz.d.ts} +1 -1
  11. package/dist/chat.cjs +280 -123
  12. package/dist/chat.d.cts +3 -3
  13. package/dist/chat.d.ts +3 -3
  14. package/dist/chat.esm.js +4 -3
  15. package/dist/chunk-24B4I4XC.esm.js +232 -0
  16. package/dist/{chunk-VOWNCS3F.esm.js → chunk-6SQMTBPL.esm.js} +1669 -504
  17. package/dist/chunk-EDEKQYSU.esm.js +10 -0
  18. package/dist/{chunk-QIABF4KB.esm.js → chunk-ELEY66OH.esm.js} +2 -2
  19. package/dist/{chunk-THBA27QY.esm.js → chunk-HSL36SJ4.esm.js} +243 -124
  20. package/dist/chunk-JJOO4PR5.esm.js +391 -0
  21. package/dist/{chunk-QU7ET55D.esm.js → chunk-MBS7XHV2.esm.js} +335 -192
  22. package/dist/chunk-NO5AWNWT.esm.js +1066 -0
  23. package/dist/{chunk-VXMM2HX7.esm.js → chunk-R4RQT2XQ.esm.js} +3 -3
  24. package/dist/{chunk-OFWC4MIY.esm.js → chunk-TMP7RIA7.esm.js} +5 -3
  25. package/dist/{chunk-GQBYZRD7.esm.js → chunk-WQIQW7EM.esm.js} +40 -28
  26. package/dist/{chunk-OH23AX2V.esm.js → chunk-YYEI6XME.esm.js} +441 -957
  27. package/dist/{circular-progress-Ci8L-Hfa.d.cts → circular-progress-B9nnwzCu.d.cts} +20 -78
  28. package/dist/{circular-progress-Ci8L-Hfa.d.ts → circular-progress-B9nnwzCu.d.ts} +20 -78
  29. package/dist/index.cjs +5547 -3192
  30. package/dist/index.d.cts +10 -8
  31. package/dist/index.d.ts +10 -8
  32. package/dist/index.esm.js +76 -44
  33. package/dist/kanban-FFBeaZPS.d.cts +212 -0
  34. package/dist/kanban-FFBeaZPS.d.ts +212 -0
  35. package/dist/{layout-BTJyU8wd.d.ts → layout-CuKeSY74.d.ts} +1 -1
  36. package/dist/{layout-C2G-FcER.d.cts → layout-PzVwkJyL.d.cts} +1 -1
  37. package/dist/site.cjs +429 -0
  38. package/dist/site.d.cts +198 -0
  39. package/dist/site.d.ts +198 -0
  40. package/dist/site.esm.js +23 -0
  41. package/dist/studio.cjs +722 -363
  42. package/dist/studio.d.cts +2 -2
  43. package/dist/studio.d.ts +2 -2
  44. package/dist/studio.esm.js +8 -6
  45. package/dist/styles.css +56 -0
  46. package/dist/{timbal-v2-button-CNfdwGq4.d.cts → timbal-v2-button-DCAZNyUx.d.cts} +3 -3
  47. package/dist/{timbal-v2-button-CNfdwGq4.d.ts → timbal-v2-button-DCAZNyUx.d.ts} +3 -3
  48. package/dist/ui.cjs +1553 -708
  49. package/dist/ui.d.cts +11 -4
  50. package/dist/ui.d.ts +11 -4
  51. package/dist/ui.esm.js +45 -36
  52. package/dist/{welcome-DXqsGTwH.d.ts → welcome-B00oH5Io.d.cts} +5 -1
  53. package/dist/{welcome-BFGRoNfK.d.cts → welcome-DU-4NTjZ.d.ts} +5 -1
  54. package/package.json +9 -1
  55. package/dist/button-BoyX5pM_.d.cts +0 -18
  56. package/dist/button-BoyX5pM_.d.ts +0 -18
  57. package/dist/chunk-UCGVL7ZY.esm.js +0 -52
@@ -1,13 +1,187 @@
1
- // src/utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
1
+ import {
2
+ cn
3
+ } from "./chunk-EDEKQYSU.esm.js";
7
4
 
8
- // src/ui/timbal-v2-button.tsx
9
- import * as React from "react";
5
+ // src/ui/button.tsx
6
+ import { cva } from "class-variance-authority";
10
7
  import { Slot } from "radix-ui";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var SOLID_SKEUOMORPHIC_SHADOW = "shadow-skeuomorphic-solid";
10
+ var BORDERED_SKEUOMORPHIC_SHADOW = "shadow-skeuomorphic-bordered";
11
+ var buttonVariants = cva(
12
+ cn(
13
+ "relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center whitespace-nowrap font-medium",
14
+ "transition-all duration-300 ease-in-out outline-none border",
15
+ "focus-visible:ring-4 focus-visible:ring-primary/20 focus-visible:ring-offset-0",
16
+ "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:pointer-events-none",
17
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5",
18
+ // Overflow hidden can clip out-of-bounds shadow, so we use precise overflow management and rounded-[inherit] on pseudo overlays
19
+ "after:absolute after:inset-0 after:rounded-[inherit] after:pointer-events-none after:transition-opacity after:duration-300 after:ease-in-out after:opacity-0"
20
+ ),
21
+ {
22
+ variants: {
23
+ color: {
24
+ primary: cn(
25
+ // Exact Premium Untitled UI primary BLACK / dark charcoal: gradient + borders
26
+ "bg-gradient-to-b from-[#344054] to-[#0F1117] text-white border-[#1A1E29]",
27
+ "hover:border-[#181C26]",
28
+ "active:border-[#0A0D14]",
29
+ SOLID_SKEUOMORPHIC_SHADOW,
30
+ // Hover/active overlays for beautiful animation (the gradient is static, the overlay opacity is transitioned)
31
+ "after:bg-white/[0.08] hover:after:opacity-100 active:after:bg-black/[0.12]",
32
+ // Premium Dark Mode inversion: Primary becomes white, popping out elegantly
33
+ "dark:bg-gradient-to-b dark:from-white dark:to-[#F9FAFB] dark:text-[#10121C] dark:border-white",
34
+ "dark:hover:border-[#D0D5DD] dark:hover:text-[#10121C]",
35
+ "dark:shadow-skeuomorphic-bordered",
36
+ "dark:after:bg-black/[0.04] dark:active:after:bg-black/[0.08]"
37
+ ),
38
+ secondary: cn(
39
+ // Exact Untitled UI secondary: premium white/gray gradient + borders
40
+ "bg-gradient-to-b from-white to-[#F9FAFB] text-[#344054] border-[#D0D5DD]",
41
+ "hover:text-[#1D2939] hover:border-[#D0D5DD]",
42
+ BORDERED_SKEUOMORPHIC_SHADOW,
43
+ // Hover/active overlays for white/gray gradient
44
+ "after:bg-black/[0.03] hover:after:opacity-100 active:after:bg-black/[0.08]",
45
+ // Premium Dark Mode inversion: Secondary becomes dark charcoal/gray, merging into the background
46
+ "dark:bg-gradient-to-b dark:from-[#1F242F] dark:to-[#10121C] dark:text-[#D1D5DB] dark:border-[#344054]",
47
+ "dark:hover:border-[#475467] dark:hover:text-white",
48
+ "dark:shadow-skeuomorphic-solid",
49
+ "dark:after:bg-white/[0.06] dark:active:after:bg-black/[0.15]"
50
+ ),
51
+ tertiary: cn(
52
+ "bg-transparent text-[#475467] border-transparent",
53
+ "hover:bg-[#F9FAFB] hover:text-[#344054]",
54
+ "active:bg-[#F2F4F7] active:text-[#1D2939]",
55
+ "after:hidden",
56
+ // No overlay needed for transparent surfaces
57
+ // Dark Mode
58
+ "dark:text-[#9CA3AF] dark:hover:bg-[#1F242F] dark:hover:text-white dark:active:bg-[#11131A]"
59
+ ),
60
+ link: cn(
61
+ "h-auto! bg-transparent p-0! border-transparent text-[#1F242F] hover:text-[#10121C]",
62
+ "hover:underline",
63
+ "after:hidden",
64
+ // Dark Mode
65
+ "dark:text-[#9CA3AF] dark:hover:text-white"
66
+ ),
67
+ "primary-destructive": cn(
68
+ // Exact Untitled UI primary destructive: premium red gradient + borders (vibrant and subtle, not too dark)
69
+ "bg-gradient-to-b from-[#D92D20] to-[#B42318] text-white border-[#B42318]",
70
+ "hover:border-[#9E1B12]",
71
+ "active:border-[#84140D]",
72
+ SOLID_SKEUOMORPHIC_SHADOW,
73
+ // Destructive red hover/active overlays
74
+ "after:bg-white/[0.12] hover:after:opacity-100 active:after:bg-black/[0.15]"
75
+ ),
76
+ "secondary-destructive": cn(
77
+ // Exact Untitled UI secondary destructive: soft red bordered
78
+ "bg-gradient-to-b from-white to-[#F9FAFB] text-[#B42318] border-[#FDA29B]",
79
+ "hover:text-[#9E1B12] hover:border-[#FDA29B]",
80
+ BORDERED_SKEUOMORPHIC_SHADOW,
81
+ // Hover overlay
82
+ "after:bg-red-500/[0.04] hover:after:opacity-100 active:after:bg-red-950/[0.08]",
83
+ // Dark Mode Secondary Destructive: Charcoal fill with red borders and label
84
+ "dark:bg-gradient-to-b dark:from-[#1F242F] dark:to-[#10121C] dark:text-[#F87171] dark:border-[#9E1B12]/50",
85
+ "dark:hover:border-[#F87171]/40",
86
+ "dark:shadow-skeuomorphic-solid",
87
+ "dark:after:bg-white/[0.06] dark:active:after:bg-black/[0.15]"
88
+ )
89
+ },
90
+ size: {
91
+ xs: "h-7 gap-1 rounded-md px-2 text-xs",
92
+ sm: "h-8 gap-1 rounded-md px-2.5 text-xs",
93
+ md: "h-9 gap-1.5 rounded-lg px-3 text-sm",
94
+ lg: "h-10 gap-1.5 rounded-lg px-3.5 text-sm",
95
+ xl: "h-11 gap-2 rounded-lg px-4 text-base",
96
+ default: "h-9 gap-1.5 rounded-lg px-3 text-sm",
97
+ icon: "h-9 w-9 rounded-lg",
98
+ "icon-xs": "h-7 w-7 rounded-md",
99
+ "icon-sm": "h-8 w-8 rounded-md",
100
+ "icon-lg": "h-10 w-10 rounded-lg"
101
+ },
102
+ shape: {
103
+ pill: "rounded-full!",
104
+ rounded: ""
105
+ // defaults to the size variant's standard rounded-lg
106
+ }
107
+ },
108
+ defaultVariants: {
109
+ color: "primary",
110
+ size: "default",
111
+ shape: "rounded"
112
+ }
113
+ }
114
+ );
115
+ function Button({
116
+ className,
117
+ variant,
118
+ color,
119
+ size,
120
+ shape,
121
+ iconLeading,
122
+ iconTrailing,
123
+ isLoading = false,
124
+ asChild = false,
125
+ disabled,
126
+ type = "button",
127
+ children,
128
+ ...props
129
+ }) {
130
+ const isDisabled = disabled || isLoading;
131
+ let resolvedColor = "primary";
132
+ if (color) {
133
+ resolvedColor = color;
134
+ } else if (variant) {
135
+ if (variant === "default" || variant === "informative") resolvedColor = "primary";
136
+ else if (variant === "secondary" || variant === "outline") resolvedColor = "secondary";
137
+ else if (variant === "destructive") resolvedColor = "primary-destructive";
138
+ else if (variant === "ghost") resolvedColor = "tertiary";
139
+ else if (variant === "link") resolvedColor = "link";
140
+ }
141
+ const classes = cn(
142
+ buttonVariants({
143
+ color: resolvedColor,
144
+ size: size ?? "default",
145
+ shape: shape ?? "rounded"
146
+ }),
147
+ className
148
+ );
149
+ if (asChild) {
150
+ return /* @__PURE__ */ jsx(
151
+ Slot.Root,
152
+ {
153
+ className: classes,
154
+ "aria-disabled": isDisabled ? true : void 0,
155
+ "data-slot": "button",
156
+ "data-variant": resolvedColor,
157
+ ...props,
158
+ children
159
+ }
160
+ );
161
+ }
162
+ return /* @__PURE__ */ jsxs(
163
+ "button",
164
+ {
165
+ type,
166
+ disabled: isDisabled,
167
+ "data-slot": "button",
168
+ "data-variant": resolvedColor,
169
+ className: classes,
170
+ ...props,
171
+ children: [
172
+ isLoading ? /* @__PURE__ */ jsx(
173
+ "span",
174
+ {
175
+ "aria-hidden": true,
176
+ className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent"
177
+ }
178
+ ) : iconLeading,
179
+ children,
180
+ !isLoading ? iconTrailing : null
181
+ ]
182
+ }
183
+ );
184
+ }
11
185
 
12
186
  // src/design/button-tokens.ts
13
187
  var TIMBAL_V2_ELEVATED_GRADIENT = "bg-gradient-to-b from-elevated-from to-elevated-to";
@@ -16,31 +190,23 @@ var TIMBAL_V2_MODAL_SURFACE = cn(
16
190
  "border border-border shadow-card-elevated"
17
191
  );
18
192
  var TIMBAL_V2_PRIMARY_GRADIENT = "bg-gradient-to-b from-primary-fill-from to-primary-fill-to";
19
- var TIMBAL_V2_FROM_LEGACY_BUTTON = {
20
- default: "primary",
21
- destructive: "destructive",
22
- outline: "secondary",
23
- secondary: "secondary",
24
- ghost: "ghost",
25
- link: "link"
26
- };
27
193
  var TIMBAL_V2_SIZE_HEIGHT = {
28
- xs: "min-h-8 h-8",
29
- sm: "min-h-9 h-9",
30
- md: "min-h-10 h-10",
31
- lg: "min-h-11 h-11"
194
+ xs: "min-h-7 h-7",
195
+ sm: "min-h-8 h-8",
196
+ md: "min-h-9 h-9",
197
+ lg: "min-h-10 h-10"
32
198
  };
33
199
  var TIMBAL_V2_SIZE_ICON = {
34
- xs: "min-h-8 min-w-8 size-8",
200
+ xs: "min-h-7 min-w-7 size-7",
35
201
  sm: "min-h-8 min-w-8 size-8",
36
- md: "min-h-10 min-w-10 size-10",
37
- lg: "min-h-11 min-w-11 size-11"
202
+ md: "min-h-9 min-w-9 size-9",
203
+ lg: "min-h-10 min-w-10 size-10"
38
204
  };
39
205
  var TIMBAL_V2_SIZE_LABEL_PX = {
40
- xs: "px-3",
41
- sm: "px-4",
42
- md: "px-5",
43
- lg: "px-6"
206
+ xs: "px-2.5",
207
+ sm: "px-3",
208
+ md: "px-3.5",
209
+ lg: "px-4.5"
44
210
  };
45
211
  var TIMBAL_V2_FILL = {
46
212
  primary: [
@@ -59,6 +225,11 @@ var TIMBAL_V2_FILL = {
59
225
  "group-hover/tbv2:from-destructive-fill-hover-from group-hover/tbv2:to-destructive-fill-hover-to",
60
226
  "group-active/tbv2:from-destructive-fill-active-from group-active/tbv2:to-destructive-fill-active-to"
61
227
  ].join(" "),
228
+ "destructive-solid": [
229
+ "bg-gradient-to-b from-destructive-solid-from to-destructive-solid-to",
230
+ "group-hover/tbv2:from-destructive-solid-hover-from group-hover/tbv2:to-destructive-solid-hover-to",
231
+ "group-active/tbv2:from-destructive-solid-active-from group-active/tbv2:to-destructive-solid-active-to"
232
+ ].join(" "),
62
233
  secondary: [
63
234
  TIMBAL_V2_ELEVATED_GRADIENT,
64
235
  "group-hover/tbv2:from-secondary-fill-hover-from group-hover/tbv2:to-secondary-fill-hover-to",
@@ -75,6 +246,7 @@ var TIMBAL_V2_LABEL = {
75
246
  primary: "text-primary-foreground",
76
247
  informative: "text-primary-foreground",
77
248
  destructive: "text-destructive",
249
+ "destructive-solid": "text-destructive-foreground",
78
250
  secondary: "text-foreground",
79
251
  ghost: "text-foreground",
80
252
  link: "text-foreground underline decoration-foreground/25 underline-offset-2 group-hover/tbv2:decoration-foreground/45"
@@ -83,6 +255,7 @@ var TIMBAL_V2_BORDER = {
83
255
  primary: "",
84
256
  informative: "border border-foreground/15",
85
257
  destructive: "border border-destructive/45",
258
+ "destructive-solid": "",
86
259
  secondary: "border border-border",
87
260
  ghost: "",
88
261
  link: ""
@@ -91,6 +264,7 @@ var TIMBAL_V2_SHADOW = {
91
264
  primary: "shadow-card",
92
265
  informative: "shadow-card",
93
266
  destructive: "shadow-card",
267
+ "destructive-solid": "shadow-card",
94
268
  secondary: "shadow-card",
95
269
  ghost: "",
96
270
  link: ""
@@ -147,8 +321,43 @@ var TIMBAL_V2_LOGO_TILE = cn(
147
321
  "shadow-[0_1px_2px_-0.5px_rgba(0,0,0,0.08)]"
148
322
  );
149
323
 
324
+ // src/design/control-surface.ts
325
+ var CONTROL_SIZE = {
326
+ sm: "h-8 px-2.5",
327
+ default: "h-9 px-3"
328
+ };
329
+ var CONTROL_SHAPE = {
330
+ field: "rounded-lg",
331
+ pill: "rounded-full"
332
+ };
333
+ var controlSurfaceClass = cn(
334
+ TIMBAL_V2_SECONDARY_CHROME,
335
+ "text-sm text-foreground outline-none",
336
+ "placeholder:text-muted-foreground/70",
337
+ "focus-visible:ring-2 focus-visible:ring-foreground/10",
338
+ "focus-within:ring-2 focus-within:ring-foreground/10",
339
+ "disabled:cursor-not-allowed disabled:opacity-50",
340
+ "data-[placeholder]:text-muted-foreground"
341
+ );
342
+ function controlClass(options = {}, className) {
343
+ const { size = "default", shape = "field" } = options;
344
+ return cn(controlSurfaceClass, CONTROL_SIZE[size], CONTROL_SHAPE[shape], className);
345
+ }
346
+ var overlayAnimationClass = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
347
+ var overlaySurfaceClass = cn(
348
+ "z-[80] border border-border bg-popover text-popover-foreground shadow-card",
349
+ overlayAnimationClass
350
+ );
351
+ var overlayListPanelClass = cn(
352
+ overlaySurfaceClass,
353
+ "overflow-hidden rounded-lg p-0 outline-hidden"
354
+ );
355
+ var overlayItemClass = "relative flex cursor-default items-center gap-2 rounded-md px-2 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground";
356
+
150
357
  // src/ui/timbal-v2-button.tsx
151
- import { jsx, jsxs } from "react/jsx-runtime";
358
+ import * as React from "react";
359
+ import { Slot as Slot2 } from "radix-ui";
360
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
152
361
  var TIMBAL_V2_FILL_AS_CHILD = {
153
362
  primary: [
154
363
  "bg-gradient-to-b from-primary-fill-from to-primary-fill-to",
@@ -166,6 +375,11 @@ var TIMBAL_V2_FILL_AS_CHILD = {
166
375
  "hover:from-destructive-fill-hover-from hover:to-destructive-fill-hover-to",
167
376
  "active:from-destructive-fill-active-from active:to-destructive-fill-active-to"
168
377
  ].join(" "),
378
+ "destructive-solid": [
379
+ "bg-gradient-to-b from-destructive-solid-from to-destructive-solid-to",
380
+ "hover:from-destructive-solid-hover-from hover:to-destructive-solid-hover-to",
381
+ "active:from-destructive-solid-active-from active:to-destructive-solid-active-to"
382
+ ].join(" "),
169
383
  secondary: [
170
384
  TIMBAL_V2_ELEVATED_GRADIENT,
171
385
  "hover:from-secondary-fill-hover-from hover:to-secondary-fill-hover-to",
@@ -188,7 +402,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
188
402
  isIconOnly = false,
189
403
  isLoading = false,
190
404
  fullWidth = false,
191
- shape: _shape = "pill",
405
+ shape = "pill",
192
406
  asChild = false,
193
407
  className,
194
408
  disabled,
@@ -198,7 +412,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
198
412
  }, ref) {
199
413
  const isDisabled = disabled || isLoading;
200
414
  const sizeClass = isIconOnly ? TIMBAL_V2_SIZE_ICON[size] : TIMBAL_V2_SIZE_HEIGHT[size];
201
- const radiusClass = "rounded-full";
415
+ const radiusClass = shape === "rect" ? "rounded-lg" : "rounded-full";
202
416
  const sharedRootClass = cn(
203
417
  "relative box-border inline-flex items-center justify-center gap-2 whitespace-nowrap border-0 text-sm font-normal shadow-none transition duration-200 ease-in-out",
204
418
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-1 focus-visible:ring-offset-background",
@@ -211,8 +425,8 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
211
425
  className
212
426
  );
213
427
  if (asChild) {
214
- return /* @__PURE__ */ jsx(
215
- Slot.Root,
428
+ return /* @__PURE__ */ jsx2(
429
+ Slot2.Root,
216
430
  {
217
431
  ref,
218
432
  "aria-disabled": isDisabled ? true : void 0,
@@ -225,11 +439,11 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
225
439
  TIMBAL_V2_LABEL_AS_CHILD[variant]
226
440
  ),
227
441
  ...props,
228
- children: isLoading ? /* @__PURE__ */ jsx("span", { className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : children
442
+ children: isLoading ? /* @__PURE__ */ jsx2("span", { className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : children
229
443
  }
230
444
  );
231
445
  }
232
- return /* @__PURE__ */ jsxs(
446
+ return /* @__PURE__ */ jsxs2(
233
447
  "button",
234
448
  {
235
449
  ref,
@@ -243,7 +457,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
243
457
  ),
244
458
  ...props,
245
459
  children: [
246
- /* @__PURE__ */ jsx(
460
+ /* @__PURE__ */ jsx2(
247
461
  "span",
248
462
  {
249
463
  "aria-hidden": true,
@@ -253,7 +467,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
253
467
  )
254
468
  }
255
469
  ),
256
- /* @__PURE__ */ jsx(
470
+ /* @__PURE__ */ jsx2(
257
471
  "span",
258
472
  {
259
473
  className: cn(
@@ -261,7 +475,7 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
261
475
  !isIconOnly && TIMBAL_V2_SIZE_LABEL_PX[size],
262
476
  TIMBAL_V2_LABEL[variant]
263
477
  ),
264
- children: isLoading ? /* @__PURE__ */ jsx("span", { className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : children
478
+ children: isLoading ? /* @__PURE__ */ jsx2("span", { className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : children
265
479
  }
266
480
  )
267
481
  ]
@@ -269,111 +483,9 @@ var TimbalV2Button = React.forwardRef(function TimbalV2Button2({
269
483
  );
270
484
  });
271
485
 
272
- // src/ui/button.tsx
273
- import { cva } from "class-variance-authority";
274
- import { jsx as jsx2 } from "react/jsx-runtime";
275
- var LEGACY_SIZE_TO_V2 = {
276
- default: "md",
277
- xs: "xs",
278
- sm: "sm",
279
- lg: "lg",
280
- icon: "sm",
281
- "icon-xs": "xs",
282
- "icon-sm": "sm",
283
- "icon-lg": "lg"
284
- };
285
- var buttonVariants = cva(
286
- "inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0",
287
- {
288
- variants: {
289
- variant: {
290
- default: "",
291
- destructive: "",
292
- outline: "",
293
- secondary: "",
294
- ghost: "",
295
- link: ""
296
- },
297
- size: {
298
- default: "",
299
- xs: "",
300
- sm: "",
301
- lg: "",
302
- icon: "",
303
- "icon-xs": "",
304
- "icon-sm": "",
305
- "icon-lg": ""
306
- }
307
- },
308
- defaultVariants: {
309
- variant: "default",
310
- size: "default"
311
- }
312
- }
313
- );
314
- function Button({
315
- className,
316
- variant = "default",
317
- size = "default",
318
- asChild = false,
319
- ...props
320
- }) {
321
- const v2Variant = TIMBAL_V2_FROM_LEGACY_BUTTON[variant ?? "default"];
322
- const v2Size = LEGACY_SIZE_TO_V2[size ?? "default"];
323
- const isIconOnly = typeof size === "string" && size.startsWith("icon");
324
- return /* @__PURE__ */ jsx2(
325
- TimbalV2Button,
326
- {
327
- "data-slot": "button",
328
- "data-variant": variant,
329
- "data-size": size,
330
- variant: v2Variant,
331
- size: v2Size,
332
- shape: "pill",
333
- isIconOnly,
334
- asChild,
335
- className: cn(buttonVariants({ variant, size, className })),
336
- ...props
337
- }
338
- );
339
- }
340
-
341
- // src/design/control-surface.ts
342
- var CONTROL_SIZE = {
343
- sm: "h-9 px-3",
344
- default: "h-10 px-3"
345
- };
346
- var CONTROL_SHAPE = {
347
- field: "rounded-lg",
348
- pill: "rounded-full"
349
- };
350
- var controlSurfaceClass = cn(
351
- TIMBAL_V2_SECONDARY_CHROME,
352
- "text-sm text-foreground outline-none",
353
- "placeholder:text-muted-foreground/70",
354
- "focus-visible:ring-2 focus-visible:ring-foreground/10",
355
- "focus-within:ring-2 focus-within:ring-foreground/10",
356
- "disabled:cursor-not-allowed disabled:opacity-50",
357
- "data-[placeholder]:text-muted-foreground"
358
- );
359
- function controlClass(options = {}, className) {
360
- const { size = "default", shape = "field" } = options;
361
- return cn(controlSurfaceClass, CONTROL_SIZE[size], CONTROL_SHAPE[shape], className);
362
- }
363
- var overlayAnimationClass = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
364
- var overlaySurfaceClass = cn(
365
- "z-[80] border border-border bg-popover text-popover-foreground shadow-card",
366
- overlayAnimationClass
367
- );
368
- var overlayListPanelClass = cn(
369
- overlaySurfaceClass,
370
- "overflow-hidden rounded-lg p-0 outline-hidden"
371
- );
372
- var overlayItemClass = "relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground";
373
-
374
486
  // src/ui/tooltip.tsx
375
487
  import { Tooltip as TooltipPrimitive } from "radix-ui";
376
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
488
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
377
489
  function TooltipProvider({
378
490
  delayDuration = 0,
379
491
  ...props
@@ -403,13 +515,13 @@ function TooltipContent({
403
515
  children,
404
516
  ...props
405
517
  }) {
406
- return /* @__PURE__ */ jsx3(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs2(
518
+ return /* @__PURE__ */ jsx3(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
407
519
  TooltipPrimitive.Content,
408
520
  {
409
521
  "data-slot": "tooltip-content",
410
522
  sideOffset,
411
523
  className: cn(
412
- "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
524
+ "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-2.5 py-1 text-xs text-balance",
413
525
  className
414
526
  ),
415
527
  ...props,
@@ -424,7 +536,7 @@ function TooltipContent({
424
536
  // src/ui/dialog.tsx
425
537
  import { XIcon } from "lucide-react";
426
538
  import { Dialog as DialogPrimitive } from "radix-ui";
427
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
539
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
428
540
  function Dialog({
429
541
  ...props
430
542
  }) {
@@ -467,21 +579,21 @@ function DialogContent({
467
579
  showCloseButton = true,
468
580
  ...props
469
581
  }) {
470
- return /* @__PURE__ */ jsxs3(DialogPortal, { "data-slot": "dialog-portal", children: [
582
+ return /* @__PURE__ */ jsxs4(DialogPortal, { "data-slot": "dialog-portal", children: [
471
583
  /* @__PURE__ */ jsx4(DialogOverlay, {}),
472
- /* @__PURE__ */ jsxs3(
584
+ /* @__PURE__ */ jsxs4(
473
585
  DialogPrimitive.Content,
474
586
  {
475
587
  "data-slot": "dialog-content",
476
588
  className: cn(
477
589
  TIMBAL_V2_MODAL_SURFACE,
478
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl p-6 duration-200 outline-none sm:max-w-lg",
590
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[70] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl p-5 duration-200 outline-none sm:max-w-lg",
479
591
  className
480
592
  ),
481
593
  ...props,
482
594
  children: [
483
595
  children,
484
- showCloseButton && /* @__PURE__ */ jsxs3(
596
+ showCloseButton && /* @__PURE__ */ jsxs4(
485
597
  DialogPrimitive.Close,
486
598
  {
487
599
  "data-slot": "dialog-close",
@@ -550,7 +662,7 @@ function DialogFooter({ className, ...props }) {
550
662
  // src/ui/avatar.tsx
551
663
  import * as React2 from "react";
552
664
  import { Avatar as AvatarPrimitive } from "radix-ui";
553
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
665
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
554
666
  var AVATAR_PRIMARY_FALLBACK_CLASS = cn(
555
667
  TIMBAL_V2_SECONDARY_PILL_ROOT,
556
668
  TIMBAL_V2_LABEL.secondary,
@@ -572,9 +684,9 @@ function avatarChartVariantClass(_seed) {
572
684
  return AVATAR_PRIMARY_FALLBACK_CLASS;
573
685
  }
574
686
  var AVATAR_SIZE_CLASS = {
575
- default: "size-8",
576
- sm: "size-6",
577
- lg: "size-10"
687
+ default: "size-7",
688
+ sm: "size-5",
689
+ lg: "size-9"
578
690
  };
579
691
  function Avatar({
580
692
  className,
@@ -590,7 +702,7 @@ function Avatar({
590
702
  }
591
703
  }, [rootVariant]);
592
704
  const branded = isBrandedVariant(chrome);
593
- return /* @__PURE__ */ jsx5(AvatarChromeContext.Provider, { value: { chrome, setChrome }, children: /* @__PURE__ */ jsxs4(
705
+ return /* @__PURE__ */ jsx5(AvatarChromeContext.Provider, { value: { chrome, setChrome }, children: /* @__PURE__ */ jsxs5(
594
706
  AvatarPrimitive.Root,
595
707
  {
596
708
  "data-slot": "avatar",
@@ -656,8 +768,8 @@ function AvatarFallback({
656
768
  branded ? cn(
657
769
  "bg-transparent font-medium",
658
770
  TIMBAL_V2_LABEL.secondary,
659
- "text-sm group-data-[size=sm]/avatar:text-xs"
660
- ) : "bg-muted font-normal text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs",
771
+ "text-xs group-data-[size=sm]/avatar:text-[10px]"
772
+ ) : "bg-muted font-normal text-muted-foreground text-xs group-data-[size=sm]/avatar:text-[10px]",
661
773
  className
662
774
  ),
663
775
  style,
@@ -670,7 +782,7 @@ function AvatarFallback({
670
782
  // src/ui/chart.tsx
671
783
  import * as React3 from "react";
672
784
  import * as RechartsPrimitive from "recharts";
673
- import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
785
+ import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
674
786
  var THEMES = { light: "", dark: ".dark" };
675
787
  var ChartContext = React3.createContext(null);
676
788
  function useChart() {
@@ -689,7 +801,7 @@ function ChartContainer({
689
801
  }) {
690
802
  const uniqueId = React3.useId();
691
803
  const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
692
- return /* @__PURE__ */ jsx6(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs5(
804
+ return /* @__PURE__ */ jsx6(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs6(
693
805
  "div",
694
806
  {
695
807
  "data-slot": "chart",
@@ -701,7 +813,7 @@ function ChartContainer({
701
813
  ...props,
702
814
  children: [
703
815
  /* @__PURE__ */ jsx6(ChartStyle, { id: chartId, config }),
704
- /* @__PURE__ */ jsx6(RechartsPrimitive.ResponsiveContainer, { children })
816
+ /* @__PURE__ */ jsx6(RechartsPrimitive.ResponsiveContainer, { width: "100%", height: "100%", children })
705
817
  ]
706
818
  }
707
819
  ) });
@@ -732,6 +844,36 @@ ${colorConfig.map(([key, itemConfig]) => {
732
844
  );
733
845
  };
734
846
  var ChartTooltip = RechartsPrimitive.Tooltip;
847
+ var CHART_TOOLTIP_SURFACE = "rounded-xl border px-5 py-4 text-left text-[11px] leading-snug shadow-[0_12px_40px_-10px_rgba(0,0,0,0.55)] border-white/10 bg-gradient-to-b from-neutral-800 to-neutral-950 text-white dark:border-black/10 dark:from-white dark:to-neutral-100 dark:text-neutral-900";
848
+ var CHART_TOOLTIP_TEXT = "text-white dark:text-neutral-900";
849
+ var CHART_TOOLTIP_MUTED = "text-neutral-300 dark:text-neutral-600";
850
+ function isCssColor(value) {
851
+ return typeof value === "string" && value.length > 0 && !value.startsWith("url(");
852
+ }
853
+ function resolvePayloadConfigKey(payload, key) {
854
+ if (typeof payload !== "object" || payload === null) {
855
+ return key;
856
+ }
857
+ const row = payload;
858
+ const nested = "payload" in row && typeof row.payload === "object" && row.payload !== null ? row.payload : void 0;
859
+ if (key in row && typeof row[key] === "string") {
860
+ return row[key];
861
+ }
862
+ if (nested && key in nested && typeof nested[key] === "string") {
863
+ return nested[key];
864
+ }
865
+ if (typeof row.value === "string") {
866
+ return row.value;
867
+ }
868
+ return key;
869
+ }
870
+ function resolveSwatchColor(itemConfig, configKey, ...candidates) {
871
+ for (const candidate of candidates) {
872
+ if (isCssColor(candidate)) return candidate;
873
+ }
874
+ if (isCssColor(itemConfig?.color)) return itemConfig.color;
875
+ return `var(--color-${configKey})`;
876
+ }
735
877
  function ChartTooltipContent({
736
878
  active,
737
879
  payload,
@@ -743,6 +885,7 @@ function ChartTooltipContent({
743
885
  labelFormatter,
744
886
  labelClassName,
745
887
  formatter,
888
+ valueFormatter,
746
889
  color,
747
890
  nameKey,
748
891
  labelKey
@@ -757,22 +900,23 @@ function ChartTooltipContent({
757
900
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
758
901
  const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
759
902
  if (labelFormatter) {
760
- return /* @__PURE__ */ jsx6("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
903
+ return /* @__PURE__ */ jsx6("div", { className: cn("font-medium leading-none", labelClassName), children: labelFormatter(value, payload) });
761
904
  }
762
905
  if (!value) {
763
906
  return null;
764
907
  }
765
- return /* @__PURE__ */ jsx6("div", { className: cn("font-medium", labelClassName), children: value });
908
+ return /* @__PURE__ */ jsx6("div", { className: cn("font-medium leading-none", labelClassName), children: value });
766
909
  }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
767
910
  if (!active || !payload?.length) {
768
911
  return null;
769
912
  }
770
913
  const nestLabel = payload.length === 1 && indicator !== "dot";
771
- return /* @__PURE__ */ jsxs5(
914
+ return /* @__PURE__ */ jsxs6(
772
915
  "div",
773
916
  {
774
917
  className: cn(
775
- "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
918
+ "grid min-w-[8rem] items-start gap-1.5",
919
+ CHART_TOOLTIP_SURFACE,
776
920
  "animate-in fade-in-0 zoom-in-95 duration-150",
777
921
  className
778
922
  ),
@@ -780,47 +924,51 @@ function ChartTooltipContent({
780
924
  !nestLabel ? tooltipLabel : null,
781
925
  /* @__PURE__ */ jsx6("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
782
926
  const key = `${nameKey || item.name || item.dataKey || "value"}`;
927
+ const configKey = resolvePayloadConfigKey(item, key);
783
928
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
784
- const indicatorColor = color || item.payload?.fill || item.color;
929
+ const indicatorColor = resolveSwatchColor(
930
+ itemConfig,
931
+ configKey,
932
+ color,
933
+ item.payload?.fill,
934
+ item.color
935
+ );
785
936
  return /* @__PURE__ */ jsx6(
786
937
  "div",
787
938
  {
788
939
  className: cn(
789
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
940
+ "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400",
790
941
  indicator === "dot" && "items-center"
791
942
  ),
792
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs5(Fragment, { children: [
943
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs6(Fragment, { children: [
793
944
  itemConfig?.icon ? /* @__PURE__ */ jsx6(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx6(
794
945
  "div",
795
946
  {
796
- className: cn(
797
- "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
798
- {
799
- "h-2.5 w-2.5": indicator === "dot",
800
- "w-1": indicator === "line",
801
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
802
- "my-0.5": nestLabel && indicator === "dashed"
803
- }
804
- ),
947
+ className: cn("shrink-0 rounded-[2px]", {
948
+ "h-2.5 w-2.5": indicator === "dot",
949
+ "w-1": indicator === "line",
950
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
951
+ "my-0.5": nestLabel && indicator === "dashed"
952
+ }),
805
953
  style: {
806
- "--color-bg": indicatorColor,
807
- "--color-border": indicatorColor
954
+ backgroundColor: indicator === "dashed" ? void 0 : indicatorColor,
955
+ borderColor: indicatorColor
808
956
  }
809
957
  }
810
958
  ),
811
- /* @__PURE__ */ jsxs5(
959
+ /* @__PURE__ */ jsxs6(
812
960
  "div",
813
961
  {
814
962
  className: cn(
815
- "flex flex-1 justify-between leading-none",
963
+ "flex flex-1 justify-between gap-3 leading-none",
816
964
  nestLabel ? "items-end" : "items-center"
817
965
  ),
818
966
  children: [
819
- /* @__PURE__ */ jsxs5("div", { className: "grid gap-1.5", children: [
967
+ /* @__PURE__ */ jsxs6("div", { className: "grid gap-1.5", children: [
820
968
  nestLabel ? tooltipLabel : null,
821
- /* @__PURE__ */ jsx6("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
969
+ /* @__PURE__ */ jsx6("span", { className: CHART_TOOLTIP_MUTED, children: itemConfig?.label || item.name })
822
970
  ] }),
823
- item.value != null && /* @__PURE__ */ jsx6("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
971
+ item.value != null && /* @__PURE__ */ jsx6("span", { className: cn("font-medium tabular-nums", CHART_TOOLTIP_TEXT), children: valueFormatter ? valueFormatter(item.value, item) : typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
824
972
  ]
825
973
  }
826
974
  )
@@ -855,8 +1003,10 @@ function ChartLegendContent({
855
1003
  ),
856
1004
  children: payload.filter((item) => item.type !== "none").map((item, index) => {
857
1005
  const key = `${nameKey || item.dataKey || "value"}`;
1006
+ const configKey = resolvePayloadConfigKey(item, key);
858
1007
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
859
- return /* @__PURE__ */ jsxs5(
1008
+ const swatchColor = resolveSwatchColor(itemConfig, configKey, item.color);
1009
+ return /* @__PURE__ */ jsxs6(
860
1010
  "div",
861
1011
  {
862
1012
  className: "[&>svg]:text-muted-foreground flex min-w-0 max-w-[8rem] items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
@@ -865,7 +1015,7 @@ function ChartLegendContent({
865
1015
  "div",
866
1016
  {
867
1017
  className: "h-2 w-2 shrink-0 rounded-[2px]",
868
- style: { backgroundColor: item.color }
1018
+ style: { backgroundColor: swatchColor }
869
1019
  }
870
1020
  ),
871
1021
  /* @__PURE__ */ jsx6("span", { className: "min-w-0 truncate", children: itemConfig?.label ?? (item.value != null ? String(item.value) : null) })
@@ -881,13 +1031,7 @@ function getPayloadConfigFromPayload(config, payload, key) {
881
1031
  if (typeof payload !== "object" || payload === null) {
882
1032
  return void 0;
883
1033
  }
884
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
885
- let configLabelKey = key;
886
- if (key in payload && typeof payload[key] === "string") {
887
- configLabelKey = payload[key];
888
- } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
889
- configLabelKey = payloadPayload[key];
890
- }
1034
+ const configLabelKey = resolvePayloadConfigKey(payload, key);
891
1035
  return configLabelKey in config ? config[configLabelKey] : config[key];
892
1036
  }
893
1037
 
@@ -938,7 +1082,7 @@ var ShimmerComponent = ({
938
1082
  var Shimmer = memo(ShimmerComponent);
939
1083
 
940
1084
  export {
941
- cn,
1085
+ Button,
942
1086
  TIMBAL_V2_ELEVATED_GRADIENT,
943
1087
  TIMBAL_V2_MODAL_SURFACE,
944
1088
  TIMBAL_V2_SWITCH_TRACK_OFF,
@@ -946,8 +1090,6 @@ export {
946
1090
  TIMBAL_V2_ELEVATED_SURFACE,
947
1091
  TIMBAL_V2_SECONDARY_CHROME,
948
1092
  TIMBAL_V2_LOGO_TILE,
949
- TimbalV2Button,
950
- Button,
951
1093
  CONTROL_SIZE,
952
1094
  controlSurfaceClass,
953
1095
  controlClass,
@@ -955,6 +1097,7 @@ export {
955
1097
  overlaySurfaceClass,
956
1098
  overlayListPanelClass,
957
1099
  overlayItemClass,
1100
+ TimbalV2Button,
958
1101
  TooltipProvider,
959
1102
  Tooltip,
960
1103
  TooltipTrigger,