mtrl 0.8.0-next.24 → 0.8.0-next.26
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/dialog/types.d.ts +1 -1
- package/dist/components/drawer/types.d.ts +1 -1
- package/dist/components/index.d.ts +0 -6
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/types.d.ts +9 -31
- package/dist/components/progress/types.d.ts +2 -2
- package/dist/components/sheet/sheet.d.ts +0 -12
- package/dist/components/sheet/types.d.ts +0 -8
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +9 -23
- package/dist/index.js +13 -13
- package/dist/index.js.map +9 -23
- package/dist/package.json +1 -1
- package/dist/styles.css +2 -2
- package/package.json +2 -1
- package/src/styles/components/_card.scss +19 -78
- package/src/styles/components/_menu.scss +3 -89
- package/src/styles/main.scss +0 -2
- package/dist/components/bottom-sheet/api.d.ts +0 -43
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -24
- package/dist/components/bottom-sheet/config.d.ts +0 -34
- package/dist/components/bottom-sheet/constants.d.ts +0 -65
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -32
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/bottom-sheet/index.d.ts +0 -2
- package/dist/components/bottom-sheet/types.d.ts +0 -116
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/side-sheet/api.d.ts +0 -33
- package/dist/components/side-sheet/config.d.ts +0 -34
- package/dist/components/side-sheet/constants.d.ts +0 -60
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/side-sheet/index.d.ts +0 -2
- package/dist/components/side-sheet/side-sheet.d.ts +0 -24
- package/dist/components/side-sheet/types.d.ts +0 -102
- package/src/styles/components/_bottom-sheet.scss +0 -167
- package/src/styles/components/_side-sheet.scss +0 -175
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { default as createBadge } from "./badge";
|
|
11
11
|
export { default as createBottomAppBar } from "./bottom-app-bar";
|
|
12
|
-
export { default as createBottomSheet } from "./bottom-sheet";
|
|
13
|
-
export { default as createSideSheet } from "./side-sheet";
|
|
14
12
|
export { default as createButton } from "./button";
|
|
15
13
|
export { default as createButtonGroup } from "./button-group";
|
|
16
14
|
export { default as createCard } from "./card";
|
|
@@ -36,7 +34,6 @@ export { default as createSearch } from "./search";
|
|
|
36
34
|
export { default as createSelect } from "./select";
|
|
37
35
|
export { default as createSegmentedButton } from "./segmented-button";
|
|
38
36
|
export { createSegment } from "./segmented-button/segment";
|
|
39
|
-
/** @deprecated Since 0.8.0. Use createBottomSheet or createSideSheet. */
|
|
40
37
|
export { default as createSheet } from "./sheet";
|
|
41
38
|
export { default as createSlider } from "./slider";
|
|
42
39
|
export { default as createSnackbar } from "./snackbar";
|
|
@@ -51,8 +48,6 @@ export { default as createTooltip } from "./tooltip";
|
|
|
51
48
|
export { createCardContent, createCardHeader, createCardActions, createCardMedia, } from "./card/content";
|
|
52
49
|
export type { BadgeConfig, BadgeComponent } from "./badge/types";
|
|
53
50
|
export type { BottomAppBarConfig, BottomAppBar } from "./bottom-app-bar/types";
|
|
54
|
-
export type { BottomSheetConfig, BottomSheetComponent, BottomSheetVariant, BottomSheetState, BottomSheetStateEvent, BottomSheetEventHandlers, } from "./bottom-sheet/types";
|
|
55
|
-
export type { SideSheetConfig, SideSheetComponent, SideSheetVariant, SideSheetPosition, SideSheetEventHandlers, } from "./side-sheet/types";
|
|
56
51
|
export type { ButtonConfig, ButtonComponent, ButtonVariant, } from "./button/types";
|
|
57
52
|
export type { ButtonGroupConfig, ButtonGroupComponent, ButtonGroupItemConfig, ButtonGroupEvent, ButtonGroupEventType, ButtonGroupVariant, ButtonGroupOrientation, ButtonGroupDensity, } from "./button-group/types";
|
|
58
53
|
export type { CardSchema } from "./card/types";
|
|
@@ -76,7 +71,6 @@ export type { RadiosConfig, RadiosComponent, RadioOptionConfig, } from "./radios
|
|
|
76
71
|
export type { SearchConfig, SearchComponent } from "./search/types";
|
|
77
72
|
export type { SelectConfig, SelectComponent, SelectOption, SelectEvent, SelectChangeEvent, } from "./select/types";
|
|
78
73
|
export type { SegmentedButtonConfig, SegmentedButtonComponent, } from "./segmented-button/types";
|
|
79
|
-
/** @deprecated Since 0.8.0. Use the BottomSheet or SideSheet types. */
|
|
80
74
|
export type { SheetConfig, SheetComponent } from "./sheet/types";
|
|
81
75
|
export type { SliderConfig, SliderComponent, SliderEvent, } from "./slider/types";
|
|
82
76
|
export type { SnackbarConfig, SnackbarComponent } from "./snackbar/types";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @category Components
|
|
9
9
|
*/
|
|
10
10
|
export { default } from './menu';
|
|
11
|
-
export type { MenuConfig, MenuComponent, MenuItem, MenuDivider,
|
|
11
|
+
export type { MenuConfig, MenuComponent, MenuItem, MenuDivider, 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,33 +103,11 @@ export interface MenuDivider {
|
|
|
103
103
|
id?: string;
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
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)
|
|
106
|
+
* Combined type for menu content items (regular items or dividers)
|
|
129
107
|
*
|
|
130
108
|
* @category Components
|
|
131
109
|
*/
|
|
132
|
-
export type MenuContent = MenuItem | MenuDivider
|
|
110
|
+
export type MenuContent = MenuItem | MenuDivider;
|
|
133
111
|
/**
|
|
134
112
|
* Configuration interface for the Menu component
|
|
135
113
|
*
|
|
@@ -151,11 +129,15 @@ export interface MenuConfig {
|
|
|
151
129
|
* Array of menu items and dividers to display
|
|
152
130
|
*/
|
|
153
131
|
items: MenuContent[];
|
|
132
|
+
/**
|
|
133
|
+
* Position of the menu relative to the opener
|
|
134
|
+
* @default 'bottom-start'
|
|
135
|
+
*/
|
|
154
136
|
/**
|
|
155
137
|
* Menu variant. `'vertical'` is the M3 expressive menu: a rounded
|
|
156
138
|
* container holding items that sit apart and change shape as they are
|
|
157
|
-
* hovered, focused, pressed or selected.
|
|
158
|
-
*
|
|
139
|
+
* hovered, focused, pressed or selected. Defaults to `'baseline'`, the
|
|
140
|
+
* original M3 menu.
|
|
159
141
|
*/
|
|
160
142
|
variant?: MenuVariant;
|
|
161
143
|
/**
|
|
@@ -163,10 +145,6 @@ export interface MenuConfig {
|
|
|
163
145
|
* and more prominent, so it should be used sparingly.
|
|
164
146
|
*/
|
|
165
147
|
color?: MenuColor;
|
|
166
|
-
/**
|
|
167
|
-
* Position of the menu relative to the opener
|
|
168
|
-
* @default 'bottom-start'
|
|
169
|
-
*/
|
|
170
148
|
position?: MenuPosition;
|
|
171
149
|
/**
|
|
172
150
|
* Whether the menu should close when an item is clicked
|
|
@@ -205,7 +183,7 @@ export interface MenuConfig {
|
|
|
205
183
|
maxHeight?: string;
|
|
206
184
|
/**
|
|
207
185
|
* Optional offset from the opener (in pixels)
|
|
208
|
-
* @default
|
|
186
|
+
* @default 8
|
|
209
187
|
*/
|
|
210
188
|
offset?: number;
|
|
211
189
|
/**
|
|
@@ -55,7 +55,7 @@ export interface ProgressConfig {
|
|
|
55
55
|
/**
|
|
56
56
|
* Thickness of the progress track and indicator
|
|
57
57
|
* Can be a named preset ('thin', 'default', 'thick') or a specific number in pixels
|
|
58
|
-
* @default '
|
|
58
|
+
* @default 'default'
|
|
59
59
|
*/
|
|
60
60
|
thickness?: ProgressThickness;
|
|
61
61
|
/**
|
|
@@ -109,7 +109,7 @@ export interface ProgressConfig {
|
|
|
109
109
|
/**
|
|
110
110
|
* Size of the circular progress indicator in dp (only for circular variant)
|
|
111
111
|
* Clamped between 24 and 240
|
|
112
|
-
* @default
|
|
112
|
+
* @default 50
|
|
113
113
|
*/
|
|
114
114
|
size?: number;
|
|
115
115
|
}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { SheetConfig } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Creates a new Sheet component
|
|
4
|
-
*
|
|
5
|
-
* @deprecated Since 0.8.0. Use {@link createBottomSheet} for a sheet anchored
|
|
6
|
-
* to the bottom edge, or {@link createSideSheet} for one docked to a vertical
|
|
7
|
-
* edge. Those follow the M3 bottom sheet and side sheet specifications, which
|
|
8
|
-
* this component predates and does not match.
|
|
9
|
-
*
|
|
10
|
-
* This component is also broken: `open()`, `close()` and the drag gestures
|
|
11
|
-
* call `component.events.emit(...)`, but it composes the event feature that
|
|
12
|
-
* provides `emit` directly and no `events` object, so every one of them
|
|
13
|
-
* throws. Its scrim is never inserted into the page either. It is kept only so
|
|
14
|
-
* that existing imports keep resolving, and it will be removed.
|
|
15
|
-
*
|
|
16
4
|
* @param {SheetConfig} config - Sheet configuration object
|
|
17
5
|
* @returns {SheetComponent} Sheet component instance
|
|
18
6
|
*/
|
|
@@ -24,10 +24,6 @@ export declare const SHEET_EVENTS: {
|
|
|
24
24
|
readonly DRAG_START: "dragstart";
|
|
25
25
|
readonly DRAG_END: "dragend";
|
|
26
26
|
};
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated Since 0.8.0. Use BottomSheetConfig or SideSheetConfig.
|
|
29
|
-
* The sheet component this belongs to does not open: see createSheet.
|
|
30
|
-
*/
|
|
31
27
|
/**
|
|
32
28
|
* Configuration interface for the Sheet component
|
|
33
29
|
* @category Components
|
|
@@ -150,10 +146,6 @@ export interface TitleAPI {
|
|
|
150
146
|
*/
|
|
151
147
|
getElement: () => HTMLElement | null;
|
|
152
148
|
}
|
|
153
|
-
/**
|
|
154
|
-
* @deprecated Since 0.8.0. Use BottomSheetComponent or SideSheetComponent.
|
|
155
|
-
* The sheet component this belongs to does not open: see createSheet.
|
|
156
|
-
*/
|
|
157
149
|
/**
|
|
158
150
|
* Sheet component interface
|
|
159
151
|
* @category Components
|