@karakuri-ui/react 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/components/ui/accordion.d.mts +49 -0
- package/dist/components/ui/accordion.d.ts +49 -0
- package/dist/components/ui/accordion.js +220 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/accordion.mjs +181 -0
- package/dist/components/ui/accordion.mjs.map +1 -0
- package/dist/components/ui/alert.d.mts +47 -0
- package/dist/components/ui/alert.d.ts +47 -0
- package/dist/components/ui/alert.js +223 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/alert.mjs +185 -0
- package/dist/components/ui/alert.mjs.map +1 -0
- package/dist/components/ui/avatar.d.mts +232 -0
- package/dist/components/ui/avatar.d.ts +232 -0
- package/dist/components/ui/avatar.js +250 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/avatar.mjs +209 -0
- package/dist/components/ui/avatar.mjs.map +1 -0
- package/dist/components/ui/badge.d.mts +31 -0
- package/dist/components/ui/badge.d.ts +31 -0
- package/dist/components/ui/badge.js +205 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/badge.mjs +170 -0
- package/dist/components/ui/badge.mjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.mts +57 -0
- package/dist/components/ui/breadcrumb.d.ts +57 -0
- package/dist/components/ui/breadcrumb.js +209 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/breadcrumb.mjs +168 -0
- package/dist/components/ui/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/button-group.d.mts +22 -0
- package/dist/components/ui/button-group.d.ts +22 -0
- package/dist/components/ui/button-group.js +107 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button-group.mjs +72 -0
- package/dist/components/ui/button-group.mjs.map +1 -0
- package/dist/components/ui/button.d.mts +31 -0
- package/dist/components/ui/button.d.ts +31 -0
- package/dist/components/ui/button.js +176 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/button.mjs +141 -0
- package/dist/components/ui/button.mjs.map +1 -0
- package/dist/components/ui/card.d.mts +77 -0
- package/dist/components/ui/card.d.ts +77 -0
- package/dist/components/ui/card.js +370 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/card.mjs +328 -0
- package/dist/components/ui/card.mjs.map +1 -0
- package/dist/{chart.js → components/ui/chart.js} +29 -39
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/{chart.mjs → components/ui/chart.mjs} +21 -31
- package/dist/components/ui/chart.mjs.map +1 -0
- package/dist/components/ui/checkbox.d.mts +24 -0
- package/dist/components/ui/checkbox.d.ts +24 -0
- package/dist/components/ui/checkbox.js +173 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/checkbox.mjs +138 -0
- package/dist/components/ui/checkbox.mjs.map +1 -0
- package/dist/components/ui/divider.d.mts +27 -0
- package/dist/components/ui/divider.d.ts +27 -0
- package/dist/components/ui/divider.js +147 -0
- package/dist/components/ui/divider.js.map +1 -0
- package/dist/components/ui/divider.mjs +112 -0
- package/dist/components/ui/divider.mjs.map +1 -0
- package/dist/components/ui/drawer.d.mts +51 -0
- package/dist/components/ui/drawer.d.ts +51 -0
- package/dist/components/ui/drawer.js +225 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/drawer.mjs +178 -0
- package/dist/components/ui/drawer.mjs.map +1 -0
- package/dist/components/ui/dropdown.d.mts +59 -0
- package/dist/components/ui/dropdown.d.ts +59 -0
- package/dist/components/ui/dropdown.js +310 -0
- package/dist/components/ui/dropdown.js.map +1 -0
- package/dist/components/ui/dropdown.mjs +263 -0
- package/dist/components/ui/dropdown.mjs.map +1 -0
- package/dist/components/ui/field.d.mts +33 -0
- package/dist/components/ui/field.d.ts +33 -0
- package/dist/components/ui/field.js +146 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/field.mjs +108 -0
- package/dist/components/ui/field.mjs.map +1 -0
- package/dist/components/ui/icon-button.d.mts +20 -0
- package/dist/components/ui/icon-button.d.ts +20 -0
- package/dist/components/ui/icon-button.js +147 -0
- package/dist/components/ui/icon-button.js.map +1 -0
- package/dist/components/ui/icon-button.mjs +112 -0
- package/dist/components/ui/icon-button.mjs.map +1 -0
- package/dist/components/ui/index.d.mts +55 -0
- package/dist/components/ui/index.d.ts +55 -0
- package/dist/components/ui/index.js +476 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/index.mjs +246 -0
- package/dist/components/ui/index.mjs.map +1 -0
- package/dist/components/ui/input.d.mts +20 -0
- package/dist/components/ui/input.d.ts +20 -0
- package/dist/components/ui/input.js +250 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/input.mjs +215 -0
- package/dist/components/ui/input.mjs.map +1 -0
- package/dist/components/ui/metric-card.d.mts +53 -0
- package/dist/components/ui/metric-card.d.ts +53 -0
- package/dist/components/ui/metric-card.js +258 -0
- package/dist/components/ui/metric-card.js.map +1 -0
- package/dist/components/ui/metric-card.mjs +217 -0
- package/dist/components/ui/metric-card.mjs.map +1 -0
- package/dist/components/ui/modal.d.mts +77 -0
- package/dist/components/ui/modal.d.ts +77 -0
- package/dist/components/ui/modal.js +396 -0
- package/dist/components/ui/modal.js.map +1 -0
- package/dist/components/ui/modal.mjs +338 -0
- package/dist/components/ui/modal.mjs.map +1 -0
- package/dist/components/ui/navigation-menu.d.mts +139 -0
- package/dist/components/ui/navigation-menu.d.ts +139 -0
- package/dist/components/ui/navigation-menu.js +531 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/navigation-menu.mjs +488 -0
- package/dist/components/ui/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/pagination.d.mts +130 -0
- package/dist/components/ui/pagination.d.ts +130 -0
- package/dist/components/ui/pagination.js +495 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/pagination.mjs +449 -0
- package/dist/components/ui/pagination.mjs.map +1 -0
- package/dist/components/ui/popover.d.mts +41 -0
- package/dist/components/ui/popover.d.ts +41 -0
- package/dist/components/ui/popover.js +175 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/popover.mjs +133 -0
- package/dist/components/ui/popover.mjs.map +1 -0
- package/dist/components/ui/progress.d.mts +35 -0
- package/dist/components/ui/progress.d.ts +35 -0
- package/dist/components/ui/progress.js +194 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/progress.mjs +159 -0
- package/dist/components/ui/progress.mjs.map +1 -0
- package/dist/components/ui/radio-group.d.mts +40 -0
- package/dist/components/ui/radio-group.d.ts +40 -0
- package/dist/components/ui/radio-group.js +177 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/radio-group.mjs +140 -0
- package/dist/components/ui/radio-group.mjs.map +1 -0
- package/dist/components/ui/segmented.d.mts +30 -0
- package/dist/components/ui/segmented.d.ts +30 -0
- package/dist/components/ui/segmented.js +241 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/segmented.mjs +204 -0
- package/dist/components/ui/segmented.mjs.map +1 -0
- package/dist/components/ui/select.d.mts +31 -0
- package/dist/components/ui/select.d.ts +31 -0
- package/dist/components/ui/select.js +317 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/select.mjs +276 -0
- package/dist/components/ui/select.mjs.map +1 -0
- package/dist/components/ui/skeleton.d.mts +26 -0
- package/dist/components/ui/skeleton.d.ts +26 -0
- package/dist/components/ui/skeleton.js +144 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/skeleton.mjs +109 -0
- package/dist/components/ui/skeleton.mjs.map +1 -0
- package/dist/components/ui/slider.d.mts +38 -0
- package/dist/components/ui/slider.d.ts +38 -0
- package/dist/components/ui/slider.js +180 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/slider.mjs +145 -0
- package/dist/components/ui/slider.mjs.map +1 -0
- package/dist/components/ui/spinner.d.mts +23 -0
- package/dist/components/ui/spinner.d.ts +23 -0
- package/dist/components/ui/spinner.js +471 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/spinner.mjs +436 -0
- package/dist/components/ui/spinner.mjs.map +1 -0
- package/dist/components/ui/switch.d.mts +22 -0
- package/dist/components/ui/switch.d.ts +22 -0
- package/dist/components/ui/switch.js +173 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/switch.mjs +138 -0
- package/dist/components/ui/switch.mjs.map +1 -0
- package/dist/components/ui/table.d.mts +74 -0
- package/dist/components/ui/table.d.ts +74 -0
- package/dist/components/ui/table.js +240 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/table.mjs +199 -0
- package/dist/components/ui/table.mjs.map +1 -0
- package/dist/components/ui/tabs.d.mts +40 -0
- package/dist/components/ui/tabs.d.ts +40 -0
- package/dist/components/ui/tabs.js +238 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/tabs.mjs +199 -0
- package/dist/components/ui/tabs.mjs.map +1 -0
- package/dist/components/ui/textarea.d.mts +19 -0
- package/dist/components/ui/textarea.d.ts +19 -0
- package/dist/components/ui/textarea.js +181 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/textarea.mjs +146 -0
- package/dist/components/ui/textarea.mjs.map +1 -0
- package/dist/components/ui/toast.d.mts +93 -0
- package/dist/components/ui/toast.d.ts +93 -0
- package/dist/components/ui/toast.js +429 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toast.mjs +393 -0
- package/dist/components/ui/toast.mjs.map +1 -0
- package/dist/components/ui/toggle-group.d.mts +47 -0
- package/dist/components/ui/toggle-group.d.ts +47 -0
- package/dist/components/ui/toggle-group.js +186 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle-group.mjs +149 -0
- package/dist/components/ui/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggle.d.mts +19 -0
- package/dist/components/ui/toggle.d.ts +19 -0
- package/dist/components/ui/toggle.js +194 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/toggle.mjs +159 -0
- package/dist/components/ui/toggle.mjs.map +1 -0
- package/dist/components/ui/tooltip.d.mts +37 -0
- package/dist/components/ui/tooltip.d.ts +37 -0
- package/dist/components/ui/tooltip.js +137 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/tooltip.mjs +96 -0
- package/dist/components/ui/tooltip.mjs.map +1 -0
- package/dist/lib/utils.d.mts +10 -0
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.js +33 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +9 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/chart.js.map +0 -1
- package/dist/chart.mjs.map +0 -1
- package/dist/index.d.mts +0 -1636
- package/dist/index.d.ts +0 -1636
- package/dist/index.js +0 -7291
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -7048
- package/dist/index.mjs.map +0 -1
- /package/dist/{chart.d.mts → components/ui/chart.d.mts} +0 -0
- /package/dist/{chart.d.ts → components/ui/chart.d.ts} +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var dropdown_exports = {};
|
|
31
|
+
__export(dropdown_exports, {
|
|
32
|
+
DropdownMenu: () => DropdownMenu,
|
|
33
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
34
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
35
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
36
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
37
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
38
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
39
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
40
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
41
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
42
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
43
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
44
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
45
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(dropdown_exports);
|
|
48
|
+
var React = __toESM(require("react"));
|
|
49
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
50
|
+
var import_utils = require("../../lib/utils");
|
|
51
|
+
const contentRadiusMap = {
|
|
52
|
+
md: "rounded-md",
|
|
53
|
+
// 6px
|
|
54
|
+
lg: "rounded-lg",
|
|
55
|
+
// 8px
|
|
56
|
+
xl: "rounded-xl"
|
|
57
|
+
// 12px (default)
|
|
58
|
+
};
|
|
59
|
+
const itemRadiusMap = {
|
|
60
|
+
md: "rounded",
|
|
61
|
+
// 4px — perceptual balance (67%)
|
|
62
|
+
lg: "rounded-md",
|
|
63
|
+
// 6px — perceptual balance (75%)
|
|
64
|
+
xl: "rounded-lg"
|
|
65
|
+
// 8px — perceptual balance (67%)
|
|
66
|
+
};
|
|
67
|
+
const itemSizeMap = {
|
|
68
|
+
sm: "px-2 py-1.5 text-xs",
|
|
69
|
+
md: "px-2 py-1.5 text-sm",
|
|
70
|
+
lg: "px-3 py-2.5 text-md"
|
|
71
|
+
};
|
|
72
|
+
const indicatorItemSizeMap = {
|
|
73
|
+
sm: "py-1.5 pl-6 pr-2 text-xs",
|
|
74
|
+
md: "py-1.5 pl-8 pr-2 text-sm",
|
|
75
|
+
lg: "py-2.5 pl-10 pr-3 text-md"
|
|
76
|
+
};
|
|
77
|
+
const indicatorSizeMap = {
|
|
78
|
+
sm: "left-2 h-3 w-3",
|
|
79
|
+
md: "left-2 h-3.5 w-3.5",
|
|
80
|
+
lg: "left-3 h-4 w-4"
|
|
81
|
+
};
|
|
82
|
+
const labelSizeMap = {
|
|
83
|
+
sm: "px-2 py-1.5 text-xs",
|
|
84
|
+
md: "px-2 py-1.5 text-xs",
|
|
85
|
+
lg: "px-3 py-2.5 text-xs"
|
|
86
|
+
};
|
|
87
|
+
const flushItemPaddingMap = {
|
|
88
|
+
sm: "px-3",
|
|
89
|
+
md: "px-3",
|
|
90
|
+
lg: "px-4"
|
|
91
|
+
};
|
|
92
|
+
const flushIndicatorItemPaddingMap = {
|
|
93
|
+
sm: "pl-7 pr-3",
|
|
94
|
+
md: "pl-9 pr-3",
|
|
95
|
+
lg: "pl-11 pr-4"
|
|
96
|
+
};
|
|
97
|
+
const insetSizeMap = {
|
|
98
|
+
sm: "pl-6",
|
|
99
|
+
md: "pl-8",
|
|
100
|
+
lg: "pl-10"
|
|
101
|
+
};
|
|
102
|
+
const DropdownMenuStyleContext = React.createContext({ radius: "lg", flush: false, size: "md" });
|
|
103
|
+
const DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
104
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
105
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
106
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
107
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
108
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, radius = "md", flush = false, size = "md", onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenuStyleContext.Provider, { value: { radius, flush, size } }, /* @__PURE__ */ React.createElement(
|
|
109
|
+
DropdownMenuPrimitive.Content,
|
|
110
|
+
{
|
|
111
|
+
ref,
|
|
112
|
+
sideOffset,
|
|
113
|
+
onCloseAutoFocus: (e) => {
|
|
114
|
+
e.preventDefault();
|
|
115
|
+
onCloseAutoFocus?.(e);
|
|
116
|
+
},
|
|
117
|
+
className: (0, import_utils.cn)(
|
|
118
|
+
"z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
|
|
119
|
+
flush ? "py-1" : "p-1",
|
|
120
|
+
contentRadiusMap[radius],
|
|
121
|
+
className
|
|
122
|
+
),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
))));
|
|
126
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
127
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => {
|
|
128
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
129
|
+
return /* @__PURE__ */ React.createElement(
|
|
130
|
+
DropdownMenuPrimitive.Item,
|
|
131
|
+
{
|
|
132
|
+
ref,
|
|
133
|
+
className: (0, import_utils.cn)(
|
|
134
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
135
|
+
itemSizeMap[size],
|
|
136
|
+
!flush && itemRadiusMap[radius],
|
|
137
|
+
flush && flushItemPaddingMap[size],
|
|
138
|
+
"transition-colors duration-fast",
|
|
139
|
+
"focus:bg-background-muted",
|
|
140
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
141
|
+
inset && insetSizeMap[size],
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
});
|
|
148
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
149
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => {
|
|
150
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
151
|
+
return /* @__PURE__ */ React.createElement(
|
|
152
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
153
|
+
{
|
|
154
|
+
ref,
|
|
155
|
+
className: (0, import_utils.cn)(
|
|
156
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
157
|
+
indicatorItemSizeMap[size],
|
|
158
|
+
!flush && itemRadiusMap[radius],
|
|
159
|
+
flush && flushIndicatorItemPaddingMap[size],
|
|
160
|
+
"transition-colors duration-fast",
|
|
161
|
+
"focus:bg-background-muted",
|
|
162
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
163
|
+
className
|
|
164
|
+
),
|
|
165
|
+
checked,
|
|
166
|
+
...props
|
|
167
|
+
},
|
|
168
|
+
/* @__PURE__ */ React.createElement("span", { className: (0, import_utils.cn)("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })))),
|
|
169
|
+
children
|
|
170
|
+
);
|
|
171
|
+
});
|
|
172
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
173
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
174
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
175
|
+
return /* @__PURE__ */ React.createElement(
|
|
176
|
+
DropdownMenuPrimitive.RadioItem,
|
|
177
|
+
{
|
|
178
|
+
ref,
|
|
179
|
+
className: (0, import_utils.cn)(
|
|
180
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
181
|
+
indicatorItemSizeMap[size],
|
|
182
|
+
!flush && itemRadiusMap[radius],
|
|
183
|
+
flush && flushIndicatorItemPaddingMap[size],
|
|
184
|
+
"transition-colors duration-fast",
|
|
185
|
+
"focus:bg-background-muted",
|
|
186
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
187
|
+
className
|
|
188
|
+
),
|
|
189
|
+
...props
|
|
190
|
+
},
|
|
191
|
+
/* @__PURE__ */ React.createElement("span", { className: (0, import_utils.cn)("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "6" })))),
|
|
192
|
+
children
|
|
193
|
+
);
|
|
194
|
+
});
|
|
195
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
196
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => {
|
|
197
|
+
const { flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
198
|
+
return /* @__PURE__ */ React.createElement(
|
|
199
|
+
DropdownMenuPrimitive.Label,
|
|
200
|
+
{
|
|
201
|
+
ref,
|
|
202
|
+
className: (0, import_utils.cn)(
|
|
203
|
+
"font-semibold text-text-muted",
|
|
204
|
+
labelSizeMap[size],
|
|
205
|
+
flush && flushItemPaddingMap[size],
|
|
206
|
+
inset && insetSizeMap[size],
|
|
207
|
+
className
|
|
208
|
+
),
|
|
209
|
+
...props
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
});
|
|
213
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
214
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => {
|
|
215
|
+
const { flush } = React.useContext(DropdownMenuStyleContext);
|
|
216
|
+
return /* @__PURE__ */ React.createElement(
|
|
217
|
+
DropdownMenuPrimitive.Separator,
|
|
218
|
+
{
|
|
219
|
+
ref,
|
|
220
|
+
className: (0, import_utils.cn)("h-px bg-border my-1", !flush && "-mx-1", className),
|
|
221
|
+
...props
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
226
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
227
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
228
|
+
return /* @__PURE__ */ React.createElement(
|
|
229
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
230
|
+
{
|
|
231
|
+
ref,
|
|
232
|
+
className: (0, import_utils.cn)(
|
|
233
|
+
"flex cursor-default select-none items-center outline-none",
|
|
234
|
+
itemSizeMap[size],
|
|
235
|
+
!flush && itemRadiusMap[radius],
|
|
236
|
+
flush && flushItemPaddingMap[size],
|
|
237
|
+
"focus:bg-background-muted data-[state=open]:bg-background-muted",
|
|
238
|
+
inset && insetSizeMap[size],
|
|
239
|
+
className
|
|
240
|
+
),
|
|
241
|
+
...props
|
|
242
|
+
},
|
|
243
|
+
children,
|
|
244
|
+
/* @__PURE__ */ React.createElement("svg", { className: "ml-auto icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }))
|
|
245
|
+
);
|
|
246
|
+
});
|
|
247
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
248
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
249
|
+
const { radius, flush } = React.useContext(DropdownMenuStyleContext);
|
|
250
|
+
return /* @__PURE__ */ React.createElement(
|
|
251
|
+
DropdownMenuPrimitive.SubContent,
|
|
252
|
+
{
|
|
253
|
+
ref,
|
|
254
|
+
className: (0, import_utils.cn)(
|
|
255
|
+
"z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
|
|
256
|
+
flush ? "py-1" : "p-1",
|
|
257
|
+
contentRadiusMap[radius],
|
|
258
|
+
className
|
|
259
|
+
),
|
|
260
|
+
...props
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
});
|
|
264
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
265
|
+
function DropdownMenuShortcut({
|
|
266
|
+
className,
|
|
267
|
+
...props
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ React.createElement(
|
|
270
|
+
"span",
|
|
271
|
+
{
|
|
272
|
+
className: (0, import_utils.cn)("ml-auto pl-4 text-xs text-text-subtle tracking-widest", className),
|
|
273
|
+
...props
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
278
|
+
const DropdownMenu = Object.assign(DropdownMenuRoot, {
|
|
279
|
+
Trigger: DropdownMenuTrigger,
|
|
280
|
+
Content: DropdownMenuContent,
|
|
281
|
+
Item: DropdownMenuItem,
|
|
282
|
+
CheckboxItem: DropdownMenuCheckboxItem,
|
|
283
|
+
RadioGroup: DropdownMenuRadioGroup,
|
|
284
|
+
RadioItem: DropdownMenuRadioItem,
|
|
285
|
+
Label: DropdownMenuLabel,
|
|
286
|
+
Separator: DropdownMenuSeparator,
|
|
287
|
+
Group: DropdownMenuGroup,
|
|
288
|
+
Sub: DropdownMenuSub,
|
|
289
|
+
SubTrigger: DropdownMenuSubTrigger,
|
|
290
|
+
SubContent: DropdownMenuSubContent,
|
|
291
|
+
Shortcut: DropdownMenuShortcut
|
|
292
|
+
});
|
|
293
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
294
|
+
0 && (module.exports = {
|
|
295
|
+
DropdownMenu,
|
|
296
|
+
DropdownMenuCheckboxItem,
|
|
297
|
+
DropdownMenuContent,
|
|
298
|
+
DropdownMenuGroup,
|
|
299
|
+
DropdownMenuItem,
|
|
300
|
+
DropdownMenuLabel,
|
|
301
|
+
DropdownMenuRadioGroup,
|
|
302
|
+
DropdownMenuRadioItem,
|
|
303
|
+
DropdownMenuSeparator,
|
|
304
|
+
DropdownMenuShortcut,
|
|
305
|
+
DropdownMenuSub,
|
|
306
|
+
DropdownMenuSubContent,
|
|
307
|
+
DropdownMenuSubTrigger,
|
|
308
|
+
DropdownMenuTrigger
|
|
309
|
+
});
|
|
310
|
+
//# sourceMappingURL=dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/dropdown.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { cn } from '../../lib/utils'\n\n// Radius variants for Content and Item (concentric rounded rectangles)\ntype DropdownMenuRadius = 'md' | 'lg' | 'xl'\n\nconst contentRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded-md', // 6px\n lg: 'rounded-lg', // 8px\n xl: 'rounded-xl', // 12px (default)\n}\n\nconst itemRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded', // 4px — perceptual balance (67%)\n lg: 'rounded-md', // 6px — perceptual balance (75%)\n xl: 'rounded-lg', // 8px — perceptual balance (67%)\n}\n\n// Size variants\ntype DropdownMenuSize = 'sm' | 'md' | 'lg'\n\nconst itemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-sm',\n lg: 'px-3 py-2.5 text-md',\n}\n\nconst indicatorItemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'py-1.5 pl-6 pr-2 text-xs',\n md: 'py-1.5 pl-8 pr-2 text-sm',\n lg: 'py-2.5 pl-10 pr-3 text-md',\n}\n\nconst indicatorSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'left-2 h-3 w-3',\n md: 'left-2 h-3.5 w-3.5',\n lg: 'left-3 h-4 w-4',\n}\n\nconst labelSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-xs',\n lg: 'px-3 py-2.5 text-xs',\n}\n\nconst flushItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'px-3',\n md: 'px-3',\n lg: 'px-4',\n}\n\nconst flushIndicatorItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-7 pr-3',\n md: 'pl-9 pr-3',\n lg: 'pl-11 pr-4',\n}\n\nconst insetSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-6',\n md: 'pl-8',\n lg: 'pl-10',\n}\n\n// Style context — propagates radius, flush, size from Content to children\nconst DropdownMenuStyleContext = React.createContext<{\n radius: DropdownMenuRadius\n flush: boolean\n size: DropdownMenuSize\n}>({ radius: 'lg', flush: false, size: 'md' })\n\n// Root — state management (controlled / uncontrolled)\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root\n\n// Trigger — the element that toggles the menu\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\n// Group — groups related items\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\n// Sub — submenu root\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\n// RadioGroup — radio selection group\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n// Content — the floating panel (rendered in a Portal)\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n radius?: DropdownMenuRadius\n flush?: boolean\n size?: DropdownMenuSize\n }\n>(({ className, sideOffset = 4, radius = 'md', flush = false, size = 'md', onCloseAutoFocus, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuStyleContext.Provider value={{ radius, flush, size }}>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n onCloseAutoFocus={(e) => {\n e.preventDefault()\n onCloseAutoFocus?.(e)\n }}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n </DropdownMenuStyleContext.Provider>\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\n// Item — a single menu item\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\n// CheckboxItem — item with a checkbox indicator\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={3} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 13l4 4L19 7\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n})\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\n// RadioItem — item within a RadioGroup\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n})\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\n// Label — non-interactive group heading\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'font-semibold text-text-muted',\n labelSizeMap[size],\n flush && flushItemPaddingMap[size],\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\n// Separator — visual divider between groups\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => {\n const { flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('h-px bg-border my-1', !flush && '-mx-1', className)}\n {...props}\n />\n )\n})\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\n// SubTrigger — item that opens a submenu\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'focus:bg-background-muted data-[state=open]:bg-background-muted',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n >\n {children}\n <svg className=\"ml-auto icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n </DropdownMenuPrimitive.SubTrigger>\n )\n})\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\n// SubContent — the floating panel for a submenu\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => {\n const { radius, flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\n// Shortcut — keyboard shortcut hint text\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn('ml-auto pl-4 text-xs text-text-subtle tracking-widest', className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport type { DropdownMenuRadius, DropdownMenuSize }\n\n// ─── Namespace ──────────────────────────────────────────\nconst DropdownMenu = Object.assign(DropdownMenuRoot, {\n Trigger: DropdownMenuTrigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: DropdownMenuRadioGroup,\n RadioItem: DropdownMenuRadioItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: DropdownMenuGroup,\n Sub: DropdownMenuSub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n Shortcut: DropdownMenuShortcut,\n})\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuShortcut,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,YAAuB;AACvB,4BAAuC;AACvC,mBAAmB;AAKnB,MAAM,mBAAuD;AAAA,EAC3D,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI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AAA,IAAC,sBAAsB;AAAA,IAAtB;AAAA,MACC;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,QAAQ,SAAS;AAAA,QACjB,iBAAiB,MAAM;AAAA,QACvB;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,uBAAuB,cAAc,sBAAsB,WAAW;AAGtE,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA,GAAG;AACL,GAA0C;AACxC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,iBAAG,yDAAyD,SAAS;AAAA,MAC/E,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,qBAAqB,cAAc;AAKnC,MAAM,eAAe,OAAO,OAAO,kBAAkB;AAAA,EACnD,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO;AAAA,EACP,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AACZ,CAAC;","names":[]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
const contentRadiusMap = {
|
|
6
|
+
md: "rounded-md",
|
|
7
|
+
// 6px
|
|
8
|
+
lg: "rounded-lg",
|
|
9
|
+
// 8px
|
|
10
|
+
xl: "rounded-xl"
|
|
11
|
+
// 12px (default)
|
|
12
|
+
};
|
|
13
|
+
const itemRadiusMap = {
|
|
14
|
+
md: "rounded",
|
|
15
|
+
// 4px — perceptual balance (67%)
|
|
16
|
+
lg: "rounded-md",
|
|
17
|
+
// 6px — perceptual balance (75%)
|
|
18
|
+
xl: "rounded-lg"
|
|
19
|
+
// 8px — perceptual balance (67%)
|
|
20
|
+
};
|
|
21
|
+
const itemSizeMap = {
|
|
22
|
+
sm: "px-2 py-1.5 text-xs",
|
|
23
|
+
md: "px-2 py-1.5 text-sm",
|
|
24
|
+
lg: "px-3 py-2.5 text-md"
|
|
25
|
+
};
|
|
26
|
+
const indicatorItemSizeMap = {
|
|
27
|
+
sm: "py-1.5 pl-6 pr-2 text-xs",
|
|
28
|
+
md: "py-1.5 pl-8 pr-2 text-sm",
|
|
29
|
+
lg: "py-2.5 pl-10 pr-3 text-md"
|
|
30
|
+
};
|
|
31
|
+
const indicatorSizeMap = {
|
|
32
|
+
sm: "left-2 h-3 w-3",
|
|
33
|
+
md: "left-2 h-3.5 w-3.5",
|
|
34
|
+
lg: "left-3 h-4 w-4"
|
|
35
|
+
};
|
|
36
|
+
const labelSizeMap = {
|
|
37
|
+
sm: "px-2 py-1.5 text-xs",
|
|
38
|
+
md: "px-2 py-1.5 text-xs",
|
|
39
|
+
lg: "px-3 py-2.5 text-xs"
|
|
40
|
+
};
|
|
41
|
+
const flushItemPaddingMap = {
|
|
42
|
+
sm: "px-3",
|
|
43
|
+
md: "px-3",
|
|
44
|
+
lg: "px-4"
|
|
45
|
+
};
|
|
46
|
+
const flushIndicatorItemPaddingMap = {
|
|
47
|
+
sm: "pl-7 pr-3",
|
|
48
|
+
md: "pl-9 pr-3",
|
|
49
|
+
lg: "pl-11 pr-4"
|
|
50
|
+
};
|
|
51
|
+
const insetSizeMap = {
|
|
52
|
+
sm: "pl-6",
|
|
53
|
+
md: "pl-8",
|
|
54
|
+
lg: "pl-10"
|
|
55
|
+
};
|
|
56
|
+
const DropdownMenuStyleContext = React.createContext({ radius: "lg", flush: false, size: "md" });
|
|
57
|
+
const DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
|
58
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
59
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
60
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
61
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
62
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, radius = "md", flush = false, size = "md", onCloseAutoFocus, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenuStyleContext.Provider, { value: { radius, flush, size } }, /* @__PURE__ */ React.createElement(
|
|
63
|
+
DropdownMenuPrimitive.Content,
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
sideOffset,
|
|
67
|
+
onCloseAutoFocus: (e) => {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
onCloseAutoFocus?.(e);
|
|
70
|
+
},
|
|
71
|
+
className: cn(
|
|
72
|
+
"z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
|
|
73
|
+
flush ? "py-1" : "p-1",
|
|
74
|
+
contentRadiusMap[radius],
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
))));
|
|
80
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
81
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => {
|
|
82
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
83
|
+
return /* @__PURE__ */ React.createElement(
|
|
84
|
+
DropdownMenuPrimitive.Item,
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
className: cn(
|
|
88
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
89
|
+
itemSizeMap[size],
|
|
90
|
+
!flush && itemRadiusMap[radius],
|
|
91
|
+
flush && flushItemPaddingMap[size],
|
|
92
|
+
"transition-colors duration-fast",
|
|
93
|
+
"focus:bg-background-muted",
|
|
94
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
95
|
+
inset && insetSizeMap[size],
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
103
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => {
|
|
104
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
105
|
+
return /* @__PURE__ */ React.createElement(
|
|
106
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
107
|
+
{
|
|
108
|
+
ref,
|
|
109
|
+
className: cn(
|
|
110
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
111
|
+
indicatorItemSizeMap[size],
|
|
112
|
+
!flush && itemRadiusMap[radius],
|
|
113
|
+
flush && flushIndicatorItemPaddingMap[size],
|
|
114
|
+
"transition-colors duration-fast",
|
|
115
|
+
"focus:bg-background-muted",
|
|
116
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
checked,
|
|
120
|
+
...props
|
|
121
|
+
},
|
|
122
|
+
/* @__PURE__ */ React.createElement("span", { className: cn("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })))),
|
|
123
|
+
children
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
127
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
128
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
129
|
+
return /* @__PURE__ */ React.createElement(
|
|
130
|
+
DropdownMenuPrimitive.RadioItem,
|
|
131
|
+
{
|
|
132
|
+
ref,
|
|
133
|
+
className: cn(
|
|
134
|
+
"relative flex cursor-default select-none items-center outline-none",
|
|
135
|
+
indicatorItemSizeMap[size],
|
|
136
|
+
!flush && itemRadiusMap[radius],
|
|
137
|
+
flush && flushIndicatorItemPaddingMap[size],
|
|
138
|
+
"transition-colors duration-fast",
|
|
139
|
+
"focus:bg-background-muted",
|
|
140
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
141
|
+
className
|
|
142
|
+
),
|
|
143
|
+
...props
|
|
144
|
+
},
|
|
145
|
+
/* @__PURE__ */ React.createElement("span", { className: cn("absolute flex items-center justify-center", indicatorSizeMap[size]) }, /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement("svg", { className: "icon-xs", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "6" })))),
|
|
146
|
+
children
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
150
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => {
|
|
151
|
+
const { flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
152
|
+
return /* @__PURE__ */ React.createElement(
|
|
153
|
+
DropdownMenuPrimitive.Label,
|
|
154
|
+
{
|
|
155
|
+
ref,
|
|
156
|
+
className: cn(
|
|
157
|
+
"font-semibold text-text-muted",
|
|
158
|
+
labelSizeMap[size],
|
|
159
|
+
flush && flushItemPaddingMap[size],
|
|
160
|
+
inset && insetSizeMap[size],
|
|
161
|
+
className
|
|
162
|
+
),
|
|
163
|
+
...props
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
168
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => {
|
|
169
|
+
const { flush } = React.useContext(DropdownMenuStyleContext);
|
|
170
|
+
return /* @__PURE__ */ React.createElement(
|
|
171
|
+
DropdownMenuPrimitive.Separator,
|
|
172
|
+
{
|
|
173
|
+
ref,
|
|
174
|
+
className: cn("h-px bg-border my-1", !flush && "-mx-1", className),
|
|
175
|
+
...props
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
});
|
|
179
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
180
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => {
|
|
181
|
+
const { radius, flush, size } = React.useContext(DropdownMenuStyleContext);
|
|
182
|
+
return /* @__PURE__ */ React.createElement(
|
|
183
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
184
|
+
{
|
|
185
|
+
ref,
|
|
186
|
+
className: cn(
|
|
187
|
+
"flex cursor-default select-none items-center outline-none",
|
|
188
|
+
itemSizeMap[size],
|
|
189
|
+
!flush && itemRadiusMap[radius],
|
|
190
|
+
flush && flushItemPaddingMap[size],
|
|
191
|
+
"focus:bg-background-muted data-[state=open]:bg-background-muted",
|
|
192
|
+
inset && insetSizeMap[size],
|
|
193
|
+
className
|
|
194
|
+
),
|
|
195
|
+
...props
|
|
196
|
+
},
|
|
197
|
+
children,
|
|
198
|
+
/* @__PURE__ */ React.createElement("svg", { className: "ml-auto icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }))
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
202
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => {
|
|
203
|
+
const { radius, flush } = React.useContext(DropdownMenuStyleContext);
|
|
204
|
+
return /* @__PURE__ */ React.createElement(
|
|
205
|
+
DropdownMenuPrimitive.SubContent,
|
|
206
|
+
{
|
|
207
|
+
ref,
|
|
208
|
+
className: cn(
|
|
209
|
+
"z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg",
|
|
210
|
+
flush ? "py-1" : "p-1",
|
|
211
|
+
contentRadiusMap[radius],
|
|
212
|
+
className
|
|
213
|
+
),
|
|
214
|
+
...props
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
});
|
|
218
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
219
|
+
function DropdownMenuShortcut({
|
|
220
|
+
className,
|
|
221
|
+
...props
|
|
222
|
+
}) {
|
|
223
|
+
return /* @__PURE__ */ React.createElement(
|
|
224
|
+
"span",
|
|
225
|
+
{
|
|
226
|
+
className: cn("ml-auto pl-4 text-xs text-text-subtle tracking-widest", className),
|
|
227
|
+
...props
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
232
|
+
const DropdownMenu = Object.assign(DropdownMenuRoot, {
|
|
233
|
+
Trigger: DropdownMenuTrigger,
|
|
234
|
+
Content: DropdownMenuContent,
|
|
235
|
+
Item: DropdownMenuItem,
|
|
236
|
+
CheckboxItem: DropdownMenuCheckboxItem,
|
|
237
|
+
RadioGroup: DropdownMenuRadioGroup,
|
|
238
|
+
RadioItem: DropdownMenuRadioItem,
|
|
239
|
+
Label: DropdownMenuLabel,
|
|
240
|
+
Separator: DropdownMenuSeparator,
|
|
241
|
+
Group: DropdownMenuGroup,
|
|
242
|
+
Sub: DropdownMenuSub,
|
|
243
|
+
SubTrigger: DropdownMenuSubTrigger,
|
|
244
|
+
SubContent: DropdownMenuSubContent,
|
|
245
|
+
Shortcut: DropdownMenuShortcut
|
|
246
|
+
});
|
|
247
|
+
export {
|
|
248
|
+
DropdownMenu,
|
|
249
|
+
DropdownMenuCheckboxItem,
|
|
250
|
+
DropdownMenuContent,
|
|
251
|
+
DropdownMenuGroup,
|
|
252
|
+
DropdownMenuItem,
|
|
253
|
+
DropdownMenuLabel,
|
|
254
|
+
DropdownMenuRadioGroup,
|
|
255
|
+
DropdownMenuRadioItem,
|
|
256
|
+
DropdownMenuSeparator,
|
|
257
|
+
DropdownMenuShortcut,
|
|
258
|
+
DropdownMenuSub,
|
|
259
|
+
DropdownMenuSubContent,
|
|
260
|
+
DropdownMenuSubTrigger,
|
|
261
|
+
DropdownMenuTrigger
|
|
262
|
+
};
|
|
263
|
+
//# sourceMappingURL=dropdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ui/dropdown.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { cn } from '../../lib/utils'\n\n// Radius variants for Content and Item (concentric rounded rectangles)\ntype DropdownMenuRadius = 'md' | 'lg' | 'xl'\n\nconst contentRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded-md', // 6px\n lg: 'rounded-lg', // 8px\n xl: 'rounded-xl', // 12px (default)\n}\n\nconst itemRadiusMap: Record<DropdownMenuRadius, string> = {\n md: 'rounded', // 4px — perceptual balance (67%)\n lg: 'rounded-md', // 6px — perceptual balance (75%)\n xl: 'rounded-lg', // 8px — perceptual balance (67%)\n}\n\n// Size variants\ntype DropdownMenuSize = 'sm' | 'md' | 'lg'\n\nconst itemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-sm',\n lg: 'px-3 py-2.5 text-md',\n}\n\nconst indicatorItemSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'py-1.5 pl-6 pr-2 text-xs',\n md: 'py-1.5 pl-8 pr-2 text-sm',\n lg: 'py-2.5 pl-10 pr-3 text-md',\n}\n\nconst indicatorSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'left-2 h-3 w-3',\n md: 'left-2 h-3.5 w-3.5',\n lg: 'left-3 h-4 w-4',\n}\n\nconst labelSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'px-2 py-1.5 text-xs',\n md: 'px-2 py-1.5 text-xs',\n lg: 'px-3 py-2.5 text-xs',\n}\n\nconst flushItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'px-3',\n md: 'px-3',\n lg: 'px-4',\n}\n\nconst flushIndicatorItemPaddingMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-7 pr-3',\n md: 'pl-9 pr-3',\n lg: 'pl-11 pr-4',\n}\n\nconst insetSizeMap: Record<DropdownMenuSize, string> = {\n sm: 'pl-6',\n md: 'pl-8',\n lg: 'pl-10',\n}\n\n// Style context — propagates radius, flush, size from Content to children\nconst DropdownMenuStyleContext = React.createContext<{\n radius: DropdownMenuRadius\n flush: boolean\n size: DropdownMenuSize\n}>({ radius: 'lg', flush: false, size: 'md' })\n\n// Root — state management (controlled / uncontrolled)\nconst DropdownMenuRoot = DropdownMenuPrimitive.Root\n\n// Trigger — the element that toggles the menu\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\n// Group — groups related items\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\n// Sub — submenu root\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\n// RadioGroup — radio selection group\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n// Content — the floating panel (rendered in a Portal)\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n radius?: DropdownMenuRadius\n flush?: boolean\n size?: DropdownMenuSize\n }\n>(({ className, sideOffset = 4, radius = 'md', flush = false, size = 'md', onCloseAutoFocus, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuStyleContext.Provider value={{ radius, flush, size }}>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n onCloseAutoFocus={(e) => {\n e.preventDefault()\n onCloseAutoFocus?.(e)\n }}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n </DropdownMenuStyleContext.Provider>\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\n// Item — a single menu item\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\n// CheckboxItem — item with a checkbox indicator\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={3} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M5 13l4 4L19 7\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n})\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\n// RadioItem — item within a RadioGroup\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center outline-none',\n indicatorItemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushIndicatorItemPaddingMap[size],\n 'transition-colors duration-fast',\n 'focus:bg-background-muted',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className={cn('absolute flex items-center justify-center', indicatorSizeMap[size])}>\n <DropdownMenuPrimitive.ItemIndicator>\n <svg className=\"icon-xs\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n </svg>\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n})\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\n// Label — non-interactive group heading\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => {\n const { flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'font-semibold text-text-muted',\n labelSizeMap[size],\n flush && flushItemPaddingMap[size],\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\n// Separator — visual divider between groups\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => {\n const { flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('h-px bg-border my-1', !flush && '-mx-1', className)}\n {...props}\n />\n )\n})\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\n// SubTrigger — item that opens a submenu\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => {\n const { radius, flush, size } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center outline-none',\n itemSizeMap[size],\n !flush && itemRadiusMap[radius],\n flush && flushItemPaddingMap[size],\n 'focus:bg-background-muted data-[state=open]:bg-background-muted',\n inset && insetSizeMap[size],\n className\n )}\n {...props}\n >\n {children}\n <svg className=\"ml-auto icon-xs\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={2} aria-hidden=\"true\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n </DropdownMenuPrimitive.SubTrigger>\n )\n})\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\n// SubContent — the floating panel for a submenu\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => {\n const { radius, flush } = React.useContext(DropdownMenuStyleContext)\n return (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-dropdown min-w-[8rem] overflow-hidden border border-border bg-background text-foreground shadow-lg',\n flush ? 'py-1' : 'p-1',\n contentRadiusMap[radius],\n className\n )}\n {...props}\n />\n )\n})\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\n// Shortcut — keyboard shortcut hint text\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) {\n return (\n <span\n className={cn('ml-auto pl-4 text-xs text-text-subtle tracking-widest', className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport type { DropdownMenuRadius, DropdownMenuSize }\n\n// ─── Namespace ──────────────────────────────────────────\nconst DropdownMenu = Object.assign(DropdownMenuRoot, {\n Trigger: DropdownMenuTrigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: DropdownMenuRadioGroup,\n RadioItem: DropdownMenuRadioItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: DropdownMenuGroup,\n Sub: DropdownMenuSub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n Shortcut: DropdownMenuShortcut,\n})\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuShortcut,\n}\n"],"mappings":";AAEA,YAAY,WAAW;AACvB,YAAY,2BAA2B;AACvC,SAAS,UAAU;AAKnB,MAAM,mBAAuD;AAAA,EAC3D,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AACN;AAEA,MAAM,gBAAoD;AAAA,EACxD,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AAAA,EACJ,IAAI;AAAA;AACN;AAKA,MAAM,cAAgD;AAAA,EACpD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,uBAAyD;AAAA,EAC7D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,mBAAqD;AAAA,EACzD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAiD;AAAA,EACrD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,sBAAwD;AAAA,EAC5D,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,+BAAiE;AAAA,EACrE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAiD;AAAA,EACrD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAGA,MAAM,2BAA2B,MAAM,cAIpC,EAAE,QAAQ,MAAM,OAAO,OAAO,MAAM,KAAK,CAAC;AAG7C,MAAM,mBAAmB,sBAAsB;AAG/C,MAAM,sBAAsB,sBAAsB;AAGlD,MAAM,oBAAoB,sBAAsB;AAGhD,MAAM,kBAAkB,sBAAsB;AAG9C,MAAM,yBAAyB,sBAAsB;AAGrD,MAAM,s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