@constructive-io/ui 0.14.1 → 0.15.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 (77) hide show
  1. package/dist/{ai-B08ufcbD.cjs → ai-DpeOFEwx.cjs} +9 -10
  2. package/dist/ai-DpeOFEwx.cjs.map +1 -0
  3. package/dist/{ai-4JrVVL3q.js → ai-b5y3Iqy4.js} +9 -10
  4. package/dist/ai-b5y3Iqy4.js.map +1 -0
  5. package/dist/components/ai/index.cjs +1 -1
  6. package/dist/components/ai/index.js +1 -1
  7. package/dist/components/autocomplete.cjs +1 -1
  8. package/dist/components/autocomplete.js +1 -1
  9. package/dist/components/badge.d.cts +2 -2
  10. package/dist/components/badge.d.ts +2 -2
  11. package/dist/components/button.cjs +2 -2
  12. package/dist/components/button.cjs.map +1 -1
  13. package/dist/components/button.d.cts +2 -2
  14. package/dist/components/button.d.ts +2 -2
  15. package/dist/components/button.js +2 -2
  16. package/dist/components/button.js.map +1 -1
  17. package/dist/components/card.d.cts +1 -1
  18. package/dist/components/card.d.ts +1 -1
  19. package/dist/components/combobox.cjs +1 -1
  20. package/dist/components/combobox.js +1 -1
  21. package/dist/components/command.cjs +1 -1
  22. package/dist/components/command.js +1 -1
  23. package/dist/components/dropdown-menu.cjs +8 -7
  24. package/dist/components/dropdown-menu.cjs.map +1 -1
  25. package/dist/components/dropdown-menu.js +8 -7
  26. package/dist/components/dropdown-menu.js.map +1 -1
  27. package/dist/components/input-group.cjs +2 -2
  28. package/dist/components/input-group.cjs.map +1 -1
  29. package/dist/components/input-group.js +2 -2
  30. package/dist/components/input-group.js.map +1 -1
  31. package/dist/components/input-otp.cjs +5 -2
  32. package/dist/components/input-otp.cjs.map +1 -1
  33. package/dist/components/input-otp.js +5 -2
  34. package/dist/components/input-otp.js.map +1 -1
  35. package/dist/components/item.d.cts +1 -1
  36. package/dist/components/item.d.ts +1 -1
  37. package/dist/components/multi-select.cjs +1 -1
  38. package/dist/components/multi-select.js +1 -1
  39. package/dist/components/select.cjs +5 -5
  40. package/dist/components/select.cjs.map +1 -1
  41. package/dist/components/select.js +5 -5
  42. package/dist/components/select.js.map +1 -1
  43. package/dist/components/sheet.cjs +1 -1
  44. package/dist/components/sheet.js +1 -1
  45. package/dist/components/sidebar.cjs +1 -1
  46. package/dist/components/sidebar.js +1 -1
  47. package/dist/components/stack/index.d.cts +1 -1
  48. package/dist/components/stack/index.d.ts +1 -1
  49. package/dist/components/toggle-group.cjs +6 -2
  50. package/dist/components/toggle-group.cjs.map +1 -1
  51. package/dist/components/toggle-group.js +6 -2
  52. package/dist/components/toggle-group.js.map +1 -1
  53. package/dist/components/workspace-kit/index.cjs +1 -1
  54. package/dist/components/workspace-kit/index.js +1 -1
  55. package/dist/{fluid-highlight-YWFRZXsw.cjs → fluid-highlight-B8olepSM.cjs} +7 -5
  56. package/dist/fluid-highlight-B8olepSM.cjs.map +1 -0
  57. package/dist/{fluid-highlight-CNELHV8o.js → fluid-highlight-BXVfWNk9.js} +7 -5
  58. package/dist/fluid-highlight-BXVfWNk9.js.map +1 -0
  59. package/dist/{index-B7cT7gZU.d.cts → index-BzLmDsId.d.cts} +3 -3
  60. package/dist/{index-B7cT7gZU.d.ts → index-BzLmDsId.d.ts} +3 -3
  61. package/dist/index.cjs +3 -3
  62. package/dist/index.d.cts +1 -1
  63. package/dist/index.d.ts +1 -1
  64. package/dist/index.js +3 -3
  65. package/dist/{sheet-OxWlnT_G.cjs → sheet-CGFqOAoI.cjs} +2 -2
  66. package/dist/{sheet-OxWlnT_G.cjs.map → sheet-CGFqOAoI.cjs.map} +1 -1
  67. package/dist/{sheet-wPF_l9Cn.js → sheet-LOK_d8-K.js} +2 -2
  68. package/dist/{sheet-wPF_l9Cn.js.map → sheet-LOK_d8-K.js.map} +1 -1
  69. package/dist/{sidebar-DWl1Azyv.js → sidebar-BNZkdIvO.js} +2 -2
  70. package/dist/{sidebar-DWl1Azyv.js.map → sidebar-BNZkdIvO.js.map} +1 -1
  71. package/dist/{sidebar-BEEWmJwC.cjs → sidebar-Bt7qXsqo.cjs} +2 -2
  72. package/dist/{sidebar-BEEWmJwC.cjs.map → sidebar-Bt7qXsqo.cjs.map} +1 -1
  73. package/package.json +2 -2
  74. package/dist/ai-4JrVVL3q.js.map +0 -1
  75. package/dist/ai-B08ufcbD.cjs.map +0 -1
  76. package/dist/fluid-highlight-CNELHV8o.js.map +0 -1
  77. package/dist/fluid-highlight-YWFRZXsw.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const require_ai = require('../../ai-B08ufcbD.cjs');
3
+ const require_ai = require('../../ai-DpeOFEwx.cjs');
4
4
 
5
5
  exports.AgentDraftCard = require_ai.AgentDraftCard;
6
6
  exports.AgentLoader = require_ai.AgentLoader;
@@ -1,4 +1,4 @@
1
1
  'use client';
2
- import { $ as useChatContainer, A as PromptSuggestions, B as normalizeToolStatus, C as TaskRow, D as DiffTable, E as PlanTracker, F as Sources, G as ThinkingTrace, H as ChainOfThoughtStep, I as ApprovalCard, J as formatDuration, K as Reasoning, L as StatusIcon, M as InlineDiff, N as lineDiff, O as StreamingText, P as Source, Q as ChatContainerContent, R as Tool, S as TaskList, T as formatCompact, U as Step, V as ChainOfThought, W as Steps, X as ScrollButton, Y as SystemMessage, Z as ChatContainer, _ as AiImage, _t as AgentLoader, a as PromptInputAttachments, at as MessageAvatar, b as ContextCard, c as UsageNotice, ct as renderBasicMarkdown, d as PromptInputTrayRow, dt as PromptInput, et as ResponseStream, f as ThinkingStatus, ft as PromptInputAction, g as iconEnterClass, gt as usePromptInput, h as MarkTile, ht as PromptInputTextarea, i as PromptInputAttachment, it as MessageActions, j as FeedbackBar, k as PromptSuggestion, l as usageTone, lt as STREAM_THROTTLE_MS, m as ToolTrace, mt as PromptInputBody, n as ConnectPrompt, nt as Message, o as CostBlocks, ot as MessageContent, p as formatElapsed, pt as PromptInputActions, q as ThinkingBar, r as AskCard, rt as MessageAction, s as ModelSelector, st as Markdown, t as AgentDraftCard, tt as CodeBlock, u as PromptInputTray, ut as useThrottledText, v as FileUpload, vt as Loader, w as ContextRing, x as ContextCards, y as RecommendationCard, yt as TextShimmer, z as ToolGroup } from "../../ai-4JrVVL3q.js";
2
+ import { $ as useChatContainer, A as PromptSuggestions, B as normalizeToolStatus, C as TaskRow, D as DiffTable, E as PlanTracker, F as Sources, G as ThinkingTrace, H as ChainOfThoughtStep, I as ApprovalCard, J as formatDuration, K as Reasoning, L as StatusIcon, M as InlineDiff, N as lineDiff, O as StreamingText, P as Source, Q as ChatContainerContent, R as Tool, S as TaskList, T as formatCompact, U as Step, V as ChainOfThought, W as Steps, X as ScrollButton, Y as SystemMessage, Z as ChatContainer, _ as AiImage, _t as AgentLoader, a as PromptInputAttachments, at as MessageAvatar, b as ContextCard, c as UsageNotice, ct as renderBasicMarkdown, d as PromptInputTrayRow, dt as PromptInput, et as ResponseStream, f as ThinkingStatus, ft as PromptInputAction, g as iconEnterClass, gt as usePromptInput, h as MarkTile, ht as PromptInputTextarea, i as PromptInputAttachment, it as MessageActions, j as FeedbackBar, k as PromptSuggestion, l as usageTone, lt as STREAM_THROTTLE_MS, m as ToolTrace, mt as PromptInputBody, n as ConnectPrompt, nt as Message, o as CostBlocks, ot as MessageContent, p as formatElapsed, pt as PromptInputActions, q as ThinkingBar, r as AskCard, rt as MessageAction, s as ModelSelector, st as Markdown, t as AgentDraftCard, tt as CodeBlock, u as PromptInputTray, ut as useThrottledText, v as FileUpload, vt as Loader, w as ContextRing, x as ContextCards, y as RecommendationCard, yt as TextShimmer, z as ToolGroup } from "../../ai-b5y3Iqy4.js";
3
3
 
4
4
  export { AgentDraftCard, AgentLoader, AiImage, ApprovalCard, AskCard, ChainOfThought, ChainOfThoughtStep, ChatContainer, ChatContainerContent, CodeBlock, ConnectPrompt, ContextCard, ContextCards, ContextRing, CostBlocks, DiffTable, FeedbackBar, FileUpload, InlineDiff, Loader, MarkTile, Markdown, Message, MessageAction, MessageActions, MessageAvatar, MessageContent, ModelSelector, PlanTracker, PromptInput, PromptInputAction, PromptInputActions, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputTextarea, PromptInputTray, PromptInputTrayRow, PromptSuggestion, PromptSuggestions, Reasoning, RecommendationCard, ResponseStream, STREAM_THROTTLE_MS, ScrollButton, Source, Sources, StatusIcon, Step, Steps, StreamingText, SystemMessage, TaskList, TaskRow, TextShimmer, ThinkingBar, ThinkingStatus, ThinkingTrace, Tool, ToolGroup, ToolTrace, UsageNotice, formatCompact, formatDuration, formatElapsed, iconEnterClass, lineDiff, normalizeToolStatus, renderBasicMarkdown, usageTone, useChatContainer, usePromptInput, useThrottledText };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_utils = require('../utils-CzTQ3-VI.cjs');
5
5
  const require_components_input = require('./input.cjs');
6
- const require_fluid_highlight = require('../fluid-highlight-YWFRZXsw.cjs');
6
+ const require_fluid_highlight = require('../fluid-highlight-B8olepSM.cjs');
7
7
  const require_components_scroll_area = require('./scroll-area.cjs');
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let lucide_react = require("lucide-react");
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as cn } from "../utils-BkMLyah9.js";
4
4
  import { Input } from "./input.js";
5
- import { t as FluidHighlight } from "../fluid-highlight-CNELHV8o.js";
5
+ import { t as FluidHighlight } from "../fluid-highlight-BXVfWNk9.js";
6
6
  import { ScrollArea } from "./scroll-area.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { ChevronsUpDownIcon, XIcon } from "lucide-react";
@@ -3,12 +3,12 @@ import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/badge.d.ts
4
4
  declare const badgeVariants: (props?: ({
5
5
  size?: "default" | "lg" | "sm" | null | undefined;
6
- variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "info" | "success" | "warning" | null | undefined;
6
+ variant?: "default" | "destructive" | "error" | "info" | "outline" | "secondary" | "success" | "warning" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  type BadgeProps = React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants>;
9
9
  declare const Badge: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
10
10
  size?: "default" | "lg" | "sm" | null | undefined;
11
- variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "info" | "success" | "warning" | null | undefined;
11
+ variant?: "default" | "destructive" | "error" | "info" | "outline" | "secondary" | "success" | "warning" | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLSpanElement>>;
13
13
  //#endregion
14
14
  export { Badge, type BadgeProps, badgeVariants };
@@ -3,12 +3,12 @@ import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/badge.d.ts
4
4
  declare const badgeVariants: (props?: ({
5
5
  size?: "default" | "lg" | "sm" | null | undefined;
6
- variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "info" | "success" | "warning" | null | undefined;
6
+ variant?: "default" | "destructive" | "error" | "info" | "outline" | "secondary" | "success" | "warning" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  type BadgeProps = React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants>;
9
9
  declare const Badge: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
10
10
  size?: "default" | "lg" | "sm" | null | undefined;
11
- variant?: "default" | "destructive" | "outline" | "secondary" | "error" | "info" | "success" | "warning" | null | undefined;
11
+ variant?: "default" | "destructive" | "error" | "info" | "outline" | "secondary" | "success" | "warning" | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLSpanElement>>;
13
13
  //#endregion
14
14
  export { Badge, type BadgeProps, badgeVariants };
@@ -10,7 +10,7 @@ let _base_ui_react_button = require("@base-ui/react/button");
10
10
  let class_variance_authority = require("class-variance-authority");
11
11
 
12
12
  //#region src/components/button.tsx
13
- const buttonVariants = (0, class_variance_authority.cva)("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
13
+ const buttonVariants = (0, class_variance_authority.cva)("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[scale] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-none [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
14
14
  defaultVariants: {
15
15
  size: "default",
16
16
  static: false,
@@ -19,7 +19,7 @@ const buttonVariants = (0, class_variance_authority.cva)("[&_svg]:-mx-0.5 relati
19
19
  },
20
20
  variants: {
21
21
  static: {
22
- false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]",
22
+ false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.97]",
23
23
  true: null
24
24
  },
25
25
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.cjs","names":["React","cn","BaseButton","Slot"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: \"h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\txs:\n\t\t\t\t\t\"h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\n\t\t],\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"],"mappings":";;;;;;;;;;;;AAOA,MAAM,mDACL,gpBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;CACA,UAAU;EACT,QAAQ;GACP,OAAO;GACP,MAAM;EACP;EACA,MAAM;GACL,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,WACC;GACD,IAAI;GACJ,IACC;GACD,IAAI;GACJ,IACC;EACF;EACA,SAAS;GACR,SACC;GACD,aACC;GACD,uBACC;GACD,OAAO;GACP,MAAM;GACN,SACC;GACD,WACC;EACF;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,MAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgBC,iBAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,2CAACC,8BAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWF,MAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,2CAACG,mBAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,2CAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
1
+ {"version":3,"file":"button.cjs","names":["React","cn","BaseButton","Slot"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[scale] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-none [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\t// A short press-in to 0.97 and back (150ms, smooth-out). Only the scale moves: the focus ring\n\t\t\t\t// and the pressed shadow change at once, and reduced motion keeps the button still.\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-disabled:scale-[0.97]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: \"h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\txs:\n\t\t\t\t\t\"h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\n\t\t],\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"],"mappings":";;;;;;;;;;;;AAOA,MAAM,mDACL,2oBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;CACA,UAAU;EACT,QAAQ;GAGP,OAAO;GACP,MAAM;EACP;EACA,MAAM;GACL,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,WACC;GACD,IAAI;GACJ,IACC;GACD,IAAI;GACJ,IACC;EACF;EACA,SAAS;GACR,SACC;GACD,aACC;GACD,uBACC;GACD,OAAO;GACP,MAAM;GACN,SACC;GACD,WACC;EACF;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,MAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgBC,iBAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,2CAACC,8BAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWF,MAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,2CAACG,mBAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,2CAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
@@ -3,8 +3,8 @@ import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/button.d.ts
4
4
  declare const buttonVariants: (props?: ({
5
5
  static?: boolean | null | undefined;
6
- size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "sm" | "xl" | "xs" | null | undefined;
7
- variant?: "link" | "default" | "destructive" | "destructive-outline" | "ghost" | "outline" | "secondary" | null | undefined;
6
+ size?: "default" | "lg" | "sm" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "xl" | "xs" | null | undefined;
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "destructive-outline" | "link" | null | undefined;
8
8
  wrap?: boolean | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -3,8 +3,8 @@ import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/button.d.ts
4
4
  declare const buttonVariants: (props?: ({
5
5
  static?: boolean | null | undefined;
6
- size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "sm" | "xl" | "xs" | null | undefined;
7
- variant?: "link" | "default" | "destructive" | "destructive-outline" | "ghost" | "outline" | "secondary" | null | undefined;
6
+ size?: "default" | "lg" | "sm" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "xl" | "xs" | null | undefined;
7
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "destructive-outline" | "link" | null | undefined;
8
8
  wrap?: boolean | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -7,7 +7,7 @@ import { Button as Button$1 } from "@base-ui/react/button";
7
7
  import { cva } from "class-variance-authority";
8
8
 
9
9
  //#region src/components/button.tsx
10
- const buttonVariants = cva("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
10
+ const buttonVariants = cva("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[scale] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-none [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
11
11
  defaultVariants: {
12
12
  size: "default",
13
13
  static: false,
@@ -16,7 +16,7 @@ const buttonVariants = cva("[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor
16
16
  },
17
17
  variants: {
18
18
  static: {
19
- false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]",
19
+ false: "motion-safe:active:not-disabled:not-data-disabled:scale-[0.97]",
20
20
  true: null
21
21
  },
22
22
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["React","BaseButton"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[box-shadow,scale] duration-(--duration-moderate) ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: \"h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\txs:\n\t\t\t\t\t\"h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\n\t\t],\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"],"mappings":";;;;;;;;;AAOA,MAAM,iBAAiB,IACtB,gpBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;CACA,UAAU;EACT,QAAQ;GACP,OAAO;GACP,MAAM;EACP;EACA,MAAM;GACL,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,WACC;GACD,IAAI;GACJ,IACC;GACD,IAAI;GACJ,IACC;EACF;EACA,SAAS;GACR,SACC;GACD,aACC;GACD,uBACC;GACD,OAAO;GACP,MAAM;GACN,SACC;GACD,WACC;EACF;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,QAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgB,GAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,oBAACC,UAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWD,QAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,oBAAC,MAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,oBAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
1
+ {"version":3,"file":"button.js","names":["React","BaseButton"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as BaseButton } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-[scale] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-64 data-disabled:cursor-not-allowed data-disabled:opacity-64 motion-reduce:transition-none [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t\twrap: false,\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\t// A short press-in to 0.97 and back (150ms, smooth-out). Only the scale moves: the focus ring\n\t\t\t\t// and the pressed shadow change at once, and reduced motion keeps the button still.\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:not-data-disabled:scale-[0.97]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: \"h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\txs:\n\t\t\t\t\t\"h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-primary data-disabled:active:inset-shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:not-data-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none data-disabled:hover:bg-destructive data-disabled:active:inset-shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8 data-disabled:[:hover]:border-destructive/40 data-disabled:[:hover]:bg-transparent dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent data-disabled:hover:bg-transparent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline data-disabled:hover:no-underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:not-data-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-data-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,[data-disabled],:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64 data-disabled:[:hover]:bg-background dark:data-disabled:[:hover]:bg-input/32',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80 data-disabled:hover:bg-secondary data-disabled:active:bg-secondary',\n\t\t\t},\n\t\t\t// Opt-in: long or translated labels wrap onto more lines instead of\n\t\t\t// overflowing. The height becomes a minimum and the button may shrink\n\t\t\t// inside a flex row. Icon sizes ignore it (they have no label).\n\t\t\twrap: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-full min-w-0 shrink whitespace-normal text-center [overflow-wrap:anywhere]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{ wrap: true, size: 'default', className: 'h-auto min-h-10 py-[calc(--spacing(2)-1px)]' },\n\t\t\t{ wrap: true, size: 'sm', className: 'h-auto min-h-8 py-[calc(--spacing(1.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xs', className: 'h-auto min-h-7 py-[calc(--spacing(1)-1px)]' },\n\t\t\t{ wrap: true, size: 'lg', className: 'h-auto min-h-11 py-[calc(--spacing(2.5)-1px)]' },\n\t\t\t{ wrap: true, size: 'xl', className: 'h-auto min-h-12 py-[calc(--spacing(3)-1px)]' },\n\t\t],\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/**\n\t * Lets the label wrap onto several lines (long or translated copy) instead of\n\t * staying on one line and overflowing. The height becomes a minimum and the\n\t * button can shrink inside a flex row. Off by default.\n\t */\n\twrap?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/**\n\t * Keeps the button focusable and hoverable while disabled, disabled with `aria-disabled` instead, so a tooltip\n\t * explaining why it is disabled can still open. `TooltipTrigger` sets it on a `Button` child.\n\t */\n\tfocusableWhenDisabled?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, wrap, asChild, focusableWhenDisabled, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant, wrap }));\n\n\t\t// Base UI keeps a disabled button focusable, marks it `aria-disabled` and swallows the events a native disabled\n\t\t// button never receives, so a composed menu or dialog trigger cannot open and a consumer handler cannot run. It\n\t\t// renders the same element enabled or disabled, so toggling keeps focus and what the element holds.\n\t\tif (focusableWhenDisabled) {\n\t\t\treturn (\n\t\t\t\t<BaseButton\n\t\t\t\t\tref={ref}\n\t\t\t\t\tfocusableWhenDisabled\n\t\t\t\t\tnativeButton={!asChild}\n\t\t\t\t\trender={asChild && React.isValidElement(children) ? children : undefined}\n\t\t\t\t\ttype={asChild ? undefined : type}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{asChild ? undefined : children}\n\t\t\t\t</BaseButton>\n\t\t\t);\n\t\t}\n\n\t\tif (asChild) {\n\t\t\treturn (\n\t\t\t\t<Slot ref={ref as React.Ref<HTMLElement>} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t\t{children}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"],"mappings":";;;;;;;;;AAOA,MAAM,iBAAiB,IACtB,2oBACA;CACC,iBAAiB;EAChB,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACP;CACA,UAAU;EACT,QAAQ;GAGP,OAAO;GACP,MAAM;EACP;EACA,MAAM;GACL,SAAS;GACT,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;GACX,WACC;GACD,IAAI;GACJ,IACC;GACD,IAAI;GACJ,IACC;EACF;EACA,SAAS;GACR,SACC;GACD,aACC;GACD,uBACC;GACD,OAAO;GACP,MAAM;GACN,SACC;GACD,WACC;EACF;EAIA,MAAM;GACL,OAAO;GACP,MAAM;EACP;CACD;CACA,kBAAkB;EACjB;GAAE,MAAM;GAAM,MAAM;GAAW,WAAW;EAA8C;EACxF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA+C;EACpF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA6C;EAClF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAAgD;EACrF;GAAE,MAAM;GAAM,MAAM;GAAM,WAAW;EAA8C;CACpF;AACD,CACD;AAsBA,MAAM,SAASA,QAAM,YACnB,EAAE,WAAW,SAAS,MAAM,QAAQ,UAAU,MAAM,SAAS,uBAAuB,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACnI,MAAM,gBAAgB,GAAG,eAAe;EAAE;EAAW;EAAM,QAAQ;EAAU;EAAS;CAAK,CAAC,CAAC;CAK7F,IAAI,uBACH,OACC,oBAACC,UAAD;EACM;EACL;EACA,cAAc,CAAC;EACf,QAAQ,WAAWD,QAAM,eAAe,QAAQ,IAAI,WAAW;EAC/D,MAAM,UAAU,SAAY;EAC5B,WAAW;EACX,aAAU;EACV,GAAI;YAEH,UAAU,SAAY;CACZ;CAId,IAAI,SACH,OACC,oBAAC,MAAD;EAAW;EAA+B,WAAW;EAAe,aAAU;EAAS,GAAI;EACzF;CACI;CAIR,OACC,oBAAC,UAAD;EAAa;EAAW;EAAM,WAAW;EAAe,aAAU;EAAS,GAAI;EAC7E;CACM;AAEV,CACD;AACA,OAAO,cAAc"}
@@ -2,7 +2,7 @@ import * as React$1 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/card.d.ts
4
4
  declare const cardVariants: (props?: ({
5
- variant?: "default" | "ghost" | "elevated" | "flat" | "interactive" | null | undefined;
5
+ variant?: "default" | "elevated" | "flat" | "ghost" | "interactive" | null | undefined;
6
6
  size?: "default" | "sm" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface CardProps extends React$1.ComponentProps<'div'>, VariantProps<typeof cardVariants> {}
@@ -2,7 +2,7 @@ import * as React$1 from "react";
2
2
  import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/card.d.ts
4
4
  declare const cardVariants: (props?: ({
5
- variant?: "default" | "ghost" | "elevated" | "flat" | "interactive" | null | undefined;
5
+ variant?: "default" | "elevated" | "flat" | "ghost" | "interactive" | null | undefined;
6
6
  size?: "default" | "sm" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  interface CardProps extends React$1.ComponentProps<'div'>, VariantProps<typeof cardVariants> {}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
5
5
  const require_utils = require('../utils-CzTQ3-VI.cjs');
6
6
  const require_components_input = require('./input.cjs');
7
- const require_fluid_highlight = require('../fluid-highlight-YWFRZXsw.cjs');
7
+ const require_fluid_highlight = require('../fluid-highlight-B8olepSM.cjs');
8
8
  const require_components_scroll_area = require('./scroll-area.cjs');
9
9
  let react = require("react");
10
10
  react = require_rolldown_runtime.__toESM(react, 1);
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as cn } from "../utils-BkMLyah9.js";
4
4
  import { Input } from "./input.js";
5
- import { t as FluidHighlight } from "../fluid-highlight-CNELHV8o.js";
5
+ import { t as FluidHighlight } from "../fluid-highlight-BXVfWNk9.js";
6
6
  import { ScrollArea } from "./scroll-area.js";
7
7
  import * as React$1 from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
5
5
  const require_utils = require('../utils-CzTQ3-VI.cjs');
6
- const require_fluid_highlight = require('../fluid-highlight-YWFRZXsw.cjs');
6
+ const require_fluid_highlight = require('../fluid-highlight-B8olepSM.cjs');
7
7
  let react = require("react");
8
8
  react = require_rolldown_runtime.__toESM(react, 1);
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { t as cn } from "../utils-BkMLyah9.js";
4
- import { t as FluidHighlight } from "../fluid-highlight-CNELHV8o.js";
4
+ import { t as FluidHighlight } from "../fluid-highlight-BXVfWNk9.js";
5
5
  import "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { SearchIcon } from "lucide-react";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
5
5
  const require_utils = require('../utils-CzTQ3-VI.cjs');
6
- const require_fluid_highlight = require('../fluid-highlight-YWFRZXsw.cjs');
6
+ const require_fluid_highlight = require('../fluid-highlight-B8olepSM.cjs');
7
7
  let react = require("react");
8
8
  react = require_rolldown_runtime.__toESM(react, 1);
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -12,6 +12,7 @@ let _constructive_io_ui_portal = require("@constructive-io/ui/portal");
12
12
  let _base_ui_react_menu = require("@base-ui/react/menu");
13
13
 
14
14
  //#region src/components/dropdown-menu.tsx
15
+ const MENU_ITEM_RADIUS = "rounded-[calc(var(--radius-lg)-5px)]";
15
16
  const DropdownMenuGroupContext = react.createContext(false);
16
17
  function DropdownMenu({ ...props }) {
17
18
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Root, {
@@ -55,7 +56,7 @@ function DropdownMenuContent({ className, sideOffset = 4, side = "bottom", align
55
56
  data-[side=right]:data-starting-style:-translate-x-2
56
57
  data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
57
58
  ...props,
58
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_highlight.FluidHighlight, {}), children]
59
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_highlight.FluidHighlight, { className: MENU_ITEM_RADIUS }), children]
59
60
  })
60
61
  }) });
61
62
  }
@@ -74,7 +75,7 @@ function DropdownMenuItem({ className, inset, variant = "default", asChild, chil
74
75
  data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40
75
76
  data-[variant=destructive]:data-[highlighted]:text-destructive
76
77
  data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11
77
- rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
78
+ rounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
78
79
  data-[disabled]:opacity-64 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, className);
79
80
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_menu.Menu.Item, {
80
81
  "data-slot": "dropdown-menu-item",
@@ -89,7 +90,7 @@ function DropdownMenuItem({ className, inset, variant = "default", asChild, chil
89
90
  function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
90
91
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_menu.Menu.CheckboxItem, {
91
92
  "data-slot": "dropdown-menu-checkbox-item",
92
- className: require_utils.cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
93
+ className: require_utils.cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5
93
94
  pe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64
94
95
  [&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
95
96
  checked,
@@ -113,7 +114,7 @@ function DropdownMenuRadioGroup({ ...props }) {
113
114
  function DropdownMenuRadioItem({ className, children, ...props }) {
114
115
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_menu.Menu.RadioItem, {
115
116
  "data-slot": "dropdown-menu-radio-item",
116
- className: require_utils.cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
117
+ className: require_utils.cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5
117
118
  pe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64
118
119
  [&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
119
120
  ...props,
@@ -170,7 +171,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
170
171
  "data-slot": "dropdown-menu-sub-trigger",
171
172
  "data-inset": inset,
172
173
  className: require_utils.cn(`data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent
173
- data-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm pointer-coarse:min-h-11
174
+ data-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm pointer-coarse:min-h-11
174
175
  outline-hidden select-none data-[inset]:ps-8`, className),
175
176
  ...props,
176
177
  children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, {
@@ -198,7 +199,7 @@ function DropdownMenuSubContent({ className, children, ...props }) {
198
199
  data-[side=right]:data-starting-style:-translate-x-2
199
200
  data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
200
201
  ...props,
201
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_highlight.FluidHighlight, {}), children]
202
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_fluid_highlight.FluidHighlight, { className: MENU_ITEM_RADIUS }), children]
202
203
  })
203
204
  })
204
205
  });
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.cjs","names":["React","MenuPrimitive","cn","FluidHighlight","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';\nimport { FluidHighlight } from '../lib/motion/fluid-highlight';\nimport { cn } from '../lib/utils';\n\nconst DropdownMenuGroupContext = React.createContext(false);\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof MenuPrimitive.Root>) {\n\treturn <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof MenuPrimitive.Portal>) {\n\tconst { container } = useFloatingOverlayPortalProps();\n\treturn <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" container={container} {...props} />;\n}\n\ntype DropdownMenuTriggerProps = React.ComponentProps<typeof MenuPrimitive.Trigger> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<MenuPrimitive.Trigger\n\t\t\tdata-slot=\"dropdown-menu-trigger\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</MenuPrimitive.Trigger>\n\t);\n}\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Popup> & {\n\tsideOffset?: number;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\talign?: 'start' | 'center' | 'end';\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDown?: (e: React.PointerEvent) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDownOutside?: (e: Event) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonCloseAutoFocus?: (e: Event) => void;\n\t/** @deprecated Base UI menus mount on open automatically */\n\tforceMount?: boolean;\n};\n\nfunction DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\tside = 'bottom',\n\talign = 'start',\n\tonPointerDown: _onPointerDown,\n\tonPointerDownOutside: _onPointerDownOutside,\n\tonCloseAutoFocus: _onCloseAutoFocus,\n\tforceMount: _forceMount,\n\tchildren,\n\t...props\n}: DropdownMenuContentProps) {\n\tconst { zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<DropdownMenuPortal>\n\t\t\t<MenuPrimitive.Positioner side={side} align={align} sideOffset={sideOffset} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot=\"dropdown-menu-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground relative origin-(--transform-origin) max-h-(--available-height) min-w-40\n\t\t\t\t\t\tmax-w-(--available-width) overflow-y-auto overscroll-contain rounded-lg border p-1 [overflow-wrap:anywhere]\n\t\t\t\t\t\tshadow-lg transition-[scale,opacity,translate] duration-(--duration-moderate) ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<FluidHighlight />\n\t\t\t\t\t{children}\n\t\t\t\t</MenuPrimitive.Popup>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</DropdownMenuPortal>\n\t);\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.Group>) {\n\treturn (\n\t\t<DropdownMenuGroupContext.Provider value={true}>\n\t\t\t<MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n\t\t</DropdownMenuGroupContext.Provider>\n\t);\n}\n\ntype DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: 'default' | 'destructive';\n\t/** When true, merges props onto the child element instead of rendering a div */\n\tasChild?: boolean;\n};\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = 'default',\n\tasChild,\n\tchildren,\n\trender,\n\t...props\n}: DropdownMenuItemProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\tconst itemClassName = cn(\n\t\t`data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive\n\t\tdata-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40\n\t\tdata-[variant=destructive]:data-[highlighted]:text-destructive\n\t\tdata-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11\n\t\trounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none\n\t\tdata-[disabled]:opacity-64 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<MenuPrimitive.Item\n\t\t\tdata-slot=\"dropdown-menu-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={itemClassName}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</MenuPrimitive.Item>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenuPrimitive.CheckboxItem\n\t\t\tdata-slot=\"dropdown-menu-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5\n\t\t\t\tpe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t\t<MenuPrimitive.CheckboxItemIndicator\n\t\t\t\t\t\tkeepMounted\n\t\t\t\t\t\tclassName='transition-[opacity,scale,filter] duration-(--duration-slow) ease-out data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none'\n\t\t\t\t\t>\n\t\t\t\t\t<CheckIcon size={16} />\n\t\t\t\t</MenuPrimitive.CheckboxItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.RadioGroup>) {\n\treturn <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenuPrimitive.RadioItem\n\t\t\tdata-slot=\"dropdown-menu-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5\n\t\t\t\tpe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t\t<MenuPrimitive.RadioItemIndicator\n\t\t\t\t\t\tkeepMounted\n\t\t\t\t\t\tclassName='transition-[opacity,scale,filter] duration-(--duration-slow) ease-out data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none'\n\t\t\t\t\t>\n\t\t\t\t\t<CircleIcon className='size-2 fill-current' />\n\t\t\t\t</MenuPrimitive.RadioItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.RadioItem>\n\t);\n}\n\n/**\n * Uses Base UI's semantic GroupLabel inside DropdownMenuGroup. The standalone\n * div fallback preserves compatibility with earlier Constructive menu markup,\n * where labels were allowed directly inside DropdownMenuContent.\n */\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<'div'> & {\n\tinset?: boolean;\n}) {\n\tconst isGrouped = React.useContext(DropdownMenuGroupContext);\n\tconst labelProps = {\n\t\t'data-slot': 'dropdown-menu-label',\n\t\t'data-inset': inset,\n\t\tclassName: cn('text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:ps-8', className),\n\t\t...props,\n\t};\n\n\tif (isGrouped) {\n\t\treturn <MenuPrimitive.GroupLabel {...labelProps} />;\n\t}\n\n\treturn (\n\t\t<div {...labelProps} />\n\t);\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n\treturn (\n\t\t<MenuPrimitive.Separator\n\t\t\tdata-slot=\"dropdown-menu-separator\"\n\t\t\tclassName={cn('bg-border -mx-1 my-1 h-px', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<kbd\n\t\t\tdata-slot=\"dropdown-menu-shortcut\"\n\t\t\t// Key chords read left to right in every script (\"⌘T\", never \"T⌘\"), and a long chord must not shrink.\n\t\t\tdir=\"ltr\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-background text-subtle-foreground ms-auto -me-1 inline-flex h-5 max-h-full shrink-0 items-center rounded border\n\t\t\t\tpx-1 font-[inherit] text-[0.625rem] font-medium whitespace-nowrap`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof MenuPrimitive.SubmenuRoot>) {\n\treturn <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.SubmenuTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenuPrimitive.SubmenuTrigger\n\t\t\tdata-slot=\"dropdown-menu-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent\n\t\t\t\tdata-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm pointer-coarse:min-h-11\n\t\t\t\toutline-hidden select-none data-[inset]:ps-8`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon size={16} className='text-muted-foreground/80 ms-auto rtl:rotate-180' />\n\t\t</MenuPrimitive.SubmenuTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.Popup>) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<MenuPrimitive.Portal container={container}>\n\t\t\t<MenuPrimitive.Positioner side='inline-end' sideOffset={-4} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot=\"dropdown-menu-sub-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground relative origin-(--transform-origin) max-h-(--available-height) min-w-40\n\t\t\t\t\t\tmax-w-(--available-width) overflow-y-auto overscroll-contain rounded-lg border p-1 [overflow-wrap:anywhere]\n\t\t\t\t\t\tshadow-lg transition-[scale,opacity,translate] duration-(--duration-moderate) ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<FluidHighlight />\n\t\t\t\t\t{children}\n\t\t\t\t</MenuPrimitive.Popup>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</MenuPrimitive.Portal>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"dropdown-menu.cjs","names":["React","MenuPrimitive","cn","FluidHighlight","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';\nimport { FluidHighlight } from '../lib/motion/fluid-highlight';\nimport { cn } from '../lib/utils';\n\n// The popup is 10px round with a 1px border and 4px of padding, so its items and their\n// highlight sit 5px in and are 10px - 5px round: the corners stay parallel.\nconst MENU_ITEM_RADIUS = 'rounded-[calc(var(--radius-lg)-5px)]';\n\nconst DropdownMenuGroupContext = React.createContext(false);\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof MenuPrimitive.Root>) {\n\treturn <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof MenuPrimitive.Portal>) {\n\tconst { container } = useFloatingOverlayPortalProps();\n\treturn <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" container={container} {...props} />;\n}\n\ntype DropdownMenuTriggerProps = React.ComponentProps<typeof MenuPrimitive.Trigger> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n};\n\nfunction DropdownMenuTrigger({ asChild, children, render, nativeButton, ...props }: DropdownMenuTriggerProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n\treturn (\n\t\t<MenuPrimitive.Trigger\n\t\t\tdata-slot=\"dropdown-menu-trigger\"\n\t\t\tnativeButton={nativeButton ?? (childRender ? true : undefined)}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</MenuPrimitive.Trigger>\n\t);\n}\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Popup> & {\n\tsideOffset?: number;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\talign?: 'start' | 'center' | 'end';\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDown?: (e: React.PointerEvent) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDownOutside?: (e: Event) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonCloseAutoFocus?: (e: Event) => void;\n\t/** @deprecated Base UI menus mount on open automatically */\n\tforceMount?: boolean;\n};\n\nfunction DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\tside = 'bottom',\n\talign = 'start',\n\tonPointerDown: _onPointerDown,\n\tonPointerDownOutside: _onPointerDownOutside,\n\tonCloseAutoFocus: _onCloseAutoFocus,\n\tforceMount: _forceMount,\n\tchildren,\n\t...props\n}: DropdownMenuContentProps) {\n\tconst { zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<DropdownMenuPortal>\n\t\t\t<MenuPrimitive.Positioner side={side} align={align} sideOffset={sideOffset} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot=\"dropdown-menu-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground relative origin-(--transform-origin) max-h-(--available-height) min-w-40\n\t\t\t\t\t\tmax-w-(--available-width) overflow-y-auto overscroll-contain rounded-lg border p-1 [overflow-wrap:anywhere]\n\t\t\t\t\t\tshadow-lg transition-[scale,opacity,translate] duration-(--duration-moderate) ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<FluidHighlight className={MENU_ITEM_RADIUS} />\n\t\t\t\t\t{children}\n\t\t\t\t</MenuPrimitive.Popup>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</DropdownMenuPortal>\n\t);\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.Group>) {\n\treturn (\n\t\t<DropdownMenuGroupContext.Provider value={true}>\n\t\t\t<MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n\t\t</DropdownMenuGroupContext.Provider>\n\t);\n}\n\ntype DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: 'default' | 'destructive';\n\t/** When true, merges props onto the child element instead of rendering a div */\n\tasChild?: boolean;\n};\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = 'default',\n\tasChild,\n\tchildren,\n\trender,\n\t...props\n}: DropdownMenuItemProps) {\n\tconst childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\tconst itemClassName = cn(\n\t\t`data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive\n\t\tdata-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40\n\t\tdata-[variant=destructive]:data-[highlighted]:text-destructive\n\t\tdata-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11\n\t\trounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none\n\t\tdata-[disabled]:opacity-64 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<MenuPrimitive.Item\n\t\t\tdata-slot=\"dropdown-menu-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={itemClassName}\n\t\t\trender={render ?? childRender}\n\t\t\t{...props}\n\t\t>\n\t\t\t{childRender ? undefined : children}\n\t\t</MenuPrimitive.Item>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenuPrimitive.CheckboxItem\n\t\t\tdata-slot=\"dropdown-menu-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5\n\t\t\t\tpe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t\t<MenuPrimitive.CheckboxItemIndicator\n\t\t\t\t\t\tkeepMounted\n\t\t\t\t\t\tclassName='transition-[opacity,scale,filter] duration-(--duration-slow) ease-out data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none'\n\t\t\t\t\t>\n\t\t\t\t\t<CheckIcon size={16} />\n\t\t\t\t</MenuPrimitive.CheckboxItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.RadioGroup>) {\n\treturn <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenuPrimitive.RadioItem\n\t\t\tdata-slot=\"dropdown-menu-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5\n\t\t\t\tpe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t\t<MenuPrimitive.RadioItemIndicator\n\t\t\t\t\t\tkeepMounted\n\t\t\t\t\t\tclassName='transition-[opacity,scale,filter] duration-(--duration-slow) ease-out data-unchecked:scale-[0.25] data-unchecked:opacity-0 data-unchecked:blur-[4px] motion-reduce:transition-none'\n\t\t\t\t\t>\n\t\t\t\t\t<CircleIcon className='size-2 fill-current' />\n\t\t\t\t</MenuPrimitive.RadioItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.RadioItem>\n\t);\n}\n\n/**\n * Uses Base UI's semantic GroupLabel inside DropdownMenuGroup. The standalone\n * div fallback preserves compatibility with earlier Constructive menu markup,\n * where labels were allowed directly inside DropdownMenuContent.\n */\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<'div'> & {\n\tinset?: boolean;\n}) {\n\tconst isGrouped = React.useContext(DropdownMenuGroupContext);\n\tconst labelProps = {\n\t\t'data-slot': 'dropdown-menu-label',\n\t\t'data-inset': inset,\n\t\tclassName: cn('text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:ps-8', className),\n\t\t...props,\n\t};\n\n\tif (isGrouped) {\n\t\treturn <MenuPrimitive.GroupLabel {...labelProps} />;\n\t}\n\n\treturn (\n\t\t<div {...labelProps} />\n\t);\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n\treturn (\n\t\t<MenuPrimitive.Separator\n\t\t\tdata-slot=\"dropdown-menu-separator\"\n\t\t\tclassName={cn('bg-border -mx-1 my-1 h-px', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<kbd\n\t\t\tdata-slot=\"dropdown-menu-shortcut\"\n\t\t\t// Key chords read left to right in every script (\"⌘T\", never \"T⌘\"), and a long chord must not shrink.\n\t\t\tdir=\"ltr\"\n\t\t\tclassName={cn(\n\t\t\t\t`bg-background text-subtle-foreground ms-auto -me-1 inline-flex h-5 max-h-full shrink-0 items-center rounded border\n\t\t\t\tpx-1 font-[inherit] text-[0.625rem] font-medium whitespace-nowrap`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof MenuPrimitive.SubmenuRoot>) {\n\treturn <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.SubmenuTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenuPrimitive.SubmenuTrigger\n\t\t\tdata-slot=\"dropdown-menu-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent\n\t\t\t\tdata-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm pointer-coarse:min-h-11\n\t\t\t\toutline-hidden select-none data-[inset]:ps-8`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon size={16} className='text-muted-foreground/80 ms-auto rtl:rotate-180' />\n\t\t</MenuPrimitive.SubmenuTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.Popup>) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<MenuPrimitive.Portal container={container}>\n\t\t\t<MenuPrimitive.Positioner side='inline-end' sideOffset={-4} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot=\"dropdown-menu-sub-content\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground relative origin-(--transform-origin) max-h-(--available-height) min-w-40\n\t\t\t\t\t\tmax-w-(--available-width) overflow-y-auto overscroll-contain rounded-lg border p-1 [overflow-wrap:anywhere]\n\t\t\t\t\t\tshadow-lg transition-[scale,opacity,translate] duration-(--duration-moderate) ease-out data-starting-style:scale-95\n\t\t\t\t\t\tdata-ending-style:scale-95 data-starting-style:opacity-0 data-ending-style:opacity-0\n\t\t\t\t\t\tdata-[side=bottom]:data-starting-style:-translate-y-2\n\t\t\t\t\t\tdata-[side=left]:data-starting-style:translate-x-2\n\t\t\t\t\t\tdata-[side=right]:data-starting-style:-translate-x-2\n\t\t\t\t\t\tdata-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t<FluidHighlight className={MENU_ITEM_RADIUS} />\n\t\t\t\t\t{children}\n\t\t\t\t</MenuPrimitive.Popup>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</MenuPrimitive.Portal>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { t as cn } from "../utils-BkMLyah9.js";
4
- import { t as FluidHighlight } from "../fluid-highlight-CNELHV8o.js";
4
+ import { t as FluidHighlight } from "../fluid-highlight-BXVfWNk9.js";
5
5
  import * as React$1 from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
@@ -9,6 +9,7 @@ import { useFloatingOverlayPortalProps } from "@constructive-io/ui/portal";
9
9
  import { Menu as Menu$1 } from "@base-ui/react/menu";
10
10
 
11
11
  //#region src/components/dropdown-menu.tsx
12
+ const MENU_ITEM_RADIUS = "rounded-[calc(var(--radius-lg)-5px)]";
12
13
  const DropdownMenuGroupContext = React$1.createContext(false);
13
14
  function DropdownMenu({ ...props }) {
14
15
  return /* @__PURE__ */ jsx(Menu$1.Root, {
@@ -52,7 +53,7 @@ function DropdownMenuContent({ className, sideOffset = 4, side = "bottom", align
52
53
  data-[side=right]:data-starting-style:-translate-x-2
53
54
  data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
54
55
  ...props,
55
- children: [/* @__PURE__ */ jsx(FluidHighlight, {}), children]
56
+ children: [/* @__PURE__ */ jsx(FluidHighlight, { className: MENU_ITEM_RADIUS }), children]
56
57
  })
57
58
  }) });
58
59
  }
@@ -71,7 +72,7 @@ function DropdownMenuItem({ className, inset, variant = "default", asChild, chil
71
72
  data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40
72
73
  data-[variant=destructive]:data-[highlighted]:text-destructive
73
74
  data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 pointer-coarse:min-h-11
74
- rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
75
+ rounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
75
76
  data-[disabled]:opacity-64 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, className);
76
77
  return /* @__PURE__ */ jsx(Menu$1.Item, {
77
78
  "data-slot": "dropdown-menu-item",
@@ -86,7 +87,7 @@ function DropdownMenuItem({ className, inset, variant = "default", asChild, chil
86
87
  function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
87
88
  return /* @__PURE__ */ jsxs(Menu$1.CheckboxItem, {
88
89
  "data-slot": "dropdown-menu-checkbox-item",
89
- className: cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
90
+ className: cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5
90
91
  pe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64
91
92
  [&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
92
93
  checked,
@@ -110,7 +111,7 @@ function DropdownMenuRadioGroup({ ...props }) {
110
111
  function DropdownMenuRadioItem({ className, children, ...props }) {
111
112
  return /* @__PURE__ */ jsxs(Menu$1.RadioItem, {
112
113
  "data-slot": "dropdown-menu-radio-item",
113
- className: cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
114
+ className: cn(`data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-[calc(var(--radius-lg)-5px)] py-1.5
114
115
  pe-2 ps-8 text-sm outline-hidden select-none pointer-coarse:min-h-11 data-[disabled]:pointer-events-none data-[disabled]:opacity-64
115
116
  [&_svg]:pointer-events-none [&_svg]:shrink-0`, className),
116
117
  ...props,
@@ -167,7 +168,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
167
168
  "data-slot": "dropdown-menu-sub-trigger",
168
169
  "data-inset": inset,
169
170
  className: cn(`data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent
170
- data-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm pointer-coarse:min-h-11
171
+ data-[popup-open]:text-accent-foreground relative flex cursor-default items-center rounded-[calc(var(--radius-lg)-5px)] px-2 py-1.5 text-sm pointer-coarse:min-h-11
171
172
  outline-hidden select-none data-[inset]:ps-8`, className),
172
173
  ...props,
173
174
  children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, {
@@ -195,7 +196,7 @@ function DropdownMenuSubContent({ className, children, ...props }) {
195
196
  data-[side=right]:data-starting-style:-translate-x-2
196
197
  data-[side=top]:data-starting-style:translate-y-2 motion-reduce:transition-none`, className),
197
198
  ...props,
198
- children: [/* @__PURE__ */ jsx(FluidHighlight, {}), children]
199
+ children: [/* @__PURE__ */ jsx(FluidHighlight, { className: MENU_ITEM_RADIUS }), children]
199
200
  })
200
201
  })
201
202
  });