@mastra/playground-ui 24.1.0-alpha.0 → 24.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 24.1.0-alpha.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`e109607`](https://github.com/mastra-ai/mastra/commit/e10960749251e34d46b480a20648c490fd30381b)]:
8
+ - @mastra/core@1.31.0-alpha.1
9
+ - @mastra/client-js@1.15.3-alpha.1
10
+ - @mastra/react@0.2.33-alpha.1
11
+
12
+ ## 24.1.0-alpha.1
13
+
14
+ ### Minor Changes
15
+
16
+ - Refactored Button component to use a single `cva` (class-variance-authority) variant config instead of nested manual maps. Consolidated `IconButton` into `Button` via `size="icon-sm|icon-md|icon-lg"` and removed the `IconButton` export. Replaced `variant="light"` and `variant="inputLike"` with `variant="default"` (no behavior change for default styling). Added `cta` and `outline` variants and unified active/hover styles between text- and icon-mode buttons. ([#15985](https://github.com/mastra-ai/mastra/pull/15985))
17
+
18
+ **Why:** A single source of truth for variants means consistent visuals, fewer drift bugs, simpler maintenance, and a more predictable surface for AI agents — single-variant cva is the dominant shadcn pattern across DS components in this repo (`Card`, `Input`, `Label`, `Textarea`, `StatusBadge`).
19
+
20
+ **Migration:**
21
+
22
+ ```tsx
23
+ // Before
24
+ import { IconButton } from '@mastra/playground-ui';
25
+ <IconButton><Settings /></IconButton>
26
+ <Button variant="light">…</Button>
27
+ <Combobox variant="inputLike" />
28
+
29
+ // After
30
+ import { Button } from '@mastra/playground-ui';
31
+ <Button size="icon-md"><Settings /></Button>
32
+ <Button variant="default">…</Button>
33
+ <Combobox variant="default" />
34
+ ```
35
+
36
+ ### Patch Changes
37
+
38
+ - Aligned AlertDialog visual styling with Dialog component for design system consistency. AlertDialog now uses the same surface tokens, border radius, shadow, animation curves, and typography scale as Dialog. The accessibility primitive remains separate (preserves `role="alertdialog"` and explicit Action/Cancel semantics) — only the visual shell was synced. Also added `AlertDialog.Body` for parity with Dialog. ([#15988](https://github.com/mastra-ai/mastra/pull/15988))
39
+
40
+ - Updated dependencies [[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724), [`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7), [`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29), [`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79), [`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71), [`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682), [`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde), [`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2), [`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff), [`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
41
+ - @mastra/core@1.31.0-alpha.0
42
+ - @mastra/client-js@1.15.3-alpha.0
43
+ - @mastra/react@0.2.33-alpha.0
44
+
3
45
  ## 24.1.0-alpha.0
4
46
 
5
47
  ### Minor Changes
package/dist/index.cjs.js CHANGED
@@ -5,8 +5,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
  require('./index.css');const jsxRuntime = require('react/jsx-runtime');
6
6
  const lucideReact = require('lucide-react');
7
7
  const React = require('react');
8
- const tokens = require('./tokens.cjs.js');
9
8
  const TooltipPrimitive = require('@radix-ui/react-tooltip');
9
+ const tokens = require('./tokens.cjs.js');
10
10
  const langJson = require('@codemirror/lang-json');
11
11
  const langMarkdown = require('@codemirror/lang-markdown');
12
12
  const language = require('@codemirror/language');
@@ -88,22 +88,49 @@ const SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespaceDefault(Switch
88
88
  const HoverCard__namespace = /*#__PURE__*/_interopNamespaceDefault(HoverCard);
89
89
  const RadixTabs__namespace = /*#__PURE__*/_interopNamespaceDefault(RadixTabs);
90
90
 
91
- const formElementSizes = {
92
- sm: "h-form-sm",
93
- md: "h-form-md",
94
- default: "h-form-default",
95
- lg: "h-form-lg"
96
- };
97
- const formElementFocus = "focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal";
98
- const formElementFocusWithin = "focus-within:outline-hidden focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal";
99
- const formElementRadius = "rounded-md";
100
- const sharedFormElementStyle = "bg-surface2 border-2 border-border1 text-neutral5 hover:text-neutral6 hover:border-border2 rounded-lg";
101
- const sharedFormElementFocusStyle = "outline-hidden focus-visible:outline-hidden focus-visible:border-accent1 focus-visible:ring-1 focus-visible:ring-accent1/40";
102
- const sharedFormElementDisabledStyle = "disabled:opacity-50 disabled:cursor-not-allowed";
103
- const formElementTransition = "transition-all duration-normal ease-out-custom";
104
-
105
91
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
106
92
 
93
+ const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
94
+ const cx = clsx;
95
+ const cva = (base, config)=>(props)=>{
96
+ var _config_compoundVariants;
97
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
98
+ const { variants, defaultVariants } = config;
99
+ const getVariantClassNames = Object.keys(variants).map((variant)=>{
100
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
101
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
102
+ if (variantProp === null) return null;
103
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
104
+ return variants[variant][variantKey];
105
+ });
106
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
107
+ let [key, value] = param;
108
+ if (value === undefined) {
109
+ return acc;
110
+ }
111
+ acc[key] = value;
112
+ return acc;
113
+ }, {});
114
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
115
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
116
+ return Object.entries(compoundVariantOptions).every((param)=>{
117
+ let [key, value] = param;
118
+ return Array.isArray(value) ? value.includes({
119
+ ...defaultVariants,
120
+ ...propsWithoutUndefined
121
+ }[key]) : ({
122
+ ...defaultVariants,
123
+ ...propsWithoutUndefined
124
+ })[key] === value;
125
+ }) ? [
126
+ ...acc,
127
+ cvClass,
128
+ cvClassName
129
+ ] : acc;
130
+ }, []);
131
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
132
+ };
133
+
107
134
  /**
108
135
  * Concatenates two arrays faster than the array spread operator.
109
136
  */
@@ -3388,41 +3415,95 @@ function cn(...inputs) {
3388
3415
  return twMerge(clsx(inputs));
3389
3416
  }
3390
3417
 
3391
- const sizeClasses$6 = {
3392
- sm: `${formElementSizes.sm} text-ui-sm px-[.75em]`,
3393
- md: `${formElementSizes.md} text-ui-md px-[.75em]`,
3394
- default: `${formElementSizes.default} text-ui-md px-[.85em] `,
3395
- lg: `${formElementSizes.lg} text-ui-lg px-[1em] `
3418
+ const TooltipProvider = TooltipPrimitive__namespace.Provider;
3419
+ const Tooltip = TooltipPrimitive__namespace.Root;
3420
+ const TooltipTrigger = TooltipPrimitive__namespace.Trigger;
3421
+ const TooltipContent = React__namespace.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
3422
+ TooltipPrimitive__namespace.Content,
3423
+ {
3424
+ ref,
3425
+ sideOffset,
3426
+ className: cn(
3427
+ "z-50 overflow-hidden rounded-md bg-surface3 px-3 py-1.5 text-xs text-neutral4 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",
3428
+ className
3429
+ ),
3430
+ ...props,
3431
+ children: [
3432
+ children,
3433
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "fill-surface3" })
3434
+ ]
3435
+ }
3436
+ ) }));
3437
+ TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
3438
+
3439
+ const sizes = {
3440
+ sm: "[&>svg]:h-icon-sm [&>svg]:w-icon-sm",
3441
+ default: "[&>svg]:h-icon-default [&>svg]:w-icon-default",
3442
+ lg: "[&>svg]:h-icon-lg [&>svg]:w-icon-lg"
3396
3443
  };
3397
- const variantClasses$2 = {
3398
- default: "bg-surface3 border-2 border-border1 hover:text-neutral6 hover:bg-surface4 active:bg-surface5 text-neutral5",
3399
- primary: "bg-surface4 border-2 border-border2 hover:text-neutral6 hover:bg-surface5 active:bg-surface6 text-neutral6",
3400
- cta: "bg-accent1/50 hover:bg-accent1/80 text-neutral5 font-semibold",
3401
- ghost: "bg-transparent border-2 border-transparent hover:text-neutral6 hover:bg-surface4 active:bg-surface5 text-neutral4",
3402
- inputLike: sharedFormElementStyle,
3403
- light: "",
3404
- outline: "",
3405
- link: "inline-flex justify-start rounded-none h-auto px-0 bg-transparent text-neutral3 hover:text-neutral4 gap-1 [&>svg]:mx-0 w-auto [&>svg]:opacity-70"
3444
+ const Icon = ({ children, className, size = "default", ...props }) => {
3445
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("block", sizes[size], className), ...props, children });
3446
+ };
3447
+
3448
+ const formElementSizes = {
3449
+ sm: "h-form-sm",
3450
+ md: "h-form-md",
3451
+ default: "h-form-default",
3452
+ lg: "h-form-lg"
3406
3453
  };
3407
- const sharedStyles = cn(
3408
- "flex items-center justify-center gap-[.75em] leading-0 transition-colors duration-200 ease-out-custom rounded-lg",
3454
+ const formElementFocus = "focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal";
3455
+ const formElementFocusWithin = "focus-within:outline-hidden focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal";
3456
+ const formElementRadius = "rounded-md";
3457
+ const sharedFormElementStyle = "bg-surface2 border-2 border-border1 text-neutral5 hover:text-neutral6 hover:border-border2 rounded-lg";
3458
+ const sharedFormElementFocusStyle = "outline-hidden focus-visible:outline-hidden focus-visible:border-accent1 focus-visible:ring-1 focus-visible:ring-accent1/40";
3459
+ const sharedFormElementDisabledStyle = "disabled:opacity-50 disabled:cursor-not-allowed";
3460
+ const formElementTransition = "transition-all duration-normal ease-out-custom";
3461
+
3462
+ const TEXT_MODE_ADORNMENTS = cn(
3463
+ "gap-[.75em] rounded-lg",
3409
3464
  "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:mx-[-.3em]",
3410
- "[&>svg]:opacity-50 [&:hover>svg]:opacity-100",
3411
- sharedFormElementDisabledStyle,
3412
- sharedFormElementFocusStyle
3465
+ "[&>svg]:opacity-50 [&:hover>svg]:opacity-100"
3413
3466
  );
3414
- const variantMap = {
3415
- light: "default",
3416
- outline: "default"
3467
+ const buttonVariants = cva(
3468
+ cn(
3469
+ "inline-flex items-center justify-center leading-0",
3470
+ "transition-all duration-normal ease-out-custom",
3471
+ sharedFormElementDisabledStyle,
3472
+ sharedFormElementFocusStyle
3473
+ ),
3474
+ {
3475
+ variants: {
3476
+ variant: {
3477
+ default: "bg-surface3 border-2 border-border1 hover:bg-surface5 hover:text-neutral6 active:bg-surface6 text-neutral6",
3478
+ primary: "bg-surface4 border-2 border-border2 hover:bg-surface5 hover:text-neutral6 active:bg-surface6 text-neutral6",
3479
+ cta: "bg-accent1 border-2 border-transparent hover:bg-accent1/90 hover:shadow-glow-accent1 disabled:hover:shadow-none text-surface1 font-medium",
3480
+ ghost: "bg-transparent border-2 border-transparent hover:bg-surface4 hover:text-neutral6 active:bg-surface5 text-neutral4",
3481
+ outline: "bg-transparent border-2 border-border1 hover:bg-surface3 hover:text-neutral6 active:bg-surface4 text-neutral5",
3482
+ link: "inline-flex justify-start rounded-none h-auto px-0 bg-transparent text-neutral3 hover:text-neutral4 gap-1 [&>svg]:mx-0 w-auto [&>svg]:opacity-70"
3483
+ },
3484
+ size: {
3485
+ sm: cn(`${formElementSizes.sm} text-ui-sm px-[.75em]`, TEXT_MODE_ADORNMENTS),
3486
+ md: cn(`${formElementSizes.md} text-ui-md px-[.75em]`, TEXT_MODE_ADORNMENTS),
3487
+ default: cn(`${formElementSizes.default} text-ui-md px-[.85em]`, TEXT_MODE_ADORNMENTS),
3488
+ lg: cn(`${formElementSizes.lg} text-ui-lg px-[1em]`, TEXT_MODE_ADORNMENTS),
3489
+ // Icon sizes: square dimensions, smaller radius. Active state inherits from variant
3490
+ // (e.g. `active:bg-surface5`) — same press feedback as text-mode for consistency.
3491
+ "icon-sm": `${formElementSizes.sm} w-form-sm rounded-md`,
3492
+ "icon-md": `${formElementSizes.md} w-form-md rounded-md`,
3493
+ "icon-lg": `${formElementSizes.lg} w-form-lg rounded-md`
3494
+ }
3495
+ },
3496
+ defaultVariants: {
3497
+ variant: "default",
3498
+ size: "default"
3499
+ }
3500
+ }
3501
+ );
3502
+ const iconChildSizeMap = {
3503
+ "icon-sm": "sm",
3504
+ "icon-md": "default",
3505
+ "icon-lg": "lg"
3417
3506
  };
3418
- function resolveVariant(variant) {
3419
- return variantMap[variant] ?? variant;
3420
- }
3421
- function buttonVariants(options) {
3422
- const variant = resolveVariant(options?.variant || "default");
3423
- const size = options?.size || "default";
3424
- return cn(sharedStyles, sizeClasses$6[size], variantClasses$2[variant], options?.iconOnly && "[&>svg]:opacity-75");
3425
- }
3426
3507
  function flattenChildren(children) {
3427
3508
  const result = [];
3428
3509
  React.Children.forEach(children, (child) => {
@@ -3438,45 +3519,39 @@ function isIconOnly(children) {
3438
3519
  const flat = flattenChildren(children);
3439
3520
  return flat.length > 0 && flat.every((child) => React.isValidElement(child));
3440
3521
  }
3522
+ function isIconButtonSize(size) {
3523
+ return typeof size === "string" && size.startsWith("icon-");
3524
+ }
3441
3525
  const Button = React.forwardRef(
3442
- ({ className, as, size = "default", variant = "default", disabled, children, ...props }, ref) => {
3526
+ ({ className, as, size, variant = "default", disabled, children, tooltip, "aria-label": ariaLabelProp, ...props }, ref) => {
3443
3527
  const Component = as || "button";
3444
- const iconOnly = isIconOnly(children);
3445
- return /* @__PURE__ */ jsxRuntime.jsx(
3528
+ const iconMode = isIconButtonSize(size);
3529
+ const resolvedSize = size ?? "default";
3530
+ const isLabelless = !iconMode && isIconOnly(children);
3531
+ const ariaLabel = ariaLabelProp ?? ((iconMode || isLabelless) && typeof tooltip === "string" ? tooltip : void 0);
3532
+ const content = iconMode ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: iconChildSizeMap[size], children }) : children;
3533
+ const button = /* @__PURE__ */ jsxRuntime.jsx(
3446
3534
  Component,
3447
3535
  {
3448
3536
  ref,
3449
3537
  disabled,
3450
- className: cn(buttonVariants({ variant, size, iconOnly }), className),
3538
+ "aria-label": ariaLabel,
3539
+ className: cn(buttonVariants({ variant, size: resolvedSize }), isLabelless && "[&>svg]:opacity-75", className),
3451
3540
  ...props,
3452
- children
3541
+ children: content
3453
3542
  }
3454
3543
  );
3544
+ if (tooltip) {
3545
+ return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
3546
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: button }),
3547
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: tooltip })
3548
+ ] });
3549
+ }
3550
+ return button;
3455
3551
  }
3456
3552
  );
3457
3553
  Button.displayName = "Button";
3458
3554
 
3459
- const TooltipProvider = TooltipPrimitive__namespace.Provider;
3460
- const Tooltip = TooltipPrimitive__namespace.Root;
3461
- const TooltipTrigger = TooltipPrimitive__namespace.Trigger;
3462
- const TooltipContent = React__namespace.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
3463
- TooltipPrimitive__namespace.Content,
3464
- {
3465
- ref,
3466
- sideOffset,
3467
- className: cn(
3468
- "z-50 overflow-hidden rounded-md bg-surface3 px-3 py-1.5 text-xs text-neutral4 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",
3469
- className
3470
- ),
3471
- ...props,
3472
- children: [
3473
- children,
3474
- /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "fill-surface3" })
3475
- ]
3476
- }
3477
- ) }));
3478
- TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
3479
-
3480
3555
  const ButtonWithTooltip = React.forwardRef(
3481
3556
  ({ tooltipContent, ...buttonProps }, ref) => {
3482
3557
  return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
@@ -3487,15 +3562,6 @@ const ButtonWithTooltip = React.forwardRef(
3487
3562
  );
3488
3563
  ButtonWithTooltip.displayName = "ButtonWithTooltip";
3489
3564
 
3490
- const sizes = {
3491
- sm: "[&>svg]:h-icon-sm [&>svg]:w-icon-sm",
3492
- default: "[&>svg]:h-icon-default [&>svg]:w-icon-default",
3493
- lg: "[&>svg]:h-icon-lg [&>svg]:w-icon-lg"
3494
- };
3495
- const Icon = ({ children, className, size = "default", ...props }) => {
3496
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("block", sizes[size], className), ...props, children });
3497
- };
3498
-
3499
3565
  const transitions = {
3500
3566
  // For color changes (background, text, border)
3501
3567
  colors: "transition-colors duration-normal ease-out-custom",
@@ -3604,7 +3670,7 @@ const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) =
3604
3670
  return /* @__PURE__ */ jsxRuntime.jsx(Root, { className: cn(variants[variant], font && fonts[font], className), ...props });
3605
3671
  };
3606
3672
 
3607
- const sizeClasses$5 = {
3673
+ const sizeClasses$4 = {
3608
3674
  sm: "h-avatar-sm w-avatar-sm",
3609
3675
  md: "h-avatar-md w-avatar-md",
3610
3676
  lg: "h-avatar-lg w-avatar-lg"
@@ -3614,7 +3680,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
3614
3680
  "div",
3615
3681
  {
3616
3682
  className: cn(
3617
- sizeClasses$5[size],
3683
+ sizeClasses$4[size],
3618
3684
  "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
3619
3685
  transitions.all,
3620
3686
  interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
@@ -3624,7 +3690,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
3624
3690
  );
3625
3691
  };
3626
3692
 
3627
- const variantClasses$1 = {
3693
+ const variantClasses = {
3628
3694
  default: "text-neutral3 bg-surface4",
3629
3695
  success: "text-accent1 bg-accent1Dark",
3630
3696
  error: "text-accent2 bg-accent2Dark",
@@ -3646,7 +3712,7 @@ const Badge = ({ icon, variant = "default", className, children, ...props }) =>
3646
3712
  "font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-full border border-border1 shrink-0",
3647
3713
  transitions.colors,
3648
3714
  icon ? "pl-2 pr-2.5" : "px-2.5",
3649
- variant === "default" && icon ? "bg-surface4 text-neutral5" : variantClasses$1[variant],
3715
+ variant === "default" && icon ? "bg-surface4 text-neutral5" : variantClasses[variant],
3650
3716
  className
3651
3717
  ),
3652
3718
  ...props,
@@ -5673,7 +5739,7 @@ const LogoWithoutText = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns
5673
5739
  ) });
5674
5740
 
5675
5741
  const PATH_D = "M4.49805 11.6934C6.98237 11.6934 8.99609 13.7081 8.99609 16.1924C8.9959 18.6765 6.98225 20.6904 4.49805 20.6904C2.01394 20.6903 0.000196352 18.6765 0 16.1924C0 13.7081 2.01382 11.6935 4.49805 11.6934ZM10.3867 0C12.8709 0 14.8846 2.01388 14.8848 4.49805C14.8848 4.8377 14.847 5.16846 14.7755 5.48643C14.4618 6.88139 14.1953 8.4633 14.9928 9.65L16.2575 11.5319C16.3363 11.6491 16.4727 11.7115 16.6137 11.703C16.7369 11.6957 16.8525 11.6343 16.9214 11.5318L18.1876 9.64717C18.9772 8.47198 18.7236 6.90783 18.4205 5.52484C18.3523 5.21392 18.3164 4.89094 18.3164 4.55957C18.3167 2.07546 20.3313 0.0615234 22.8154 0.0615234C25.2994 0.0617476 27.3132 2.0756 27.3135 4.55957C27.3135 4.93883 27.2665 5.30712 27.178 5.65896C26.8547 6.94441 26.5817 8.37932 27.2446 9.52714L28.459 11.6301C28.4819 11.6697 28.5245 11.6934 28.5703 11.6934C31.0545 11.6935 33.0684 13.7081 33.0684 16.1924C33.0682 18.6765 31.0544 20.6903 28.5703 20.6904C26.0861 20.6904 24.0725 18.6765 24.0723 16.1924C24.0723 15.8049 24.1212 15.4288 24.2133 15.0701C24.5458 13.7746 24.8298 12.3251 24.1609 11.1668L23.0044 9.16384C22.9656 9.09659 22.8931 9.05859 22.8154 9.05859C22.7983 9.05859 22.7824 9.06614 22.7728 9.08033L21.4896 10.9895C20.686 12.1851 20.9622 13.781 21.284 15.1851C21.3582 15.5089 21.3975 15.8461 21.3975 16.1924C21.3973 18.6764 19.3834 20.6902 16.8994 20.6904C14.4152 20.6904 12.4006 18.6765 12.4004 16.1924C12.4004 15.932 12.4226 15.6768 12.4651 15.4286C12.6859 14.14 12.8459 12.7122 12.1167 11.6271L11.2419 10.3253C10.6829 9.49347 9.71913 9.05932 8.78286 8.70188C7.0906 8.05584 5.88867 6.41734 5.88867 4.49805C5.88886 2.0139 7.90254 3.29835e-05 10.3867 0Z";
5676
- const sizeClasses$4 = {
5742
+ const sizeClasses$3 = {
5677
5743
  sm: "w-6",
5678
5744
  md: "w-10"
5679
5745
  };
@@ -5702,7 +5768,7 @@ function Logo({ className, size = "md", animateOnHover = false, "aria-label": ar
5702
5768
  onAnimationEnd: handleAnimationEnd,
5703
5769
  className: cn(
5704
5770
  "logo inline-block text-neutral6",
5705
- sizeClasses$4[size],
5771
+ sizeClasses$3[size],
5706
5772
  animateOnHover && playing && "logo-animate-on-hover",
5707
5773
  className
5708
5774
  ),
@@ -5920,47 +5986,6 @@ function useTableKeyboardNavigation({
5920
5986
  };
5921
5987
  }
5922
5988
 
5923
- const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
5924
- const cx = clsx;
5925
- const cva = (base, config)=>(props)=>{
5926
- var _config_compoundVariants;
5927
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5928
- const { variants, defaultVariants } = config;
5929
- const getVariantClassNames = Object.keys(variants).map((variant)=>{
5930
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
5931
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
5932
- if (variantProp === null) return null;
5933
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
5934
- return variants[variant][variantKey];
5935
- });
5936
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
5937
- let [key, value] = param;
5938
- if (value === undefined) {
5939
- return acc;
5940
- }
5941
- acc[key] = value;
5942
- return acc;
5943
- }, {});
5944
- const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
5945
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
5946
- return Object.entries(compoundVariantOptions).every((param)=>{
5947
- let [key, value] = param;
5948
- return Array.isArray(value) ? value.includes({
5949
- ...defaultVariants,
5950
- ...propsWithoutUndefined
5951
- }[key]) : ({
5952
- ...defaultVariants,
5953
- ...propsWithoutUndefined
5954
- })[key] === value;
5955
- }) ? [
5956
- ...acc,
5957
- cvClass,
5958
- cvClassName
5959
- ] : acc;
5960
- }, []);
5961
- return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
5962
- };
5963
-
5964
5989
  const textareaVariants = cva(
5965
5990
  cn(
5966
5991
  // Base styles with enhanced transitions
@@ -6025,14 +6050,9 @@ function AlertDialog({
6025
6050
  const AlertDialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6026
6051
  AlertDialogPrimitive__namespace.Overlay,
6027
6052
  {
6028
- className: cn(
6029
- "fixed inset-0 z-50 bg-overlay backdrop-blur-sm",
6030
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",
6031
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-150",
6032
- className
6033
- ),
6034
- ...props,
6035
- ref
6053
+ ref,
6054
+ className: cn("dialog-overlay-anim fixed inset-0 z-50 bg-overlay backdrop-blur-xs", className),
6055
+ ...props
6036
6056
  }
6037
6057
  ));
6038
6058
  AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
@@ -6043,9 +6063,10 @@ const AlertDialogContent = React__namespace.forwardRef(({ className, ...props },
6043
6063
  {
6044
6064
  ref,
6045
6065
  className: cn(
6046
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border1 bg-surface3 p-6 shadow-dialog rounded-md",
6047
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=open]:duration-200",
6048
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=closed]:duration-150",
6066
+ "dialog-content-anim",
6067
+ "fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%]",
6068
+ "w-full max-w-[calc(100%-2rem)] sm:max-w-lg",
6069
+ "rounded-xl border border-border1/40 bg-surface2/96 backdrop-blur-md shadow-dialog",
6049
6070
  className
6050
6071
  ),
6051
6072
  ...props
@@ -6053,13 +6074,15 @@ const AlertDialogContent = React__namespace.forwardRef(({ className, ...props },
6053
6074
  )
6054
6075
  ] }));
6055
6076
  AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
6056
- const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
6077
+ const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-0.5 px-4 py-3 text-left", className), ...props });
6057
6078
  AlertDialogHeader.displayName = "AlertDialogHeader";
6058
- const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
6079
+ const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse gap-1.5 px-4 py-2.5 sm:flex-row sm:justify-end", className), ...props });
6059
6080
  AlertDialogFooter.displayName = "AlertDialogFooter";
6060
- const AlertDialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
6081
+ const AlertDialogBody = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("overflow-y-auto px-4 py-3.5 max-h-[50vh]", className), ...props });
6082
+ AlertDialogBody.displayName = "AlertDialogBody";
6083
+ const AlertDialogTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-ui-md font-medium", className), ...props }));
6061
6084
  AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
6062
- const AlertDialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-neutral3", className), ...props }));
6085
+ const AlertDialogDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Description, { ref, className: cn("text-ui-sm text-neutral3", className), ...props }));
6063
6086
  AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
6064
6087
  const AlertDialogAction = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
6065
6088
  AlertDialogPrimitive__namespace.Action,
@@ -6074,7 +6097,7 @@ const AlertDialogCancel = React__namespace.forwardRef(({ className, ...props },
6074
6097
  AlertDialogPrimitive__namespace.Cancel,
6075
6098
  {
6076
6099
  ref,
6077
- className: cn(buttonVariants({ variant: "default", size: "default" }), "mt-2 sm:mt-0", className),
6100
+ className: cn(buttonVariants({ variant: "default", size: "default" }), className),
6078
6101
  ...props
6079
6102
  }
6080
6103
  ));
@@ -6085,6 +6108,7 @@ AlertDialog.Overlay = AlertDialogOverlay;
6085
6108
  AlertDialog.Content = AlertDialogContent;
6086
6109
  AlertDialog.Header = AlertDialogHeader;
6087
6110
  AlertDialog.Footer = AlertDialogFooter;
6111
+ AlertDialog.Body = AlertDialogBody;
6088
6112
  AlertDialog.Title = AlertDialogTitle;
6089
6113
  AlertDialog.Description = AlertDialogDescription;
6090
6114
  AlertDialog.Action = AlertDialogAction;
@@ -6236,7 +6260,7 @@ function Combobox({
6236
6260
  emptyText = "No option found.",
6237
6261
  className,
6238
6262
  disabled = false,
6239
- variant = "inputLike",
6263
+ variant = "default",
6240
6264
  size = "default",
6241
6265
  open,
6242
6266
  onOpenChange,
@@ -7013,7 +7037,7 @@ const Select = SelectPrimitive__namespace.Root;
7013
7037
  const SelectGroup = SelectPrimitive__namespace.Group;
7014
7038
  const SelectValue = SelectPrimitive__namespace.Value;
7015
7039
  const SelectTrigger = React__namespace.forwardRef(
7016
- ({ className, children, variant = "inputLike", size = "default", ...props }, ref) => {
7040
+ ({ className, children, variant = "default", size = "default", ...props }, ref) => {
7017
7041
  return /* @__PURE__ */ jsxRuntime.jsxs(
7018
7042
  SelectPrimitive__namespace.Trigger,
7019
7043
  {
@@ -7116,53 +7140,6 @@ function SelectFieldBlock({
7116
7140
  ] });
7117
7141
  }
7118
7142
 
7119
- const sizeClasses$3 = {
7120
- sm: `${formElementSizes.sm} w-form-sm`,
7121
- md: `${formElementSizes.md} w-form-md`,
7122
- lg: `${formElementSizes.lg} w-form-lg`,
7123
- default: `${formElementSizes.default}`
7124
- };
7125
- const iconSizeMap = {
7126
- sm: "sm",
7127
- md: "default",
7128
- lg: "lg",
7129
- default: "default"
7130
- };
7131
- const variantClasses = {
7132
- default: "bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
7133
- light: "bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
7134
- outline: "bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
7135
- ghost: "bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",
7136
- primary: "bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"
7137
- };
7138
- const baseButtonStyles = "border border-border1 inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";
7139
- const IconButton = React.forwardRef(
7140
- ({ className, children, tooltip, size = "md", variant = "default", disabled, ...props }, ref) => {
7141
- return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
7142
- /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
7143
- "button",
7144
- {
7145
- ref,
7146
- disabled,
7147
- "aria-label": typeof tooltip === "string" ? tooltip : void 0,
7148
- className: cn(
7149
- baseButtonStyles,
7150
- formElementFocus,
7151
- variantClasses[variant],
7152
- sizeClasses$3[size],
7153
- disabled && "active:scale-100",
7154
- className
7155
- ),
7156
- ...props,
7157
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: iconSizeMap[size], children })
7158
- }
7159
- ) }),
7160
- /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: tooltip })
7161
- ] });
7162
- }
7163
- );
7164
- IconButton.displayName = "IconButton";
7165
-
7166
7143
  const themeClasses = {
7167
7144
  light: "bg-gray-100 border-gray-300 text-gray-700 shadow-[0_1px_0_rgba(0,0,0,0.1)]",
7168
7145
  dark: "bg-surface4 border-border1 text-neutral5 shadow-[0_1px_0_rgba(0,0,0,0.3)]"
@@ -9058,7 +9035,7 @@ const DateTimePickerContent = ({
9058
9035
  };
9059
9036
  const DefaultTrigger = React__namespace.forwardRef(
9060
9037
  ({ value, placeholder, className, ...props }, ref) => {
9061
- return /* @__PURE__ */ jsxRuntime.jsxs(Button, { ref, className: cn("justify-start", className), variant: "inputLike", ...props, children: [
9038
+ return /* @__PURE__ */ jsxRuntime.jsxs(Button, { ref, className: cn("justify-start", className), ...props, children: [
9062
9039
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "h-4 w-4" }),
9063
9040
  value ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white", children: dateFns.format(value, "PP p") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray", children: placeholder ?? "Pick a date" })
9064
9041
  ] });
@@ -9770,7 +9747,7 @@ function FieldNullable({
9770
9747
 
9771
9748
  function FieldRemove({ children, tooltip = "Remove field", ...props }) {
9772
9749
  const { remove } = useJSONSchemaFormField();
9773
- return /* @__PURE__ */ jsxRuntime.jsx(ButtonWithTooltip, { tooltipContent: tooltip, onClick: remove, size: "md", ...props, children: children || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2Icon, {}) });
9750
+ return /* @__PURE__ */ jsxRuntime.jsx(Button, { ...props, tooltip, onClick: remove, size: "icon-md", children: children || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2Icon, {}) });
9774
9751
  }
9775
9752
 
9776
9753
  function NestedFields({ className, children }) {
@@ -14850,7 +14827,7 @@ const RuleRow = ({ schema, rule, onChange, onRemove, className }) => {
14850
14827
  )
14851
14828
  ] })
14852
14829
  ] }),
14853
- /* @__PURE__ */ jsxRuntime.jsx(IconButton, { type: "button", onClick: onRemove, tooltip: "Remove rule", size: "sm", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
14830
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: onRemove, tooltip: "Remove rule", size: "icon-sm", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
14854
14831
  ] });
14855
14832
  };
14856
14833
 
@@ -14889,7 +14866,7 @@ const RuleGroupView = ({ schema, group, onChange, onRemove, depth, maxDepth }) =
14889
14866
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(isRoot ? "bg-surface2" : "pl-6 bg-surface3"), children: [
14890
14867
  !isRoot && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pl-3 pr-4 py-1.5 border-b border-border1 border-dashed", children: [
14891
14868
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ui-xs text-neutral3", children: "Group" }),
14892
- onRemove && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { type: "button", onClick: onRemove, tooltip: "Remove group", size: "sm", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
14869
+ onRemove && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: onRemove, tooltip: "Remove group", size: "icon-sm", variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) })
14893
14870
  ] }),
14894
14871
  group.conditions.map((condition, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-border1 border-dashed last:border-b-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", isRule(condition) && "p-4 border-l-4 border-border1"), children: [
14895
14872
  index > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -19365,7 +19342,6 @@ exports.HomeIcon = HomeIcon;
19365
19342
  exports.HorizontalBars = HorizontalBars;
19366
19343
  exports.HoverPopover = HoverPopover;
19367
19344
  exports.Icon = Icon;
19368
- exports.IconButton = IconButton;
19369
19345
  exports.InfoIcon = InfoIcon;
19370
19346
  exports.Input = Input;
19371
19347
  exports.ItemList = ItemList;