@shortfuse/materialdesignweb 0.0.9 → 0.4.0
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/.browserslistrc +3 -0
- package/.eslintrc.json +146 -27
- package/.stylelintrc.json +598 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/.vscode/tasks.json +19 -10
- package/CHANGELOG.md +24 -0
- package/README.md +84 -2
- package/adapters/datatable/column.js +203 -0
- package/adapters/datatable/index.js +972 -0
- package/adapters/dom/index.js +601 -0
- package/adapters/list/index.js +69 -0
- package/adapters/search/index.js +521 -0
- package/components/appbar/_spec.scss +225 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +118 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +85 -0
- package/components/bottomnav/_spec.scss +157 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +122 -0
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +89 -0
- package/components/{core/button → button}/README.md +16 -22
- package/components/button/_spec.scss +161 -0
- package/components/button/_theme.scss +65 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +43 -0
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +249 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +134 -0
- package/components/chip/_theme.scss +177 -0
- package/components/chip/index.js +21 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +288 -0
- package/components/datatable/_theme.scss +154 -0
- package/components/datatable/cell.js +45 -0
- package/components/datatable/columnheader.js +47 -0
- package/components/datatable/index.js +388 -0
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +49 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +213 -0
- package/components/dialog/_theme.scss +0 -0
- package/components/dialog/index.js +627 -0
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +13 -0
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +2 -0
- package/components/elevation/_spec.scss +9 -0
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +2 -0
- package/components/fab/_spec.scss +222 -0
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +103 -0
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +312 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +33 -0
- package/components/layout/_spec.scss +1012 -0
- package/components/layout/_theme.scss +44 -0
- package/components/layout/index.js +464 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +397 -0
- package/components/list/_theme.scss +111 -0
- package/components/list/content.js +110 -0
- package/components/list/index.js +260 -0
- package/components/list/index.scss +2 -0
- package/components/list/item.js +170 -0
- package/components/list/secondary.js +46 -0
- package/components/menu/_spec.scss +362 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +721 -0
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +239 -0
- package/components/{core/progress/style.scss → progress/_spec.scss} +36 -25
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +36 -0
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +386 -0
- package/components/selection/_theme.scss +166 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +76 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +56 -0
- package/components/selection/radiogroup.js +47 -0
- package/components/slider/_spec.scss +64 -0
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +195 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +344 -0
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +235 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +205 -0
- package/components/tab/index.js +260 -0
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +89 -0
- package/components/tab/list.js +210 -0
- package/components/tab/panel.js +54 -0
- package/components/template/_theme.scss +27 -0
- package/components/{core/textfield → textfield}/README.md +70 -50
- package/components/textfield/_mixins.scss +52 -0
- package/components/textfield/_spec.scss +809 -0
- package/components/textfield/_theme.scss +299 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +168 -0
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +188 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +224 -0
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +2 -0
- package/core/_breakpoint.scss +189 -0
- package/core/_elevation.scss +38 -0
- package/core/_length.scss +9 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +34 -0
- package/core/_type.scss +127 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +50 -0
- package/core/aria/keyboard.js +93 -0
- package/core/aria/rovingtabindex.js +178 -0
- package/core/aria/tab.js +60 -0
- package/core/color/_spec.scss +0 -0
- package/core/color/_theme.scss +390 -0
- package/core/color/index.scss +2 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +271 -0
- package/core/overlay/_spec.scss +31 -0
- package/core/overlay/_theme.scss +171 -0
- package/core/overlay/index.js +108 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +197 -0
- package/core/ripple/_theme.scss +40 -0
- package/core/ripple/index.js +294 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_config.scss +2 -0
- package/core/theme/_mixins.scss +172 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -150
- package/core/theme/_variables.scss +24 -0
- package/core/theme/index.js +50 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +468 -0
- package/docs/_flex.scss +22 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_mixins.pug +155 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +29 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +149 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +93 -0
- package/docs/_storage.js +33 -0
- package/docs/docs.scss +295 -0
- package/docs/index.eta +16 -0
- package/docs/index.js +0 -0
- package/docs/pages/appbar.eta +114 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/appbar.pug +78 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +115 -0
- package/docs/pages/bottomnav.pug +137 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/button.pug +121 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +177 -0
- package/docs/pages/card.pug +74 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +82 -0
- package/docs/pages/chip.pug +91 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +262 -0
- package/docs/pages/color.pug +121 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +164 -0
- package/docs/pages/datatable.pug +283 -0
- package/docs/pages/dialog.eta +186 -0
- package/docs/pages/dialog.js +177 -0
- package/docs/pages/dialog.pug +132 -0
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +143 -0
- package/docs/pages/dom.pug +22 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/elevation.pug +25 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/pages/fab.js +44 -0
- package/docs/pages/fab.pug +66 -0
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/grid.pug +95 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/layout.pug +7 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +9 -0
- package/docs/pages/list.pug +326 -0
- package/docs/pages/menu.eta +276 -0
- package/docs/pages/menu.js +217 -0
- package/docs/pages/menu.pug +205 -0
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +4 -0
- package/docs/pages/overlay.pug +55 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/pages/progress.js +12 -0
- package/docs/pages/progress.pug +16 -0
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +4 -0
- package/docs/pages/ripple.pug +21 -0
- package/docs/pages/search.eta +246 -0
- package/docs/pages/search.js +243 -0
- package/docs/pages/search.pug +165 -0
- package/docs/pages/selection.eta +111 -0
- package/docs/pages/selection.js +13 -0
- package/docs/pages/selection.pug +74 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/slider.pug +17 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/pages/snackbar.js +158 -0
- package/docs/pages/snackbar.pug +60 -0
- package/docs/pages/tab.eta +421 -0
- package/docs/pages/tab.js +151 -0
- package/docs/pages/tab.pug +304 -0
- package/docs/pages/textfield.eta +486 -0
- package/docs/pages/textfield.js +254 -0
- package/docs/pages/textfield.pug +360 -0
- package/docs/pages/tooltip.eta +94 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/tooltip.pug +78 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +54 -0
- package/docs/pages/transition.pug +76 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/pages/type.pug +29 -0
- package/docs/postrender.js +39 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_dialogs.pug +96 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/_menus.pug +11 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +480 -0
- package/docs/pwa/pwa.js +306 -0
- package/docs/pwa/pwa.pug +325 -0
- package/docs/pwa/pwa.scss +26 -0
- package/docs/spec.scss +26 -0
- package/docs/themes/_component-themes.scss +26 -0
- package/docs/themes/theme-colored-fallbacks.scss +17 -0
- package/docs/themes/theme-colored.scss +17 -0
- package/docs/themes/theme-default-fallbacks.scss +17 -0
- package/docs/themes/theme-default.scss +17 -0
- package/jsconfig.json +4 -2
- package/package.json +43 -28
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/utils/function.js +3 -0
- package/webpack.config.cjs +257 -0
- package/components/_index.scss +0 -4
- package/components/all-components.scss +0 -14
- package/components/common/functions.scss +0 -173
- package/components/common/mixins.scss +0 -107
- package/components/common/motion.scss +0 -36
- package/components/common/ripple.scss +0 -92
- package/components/common/variables.scss +0 -48
- package/components/complex/dialog/style.scss +0 -159
- package/components/complex/dialog/theming.scss +0 -29
- package/components/complex/navdrawer/style.scss +0 -477
- package/components/complex/navdrawer/theming.scss +0 -58
- package/components/complex/search/index.js +0 -492
- package/components/core/bottomnav/README.md +0 -85
- package/components/core/bottomnav/index.js +0 -140
- package/components/core/bottomnav/style.scss +0 -173
- package/components/core/bottomnav/theming.scss +0 -42
- package/components/core/button/index.js +0 -52
- package/components/core/button/style.scss +0 -283
- package/components/core/button/theming.scss +0 -131
- package/components/core/list/index.js +0 -94
- package/components/core/list/style.scss +0 -269
- package/components/core/list/theming.scss +0 -74
- package/components/core/menu/index.js +0 -127
- package/components/core/menu/style.scss +0 -239
- package/components/core/menu/theming.scss +0 -55
- package/components/core/progress/index.js +0 -33
- package/components/core/selection/style.scss +0 -249
- package/components/core/selection/theming.scss +0 -49
- package/components/core/switch/style.scss +0 -3
- package/components/core/tab/index.js +0 -174
- package/components/core/tab/style.scss +0 -202
- package/components/core/tab/theming.scss +0 -43
- package/components/core/textfield/index.js +0 -169
- package/components/core/textfield/style.scss +0 -672
- package/components/core/textfield/theming.scss +0 -262
- package/components/core/toolbar/style.scss +0 -109
- package/components/core/toolbar/theming.scss +0 -28
- package/components/core/tooltip/style.scss +0 -127
- package/components/core/type/style.scss +0 -133
- package/components/core/type/theming.scss +0 -25
- package/components/index.js +0 -24
- package/components/template/theming.scss +0 -31
- package/components/theming/theming.scss +0 -504
- package/docs/bottomnav.html +0 -171
- package/docs/bottomnav.min.js +0 -383
- package/docs/button.html +0 -322
- package/docs/button.min.js +0 -251
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -83
- package/docs/dialog.html +0 -103
- package/docs/dialog.min.js +0 -160
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -83
- package/docs/index.html +0 -55
- package/docs/index.min.js +0 -83
- package/docs/list.html +0 -442
- package/docs/list.min.js +0 -312
- package/docs/menu.html +0 -185
- package/docs/menu.min.js +0 -370
- package/docs/navdrawer.html +0 -199
- package/docs/navdrawer.min.js +0 -244
- package/docs/progress.html +0 -75
- package/docs/progress.min.js +0 -162
- package/docs/search.html +0 -230
- package/docs/search.min.js +0 -1202
- package/docs/selection.html +0 -188
- package/docs/selection.min.js +0 -160
- package/docs/src/complex/dialog.js +0 -3
- package/docs/src/complex/dialog.pug +0 -44
- package/docs/src/complex/navdrawer.js +0 -82
- package/docs/src/complex/navdrawer.pug +0 -109
- package/docs/src/complex/search.js +0 -207
- package/docs/src/complex/search.pug +0 -143
- package/docs/src/components.scss +0 -1
- package/docs/src/core/bottomnav.js +0 -22
- package/docs/src/core/bottomnav.pug +0 -93
- package/docs/src/core/button.js +0 -16
- package/docs/src/core/button.pug +0 -73
- package/docs/src/core/list.js +0 -21
- package/docs/src/core/list.pug +0 -246
- package/docs/src/core/menu.js +0 -33
- package/docs/src/core/menu.pug +0 -108
- package/docs/src/core/progress.js +0 -11
- package/docs/src/core/progress.pug +0 -17
- package/docs/src/core/selection.js +0 -4
- package/docs/src/core/selection.pug +0 -92
- package/docs/src/core/tab.js +0 -21
- package/docs/src/core/tab.pug +0 -180
- package/docs/src/core/textfield.js +0 -15
- package/docs/src/core/textfield.pug +0 -274
- package/docs/src/core/toolbar.js +0 -4
- package/docs/src/core/toolbar.pug +0 -79
- package/docs/src/core/tooltip.js +0 -4
- package/docs/src/core/tooltip.pug +0 -76
- package/docs/src/core/type.js +0 -4
- package/docs/src/core/type.pug +0 -36
- package/docs/src/docs.scss +0 -200
- package/docs/src/index.pug +0 -5
- package/docs/src/mixins.pug +0 -72
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -35
- package/docs/src/theming.scss +0 -36
- package/docs/tab.html +0 -301
- package/docs/tab.min.js +0 -397
- package/docs/textfield.html +0 -476
- package/docs/textfield.min.js +0 -381
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -83
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -83
- package/docs/toolbar.html +0 -213
- package/docs/toolbar.min.js +0 -160
- package/docs/tooltip.html +0 -138
- package/docs/tooltip.min.js +0 -160
- package/docs/type.html +0 -94
- package/docs/type.min.js +0 -160
- package/webpack.config.js +0 -176
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
@import '../theming/palettes';
|
|
2
|
-
|
|
3
|
-
@function sp($multiplier) {
|
|
4
|
-
@return ($multiplier/16.0) * 1rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@function dp($multiplier) {
|
|
8
|
-
@return $multiplier * 1px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@function elevation($dp) {
|
|
12
|
-
@return unquote(map-get($drop-shadow-values, $dp));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@function parseThemeItem($item, $type, $theme: null) {
|
|
16
|
-
$length: length($item);
|
|
17
|
-
@if ($length == 1) {
|
|
18
|
-
@return $item;
|
|
19
|
-
} @else if ($length == 2) {
|
|
20
|
-
@return rgba(nth($item, 1), nth($item, 2));
|
|
21
|
-
} @else {
|
|
22
|
-
$color: nth($item, 1);
|
|
23
|
-
$tone: nth($item, 2);
|
|
24
|
-
$opacity: nth($item, 3);
|
|
25
|
-
@return unquote("rgba(#{getThemePaletteColor($color, $tone, $type, $theme)}, #{$opacity})");
|
|
26
|
-
}
|
|
27
|
-
@return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@function getThemeMapItem($colorMap, $key, $type) {
|
|
31
|
-
$list: map-get($colorMap, $key);
|
|
32
|
-
$length: length($list);
|
|
33
|
-
@if ($type == 'dark-background') {
|
|
34
|
-
@if ($length >= $dark-background) {
|
|
35
|
-
@return nth($list, $dark-background);
|
|
36
|
-
}
|
|
37
|
-
$type: 'dark';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@if ($type == 'dark') {
|
|
41
|
-
@if ($length >= $dark) {
|
|
42
|
-
@return nth($list, $dark);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
@return nth($list, $light);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@function themeValue($component, $colorMap, $key, $type, $theme: null) {
|
|
49
|
-
@if ($type == 'var') {
|
|
50
|
-
@return unquote("var(--#{$component}__#{$key})");
|
|
51
|
-
}
|
|
52
|
-
$item: getThemeMapItem($colorMap, $key, $type);
|
|
53
|
-
@return parseThemeItem($item, $type, $theme);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@function getThemePalette($color, $theme) {
|
|
57
|
-
@if ($color == 'primary') {
|
|
58
|
-
@if ($theme != null) {
|
|
59
|
-
@return map-get($palettes, nth($theme, 1));
|
|
60
|
-
}
|
|
61
|
-
@error 'Missing primary color!'
|
|
62
|
-
} @else if ($color == 'accent') {
|
|
63
|
-
@if (length($theme) > 1) {
|
|
64
|
-
@return map-get($palettes, nth($theme, 2));
|
|
65
|
-
}
|
|
66
|
-
@error 'Missing accent color!'
|
|
67
|
-
} @else if ($color == 'warn') {
|
|
68
|
-
@if (length($theme) > 2) {
|
|
69
|
-
@return map-get($palettes, nth($theme, 3));
|
|
70
|
-
}
|
|
71
|
-
@return map-get($palettes, 'red');
|
|
72
|
-
} @else if ($color == 'background') {
|
|
73
|
-
@if (length($theme) > 3) {
|
|
74
|
-
@return map-get($palettes, nth($theme, 4));
|
|
75
|
-
}
|
|
76
|
-
@return map-get($palettes, 'grey');
|
|
77
|
-
}
|
|
78
|
-
@error "Unrecognized Theme Palette!";
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@function getThemePaletteColor($color, $tone, $type, $theme: null) {
|
|
82
|
-
@if ($theme == null) {
|
|
83
|
-
@if ($tone == null) {
|
|
84
|
-
@return "var(--#{$color}-color)";
|
|
85
|
-
}
|
|
86
|
-
@return "var(--#{$color}-#{$tone}-color)";
|
|
87
|
-
}
|
|
88
|
-
@if ($tone == null) {
|
|
89
|
-
$tone: '500';
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
$palette: getThemePalette($color, $theme);
|
|
93
|
-
$value: map-get($palette, $tone);
|
|
94
|
-
$rgbValue: red($value), green($value), blue($value);
|
|
95
|
-
@return $rgbValue;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Replace letters
|
|
99
|
-
@function str-replace($string, $search, $replace: '') {
|
|
100
|
-
$index: str-index($string, $search);
|
|
101
|
-
@if $index {
|
|
102
|
-
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
|
103
|
-
}
|
|
104
|
-
@return $string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Encode symbols
|
|
108
|
-
@function url-encode($string) {
|
|
109
|
-
$map: (
|
|
110
|
-
"%": "%25",
|
|
111
|
-
"<": "%3C",
|
|
112
|
-
">": "%3E",
|
|
113
|
-
" ": "%20",
|
|
114
|
-
"!": "%21",
|
|
115
|
-
"*": "%2A",
|
|
116
|
-
"'": "%27",
|
|
117
|
-
'"': "%22",
|
|
118
|
-
"(": "%28",
|
|
119
|
-
")": "%29",
|
|
120
|
-
";": "%3B",
|
|
121
|
-
":": "%3A",
|
|
122
|
-
"@": "%40",
|
|
123
|
-
"&": "%26",
|
|
124
|
-
"=": "%3D",
|
|
125
|
-
"+": "%2B",
|
|
126
|
-
"$": "%24",
|
|
127
|
-
",": "%2C",
|
|
128
|
-
"/": "%2F",
|
|
129
|
-
"?": "%3F",
|
|
130
|
-
"#": "%23",
|
|
131
|
-
"[": "%5B",
|
|
132
|
-
"]": "%5D"
|
|
133
|
-
);
|
|
134
|
-
$new: $string;
|
|
135
|
-
@each $search, $replace in $map {
|
|
136
|
-
$new: str-replace($new, $search, $replace);
|
|
137
|
-
}
|
|
138
|
-
@return $new;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Format the SVG as a URL
|
|
142
|
-
@function inline-svg($string) {
|
|
143
|
-
@return url('data:image/svg+xml,#{url-encode($string)}');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// from Sketch
|
|
147
|
-
$drop-shadow-values: (
|
|
148
|
-
0: "none",
|
|
149
|
-
1: "0 0 2px 0 rgba(0,0,0,0.14), 0 2px 2px 0 rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20)",
|
|
150
|
-
2: "0 2px 4px 0 rgba(0,0,0,0.14), 0 3px 4px 0 rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20)",
|
|
151
|
-
3: "0 3px 3px 0 rgba(0,0,0,0.14), 0 3px 4px 0 rgba(0,0,0,0.12), 0 1px 8px 0 rgba(0,0,0,0.20)",
|
|
152
|
-
4: "0 2px 4px 0 rgba(0,0,0,0.14), 0 4px 5px 0 rgba(0,0,0,0.12), 0 1px 10px 0 rgba(0,0,0,0.20)",
|
|
153
|
-
6: "0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px 0 rgba(0,0,0,0.20)",
|
|
154
|
-
8: "0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 3px rgba(0,0,0,0.12), 0 4px 5px 0 rgba(0,0,0,0.20)",
|
|
155
|
-
9: "0 9px 12px 1px rgba(0,0,0,0.14), 0 3px 16px 2px rgba(0,0,0,0.12), 0 5px 6px 0 rgba(0,0,0,0.20)",
|
|
156
|
-
12: "0 12px 17px 2px rgba(0,0,0,0.14), 0 5px 22px 4px rgba(0,0,0,0.12), 0 7px 8px 0 rgba(0,0,0,0.20)",
|
|
157
|
-
16: "0 16px 24px 2px rgba(0,0,0,0.14), 0 6px 30px 5px rgba(0,0,0,0.12), 0 8px 10px 0 rgba(0,0,0,0.20)",
|
|
158
|
-
24: "0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px 0 rgba(0,0,0,0.20)"
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
@function insetPaddingTop($padding, $line-height: normal) {
|
|
162
|
-
@if ($line-height == normal) {
|
|
163
|
-
@return calc(#{$padding} - #{$font-top-gap * 1em});
|
|
164
|
-
}
|
|
165
|
-
@return calc(#{$padding} - #{$font-top-gap * 1em} - ((#{$line-height} - (#{$font-line-height * 1em})) / 2));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@function insetPaddingBottom($padding, $line-height: normal) {
|
|
169
|
-
@if ($line-height == normal) {
|
|
170
|
-
@return calc(#{$padding} - #{$font-bottom-gap * 1em});
|
|
171
|
-
}
|
|
172
|
-
@return calc(#{$padding} - #{$font-bottom-gap * 1em} - ((#{$line-height} - (#{$font-line-height * 1em})) / 2));
|
|
173
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
@import './variables.scss';
|
|
2
|
-
|
|
3
|
-
@mixin portraitHandsets {
|
|
4
|
-
@media screen
|
|
5
|
-
and (orientation:portrait)
|
|
6
|
-
and (max-width: $breakpoint-portrait-handset-max - 1) {
|
|
7
|
-
@content;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
@mixin landscapeHandsets {
|
|
11
|
-
@media screen
|
|
12
|
-
and (orientation:landscape)
|
|
13
|
-
and (max-width: $breakpoint-landscape-handset-max - 1) {
|
|
14
|
-
@content;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@mixin allHandsets {
|
|
19
|
-
@include portraitHandsets {
|
|
20
|
-
@content;
|
|
21
|
-
}
|
|
22
|
-
@include landscapeHandsets {
|
|
23
|
-
@content;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@mixin allTablets {
|
|
28
|
-
@media
|
|
29
|
-
screen
|
|
30
|
-
and (orientation:portrait)
|
|
31
|
-
and (min-width: $breakpoint-portrait-tablet-small)
|
|
32
|
-
and (max-width: $breakpoint-portrait-tablet-max - 1),
|
|
33
|
-
screen
|
|
34
|
-
and (orientation:landscape)
|
|
35
|
-
and (min-width: $breakpoint-landscape-tablet-small)
|
|
36
|
-
and (max-width: $breakpoint-landscape-tablet-max - 1) {
|
|
37
|
-
@content;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin allHandsetsAndTablets {
|
|
42
|
-
@media
|
|
43
|
-
screen
|
|
44
|
-
and (orientation:portrait)
|
|
45
|
-
and (max-width: $breakpoint-portrait-tablet-max - 1),
|
|
46
|
-
screen
|
|
47
|
-
and (orientation:landscape)
|
|
48
|
-
and (max-width: $breakpoint-landscape-tablet-max - 1) {
|
|
49
|
-
@content;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
$light: 1;
|
|
54
|
-
$dark: 2;
|
|
55
|
-
$dark-background: 3;
|
|
56
|
-
|
|
57
|
-
@mixin themeVariables($component, $map, $color, $contrast) {
|
|
58
|
-
@each $key in map-keys($map) {
|
|
59
|
-
$type: 'light';
|
|
60
|
-
@if ($contrast == 'dark') {
|
|
61
|
-
@if ($color == 'background') {
|
|
62
|
-
$type: 'dark-background';
|
|
63
|
-
} @else {
|
|
64
|
-
$type: 'dark';
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
$item: getThemeMapItem($map, $key, $type);
|
|
68
|
-
$value: null;
|
|
69
|
-
$length: length($item);
|
|
70
|
-
@if ($length == 1) {
|
|
71
|
-
$value: $item;
|
|
72
|
-
} @else if ($length == 2) {
|
|
73
|
-
$value: rgba(nth($item, 1), nth($item, 2));
|
|
74
|
-
} @else {
|
|
75
|
-
$color: nth($item,1);
|
|
76
|
-
$tone: nth($item,2);
|
|
77
|
-
$opacity: nth($item,3);
|
|
78
|
-
@if ($tone == null or tone == '500') {
|
|
79
|
-
$value: unquote("rgba(var(--#{$color}-color), #{$opacity})");
|
|
80
|
-
} @else {
|
|
81
|
-
$value: unquote("rgba(var(--#{$color}-#{$tone}-color), #{$opacity})");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
--#{$component}__#{$key}: $value;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@mixin IEOnly {
|
|
89
|
-
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
90
|
-
@content;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@mixin EdgeOnly {
|
|
95
|
-
@supports (-ms-ime-align:auto) {
|
|
96
|
-
@content;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@mixin MSOnly {
|
|
101
|
-
@include IEOnly {
|
|
102
|
-
@content;
|
|
103
|
-
}
|
|
104
|
-
@include EdgeOnly {
|
|
105
|
-
@content;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Motion Durations
|
|
2
|
-
// https://material.io/guidelines/motion/duration-easing.html#duration-easing-dynamic-durations
|
|
3
|
-
|
|
4
|
-
$motion-duration-mobile-default: 300ms;
|
|
5
|
-
$motion-duration-mobile-complex: 375ms;
|
|
6
|
-
$motion-duration-mobile-enter: 225ms;
|
|
7
|
-
$motion-duration-mobile-leave: 195ms;
|
|
8
|
-
$motion-duration-mobile-max: 400ms;
|
|
9
|
-
|
|
10
|
-
$motion-duration-tablet-default: $motion-duration-mobile-default * 1.30;
|
|
11
|
-
$motion-duration-tablet-complex: $motion-duration-mobile-complex * 1.30;
|
|
12
|
-
$motion-duration-tablet-enter: $motion-duration-mobile-enter * 1.30;
|
|
13
|
-
$motion-duration-tablet-leave: $motion-duration-mobile-leave * 1.30;
|
|
14
|
-
$motion-duration-tablet-max: $motion-duration-mobile-max * 1.30;
|
|
15
|
-
|
|
16
|
-
$motion-duration-wearable-default: $motion-duration-mobile-default * 0.70;
|
|
17
|
-
$motion-duration-wearable-complex: $motion-duration-mobile-complex * 0.70;
|
|
18
|
-
$motion-duration-wearable-enter: $motion-duration-mobile-enter * 0.70;
|
|
19
|
-
$motion-duration-wearable-leave: $motion-duration-mobile-leave * 0.70;
|
|
20
|
-
$motion-duration-wearable-max: $motion-duration-mobile-max * 0.70;
|
|
21
|
-
|
|
22
|
-
// Self-estimated
|
|
23
|
-
$motion-duration-desktop-default: 175ms;
|
|
24
|
-
$motion-duration-desktop-complex: 200ms;
|
|
25
|
-
$motion-duration-desktop-enter: 185ms;
|
|
26
|
-
$motion-duration-desktop-leave: 150ms;
|
|
27
|
-
$motion-duration-desktop-max: 300ms;
|
|
28
|
-
|
|
29
|
-
// Motion Easing Curves
|
|
30
|
-
// https://material.io/guidelines/motion/duration-easing.html#duration-easing-natural-easing-curves
|
|
31
|
-
|
|
32
|
-
$motion-easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
|
|
33
|
-
$motion-easing-deceleration: cubic-bezier(0.0, 0.0, 0.2, 1);
|
|
34
|
-
$motion-easing-acceleration: cubic-bezier(0.4, 0.0, 1, 1);
|
|
35
|
-
$motion-easing-sharp: cubic-bezier(0.4, 0.0, 0.6, 1);
|
|
36
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
@import "./mixins.scss";
|
|
2
|
-
|
|
3
|
-
$ripple-duration: 500ms;
|
|
4
|
-
@mixin mdw-ripple__container {
|
|
5
|
-
position: absolute;
|
|
6
|
-
left: 0;
|
|
7
|
-
top: 0;
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
border-radius: inherit;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin mdw-ripple__inner {
|
|
15
|
-
content: '';
|
|
16
|
-
display: table; // Fixes Safari flexbox bug
|
|
17
|
-
border-radius: 50%;
|
|
18
|
-
position: absolute;
|
|
19
|
-
left: 50%;
|
|
20
|
-
top: 50%;
|
|
21
|
-
z-index: -1;
|
|
22
|
-
user-select: none;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
height: 0;
|
|
25
|
-
width: 100%;
|
|
26
|
-
padding-top: 100%;
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
color: inherit;
|
|
29
|
-
opacity: 0.26;
|
|
30
|
-
@include MSOnly() {
|
|
31
|
-
// Microsoft browsers don't handle low opacity (12%) properly
|
|
32
|
-
opacity: 0.26 !important;
|
|
33
|
-
}
|
|
34
|
-
transform: translateX(-50%) translateY(-50%) scale(1);
|
|
35
|
-
transition-delay:
|
|
36
|
-
0s,
|
|
37
|
-
0s,
|
|
38
|
-
$motion-duration-desktop-max / 2;
|
|
39
|
-
transition-duration:
|
|
40
|
-
$motion-duration-desktop-max,
|
|
41
|
-
$motion-duration-desktop-max / 2,
|
|
42
|
-
$motion-duration-desktop-max / 2;
|
|
43
|
-
|
|
44
|
-
@include allHandsets {
|
|
45
|
-
transition-delay:
|
|
46
|
-
0s,
|
|
47
|
-
0s,
|
|
48
|
-
$motion-duration-mobile-max / 2;
|
|
49
|
-
transition-duration:
|
|
50
|
-
$motion-duration-mobile-max,
|
|
51
|
-
$motion-duration-mobile-max / 2,
|
|
52
|
-
$motion-duration-mobile-max / 2;
|
|
53
|
-
}
|
|
54
|
-
@include allTablets {
|
|
55
|
-
transition-delay:
|
|
56
|
-
0s,
|
|
57
|
-
0s,
|
|
58
|
-
$motion-duration-tablet-max / 2;
|
|
59
|
-
transition-duration:
|
|
60
|
-
$motion-duration-tablet-max,
|
|
61
|
-
$motion-duration-tablet-max / 2,
|
|
62
|
-
$motion-duration-tablet-max / 2;
|
|
63
|
-
}
|
|
64
|
-
transition-property:
|
|
65
|
-
transform,
|
|
66
|
-
opacity,
|
|
67
|
-
background-color;
|
|
68
|
-
transition-timing-function: $motion-easing-sharp;
|
|
69
|
-
will-change:
|
|
70
|
-
transform,
|
|
71
|
-
opacity,
|
|
72
|
-
background-color;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@mixin mdw-ripple__active {
|
|
76
|
-
transition-duration: 0s;
|
|
77
|
-
transition-delay: 0s;
|
|
78
|
-
transform: translateX(-50%) translateY(-50%) scale(0);
|
|
79
|
-
opacity: 0;
|
|
80
|
-
background-color: currentColor;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// Target
|
|
85
|
-
// size 0.000 --> 0.500 --> 1.000
|
|
86
|
-
// opacity 0.000 --> 1.000 --> 0.000
|
|
87
|
-
|
|
88
|
-
// Implemenation
|
|
89
|
-
// scale - 0.000 --> 0.500 --> 1.000 - 0% delay 100% duration
|
|
90
|
-
// opacity - 0.000 --> 1.000 --> 1.000 - 0% delay 50% duration
|
|
91
|
-
// color - solid --> solid --> trans - 50% delay 50% duration
|
|
92
|
-
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
$desktop-breakpoint-offset: dp(16);
|
|
2
|
-
|
|
3
|
-
$breakpoint-portrait-handset-small: dp(0);
|
|
4
|
-
$breakpoint-portrait-handset-medium: dp(360);
|
|
5
|
-
$breakpoint-portrait-handset-large: dp(400);
|
|
6
|
-
$breakpoint-portrait-handset-max: dp(600);
|
|
7
|
-
|
|
8
|
-
$breakpoint-portrait-tablet-small: dp(600);
|
|
9
|
-
$breakpoint-portrait-tablet-large: dp(720);
|
|
10
|
-
$breakpoint-portrait-tablet-max: dp(840);
|
|
11
|
-
|
|
12
|
-
$breakpoint-landscape-handset-small: dp(480);
|
|
13
|
-
$breakpoint-landscape-handset-medium: dp(600);
|
|
14
|
-
$breakpoint-landscape-handset-large: dp(720);
|
|
15
|
-
$breakpoint-landscape-handset-max: dp(960);
|
|
16
|
-
|
|
17
|
-
$breakpoint-landscape-tablet-small: dp(960);
|
|
18
|
-
$breakpoint-landscape-tablet-large: dp(1024);
|
|
19
|
-
$breakpoint-landscape-tablet-max: dp(1280);
|
|
20
|
-
|
|
21
|
-
$breakpoint-window-xsmall: dp(0);
|
|
22
|
-
$breakpoint-window-small: dp(600);
|
|
23
|
-
$breakpoint-window-medium: dp(1024);
|
|
24
|
-
$breakpoint-window-large: dp(1440);
|
|
25
|
-
$breakpoint-window-xlarge: dp(1920);
|
|
26
|
-
|
|
27
|
-
$font-weight-thin: 100;
|
|
28
|
-
$font-weight-light: 300;
|
|
29
|
-
$font-weight-regular: 400; // normal
|
|
30
|
-
$font-weight-medium: 500;
|
|
31
|
-
$font-weight-bold: 700;
|
|
32
|
-
$font-weight-black: 900;
|
|
33
|
-
|
|
34
|
-
// From Roboto fontinfo.plist
|
|
35
|
-
|
|
36
|
-
$font-line-gap: 0;
|
|
37
|
-
$font-em-square: 2048;
|
|
38
|
-
$font-cap-height: 1456;
|
|
39
|
-
$font-ascender: 2146;
|
|
40
|
-
$font-descender: -555;
|
|
41
|
-
|
|
42
|
-
// Calculated
|
|
43
|
-
$font-line-height: ($font-ascender - $font-descender + $font-line-gap) / $font-em-square;
|
|
44
|
-
$font-top-gap: ($font-ascender - $font-cap-height) / $font-em-square;
|
|
45
|
-
$font-bottom-gap: -$font-descender / $font-em-square;
|
|
46
|
-
|
|
47
|
-
// Temporary workaround because ascent seems incorrect
|
|
48
|
-
$font-top-gap: $font-bottom-gap;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// https://material.io/guidelines/components/dialogs.html
|
|
2
|
-
|
|
3
|
-
// https://material.io/guidelines/components/menus.html
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
$dialog__unit-width: dp(56);
|
|
7
|
-
|
|
8
|
-
.mdw-dialog__close {
|
|
9
|
-
visibility: hidden;
|
|
10
|
-
pointer-events: inherit;
|
|
11
|
-
position: absolute;
|
|
12
|
-
left: 0;
|
|
13
|
-
top: 0;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
z-index: -1;
|
|
17
|
-
cursor: default;
|
|
18
|
-
background-color: rgba(black, 0.50);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.mdw-dialog {
|
|
22
|
-
position: absolute;
|
|
23
|
-
left: 0;
|
|
24
|
-
top: 0;
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: 100%;
|
|
27
|
-
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: row;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
transition-property: opacity;
|
|
36
|
-
transition-timing-function: $motion-easing-deceleration;
|
|
37
|
-
transition-duration: $motion-duration-desktop-leave;
|
|
38
|
-
@include allHandsets {
|
|
39
|
-
transition-duration: $motion-duration-mobile-leave;
|
|
40
|
-
}
|
|
41
|
-
@include allTablets {
|
|
42
|
-
transition-duration: $motion-duration-tablet-leave;
|
|
43
|
-
}
|
|
44
|
-
@for $i from 3 to 7 {
|
|
45
|
-
&[mdw-width-units="#{$i}"] {
|
|
46
|
-
width: calc(#{$dialog__unit-width} * #{$i});
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
opacity: 0;
|
|
50
|
-
&[mdw-show]:not([mdw-hide]),
|
|
51
|
-
&:target {
|
|
52
|
-
pointer-events: auto;
|
|
53
|
-
transition-timing-function: $motion-easing-acceleration;
|
|
54
|
-
transition-duration: $motion-duration-desktop-enter;
|
|
55
|
-
opacity: 1;
|
|
56
|
-
@include allHandsets {
|
|
57
|
-
transition-duration: $motion-duration-mobile-enter;
|
|
58
|
-
}
|
|
59
|
-
@include allTablets {
|
|
60
|
-
transition-duration: $motion-duration-tablet-enter;
|
|
61
|
-
}
|
|
62
|
-
.mdw-dialog__close {
|
|
63
|
-
visibility: visible;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.mdw-dialog__popup {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
flex-shrink: 1;
|
|
72
|
-
min-width: dp(224);
|
|
73
|
-
border-radius: dp(2);
|
|
74
|
-
box-shadow: elevation(24);
|
|
75
|
-
transition-duration: inherit;
|
|
76
|
-
transition-timing-function: inherit;
|
|
77
|
-
margin: dp(40);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.mdw-dialog__content {
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
padding: 0 dp(24);
|
|
84
|
-
}
|
|
85
|
-
.mdw-dialog__title {
|
|
86
|
-
font-weight: $font-weight-medium;
|
|
87
|
-
line-height: dp(28);
|
|
88
|
-
font-size: sp(20);
|
|
89
|
-
|
|
90
|
-
// 24dp top padding
|
|
91
|
-
&::before {
|
|
92
|
-
content: "\200D"; // ‍
|
|
93
|
-
display: inline-block;
|
|
94
|
-
margin-top: dp(24);
|
|
95
|
-
line-height: 1;
|
|
96
|
-
vertical-align: text-bottom;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 20dp bottom padding from baseline
|
|
100
|
-
// 10dp from self and 10dp from next
|
|
101
|
-
&::after {
|
|
102
|
-
content: "\200D"; // ‍
|
|
103
|
-
display: inline-block;
|
|
104
|
-
line-height: 1;
|
|
105
|
-
margin-bottom: dp(10);
|
|
106
|
-
vertical-align: text-top;
|
|
107
|
-
}
|
|
108
|
-
&:last-child::after {
|
|
109
|
-
content: "\200D"; // ‍
|
|
110
|
-
display: inline-block;
|
|
111
|
-
line-height: 1;
|
|
112
|
-
margin-bottom: dp(20);
|
|
113
|
-
vertical-align: text-top;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.mdw-dialog__body {
|
|
118
|
-
font-weight: $font-weight-regular;
|
|
119
|
-
line-height: dp(24);
|
|
120
|
-
font-size: sp(16);
|
|
121
|
-
|
|
122
|
-
// 24dp top padding or 10+10 if followed by title
|
|
123
|
-
&::before {
|
|
124
|
-
content: "\200D"; // ‍
|
|
125
|
-
display: inline-block;
|
|
126
|
-
margin-top: dp(24);
|
|
127
|
-
line-height: 1;
|
|
128
|
-
vertical-align: text-bottom;
|
|
129
|
-
.mdw-dialog__title ~ & {
|
|
130
|
-
margin-top: dp(10);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// 20dp bottom padding from baseline
|
|
135
|
-
&::after {
|
|
136
|
-
content: "\200D"; // ‍
|
|
137
|
-
display: inline-block;
|
|
138
|
-
line-height: 1;
|
|
139
|
-
vertical-align: text-top;
|
|
140
|
-
margin-bottom: dp(20);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
// 10dp top padding to complete previous item
|
|
147
|
-
.mdw-dialog__button-area {
|
|
148
|
-
display: flex;
|
|
149
|
-
flex-direction: row;
|
|
150
|
-
justify-content: flex-end;
|
|
151
|
-
margin-top: dp(8);
|
|
152
|
-
margin-bottom: dp(8);
|
|
153
|
-
.mdw-button {
|
|
154
|
-
margin: 0;
|
|
155
|
-
&:last-child {
|
|
156
|
-
margin: 0 dp(8);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
@import '../../common/functions.scss';
|
|
2
|
-
@import '../../common/mixins.scss';
|
|
3
|
-
|
|
4
|
-
$dialogColors: (
|
|
5
|
-
text-color: ((#000, 0.87), (#fff, 1.00)),
|
|
6
|
-
secondary-text-color: ((#000, 0.54), (#fff, 0.70)),
|
|
7
|
-
background-color: ((#fff, 1.00), ('background', '800', 1.00)),
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
@function dialogThemeValue($key, $type, $theme) {
|
|
11
|
-
@return themeValue('dialog', $dialogColors, $key, $type, $theme);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin dialogThemeVariables($color, $lightness) {
|
|
15
|
-
@include themeVariables('dialog', $dialogColors, $color, $lightness);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Vary by contrast or theme
|
|
19
|
-
@mixin dialogContrastRules($type: 'var', $theme: null) {
|
|
20
|
-
.mdw-dialog__popup {
|
|
21
|
-
background-color: dialogThemeValue("background-color", $type, $theme);
|
|
22
|
-
}
|
|
23
|
-
.mdw-dialog__title {
|
|
24
|
-
color: dialogThemeValue("text-color", $type, $theme);
|
|
25
|
-
}
|
|
26
|
-
.mdw-dialog__body {
|
|
27
|
-
color: dialogThemeValue("secondary-text-color", $type, $theme);
|
|
28
|
-
}
|
|
29
|
-
}
|