@shortfuse/materialdesignweb 0.2.0 → 0.5.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 +2 -1
- package/.eslintrc.json +188 -30
- package/.stylelintrc.json +643 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +36 -0
- package/README.md +82 -2
- package/adapters/datatable/column.js +176 -0
- package/adapters/datatable/index.js +253 -437
- package/adapters/dom/index.js +586 -0
- package/adapters/list/index.js +36 -113
- package/adapters/search/index.js +153 -180
- package/components/appbar/_spec.scss +165 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +83 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +4 -4
- package/components/bottomnav/_spec.scss +149 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +100 -120
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +88 -0
- package/components/button/README.md +16 -22
- package/components/button/_spec.scss +162 -0
- package/components/button/_theme.scss +42 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +37 -48
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +241 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +111 -0
- package/components/chip/_theme.scss +105 -0
- package/components/chip/index.js +23 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +225 -0
- package/components/datatable/_theme.scss +128 -0
- package/components/datatable/cell.js +44 -0
- package/components/datatable/columnheader.js +46 -0
- package/components/datatable/index.js +339 -443
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +48 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +203 -0
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +512 -437
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +11 -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/{style.scss → _spec.scss} +104 -79
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +85 -79
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +169 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +11 -0
- package/components/layout/_spec.scss +916 -0
- package/components/layout/_theme.scss +19 -0
- package/components/layout/index.js +454 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +363 -0
- package/components/list/_theme.scss +102 -0
- package/components/list/content.js +106 -0
- package/components/list/index.js +234 -79
- package/components/list/index.scss +2 -0
- package/components/list/item.js +167 -0
- package/components/list/secondary.js +45 -0
- package/components/menu/_spec.scss +329 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +636 -651
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +231 -0
- package/components/progress/_spec.scss +156 -0
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +29 -13
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +376 -0
- package/components/selection/_theme.scss +134 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +70 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +54 -0
- package/components/selection/radiogroup.js +40 -0
- package/components/slider/{style.scss → _spec.scss} +31 -34
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +150 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +293 -206
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +220 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +210 -0
- package/components/tab/index.js +229 -213
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +88 -0
- package/components/tab/list.js +196 -0
- package/components/tab/panel.js +54 -0
- package/components/textfield/README.md +4 -4
- package/components/textfield/_spec.scss +763 -0
- package/components/textfield/_theme.scss +264 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +132 -138
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +185 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +227 -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 +78 -0
- package/core/_length.scss +8 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +12 -0
- package/core/_type.scss +128 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +49 -0
- package/core/aria/keyboard.js +92 -0
- package/core/aria/rovingtabindex.js +175 -0
- package/core/aria/tab.js +59 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +180 -0
- package/core/overlay/_spec.scss +28 -0
- package/core/overlay/_theme.scss +147 -0
- package/core/overlay/index.js +95 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +196 -0
- package/core/ripple/_theme.scss +20 -0
- package/core/ripple/index.js +286 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -0
- package/core/theme/_functions.scss +22 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -151
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.js +50 -0
- package/core/theme/index.scss +4 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +465 -0
- package/docs/_flex.scss +28 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +27 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +146 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +88 -0
- package/docs/{src/storage.js → _storage.js} +0 -0
- package/docs/docs.scss +331 -0
- package/docs/framework.scss +26 -0
- package/docs/index.eta +12 -0
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +108 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +118 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +175 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +80 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +261 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +160 -0
- package/docs/pages/dialog.eta +184 -0
- package/docs/{src/components → pages}/dialog.js +35 -48
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +140 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/{src/components → pages}/fab.js +6 -13
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +8 -0
- package/docs/pages/menu.eta +274 -0
- package/docs/{src/components → pages}/menu.js +26 -42
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +3 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/{src/components → pages}/progress.js +2 -4
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +3 -0
- package/docs/pages/search.eta +242 -0
- package/docs/pages/search.js +226 -0
- package/docs/pages/selection.eta +107 -0
- package/docs/pages/selection.js +12 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/{src/components → pages}/snackbar.js +31 -36
- package/docs/pages/tab.eta +407 -0
- package/docs/pages/tab.js +152 -0
- package/docs/pages/textfield.eta +487 -0
- package/docs/{src/components → pages}/textfield.js +41 -45
- package/docs/pages/tooltip.eta +92 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +52 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +41 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +478 -0
- package/docs/pwa/pwa.js +298 -0
- package/docs/pwa/pwa.scss +31 -0
- package/docs/themes/theme-colored.scss +15 -0
- package/docs/themes/theme-default.scss +3 -0
- package/index.scss +27 -0
- package/jsconfig.json +8 -2
- package/package.json +54 -27
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/tsconfig.json +16 -0
- package/utils/function.js +3 -0
- package/webpack.config.js +224 -68
- package/_index.scss +0 -4
- package/components/all-components.scss +0 -21
- package/components/bottomnav/style.scss +0 -190
- package/components/bottomnav/theming.scss +0 -76
- package/components/button/style.scss +0 -315
- package/components/button/theming.scss +0 -134
- package/components/card/style.scss +0 -175
- package/components/card/theming.scss +0 -43
- package/components/common/dom.js +0 -51
- package/components/common/functions.scss +0 -174
- package/components/common/mixins.scss +0 -122
- package/components/common/motion.scss +0 -36
- package/components/common/type.scss +0 -104
- package/components/common/variables.scss +0 -46
- package/components/datatable/style.scss +0 -257
- package/components/datatable/theming.scss +0 -119
- package/components/dialog/style.scss +0 -159
- package/components/dialog/theming.scss +0 -29
- package/components/divider/style.scss +0 -7
- package/components/divider/theming.scss +0 -20
- package/components/elevation/style.scss +0 -32
- package/components/layout/style.scss +0 -223
- package/components/list/style.scss +0 -358
- package/components/list/theming.scss +0 -83
- package/components/menu/style.scss +0 -280
- package/components/menu/theming.scss +0 -80
- package/components/navdrawer/index.js +0 -200
- package/components/navdrawer/style.scss +0 -595
- package/components/navdrawer/theming.scss +0 -62
- package/components/progress/style.scss +0 -136
- package/components/ripple/index.js +0 -63
- package/components/ripple/ripple.scss +0 -122
- package/components/selection/style.scss +0 -320
- package/components/selection/theming.scss +0 -98
- package/components/snackbar/style.scss +0 -212
- package/components/switch/style.scss +0 -3
- package/components/tab/style.scss +0 -275
- package/components/tab/theming.scss +0 -34
- package/components/template/theming.scss +0 -31
- package/components/textfield/style.scss +0 -795
- package/components/textfield/theming.scss +0 -256
- package/components/theming/globals.scss +0 -25
- package/components/theming/theming.scss +0 -559
- package/components/toolbar/style.scss +0 -190
- package/components/toolbar/theming.scss +0 -32
- package/components/tooltip/style.scss +0 -135
- package/components/type/style.scss +0 -167
- package/components/type/theming.scss +0 -25
- package/docs/bottomnav.html +0 -1
- package/docs/bottomnav.min.js +0 -2
- package/docs/bottomnav.min.js.map +0 -1
- package/docs/button.html +0 -1
- package/docs/button.min.js +0 -2
- package/docs/button.min.js.map +0 -1
- package/docs/card.html +0 -1
- package/docs/card.min.js +0 -2
- package/docs/card.min.js.map +0 -1
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -2
- package/docs/components.min.js.map +0 -1
- package/docs/datatable.html +0 -1
- package/docs/datatable.min.js +0 -2
- package/docs/datatable.min.js.map +0 -1
- package/docs/dialog.html +0 -1
- package/docs/dialog.min.js +0 -2
- package/docs/dialog.min.js.map +0 -1
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -2
- package/docs/docs.min.js.map +0 -1
- package/docs/elevation.html +0 -1
- package/docs/elevation.min.js +0 -2
- package/docs/elevation.min.js.map +0 -1
- package/docs/fab.html +0 -1
- package/docs/fab.min.js +0 -2
- package/docs/fab.min.js.map +0 -1
- package/docs/index.html +0 -1
- package/docs/index.min.js +0 -2
- package/docs/index.min.js.map +0 -1
- package/docs/layout.html +0 -1
- package/docs/layout.min.js +0 -2
- package/docs/layout.min.js.map +0 -1
- package/docs/list.html +0 -1
- package/docs/list.min.js +0 -2
- package/docs/list.min.js.map +0 -1
- package/docs/menu.html +0 -1
- package/docs/menu.min.js +0 -2
- package/docs/menu.min.js.map +0 -1
- package/docs/navdrawer.html +0 -1
- package/docs/navdrawer.min.js +0 -2
- package/docs/navdrawer.min.js.map +0 -1
- package/docs/prerender.min.js +0 -2
- package/docs/prerender.min.js.map +0 -1
- package/docs/progress.html +0 -1
- package/docs/progress.min.js +0 -2
- package/docs/progress.min.js.map +0 -1
- package/docs/search.html +0 -1
- package/docs/search.min.js +0 -2
- package/docs/search.min.js.map +0 -1
- package/docs/selection.html +0 -1
- package/docs/selection.min.js +0 -2
- package/docs/selection.min.js.map +0 -1
- package/docs/slider.html +0 -1
- package/docs/slider.min.js +0 -2
- package/docs/slider.min.js.map +0 -1
- package/docs/snackbar.html +0 -1
- package/docs/snackbar.min.js +0 -2
- package/docs/snackbar.min.js.map +0 -1
- package/docs/src/components/bottomnav.js +0 -16
- package/docs/src/components/bottomnav.pug +0 -112
- package/docs/src/components/button.js +0 -156
- package/docs/src/components/button.pug +0 -194
- package/docs/src/components/card.js +0 -136
- package/docs/src/components/card.pug +0 -133
- package/docs/src/components/datatable.js +0 -183
- package/docs/src/components/datatable.pug +0 -324
- package/docs/src/components/dialog.pug +0 -138
- package/docs/src/components/elevation.js +0 -3
- package/docs/src/components/elevation.pug +0 -17
- package/docs/src/components/fab.pug +0 -84
- package/docs/src/components/layout.js +0 -116
- package/docs/src/components/layout.pug +0 -104
- package/docs/src/components/list.js +0 -15
- package/docs/src/components/list.pug +0 -293
- package/docs/src/components/menu.pug +0 -292
- package/docs/src/components/navdrawer.js +0 -112
- package/docs/src/components/navdrawer.pug +0 -113
- package/docs/src/components/progress.pug +0 -17
- package/docs/src/components/search.js +0 -206
- package/docs/src/components/search.pug +0 -149
- package/docs/src/components/selection.js +0 -6
- package/docs/src/components/selection.pug +0 -116
- package/docs/src/components/slider.js +0 -3
- package/docs/src/components/slider.pug +0 -19
- package/docs/src/components/snackbar.pug +0 -145
- package/docs/src/components/tab.js +0 -137
- package/docs/src/components/tab.pug +0 -329
- package/docs/src/components/textfield.pug +0 -416
- package/docs/src/components/toolbar.js +0 -6
- package/docs/src/components/toolbar.pug +0 -86
- package/docs/src/components/tooltip.js +0 -6
- package/docs/src/components/tooltip.pug +0 -76
- package/docs/src/components/type.js +0 -6
- package/docs/src/components/type.pug +0 -34
- package/docs/src/components.scss +0 -1
- package/docs/src/docs.scss +0 -284
- package/docs/src/index.js +0 -3
- package/docs/src/index.pug +0 -6
- package/docs/src/menuoptions.js +0 -136
- package/docs/src/mixins.pug +0 -139
- package/docs/src/prerender.js +0 -26
- package/docs/src/sample-utils.js +0 -108
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -18
- package/docs/src/theming.scss +0 -18
- package/docs/tab.html +0 -1
- package/docs/tab.min.js +0 -2
- package/docs/tab.min.js.map +0 -1
- package/docs/textfield.html +0 -2
- package/docs/textfield.min.js +0 -2
- package/docs/textfield.min.js.map +0 -1
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -2
- package/docs/theming.ie11.min.js.map +0 -1
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -2
- package/docs/theming.min.js.map +0 -1
- package/docs/toolbar.html +0 -1
- package/docs/toolbar.min.js +0 -2
- package/docs/toolbar.min.js.map +0 -1
- package/docs/tooltip.html +0 -1
- package/docs/tooltip.min.js +0 -2
- package/docs/tooltip.min.js.map +0 -1
- package/docs/type.html +0 -1
- package/docs/type.min.js +0 -2
- package/docs/type.min.js.map +0 -1
- package/index.js +0 -16
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// https://material.io/design/components/tooltips.html#spec
|
|
2
|
+
|
|
3
|
+
@use '../../core/_length.scss' as *;
|
|
4
|
+
@use '../../core/_motion.scss' as motion;
|
|
5
|
+
@use '../../core/_platform.scss' as platform;
|
|
6
|
+
@use '../../core/_type.scss' as type;
|
|
7
|
+
|
|
8
|
+
// Guidelines state background is #616161, which is Gray 700
|
|
9
|
+
|
|
10
|
+
$desktop-margin: 14px !default;
|
|
11
|
+
$mobile-margin: 24px !default;
|
|
12
|
+
$touch-fade-out-time: 1.5s !default;
|
|
13
|
+
$touch-min-hold-time: 500ms !default;
|
|
14
|
+
|
|
15
|
+
.mdw-tooltip__wrapper {
|
|
16
|
+
position: relative;
|
|
17
|
+
overflow: visible;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mdw-tooltip,
|
|
21
|
+
.mdw-tooltip__target {
|
|
22
|
+
-moz-user-select: none;
|
|
23
|
+
-ms-user-select: none;
|
|
24
|
+
-webkit-user-select: none;
|
|
25
|
+
user-select: none;
|
|
26
|
+
-webkit-touch-callout: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mdw-tooltip {
|
|
30
|
+
@include type.addRules('caption');
|
|
31
|
+
|
|
32
|
+
position: absolute;
|
|
33
|
+
|
|
34
|
+
inset-block-start: 100%;
|
|
35
|
+
inset-inline-start: 50%;
|
|
36
|
+
align-items: center;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
|
|
40
|
+
inline-size: auto;
|
|
41
|
+
padding: 6px 8px;
|
|
42
|
+
|
|
43
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
44
|
+
cursor: none;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
|
|
47
|
+
transition-duration: motion.$fadeOutDuration;
|
|
48
|
+
transition-property: opacity;
|
|
49
|
+
transition-timing-function: motion.$accelerateEasing;
|
|
50
|
+
|
|
51
|
+
opacity: 0;
|
|
52
|
+
// Default Alignment is Center
|
|
53
|
+
|
|
54
|
+
transform: translateX(-50%) translateY($desktop-margin);
|
|
55
|
+
z-index: 8;
|
|
56
|
+
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
|
|
59
|
+
line-height: 1;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
|
|
62
|
+
.mdw-tooltip__target:hover > &,
|
|
63
|
+
.mdw-tooltip__target:focus > &,
|
|
64
|
+
.mdw-tooltip__wrapper > .mdw-tooltip__target:hover ~ &,
|
|
65
|
+
.mdw-tooltip__wrapper > .mdw-tooltip__target:not([tabindex="-1"]):focus ~ & {
|
|
66
|
+
transition-duration: motion.$fadeInDuration;
|
|
67
|
+
transition-timing-function: motion.$accelerateEasing;
|
|
68
|
+
|
|
69
|
+
opacity: 0.9;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&[mdw-align="start"],
|
|
73
|
+
:root[dir="rtl"] &[mdw-align="end"] {
|
|
74
|
+
inset-inline: 0 auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[mdw-align="end"],
|
|
78
|
+
:root[dir="rtl"] &[mdw-align="start"] {
|
|
79
|
+
inset-inline: auto 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&[mdw-align="start"],
|
|
83
|
+
&[mdw-align="end"] {
|
|
84
|
+
transform: translateY($desktop-margin);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[mdw-position="start"],
|
|
88
|
+
&[mdw-position="end"],
|
|
89
|
+
&[mdw-position="left"],
|
|
90
|
+
&[mdw-position="right"] {
|
|
91
|
+
inset-block-start: 50%;
|
|
92
|
+
inset-inline-start: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&[mdw-position="start"],
|
|
96
|
+
&[mdw-position="left"],
|
|
97
|
+
:root[dir="rtl"] &[mdw-position="end"] {
|
|
98
|
+
margin: 0;
|
|
99
|
+
|
|
100
|
+
transform: translateY(-50%) translateX(-100%);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&[mdw-position="end"],
|
|
104
|
+
&[mdw-position="right"],
|
|
105
|
+
:root[dir="rtl"] &[mdw-position="start"] {
|
|
106
|
+
transform: translateY(-50%) translateX(100%);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[mdw-position="top"] {
|
|
110
|
+
inset-block-start: 0;
|
|
111
|
+
|
|
112
|
+
transform: translateX(-50%) translateY(-100%) translateY(-$desktop-margin);
|
|
113
|
+
|
|
114
|
+
&[mdw-align="start"],
|
|
115
|
+
&[mdw-align="end"] {
|
|
116
|
+
transform: translateY(-100%) translateY(-$desktop-margin);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Button position fix
|
|
123
|
+
.mdw-tooltip__wrapper > .mdw-button[mdw-icon] ~ .mdw-tooltip {
|
|
124
|
+
&:not([mdw-position]) {
|
|
125
|
+
// Bottom
|
|
126
|
+
margin-block-start: -8px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[mdw-position="top"] {
|
|
130
|
+
margin-block-start: 8px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Menu flicker fix
|
|
135
|
+
.mdw-menu__wrapper > .mdw-menu:target ~ .mdw-tooltip,
|
|
136
|
+
.mdw-menu__wrapper > .mdw-menu[mdw-show]:not([mdw-hide]) ~ .mdw-tooltip {
|
|
137
|
+
transition-delay: 0;
|
|
138
|
+
|
|
139
|
+
opacity: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include platform.ifHasTouch() {
|
|
143
|
+
.mdw-tooltip {
|
|
144
|
+
padding: 10px 16px;
|
|
145
|
+
|
|
146
|
+
transition-delay: $touch-min-hold-time;
|
|
147
|
+
|
|
148
|
+
transform: translateX(-50%) translateY($mobile-margin);
|
|
149
|
+
|
|
150
|
+
font-size: sp(14);
|
|
151
|
+
|
|
152
|
+
&[mdw-align="start"],
|
|
153
|
+
&[mdw-align="end"] {
|
|
154
|
+
transform: translateY($mobile-margin);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&[mdw-position="top"] {
|
|
158
|
+
transform: translateX(-50%) translateY(-100%) translateY(-$mobile-margin);
|
|
159
|
+
|
|
160
|
+
&[mdw-align="start"],
|
|
161
|
+
&[mdw-align="end"] {
|
|
162
|
+
transform: translateY(-100%) translateY(-$mobile-margin);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Don't change opacity unless active
|
|
167
|
+
.mdw-tooltip__target:hover:not(:active) > &,
|
|
168
|
+
.mdw-tooltip__target:focus:not(:active) > &,
|
|
169
|
+
.mdw-tooltip__wrapper > .mdw-tooltip__target:hover:not(:active) ~ &,
|
|
170
|
+
.mdw-tooltip__wrapper > .mdw-tooltip__target:not([tabindex="-1"]):focus:not(:active) ~ & {
|
|
171
|
+
transition-delay: $touch-fade-out-time;
|
|
172
|
+
|
|
173
|
+
opacity: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mdw-tooltip__target:active > &,
|
|
177
|
+
.mdw-tooltip__wrapper > .mdw-tooltip__target:active ~ .mdw-tooltip {
|
|
178
|
+
transition-duration: motion.$fadeInDuration;
|
|
179
|
+
transition-timing-function: motion.$accelerateEasing;
|
|
180
|
+
|
|
181
|
+
opacity: 0.9;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
// https://material.io/guidelines/style/typography.html
|
|
2
|
+
|
|
3
|
+
@use '../../core/_breakpoint.scss' as breakpoint;
|
|
4
|
+
@use '../../core/_length.scss' as *;
|
|
5
|
+
@use '../../core/_type.scss' as type;
|
|
6
|
+
|
|
7
|
+
// 4 dp/sp baselines
|
|
8
|
+
$baselines: (4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64) !default;
|
|
9
|
+
|
|
10
|
+
h1.mdw-type,
|
|
11
|
+
h2.mdw-type,
|
|
12
|
+
h3.mdw-type,
|
|
13
|
+
h4.mdw-type,
|
|
14
|
+
h5.mdw-type,
|
|
15
|
+
h6.mdw-type,
|
|
16
|
+
p.mdw-type {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
p.mdw-type {
|
|
21
|
+
-ms-hyphens: auto;
|
|
22
|
+
-webkit-hyphens: auto;
|
|
23
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
24
|
+
hyphens: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1.mdw-type,
|
|
28
|
+
.mdw-type[mdw-style="h1"] {
|
|
29
|
+
@include type.addRules('h1');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h2.mdw-type,
|
|
33
|
+
.mdw-type[mdw-style="h2"] {
|
|
34
|
+
@include type.addRules('h2');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
h3.mdw-type,
|
|
38
|
+
.mdw-type[mdw-style="h3"] {
|
|
39
|
+
@include type.addRules('h3');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
h4.mdw-type,
|
|
43
|
+
.mdw-type[mdw-style="h4"] {
|
|
44
|
+
@include type.addRules('h4');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
h5.mdw-type,
|
|
48
|
+
.mdw-type[mdw-style="h5"] {
|
|
49
|
+
@include type.addRules('h5');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
h6.mdw-type,
|
|
53
|
+
.mdw-type[mdw-style="h6"] {
|
|
54
|
+
@include type.addRules('h6');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.mdw-type[mdw-style="subtitle"] {
|
|
58
|
+
@include type.addRules('subtitle');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.mdw-type[mdw-style="subtitle-2"] {
|
|
62
|
+
@include type.addRules('subtitle-2');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
body.mdw-type,
|
|
66
|
+
p.mdw-type,
|
|
67
|
+
.mdw-type[mdw-style="body"] {
|
|
68
|
+
@include type.addRules('body');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mdw-type[mdw-style="body-2"] {
|
|
72
|
+
@include type.addRules('body-2');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mdw-type[mdw-style="button"] {
|
|
76
|
+
@include type.addRules('button');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mdw-type[mdw-style="caption"] {
|
|
80
|
+
@include type.addRules('caption');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mdw-type[mdw-style="overline"] {
|
|
84
|
+
@include type.addRules('overline');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// MD-2014 Typography
|
|
88
|
+
|
|
89
|
+
.mdw-type[mdw-style|="display"] {
|
|
90
|
+
font-weight: type.$weightRegular;
|
|
91
|
+
font-size: sp(34);
|
|
92
|
+
line-height: sp(40);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.mdw-type[mdw-style="display-4"] {
|
|
96
|
+
font-weight: type.$weightLight;
|
|
97
|
+
font-size: sp(112);
|
|
98
|
+
line-height: normal;
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mdw-type[mdw-style="display-3"] {
|
|
103
|
+
font-size: sp(56);
|
|
104
|
+
line-height: normal;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.mdw-type[mdw-style="display-2"] {
|
|
109
|
+
font-size: sp(45);
|
|
110
|
+
line-height: sp(48);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.mdw-type[mdw-style="headline"] {
|
|
114
|
+
font-weight: type.$weightRegular;
|
|
115
|
+
font-size: sp(24);
|
|
116
|
+
line-height: sp(32);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mdw-type[mdw-style="title"] {
|
|
120
|
+
font-weight: type.$weightMedium;
|
|
121
|
+
font-size: sp(20);
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.mdw-type[mdw-style|="subheading"] {
|
|
126
|
+
font-weight: type.$weightRegular;
|
|
127
|
+
font-size: sp(15);
|
|
128
|
+
@include breakpoint.maxTabletDevice() {
|
|
129
|
+
font-size: sp(16);
|
|
130
|
+
}
|
|
131
|
+
line-height: sp(24);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.mdw-type[mdw-style="subheading-2"] {
|
|
135
|
+
line-height: sp(28);
|
|
136
|
+
@include breakpoint.maxTabletDevice() {
|
|
137
|
+
line-height: sp(28);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.mdw-type[mdw-texttop-top]::before {
|
|
142
|
+
content: '';
|
|
143
|
+
|
|
144
|
+
display: inline-block;
|
|
145
|
+
|
|
146
|
+
block-size: 1em;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.mdw-type[mdw-baseline-top]::before {
|
|
150
|
+
content: '';
|
|
151
|
+
|
|
152
|
+
display: inline-block;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mdw-type[mdw-baseline-next],
|
|
156
|
+
.mdw-type[mdw-baseline-bottom] {
|
|
157
|
+
&::after {
|
|
158
|
+
content: '';
|
|
159
|
+
|
|
160
|
+
display: inline-block;
|
|
161
|
+
|
|
162
|
+
min-block-size: 1px; // Safari workaround
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.mdw-type[mdw-baseline-next] {
|
|
167
|
+
& + .mdw-type::before {
|
|
168
|
+
content: '';
|
|
169
|
+
|
|
170
|
+
display: inline-block;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@each $bl in $baselines {
|
|
175
|
+
.mdw-type[mdw-texttop-top="#{$bl}dp"] {
|
|
176
|
+
&::before {
|
|
177
|
+
margin-block-start: dp($bl);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
.mdw-type[mdw-texttop-top="#{$bl}"] {
|
|
181
|
+
&::before {
|
|
182
|
+
margin-block-start: sp($bl);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
.mdw-type[mdw-baseline-top="#{$bl}dp"] {
|
|
186
|
+
&::before {
|
|
187
|
+
block-size: dp($bl);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
.mdw-type[mdw-baseline-top="#{$bl}"] {
|
|
191
|
+
&::before {
|
|
192
|
+
block-size: sp($bl);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
.mdw-type[mdw-baseline-bottom="#{$bl}dp"] {
|
|
196
|
+
&::after {
|
|
197
|
+
vertical-align: dp(-$bl);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
.mdw-type[mdw-baseline-bottom="#{$bl}"] {
|
|
201
|
+
&::after {
|
|
202
|
+
vertical-align: sp(-$bl);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
.mdw-type[mdw-baseline-next="#{$bl}dp"] {
|
|
206
|
+
margin-block-end: dp(-$bl);
|
|
207
|
+
|
|
208
|
+
&::after {
|
|
209
|
+
vertical-align: dp(-$bl);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
& + .mdw-type::before {
|
|
213
|
+
block-size: dp($bl);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.mdw-type[mdw-baseline-next="#{$bl}"] {
|
|
217
|
+
margin-block-end: sp(-$bl);
|
|
218
|
+
|
|
219
|
+
&::after {
|
|
220
|
+
vertical-align: sp(-$bl);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
& + .mdw-type::before {
|
|
224
|
+
block-size: sp($bl);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// https://material.io/design/layout/responsive-layout-grid.html#breakpoints
|
|
2
|
+
|
|
3
|
+
@use "./_length.scss" as *;
|
|
4
|
+
|
|
5
|
+
$portraitSmallHandset: 0 !default;
|
|
6
|
+
$portraitMediumHandset: 360px !default;
|
|
7
|
+
$portraitLargeHandset: 400px !default;
|
|
8
|
+
$portraitSmallTablet: 600px !default;
|
|
9
|
+
$portraitLargeTablet: 720px !default;
|
|
10
|
+
$portraitDesktop: 960px !default;
|
|
11
|
+
|
|
12
|
+
$landscapeSmallHandset: 480px !default;
|
|
13
|
+
$landscapeMediumHandset: 600px !default;
|
|
14
|
+
$landscapeLargeHandset: 720px !default;
|
|
15
|
+
$landscapeSmallTablet: 960px !default;
|
|
16
|
+
$landscapeLargeTablet: 1024px !default;
|
|
17
|
+
$landscapeDesktop: 1440px !default;
|
|
18
|
+
|
|
19
|
+
$windowXSmall: 0 !default;
|
|
20
|
+
$windowSmall: 600px !default;
|
|
21
|
+
$windowMedium: 1024px !default;
|
|
22
|
+
$windowLarge: 1440px !default;
|
|
23
|
+
$windowXLarge: 1920px !default;
|
|
24
|
+
|
|
25
|
+
$columns4: 0 !default;
|
|
26
|
+
$columns8: 600px !default;
|
|
27
|
+
$columns12: 840px !default;
|
|
28
|
+
|
|
29
|
+
// Column-count based mixins
|
|
30
|
+
|
|
31
|
+
@mixin is4Columns {
|
|
32
|
+
@media (max-width: #{$columns8 - 1}) {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin min8Columns {
|
|
38
|
+
@media (min-width: $columns8) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin max8Columns {
|
|
44
|
+
@media (max-width: #{$columns12 - 1}) {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@mixin is8Columns {
|
|
50
|
+
@media (min-width: $columns8) and (max-width: #{$columns12 - 1}) {
|
|
51
|
+
@content;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin is12Columns {
|
|
56
|
+
@media (min-width: $columns12) {
|
|
57
|
+
@content;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Smallest width less than 600dp
|
|
62
|
+
|
|
63
|
+
@mixin has16DPMargin {
|
|
64
|
+
@media
|
|
65
|
+
(orientation:portrait) and (max-width: 599px),
|
|
66
|
+
(orientation:landscape) and (max-height: 599px) {
|
|
67
|
+
@content;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Window-size based mixins
|
|
72
|
+
|
|
73
|
+
@mixin isXSmallWindow {
|
|
74
|
+
@media (max-width: #{$windowSmall - 1}) {
|
|
75
|
+
@content;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@mixin minSmallWindow {
|
|
80
|
+
@media (min-width: #{$windowSmall}) {
|
|
81
|
+
@content;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@mixin maxSmallWindow {
|
|
86
|
+
@media (max-width: #{$windowMedium - 1}) {
|
|
87
|
+
@content;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@mixin isSmallWindow {
|
|
92
|
+
@media (min-width: $windowSmall) and (max-width: #{$windowMedium - 1}) {
|
|
93
|
+
@content;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin minMediumWindow {
|
|
98
|
+
@media (min-width: #{$windowMedium}) {
|
|
99
|
+
@content;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@mixin maxMediumWindow {
|
|
104
|
+
@media (max-width: #{$windowLarge - 1}) {
|
|
105
|
+
@content;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@mixin isMediumWindow {
|
|
110
|
+
@media (min-width: $windowMedium) and (max-width: #{$windowLarge - 1}) {
|
|
111
|
+
@content;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin minLargeWindow {
|
|
116
|
+
@media (min-width: #{$windowLarge}) {
|
|
117
|
+
@content;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@mixin maxLargeWindow {
|
|
122
|
+
@media (max-width: #{$windowXLarge - 1}) {
|
|
123
|
+
@content;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@mixin isLargeWindow {
|
|
128
|
+
@media (min-width: $windowLarge) and (max-width: #{$windowXLarge - 1}) {
|
|
129
|
+
@content;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@mixin isXLargeWindow {
|
|
134
|
+
@media (min-width: $windowXLarge) {
|
|
135
|
+
@content;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Device-based mixins
|
|
140
|
+
// Detect size and orientation based on window.screen variables (device-width/device-height)
|
|
141
|
+
// max-device-width is deprecated for promotion of better heuristics (touch, viewport, hover, etc)
|
|
142
|
+
// https://drafts.csswg.org/mediaqueries-4/#mf-deprecated
|
|
143
|
+
// min-device-width is unsafe due to older Android bugs
|
|
144
|
+
// https://developers.google.com/web/fundamentals/design-and-ux/responsive/
|
|
145
|
+
|
|
146
|
+
@mixin isMobileDevicePortrait {
|
|
147
|
+
@media (max-device-width: #{$portraitSmallTablet - 1})
|
|
148
|
+
and (max-device-aspect-ratio: 1 / 1) {
|
|
149
|
+
@content;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
@mixin isMobileDeviceLandscape {
|
|
153
|
+
@media (max-device-width: #{$landscapeSmallTablet - 1})
|
|
154
|
+
and (min-device-aspect-ratio: 1 / 1) {
|
|
155
|
+
@content;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@mixin isMobileDevice {
|
|
160
|
+
@media
|
|
161
|
+
(max-device-width: #{$portraitSmallTablet - 1})
|
|
162
|
+
and (max-device-aspect-ratio: 1 / 1),
|
|
163
|
+
(max-device-width: #{$landscapeSmallTablet - 1})
|
|
164
|
+
and (min-device-aspect-ratio: 1 / 1) {
|
|
165
|
+
@content;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@mixin isTabletDevice {
|
|
170
|
+
@media
|
|
171
|
+
(min-width: $portraitSmallTablet)
|
|
172
|
+
and (max-device-width: #{$portraitDesktop - 1})
|
|
173
|
+
and (max-device-aspect-ratio: 1 / 1),
|
|
174
|
+
(min-width: $landscapeSmallTablet)
|
|
175
|
+
and (max-device-width: #{$landscapeDesktop - 1})
|
|
176
|
+
and (min-device-aspect-ratio: 1 / 1) {
|
|
177
|
+
@content;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@mixin maxTabletDevice {
|
|
182
|
+
@media
|
|
183
|
+
(max-device-width: #{$portraitDesktop - 1})
|
|
184
|
+
and (max-device-aspect-ratio: 1 / 1),
|
|
185
|
+
(max-device-width: #{$landscapeDesktop - 1})
|
|
186
|
+
and (min-device-aspect-ratio: 1 / 1) {
|
|
187
|
+
@content;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
|
|
4
|
+
// https://material.io/archive/guidelines/resources/shadows.html#shadows-sketch
|
|
5
|
+
$shadowValues: (
|
|
6
|
+
0: "none",
|
|
7
|
+
1: "0 00px 02px 0px rgba(0,0,0,0.14), 0 02px 02px 0px rgba(0,0,0,0.12), 0 01px 03px 0 rgba(0,0,0,0.20)",
|
|
8
|
+
2: "0 00px 04px 0px rgba(0,0,0,0.14), 0 03px 04px 0px rgba(0,0,0,0.12), 0 01px 05px 0 rgba(0,0,0,0.20)",
|
|
9
|
+
3: "0 03px 03px 0px rgba(0,0,0,0.14), 0 03px 04px 0px rgba(0,0,0,0.12), 0 01px 08px 0 rgba(0,0,0,0.20)",
|
|
10
|
+
4: "0 02px 04px 0px rgba(0,0,0,0.14), 0 04px 05px 0px rgba(0,0,0,0.12), 0 01px 10px 0 rgba(0,0,0,0.20)",
|
|
11
|
+
6: "0 06px 10px 0px rgba(0,0,0,0.14), 0 01px 18px 0px rgba(0,0,0,0.12), 0 03px 05px 0 rgba(0,0,0,0.20)",
|
|
12
|
+
8: "0 08px 10px 1px rgba(0,0,0,0.14), 0 03px 14px 3px rgba(0,0,0,0.12), 0 04px 15px 0 rgba(0,0,0,0.20)",
|
|
13
|
+
9: "0 09px 12px 1px rgba(0,0,0,0.14), 0 03px 16px 2px rgba(0,0,0,0.12), 0 05px 06px 0 rgba(0,0,0,0.20)",
|
|
14
|
+
12: "0 12px 17px 2px rgba(0,0,0,0.14), 0 05px 22px 4px rgba(0,0,0,0.12), 0 07px 08px 0 rgba(0,0,0,0.20)",
|
|
15
|
+
16: "0 16px 24px 2px rgba(0,0,0,0.14), 0 06px 30px 5px rgba(0,0,0,0.12), 0 08px 10px 0 rgba(0,0,0,0.20)",
|
|
16
|
+
24: "0 24px 38px 3px rgba(0,0,0,0.14), 0 09px 46px 8px rgba(0,0,0,0.12), 0 11px 15px 0 rgba(0,0,0,0.20)"
|
|
17
|
+
) !default;
|
|
18
|
+
|
|
19
|
+
// https://material.io/archive/guidelines/resources/shadows.html#shadows-illustrator
|
|
20
|
+
$filterValues: (
|
|
21
|
+
0: "none",
|
|
22
|
+
1: "drop-shadow(0 00.92px 00.5px rgba(0,0,0,0.26)) drop-shadow(0 0 00.67px rgba(0,0,0,0.08))",
|
|
23
|
+
2: "drop-shadow(0 01.83px 01.0px rgba(0,0,0,0.26)) drop-shadow(0 0 01.33px rgba(0,0,0,0.08))",
|
|
24
|
+
3: "drop-shadow(0 02.75px 01.5px rgba(0,0,0,0.26)) drop-shadow(0 0 02.00px rgba(0,0,0,0.08))",
|
|
25
|
+
4: "drop-shadow(0 03.67px 02.0px rgba(0,0,0,0.26)) drop-shadow(0 0 02.67px rgba(0,0,0,0.08))",
|
|
26
|
+
6: "drop-shadow(0 05.50px 03.0px rgba(0,0,0,0.26)) drop-shadow(0 0 04.00px rgba(0,0,0,0.08))",
|
|
27
|
+
8: "drop-shadow(0 07.33px 04.0px rgba(0,0,0,0.26)) drop-shadow(0 0 05.33px rgba(0,0,0,0.08))",
|
|
28
|
+
9: "drop-shadow(0 08.25px 04.5px rgba(0,0,0,0.26)) drop-shadow(0 0 06.00px rgba(0,0,0,0.08))",
|
|
29
|
+
12: "drop-shadow(0 11.00px 06.0px rgba(0,0,0,0.26)) drop-shadow(0 0 08.00px rgba(0,0,0,0.08))",
|
|
30
|
+
16: "drop-shadow(0 14.67px 08.0px rgba(0,0,0,0.26)) drop-shadow(0 0 10.67px rgba(0,0,0,0.08))",
|
|
31
|
+
24: "drop-shadow(0 22.12px 12.0px rgba(0,0,0,0.26)) drop-shadow(0 0 16.00px rgba(0,0,0,0.08))",
|
|
32
|
+
) !default;
|
|
33
|
+
|
|
34
|
+
// https://material.io/design/color/dark-theme.html#properties
|
|
35
|
+
$dark-theme-filter: (
|
|
36
|
+
0: "none",
|
|
37
|
+
1: "brightness(1.05)",
|
|
38
|
+
2: "brightness(1.07)",
|
|
39
|
+
3: "brightness(1.08)",
|
|
40
|
+
4: "brightness(1.09)",
|
|
41
|
+
6: "brightness(1.11)",
|
|
42
|
+
8: "brightness(1.12)",
|
|
43
|
+
9: "brightness(1.13)",
|
|
44
|
+
12: "brightness(1.14)",
|
|
45
|
+
16: "brightness(1.15)",
|
|
46
|
+
24: "brightness(1.16)"
|
|
47
|
+
) !default;
|
|
48
|
+
|
|
49
|
+
// https://material.io/design/color/dark-theme.html#properties
|
|
50
|
+
$dark-theme-opacity: (
|
|
51
|
+
0: 0,
|
|
52
|
+
1: 0.05,
|
|
53
|
+
2: 0.07,
|
|
54
|
+
3: 0.08,
|
|
55
|
+
4: 0.09,
|
|
56
|
+
6: 0.11,
|
|
57
|
+
8: 0.12,
|
|
58
|
+
9: 0.13,
|
|
59
|
+
12: 0.14,
|
|
60
|
+
16: 0.15,
|
|
61
|
+
24: 0.16,
|
|
62
|
+
) !default;
|
|
63
|
+
|
|
64
|
+
@mixin boxShadowMixin($dp) {
|
|
65
|
+
box-shadow: #{string.unquote(map.get($shadowValues, $dp))};
|
|
66
|
+
|
|
67
|
+
&::before {
|
|
68
|
+
--mdw-overlay__base-opacity: var(--mdw-overlay__base-opacity-elevation_#{$dp});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@function boxShadow($dp) {
|
|
73
|
+
@return unquote(map-get($shadowValues, $dp));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@function filter($dp) {
|
|
77
|
+
@return unquote(map-get($filterValues, $dp));
|
|
78
|
+
}
|