UNPKG

4 kBJavaScriptView Raw
1/**
2 * @license
3 * Copyright 2016 Google Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE.
22 */
23export var cssClasses = {
24 CLOSING: 'mdc-dialog--closing',
25 OPEN: 'mdc-dialog--open',
26 OPENING: 'mdc-dialog--opening',
27 SCROLLABLE: 'mdc-dialog--scrollable',
28 SCROLL_LOCK: 'mdc-dialog-scroll-lock',
29 STACKED: 'mdc-dialog--stacked',
30 FULLSCREEN: 'mdc-dialog--fullscreen',
31 // Class for showing a scroll divider on full-screen dialog header element.
32 // Should only be displayed on scrollable content, when the dialog content is
33 // scrolled "underneath" the header.
34 SCROLL_DIVIDER_HEADER: 'mdc-dialog-scroll-divider-header',
35 // Class for showing a scroll divider on a full-screen dialog footer element.
36 // Should only be displayed on scrolalble content, when the dialog content is
37 // obscured "underneath" the footer.
38 SCROLL_DIVIDER_FOOTER: 'mdc-dialog-scroll-divider-footer',
39 // The "surface scrim" is a scrim covering only the surface of a dialog. This
40 // is used in situations where a confirmation dialog is shown over an already
41 // opened full-screen dialog. On larger screen-sizes, the full-screen dialog
42 // is sized as a modal and so in these situations we display a "surface scrim"
43 // to prevent a "double scrim" (where the scrim from the secondary
44 // confirmation dialog would overlap with the scrim from the full-screen
45 // dialog).
46 SURFACE_SCRIM_SHOWN: 'mdc-dialog__surface-scrim--shown',
47 // "Showing" animating class for the surface-scrim.
48 SURFACE_SCRIM_SHOWING: 'mdc-dialog__surface-scrim--showing',
49 // "Hiding" animating class for the surface-scrim.
50 SURFACE_SCRIM_HIDING: 'mdc-dialog__surface-scrim--hiding',
51 // Class to hide a dialog's scrim (used in conjunction with a surface-scrim).
52 // Note that we only hide the original scrim rather than removing it entirely
53 // to prevent interactions with the content behind this scrim, and to capture
54 // scrim clicks.
55 SCRIM_HIDDEN: 'mdc-dialog__scrim--hidden',
56};
57export var strings = {
58 ACTION_ATTRIBUTE: 'data-mdc-dialog-action',
59 BUTTON_DEFAULT_ATTRIBUTE: 'data-mdc-dialog-button-default',
60 BUTTON_SELECTOR: '.mdc-dialog__button',
61 CLOSED_EVENT: 'MDCDialog:closed',
62 CLOSE_ACTION: 'close',
63 CLOSING_EVENT: 'MDCDialog:closing',
64 CONTAINER_SELECTOR: '.mdc-dialog__container',
65 CONTENT_SELECTOR: '.mdc-dialog__content',
66 DESTROY_ACTION: 'destroy',
67 INITIAL_FOCUS_ATTRIBUTE: 'data-mdc-dialog-initial-focus',
68 OPENED_EVENT: 'MDCDialog:opened',
69 OPENING_EVENT: 'MDCDialog:opening',
70 SCRIM_SELECTOR: '.mdc-dialog__scrim',
71 SUPPRESS_DEFAULT_PRESS_SELECTOR: [
72 'textarea',
73 '.mdc-menu .mdc-list-item',
74 '.mdc-menu .mdc-deprecated-list-item',
75 ].join(', '),
76 SURFACE_SELECTOR: '.mdc-dialog__surface',
77};
78export var numbers = {
79 DIALOG_ANIMATION_CLOSE_TIME_MS: 75,
80 DIALOG_ANIMATION_OPEN_TIME_MS: 150,
81};
82//# sourceMappingURL=constants.js.map
\No newline at end of file