@ai-matrx/design-system 0.86.335 → 0.86.336
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/chunk-L5OACQXS.js +409 -0
- package/dist/chunk-L5OACQXS.js.map +1 -0
- package/dist/{chunk-SUVIHUAD.js → chunk-MAMZGJJ3.js} +34 -5
- package/dist/chunk-MAMZGJJ3.js.map +1 -0
- package/dist/{chunk-4CO5STZU.js → chunk-WZC3K7SO.js} +74 -157
- package/dist/chunk-WZC3K7SO.js.map +1 -0
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.js +7 -6
- package/dist/desktop.js.map +1 -1
- package/dist/index.cjs +1508 -1187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/item.cjs +646 -372
- package/dist/item.cjs.map +1 -1
- package/dist/item.d.cts +1 -3
- package/dist/item.d.ts +1 -3
- package/dist/item.js +25 -33
- package/dist/item.js.map +1 -1
- package/dist/menu-look.cjs +521 -36
- package/dist/menu-look.cjs.map +1 -1
- package/dist/menu-look.css +96 -1
- package/dist/menu-look.d.cts +320 -37
- package/dist/menu-look.d.ts +320 -37
- package/dist/menu-look.js +60 -121
- package/dist/menu-look.js.map +1 -1
- package/dist/record-list.cjs +533 -253
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.js +3 -1
- package/dist/record-list.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-4CO5STZU.js.map +0 -1
- package/dist/chunk-SUVIHUAD.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.86.336
|
|
4
|
+
|
|
5
|
+
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
|
+
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/design-system/src`.
|
|
7
|
+
|
|
3
8
|
## 0.86.335
|
|
4
9
|
|
|
5
10
|
- **Select `hint` never truncates** (vault review, 2026-10-23): in the menu and on the trigger the label truncates and the option's `hint` (a short id) stays whole, so two long same-named options stay told apart (`data-select-hint`). Proof: `src/controls/select-search-hint.test.tsx`. Consumer action: none.
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ContextMenuContent,
|
|
4
|
+
ContextMenuSubContent
|
|
5
|
+
} from "./chunk-HEFTQUJ5.js";
|
|
6
|
+
import {
|
|
7
|
+
PopoverContent
|
|
8
|
+
} from "./chunk-OPF265PU.js";
|
|
9
|
+
import {
|
|
10
|
+
DropdownMenuContent,
|
|
11
|
+
DropdownMenuSubContent
|
|
12
|
+
} from "./chunk-X6ZRHJQP.js";
|
|
13
|
+
import {
|
|
14
|
+
useScrollFade
|
|
15
|
+
} from "./chunk-BNXNIN2S.js";
|
|
16
|
+
import {
|
|
17
|
+
RadixCheckIcon,
|
|
18
|
+
RadixChevronDownIcon,
|
|
19
|
+
RadixChevronRightIcon
|
|
20
|
+
} from "./chunk-YCUFQCJW.js";
|
|
21
|
+
|
|
22
|
+
// src/menu-look.tsx
|
|
23
|
+
import * as React from "react";
|
|
24
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
25
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
26
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
var MENU_LOOK = {
|
|
28
|
+
width: 280,
|
|
29
|
+
largeWidth: 360,
|
|
30
|
+
rowHeight: 30,
|
|
31
|
+
sheetRowHeight: 44,
|
|
32
|
+
fontSize: 13,
|
|
33
|
+
lineHeight: 1.25,
|
|
34
|
+
icon: 16,
|
|
35
|
+
headerMark: 28,
|
|
36
|
+
rowPaddingY: 4,
|
|
37
|
+
rowPaddingX: 8,
|
|
38
|
+
radius: 10
|
|
39
|
+
};
|
|
40
|
+
var MENU_LOOK_CLASS = {
|
|
41
|
+
panel: "cm-menu",
|
|
42
|
+
item: "cm-item",
|
|
43
|
+
iconSlot: "cm-icon-slot",
|
|
44
|
+
icon: "cm-icon",
|
|
45
|
+
text: "cm-text",
|
|
46
|
+
label: "cm-label",
|
|
47
|
+
hint: "cm-hint",
|
|
48
|
+
current: "cm-current",
|
|
49
|
+
chevron: "cm-chevron",
|
|
50
|
+
search: "cm-search",
|
|
51
|
+
trail: "cm-trail",
|
|
52
|
+
badge: "cm-badge",
|
|
53
|
+
shortcut: "cm-shortcut",
|
|
54
|
+
control: "cm-control",
|
|
55
|
+
divider: "cm-divider",
|
|
56
|
+
sectionLabel: "cm-section-label",
|
|
57
|
+
header: "cm-header",
|
|
58
|
+
headerMark: "cm-header-mark",
|
|
59
|
+
headerText: "cm-header-text",
|
|
60
|
+
headerTitle: "cm-header-title",
|
|
61
|
+
headerSubtitle: "cm-header-subtitle",
|
|
62
|
+
danger: "cm-danger",
|
|
63
|
+
dimmed: "cm-dimmed"
|
|
64
|
+
};
|
|
65
|
+
function MenuLookIconSlot({ children }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.iconSlot, children });
|
|
67
|
+
}
|
|
68
|
+
function MenuLookRowBody({ icon, label, labelTitle, description, trail, badge, shortcut, current }) {
|
|
69
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
+
icon ? /* @__PURE__ */ jsx(MenuLookIconSlot, { children: icon }) : null,
|
|
71
|
+
/* @__PURE__ */ jsxs("span", { className: MENU_LOOK_CLASS.text, children: [
|
|
72
|
+
/* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.label, title: labelTitle, children: label }),
|
|
73
|
+
description ? /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.hint, children: description }) : null
|
|
74
|
+
] }),
|
|
75
|
+
trail ? /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.trail, children: trail }) : null,
|
|
76
|
+
badge ? /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.badge, children: badge }) : null,
|
|
77
|
+
shortcut ? /* @__PURE__ */ jsx("kbd", { className: MENU_LOOK_CLASS.shortcut, children: shortcut }) : null,
|
|
78
|
+
current ? /* @__PURE__ */ jsx(RadixCheckIcon, { className: MENU_LOOK_CLASS.current, "aria-hidden": "true", "data-menu-current-mark": "" }) : null
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
function menuLookItemClass({ destructive, dimmed } = {}) {
|
|
82
|
+
return `${MENU_LOOK_CLASS.item}${destructive ? ` ${MENU_LOOK_CLASS.danger}` : ""}${dimmed ? ` ${MENU_LOOK_CLASS.dimmed}` : ""}`;
|
|
83
|
+
}
|
|
84
|
+
function DeclaredOverflow({ label, children }) {
|
|
85
|
+
const fade = useScrollFade();
|
|
86
|
+
const viewport = React.useRef(null);
|
|
87
|
+
const setViewport = React.useCallback(
|
|
88
|
+
(node) => {
|
|
89
|
+
viewport.current = node;
|
|
90
|
+
fade.ref(node);
|
|
91
|
+
},
|
|
92
|
+
[fade.ref]
|
|
93
|
+
);
|
|
94
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
95
|
+
/* @__PURE__ */ jsx("div", { ref: setViewport, className: "cm-viewport", "data-slot": "menu-look-viewport", children }),
|
|
96
|
+
fade.state.bottom ? /* @__PURE__ */ jsxs(
|
|
97
|
+
"button",
|
|
98
|
+
{
|
|
99
|
+
type: "button",
|
|
100
|
+
className: "cm-more-below",
|
|
101
|
+
"data-slot": "menu-look-more-below",
|
|
102
|
+
tabIndex: -1,
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
onPointerDown: (event) => event.preventDefault(),
|
|
105
|
+
onClick: () => viewport.current?.scrollTo({ top: viewport.current.scrollHeight, behavior: "smooth" }),
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(RadixChevronDownIcon, { "aria-hidden": "true" }),
|
|
108
|
+
label
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) : null
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
var MenuLookContent = React.forwardRef(function MenuLookContent2({ size = "standard", density = "comfortable", moreBelowLabel, children, ...props }, ref) {
|
|
115
|
+
return /* @__PURE__ */ jsx(
|
|
116
|
+
DropdownMenuContent,
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
surface: "solid",
|
|
120
|
+
"data-menu-look": "",
|
|
121
|
+
"data-menu-family": "dropdown",
|
|
122
|
+
"data-size": size,
|
|
123
|
+
"data-density": density,
|
|
124
|
+
...moreBelowLabel ? { "data-overflow": "declared" } : {},
|
|
125
|
+
...props,
|
|
126
|
+
className: MENU_LOOK_CLASS.panel,
|
|
127
|
+
children: moreBelowLabel ? /* @__PURE__ */ jsx(DeclaredOverflow, { label: moreBelowLabel, children }) : children
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
var MenuLookSubContent = React.forwardRef(function MenuLookSubContent2({ size = "standard", density = "comfortable", fit = "menu", ...props }, ref) {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
DropdownMenuSubContent,
|
|
134
|
+
{
|
|
135
|
+
ref,
|
|
136
|
+
surface: "solid",
|
|
137
|
+
"data-menu-look": "",
|
|
138
|
+
"data-menu-family": "dropdown",
|
|
139
|
+
"data-size": size,
|
|
140
|
+
"data-density": density,
|
|
141
|
+
"data-fit": fit,
|
|
142
|
+
...props,
|
|
143
|
+
className: MENU_LOOK_CLASS.panel
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
var MenuLookContextContent = React.forwardRef(function MenuLookContextContent2({ size = "standard", density = "comfortable", ...props }, ref) {
|
|
148
|
+
return /* @__PURE__ */ jsx(
|
|
149
|
+
ContextMenuContent,
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
"data-menu-look": "",
|
|
153
|
+
"data-menu-family": "context",
|
|
154
|
+
"data-size": size,
|
|
155
|
+
"data-density": density,
|
|
156
|
+
...props,
|
|
157
|
+
className: MENU_LOOK_CLASS.panel
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
});
|
|
161
|
+
var MenuLookContextSubContent = React.forwardRef(function MenuLookContextSubContent2({ size = "standard", density = "comfortable", fit = "menu", ...props }, ref) {
|
|
162
|
+
return /* @__PURE__ */ jsx(
|
|
163
|
+
ContextMenuSubContent,
|
|
164
|
+
{
|
|
165
|
+
ref,
|
|
166
|
+
"data-menu-look": "",
|
|
167
|
+
"data-menu-family": "context",
|
|
168
|
+
"data-size": size,
|
|
169
|
+
"data-density": density,
|
|
170
|
+
"data-fit": fit,
|
|
171
|
+
...props,
|
|
172
|
+
className: MENU_LOOK_CLASS.panel
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
});
|
|
176
|
+
function menuLookRows(P, family) {
|
|
177
|
+
const Item = React.forwardRef(function MenuLookItem2({ icon, label, labelTitle, description, trail, badge, shortcut, current, destructive, dimmed, href, target, linkProps, ...props }, ref) {
|
|
178
|
+
const className = menuLookItemClass({ destructive, dimmed });
|
|
179
|
+
const body = /* @__PURE__ */ jsx(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut, current });
|
|
180
|
+
const mark = current ? { "data-current": "" } : {};
|
|
181
|
+
if (href) {
|
|
182
|
+
return /* @__PURE__ */ jsx(P.Item, { ref, asChild: true, "data-slot": `${family}-item`, ...props, ...mark, className, children: /* @__PURE__ */ jsx("a", { href, target, rel: target === "_blank" ? "noopener noreferrer" : void 0, ...linkProps, children: body }) });
|
|
183
|
+
}
|
|
184
|
+
return /* @__PURE__ */ jsx(P.Item, { ref, "data-slot": `${family}-item`, ...props, ...mark, className, children: body });
|
|
185
|
+
});
|
|
186
|
+
const SubTrigger = React.forwardRef(function MenuLookSubTrigger2({ icon, label, labelTitle, description, trail, badge, shortcut, current, ...props }, ref) {
|
|
187
|
+
return /* @__PURE__ */ jsxs(P.SubTrigger, { ref, "data-slot": `${family}-sub-trigger`, ...props, ...current ? { "data-current": "" } : {}, className: MENU_LOOK_CLASS.item, children: [
|
|
188
|
+
/* @__PURE__ */ jsx(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut }),
|
|
189
|
+
/* @__PURE__ */ jsx(RadixChevronRightIcon, { className: MENU_LOOK_CLASS.chevron, "aria-hidden": "true" })
|
|
190
|
+
] });
|
|
191
|
+
});
|
|
192
|
+
const CheckboxItem = React.forwardRef(function MenuLookCheckboxItem2({ icon, label, labelTitle, description, trail, badge, shortcut, checked, ...props }, ref) {
|
|
193
|
+
const on = checked === true;
|
|
194
|
+
return /* @__PURE__ */ jsx(P.CheckboxItem, { ref, ...checked === void 0 ? {} : { checked }, ...props, className: MENU_LOOK_CLASS.item, children: /* @__PURE__ */ jsx(MenuLookRowBody, { icon: on ? /* @__PURE__ */ jsx(RadixCheckIcon, { className: MENU_LOOK_CLASS.icon }) : icon ?? /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.icon, "aria-hidden": "true" }), label, labelTitle, description, trail, badge, shortcut }) });
|
|
195
|
+
});
|
|
196
|
+
const RadioItem = React.forwardRef(function MenuLookRadioItem2({ icon, label, labelTitle, description, trail, badge, shortcut, ...props }, ref) {
|
|
197
|
+
return /* @__PURE__ */ jsxs(P.RadioItem, { ref, ...props, className: MENU_LOOK_CLASS.item, children: [
|
|
198
|
+
/* @__PURE__ */ jsx(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut }),
|
|
199
|
+
/* @__PURE__ */ jsx(P.ItemIndicator, { className: MENU_LOOK_CLASS.current, "data-menu-current-mark": "", children: /* @__PURE__ */ jsx(RadixCheckIcon, { "aria-hidden": "true" }) })
|
|
200
|
+
] });
|
|
201
|
+
});
|
|
202
|
+
const Label = React.forwardRef(function MenuLookLabel2({ description, children, ...props }, ref) {
|
|
203
|
+
if (!description) return /* @__PURE__ */ jsx(P.Label, { ref, ...props, className: MENU_LOOK_CLASS.sectionLabel, children });
|
|
204
|
+
return /* @__PURE__ */ jsxs(P.Label, { ref, ...props, "data-has-hint": "", className: MENU_LOOK_CLASS.sectionLabel, children: [
|
|
205
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
206
|
+
/* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.hint, children: description })
|
|
207
|
+
] });
|
|
208
|
+
});
|
|
209
|
+
const Separator = React.forwardRef(function MenuLookSeparator2(props, ref) {
|
|
210
|
+
return /* @__PURE__ */ jsx(P.Separator, { ref, ...props, className: MENU_LOOK_CLASS.divider });
|
|
211
|
+
});
|
|
212
|
+
return { Item, SubTrigger, CheckboxItem, RadioItem, Label, Separator };
|
|
213
|
+
}
|
|
214
|
+
var dropdownRows = menuLookRows(DropdownMenuPrimitive, "dropdown-menu");
|
|
215
|
+
var contextRows = menuLookRows(ContextMenuPrimitive, "context-menu");
|
|
216
|
+
var MenuLookItem = dropdownRows.Item;
|
|
217
|
+
var MenuLookSub = DropdownMenuPrimitive.Sub;
|
|
218
|
+
var MenuLookSubTrigger = dropdownRows.SubTrigger;
|
|
219
|
+
var MenuLookCheckboxItem = dropdownRows.CheckboxItem;
|
|
220
|
+
var MenuLookRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
221
|
+
var MenuLookRadioItem = dropdownRows.RadioItem;
|
|
222
|
+
var MenuLookLabel = dropdownRows.Label;
|
|
223
|
+
var MenuLookSeparator = dropdownRows.Separator;
|
|
224
|
+
var MenuLookContextItem = contextRows.Item;
|
|
225
|
+
var MenuLookContextSub = ContextMenuPrimitive.Sub;
|
|
226
|
+
var MenuLookContextSubTrigger = contextRows.SubTrigger;
|
|
227
|
+
var MenuLookContextCheckboxItem = contextRows.CheckboxItem;
|
|
228
|
+
var MenuLookContextRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
229
|
+
var MenuLookContextRadioItem = contextRows.RadioItem;
|
|
230
|
+
var MenuLookContextLabel = contextRows.Label;
|
|
231
|
+
var MenuLookContextSeparator = contextRows.Separator;
|
|
232
|
+
var MenuLookPanel = React.forwardRef(function MenuLookPanel2({ size = "standard", density = "comfortable", surface = "floating", fillBelow, role = "menu", ...props }, ref) {
|
|
233
|
+
return /* @__PURE__ */ jsx(
|
|
234
|
+
"div",
|
|
235
|
+
{
|
|
236
|
+
ref,
|
|
237
|
+
role,
|
|
238
|
+
"data-menu-look": "",
|
|
239
|
+
"data-menu-family": "panel",
|
|
240
|
+
"data-surface": surface,
|
|
241
|
+
...fillBelow ? { "data-fill-below": fillBelow } : {},
|
|
242
|
+
"data-size": size,
|
|
243
|
+
"data-density": density,
|
|
244
|
+
...props,
|
|
245
|
+
className: MENU_LOOK_CLASS.panel
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
});
|
|
249
|
+
var MenuLookPopoverContent = React.forwardRef(function MenuLookPopoverContent2({ size = "standard", density = "comfortable", role = "menu", ...props }, ref) {
|
|
250
|
+
return /* @__PURE__ */ jsx(
|
|
251
|
+
PopoverContent,
|
|
252
|
+
{
|
|
253
|
+
ref,
|
|
254
|
+
role,
|
|
255
|
+
surface: "solid",
|
|
256
|
+
padding: "none",
|
|
257
|
+
animated: true,
|
|
258
|
+
"data-menu-look": "",
|
|
259
|
+
"data-menu-family": "panel",
|
|
260
|
+
"data-in-popover": "",
|
|
261
|
+
"data-surface": "floating",
|
|
262
|
+
"data-size": size,
|
|
263
|
+
"data-density": density,
|
|
264
|
+
...props,
|
|
265
|
+
className: MENU_LOOK_CLASS.panel
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
var MenuLookPanelItem = React.forwardRef(function MenuLookPanelItem2({ icon, label, labelTitle, description, trail, badge, shortcut, current, pressed, destructive, dimmed, href, target, rel, as, linkProps, onClick, role = "menuitem", ...props }, ref) {
|
|
270
|
+
const marked = Boolean(current || pressed);
|
|
271
|
+
const body = /* @__PURE__ */ jsx(MenuLookRowBody, { icon, label, labelTitle, description, trail, badge, shortcut, current: marked });
|
|
272
|
+
const className = menuLookItemClass({ destructive, dimmed });
|
|
273
|
+
const mark = marked ? { "data-current": "" } : {};
|
|
274
|
+
if (href) {
|
|
275
|
+
const Link = as ?? "a";
|
|
276
|
+
return /* @__PURE__ */ jsx(
|
|
277
|
+
Link,
|
|
278
|
+
{
|
|
279
|
+
ref,
|
|
280
|
+
href,
|
|
281
|
+
target,
|
|
282
|
+
rel: rel ?? (target === "_blank" ? "noopener noreferrer" : void 0),
|
|
283
|
+
role,
|
|
284
|
+
onClick,
|
|
285
|
+
...props,
|
|
286
|
+
...linkProps,
|
|
287
|
+
...mark,
|
|
288
|
+
className,
|
|
289
|
+
children: body
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
return /* @__PURE__ */ jsx(
|
|
294
|
+
"button",
|
|
295
|
+
{
|
|
296
|
+
ref,
|
|
297
|
+
type: "button",
|
|
298
|
+
role,
|
|
299
|
+
onClick,
|
|
300
|
+
...pressed === void 0 ? {} : { "aria-pressed": pressed },
|
|
301
|
+
...props,
|
|
302
|
+
...mark,
|
|
303
|
+
className,
|
|
304
|
+
children: body
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
});
|
|
308
|
+
var MenuLookPanelControlRow = React.forwardRef(function MenuLookPanelControlRow2({ icon, label, description, control, as = "div", ...props }, ref) {
|
|
309
|
+
const Row = as;
|
|
310
|
+
return /* @__PURE__ */ jsxs(Row, { ref, "data-control-row": "", ...props, className: MENU_LOOK_CLASS.item, children: [
|
|
311
|
+
/* @__PURE__ */ jsx(MenuLookRowBody, { icon, label, description }),
|
|
312
|
+
/* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.control, children: control })
|
|
313
|
+
] });
|
|
314
|
+
});
|
|
315
|
+
function MenuLookPanelHeader({ mark, title, subtitle, href, as, linkProps, onClick, ...data }) {
|
|
316
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
317
|
+
/* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.headerMark, children: mark }),
|
|
318
|
+
/* @__PURE__ */ jsxs("span", { className: MENU_LOOK_CLASS.headerText, children: [
|
|
319
|
+
/* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.headerTitle, children: title }),
|
|
320
|
+
subtitle ? /* @__PURE__ */ jsx("span", { className: MENU_LOOK_CLASS.headerSubtitle, children: subtitle }) : null
|
|
321
|
+
] })
|
|
322
|
+
] });
|
|
323
|
+
if (href) {
|
|
324
|
+
const Link = as ?? "a";
|
|
325
|
+
return /* @__PURE__ */ jsx(Link, { href, onClick, "data-menu-look-header": "", ...data, ...linkProps, className: MENU_LOOK_CLASS.header, children: body });
|
|
326
|
+
}
|
|
327
|
+
return /* @__PURE__ */ jsx("div", { "data-menu-look-header": "", ...data, className: MENU_LOOK_CLASS.header, children: body });
|
|
328
|
+
}
|
|
329
|
+
function MenuLookPanelDisclosure({ icon, label, children, pending, defaultOpen = false, open: openProp, onOpenChange, ...data }) {
|
|
330
|
+
const [ownOpen, setOwnOpen] = React.useState(defaultOpen);
|
|
331
|
+
const open = openProp ?? ownOpen;
|
|
332
|
+
const id = React.useId();
|
|
333
|
+
const toggle = () => {
|
|
334
|
+
const next = !open;
|
|
335
|
+
if (openProp === void 0) setOwnOpen(next);
|
|
336
|
+
onOpenChange?.(next);
|
|
337
|
+
};
|
|
338
|
+
if (pending) {
|
|
339
|
+
return /* @__PURE__ */ jsx("div", { "data-menu-look-disclosure": "", "data-pending": "", "aria-hidden": "true", ...data, children: /* @__PURE__ */ jsxs("div", { className: MENU_LOOK_CLASS.item, children: [
|
|
340
|
+
/* @__PURE__ */ jsx(MenuLookRowBody, { icon, label }),
|
|
341
|
+
/* @__PURE__ */ jsx(RadixChevronDownIcon, { className: MENU_LOOK_CLASS.chevron, "aria-hidden": "true", "data-disclosure-chevron": "" })
|
|
342
|
+
] }) });
|
|
343
|
+
}
|
|
344
|
+
return /* @__PURE__ */ jsxs("div", { "data-menu-look-disclosure": "", ...data, children: [
|
|
345
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: MENU_LOOK_CLASS.item, "aria-expanded": open, "aria-controls": id, onClick: toggle, children: [
|
|
346
|
+
/* @__PURE__ */ jsx(MenuLookRowBody, { icon, label }),
|
|
347
|
+
/* @__PURE__ */ jsx(RadixChevronDownIcon, { className: MENU_LOOK_CLASS.chevron, "aria-hidden": "true", "data-disclosure-chevron": "" })
|
|
348
|
+
] }),
|
|
349
|
+
/* @__PURE__ */ jsx("div", { id, role: "group", hidden: !open, children })
|
|
350
|
+
] });
|
|
351
|
+
}
|
|
352
|
+
function MenuLookPanelLabel({ children, ...data }) {
|
|
353
|
+
return /* @__PURE__ */ jsx("div", { ...data, className: MENU_LOOK_CLASS.sectionLabel, children });
|
|
354
|
+
}
|
|
355
|
+
function MenuLookPanelSeparator() {
|
|
356
|
+
return /* @__PURE__ */ jsx("div", { role: "separator", className: MENU_LOOK_CLASS.divider });
|
|
357
|
+
}
|
|
358
|
+
var MenuLookSearch = React.forwardRef(function MenuLookSearch2({ placeholder = "Search", ...props }, ref) {
|
|
359
|
+
return /* @__PURE__ */ jsx("div", { className: MENU_LOOK_CLASS.search, "data-menu-look-search": "", children: /* @__PURE__ */ jsx(
|
|
360
|
+
"input",
|
|
361
|
+
{
|
|
362
|
+
ref,
|
|
363
|
+
type: "search",
|
|
364
|
+
autoComplete: "off",
|
|
365
|
+
spellCheck: false,
|
|
366
|
+
placeholder,
|
|
367
|
+
"aria-label": props["aria-label"] ?? placeholder,
|
|
368
|
+
...props
|
|
369
|
+
}
|
|
370
|
+
) });
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
export {
|
|
374
|
+
MENU_LOOK,
|
|
375
|
+
MENU_LOOK_CLASS,
|
|
376
|
+
MenuLookIconSlot,
|
|
377
|
+
MenuLookRowBody,
|
|
378
|
+
menuLookItemClass,
|
|
379
|
+
MenuLookContent,
|
|
380
|
+
MenuLookSubContent,
|
|
381
|
+
MenuLookContextContent,
|
|
382
|
+
MenuLookContextSubContent,
|
|
383
|
+
MenuLookItem,
|
|
384
|
+
MenuLookSub,
|
|
385
|
+
MenuLookSubTrigger,
|
|
386
|
+
MenuLookCheckboxItem,
|
|
387
|
+
MenuLookRadioGroup,
|
|
388
|
+
MenuLookRadioItem,
|
|
389
|
+
MenuLookLabel,
|
|
390
|
+
MenuLookSeparator,
|
|
391
|
+
MenuLookContextItem,
|
|
392
|
+
MenuLookContextSub,
|
|
393
|
+
MenuLookContextSubTrigger,
|
|
394
|
+
MenuLookContextCheckboxItem,
|
|
395
|
+
MenuLookContextRadioGroup,
|
|
396
|
+
MenuLookContextRadioItem,
|
|
397
|
+
MenuLookContextLabel,
|
|
398
|
+
MenuLookContextSeparator,
|
|
399
|
+
MenuLookPanel,
|
|
400
|
+
MenuLookPopoverContent,
|
|
401
|
+
MenuLookPanelItem,
|
|
402
|
+
MenuLookPanelControlRow,
|
|
403
|
+
MenuLookPanelHeader,
|
|
404
|
+
MenuLookPanelDisclosure,
|
|
405
|
+
MenuLookPanelLabel,
|
|
406
|
+
MenuLookPanelSeparator,
|
|
407
|
+
MenuLookSearch
|
|
408
|
+
};
|
|
409
|
+
//# sourceMappingURL=chunk-L5OACQXS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/menu-look.tsx"],"sourcesContent":["\"use client\";\n/**\n * `@ai-matrx/design-system/menu-look` — THE ONE MENU LOOK (Arman, 2026-10-23: the header \"…\", every\n * crumb dropdown and every Alchemy dropdown are \"the IDENTICAL dropdown that I use for Alchemy for size\n * and style\" — the right-click menu).\n *\n * Four families, one look:\n * - `MENU_LOOK_CLASS` / `MenuLookRowBody` / `MenuLookIconSlot`: the class names and the inside of a row,\n * used by @ai-matrx/context-menu's MenuPanel (its own non-Radix renderer, the right-click menu);\n * - THE DROPDOWN — `MenuLookContent` / `MenuLookSubContent` / `MenuLookItem` / `MenuLookSubTrigger` /\n * `MenuLookCheckboxItem` / `MenuLookRadioGroup` / `MenuLookRadioItem` / `MenuLookLabel` /\n * `MenuLookSeparator` / `MenuLookSearch` (+ `MenuLookSub`): the panel and rows on the Radix dropdown\n * (keyboard, typeahead, focus return, collision padding) — Alchemy's dropdowns, the frame's \"…\" and\n * crumb menus, a row's \"…\" (ItemMenu);\n * - THE RIGHT-CLICK — `MenuLookContext*`: the SAME rows on the Radix context menu (a row's right-click,\n * ItemContextMenu without a host menu);\n * - THE PANEL — `MenuLookPanel` / `MenuLookPopoverContent` / `MenuLookPanelItem` /\n * `MenuLookPanelControlRow` / `MenuLookPanelHeader` / `MenuLookPanelDisclosure` /\n * `MenuLookPanelLabel` / `MenuLookPanelSeparator`: the same panel and rows WITHOUT a Radix menu, for a\n * popover or sheet that also holds controls (a theme switch, a Switch, a search list) — the account\n * rail's Settings, Organization and account menus and the frame's admin menu.\n * Every measurement lives once, in `menu-look.css` (shipped inside `styles.css`): 280px panel, 30px rows,\n * 13px text on a 1.25 line, 16px icons, 4px/8px row padding, 10px corners. No part takes a `className`.\n *\n * ONE LEFT EDGE (Arman, 2026-10-23: \"get rid of the HORRIBLE and ugly indentation\"): a row without a\n * glyph draws no icon column, the current row is marked with a check at its END (`current`), and the\n * search is the menu's own header row whose text starts where every row's text starts.\n */\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { DropdownMenuContent, DropdownMenuSubContent } from \"./dropdown-menu\";\nimport { ContextMenuContent, ContextMenuSubContent } from \"./context-menu\";\nimport { PopoverContent } from \"./popover\";\nimport { RadixCheckIcon, RadixChevronDownIcon, RadixChevronRightIcon } from \"./icons\";\nimport { useScrollFade } from \"./use-scroll-fade\";\n\n/** The look's measurements (what `menu-look.css` draws), for tests and hosts that size around a menu. */\nexport const MENU_LOOK = {\n width: 280,\n largeWidth: 360,\n rowHeight: 30,\n sheetRowHeight: 44,\n fontSize: 13,\n lineHeight: 1.25,\n icon: 16,\n headerMark: 28,\n rowPaddingY: 4,\n rowPaddingX: 8,\n radius: 10,\n} as const;\n\n/** The look's class names — the ONLY classes a menu part wears. */\nexport const MENU_LOOK_CLASS = {\n panel: \"cm-menu\",\n item: \"cm-item\",\n iconSlot: \"cm-icon-slot\",\n icon: \"cm-icon\",\n text: \"cm-text\",\n label: \"cm-label\",\n hint: \"cm-hint\",\n current: \"cm-current\",\n chevron: \"cm-chevron\",\n search: \"cm-search\",\n trail: \"cm-trail\",\n badge: \"cm-badge\",\n shortcut: \"cm-shortcut\",\n control: \"cm-control\",\n divider: \"cm-divider\",\n sectionLabel: \"cm-section-label\",\n header: \"cm-header\",\n headerMark: \"cm-header-mark\",\n headerText: \"cm-header-text\",\n headerTitle: \"cm-header-title\",\n headerSubtitle: \"cm-header-subtitle\",\n danger: \"cm-danger\",\n dimmed: \"cm-dimmed\",\n} as const;\n\nexport type MenuLookSize = \"standard\" | \"large\";\nexport type MenuLookDensity = \"comfortable\" | \"compact\";\n\n/** The 16px icon column of a row that has a glyph (an empty slot draws nothing: no reserved gutter). */\nexport function MenuLookIconSlot({ children }: { children?: React.ReactNode }): React.ReactElement {\n return <span className={MENU_LOOK_CLASS.iconSlot}>{children}</span>;\n}\n\nexport interface MenuLookRowBodyProps {\n /** The glyph (any 16px svg; the slot sizes it). Omitted → no icon column; the text starts the row. */\n icon?: React.ReactNode | undefined;\n label: React.ReactNode;\n /** Hover text for the label (a long description stays out of the row: no \"novels\" in menus). */\n labelTitle?: string | undefined;\n /** A muted second line under the label. */\n description?: React.ReactNode | undefined;\n /** A muted end-of-row hint (a trail, a shortcut word). */\n trail?: React.ReactNode | undefined;\n /** A small outlined tag at the row's end (\"New\", \"Beta\", a count). */\n badge?: React.ReactNode | undefined;\n /** The row's key, at its end (\"⌘C\", \"R\"). */\n shortcut?: React.ReactNode | undefined;\n /** The row the person is on now: medium weight and a check at the row's end (never a left gutter). */\n current?: boolean | undefined;\n}\n\n/** The inside of a row: icon (when given), label (+ second line), end hint, badge, key, current check. */\nexport function MenuLookRowBody({ icon, label, labelTitle, description, trail, badge, shortcut, current }: MenuLookRowBodyProps): React.ReactElement {\n return (\n <>\n {icon ? <MenuLookIconSlot>{icon}</MenuLookIconSlot> : null}\n <span className={MENU_LOOK_CLASS.text}>\n <span className={MENU_LOOK_CLASS.label} title={labelTitle}>{label}</span>\n {description ? <span className={MENU_LOOK_CLASS.hint}>{description}</span> : null}\n </span>\n {trail ? <span className={MENU_LOOK_CLASS.trail}>{trail}</span> : null}\n {badge ? <span className={MENU_LOOK_CLASS.badge}>{badge}</span> : null}\n {shortcut ? <kbd className={MENU_LOOK_CLASS.shortcut}>{shortcut}</kbd> : null}\n {current ? <RadixCheckIcon className={MENU_LOOK_CLASS.current} aria-hidden=\"true\" data-menu-current-mark=\"\" /> : null}\n </>\n );\n}\n\n/** A row's classes: the look's row, plus its danger / dimmed marks. */\nexport function menuLookItemClass({ destructive, dimmed }: { destructive?: boolean | undefined; dimmed?: boolean | undefined } = {}): string {\n return `${MENU_LOOK_CLASS.item}${destructive ? ` ${MENU_LOOK_CLASS.danger}` : \"\"}${dimmed ? ` ${MENU_LOOK_CLASS.dimmed}` : \"\"}`;\n}\n\ntype DataAttributes = { [dataAttribute: `data-${string}`]: string | undefined };\n\ninterface PanelLookProps {\n /** \"standard\" (280px, the right-click menu) or \"large\" (360px, 36px rows). */\n size?: MenuLookSize | undefined;\n density?: MenuLookDensity | undefined;\n}\n\n/**\n * A submenu panel's fit: `\"menu\"` (the look's width and padding) or `\"content\"` — the panel holds a\n * host's own surface (the Alchemy palette): its width, no padding, and the popover height the surface\n * reads mapped to the room this menu measured.\n */\nexport type MenuLookSubFit = \"menu\" | \"content\";\n\n// ── THE DROPDOWN and THE RIGHT-CLICK: one set of rows over either Radix menu ──────────────────────\n\ntype ContentProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuContent>, \"className\" | \"surface\">;\n\nexport interface MenuLookContentProps extends ContentProps, PanelLookProps, DataAttributes {\n /**\n * A LONG MENU SAYS SO, IN WORDS (FIX-Q13, production `/agents/all` at 1024x768: a record's \"…\" hid\n * its Delete below the fold and read as dead). Given, the panel is a frame that does not scroll, the\n * rows scroll inside it, and a bar with these words (\"More actions below\") sits at its bottom edge\n * whenever there is more below — a press scrolls to the end. Measured: a menu that fits shows nothing.\n */\n moreBelowLabel?: string | undefined;\n}\n\n/** The rows' scroller and its \"more below\" bar, for a panel that declares its overflow. */\nfunction DeclaredOverflow({ label, children }: { label: string; children: React.ReactNode }): React.ReactElement {\n const fade = useScrollFade();\n const viewport = React.useRef<HTMLDivElement | null>(null);\n const setViewport = React.useCallback(\n (node: HTMLDivElement | null) => {\n viewport.current = node;\n fade.ref(node);\n },\n [fade.ref],\n );\n return (\n <>\n <div ref={setViewport} className=\"cm-viewport\" data-slot=\"menu-look-viewport\">\n {children}\n </div>\n {fade.state.bottom ? (\n <button\n type=\"button\"\n className=\"cm-more-below\"\n data-slot=\"menu-look-more-below\"\n // Not a menu item: never roving focus or type-ahead; Escape and arrows stay the list's.\n tabIndex={-1}\n aria-hidden=\"true\"\n // Radix would otherwise close the menu on the press that starts this click.\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => viewport.current?.scrollTo({ top: viewport.current.scrollHeight, behavior: \"smooth\" })}\n >\n <RadixChevronDownIcon aria-hidden=\"true\" />\n {label}\n </button>\n ) : null}\n </>\n );\n}\n\n/** The menu's panel on the Radix dropdown (portalled, capped at the room Radix measured, scrolls past it). */\nexport const MenuLookContent = React.forwardRef<HTMLDivElement, MenuLookContentProps>(function MenuLookContent(\n { size = \"standard\", density = \"comfortable\", moreBelowLabel, children, ...props },\n ref,\n) {\n return (\n <DropdownMenuContent\n ref={ref}\n surface=\"solid\"\n data-menu-look=\"\"\n data-menu-family=\"dropdown\"\n data-size={size}\n data-density={density}\n {...(moreBelowLabel ? { \"data-overflow\": \"declared\" } : {})}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n >\n {moreBelowLabel ? <DeclaredOverflow label={moreBelowLabel}>{children}</DeclaredOverflow> : children}\n </DropdownMenuContent>\n );\n});\n\ntype SubContentProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuSubContent>, \"className\" | \"surface\">;\n\nexport interface MenuLookSubContentProps extends SubContentProps, PanelLookProps, DataAttributes {\n fit?: MenuLookSubFit | undefined;\n}\n\n/** A submenu's panel: the same panel, as wide as the menu it opens from. */\nexport const MenuLookSubContent = React.forwardRef<HTMLDivElement, MenuLookSubContentProps>(function MenuLookSubContent(\n { size = \"standard\", density = \"comfortable\", fit = \"menu\", ...props },\n ref,\n) {\n return (\n <DropdownMenuSubContent\n ref={ref}\n surface=\"solid\"\n data-menu-look=\"\"\n data-menu-family=\"dropdown\"\n data-size={size}\n data-density={density}\n data-fit={fit}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n />\n );\n});\n\ntype ContextContentProps = Omit<React.ComponentPropsWithoutRef<typeof ContextMenuContent>, \"className\">;\n\nexport interface MenuLookContextContentProps extends ContextContentProps, PanelLookProps, DataAttributes {}\n\n/** The right-click menu's panel on the Radix context menu: the dropdown's panel, opened at the pointer. */\nexport const MenuLookContextContent = React.forwardRef<HTMLDivElement, MenuLookContextContentProps>(function MenuLookContextContent(\n { size = \"standard\", density = \"comfortable\", ...props },\n ref,\n) {\n return (\n <ContextMenuContent\n ref={ref}\n data-menu-look=\"\"\n data-menu-family=\"context\"\n data-size={size}\n data-density={density}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n />\n );\n});\n\ntype ContextSubContentProps = Omit<React.ComponentPropsWithoutRef<typeof ContextMenuSubContent>, \"className\">;\n\nexport interface MenuLookContextSubContentProps extends ContextSubContentProps, PanelLookProps, DataAttributes {\n fit?: MenuLookSubFit | undefined;\n}\n\n/** A right-click submenu's panel. */\nexport const MenuLookContextSubContent = React.forwardRef<HTMLDivElement, MenuLookContextSubContentProps>(function MenuLookContextSubContent(\n { size = \"standard\", density = \"comfortable\", fit = \"menu\", ...props },\n ref,\n) {\n return (\n <ContextMenuSubContent\n ref={ref}\n data-menu-look=\"\"\n data-menu-family=\"context\"\n data-size={size}\n data-density={density}\n data-fit={fit}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n />\n );\n});\n\ntype ItemProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, \"className\" | \"children\" | \"asChild\">;\n\nexport interface MenuLookItemProps extends ItemProps, MenuLookRowBodyProps, DataAttributes {\n destructive?: boolean | undefined;\n /** Drawn dimmed (a greyed verb whose reason is the row's tooltip); still focusable. */\n dimmed?: boolean | undefined;\n /** A real link: the row is an `<a>` (a modified click keeps the browser's link behaviour). */\n href?: string | undefined;\n target?: string | undefined;\n /** Props for the `<a>` (aria-current, title, onClick). */\n linkProps?: undefined | Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\" | \"target\" | \"className\" | \"children\">;\n}\n\ntype SubTriggerProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>, \"className\" | \"children\" | \"asChild\">;\n\nexport interface MenuLookSubTriggerProps extends SubTriggerProps, MenuLookRowBodyProps, DataAttributes {}\n\ntype CheckboxProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>, \"className\" | \"children\" | \"asChild\">;\n\nexport interface MenuLookCheckboxItemProps extends CheckboxProps, MenuLookRowBodyProps, DataAttributes {}\n\ntype RadioProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>, \"className\" | \"children\" | \"asChild\">;\n\nexport interface MenuLookRadioItemProps extends RadioProps, Omit<MenuLookRowBodyProps, \"current\">, DataAttributes {}\n\ntype LabelPrimitiveProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>, \"className\">;\n\nexport interface MenuLookLabelProps extends LabelPrimitiveProps {\n /** A muted line under the heading (a menu's header: the record it acts on). */\n description?: React.ReactNode | undefined;\n}\n\ntype SeparatorProps = Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>, \"className\">;\n\n/** The parts both Radix menus share (the context menu's are the same components under other names). */\ninterface MenuPrimitives {\n Item: typeof DropdownMenuPrimitive.Item;\n SubTrigger: typeof DropdownMenuPrimitive.SubTrigger;\n CheckboxItem: typeof DropdownMenuPrimitive.CheckboxItem;\n RadioItem: typeof DropdownMenuPrimitive.RadioItem;\n ItemIndicator: typeof DropdownMenuPrimitive.ItemIndicator;\n Label: typeof DropdownMenuPrimitive.Label;\n Separator: typeof DropdownMenuPrimitive.Separator;\n}\n\n/** The rows, drawn once, over either Radix menu — so a row's \"…\" and its right-click are one look. */\nfunction menuLookRows(P: MenuPrimitives, family: \"dropdown-menu\" | \"context-menu\") {\n /** One row: icon, label (+ optional second line), optional end hint; a link when given `href`. */\n const Item = React.forwardRef<HTMLDivElement, MenuLookItemProps>(function MenuLookItem(\n { icon, label, labelTitle, description, trail, badge, shortcut, current, destructive, dimmed, href, target, linkProps, ...props },\n ref,\n ) {\n const className = menuLookItemClass({ destructive, dimmed });\n const body = <MenuLookRowBody icon={icon} label={label} labelTitle={labelTitle} description={description} trail={trail} badge={badge} shortcut={shortcut} current={current} />;\n const mark = current ? { \"data-current\": \"\" } : {};\n if (href) {\n return (\n <P.Item ref={ref} asChild data-slot={`${family}-item`} {...props} {...mark} className={className}>\n <a href={href} target={target} rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined} {...linkProps}>\n {body}\n </a>\n </P.Item>\n );\n }\n return (\n <P.Item ref={ref} data-slot={`${family}-item`} {...props} {...mark} className={className}>\n {body}\n </P.Item>\n );\n });\n\n /**\n * A row that opens a submenu: the same row (icon slot, the standard gap, one left edge) with the\n * look's chevron at its END (`cm-chevron`, 16px, muted) — never a bare SubTrigger whose icon touches\n * its label.\n */\n const SubTrigger = React.forwardRef<HTMLDivElement, MenuLookSubTriggerProps>(function MenuLookSubTrigger(\n { icon, label, labelTitle, description, trail, badge, shortcut, current, ...props },\n ref,\n ) {\n return (\n <P.SubTrigger ref={ref} data-slot={`${family}-sub-trigger`} {...props} {...(current ? { \"data-current\": \"\" } : {})} className={MENU_LOOK_CLASS.item}>\n <MenuLookRowBody icon={icon} label={label} labelTitle={labelTitle} description={description} trail={trail} badge={badge} shortcut={shortcut} />\n <RadixChevronRightIcon className={MENU_LOOK_CLASS.chevron} aria-hidden=\"true\" />\n </P.SubTrigger>\n );\n });\n\n /** A toggle row: a check in the icon slot while on (the right-click menu's toggle), else its icon — a\n * toggle keeps its column either way, so switching it never moves its label. */\n const CheckboxItem = React.forwardRef<HTMLDivElement, MenuLookCheckboxItemProps>(function MenuLookCheckboxItem(\n { icon, label, labelTitle, description, trail, badge, shortcut, checked, ...props },\n ref,\n ) {\n const on = checked === true;\n return (\n <P.CheckboxItem ref={ref} {...(checked === undefined ? {} : { checked })} {...props} className={MENU_LOOK_CLASS.item}>\n <MenuLookRowBody icon={on ? <RadixCheckIcon className={MENU_LOOK_CLASS.icon} /> : (icon ?? <span className={MENU_LOOK_CLASS.icon} aria-hidden=\"true\" />)} label={label} labelTitle={labelTitle} description={description} trail={trail} badge={badge} shortcut={shortcut} />\n </P.CheckboxItem>\n );\n });\n\n /** A one-of row: the chosen one is marked like the current row — medium weight and a check at the\n * row's END — so no row reserves a left gutter for a dot. */\n const RadioItem = React.forwardRef<HTMLDivElement, MenuLookRadioItemProps>(function MenuLookRadioItem(\n { icon, label, labelTitle, description, trail, badge, shortcut, ...props },\n ref,\n ) {\n return (\n <P.RadioItem ref={ref} {...props} className={MENU_LOOK_CLASS.item}>\n <MenuLookRowBody icon={icon} label={label} labelTitle={labelTitle} description={description} trail={trail} badge={badge} shortcut={shortcut} />\n <P.ItemIndicator className={MENU_LOOK_CLASS.current} data-menu-current-mark=\"\">\n <RadixCheckIcon aria-hidden=\"true\" />\n </P.ItemIndicator>\n </P.RadioItem>\n );\n });\n\n /** A section heading (\"Copy\", \"Brands\", \"Pages\"), with an optional muted line under it. */\n const Label = React.forwardRef<HTMLDivElement, MenuLookLabelProps>(function MenuLookLabel(\n { description, children, ...props },\n ref,\n ) {\n if (!description) return <P.Label ref={ref} {...props} className={MENU_LOOK_CLASS.sectionLabel}>{children}</P.Label>;\n return (\n <P.Label ref={ref} {...props} data-has-hint=\"\" className={MENU_LOOK_CLASS.sectionLabel}>\n <span>{children}</span>\n <span className={MENU_LOOK_CLASS.hint}>{description}</span>\n </P.Label>\n );\n });\n\n /** The line between sections. */\n const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(function MenuLookSeparator(props, ref) {\n return <P.Separator ref={ref} {...props} className={MENU_LOOK_CLASS.divider} />;\n });\n\n return { Item, SubTrigger, CheckboxItem, RadioItem, Label, Separator };\n}\n\nconst dropdownRows = menuLookRows(DropdownMenuPrimitive, \"dropdown-menu\");\nconst contextRows = menuLookRows(ContextMenuPrimitive as unknown as MenuPrimitives, \"context-menu\");\n\nexport const MenuLookItem = dropdownRows.Item;\n/** Holds a submenu: `MenuLookSub` > `MenuLookSubTrigger` + `MenuLookSubContent`. */\nexport const MenuLookSub = DropdownMenuPrimitive.Sub;\nexport const MenuLookSubTrigger = dropdownRows.SubTrigger;\nexport const MenuLookCheckboxItem = dropdownRows.CheckboxItem;\n/** A group of one-of rows (`MenuLookRadioItem`); the host owns `value` / `onValueChange`. */\nexport const MenuLookRadioGroup = DropdownMenuPrimitive.RadioGroup;\nexport const MenuLookRadioItem = dropdownRows.RadioItem;\nexport const MenuLookLabel = dropdownRows.Label;\nexport const MenuLookSeparator = dropdownRows.Separator;\n\n/** The right-click twins of the dropdown rows — identical rows, the Radix context menu underneath. */\nexport const MenuLookContextItem = contextRows.Item;\nexport const MenuLookContextSub = ContextMenuPrimitive.Sub;\nexport const MenuLookContextSubTrigger = contextRows.SubTrigger;\nexport const MenuLookContextCheckboxItem = contextRows.CheckboxItem;\nexport const MenuLookContextRadioGroup = ContextMenuPrimitive.RadioGroup;\nexport const MenuLookContextRadioItem = contextRows.RadioItem;\nexport const MenuLookContextLabel = contextRows.Label;\nexport const MenuLookContextSeparator = contextRows.Separator;\n\n// ── THE PANEL: the same panel and rows with no Radix menu (a popover or sheet that holds controls) ──\n\n/**\n * Where a panel sits: `\"floating\"` draws the menu's own box (border, popover fill, shadow, 280px) — a\n * CSS-toggled menu, or a host whose popover draws nothing; `\"sheet\"` draws no box (a phone's bottom\n * sheet, or a host popover that is already the box) and gives its rows 44px touch height.\n */\nexport type MenuLookPanelSurface = \"floating\" | \"sheet\";\n\nexport interface MenuLookPanelProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\">,\n PanelLookProps,\n DataAttributes {\n surface?: MenuLookPanelSurface | undefined;\n /**\n * `\"lg\"`: below the large breakpoint (1024px) the floating panel fills the width its host gives it —\n * a CSS-toggled menu that becomes a bottom-anchored sheet on a phone (AppShell's account menu).\n */\n fillBelow?: \"lg\" | undefined;\n}\n\n/** The menu's panel as a plain element: its rows are `MenuLookPanel*` parts. Role `menu` by default. */\nexport const MenuLookPanel = React.forwardRef<HTMLDivElement, MenuLookPanelProps>(function MenuLookPanel(\n { size = \"standard\", density = \"comfortable\", surface = \"floating\", fillBelow, role = \"menu\", ...props },\n ref,\n) {\n return (\n <div\n ref={ref}\n role={role}\n data-menu-look=\"\"\n data-menu-family=\"panel\"\n data-surface={surface}\n {...(fillBelow ? { \"data-fill-below\": fillBelow } : {})}\n data-size={size}\n data-density={density}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n />\n );\n});\n\ntype PopoverProps = Omit<React.ComponentPropsWithoutRef<typeof PopoverContent>, \"className\" | \"surface\" | \"width\" | \"padding\" | \"sizing\">;\n\nexport interface MenuLookPopoverContentProps extends PopoverProps, PanelLookProps, DataAttributes {}\n\n/**\n * The panel IS the popover: a Radix popover (outside click, Esc, focus return, collision padding)\n * wearing the menu's box — one element, never a popover box around a menu box. Role `menu`.\n */\nexport const MenuLookPopoverContent = React.forwardRef<HTMLDivElement, MenuLookPopoverContentProps>(function MenuLookPopoverContent(\n { size = \"standard\", density = \"comfortable\", role = \"menu\", ...props },\n ref,\n) {\n return (\n <PopoverContent\n ref={ref}\n role={role}\n surface=\"solid\"\n padding=\"none\"\n animated\n data-menu-look=\"\"\n data-menu-family=\"panel\"\n data-in-popover=\"\"\n data-surface=\"floating\"\n data-size={size}\n data-density={density}\n {...props}\n className={MENU_LOOK_CLASS.panel}\n />\n );\n});\n\ntype LinkComponent = React.ElementType;\n\ninterface PanelRowMarks {\n destructive?: boolean | undefined;\n /** Drawn dimmed (a greyed verb whose reason is the row's tooltip); still pressable. */\n dimmed?: boolean | undefined;\n}\n\nexport interface MenuLookPanelItemProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"className\" | \"style\" | \"children\" | \"type\">,\n MenuLookRowBodyProps,\n PanelRowMarks,\n DataAttributes {\n /**\n * A toggle row's state (a tool that is showing): `aria-pressed`, and while on it reads like the\n * current row (medium weight, the check at its end).\n */\n pressed?: boolean | undefined;\n /** A link: the row is an anchor (or `as`, the host's link component — Next's Link, an app link). */\n href?: string | undefined;\n target?: string | undefined;\n rel?: string | undefined;\n /** The link component for `href` (it receives `href`, `className`, `role`, `onClick`, children). */\n as?: LinkComponent | undefined;\n /** Extra props for the link component (`prefetch={false}`, `aria-current`). */\n linkProps?: Record<string, unknown> | undefined;\n}\n\n/** A panel row: a button, or a link with `href`. Same row as the dropdown's (`cm-item`). */\nexport const MenuLookPanelItem = React.forwardRef<HTMLElement, MenuLookPanelItemProps>(function MenuLookPanelItem(\n { icon, label, labelTitle, description, trail, badge, shortcut, current, pressed, destructive, dimmed, href, target, rel, as, linkProps, onClick, role = \"menuitem\", ...props },\n ref,\n) {\n const marked = Boolean(current || pressed);\n const body = <MenuLookRowBody icon={icon} label={label} labelTitle={labelTitle} description={description} trail={trail} badge={badge} shortcut={shortcut} current={marked} />;\n const className = menuLookItemClass({ destructive, dimmed });\n const mark = marked ? { \"data-current\": \"\" } : {};\n if (href) {\n const Link = as ?? \"a\";\n return (\n <Link\n ref={ref}\n href={href}\n target={target}\n rel={rel ?? (target === \"_blank\" ? \"noopener noreferrer\" : undefined)}\n role={role}\n onClick={onClick}\n {...props}\n {...linkProps}\n {...mark}\n className={className}\n >\n {body}\n </Link>\n );\n }\n return (\n <button\n ref={ref as React.Ref<HTMLButtonElement>}\n type=\"button\"\n role={role}\n onClick={onClick}\n {...(pressed === undefined ? {} : { \"aria-pressed\": pressed })}\n {...props}\n {...mark}\n className={className}\n >\n {body}\n </button>\n );\n});\n\nexport interface MenuLookPanelControlRowProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"className\" | \"style\" | \"children\">,\n Pick<MenuLookRowBodyProps, \"icon\" | \"label\" | \"description\">,\n DataAttributes {\n /** The row's own control at its end: a `Switch`, a `SegmentedControl`, a count. */\n control: React.ReactNode;\n /** `\"label\"` when the whole row should press its control (a Switch); default `\"div\"`. */\n as?: \"div\" | \"label\" | undefined;\n}\n\n/**\n * A row that holds a control instead of being one (Theme: Light | Dark | Device; Standard view with its\n * Switch): the same icon slot, label and left edge as every row, the control at its END, and no hover\n * fill (the control answers the pointer, not the row).\n */\nexport const MenuLookPanelControlRow = React.forwardRef<HTMLElement, MenuLookPanelControlRowProps>(function MenuLookPanelControlRow(\n { icon, label, description, control, as = \"div\", ...props },\n ref,\n) {\n const Row = as;\n return (\n <Row ref={ref as React.Ref<never>} data-control-row=\"\" {...props} className={MENU_LOOK_CLASS.item}>\n <MenuLookRowBody icon={icon} label={label} description={description} />\n <span className={MENU_LOOK_CLASS.control}>{control}</span>\n </Row>\n );\n});\n\nexport interface MenuLookPanelHeaderProps extends DataAttributes {\n /** The 28px mark (an avatar, an organization mark, a colored glyph). */\n mark: React.ReactNode;\n title: React.ReactNode;\n /** One muted line under the title. */\n subtitle?: React.ReactNode | undefined;\n /** The header is a door to its own page. */\n href?: string | undefined;\n as?: LinkComponent | undefined;\n linkProps?: Record<string, unknown> | undefined;\n onClick?: React.MouseEventHandler<HTMLElement> | undefined;\n}\n\n/**\n * The row a panel opens with (Settings, the organization, the person): a 28px mark on the rows' left\n * edge, a title, an optional muted subtitle. With `href` it is a link to its page.\n */\nexport function MenuLookPanelHeader({ mark, title, subtitle, href, as, linkProps, onClick, ...data }: MenuLookPanelHeaderProps): React.ReactElement {\n const body = (\n <>\n <span className={MENU_LOOK_CLASS.headerMark}>{mark}</span>\n <span className={MENU_LOOK_CLASS.headerText}>\n <span className={MENU_LOOK_CLASS.headerTitle}>{title}</span>\n {subtitle ? <span className={MENU_LOOK_CLASS.headerSubtitle}>{subtitle}</span> : null}\n </span>\n </>\n );\n if (href) {\n const Link = as ?? \"a\";\n return (\n <Link href={href} onClick={onClick} data-menu-look-header=\"\" {...data} {...linkProps} className={MENU_LOOK_CLASS.header}>\n {body}\n </Link>\n );\n }\n return (\n <div data-menu-look-header=\"\" {...data} className={MENU_LOOK_CLASS.header}>\n {body}\n </div>\n );\n}\n\nexport interface MenuLookPanelDisclosureProps extends Pick<MenuLookRowBodyProps, \"icon\" | \"label\">, DataAttributes {\n /** Omitted with `pending`: the group's rows are still on their way. */\n children?: React.ReactNode;\n /**\n * The group's row while its rows load (a lazy chunk): the same row and chevron, inert and hidden\n * from assistive tech, so nothing below it moves when the group arrives (no layout shift).\n */\n pending?: boolean | undefined;\n defaultOpen?: boolean | undefined;\n open?: boolean | undefined;\n onOpenChange?: ((open: boolean) => void) | undefined;\n}\n\n/**\n * A folded group of rows (\"Quick Access\", \"Admin\"): a row with a down-chevron at its END that opens\n * the group in place. Closed, its rows are ABSENT (hidden: out of the hit-test tree and the tab order),\n * never clipped-but-live. Open, they sit on the same left edge as every row — no indent.\n */\nexport function MenuLookPanelDisclosure({ icon, label, children, pending, defaultOpen = false, open: openProp, onOpenChange, ...data }: MenuLookPanelDisclosureProps): React.ReactElement {\n const [ownOpen, setOwnOpen] = React.useState(defaultOpen);\n const open = openProp ?? ownOpen;\n const id = React.useId();\n const toggle = () => {\n const next = !open;\n if (openProp === undefined) setOwnOpen(next);\n onOpenChange?.(next);\n };\n if (pending) {\n return (\n <div data-menu-look-disclosure=\"\" data-pending=\"\" aria-hidden=\"true\" {...data}>\n <div className={MENU_LOOK_CLASS.item}>\n <MenuLookRowBody icon={icon} label={label} />\n <RadixChevronDownIcon className={MENU_LOOK_CLASS.chevron} aria-hidden=\"true\" data-disclosure-chevron=\"\" />\n </div>\n </div>\n );\n }\n return (\n <div data-menu-look-disclosure=\"\" {...data}>\n <button type=\"button\" className={MENU_LOOK_CLASS.item} aria-expanded={open} aria-controls={id} onClick={toggle}>\n <MenuLookRowBody icon={icon} label={label} />\n <RadixChevronDownIcon className={MENU_LOOK_CLASS.chevron} aria-hidden=\"true\" data-disclosure-chevron=\"\" />\n </button>\n <div id={id} role=\"group\" hidden={!open}>\n {children}\n </div>\n </div>\n );\n}\n\n/** A panel's section heading. */\nexport function MenuLookPanelLabel({ children, ...data }: { children: React.ReactNode } & DataAttributes): React.ReactElement {\n return (\n <div {...data} className={MENU_LOOK_CLASS.sectionLabel}>\n {children}\n </div>\n );\n}\n\n/** The line between a panel's sections. */\nexport function MenuLookPanelSeparator(): React.ReactElement {\n return <div role=\"separator\" className={MENU_LOOK_CLASS.divider} />;\n}\n\n// ── The menu's search ─────────────────────────────────────────────────────────────────────────\n\nexport interface MenuLookSearchProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"className\" | \"style\" | \"size\" | \"type\">,\n DataAttributes {}\n\n/**\n * The menu's search: its own header row (full-bleed, a hairline under it, held at the top while the\n * list scrolls) whose text starts on the rows' left edge. The host owns the value and its keys (stop\n * propagation on letters so the menu's type-ahead never takes them).\n */\nexport const MenuLookSearch = React.forwardRef<HTMLInputElement, MenuLookSearchProps>(function MenuLookSearch(\n { placeholder = \"Search\", ...props },\n ref,\n) {\n return (\n <div className={MENU_LOOK_CLASS.search} data-menu-look-search=\"\">\n <input\n ref={ref}\n type=\"search\"\n autoComplete=\"off\"\n spellCheck={false}\n placeholder={placeholder}\n aria-label={props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X,WACE,oBAAC,SAAI,6BAA0B,IAAG,gBAAa,IAAG,eAAY,QAAQ,GAAG,MACvE,+BAAC,SAAI,WAAW,gBAAgB,MAC9B;AAAA,0BAAC,mBAAgB,MAAY,OAAc;AAAA,MAC3C,oBAAC,wBAAqB,WAAW,gBAAgB,SAAS,eAAY,QAAO,2BAAwB,IAAG;AAAA,OAC1G,GACF;AAAA,EAEJ;AACA,SACE,qBAAC,SAAI,6BAA0B,IAAI,GAAG,MACpC;AAAA,yBAAC,YAAO,MAAK,UAAS,WAAW,gBAAgB,MAAM,iBAAe,MAAM,iBAAe,IAAI,SAAS,QACtG;AAAA,0BAAC,mBAAgB,MAAY,OAAc;AAAA,MAC3C,oBAAC,wBAAqB,WAAW,gBAAgB,SAAS,eAAY,QAAO,2BAAwB,IAAG;AAAA,OAC1G;AAAA,IACA,oBAAC,SAAI,IAAQ,MAAK,SAAQ,QAAQ,CAAC,MAChC,UACH;AAAA,KACF;AAEJ;AAGO,SAAS,mBAAmB,EAAE,UAAU,GAAG,KAAK,GAAuE;AAC5H,SACE,oBAAC,SAAK,GAAG,MAAM,WAAW,gBAAgB,cACvC,UACH;AAEJ;AAGO,SAAS,yBAA6C;AAC3D,SAAO,oBAAC,SAAI,MAAK,aAAY,WAAW,gBAAgB,SAAS;AACnE;AAaO,IAAM,iBAAuB,iBAAkD,SAASC,gBAC7F,EAAE,cAAc,UAAU,GAAG,MAAM,GACnC,KACA;AACA,SACE,oBAAC,SAAI,WAAW,gBAAgB,QAAQ,yBAAsB,IAC5D;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,cAAa;AAAA,MACb,YAAY;AAAA,MACZ;AAAA,MACA,cAAY,MAAM,YAAY,KAAK;AAAA,MAClC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ,CAAC;","names":["MenuLookContent","MenuLookSubContent","MenuLookContextContent","MenuLookContextSubContent","MenuLookItem","MenuLookSubTrigger","MenuLookCheckboxItem","MenuLookRadioItem","MenuLookLabel","MenuLookSeparator","MenuLookPanel","MenuLookPopoverContent","MenuLookPanelItem","MenuLookPanelControlRow","MenuLookSearch"]}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
MENU_LOOK_CLASS,
|
|
4
|
+
MenuLookRowBody
|
|
5
|
+
} from "./chunk-L5OACQXS.js";
|
|
2
6
|
import {
|
|
3
7
|
ARCHIVE_LABEL
|
|
4
8
|
} from "./chunk-VQQ3O7J5.js";
|
|
@@ -203,7 +207,7 @@ function OrganizationPicker({
|
|
|
203
207
|
onSelect,
|
|
204
208
|
onToggleFavorite,
|
|
205
209
|
hideHeading = false,
|
|
206
|
-
|
|
210
|
+
look = "default",
|
|
207
211
|
foldedLabel = "More",
|
|
208
212
|
className,
|
|
209
213
|
more
|
|
@@ -227,7 +231,33 @@ function OrganizationPicker({
|
|
|
227
231
|
const isActive2 = org.id === activeOrganizationId;
|
|
228
232
|
const favorite = isFavorite(org.id);
|
|
229
233
|
return /* @__PURE__ */ jsxs2("li", { role: "none", className: "group/org relative flex items-center", children: [
|
|
230
|
-
/* @__PURE__ */
|
|
234
|
+
look === "menu" ? /* @__PURE__ */ jsx3(
|
|
235
|
+
"button",
|
|
236
|
+
{
|
|
237
|
+
type: "button",
|
|
238
|
+
role: "option",
|
|
239
|
+
"aria-selected": isActive2,
|
|
240
|
+
"aria-pressed": isActive2,
|
|
241
|
+
onClick: (event) => {
|
|
242
|
+
event.stopPropagation();
|
|
243
|
+
onSelect(org);
|
|
244
|
+
},
|
|
245
|
+
className: MENU_LOOK_CLASS.item,
|
|
246
|
+
"data-active": isActive2 ? "" : void 0,
|
|
247
|
+
"data-current": isActive2 ? "" : void 0,
|
|
248
|
+
"data-end-button": onToggleFavorite || favorite ? "" : void 0,
|
|
249
|
+
children: /* @__PURE__ */ jsx3(
|
|
250
|
+
MenuLookRowBody,
|
|
251
|
+
{
|
|
252
|
+
icon: /* @__PURE__ */ jsx3(OrganizationMark, { id: org.id, name: org.name, abbreviation: org.abbreviation, size: 16 }),
|
|
253
|
+
label: org.name,
|
|
254
|
+
description: sharesItsName(org) && org.distinguisher ? org.distinguisher : void 0,
|
|
255
|
+
trail: org.detail ?? void 0,
|
|
256
|
+
current: isActive2
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
}
|
|
260
|
+
) : /* @__PURE__ */ jsxs2(
|
|
231
261
|
"button",
|
|
232
262
|
{
|
|
233
263
|
type: "button",
|
|
@@ -240,8 +270,7 @@ function OrganizationPicker({
|
|
|
240
270
|
},
|
|
241
271
|
className: cn(
|
|
242
272
|
"flex w-full min-w-0 items-center gap-2.5 rounded-md py-1.5 pl-2 pr-8 text-left text-sm text-foreground transition-colors hover:bg-accent",
|
|
243
|
-
isActive2 && "bg-primary/10 font-semibold text-primary-ink ring-1 ring-inset ring-primary/30 hover:bg-primary/15"
|
|
244
|
-
itemClassName
|
|
273
|
+
isActive2 && "bg-primary/10 font-semibold text-primary-ink ring-1 ring-inset ring-primary/30 hover:bg-primary/15"
|
|
245
274
|
),
|
|
246
275
|
"data-active": isActive2 ? "" : void 0,
|
|
247
276
|
children: [
|
|
@@ -735,4 +764,4 @@ export {
|
|
|
735
764
|
CanvasLayout,
|
|
736
765
|
ModeSwitch
|
|
737
766
|
};
|
|
738
|
-
//# sourceMappingURL=chunk-
|
|
767
|
+
//# sourceMappingURL=chunk-MAMZGJJ3.js.map
|