mtrl 0.8.0-next.28 → 0.8.0-next.30
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/components/menu/index.d.ts +1 -1
- package/dist/components/menu/types.d.ts +24 -2
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +11 -11
- package/dist/index.js.map +3 -3
- package/dist/package.json +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
- package/src/styles/components/_menu.scss +89 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @category Components
|
|
9
9
|
*/
|
|
10
10
|
export { default } from './menu';
|
|
11
|
-
export type { MenuConfig, MenuComponent, MenuItem, MenuDivider, MenuContent, MenuEvent, MenuSelectEvent, MenuPosition } from './types';
|
|
11
|
+
export type { MenuConfig, MenuComponent, MenuItem, MenuDivider, MenuGap, MenuContent, MenuEvent, MenuSelectEvent, MenuPosition } from './types';
|
|
12
12
|
/**
|
|
13
13
|
* Constants for menu position values - use these instead of string literals
|
|
14
14
|
* for better code completion and type safety.
|
|
@@ -103,11 +103,33 @@ export interface MenuDivider {
|
|
|
103
103
|
id?: string;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* Menu item type for a gap between groups.
|
|
107
|
+
*
|
|
108
|
+
* The M3 expressive vertical menu separates groups two ways: a divider line,
|
|
109
|
+
* or a gap. A gap splits the menu into separate surfaces, each with its own
|
|
110
|
+
* rounded container, rather than drawing a line across one surface
|
|
111
|
+
* (m3.material.io/components/menus, vertical menus).
|
|
112
|
+
*
|
|
113
|
+
* A standard menu is a single surface, so a gap there is simply space.
|
|
114
|
+
*
|
|
115
|
+
* @category Components
|
|
116
|
+
*/
|
|
117
|
+
export interface MenuGap {
|
|
118
|
+
/**
|
|
119
|
+
* Type must be 'gap' to differentiate from regular menu items
|
|
120
|
+
*/
|
|
121
|
+
type: "gap";
|
|
122
|
+
/**
|
|
123
|
+
* Optional ID for the gap (for accessibility)
|
|
124
|
+
*/
|
|
125
|
+
id?: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Combined type for menu content items (regular items, dividers or gaps)
|
|
107
129
|
*
|
|
108
130
|
* @category Components
|
|
109
131
|
*/
|
|
110
|
-
export type MenuContent = MenuItem | MenuDivider;
|
|
132
|
+
export type MenuContent = MenuItem | MenuDivider | MenuGap;
|
|
111
133
|
/**
|
|
112
134
|
* Configuration interface for the Menu component
|
|
113
135
|
*
|