@shortfuse/materialdesignweb 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/.eslintrc.json +136 -30
  2. package/.stylelintrc.json +6 -40
  3. package/.vscode/launch.json +20 -5
  4. package/CHANGELOG.md +24 -0
  5. package/README.md +12 -9
  6. package/adapters/datatable/column.js +82 -74
  7. package/adapters/datatable/index.js +173 -131
  8. package/adapters/dom/index.js +529 -75
  9. package/adapters/list/index.js +25 -12
  10. package/adapters/search/index.js +13 -13
  11. package/components/appbar/_spec.scss +87 -64
  12. package/components/appbar/index.scss +2 -2
  13. package/components/banner/_spec.scss +8 -8
  14. package/components/banner/index.scss +2 -2
  15. package/components/bottomnav/_spec.scss +22 -17
  16. package/components/bottomnav/index.js +61 -52
  17. package/components/bottomnav/index.scss +2 -2
  18. package/components/bottomnav/item.js +44 -25
  19. package/components/button/README.md +14 -14
  20. package/components/button/_spec.scss +23 -22
  21. package/components/button/_theme.scss +37 -21
  22. package/components/button/index.eta +32 -0
  23. package/components/button/index.js +12 -12
  24. package/components/button/index.scss +2 -2
  25. package/components/card/_spec.scss +40 -36
  26. package/components/card/index.scss +2 -2
  27. package/components/chip/_spec.scss +7 -8
  28. package/components/chip/_theme.scss +31 -31
  29. package/components/chip/index.js +3 -2
  30. package/components/chip/index.scss +2 -2
  31. package/components/chip/item.js +1 -16
  32. package/components/datatable/_spec.scss +71 -85
  33. package/components/datatable/_theme.scss +61 -156
  34. package/components/datatable/cell.js +45 -0
  35. package/components/datatable/columnheader.js +47 -0
  36. package/components/datatable/index.js +279 -366
  37. package/components/datatable/index.scss +2 -2
  38. package/components/datatable/row.js +49 -0
  39. package/components/datatable/rowheader.js +18 -0
  40. package/components/dialog/_spec.scss +61 -41
  41. package/components/dialog/index.js +325 -297
  42. package/components/dialog/index.scss +2 -2
  43. package/components/divider/_spec.scss +8 -6
  44. package/components/divider/index.scss +2 -2
  45. package/components/elevation/_spec.scss +2 -2
  46. package/components/elevation/index.scss +2 -2
  47. package/components/fab/_spec.scss +23 -24
  48. package/components/fab/index.js +50 -50
  49. package/components/fab/index.scss +2 -2
  50. package/components/grid/_spec.scss +33 -31
  51. package/components/grid/index.scss +2 -2
  52. package/components/layout/_mixins.scss +5 -5
  53. package/components/layout/_spec.scss +206 -176
  54. package/components/layout/_theme.scss +14 -16
  55. package/components/layout/index.js +181 -153
  56. package/components/layout/index.scss +2 -2
  57. package/components/list/_spec.scss +117 -104
  58. package/components/list/_theme.scss +31 -34
  59. package/components/list/content.js +68 -52
  60. package/components/list/index.js +194 -61
  61. package/components/list/index.scss +2 -2
  62. package/components/list/item.js +136 -12
  63. package/components/list/secondary.js +46 -0
  64. package/components/menu/_spec.scss +32 -19
  65. package/components/menu/index.js +242 -229
  66. package/components/menu/index.scss +2 -2
  67. package/components/menu/item.js +95 -110
  68. package/components/progress/_spec.scss +35 -27
  69. package/components/progress/index.js +21 -0
  70. package/components/progress/index.scss +2 -1
  71. package/components/selection/_spec.scss +242 -224
  72. package/components/selection/_theme.scss +100 -95
  73. package/components/selection/index.eta +60 -0
  74. package/components/selection/index.js +76 -0
  75. package/components/selection/index.pug +15 -8
  76. package/components/selection/index.scss +2 -2
  77. package/components/selection/input.js +56 -0
  78. package/components/selection/radiogroup.js +47 -0
  79. package/components/slider/_spec.scss +10 -8
  80. package/components/slider/index.scss +2 -2
  81. package/components/snackbar/_spec.scss +22 -21
  82. package/components/snackbar/index.js +102 -111
  83. package/components/snackbar/index.scss +2 -2
  84. package/components/tab/_spec.scss +20 -19
  85. package/components/tab/content.js +41 -40
  86. package/components/tab/index.js +192 -99
  87. package/components/tab/index.scss +2 -2
  88. package/components/tab/item.js +38 -55
  89. package/components/tab/list.js +96 -72
  90. package/components/tab/panel.js +12 -13
  91. package/components/template/_theme.scss +11 -11
  92. package/components/textfield/_mixins.scss +52 -0
  93. package/components/textfield/_spec.scss +215 -266
  94. package/components/textfield/_theme.scss +95 -72
  95. package/components/textfield/index.eta +74 -0
  96. package/components/textfield/index.js +63 -57
  97. package/components/textfield/index.scss +2 -2
  98. package/components/tooltip/_spec.scss +27 -25
  99. package/components/tooltip/index.scss +2 -2
  100. package/components/type/_spec.scss +51 -38
  101. package/components/type/index.scss +2 -2
  102. package/core/_breakpoint.scss +75 -91
  103. package/core/_elevation.scss +10 -10
  104. package/core/_length.scss +9 -0
  105. package/core/_motion.scss +14 -14
  106. package/core/_platform.scss +9 -15
  107. package/core/_type.scss +33 -32
  108. package/core/aria/attributes.js +125 -25
  109. package/core/aria/button.js +23 -23
  110. package/core/aria/keyboard.js +93 -0
  111. package/core/aria/rovingtabindex.js +69 -154
  112. package/core/aria/tab.js +31 -28
  113. package/core/color/_theme.scss +240 -280
  114. package/core/color/index.scss +2 -2
  115. package/core/document/index.js +39 -0
  116. package/core/dom.js +12 -12
  117. package/core/overlay/_spec.scss +0 -3
  118. package/core/overlay/_theme.scss +56 -74
  119. package/core/overlay/index.js +49 -18
  120. package/core/overlay/index.scss +2 -2
  121. package/core/ripple/_spec.scss +22 -39
  122. package/core/ripple/_theme.scss +13 -13
  123. package/core/ripple/index.js +137 -134
  124. package/core/ripple/index.scss +2 -2
  125. package/core/theme/_config.scss +2 -0
  126. package/core/theme/_mixins.scss +172 -0
  127. package/core/theme/_palettes.scss +155 -135
  128. package/core/theme/_variables.scss +24 -15
  129. package/core/theme/index.js +50 -0
  130. package/core/throttler.js +1 -1
  131. package/core/transition/index.js +36 -20
  132. package/{docs-src → docs}/_flex.scss +0 -0
  133. package/{docs-src → docs}/_menuoptions.js +21 -34
  134. package/{docs-src → docs}/_mixins.pug +39 -26
  135. package/docs/_partials/_androidnavbar.eta +5 -0
  136. package/docs/_partials/_androidstatusbar.eta +13 -0
  137. package/docs/_partials/_appbar.eta +29 -0
  138. package/docs/_partials/_buttontest.eta +31 -0
  139. package/docs/_partials/_header.eta +149 -0
  140. package/docs/_partials/_navlistitem.eta +16 -0
  141. package/docs/_partials/_target.eta +1 -0
  142. package/{docs-src → docs}/_sample-utils.js +8 -6
  143. package/{docs-src → docs}/_storage.js +0 -0
  144. package/{docs-src → docs}/docs.scss +5 -2
  145. package/docs/index.eta +16 -0
  146. package/{docs-src → docs}/index.js +0 -0
  147. package/docs/pages/appbar.eta +114 -0
  148. package/{docs-src/components → docs/pages}/appbar.js +0 -0
  149. package/{docs-src/components → docs/pages}/appbar.pug +15 -18
  150. package/docs/pages/bottomnav.eta +188 -0
  151. package/{docs-src/components → docs/pages}/bottomnav.js +23 -24
  152. package/{docs-src/components → docs/pages}/bottomnav.pug +4 -4
  153. package/docs/pages/button.eta +124 -0
  154. package/{docs-src/components → docs/pages}/button.js +19 -19
  155. package/{docs-src/components → docs/pages}/button.pug +15 -15
  156. package/docs/pages/card.eta +90 -0
  157. package/{docs-src/components → docs/pages}/card.js +3 -3
  158. package/{docs-src/components → docs/pages}/card.pug +7 -7
  159. package/docs/pages/chip.eta +122 -0
  160. package/{docs-src/components → docs/pages}/chip.js +3 -6
  161. package/{docs-src/components → docs/pages}/chip.pug +2 -2
  162. package/docs/pages/color.eta +143 -0
  163. package/{docs-src/core → docs/pages}/color.js +95 -20
  164. package/docs/pages/color.pug +121 -0
  165. package/docs/pages/datatable.eta +323 -0
  166. package/{docs-src/components → docs/pages}/datatable.js +26 -13
  167. package/docs/pages/datatable.pug +283 -0
  168. package/docs/pages/dialog.eta +186 -0
  169. package/{docs-src/components → docs/pages}/dialog.js +26 -13
  170. package/{docs-src/components → docs/pages}/dialog.pug +46 -28
  171. package/docs/pages/dom.eta +26 -0
  172. package/docs/pages/dom.js +143 -0
  173. package/docs/pages/dom.pug +22 -0
  174. package/docs/pages/elevation.eta +35 -0
  175. package/{docs-src/components → docs/pages}/elevation.js +0 -0
  176. package/{docs-src/components → docs/pages}/elevation.pug +0 -0
  177. package/docs/pages/fab.eta +99 -0
  178. package/{docs-src/components → docs/pages}/fab.js +3 -3
  179. package/{docs-src/components → docs/pages}/fab.pug +2 -2
  180. package/docs/pages/grid.eta +135 -0
  181. package/{docs-src/components → docs/pages}/grid.js +1 -1
  182. package/{docs-src/components → docs/pages}/grid.pug +3 -3
  183. package/docs/pages/layout.eta +8 -0
  184. package/{docs-src/components → docs/pages}/layout.js +0 -0
  185. package/{docs-src/components → docs/pages}/layout.pug +0 -0
  186. package/docs/pages/list.eta +465 -0
  187. package/{docs-src/components → docs/pages}/list.js +2 -2
  188. package/{docs-src/components → docs/pages}/list.pug +7 -14
  189. package/docs/pages/menu.eta +276 -0
  190. package/{docs-src/components → docs/pages}/menu.js +14 -10
  191. package/{docs-src/components → docs/pages}/menu.pug +0 -0
  192. package/docs/pages/overlay.eta +69 -0
  193. package/docs/pages/overlay.js +4 -0
  194. package/{docs-src/core → docs/pages}/overlay.pug +14 -11
  195. package/docs/pages/progress.eta +23 -0
  196. package/{docs-src/components → docs/pages}/progress.js +1 -1
  197. package/{docs-src/components → docs/pages}/progress.pug +1 -1
  198. package/docs/pages/ripple.eta +27 -0
  199. package/docs/pages/ripple.js +4 -0
  200. package/{docs-src/core → docs/pages}/ripple.pug +4 -4
  201. package/docs/pages/search.eta +246 -0
  202. package/{docs-src/components → docs/pages}/search.js +59 -42
  203. package/{docs-src/components → docs/pages}/search.pug +50 -51
  204. package/docs/pages/selection.eta +111 -0
  205. package/docs/pages/selection.js +13 -0
  206. package/docs/pages/selection.pug +74 -0
  207. package/docs/pages/slider.eta +23 -0
  208. package/{docs-src/components → docs/pages}/slider.js +0 -0
  209. package/{docs-src/components → docs/pages}/slider.pug +0 -0
  210. package/docs/pages/snackbar.eta +83 -0
  211. package/{docs-src/components → docs/pages}/snackbar.js +3 -3
  212. package/{docs-src/components → docs/pages}/snackbar.pug +0 -0
  213. package/docs/pages/tab.eta +421 -0
  214. package/{docs-src/components → docs/pages}/tab.js +18 -35
  215. package/{docs-src/components → docs/pages}/tab.pug +4 -4
  216. package/docs/pages/textfield.eta +486 -0
  217. package/{docs-src/components → docs/pages}/textfield.js +3 -4
  218. package/{docs-src/components → docs/pages}/textfield.pug +87 -35
  219. package/docs/pages/tooltip.eta +94 -0
  220. package/{docs-src/components → docs/pages}/tooltip.js +0 -0
  221. package/{docs-src/components → docs/pages}/tooltip.pug +0 -1
  222. package/docs/pages/transition.eta +117 -0
  223. package/{docs-src/core → docs/pages}/transition.js +7 -8
  224. package/{docs-src/core → docs/pages}/transition.pug +0 -0
  225. package/docs/pages/type.eta +31 -0
  226. package/{docs-src/components → docs/pages}/type.js +0 -0
  227. package/{docs-src/components → docs/pages}/type.pug +0 -1
  228. package/docs/postrender.js +39 -0
  229. package/{docs-src → docs}/prerender.js +3 -9
  230. package/docs/pwa/_dialogs.eta +143 -0
  231. package/docs/pwa/_dialogs.pug +96 -0
  232. package/docs/pwa/_menus.eta +16 -0
  233. package/{docs-src → docs}/pwa/_menus.pug +0 -0
  234. package/docs/pwa/pwa-prerender.js +3 -0
  235. package/docs/pwa/pwa.eta +480 -0
  236. package/docs/pwa/pwa.js +306 -0
  237. package/{docs-src → docs}/pwa/pwa.pug +166 -263
  238. package/docs/pwa/pwa.scss +26 -0
  239. package/docs/spec.scss +26 -0
  240. package/docs/themes/_component-themes.scss +26 -0
  241. package/docs/themes/theme-colored-fallbacks.scss +17 -0
  242. package/docs/themes/theme-colored.scss +17 -0
  243. package/docs/themes/theme-default-fallbacks.scss +17 -0
  244. package/docs/themes/theme-default.scss +17 -0
  245. package/jsconfig.json +4 -2
  246. package/package.json +40 -27
  247. package/scripts/deploy-docs.sh +9 -0
  248. package/templates/index.eta +2 -0
  249. package/utils/function.js +3 -0
  250. package/webpack.config.cjs +257 -0
  251. package/_spec.scss +0 -27
  252. package/_theme.scss +0 -27
  253. package/components/list/expander.js +0 -142
  254. package/components/list/itemgroup.js +0 -22
  255. package/core/theme/_builder.scss +0 -116
  256. package/core/theme/index.scss +0 -68
  257. package/docs/appbar.html +0 -1
  258. package/docs/appbar.min.js +0 -2
  259. package/docs/appbar.min.js.map +0 -1
  260. package/docs/bottomnav.html +0 -1
  261. package/docs/bottomnav.min.js +0 -2
  262. package/docs/bottomnav.min.js.map +0 -1
  263. package/docs/button.html +0 -1
  264. package/docs/button.min.js +0 -2
  265. package/docs/button.min.js.map +0 -1
  266. package/docs/card.html +0 -1
  267. package/docs/card.min.js +0 -2
  268. package/docs/card.min.js.map +0 -1
  269. package/docs/chip.html +0 -1
  270. package/docs/chip.min.js +0 -2
  271. package/docs/chip.min.js.map +0 -1
  272. package/docs/color.html +0 -1
  273. package/docs/color.min.js +0 -2
  274. package/docs/color.min.js.map +0 -1
  275. package/docs/datatable.html +0 -1
  276. package/docs/datatable.min.js +0 -2
  277. package/docs/datatable.min.js.map +0 -1
  278. package/docs/default.common.min.js +0 -2
  279. package/docs/default.common.min.js.map +0 -1
  280. package/docs/dialog.html +0 -1
  281. package/docs/dialog.min.js +0 -2
  282. package/docs/dialog.min.js.map +0 -1
  283. package/docs/docs.min.css +0 -1
  284. package/docs/docs.min.js +0 -2
  285. package/docs/docs.min.js.map +0 -1
  286. package/docs/elevation.html +0 -1
  287. package/docs/elevation.min.js +0 -2
  288. package/docs/elevation.min.js.map +0 -1
  289. package/docs/fab.html +0 -1
  290. package/docs/fab.min.js +0 -2
  291. package/docs/fab.min.js.map +0 -1
  292. package/docs/grid.html +0 -1
  293. package/docs/grid.min.js +0 -2
  294. package/docs/grid.min.js.map +0 -1
  295. package/docs/index.html +0 -1
  296. package/docs/index.min.js +0 -2
  297. package/docs/index.min.js.map +0 -1
  298. package/docs/ink.html +0 -1
  299. package/docs/ink.min.js +0 -2
  300. package/docs/ink.min.js.map +0 -1
  301. package/docs/layout.html +0 -1
  302. package/docs/layout.min.js +0 -2
  303. package/docs/layout.min.js.map +0 -1
  304. package/docs/list.html +0 -1
  305. package/docs/list.min.js +0 -2
  306. package/docs/list.min.js.map +0 -1
  307. package/docs/menu.html +0 -1
  308. package/docs/menu.min.js +0 -2
  309. package/docs/menu.min.js.map +0 -1
  310. package/docs/overlay.html +0 -1
  311. package/docs/overlay.min.js +0 -2
  312. package/docs/overlay.min.js.map +0 -1
  313. package/docs/prerender.common.min.js +0 -2
  314. package/docs/prerender.common.min.js.map +0 -1
  315. package/docs/prerender.min.js +0 -2
  316. package/docs/prerender.min.js.map +0 -1
  317. package/docs/progress.html +0 -1
  318. package/docs/progress.min.js +0 -2
  319. package/docs/progress.min.js.map +0 -1
  320. package/docs/pwa-prerender.min.js +0 -2
  321. package/docs/pwa-prerender.min.js.map +0 -1
  322. package/docs/pwa.html +0 -11
  323. package/docs/pwa.min.css +0 -1
  324. package/docs/pwa.min.js +0 -2
  325. package/docs/pwa.min.js.map +0 -1
  326. package/docs/ripple.html +0 -1
  327. package/docs/ripple.min.js +0 -2
  328. package/docs/ripple.min.js.map +0 -1
  329. package/docs/search.html +0 -1
  330. package/docs/search.min.js +0 -2
  331. package/docs/search.min.js.map +0 -1
  332. package/docs/selection.html +0 -1
  333. package/docs/selection.min.js +0 -2
  334. package/docs/selection.min.js.map +0 -1
  335. package/docs/slider.html +0 -1
  336. package/docs/slider.min.js +0 -2
  337. package/docs/slider.min.js.map +0 -1
  338. package/docs/snackbar.html +0 -1
  339. package/docs/snackbar.min.js +0 -2
  340. package/docs/snackbar.min.js.map +0 -1
  341. package/docs/spec.min.css +0 -1
  342. package/docs/spec.min.js +0 -2
  343. package/docs/spec.min.js.map +0 -1
  344. package/docs/surface.html +0 -1
  345. package/docs/surface.min.js +0 -2
  346. package/docs/surface.min.js.map +0 -1
  347. package/docs/tab.html +0 -1
  348. package/docs/tab.min.js +0 -2
  349. package/docs/tab.min.js.map +0 -1
  350. package/docs/textfield.html +0 -2
  351. package/docs/textfield.min.js +0 -2
  352. package/docs/textfield.min.js.map +0 -1
  353. package/docs/theme-colored-fallbacks.min.css +0 -1
  354. package/docs/theme-colored-fallbacks.min.js +0 -2
  355. package/docs/theme-colored-fallbacks.min.js.map +0 -1
  356. package/docs/theme-colored.min.css +0 -1
  357. package/docs/theme-colored.min.js +0 -2
  358. package/docs/theme-colored.min.js.map +0 -1
  359. package/docs/theme-default-fallbacks.min.css +0 -1
  360. package/docs/theme-default-fallbacks.min.js +0 -2
  361. package/docs/theme-default-fallbacks.min.js.map +0 -1
  362. package/docs/theme-default.min.css +0 -1
  363. package/docs/theme-default.min.js +0 -2
  364. package/docs/theme-default.min.js.map +0 -1
  365. package/docs/themes-fallbacks.min.css +0 -1
  366. package/docs/themes-fallbacks.min.js +0 -2
  367. package/docs/themes-fallbacks.min.js.map +0 -1
  368. package/docs/themes.min.css +0 -1
  369. package/docs/themes.min.js +0 -2
  370. package/docs/themes.min.js.map +0 -1
  371. package/docs/tooltip.html +0 -1
  372. package/docs/tooltip.min.js +0 -2
  373. package/docs/tooltip.min.js.map +0 -1
  374. package/docs/transition.html +0 -1
  375. package/docs/transition.min.js +0 -2
  376. package/docs/transition.min.js.map +0 -1
  377. package/docs/type.html +0 -1
  378. package/docs/type.min.js +0 -2
  379. package/docs/type.min.js.map +0 -1
  380. package/docs-src/components/datatable.pug +0 -327
  381. package/docs-src/components/selection.js +0 -9
  382. package/docs-src/components/selection.pug +0 -77
  383. package/docs-src/core/color.pug +0 -201
  384. package/docs-src/core/overlay.js +0 -4
  385. package/docs-src/core/ripple.js +0 -4
  386. package/docs-src/index.pug +0 -9
  387. package/docs-src/pwa/_dialogs.pug +0 -15
  388. package/docs-src/pwa/pwa-prerender.js +0 -3
  389. package/docs-src/pwa/pwa.js +0 -182
  390. package/docs-src/pwa/pwa.scss +0 -25
  391. package/docs-src/spec.scss +0 -1
  392. package/docs-src/themes/theme-colored-fallbacks.scss +0 -14
  393. package/docs-src/themes/theme-colored.scss +0 -14
  394. package/docs-src/themes/theme-default-fallbacks.scss +0 -14
  395. package/docs-src/themes/theme-default.scss +0 -14
  396. package/index.js +0 -51
  397. package/index.scss +0 -2
  398. package/webpack.config.js +0 -187
@@ -0,0 +1,39 @@
1
+ /** @return {void} */
2
+ export function detectStandalone() {
3
+ // @ts-ignore: Safari uses navigator.standalone
4
+ if (navigator.standalone === true || window.matchMedia('(display-mode: standalone)').matches) {
5
+ document.documentElement.setAttribute('mdw-standalone', '');
6
+ }
7
+ }
8
+
9
+ /** @return {void} */
10
+ export function detectUserAgent() {
11
+ const ua = navigator.userAgent.toLowerCase();
12
+ if (/iphone/i.test(ua) || /ipad/i.test(ua) || /macintosh/i.test(ua)) {
13
+ document.documentElement.setAttribute('mdw-ios', '');
14
+ }
15
+ }
16
+
17
+ /** @return {void} */
18
+ export function detectColorScheme() {
19
+ // Auto lightness and fill
20
+ if (!document.documentElement.hasAttribute('mdw-surface')
21
+ && !document.documentElement.hasAttribute('mdw-light')
22
+ && !document.documentElement.hasAttribute('mdw-dark')) {
23
+ if (window.matchMedia('(prefers-color-scheme:dark)').matches) {
24
+ document.documentElement.setAttribute('mdw-dark', '');
25
+ } else {
26
+ document.documentElement.setAttribute('mdw-light', '');
27
+ }
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Run before document has loaded
33
+ * @return {void}
34
+ */
35
+ export function onPrerender() {
36
+ detectStandalone();
37
+ detectUserAgent();
38
+ detectColorScheme();
39
+ }
package/core/dom.js CHANGED
@@ -1,3 +1,4 @@
1
+ /** @type {?boolean} */
1
2
  let passiveEventListenerSupported = null;
2
3
 
3
4
  /** @return {void} */
@@ -10,9 +11,9 @@ function testPassiveEventListenerOptionSupport() {
10
11
  return true;
11
12
  },
12
13
  };
13
- // @ts-ignore
14
+ // @ts-ignore: Custom test event
14
15
  window.addEventListener('test', options, options);
15
- // @ts-ignore
16
+ // @ts-ignore: Custom test event
16
17
  window.removeEventListener('test', options, options);
17
18
  } catch (err) {
18
19
  passiveEventListenerSupported = false;
@@ -30,7 +31,7 @@ export function getPassiveEventListenerOption() {
30
31
  return false;
31
32
  }
32
33
 
33
- export const nextTick = window.requestAnimationFrame || (cb => window.setTimeout(cb, 17));
34
+ export const nextTick = window.requestAnimationFrame || ((cb) => window.setTimeout(cb, 17));
34
35
 
35
36
  export const cancelTick = window.cancelAnimationFrame || window.clearTimeout;
36
37
 
@@ -48,18 +49,18 @@ export function getChildElementByClass(element, className) {
48
49
  }
49
50
 
50
51
  /**
51
- * @param {HTMLElement} element
52
+ * @param {Element} element
52
53
  * @param {string} className
53
54
  * @param {boolean} [includeSelf=true]
54
55
  * @return {HTMLElement}
55
56
  */
56
57
  export function findElementParentByClassName(element, className, includeSelf) {
57
- /** @type {HTMLElement} */
58
58
  let el;
59
59
  if (includeSelf === false) {
60
60
  el = element.parentElement;
61
61
  } else {
62
- el = element;
62
+ /** @type {HTMLElement} */
63
+ el = (element);
63
64
  }
64
65
  while (el != null && !el.classList.contains(className)) {
65
66
  el = el.parentElement;
@@ -69,17 +70,16 @@ export function findElementParentByClassName(element, className, includeSelf) {
69
70
 
70
71
  /** @return {boolean} */
71
72
  export function isRtl() {
72
- return document.documentElement.hasAttribute('dir')
73
- && document.documentElement.getAttribute('dir').toLowerCase() === 'rtl';
73
+ return document.documentElement.dir === 'rtl';
74
74
  }
75
75
 
76
76
  /**
77
- * @param {Element} element
77
+ * @param {EventTarget} eventTarget
78
78
  * @param {string} type
79
79
  * @param {Object} [detail]
80
80
  * @return {boolean}
81
81
  */
82
- export function dispatchDomEvent(element, type, detail) {
82
+ export function dispatchDomEvent(eventTarget, type, detail) {
83
83
  let event;
84
84
  if (typeof CustomEvent === 'function') {
85
85
  event = new CustomEvent(type, {
@@ -101,7 +101,7 @@ export function dispatchDomEvent(element, type, detail) {
101
101
  event = document.createEvent('CustomEvent');
102
102
  event.initCustomEvent(type, true, true, detail);
103
103
  }
104
- return element.dispatchEvent(event);
104
+ return eventTarget.dispatchEvent(event);
105
105
  }
106
106
 
107
107
  /**
@@ -177,7 +177,7 @@ export function iterateSomeOfElementSiblings(element, fn) {
177
177
  /**
178
178
  * @param {Node} node
179
179
  * @param {boolean} [create]
180
- * @return {Node}
180
+ * @return {Text}
181
181
  */
182
182
  export function getTextNode(node, create) {
183
183
  let textNode;
@@ -1,6 +1,3 @@
1
- @import '../_breakpoint.scss';
2
- @import '../_motion.scss';
3
-
4
1
  .mdw-overlay {
5
2
  position: relative;
6
3
 
@@ -1,18 +1,18 @@
1
1
  // https://material.io/design/interaction/states.html
2
2
 
3
- @import '../theme/index.scss';
3
+ @use '../theme/_mixins.scss' as theme;
4
4
 
5
- $mdw-overlay__theme-values: (
6
-
7
- off-color: $mdw-theme__default-ink,
8
- off-medium-color: $mdw-theme__medium-ink,
9
- off-inactive-color: $mdw-theme__inactive-ink,
10
- off-divider-color: $mdw-theme__divider-ink,
5
+ $themeValues: (
6
+ overlay-color: theme.$foreground,
11
7
 
8
+ high-opacity: theme.$high-opacity,
9
+ medium-opacity: theme.$medium-opacity,
10
+ inactive-opacity: theme.$inactive-opacity,
11
+ divider-opacity: theme.$divider-opacity,
12
+
12
13
  disabled-opacity: (0.38, 0.50),
13
14
 
14
15
  // states
15
- overlay-color: (('foreground-light', 1.00), ('foreground-dark', 1.00)),
16
16
 
17
17
  hover-opacity: (0.04, 0.08),
18
18
  focus-opacity: (0.12, 0.24),
@@ -30,98 +30,81 @@ $mdw-overlay__theme-values: (
30
30
  activated-hover-focus-opacity: (0.12 + 0.04 + 0.12, 0.24 + 0.08 + 0.24),
31
31
  ) !default;
32
32
 
33
- @function mdwOverlayThemeValue($key, $type) {
34
- @return mdwGetThemeValue('overlay', $mdw-overlay__theme-values, $key, $type);
33
+ @function getThemeValue($key, $type) {
34
+ @return theme.getThemeValue('overlay', $themeValues, $key, $type);
35
35
  }
36
36
 
37
- @mixin mdw-overlay__theme-rules($type: 'var') {
37
+ @mixin addThemeRules($type: 'var') {
38
38
  .mdw-overlay {
39
39
  &,
40
- &:active,
41
- &:active,
40
+ &[aria-pressed="false"]:active,
42
41
  &[aria-selected="true"],
43
42
  &[aria-pressed="true"],
44
43
  &[aria-current] {
45
44
  &::before {
46
- color: inherit;
47
45
  @if ($type == 'var') {
48
- color: RGB(var(--ink-color));
46
+ color: RGB(var(--mdw-ink));
47
+ } @else {
48
+ // Handled by mdw-color
49
49
  }
50
50
  }
51
51
  }
52
52
 
53
53
  &[aria-selected="false"],
54
54
  &[aria-pressed="false"],
55
- &[disabled],
56
55
  &[aria-disabled="true"],
57
- &[disabled]:active,
58
56
  &[aria-disabled="true"]:active {
59
57
  &::before {
60
- color: mdwOverlayThemeValue("overlay-color", $type);
61
- }
62
- }
63
-
64
- @if ($type == 'var') {
65
- .mdw-overlay__group[aria-multiselectable="true"] &[aria-selected="true"] {
66
- color: mdwOverlayThemeValue("off-color", $type);
58
+ @if ($type == 'var') {
59
+ color: RGB(getThemeValue("overlay-color", $type));
60
+ } @else {
61
+ background-color: RGB(getThemeValue("overlay-color", $type));
62
+ }
67
63
  }
68
64
  }
69
65
 
66
+ // Off color
70
67
  &[aria-selected="false"],
71
68
  &[aria-pressed="false"],
72
- &[disabled],
73
- &[aria-disabled="true"] {
74
- @if ($type == 'var') {
75
- color: mdwOverlayThemeValue("off-color", $type);
69
+ &[aria-selected="true"]:not([aria-current]) {
70
+ #{if($type == 'var', '&', '&,&.mdw-theme')} {
71
+ color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("high-opacity", $type));
76
72
  &[mdw-border-ink] {
77
- border-color: mdwOverlayThemeValue("off-divider-color", $type);
73
+ border-color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("divider-opacity", $type));
78
74
  }
79
75
  &[mdw-overlay-default="medium"] {
80
- color: mdwOverlayThemeValue("off-medium-color", $type);
76
+ color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("medium-opacity", $type));
81
77
  }
82
78
  &[mdw-overlay-default="inactive"] {
83
- color: mdwOverlayThemeValue("off-inactive-color", $type);
79
+ color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("inactive-opacity", $type));
84
80
  }
85
81
  &[mdw-overlay-default="divider"] {
86
- color: mdwOverlayThemeValue("off-divider-color", $type);
82
+ color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("divider-opacity", $type));
87
83
  }
88
- } @else {
89
- &,&.mdw-theme {
90
- color: mdwOverlayThemeValue("off-color", $type);
91
- &[mdw-border-ink] {
92
- border-color: mdwOverlayThemeValue("off-divider-color", $type);
93
- }
94
- &[mdw-overlay-default="medium"] {
95
- color: mdwOverlayThemeValue("off-medium-color", $type);
96
- }
97
- &[mdw-overlay-default="inactive"] {
98
- color: mdwOverlayThemeValue("off-inactive-color", $type);
99
- }
100
- &[mdw-overlay-default="divider"] {
101
- color: mdwOverlayThemeValue("off-divider-color", $type);
102
- }
103
- }
104
- }
105
-
84
+ }
106
85
  }
107
86
 
108
- &[disabled],
109
87
  &[aria-disabled="true"] {
110
- opacity: mdwOverlayThemeValue("disabled-opacity", $type);
88
+ &[mdw-overlay-disabled="ink"] {
89
+ color: RGBA(getThemeValue("overlay-color", $type), getThemeValue("inactive-opacity", $type));
90
+ }
91
+ &:not([mdw-overlay-disabled]) {
92
+ opacity: getThemeValue("disabled-opacity", $type);
93
+ }
111
94
  }
112
95
 
113
96
  &:not([mdw-overlay-touch="true"]) {
114
97
  &:focus:not([mdw-overlay-off~="focus"]):not([mdw-overlay-touch="true"])::before {
115
- opacity: mdwOverlayThemeValue("focus-opacity", $type);
98
+ opacity: getThemeValue("focus-opacity", $type);
116
99
  }
117
100
 
118
- &:not([disabled]):not([aria-disabled="true"]):not([mdw-overlay-touch="true"]) {
101
+ &:not([aria-disabled="true"]):not([mdw-overlay-touch="true"]) {
119
102
  &:hover:not([mdw-overlay-off~="hover"])::before {
120
- opacity: mdwOverlayThemeValue("hover-opacity", $type);
103
+ opacity: getThemeValue("hover-opacity", $type);
121
104
  }
122
105
 
123
106
  &:hover:focus:not([mdw-overlay-off~="hover"]):not([mdw-overlay-off~="focus"])::before {
124
- opacity: mdwOverlayThemeValue("hover-focus-opacity", $type);
107
+ opacity: getThemeValue("hover-focus-opacity", $type);
125
108
  }
126
109
  }
127
110
  }
@@ -129,46 +112,45 @@ $mdw-overlay__theme-values: (
129
112
  // Selected
130
113
  &[aria-selected="true"]:not([mdw-overlay-off~="selected"]) {
131
114
  &::before {
132
- opacity: mdwOverlayThemeValue("selected-opacity", $type);
115
+ opacity: getThemeValue("selected-opacity", $type);
133
116
  }
134
117
 
135
118
  &:not([mdw-overlay-touch="true"]) {
136
119
  &:focus:not([mdw-overlay-off~="focus"])::before {
137
- opacity: mdwOverlayThemeValue("selected-focus-opacity", $type);
120
+ opacity: getThemeValue("selected-focus-opacity", $type);
138
121
  }
139
122
 
140
- &:not([disabled]):not([aria-disabled="true"]) {
123
+ &:not([aria-disabled="true"]) {
141
124
  &:hover:not([mdw-overlay-off~="hover"])::before {
142
- opacity: mdwOverlayThemeValue("selected-hover-opacity", $type);
125
+ opacity: getThemeValue("selected-hover-opacity", $type);
143
126
  }
144
127
 
145
128
  &:hover:focus:not([mdw-overlay-off~="hover"]):not([mdw-overlay-off~="focus"])::before {
146
- opacity: mdwOverlayThemeValue("selected-hover-focus-opacity", $type);
129
+ opacity: getThemeValue("selected-hover-focus-opacity", $type);
147
130
  }
148
131
  }
149
132
  }
150
133
  }
151
134
 
152
135
  // Activated
153
- .mdw-overlay__group[aria-multiselectable="false"] &[aria-selected="true"]:not([mdw-overlay-off~="selected"]),
154
- &[aria-current]:not([mdw-overlay-off~="current"]),
136
+ &[aria-current]:not([mdw-overlay-off~="activated"]),
155
137
  &[aria-pressed="true"]:not([mdw-overlay-off~="activated"]) {
156
138
  &::before {
157
- opacity: mdwOverlayThemeValue("activated-opacity", $type);
139
+ opacity: getThemeValue("activated-opacity", $type);
158
140
  }
159
141
 
160
142
  &:not([mdw-overlay-touch="true"]) {
161
143
  &:focus:not([mdw-overlay-off~="focus"])::before {
162
- opacity: mdwOverlayThemeValue("activated-focus-opacity", $type);
144
+ opacity: getThemeValue("activated-focus-opacity", $type);
163
145
  }
164
146
 
165
- &:not([disabled]):not([aria-disabled="true"]) {
147
+ &:not([aria-disabled="true"]) {
166
148
  &:hover:not([mdw-overlay-off~="hover"])::before {
167
- opacity: mdwOverlayThemeValue("activated-hover-opacity", $type);
149
+ opacity: getThemeValue("activated-hover-opacity", $type);
168
150
  }
169
151
 
170
152
  &:hover:focus:not([mdw-overlay-off~="hover"]):not([mdw-overlay-off~="focus"])::before {
171
- opacity: mdwOverlayThemeValue("activated-hover-focus-opacity", $type);
153
+ opacity: getThemeValue("activated-hover-focus-opacity", $type);
172
154
  }
173
155
  }
174
156
  }
@@ -176,14 +158,14 @@ $mdw-overlay__theme-values: (
176
158
  }
177
159
  }
178
160
 
179
- @include mdw-theme__add-component-fallback-rules('light') {
180
- @include mdw-overlay__theme-rules('light');
161
+ @include theme.addComponentFallbackRules('light') {
162
+ @include addThemeRules('light');
181
163
  }
182
- @include mdw-theme__add-component-fallback-rules('dark') {
183
- @include mdw-overlay__theme-rules('dark');
164
+ @include theme.addComponentFallbackRules('dark') {
165
+ @include addThemeRules('dark');
184
166
  }
185
167
 
186
168
 
187
- @include mdw-theme__add-component-variable-rules('overlay', $mdw-overlay__theme-values) {
188
- @include mdw-overlay__theme-rules();
169
+ @include theme.addComponentCSSVariableRules('overlay', $themeValues) {
170
+ @include addThemeRules();
189
171
  }
@@ -1,23 +1,9 @@
1
- import { getPassiveEventListenerOption, iterateArrayLike } from '../dom';
1
+ import { getPassiveEventListenerOption, iterateArrayLike } from '../dom.js';
2
2
 
3
- /**
4
- * @param {Element|Document} [root=document]
5
- * @return {void}
6
- */
7
- export function attachAll(root = document) {
8
- iterateArrayLike(root.getElementsByClassName('mdw-overlay'), attach);
9
- }
3
+ let lastInteractionWasTouch = false;
10
4
 
11
- /**
12
- * @param {Element} element
13
- * @return {void}
14
- */
15
- export function attach(element) {
16
- element.setAttribute('mdw-overlay-js', '');
17
- element.addEventListener('mousedown', onMouseDown, getPassiveEventListenerOption());
18
- element.addEventListener('touchstart', onTouchStart, getPassiveEventListenerOption());
19
- element.addEventListener('keydown', onKeyDown, getPassiveEventListenerOption());
20
- element.addEventListener('blur', onBlur, getPassiveEventListenerOption());
5
+ if (window && window.matchMedia) {
6
+ lastInteractionWasTouch = window.matchMedia('(any-pointer: coarse)').matches;
21
7
  }
22
8
 
23
9
  /**
@@ -60,9 +46,54 @@ export function onKeyDown(event) {
60
46
  export function onBlur(event) {
61
47
  /** @type {HTMLElement} */
62
48
  const element = (event.currentTarget);
49
+ const value = element.getAttribute('mdw-overlay-touch');
50
+ if (value == null) {
51
+ return;
52
+ }
53
+ if (value === 'true') {
54
+ lastInteractionWasTouch = true;
55
+ } else {
56
+ lastInteractionWasTouch = false;
57
+ }
63
58
  element.removeAttribute('mdw-overlay-touch');
64
59
  }
65
60
 
61
+ /**
62
+ * @param {FocusEvent} event
63
+ * @return {void}
64
+ */
65
+ export function onFocus(event) {
66
+ /** @type {HTMLElement} */
67
+ const element = (event.currentTarget);
68
+ if (!element.hasAttribute('mdw-overlay-touch')) {
69
+ // Element was focused without a mouse or touch event (keyboard or programmatic)
70
+ if (lastInteractionWasTouch) {
71
+ element.setAttribute('mdw-overlay-touch', 'true');
72
+ }
73
+ }
74
+ }
75
+
76
+ /**
77
+ * @param {Element} element
78
+ * @return {void}
79
+ */
80
+ export function attach(element) {
81
+ element.setAttribute('mdw-overlay-js', '');
82
+ element.addEventListener('mousedown', onMouseDown, getPassiveEventListenerOption());
83
+ element.addEventListener('touchstart', onTouchStart, getPassiveEventListenerOption());
84
+ element.addEventListener('keydown', onKeyDown, getPassiveEventListenerOption());
85
+ element.addEventListener('blur', onBlur, getPassiveEventListenerOption());
86
+ element.addEventListener('focus', onFocus, getPassiveEventListenerOption());
87
+ }
88
+
89
+ /**
90
+ * @param {Element|Document} [root=document]
91
+ * @return {void}
92
+ */
93
+ export function attachAll(root = document) {
94
+ iterateArrayLike(root.getElementsByClassName('mdw-overlay'), attach);
95
+ }
96
+
66
97
  /**
67
98
  * @param {Element} element
68
99
  * @return {void}
@@ -1,2 +1,2 @@
1
- @import './_spec.scss';
2
- @import './_theme.scss';
1
+ @forward './_spec.scss';
2
+ @forward './_theme.scss';
@@ -1,14 +1,16 @@
1
1
  // https://android.googlesource.com/platform/frameworks/base/+/dbcbca4/graphics/java/android/graphics/drawable/Ripple.java
2
2
 
3
- @import "../_breakpoint.scss";
4
- @import "../_platform.scss";
5
- @import "../_motion.scss";
3
+ @use "sass:math";
6
4
 
7
- $mdw-ripple__enter-delay: 80ms !default;
5
+ @use "../_breakpoint.scss" as breakpoint;
6
+ @use "../_platform.scss" as platform;
7
+ @use "../_motion.scss" as motion;
8
8
 
9
- $mdw-ripple__fade-out-duration: 1000ms / 3.0 !default;
10
- $mdw-ripple__touch-down-acceleration: 1024 !default;
11
- $mdw-ripple__touch-up-acceleration: 3400 !default;
9
+ $enterDelay: 80ms !default;
10
+
11
+ $fadeOutDuration: math.div(1000ms, 3.0) !default;
12
+ $touchDownAcceleration: 1024 !default;
13
+ $touchUpAcceleration: 3400 !default;
12
14
 
13
15
  // Ripple starts at 100% opacity
14
16
  // Ripple fills linearly
@@ -16,7 +18,7 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
16
18
  // Ripple fills on touch up with duration: 1000ms * √(Δradius / (1024 + 3400)
17
19
  // Ripple opacity down to 0 on touch-up event with deceleration and duration: 1000ms / 3.0
18
20
 
19
- // Use $mdw-motion__expand-duration temporarily
21
+ // Use motion.$expandDuration temporarily
20
22
 
21
23
  // TODO: Use variable ripple scale durations
22
24
  // TODO: Use enter-delay with JS Ripple
@@ -46,6 +48,7 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
46
48
 
47
49
  .mdw-ripple {
48
50
  position: relative;
51
+
49
52
  -webkit-tap-highlight-color: transparent;
50
53
  }
51
54
 
@@ -75,14 +78,14 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
75
78
  position: absolute;
76
79
 
77
80
  animation-name: none;
78
- animation-duration: $mdw-motion__expand-duration;
81
+ animation-duration: motion.$expandDuration;
79
82
  animation-timing-function: linear;
80
83
  animation-direction: normal;
81
84
  animation-fill-mode: forwards;
82
85
  transition-delay: 0s;
83
- transition-duration: $mdw-motion__simple-duration;
86
+ transition-duration: motion.$simpleDuration;
84
87
  transition-property: background-color, color;
85
- transition-timing-function: $mdw-motion__standard-easing;
88
+ transition-timing-function: motion.$standardEasing;
86
89
 
87
90
  opacity: 0.16;
88
91
  pointer-events: none;
@@ -91,13 +94,6 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
91
94
  background-color: currentColor;
92
95
 
93
96
  border-radius: 50%;
94
-
95
- &[mdw-fade-in-out] {
96
- animation-name: ripple-fade-in, ripple-fade-out;
97
- animation-duration: $mdw-motion__expand-duration, $mdw-ripple__fade-out-duration;
98
- animation-timing-function: linear, $mdw-motion__decelerate-easing;
99
- animation-delay: 0ms, $mdw-motion__expand-duration;
100
- }
101
97
  }
102
98
 
103
99
  .mdw-ripple__inner[mdw-fade-in] {
@@ -111,8 +107,8 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
111
107
  .mdw-ripple:not(:active) > .mdw-ripple__container > .mdw-ripple__inner[mdw-fade-in-complete][mdw-fade-in],
112
108
  .mdw-ripple__inner[mdw-fade-out] {
113
109
  animation-name: ripple-fade-out;
114
- animation-duration: $mdw-ripple__fade-out-duration;
115
- animation-timing-function: $mdw-motion__decelerate-easing;
110
+ animation-duration: $fadeOutDuration;
111
+ animation-timing-function: motion.$decelerateEasing;
116
112
  }
117
113
 
118
114
 
@@ -142,10 +138,8 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
142
138
  }
143
139
 
144
140
  to {
145
-
146
- transform: scale(2);
147
-
148
141
  opacity: 0;
142
+ transform: scale(2);
149
143
  }
150
144
  }
151
145
 
@@ -164,21 +158,10 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
164
158
  -webkit-user-select: none;
165
159
  user-select: none;
166
160
 
167
- transition-delay:
168
- $mdw-ripple__enter-delay,
169
- $mdw-ripple__enter-delay + $mdw-motion__expand-duration;
170
- transition-duration:
171
- $mdw-motion__expand-duration + $mdw-ripple__fade-out-duration,
172
- $mdw-ripple__fade-out-duration;
173
- transition-property:
174
- transform,
175
- background-color;
176
- transition-timing-function:
177
- linear,
178
- $mdw-motion__decelerate-easing;
179
- will-change:
180
- transform,
181
- background-color;
161
+ transition:
162
+ transform #{motion.$expandDuration + $fadeOutDuration} linear $enterDelay,
163
+ background-color $fadeOutDuration motion.$decelerateEasing #{$enterDelay + motion.$expandDuration};
164
+ will-change: transform, background-color;
182
165
 
183
166
  opacity: 0.16;
184
167
  pointer-events: none;
@@ -208,7 +191,7 @@ $mdw-ripple__touch-up-acceleration: 3400 !default;
208
191
  .mdw-ripple[aria-disabled="true"] {
209
192
  & > .mdw-ripple__container,
210
193
  &::after {
211
- display: none;
194
+ visibility: hidden;
212
195
  }
213
196
  }
214
197
 
@@ -2,39 +2,39 @@
2
2
  // https://material.io/design/components/buttons.html
3
3
  // https://material.io/design/iconography/system-icons.html#color
4
4
 
5
- @import '../theme/index.scss';
5
+ @use '../theme/_mixins.scss' as theme;
6
6
 
7
- $mdw-ripple__theme-values: (
7
+ $themeValues: (
8
8
  overlay-color: (('foreground-light', 1.00), ('foreground-dark', 1.00)),
9
9
  pressed-opacity: (0.16, 0.32),
10
10
  ) !default;
11
11
 
12
- @function mdwRippleThemeValue($key, $type) {
13
- @return mdwGetThemeValue('ripple', $mdw-ripple__theme-values, $key, $type);
12
+ @function getThemeValue($key, $type) {
13
+ @return theme.getThemeValue('ripple', $themeValues, $key, $type);
14
14
  }
15
15
 
16
- @mixin mdw-ripple__theme-rules($type: 'var') {
16
+ @mixin addThemeRules($type: 'var') {
17
17
  .mdw-ripple {
18
18
  & > .mdw-ripple__container > .mdw-ripple__inner,
19
19
  &::after {
20
- opacity: mdwRippleThemeValue("pressed-opacity", $type);
20
+ opacity: getThemeValue("pressed-opacity", $type);
21
21
  color: inherit;
22
22
  @if ($type == 'var') {
23
23
  // Fallback handed by previous inherit rule
24
- color: RGB(var(--ink-color));
24
+ color: RGB(var(--mdw-ink));
25
25
  }
26
26
  }
27
27
  }
28
28
  }
29
29
 
30
30
 
31
- @include mdw-theme__add-component-fallback-rules('light') {
32
- @include mdw-ripple__theme-rules('light');
31
+ @include theme.addComponentFallbackRules('light') {
32
+ @include addThemeRules('light');
33
33
  }
34
- @include mdw-theme__add-component-fallback-rules('dark') {
35
- @include mdw-ripple__theme-rules('dark');
34
+ @include theme.addComponentFallbackRules('dark') {
35
+ @include addThemeRules('dark');
36
36
  }
37
37
 
38
- @include mdw-theme__add-component-variable-rules('ripple', $mdw-ripple__theme-values) {
39
- @include mdw-ripple__theme-rules();
38
+ @include theme.addComponentCSSVariableRules('ripple', $themeValues) {
39
+ @include addThemeRules();
40
40
  }