@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
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
@import '../common/functions.scss';
|
|
2
|
-
@import '../common/mixins.scss';
|
|
3
|
-
|
|
4
|
-
$selectionColors: (
|
|
5
|
-
text-color: ((#000, 0.87), (#fff, 1.00)),
|
|
6
|
-
color: ((#000, 0.54), (#fff, 0.70)),
|
|
7
|
-
ripple-color: ( #000 , #fff ),
|
|
8
|
-
ripple-opacity: ( 0.12 , 0.30 , 0.20),
|
|
9
|
-
disabled-color: ((#000, 0.26), (#fff, 0.30)),
|
|
10
|
-
thumb-on-color: ( currentColor , currentColor ),
|
|
11
|
-
thumb-disabled-color: ( #BDBDBD , #424242 ),
|
|
12
|
-
thumb-off-color: ( #FAFAFA , #BDBDBD ),
|
|
13
|
-
|
|
14
|
-
track-on-color: ( currentColor , currentColor ),
|
|
15
|
-
track-on-opacity: ( 0.50 , 0.50 ),
|
|
16
|
-
|
|
17
|
-
track-off-color: ( #000000 , #FFFFFF ),
|
|
18
|
-
track-off-opacity: ( 0.38 , 0.30 ),
|
|
19
|
-
|
|
20
|
-
track-disabled-color: ( #000000 , #FFFFFF ),
|
|
21
|
-
track-disabled-opacity: ( 0.12 , 0.10 ),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
@function selectionThemeValue($key, $type, $theme) {
|
|
25
|
-
@return themeValue('selection', $selectionColors, $key, $type, $theme);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@mixin selectionThemeVariables($color, $lightness) {
|
|
29
|
-
@include themeVariables('selection', $selectionColors, $color, $lightness);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Vary by contrast
|
|
33
|
-
@mixin selectionContrastRules($type: 'var', $theme: null) {
|
|
34
|
-
.mdw-selection__input {
|
|
35
|
-
color: selectionThemeValue("ripple-color", $type, $theme);
|
|
36
|
-
&:active:not(:disabled),
|
|
37
|
-
&:focus {
|
|
38
|
-
opacity: selectionThemeValue("ripple-opacity", $type, $theme);
|
|
39
|
-
}
|
|
40
|
-
&[type="checkbox"]:not(:checked) ~ .mdw-selection__icon,
|
|
41
|
-
&[type="checkbox"]:active:not(:disabled) ~ .mdw-selection__icon {
|
|
42
|
-
color: selectionThemeValue("color", $type, $theme);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[type="radio"]:not(:checked) ~ .mdw-selection__icon {
|
|
46
|
-
color: selectionThemeValue("color", $type, $theme);
|
|
47
|
-
}
|
|
48
|
-
&[type="checkbox"]:checked ~ .mdw-selection__icon::after {
|
|
49
|
-
// Checkbox color is based on currently filled background-color
|
|
50
|
-
@if($type == 'var') {
|
|
51
|
-
border-color: unquote("rgb(var(--background-color))");
|
|
52
|
-
} @else {
|
|
53
|
-
// IE11 Fallback
|
|
54
|
-
border-color: white;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
&:disabled ~ .mdw-selection__label,
|
|
58
|
-
&:disabled ~ .mdw-selection__icon,
|
|
59
|
-
&:disabled ~ .mdw-selection__icon::before {
|
|
60
|
-
color: selectionThemeValue("disabled-color", $type, $theme);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
.mdw-selection__label,
|
|
64
|
-
.mdw-selection[mdw-theme-color] .mdw-selection__input:not(:disabled) ~ .mdw-selection__label {
|
|
65
|
-
color: selectionThemeValue("text-color", $type, $theme);
|
|
66
|
-
}
|
|
67
|
-
.mdw-selection[mdw-switch] .mdw-selection__input[type="checkbox"] {
|
|
68
|
-
|
|
69
|
-
& ~ .mdw-selection__icon {
|
|
70
|
-
&::before {
|
|
71
|
-
background-color: selectionThemeValue("thumb-off-color", $type, $theme);
|
|
72
|
-
}
|
|
73
|
-
&::after {
|
|
74
|
-
background-color: selectionThemeValue("track-off-color", $type, $theme);
|
|
75
|
-
opacity: selectionThemeValue("track-off-opacity", $type, $theme);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
&:checked ~ .mdw-selection__icon {
|
|
79
|
-
&::before {
|
|
80
|
-
background-color: selectionThemeValue("thumb-on-color", $type, $theme);
|
|
81
|
-
}
|
|
82
|
-
&::after {
|
|
83
|
-
background-color: selectionThemeValue("track-on-color", $type, $theme);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
&:disabled ~ .mdw-selection__icon {
|
|
87
|
-
&::before {
|
|
88
|
-
background-color: selectionThemeValue("thumb-disabled-color", $type, $theme);
|
|
89
|
-
}
|
|
90
|
-
&::after {
|
|
91
|
-
background-color: selectionThemeValue("track-disabled-color", $type, $theme);
|
|
92
|
-
opacity: selectionThemeValue("track-disabled-opacity", $type, $theme);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/snackbars.html#spec
|
|
2
|
-
|
|
3
|
-
// Guidelines conflict stating a background should be fully opaque
|
|
4
|
-
// But says spec says to use #000000 with 87% opacity
|
|
5
|
-
// Calculated against white, opaque value is #212121 (Grey-900)
|
|
6
|
-
|
|
7
|
-
$snackbar__background-color: #212121;
|
|
8
|
-
$snackbar__color: rgba(255, 255, 255, 0.87);
|
|
9
|
-
$snackbar__scale-up__from: 0.85;
|
|
10
|
-
|
|
11
|
-
.mdw-snackbar__wrapper {
|
|
12
|
-
position: relative;
|
|
13
|
-
z-index: 6;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.mdw-snackbar__container {
|
|
17
|
-
position: absolute;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: row;
|
|
20
|
-
z-index: 6;
|
|
21
|
-
left: 0;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
right: 0;
|
|
24
|
-
justify-content: flex-start;
|
|
25
|
-
&[mdw-position="end"] {
|
|
26
|
-
justify-content: flex-end;
|
|
27
|
-
}
|
|
28
|
-
&[mdw-position="center"] {
|
|
29
|
-
justify-content: center;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.mdw-snackbar {
|
|
34
|
-
position: absolute;
|
|
35
|
-
bottom: 0;
|
|
36
|
-
padding: 0 dp(16);
|
|
37
|
-
min-height: dp(48);
|
|
38
|
-
max-width: 100%;
|
|
39
|
-
border-radius: dp(4);
|
|
40
|
-
|
|
41
|
-
box-shadow: elevation(6);
|
|
42
|
-
|
|
43
|
-
background: $snackbar__background-color;
|
|
44
|
-
color: $snackbar__color;
|
|
45
|
-
|
|
46
|
-
@include type-rules('body-2');
|
|
47
|
-
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: space-between;
|
|
51
|
-
|
|
52
|
-
// Default state is shown
|
|
53
|
-
opacity: 1;
|
|
54
|
-
transform: scale(1);
|
|
55
|
-
will-change: opacity, transform;
|
|
56
|
-
transition-property: opacity, transform;
|
|
57
|
-
transition-timing-function: $motion-easing-deceleration;
|
|
58
|
-
transition-delay: 0s, 0s;
|
|
59
|
-
transition-duration: $motion-duration-desktop-enter;
|
|
60
|
-
@include allHandsets {
|
|
61
|
-
transition-duration: $motion-duration-mobile-enter;
|
|
62
|
-
}
|
|
63
|
-
@include allTablets {
|
|
64
|
-
transition-duration: $motion-duration-tablet-enter;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Disable animations with explicit visibility
|
|
68
|
-
&[mdw-autohide] {
|
|
69
|
-
animation-fill-mode: forwards;
|
|
70
|
-
animation-name: showSnackbar, hideSnackbar;
|
|
71
|
-
animation-timing-function: $motion-easing-deceleration, $motion-easing-acceleration;
|
|
72
|
-
animation-delay: 0s, 4s;
|
|
73
|
-
animation-duration: $motion-duration-desktop-enter, $motion-duration-desktop-leave;
|
|
74
|
-
@include allHandsets {
|
|
75
|
-
animation-duration: $motion-duration-mobile-enter, $motion-duration-mobile-leave;
|
|
76
|
-
}
|
|
77
|
-
@include allTablets {
|
|
78
|
-
animation-duration: $motion-duration-tablet-enter, $motion-duration-tablet-leave;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Disable animation with explicit visibility
|
|
83
|
-
&[mdw-show],
|
|
84
|
-
&[mdw-hide] {
|
|
85
|
-
animation-name: none;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&[mdw-consecutive]:not([mdw-hide]) {
|
|
89
|
-
// Delay showing consecutive snackbar equal to previous snackbar's leave time
|
|
90
|
-
transition-delay: $motion-duration-desktop-leave;
|
|
91
|
-
@include allHandsets {
|
|
92
|
-
transition-delay: $motion-duration-mobile-leave;
|
|
93
|
-
}
|
|
94
|
-
@include allTablets {
|
|
95
|
-
transition-delay: $motion-duration-tablet-leave;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&[mdw-hide] {
|
|
100
|
-
opacity: 0;
|
|
101
|
-
transform: scale($snackbar__scale-up__from);
|
|
102
|
-
|
|
103
|
-
transition-timing-function: $motion-easing-acceleration;
|
|
104
|
-
transition-duration: $motion-duration-desktop-leave;
|
|
105
|
-
transition-delay: 0s, $motion-duration-desktop-leave;
|
|
106
|
-
@include allHandsets {
|
|
107
|
-
transition-duration: $motion-duration-mobile-leave;
|
|
108
|
-
transition-delay: 0s, $motion-duration-mobile-leave;
|
|
109
|
-
}
|
|
110
|
-
@include allTablets {
|
|
111
|
-
transition-duration: $motion-duration-tablet-leave;
|
|
112
|
-
transition-delay: 0s, $motion-duration-tablet-leave;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@for $seconds from 5 to 11 {
|
|
117
|
-
&[mdw-autohide="#{$seconds}"] {
|
|
118
|
-
animation-delay: 0s, #{$seconds}s;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
@keyframes hideSnackbar {
|
|
125
|
-
from {
|
|
126
|
-
opacity: 1;
|
|
127
|
-
}
|
|
128
|
-
to {
|
|
129
|
-
opacity: 0;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@keyframes showSnackbar {
|
|
134
|
-
from {
|
|
135
|
-
opacity: 0;
|
|
136
|
-
}
|
|
137
|
-
to {
|
|
138
|
-
opacity: 1;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.mdw-snackbar .mdw-button {
|
|
143
|
-
order: 1;
|
|
144
|
-
margin-top: dp(6);
|
|
145
|
-
margin-bottom: dp(6);
|
|
146
|
-
margin-left: dp(8);
|
|
147
|
-
margin-right: dp(-8);
|
|
148
|
-
html[dir=rtl] & {
|
|
149
|
-
margin-left: dp(-8);
|
|
150
|
-
margin-right: dp(8);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.mdw-snackbar > span {
|
|
155
|
-
white-space: pre-line;
|
|
156
|
-
@include baseline-top(30);
|
|
157
|
-
@include baseline-bottom(48 - 30);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
@media screen and (max-width: $breakpoint-portrait-handset-max) {
|
|
161
|
-
.mdw-snackbar {
|
|
162
|
-
left: 0;
|
|
163
|
-
right: 0;
|
|
164
|
-
&[mdw-stacked] {
|
|
165
|
-
flex-direction: column;
|
|
166
|
-
align-items: flex-end;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
> span {
|
|
169
|
-
width: 100%;
|
|
170
|
-
}
|
|
171
|
-
.mdw-button {
|
|
172
|
-
margin-top: dp(2);
|
|
173
|
-
margin-bottom: dp(8);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@include IEOnly() {
|
|
180
|
-
// Fix IE flexbug
|
|
181
|
-
.mdw-snackbar {
|
|
182
|
-
&::after {
|
|
183
|
-
content: '';
|
|
184
|
-
min-width: 0;
|
|
185
|
-
min-height: inherit;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
.mdw-snackbar__container[mdw-position="center"] {
|
|
189
|
-
.mdw-snackbar {
|
|
190
|
-
transform: translateX(-50%);
|
|
191
|
-
&[mdw-hide] {
|
|
192
|
-
transform: translateX(-50%) scale($snackbar__scale-up__from);
|
|
193
|
-
}
|
|
194
|
-
html[dir=rtl] & {
|
|
195
|
-
transform: translateX(50%);
|
|
196
|
-
&[mdw-hide] {
|
|
197
|
-
transform: translateX(50%) scale($snackbar__scale-up__from);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
.mdw-snackbar__container[mdw-position="end"] {
|
|
203
|
-
.mdw-snackbar {
|
|
204
|
-
right: 0;
|
|
205
|
-
html[dir=rtl] & {
|
|
206
|
-
left: 0;
|
|
207
|
-
right: auto;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
}
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/tabs.html#spec
|
|
2
|
-
|
|
3
|
-
@import '../common/functions.scss';
|
|
4
|
-
@import '../common/motion.scss';
|
|
5
|
-
|
|
6
|
-
$tab__icon-size: 24;
|
|
7
|
-
$tab__icon-margin-top: 12;
|
|
8
|
-
$tab__icon-to-label-baseline: 20;
|
|
9
|
-
$tab__icon-with-label-height: 72;
|
|
10
|
-
|
|
11
|
-
.mdw-tab {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.mdw-tab__items {
|
|
17
|
-
overflow-y: hidden;
|
|
18
|
-
position: relative;
|
|
19
|
-
|
|
20
|
-
flex: none;
|
|
21
|
-
|
|
22
|
-
display: flex; // IE11 doesn't support grid-auto-columns
|
|
23
|
-
display: grid;
|
|
24
|
-
|
|
25
|
-
grid-auto-columns: 1fr;
|
|
26
|
-
|
|
27
|
-
justify-content: flex-start;
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
&[mdw-scrollable] {
|
|
30
|
-
display: flex;
|
|
31
|
-
overflow-x: auto;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
> .mdw-tab__item {
|
|
34
|
-
min-width: dp(90);
|
|
35
|
-
max-width: 100%;
|
|
36
|
-
flex: none;
|
|
37
|
-
}
|
|
38
|
-
> .mdw-tab__indicator {
|
|
39
|
-
margin-left: dp(52);
|
|
40
|
-
}
|
|
41
|
-
&::before,
|
|
42
|
-
&::after {
|
|
43
|
-
// Ensures 52dp blank space at end
|
|
44
|
-
content: "";
|
|
45
|
-
min-width: dp(52);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.mdw-tab__indicator {
|
|
51
|
-
position: absolute;
|
|
52
|
-
bottom: 0;
|
|
53
|
-
height: 2px;
|
|
54
|
-
width: 0;
|
|
55
|
-
left: 0;
|
|
56
|
-
right: auto;
|
|
57
|
-
html[dir=rtl] & {
|
|
58
|
-
right: 0;
|
|
59
|
-
left: auto;
|
|
60
|
-
}
|
|
61
|
-
background-color: currentColor;
|
|
62
|
-
transform-origin: left center;
|
|
63
|
-
transition-property: transform;
|
|
64
|
-
transition-timing-function: $motion-easing-standard;
|
|
65
|
-
transition-duration: $motion-duration-desktop-default;
|
|
66
|
-
@include allHandsets {
|
|
67
|
-
transition-duration: $motion-duration-mobile-default;
|
|
68
|
-
}
|
|
69
|
-
@include allTablets {
|
|
70
|
-
transition-duration: $motion-duration-tablet-default;
|
|
71
|
-
}
|
|
72
|
-
// Indicator width
|
|
73
|
-
// Element position = 2 * number of input elements + 1 (itself)
|
|
74
|
-
// Width = 100% / number of input elements
|
|
75
|
-
@for $j from 1 through 8 {
|
|
76
|
-
&:nth-child(#{$j + 1}) {
|
|
77
|
-
width: #{100% / $j};
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// Indicator offset
|
|
81
|
-
@for $i from 1 through 8 {
|
|
82
|
-
.mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items > &,
|
|
83
|
-
.mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items-wrapper .mdw-tab__items > &,
|
|
84
|
-
.mdw-tab__item[mdw-selected]:nth-of-type(#{$i}) ~ & {
|
|
85
|
-
transform: translateX(#{100% * ($i - 1)});
|
|
86
|
-
}
|
|
87
|
-
html[dir=rtl] .mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items > &,
|
|
88
|
-
html[dir=rtl] .mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items-wrapper .mdw-tab__items > &,
|
|
89
|
-
html[dir=rtl] .mdw-tab__item[mdw-selected]:nth-of-type(#{$i}) ~ & {
|
|
90
|
-
transform: translateX(#{-100% * ($i - 1)});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&[mdw-js-indicator] {
|
|
95
|
-
width: 1px;
|
|
96
|
-
transform: translateX(0);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.mdw-tab__item {
|
|
101
|
-
min-height: dp(48); // Redundant but needed for IE11
|
|
102
|
-
position: relative;
|
|
103
|
-
display: flex;
|
|
104
|
-
flex: auto;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
align-items: center;
|
|
107
|
-
|
|
108
|
-
grid-row: 1;
|
|
109
|
-
|
|
110
|
-
box-shadow: none;
|
|
111
|
-
box-sizing: content-box;
|
|
112
|
-
border-radius: 0;
|
|
113
|
-
z-index: 0;
|
|
114
|
-
overflow: hidden;
|
|
115
|
-
cursor: pointer;
|
|
116
|
-
user-select: none;
|
|
117
|
-
-moz-user-select: none;
|
|
118
|
-
-ms-user-select: none;
|
|
119
|
-
-webkit-user-select: none;
|
|
120
|
-
-webkit-tap-highlight-color: transparent;
|
|
121
|
-
.mdw-tab__input:checked + & {
|
|
122
|
-
cursor: default;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
> .mdw-ripple {
|
|
126
|
-
@include mdw-ripple__container;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
& > .mdw-ripple > .mdw-ripple__inner,
|
|
130
|
-
&::after {
|
|
131
|
-
@include mdw-ripple__inner;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
& > .mdw-ripple:active > .mdw-ripple__inner,
|
|
135
|
-
&:active::after {
|
|
136
|
-
@include mdw-ripple__active;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&[mdw-ripple] {
|
|
140
|
-
overflow: visible;
|
|
141
|
-
&::after {
|
|
142
|
-
// If using custom ripple, destroy ::after object
|
|
143
|
-
content: none;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.mdw-tab__icon {
|
|
149
|
-
margin-top: dp($tab__icon-margin-top);
|
|
150
|
-
@include baseline-bottom($tab__icon-to-label-baseline);
|
|
151
|
-
margin-bottom: dp(-$tab__icon-to-label-baseline);
|
|
152
|
-
pointer-events: none;
|
|
153
|
-
transition-property: color;
|
|
154
|
-
transition-timing-function: $motion-easing-standard;
|
|
155
|
-
transition-duration: $motion-duration-desktop-default;
|
|
156
|
-
@include allHandsets {
|
|
157
|
-
transition-duration: $motion-duration-mobile-default;
|
|
158
|
-
}
|
|
159
|
-
@include allTablets {
|
|
160
|
-
transition-duration: $motion-duration-tablet-default;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.mdw-tab__label {
|
|
165
|
-
@include type-rules('button');
|
|
166
|
-
|
|
167
|
-
box-sizing: border-box;
|
|
168
|
-
margin-top: auto;
|
|
169
|
-
margin-bottom: auto;
|
|
170
|
-
pointer-events: none;
|
|
171
|
-
padding: 0 dp(16);
|
|
172
|
-
|
|
173
|
-
text-align: center;
|
|
174
|
-
transition-property: color;
|
|
175
|
-
transition-timing-function: $motion-easing-standard;
|
|
176
|
-
transition-duration: $motion-duration-desktop-default;
|
|
177
|
-
@include allHandsets {
|
|
178
|
-
transition-duration: $motion-duration-mobile-default;
|
|
179
|
-
}
|
|
180
|
-
@include allTablets {
|
|
181
|
-
transition-duration: $motion-duration-tablet-default;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.mdw-tab__icon ~ & {
|
|
185
|
-
margin: 0;
|
|
186
|
-
min-height: 0;
|
|
187
|
-
display: block;
|
|
188
|
-
@include baseline-top($tab__icon-to-label-baseline);
|
|
189
|
-
@include baseline-bottom($tab__icon-with-label-height
|
|
190
|
-
- $tab__icon-margin-top
|
|
191
|
-
- $tab__icon-size
|
|
192
|
-
- $tab__icon-to-label-baseline
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.mdw-tab__input {
|
|
198
|
-
display: inline-block;
|
|
199
|
-
height: 0;
|
|
200
|
-
width: 0;
|
|
201
|
-
margin: 0;
|
|
202
|
-
padding: 0;
|
|
203
|
-
|
|
204
|
-
outline: none;
|
|
205
|
-
pointer-events: none;
|
|
206
|
-
-moz-appearance: none;
|
|
207
|
-
-webkit-appearance: none;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.mdw-tab__item[mdw-selected] > .mdw-tab__icon,
|
|
211
|
-
.mdw-tab__item[mdw-selected] > .mdw-tab__label {
|
|
212
|
-
color: inherit;
|
|
213
|
-
}
|
|
214
|
-
@for $i from 1 through 8 {
|
|
215
|
-
.mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items,
|
|
216
|
-
.mdw-tab__input:checked:nth-of-type(#{$i}) ~ .mdw-tab__items-wrapper .mdw-tab__items {
|
|
217
|
-
& > .mdw-tab__item:nth-child(#{$i}) {
|
|
218
|
-
> .mdw-tab__icon,
|
|
219
|
-
> .mdw-tab__label {
|
|
220
|
-
color: inherit;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.mdw-tab__content {
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: row;
|
|
229
|
-
flex-grow: 1;
|
|
230
|
-
align-items: stretch;
|
|
231
|
-
overflow-x: hidden;
|
|
232
|
-
position: relative;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.mdw-tab__content-item {
|
|
236
|
-
max-width: 100%;
|
|
237
|
-
visibility: hidden;
|
|
238
|
-
flex-basis: 100%;
|
|
239
|
-
flex-shrink: 0;
|
|
240
|
-
transition-property: transform, visibility;
|
|
241
|
-
transition-timing-function: $motion-easing-standard;
|
|
242
|
-
transition-duration: $motion-duration-desktop-default, 0s;
|
|
243
|
-
transition-delay: 0s, $motion-duration-desktop-default;
|
|
244
|
-
@include allHandsets {
|
|
245
|
-
transition-duration: $motion-duration-mobile-default, 0s;
|
|
246
|
-
transition-delay: 0s, $motion-duration-mobile-default;
|
|
247
|
-
}
|
|
248
|
-
@include allTablets {
|
|
249
|
-
transition-duration: $motion-duration-tablet-default, 0s;
|
|
250
|
-
transition-delay: 0s, $motion-duration-tablet-default;
|
|
251
|
-
}
|
|
252
|
-
@for $j from 1 through 8 {
|
|
253
|
-
.mdw-tab__content[mdw-selected-index="#{$j - 1}"] > &,
|
|
254
|
-
.mdw-tab__input:checked:nth-of-type(#{$j}) ~ .mdw-tab__content > & {
|
|
255
|
-
transform: translateX(#{-100% * ($j - 1)});
|
|
256
|
-
&:nth-child(#{$j}) {
|
|
257
|
-
visibility: visible;
|
|
258
|
-
transition-delay: 0s, 0s;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
html[dir=rtl] .mdw-tab__content[mdw-selected-index="#{$j - 1}"] > &,
|
|
262
|
-
html[dir=rtl] .mdw-tab__input:checked:nth-of-type(#{$j}) ~ .mdw-tab__content > & {
|
|
263
|
-
transform: translateX(#{100% * ($j - 1)});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.mdw-tab__content[mdw-scrollsnap] {
|
|
269
|
-
scroll-snap-type: x mandatory;
|
|
270
|
-
-ms-scroll-snap-type: x mandatory;
|
|
271
|
-
overflow-x: scroll;
|
|
272
|
-
.mdw-tab__content-item {
|
|
273
|
-
scroll-snap-align: start none;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
@import '../common/functions.scss';
|
|
2
|
-
@import '../common/mixins.scss';
|
|
3
|
-
|
|
4
|
-
$tabColors: (
|
|
5
|
-
active-color: ((#000, 0.87), (#fff, 1.00)),
|
|
6
|
-
inactive-color: ((#000, 0.54), (#fff, 0.70)),
|
|
7
|
-
ripple-opacity: ( 0.26 , 0.30),
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
@function tabThemeValue($key, $type, $theme) {
|
|
11
|
-
@return themeValue('tab', $tabColors, $key, $type, $theme);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin tabThemeVariables($color, $lightness) {
|
|
15
|
-
@include themeVariables('tab', $tabColors, $color, $lightness);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Vary by contrast
|
|
19
|
-
@mixin tabContrastRules($type: 'var', $theme: null) {
|
|
20
|
-
.mdw-tab__items:not([mdw-theme-color]) {
|
|
21
|
-
color: tabThemeValue("active-color", $type, $theme);
|
|
22
|
-
}
|
|
23
|
-
.mdw-tab__icon,
|
|
24
|
-
.mdw-tab__label {
|
|
25
|
-
color: tabThemeValue("inactive-color", $type, $theme);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.mdw-tab__item {
|
|
29
|
-
& > .mdw-ripple > .mdw-ripple__inner,
|
|
30
|
-
&::after {
|
|
31
|
-
opacity: tabThemeValue("ripple-opacity", $type, $theme);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@import '../common/functions.scss';
|
|
2
|
-
@import '../common/mixins.scss';
|
|
3
|
-
|
|
4
|
-
$templateColors: (
|
|
5
|
-
text-color: ((#000, 0.54), (#fff, 0.87), (#fff, 1.00)),
|
|
6
|
-
border-color: (('primary', '700', 0.87), ('primary', '200', 1.0)),
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
@function templateThemeValue($key, $type, $theme) {
|
|
10
|
-
@return themeValue('template', $templateColors, $key, $type, $theme);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@mixin templateThemeVariables($color, $lightness) {
|
|
14
|
-
@include themeVariables('template', $templateColors, $color, $lightness);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Vary by contrast
|
|
18
|
-
@mixin templateContrastRules($type: 'var', $theme: null) {
|
|
19
|
-
@at-root {
|
|
20
|
-
#{&}.mdw-template {
|
|
21
|
-
color: templateThemeValue("text-color", $type, $theme);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Varies by theme
|
|
27
|
-
@mixin templateThemeRules($theme: null) {
|
|
28
|
-
.mdw-template[mdw-theme-fill] {
|
|
29
|
-
border-color: templateThemeValue('border-color', null, $theme);
|
|
30
|
-
}
|
|
31
|
-
}
|