@yamada-ui/menu 0.2.7 → 0.2.10
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/dist/index.d.mts +10 -0
- package/dist/menu-button.d.mts +7 -0
- package/dist/menu-divider.d.mts +7 -0
- package/dist/menu-group.d.mts +7 -0
- package/dist/menu-item.d.mts +58 -0
- package/dist/menu-list.d.mts +7 -0
- package/dist/menu-option-group.d.mts +29 -0
- package/dist/menu.d.mts +2139 -0
- package/package.json +9 -9
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Menu, MenuProps } from './menu.mjs';
|
|
2
|
+
export { MenuButton, MenuButtonProps } from './menu-button.mjs';
|
|
3
|
+
export { MenuList, MenuListProps } from './menu-list.mjs';
|
|
4
|
+
export { MenuItem, MenuItemProps, MenuOptionItem, MenuOptionItemProps } from './menu-item.mjs';
|
|
5
|
+
export { MenuGroup, MenuGroupProps } from './menu-group.mjs';
|
|
6
|
+
export { MenuOptionGroup, MenuOptionGroupProps } from './menu-option-group.mjs';
|
|
7
|
+
export { MenuDivider, MenuDividerProps } from './menu-divider.mjs';
|
|
8
|
+
import '@yamada-ui/core';
|
|
9
|
+
import '@yamada-ui/popover';
|
|
10
|
+
import 'react';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
|
|
4
|
+
type MenuButtonProps = HTMLUIProps<'button'>;
|
|
5
|
+
declare const MenuButton: _yamada_ui_core.Component<"button", MenuButtonProps>;
|
|
6
|
+
|
|
7
|
+
export { MenuButton, MenuButtonProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
|
|
4
|
+
type MenuDividerProps = HTMLUIProps<'hr'>;
|
|
5
|
+
declare const MenuDivider: _yamada_ui_core.Component<_yamada_ui_core.As, object>;
|
|
6
|
+
|
|
7
|
+
export { MenuDivider, MenuDividerProps };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
type MenuItemOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, the menu item will be disabled.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If `true`, the menu item will be focusable.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
isFocusable?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* If `true`, the list element will be closed when selected.
|
|
20
|
+
*
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
closeOnSelect?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The menu item icon to use.
|
|
26
|
+
*/
|
|
27
|
+
icon?: ReactElement;
|
|
28
|
+
/**
|
|
29
|
+
* Right-aligned label text content, useful for displaying hotkeys.
|
|
30
|
+
*/
|
|
31
|
+
command?: string;
|
|
32
|
+
};
|
|
33
|
+
type MenuItemProps = HTMLUIProps<'button'> & MenuItemOptions;
|
|
34
|
+
declare const MenuItem: _yamada_ui_core.Component<"button", MenuItemProps>;
|
|
35
|
+
type MenuOptionItemOptions = {
|
|
36
|
+
/**
|
|
37
|
+
* The menu option item icon to use.
|
|
38
|
+
*/
|
|
39
|
+
icon?: ReactElement | null;
|
|
40
|
+
/**
|
|
41
|
+
* The value of the menu option item.
|
|
42
|
+
*/
|
|
43
|
+
value?: string;
|
|
44
|
+
/**
|
|
45
|
+
* If `true`, the checkbox or radio will be checked.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
isChecked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The type of the menu option item.
|
|
52
|
+
*/
|
|
53
|
+
type?: 'radio' | 'checkbox';
|
|
54
|
+
};
|
|
55
|
+
type MenuOptionItemProps = Omit<MenuItemProps, 'icon' | 'command'> & MenuOptionItemOptions;
|
|
56
|
+
declare const MenuOptionItem: _yamada_ui_core.Component<"button", MenuOptionItemProps>;
|
|
57
|
+
|
|
58
|
+
export { MenuItem, MenuItemProps, MenuOptionItem, MenuOptionItemProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _yamada_ui_core from '@yamada-ui/core';
|
|
2
|
+
import { HTMLUIProps } from '@yamada-ui/core';
|
|
3
|
+
|
|
4
|
+
type MenuListProps = HTMLUIProps<'section'>;
|
|
5
|
+
declare const MenuList: _yamada_ui_core.Component<"section", MenuListProps>;
|
|
6
|
+
|
|
7
|
+
export { MenuList, MenuListProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HTMLUIProps, ComponentArgs } from '@yamada-ui/core';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
|
|
4
|
+
type MenuOptionGroupOptions<Y extends string | string[] = string> = {
|
|
5
|
+
/**
|
|
6
|
+
* The value of the menu item group.
|
|
7
|
+
*/
|
|
8
|
+
value?: Y;
|
|
9
|
+
/**
|
|
10
|
+
* The initial value of the menu item group.
|
|
11
|
+
*/
|
|
12
|
+
defaultValue?: Y;
|
|
13
|
+
/**
|
|
14
|
+
* The type of the menu option group.
|
|
15
|
+
*
|
|
16
|
+
* @default 'checkbox'
|
|
17
|
+
*/
|
|
18
|
+
type?: 'radio' | 'checkbox';
|
|
19
|
+
/**
|
|
20
|
+
* The callback fired when any children checkbox is checked or unchecked.
|
|
21
|
+
*/
|
|
22
|
+
onChange?: (value: Y) => void;
|
|
23
|
+
};
|
|
24
|
+
type MenuOptionGroupProps<Y extends string | string[] = string> = Omit<HTMLUIProps<'div'>, keyof MenuOptionGroupOptions> & MenuOptionGroupOptions<Y>;
|
|
25
|
+
declare const MenuOptionGroup: (<Y extends string | string[] = string>(props: Omit<HTMLUIProps<"div">, keyof MenuOptionGroupOptions<string>> & MenuOptionGroupOptions<Y> & {
|
|
26
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
27
|
+
}) => JSX.Element) & ComponentArgs;
|
|
28
|
+
|
|
29
|
+
export { MenuOptionGroup, MenuOptionGroupProps };
|