@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,136 +0,0 @@
|
|
|
1
|
-
// https://material.io/guidelines/components/progress-activity.html#
|
|
2
|
-
|
|
3
|
-
$radius: 8.75;
|
|
4
|
-
$pi: 3.14159265359;
|
|
5
|
-
$circumference: 2 * $pi * $radius;
|
|
6
|
-
$duration: 1500ms;
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
* SVG Animated Material Spin Animation
|
|
10
|
-
* radius = 8.75
|
|
11
|
-
* pi = 3.14159
|
|
12
|
-
* circumference = 2 * pi * r = (54.977825)
|
|
13
|
-
* dash-length = circumference * (100-x)/100
|
|
14
|
-
*
|
|
15
|
-
* Every cycle rotates entire shape an additional -90deg (CCW)
|
|
16
|
-
*
|
|
17
|
-
* Entire animation rotates 4x speed (CW)
|
|
18
|
-
*
|
|
19
|
-
* 1. Start 0.072% from head
|
|
20
|
-
* 2. Increase to 75% from head
|
|
21
|
-
* 3. Reduce tail to 0.521% from tail
|
|
22
|
-
* 4. Rotate -90 deg
|
|
23
|
-
*
|
|
24
|
-
* Animate with ease-in-out
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@function circlePercentage($percent, $limit: 100) {
|
|
29
|
-
@return $circumference * ((3 * ($limit/100)) - $percent/100);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@keyframes rotate-clockwise {
|
|
33
|
-
from {
|
|
34
|
-
transform: rotate(0deg);
|
|
35
|
-
}
|
|
36
|
-
to {
|
|
37
|
-
transform: rotate(360deg);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@keyframes rotate-counterclockwise {
|
|
42
|
-
0% {
|
|
43
|
-
transform: rotate(0deg);
|
|
44
|
-
}
|
|
45
|
-
100% {
|
|
46
|
-
transform: rotate(-360deg)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@keyframes mdw-progress-dash {
|
|
51
|
-
0% {
|
|
52
|
-
stroke-dashoffset: circlePercentage(0.5, 75);
|
|
53
|
-
}
|
|
54
|
-
50% {
|
|
55
|
-
stroke-dashoffset: circlePercentage(75,75);
|
|
56
|
-
}
|
|
57
|
-
100% {
|
|
58
|
-
stroke-dashoffset: circlePercentage(149.5,75);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.mdw-progress-circle {
|
|
63
|
-
width: 48px;
|
|
64
|
-
height: 48px;
|
|
65
|
-
stroke-width: 2.5;
|
|
66
|
-
margin: 8px;
|
|
67
|
-
svg {
|
|
68
|
-
width:100%;
|
|
69
|
-
height:100%;
|
|
70
|
-
transform: rotate(0deg);
|
|
71
|
-
will-change: transform;
|
|
72
|
-
animation-name: rotate-clockwise;
|
|
73
|
-
animation-duration: $duration;
|
|
74
|
-
animation-timing-function: linear;
|
|
75
|
-
animation-iteration-count: infinite;
|
|
76
|
-
& > path {
|
|
77
|
-
fill: none;
|
|
78
|
-
stroke-width: inherit;
|
|
79
|
-
stroke: currentColor;
|
|
80
|
-
transform-origin: center center;
|
|
81
|
-
&:nth-child(1) {
|
|
82
|
-
stroke-linecap: square;
|
|
83
|
-
stroke-dasharray: $circumference * 0.75;
|
|
84
|
-
stroke-dashoffset: circlePercentage(33.33, 75);
|
|
85
|
-
transform: rotate(0deg);
|
|
86
|
-
will-change: stroke-dashoffset, transform;
|
|
87
|
-
animation-name: mdw-progress-dash, rotate-counterclockwise;
|
|
88
|
-
animation-duration: $duration, $duration * 4;
|
|
89
|
-
animation-timing-function: $motion-easing-standard, steps(4,end);
|
|
90
|
-
animation-iteration-count: infinite;
|
|
91
|
-
}
|
|
92
|
-
&:nth-child(2) {
|
|
93
|
-
display: none;
|
|
94
|
-
transition-property: stroke-dashoffset;
|
|
95
|
-
transition-duration: $duration;
|
|
96
|
-
stroke-dashoffset: circlePercentage(0, 100);
|
|
97
|
-
stroke-dasharray: $circumference;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// IE and Edge do not support animated SVG
|
|
104
|
-
@include MSOnly {
|
|
105
|
-
&:not([mdw-determinate]) svg {
|
|
106
|
-
animation-duration: $duration / 2;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.mdw-progress-circle[mdw-determinate] {
|
|
112
|
-
svg {
|
|
113
|
-
animation: none;
|
|
114
|
-
will-change: none;
|
|
115
|
-
transform: none;
|
|
116
|
-
& > path {
|
|
117
|
-
&:nth-child(1) {
|
|
118
|
-
display: none;
|
|
119
|
-
animation: none;
|
|
120
|
-
will-change: none;
|
|
121
|
-
transform: none;
|
|
122
|
-
}
|
|
123
|
-
&:nth-child(2) {
|
|
124
|
-
display: inline;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.mdw-progress-circle[value='100'] {
|
|
131
|
-
svg {
|
|
132
|
-
& > path:nth-child(2) {
|
|
133
|
-
stroke-dashoffset: circlePercentage(100);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { getChildElementByClass } from '../common/dom';
|
|
2
|
-
|
|
3
|
-
class Ripple {
|
|
4
|
-
/**
|
|
5
|
-
* @param {Element} element
|
|
6
|
-
* @return {void}
|
|
7
|
-
*/
|
|
8
|
-
static attach(element) {
|
|
9
|
-
let ripple = getChildElementByClass(element, 'mdw-ripple');
|
|
10
|
-
if (!ripple) {
|
|
11
|
-
ripple = document.createElement('div');
|
|
12
|
-
ripple.classList.add('mdw-ripple');
|
|
13
|
-
if (element.firstChild) {
|
|
14
|
-
element.insertBefore(ripple, element.firstChild);
|
|
15
|
-
} else {
|
|
16
|
-
element.appendChild(ripple);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let rippleInner = getChildElementByClass(ripple, 'mdw-ripple__inner');
|
|
21
|
-
if (!rippleInner) {
|
|
22
|
-
rippleInner = document.createElement('div');
|
|
23
|
-
rippleInner.classList.add('mdw-ripple__inner');
|
|
24
|
-
ripple.appendChild(rippleInner);
|
|
25
|
-
}
|
|
26
|
-
element.setAttribute('mdw-ripple', '');
|
|
27
|
-
ripple.addEventListener('click', Ripple.onClick);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @param {PointerEvent|MouseEvent} event
|
|
32
|
-
* @return {void}
|
|
33
|
-
*/
|
|
34
|
-
static onClick(event) {
|
|
35
|
-
/** @type {HTMLElement} */
|
|
36
|
-
const el = event.currentTarget;
|
|
37
|
-
const rippleInner = getChildElementByClass(el, 'mdw-ripple__inner');
|
|
38
|
-
if (!rippleInner) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (!event.pointerType && !event.detail) {
|
|
42
|
-
// Ripple from center
|
|
43
|
-
rippleInner.style.removeProperty('left');
|
|
44
|
-
rippleInner.style.removeProperty('top');
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
rippleInner.style.setProperty('left', `${event.offsetX}px`);
|
|
48
|
-
rippleInner.style.setProperty('top', `${event.offsetY}px`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
static detach(element) {
|
|
52
|
-
const ripple = getChildElementByClass(element, 'mdw-ripple');
|
|
53
|
-
if (ripple) {
|
|
54
|
-
element.removeChild(ripple);
|
|
55
|
-
}
|
|
56
|
-
element.removeAttribute('mdw-ripple');
|
|
57
|
-
element.removeEventListener('click', Ripple.onClick);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
Ripple,
|
|
63
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
@import "../common/mixins.scss";
|
|
2
|
-
|
|
3
|
-
$ripple-duration: 500ms;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* --Issues rendering a circle inside an element--
|
|
7
|
-
* See: https://codepen.io/shortfuse/pen/VxYxYj
|
|
8
|
-
*
|
|
9
|
-
* When using block display:
|
|
10
|
-
* - Firefox incorrectly stretches ripple when inside flexbox
|
|
11
|
-
* - Safari incorrectly inherit parent's padding
|
|
12
|
-
*
|
|
13
|
-
* Using using table display:
|
|
14
|
-
* - Firefox renders correctly
|
|
15
|
-
* - Safari renders correctly
|
|
16
|
-
* - IE and Edge don't animate opacity correctly
|
|
17
|
-
* - Ripples don't show if inside actual table
|
|
18
|
-
*
|
|
19
|
-
* When using JS (wrapped with block element):
|
|
20
|
-
* - Firefox renders correctly
|
|
21
|
-
* - Safari renders correctly
|
|
22
|
-
* - IE and Edge renders correctly but still has forced 0.26 opacity
|
|
23
|
-
*
|
|
24
|
-
* Chrome works fine under all conditions
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
@mixin mdw-ripple__container {
|
|
29
|
-
position: absolute;
|
|
30
|
-
left: 0;
|
|
31
|
-
top: 0;
|
|
32
|
-
right: 0;
|
|
33
|
-
bottom: 0;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
border-radius: inherit;
|
|
36
|
-
> .mdw-ripple__inner {
|
|
37
|
-
display: block !important;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin mdw-ripple__inner {
|
|
42
|
-
content: '';
|
|
43
|
-
display: table; // See above
|
|
44
|
-
padding: 50%;
|
|
45
|
-
height: 0;
|
|
46
|
-
width: 0;
|
|
47
|
-
border-radius: 50%;
|
|
48
|
-
position: absolute;
|
|
49
|
-
left: 50%;
|
|
50
|
-
top: 50%;
|
|
51
|
-
// z-index: -1; // Safari has a negative z-index scrolling bug (hides elements)
|
|
52
|
-
user-select: none;
|
|
53
|
-
-moz-user-select: none;
|
|
54
|
-
-ms-user-select: none;
|
|
55
|
-
-webkit-user-select: none;
|
|
56
|
-
pointer-events: none;
|
|
57
|
-
background-color: transparent;
|
|
58
|
-
color: inherit;
|
|
59
|
-
opacity: 0.26;
|
|
60
|
-
@include MSOnly() {
|
|
61
|
-
// Microsoft browsers don't handle low opacity (12%) properly with table display
|
|
62
|
-
opacity: 0.26 !important;
|
|
63
|
-
}
|
|
64
|
-
transform: translateX(-50%) translateY(-50%) scale(1);
|
|
65
|
-
transition-delay:
|
|
66
|
-
0s,
|
|
67
|
-
0s,
|
|
68
|
-
$motion-duration-desktop-max / 2;
|
|
69
|
-
transition-duration:
|
|
70
|
-
$motion-duration-desktop-max,
|
|
71
|
-
$motion-duration-desktop-max / 2,
|
|
72
|
-
$motion-duration-desktop-max / 2;
|
|
73
|
-
|
|
74
|
-
@include allHandsets {
|
|
75
|
-
transition-delay:
|
|
76
|
-
0s,
|
|
77
|
-
0s,
|
|
78
|
-
$motion-duration-mobile-max / 2;
|
|
79
|
-
transition-duration:
|
|
80
|
-
$motion-duration-mobile-max,
|
|
81
|
-
$motion-duration-mobile-max / 2,
|
|
82
|
-
$motion-duration-mobile-max / 2;
|
|
83
|
-
}
|
|
84
|
-
@include allTablets {
|
|
85
|
-
transition-delay:
|
|
86
|
-
0s,
|
|
87
|
-
0s,
|
|
88
|
-
$motion-duration-tablet-max / 2;
|
|
89
|
-
transition-duration:
|
|
90
|
-
$motion-duration-tablet-max,
|
|
91
|
-
$motion-duration-tablet-max / 2,
|
|
92
|
-
$motion-duration-tablet-max / 2;
|
|
93
|
-
}
|
|
94
|
-
transition-property:
|
|
95
|
-
transform,
|
|
96
|
-
opacity,
|
|
97
|
-
background-color;
|
|
98
|
-
transition-timing-function: $motion-easing-sharp;
|
|
99
|
-
will-change:
|
|
100
|
-
transform,
|
|
101
|
-
opacity,
|
|
102
|
-
background-color;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@mixin mdw-ripple__active {
|
|
106
|
-
transition-duration: 0s;
|
|
107
|
-
transition-delay: 0s;
|
|
108
|
-
transform: translateX(-50%) translateY(-50%) scale(0);
|
|
109
|
-
opacity: 0;
|
|
110
|
-
background-color: currentColor;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// Target
|
|
115
|
-
// size 0.000 --> 0.500 --> 1.000
|
|
116
|
-
// opacity 0.000 --> 1.000 --> 0.000
|
|
117
|
-
|
|
118
|
-
// Implemenation
|
|
119
|
-
// scale - 0.000 --> 0.500 --> 1.000 - 0% delay 100% duration
|
|
120
|
-
// opacity - 0.000 --> 1.000 --> 1.000 - 0% delay 50% duration
|
|
121
|
-
// color - solid --> solid --> trans - 50% delay 50% duration
|
|
122
|
-
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
// https://material.io/guidelines/components/selection-controls.html#
|
|
2
|
-
// https://material.io/guidelines/patterns/selection.html#selection-item-selection
|
|
3
|
-
|
|
4
|
-
@import '../common/variables.scss';
|
|
5
|
-
|
|
6
|
-
$ripple-size: dp(48);
|
|
7
|
-
$icon-size: dp(24);
|
|
8
|
-
$radio-size: dp(20);
|
|
9
|
-
$checkbox-size: dp(18);
|
|
10
|
-
$border-size: dp(2);
|
|
11
|
-
$horizontal-margin: dp(2);
|
|
12
|
-
// from ic_check_black_18px.svg
|
|
13
|
-
// rotated 45°
|
|
14
|
-
$checkbox-icon-height: dp(12.73);
|
|
15
|
-
$checkbox-icon-width: dp(5.93);
|
|
16
|
-
$checkbox-icon-thickness: dp(1.5);
|
|
17
|
-
$checkbox-icon-offset-y: dp(2.64) - $checkbox-icon-thickness - $border-size;
|
|
18
|
-
$checkbox-icon-offset-x: dp(6.04) - $border-size;
|
|
19
|
-
|
|
20
|
-
.mdw-selection {
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
flex-direction: row;
|
|
23
|
-
position: relative;
|
|
24
|
-
animation-duration: $motion-duration-desktop-enter;
|
|
25
|
-
@include allHandsets {
|
|
26
|
-
animation-duration: $motion-duration-mobile-enter;
|
|
27
|
-
}
|
|
28
|
-
@include allTablets {
|
|
29
|
-
animation-duration: $motion-duration-tablet-enter;
|
|
30
|
-
}
|
|
31
|
-
transition-duration: $motion-duration-desktop-default;
|
|
32
|
-
@include allHandsets {
|
|
33
|
-
transition-duration: $motion-duration-mobile-default;
|
|
34
|
-
}
|
|
35
|
-
@include allTablets {
|
|
36
|
-
transition-duration: $motion-duration-tablet-default;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
.mdw-selection__input {
|
|
40
|
-
display: inline-flex;
|
|
41
|
-
order: 1;
|
|
42
|
-
appearance: none;
|
|
43
|
-
-moz-appearance: none;
|
|
44
|
-
-webkit-appearance: none;
|
|
45
|
-
outline: none;
|
|
46
|
-
padding: 0;
|
|
47
|
-
margin: 0;
|
|
48
|
-
margin-top: auto;
|
|
49
|
-
margin-bottom: auto;
|
|
50
|
-
width: $icon-size;
|
|
51
|
-
height: $icon-size;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
-webkit-tap-highlight-color: transparent;
|
|
54
|
-
&:disabled {
|
|
55
|
-
cursor: not-allowed;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// background-color: var(--button__ripple-color);
|
|
59
|
-
border-radius: 50%;
|
|
60
|
-
transform: scale(1);
|
|
61
|
-
opacity: 0;
|
|
62
|
-
background-color: transparent;
|
|
63
|
-
transition-property: transform, color, opacity;
|
|
64
|
-
transition-timing-function: $motion-easing-standard;
|
|
65
|
-
transition-duration: inherit;
|
|
66
|
-
&:checked {
|
|
67
|
-
// background-color: unquote("rgba(var(--accent-color), 0.26)");
|
|
68
|
-
}
|
|
69
|
-
&::-ms-check {
|
|
70
|
-
// IE11
|
|
71
|
-
border-radius: 50%;
|
|
72
|
-
color: transparent;
|
|
73
|
-
background-color: transparent;
|
|
74
|
-
border-color: transparent;
|
|
75
|
-
}
|
|
76
|
-
&:active:not(:disabled),
|
|
77
|
-
&:focus {
|
|
78
|
-
background-color: currentColor;
|
|
79
|
-
transform: scale($ripple-size/$icon-size);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
.mdw-selection__icon {
|
|
83
|
-
display: inline-flex;
|
|
84
|
-
position: relative;
|
|
85
|
-
box-sizing: border-box;
|
|
86
|
-
width: $icon-size;
|
|
87
|
-
height: $icon-size;
|
|
88
|
-
max-width: 0;
|
|
89
|
-
appearance: none;
|
|
90
|
-
-moz-appearance: none;
|
|
91
|
-
-webkit-appearance: none;
|
|
92
|
-
padding: 0;
|
|
93
|
-
margin: 0;
|
|
94
|
-
margin-top: auto;
|
|
95
|
-
margin-bottom: auto;
|
|
96
|
-
outline: none;
|
|
97
|
-
|
|
98
|
-
z-index: 1;
|
|
99
|
-
animation-timing-function: $motion-easing-deceleration;
|
|
100
|
-
animation-duration: inherit;
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
-webkit-tap-highlight-color: transparent;
|
|
103
|
-
.mdw-selection__input:disabled ~ & {
|
|
104
|
-
cursor: not-allowed;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
transition-property: background-color, border-color;
|
|
108
|
-
transition-timing-function: $motion-easing-standard;
|
|
109
|
-
transition-duration: inherit;
|
|
110
|
-
background-color: transparent;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
&::before {
|
|
114
|
-
content: "";
|
|
115
|
-
position: absolute;
|
|
116
|
-
top: 0;
|
|
117
|
-
left: 0;
|
|
118
|
-
border-color: currentColor;
|
|
119
|
-
border-width: dp(2);
|
|
120
|
-
border-style: solid;
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
background-color: transparent;
|
|
123
|
-
transition-property: border-width, border-color, background-color;
|
|
124
|
-
transition-duration: inherit;
|
|
125
|
-
transition-timing-function: $motion-easing-standard;
|
|
126
|
-
}
|
|
127
|
-
&::after {
|
|
128
|
-
content: "";
|
|
129
|
-
position: absolute;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.mdw-selection__label {
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
cursor: pointer;
|
|
137
|
-
user-select: none;
|
|
138
|
-
-moz-user-select: none;
|
|
139
|
-
-ms-user-select: none;
|
|
140
|
-
-webkit-user-select: none;
|
|
141
|
-
-webkit-tap-highlight-color: transparent;
|
|
142
|
-
order: -1;
|
|
143
|
-
padding-left: 0;
|
|
144
|
-
padding-right: dp(8);
|
|
145
|
-
z-index: 1;
|
|
146
|
-
.mdw-selection__input:disabled ~ & {
|
|
147
|
-
cursor: not-allowed;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// Label comes after icon
|
|
152
|
-
.mdw-selection__icon ~ .mdw-selection__label {
|
|
153
|
-
order: 1;
|
|
154
|
-
padding-left: dp(8);
|
|
155
|
-
padding-right: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
[dir=rtl] {
|
|
159
|
-
.mdw-selection__icon {
|
|
160
|
-
order: 1;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.mdw-selection__label {
|
|
164
|
-
padding-left: dp(8);
|
|
165
|
-
padding-right: 0;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Label comes after icon
|
|
169
|
-
.mdw-selection__icon ~ .mdw-selection__label {
|
|
170
|
-
padding-left: 0;
|
|
171
|
-
padding-right: dp(8);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
.mdw-selection > .mdw-selection__input[type="checkbox"] {
|
|
177
|
-
& ~ .mdw-selection__icon::before {
|
|
178
|
-
left: ($icon-size - $checkbox-size) / 2;
|
|
179
|
-
top: ($icon-size - $checkbox-size) / 2;
|
|
180
|
-
width: $checkbox-size;
|
|
181
|
-
height: $checkbox-size;
|
|
182
|
-
border-radius: dp(2);
|
|
183
|
-
}
|
|
184
|
-
&:checked ~ .mdw-selection__icon::before,
|
|
185
|
-
&:active:not(:disabled) ~ .mdw-selection__icon::before {
|
|
186
|
-
border-width: $checkbox-size / 2;
|
|
187
|
-
}
|
|
188
|
-
&:checked:not(:active):not(:disabled) ~ .mdw-selection__icon::before {
|
|
189
|
-
background-color: currentColor;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
& ~ .mdw-selection__icon::after {
|
|
193
|
-
top: $border-size + (($icon-size - $checkbox-size) / 2);
|
|
194
|
-
left: $border-size + (($icon-size - $checkbox-size) / 2);
|
|
195
|
-
margin-left: $checkbox-icon-offset-x;
|
|
196
|
-
margin-top: $checkbox-icon-offset-y;
|
|
197
|
-
height: $checkbox-icon-height;
|
|
198
|
-
width: $checkbox-icon-width;
|
|
199
|
-
animation-timing-function: $motion-easing-deceleration;
|
|
200
|
-
animation-duration: inherit;
|
|
201
|
-
}
|
|
202
|
-
&:checked ~ .mdw-selection__icon::after {
|
|
203
|
-
// border-width: $checkbox-icon-thickness;
|
|
204
|
-
// Increase visibility
|
|
205
|
-
border-width: dp(2);
|
|
206
|
-
background-color: transparent;
|
|
207
|
-
box-sizing: border-box;
|
|
208
|
-
transform: rotate(45deg);
|
|
209
|
-
border-bottom-style: solid;
|
|
210
|
-
border-right-style: solid;
|
|
211
|
-
// border-color: unquote("rgb(var(--background-color))");
|
|
212
|
-
animation-name: showCheck;
|
|
213
|
-
animation-direction: normal;
|
|
214
|
-
animation-fill-mode: forwards;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.mdw-selection > .mdw-selection__input[type="radio"] {
|
|
219
|
-
& ~ .mdw-selection__icon::before {
|
|
220
|
-
left: ($icon-size - $radio-size) / 2;
|
|
221
|
-
top: ($icon-size - $radio-size) / 2;
|
|
222
|
-
width: $radio-size;
|
|
223
|
-
height: $radio-size;
|
|
224
|
-
border-radius: 50%;
|
|
225
|
-
border-color: currentColor;
|
|
226
|
-
}
|
|
227
|
-
&:active:not(:disabled) ~ .mdw-selection__icon::before {
|
|
228
|
-
border-width: $radio-size / 2;
|
|
229
|
-
}
|
|
230
|
-
& ~ .mdw-selection__icon::after {
|
|
231
|
-
left: ($icon-size - $radio-size) / 2;
|
|
232
|
-
top: ($icon-size - $radio-size) / 2;
|
|
233
|
-
height: $radio-size;
|
|
234
|
-
width: $radio-size;
|
|
235
|
-
border-radius: 50%;
|
|
236
|
-
background-color: currentColor;
|
|
237
|
-
transform: scale(0);
|
|
238
|
-
transition-property: transform, background-color;
|
|
239
|
-
transition-timing-function: $motion-easing-standard;
|
|
240
|
-
transition-duration: inherit;
|
|
241
|
-
}
|
|
242
|
-
&:checked ~ .mdw-selection__icon::after {
|
|
243
|
-
transform: scale(0.5);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.mdw-selection[mdw-theme-color] {
|
|
248
|
-
.mdw-selection__input[type="checkbox"]:checked:not(:active),
|
|
249
|
-
.mdw-selection__input[type="radio"]:checked {
|
|
250
|
-
color: inherit;
|
|
251
|
-
opacity: 0.26;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.mdw-selection[mdw-switch] > .mdw-selection__input[type="checkbox"] {
|
|
256
|
-
margin-right: 12px;
|
|
257
|
-
transform: scale(1) translateX(-2px);
|
|
258
|
-
&:checked {
|
|
259
|
-
transform: scale(1) translateX(14px);
|
|
260
|
-
}
|
|
261
|
-
&:focus,
|
|
262
|
-
&:active {
|
|
263
|
-
transform: translateX(-2px) scale(2);
|
|
264
|
-
}
|
|
265
|
-
&:focus:checked,
|
|
266
|
-
&:active:checked {
|
|
267
|
-
transform: translateX(14px) scale(2);
|
|
268
|
-
}
|
|
269
|
-
&:active:not(:disabled) ~ .mdw-selection__icon {
|
|
270
|
-
color: inherit;
|
|
271
|
-
}
|
|
272
|
-
& ~ .mdw-selection__icon::before {
|
|
273
|
-
left: 0;
|
|
274
|
-
top: 2px;
|
|
275
|
-
width: 20px;
|
|
276
|
-
height: 20px;
|
|
277
|
-
border-radius: 50%;
|
|
278
|
-
border-style: none;
|
|
279
|
-
z-index: 1;
|
|
280
|
-
transform: translateX(0);
|
|
281
|
-
box-shadow: elevation(1);
|
|
282
|
-
transition-property: background-color, transform;
|
|
283
|
-
}
|
|
284
|
-
&:checked ~ .mdw-selection__icon::before {
|
|
285
|
-
transform: translateX(16px);
|
|
286
|
-
}
|
|
287
|
-
&:checked ~ .mdw-selection__icon::before,
|
|
288
|
-
&:active ~ .mdw-selection__icon::before {
|
|
289
|
-
color: inherit;
|
|
290
|
-
}
|
|
291
|
-
& ~ .mdw-selection__icon::after {
|
|
292
|
-
top: 5px;
|
|
293
|
-
bottom: 5px;
|
|
294
|
-
width: 36px;
|
|
295
|
-
height: 14px;
|
|
296
|
-
border-radius: 7px;
|
|
297
|
-
left: 0;
|
|
298
|
-
animation-name: none;
|
|
299
|
-
border-style: none;
|
|
300
|
-
transform: none;
|
|
301
|
-
margin: 0;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
@keyframes showCheck {
|
|
306
|
-
// Animation is applied to pre-rotated box;
|
|
307
|
-
// Clip box completely horizontally and vertically upto bottom border
|
|
308
|
-
0% {
|
|
309
|
-
clip: rect($checkbox-icon-height - $checkbox-icon-thickness, 0, auto, auto)
|
|
310
|
-
}
|
|
311
|
-
// Remove horizontal clip
|
|
312
|
-
// % = stroke length upto corner
|
|
313
|
-
#{$checkbox-icon-width / ($checkbox-icon-width + $checkbox-icon-height) * 100%} {
|
|
314
|
-
clip: rect($checkbox-icon-height - $checkbox-icon-thickness, $checkbox-icon-width, auto, auto)
|
|
315
|
-
}
|
|
316
|
-
// Remove vertical clip
|
|
317
|
-
100% {
|
|
318
|
-
clip: rect(0, $checkbox-icon-width, auto, auto)
|
|
319
|
-
}
|
|
320
|
-
}
|