mtrl 0.8.0-next.7 → 0.8.0-next.8
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/index.d.ts +1 -0
- package/dist/components/snackbar/index.d.ts +1 -0
- package/dist/components/snackbar/snackbar.d.ts +9 -0
- package/dist/components/snackbar/types.d.ts +2 -0
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +5 -5
- package/dist/index.js +12 -12
- package/dist/index.js.map +5 -5
- package/dist/package.json +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
|
@@ -35,6 +35,7 @@ export { createSegment } from "./segmented-button/segment";
|
|
|
35
35
|
export { default as createSheet } from "./sheet";
|
|
36
36
|
export { default as createSlider } from "./slider";
|
|
37
37
|
export { default as createSnackbar } from "./snackbar";
|
|
38
|
+
export { clearSnackbars } from "./snackbar";
|
|
38
39
|
export { default as createSwitch } from "./switch";
|
|
39
40
|
export { default as createTabs } from "./tabs";
|
|
40
41
|
export { createTab } from "./tabs/tab";
|
|
@@ -5,4 +5,13 @@ import { SnackbarConfig, SnackbarComponent } from './types';
|
|
|
5
5
|
* @returns {SnackbarComponent} Snackbar component instance
|
|
6
6
|
*/
|
|
7
7
|
declare const createSnackbar: (config: SnackbarConfig) => SnackbarComponent;
|
|
8
|
+
/**
|
|
9
|
+
* Dismisses the snackbar on screen and drops the ones still waiting.
|
|
10
|
+
*
|
|
11
|
+
* Messages belong to the thing that raised them: a drawer that closes, an
|
|
12
|
+
* account that signs out. Without this the queue outlives them, so a message
|
|
13
|
+
* about a list nobody is looking at any more stays on screen, and, because the
|
|
14
|
+
* queue shows one at a time, the next message waits behind it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const clearSnackbars: () => void;
|
|
8
17
|
export default createSnackbar;
|
|
@@ -177,6 +177,8 @@ export interface QueuedSnackbar {
|
|
|
177
177
|
_show: () => void;
|
|
178
178
|
/** Visually dismisses the snackbar without advancing the queue */
|
|
179
179
|
_hide?: () => void;
|
|
180
|
+
/** The snackbar's own element, so the queue can tell whether it is still on screen */
|
|
181
|
+
element?: HTMLElement;
|
|
180
182
|
on: (event: string, handler: () => void) => void;
|
|
181
183
|
off: (event: string, handler: () => void) => void;
|
|
182
184
|
}
|