@opencode/ui 2.0.16 → 2.0.18
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.
|
@@ -22,6 +22,10 @@ export interface MenuSubTriggerProps extends ComponentProps<typeof DropdownMenu.
|
|
|
22
22
|
shortcut?: JSX.Element | string;
|
|
23
23
|
badge?: JSX.Element | string;
|
|
24
24
|
}
|
|
25
|
+
export interface MenuSubProps extends ComponentProps<typeof DropdownMenu.Sub> {
|
|
26
|
+
placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
27
|
+
}
|
|
28
|
+
declare function MenuSub(props: MenuSubProps): JSX.Element;
|
|
25
29
|
declare function MenuSubTrigger(props: ParentProps<MenuSubTriggerProps>): JSX.Element;
|
|
26
30
|
declare function MenuSubContent(props: ComponentProps<typeof DropdownMenu.SubContent>): JSX.Element;
|
|
27
31
|
declare function MenuGroupLabel(props: ComponentProps<typeof DropdownMenu.GroupLabel>): JSX.Element;
|
|
@@ -47,7 +51,7 @@ export declare const Menu: typeof MenuRoot & {
|
|
|
47
51
|
Group: typeof import("@kobalte/core/context-menu").Group;
|
|
48
52
|
GroupLabel: typeof MenuGroupLabel;
|
|
49
53
|
Separator: typeof MenuSeparator;
|
|
50
|
-
Sub: typeof
|
|
54
|
+
Sub: typeof MenuSub;
|
|
51
55
|
SubTrigger: typeof MenuSubTrigger;
|
|
52
56
|
SubContent: typeof MenuSubContent;
|
|
53
57
|
Context: typeof MenuContextRoot & {
|
package/package.json
CHANGED
|
@@ -155,6 +155,26 @@ export interface MenuSubTriggerProps extends ComponentProps<typeof DropdownMenu.
|
|
|
155
155
|
badge?: JSX.Element | string
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
export interface MenuSubProps extends ComponentProps<typeof DropdownMenu.Sub> {
|
|
159
|
+
placement?:
|
|
160
|
+
| "top"
|
|
161
|
+
| "top-start"
|
|
162
|
+
| "top-end"
|
|
163
|
+
| "bottom"
|
|
164
|
+
| "bottom-start"
|
|
165
|
+
| "bottom-end"
|
|
166
|
+
| "left"
|
|
167
|
+
| "left-start"
|
|
168
|
+
| "left-end"
|
|
169
|
+
| "right"
|
|
170
|
+
| "right-start"
|
|
171
|
+
| "right-end"
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function MenuSub(props: MenuSubProps) {
|
|
175
|
+
return <DropdownMenu.Sub {...props} />
|
|
176
|
+
}
|
|
177
|
+
|
|
158
178
|
function MenuSubTrigger(props: ParentProps<MenuSubTriggerProps>) {
|
|
159
179
|
const ctx = useMenuContext()
|
|
160
180
|
const [s, r] = splitProps(props, ["class", "classList", "children", "shortcut", "badge"])
|
|
@@ -282,7 +302,7 @@ export const Menu = Object.assign(MenuRoot, {
|
|
|
282
302
|
Group: DropdownMenu.Group,
|
|
283
303
|
GroupLabel: MenuGroupLabel,
|
|
284
304
|
Separator: MenuSeparator,
|
|
285
|
-
Sub:
|
|
305
|
+
Sub: MenuSub,
|
|
286
306
|
SubTrigger: MenuSubTrigger,
|
|
287
307
|
SubContent: MenuSubContent,
|
|
288
308
|
Context: MenuContext,
|