@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
@@ -1,6 +1,6 @@
1
- import * as Overlay from '../../core/overlay/index';
2
- import * as Ripple from '../../core/ripple/index';
3
- import { iterateArrayLike, nextTick } from '../../core/dom';
1
+ import { iterateArrayLike, nextTick } from '../../core/dom.js';
2
+ import * as Overlay from '../../core/overlay/index.js';
3
+ import * as Ripple from '../../core/ripple/index.js';
4
4
 
5
5
  iterateArrayLike(document.getElementsByClassName('mdw-overlay'), Overlay.attach);
6
6
  iterateArrayLike(document.getElementsByClassName('mdw-ripple'), Ripple.attach);
@@ -16,7 +16,6 @@ const sampleContrastText = document.getElementById('sample-contrast__text');
16
16
  const sampleContrastSelected = document.getElementById('sample-contrast__selected');
17
17
  const sampleContrastActivated = document.getElementById('sample-contrast__activated');
18
18
 
19
-
20
19
  /** @typedef {{r:number,g:number,b:number,a:number}} Color */
21
20
 
22
21
  /**
@@ -40,7 +39,7 @@ function parseColor(colorString) {
40
39
  return colorString
41
40
  .match(/\(([^)]+)\)/)[1]
42
41
  .split(',')
43
- .map(value => (value == null ? 1.0 : parseFloat(value)))
42
+ .map((value) => (value == null ? 1.0 : parseFloat(value)))
44
43
  .reduce((prev, curr, index) => {
45
44
  if (index > 3) {
46
45
  throw new Error('Unexpected 5th value');
@@ -76,13 +75,20 @@ function overlayColor(color, overlay) {
76
75
  * @return {number}
77
76
  */
78
77
  function getLuminance(color) {
79
- // L = 0.2126 * R + 0.7152 * G + 0.0722 * B
80
- return 0.2126
81
- * (color.r <= (0.03928 * 255) ? color.r / 255 / 12.92 : ((color.r / 255 + 0.055) / 1.055) ** 2.4)
82
- + 0.7152
83
- * (color.g <= (0.03928 * 255) ? color.g / 255 / 12.92 : ((color.g / 255 + 0.055) / 1.055) ** 2.4)
84
- + 0.0722
85
- * (color.b <= (0.03928 * 255) ? color.b / 255 / 12.92 : ((color.b / 255 + 0.055) / 1.055) ** 2.4);
78
+ /**
79
+ * @param {number} colorValue
80
+ * @return {number}
81
+ */
82
+ function sRGBMapping(colorValue) {
83
+ if (colorValue <= (0.03928 * 255)) {
84
+ return colorValue / 255 / 12.92;
85
+ }
86
+ return ((colorValue / 255 + 0.055) / 1.055) ** 2.4;
87
+ }
88
+ const R = 0.2126 * sRGBMapping(color.r);
89
+ const G = 0.7152 * sRGBMapping(color.g);
90
+ const B = 0.0722 * sRGBMapping(color.b);
91
+ return (R + G + B);
86
92
  }
87
93
 
88
94
  /**
@@ -126,10 +132,10 @@ function calculateContrast() {
126
132
  const style = window.getComputedStyle(sampleButton);
127
133
  const surfaceColor = parseColor(style.backgroundColor);
128
134
  const inkColor = parseColor(style.color);
129
- sampleSurface.textContent = ` ${colorToString(surfaceColor)}`;
130
- sampleInk.textContent = ` ${colorToString(inkColor)}`;
135
+ sampleSurface.textContent = colorToString(surfaceColor);
136
+ sampleInk.textContent = colorToString(inkColor);
131
137
  const flattenedInk = overlayColor(surfaceColor, inkColor);
132
- sampleContrastText.textContent = ` ${getContrastRatio(surfaceColor, flattenedInk).toFixed(2)}`;
138
+ sampleContrastText.textContent = getContrastRatio(surfaceColor, flattenedInk).toFixed(2);
133
139
 
134
140
  let selectedOpacity = 0.08;
135
141
  let activatedOpacity = 0.12;
@@ -146,12 +152,12 @@ function calculateContrast() {
146
152
  const selectedOverlay = parseColor(`rgba(${overlayInkColor.r},${overlayInkColor.g},${overlayInkColor.b},${selectedOpacity})`);
147
153
  const selectedBackground = overlayColor(surfaceColor, selectedOverlay);
148
154
  const selectedColor = overlayColor(selectedFlattenedInk, selectedOverlay);
149
- sampleContrastSelected.textContent = ` ${getContrastRatio(selectedBackground, selectedColor).toFixed(2)}`;
155
+ sampleContrastSelected.textContent = getContrastRatio(selectedBackground, selectedColor).toFixed(2);
150
156
 
151
157
  const activatedOverlay = parseColor(`rgba(${overlayInkColor.r},${overlayInkColor.g},${overlayInkColor.b},${activatedOpacity})`);
152
158
  const activatedBackground = overlayColor(surfaceColor, activatedOverlay);
153
159
  const activatedColor = overlayColor(flattenedInk, activatedOverlay);
154
- sampleContrastActivated.textContent = ` ${getContrastRatio(activatedBackground, activatedColor).toFixed(2)}`;
160
+ sampleContrastActivated.textContent = getContrastRatio(activatedBackground, activatedColor).toFixed(2);
155
161
  });
156
162
  }
157
163
 
@@ -174,14 +180,83 @@ function onItemClick(event) {
174
180
  calculateContrast();
175
181
  }
176
182
 
183
+ const currentInkOptions = {
184
+ color: 'secondary',
185
+ tone: 'contrast',
186
+ opacity: '',
187
+ };
188
+
189
+ const currentSurfaceOptions = {
190
+ color: 'binary',
191
+ tone: '',
192
+ };
193
+
194
+ /** @return {void} */
195
+ function refresh() {
196
+ const inkProperties = [
197
+ currentInkOptions.color,
198
+ currentInkOptions.tone,
199
+ currentInkOptions.opacity,
200
+ ].filter((v) => v).join(' ');
201
+ const surfaceProperties = [
202
+ currentSurfaceOptions.color,
203
+ currentSurfaceOptions.tone,
204
+ ].filter((v) => v).join(' ');
205
+ iterateArrayLike(document.querySelectorAll('#color-sample-area .demo-core-item'), (el) => {
206
+ el.setAttribute('mdw-ink', inkProperties);
207
+ el.setAttribute('mdw-surface', surfaceProperties);
208
+ });
209
+ calculateContrast();
210
+ }
211
+
212
+ /**
213
+ * @param {Event} event
214
+ * @return {void}
215
+ */
216
+ function onOptionChange(event) {
217
+ /** @type {HTMLSelectElement} */
218
+ const selectElement = (event.target);
219
+ const { name, value } = selectElement;
220
+ switch (name) {
221
+ case 'ink-color':
222
+ currentInkOptions.color = value;
223
+ break;
224
+ case 'ink-tone':
225
+ currentInkOptions.tone = value;
226
+ break;
227
+ case 'ink-opacity':
228
+ currentInkOptions.opacity = value;
229
+ break;
230
+ case 'surface-color':
231
+ currentSurfaceOptions.color = value;
232
+ break;
233
+ case 'surface-tone':
234
+ currentSurfaceOptions.tone = value;
235
+ break;
236
+ default:
237
+ return;
238
+ }
239
+ refresh();
240
+ }
241
+
242
+ /** @return {void} */
243
+ function setupComponentOptions() {
244
+ // sampleComponent = document.querySelector('.component-sample .mdw-button');
245
+ // Button.attach(sampleComponent);
246
+ iterateArrayLike(document.querySelectorAll('#color-page-options [name]'), (el) => {
247
+ el.addEventListener('change', onOptionChange);
248
+ });
249
+ }
250
+
177
251
  iterateArrayLike(
178
252
  document.getElementsByClassName('demo-core-item'),
179
- item => item.addEventListener('click', onItemClick)
253
+ (item) => item.addEventListener('click', onItemClick),
180
254
  );
181
255
 
182
256
  [
183
257
  document.getElementById('darkModeButton'),
184
258
  document.getElementById('altThemeButton'),
185
- ].forEach(button => button.addEventListener('click', calculateContrast));
259
+ ].forEach((button) => button.addEventListener('click', calculateContrast));
186
260
 
187
- calculateContrast();
261
+ setupComponentOptions();
262
+ refresh();
@@ -0,0 +1,121 @@
1
+ include ../_mixins.pug
2
+
3
+ +header("color")
4
+ .mdw-grid(mdw-margin-top mdw-margin-bottom mdw-columns="4")#color-page-options
5
+ .mdw-grid__item(mdw-colspan="4")
6
+ .mdw-grid__content.mdw-theme(mdw-elevation="8")
7
+ #color-sample-area
8
+ a#sample-button.demo-core-item.mdw-overlay.mdw-elevation.mdw-ripple.mdw-theme(tabindex="0" mdw-elevation="1" mdw-surface="binary" mdw-ink="secondary contrast") Enabled
9
+ a#sample-button__selected.demo-core-item.mdw-overlay.mdw-elevation.mdw-ripple.mdw-theme(tabindex="0" mdw-elevation="1" mdw-surface="binary" mdw-ink="secondary contrast" aria-selected="true") Selected
10
+ a#sample-button__activated.demo-core-item.mdw-overlay.mdw-elevation.mdw-ripple.mdw-theme(tabindex="0" mdw-elevation="1" mdw-surface="binary" mdw-ink="secondary contrast" aria-pressed="true") Activated
11
+ div(style="margin:8px")
12
+ p.mdw-type Surface:
13
+ span#sample-surface.mdw-theme(mdw-ink="medium") test
14
+ p.mdw-type Ink:
15
+ span#sample-ink.mdw-theme(mdw-ink="medium") test
16
+ div(style="margin:8px")
17
+ p.mdw-type Text Contrast:
18
+ span#sample-contrast__text.mdw-theme(mdw-ink="medium") test
19
+ span / 4.5
20
+ p.mdw-type Selected Contrast:
21
+ span#sample-contrast__selected.mdw-theme(mdw-ink="medium") test
22
+ span / 4.5
23
+ p.mdw-type Activated Contrast:
24
+ span#sample-contrast__activated.mdw-theme(mdw-ink="medium") test
25
+ span / 4.5
26
+ .mdw-grid__item(mdw-colspan="2")
27
+ .mdw-grid__content
28
+ .mdw-type(mdw-style="subtitle") Ink
29
+ div
30
+ label.mdw-textfield.mdw-theme(mdw-ink="secondary" mdw-outlined)
31
+ select.mdw-textfield__input(name="ink-color")
32
+ option.mdw-theme(mdw-surface="card" value="default") Default
33
+ option.mdw-theme(mdw-surface="card" value="black") Black
34
+ option.mdw-theme(mdw-surface="card" value="white") White
35
+ option.mdw-theme(mdw-surface="card" value="primary") Primary
36
+ option.mdw-theme(mdw-surface="card" value="secondary" selected) Secondary
37
+ option.mdw-theme(mdw-surface="card" value="warn") Warn
38
+ option.mdw-theme(mdw-surface="card" value="amber") Amber
39
+ option.mdw-theme(mdw-surface="card" value="blue") Blue
40
+ option.mdw-theme(mdw-surface="card" value="cyan") Cyan
41
+ option.mdw-theme(mdw-surface="card" value="red") Red
42
+ option.mdw-theme(mdw-surface="card" value="green") Green
43
+ option.mdw-theme(mdw-surface="card" value="deeppurple") Deeppurple
44
+ option.mdw-theme(mdw-surface="card" value="purple") Purple
45
+ option.mdw-theme(mdw-surface="card" value="yellow") Yellow
46
+ option.mdw-theme(mdw-surface="card" value="teal") Teal
47
+ .mdw-textfield__icon(mdw-dropdown)
48
+ .mdw-textfield__border
49
+ .mdw-textfield__outline-gap
50
+ .mdw-textfield__label Color
51
+ label.mdw-textfield.mdw-theme(mdw-ink="secondary" mdw-outlined)
52
+ select.mdw-textfield__input(name="ink-tone")
53
+ option.mdw-theme(mdw-surface="card" value="" selected) Auto
54
+ option.mdw-theme(mdw-surface="card" value="light") Light
55
+ option.mdw-theme(mdw-surface="card" value="contrast" selected) Contrast
56
+ option.mdw-theme(mdw-surface="card" value="A100") A100
57
+ option.mdw-theme(mdw-surface="card" value="A200") A200
58
+ option.mdw-theme(mdw-surface="card" value="A400") A400
59
+ option.mdw-theme(mdw-surface="card" value="A700") A700
60
+ .mdw-textfield__icon(mdw-dropdown)
61
+ .mdw-textfield__border
62
+ .mdw-textfield__outline-gap
63
+ .mdw-textfield__label Tone
64
+ label.mdw-textfield.mdw-theme(mdw-ink="secondary" mdw-outlined)
65
+ select.mdw-textfield__input(name="ink-opacity")
66
+ option.mdw-theme(mdw-surface="card" value="" selected) Auto
67
+ option.mdw-theme(mdw-surface="card" value="solid") Solid
68
+ option.mdw-theme(mdw-surface="card" value="high") High
69
+ option.mdw-theme(mdw-surface="card" value="medium") Medium
70
+ option.mdw-theme(mdw-surface="card" value="inactive") Inactive
71
+ option.mdw-theme(mdw-surface="card" value="divider") Divider
72
+ .mdw-textfield__icon(mdw-dropdown)
73
+ .mdw-textfield__border
74
+ .mdw-textfield__outline-gap
75
+ .mdw-textfield__label Opacity
76
+ .mdw-grid__item(mdw-colspan="2")
77
+ .mdw-grid__content
78
+ .mdw-type(mdw-style="subtitle") Surface
79
+ #color-page-options
80
+ label.mdw-textfield.mdw-theme(mdw-ink="secondary" mdw-outlined)
81
+ select.mdw-textfield__input(name="surface-color")
82
+ option.mdw-theme(mdw-surface="card" value="card") Card
83
+ option.mdw-theme(mdw-surface="card" value="binary" selected) Binary
84
+ option.mdw-theme(mdw-surface="card" value="black") Black
85
+ option.mdw-theme(mdw-surface="card" value="white") White
86
+ option.mdw-theme(mdw-surface="card" value="background") Background
87
+ option.mdw-theme(mdw-surface="card" value="primary") Primary
88
+ option.mdw-theme(mdw-surface="card" value="secondary") Secondary
89
+ option.mdw-theme(mdw-surface="card" value="warn") Warn
90
+ option.mdw-theme(mdw-surface="card" value="amber") Amber
91
+ option.mdw-theme(mdw-surface="card" value="blue") Blue
92
+ option.mdw-theme(mdw-surface="card" value="cyan") Cyan
93
+ option.mdw-theme(mdw-surface="card" value="red") Red
94
+ option.mdw-theme(mdw-surface="card" value="green") Green
95
+ option.mdw-theme(mdw-surface="card" value="deeppurple") Deeppurple
96
+ option.mdw-theme(mdw-surface="card" value="purple") Purple
97
+ option.mdw-theme(mdw-surface="card" value="yellow") Yellow
98
+ option.mdw-theme(mdw-surface="card" value="teal") Teal
99
+ .mdw-textfield__icon(mdw-dropdown)
100
+ .mdw-textfield__border
101
+ .mdw-textfield__outline-gap
102
+ .mdw-textfield__label Color
103
+ label.mdw-textfield.mdw-theme(mdw-ink="secondary" mdw-outlined)
104
+ select.mdw-textfield__input(name="surface-tone")
105
+ option.mdw-theme(mdw-surface="card" value="" selected) Default
106
+ option.mdw-theme(mdw-surface="card" value="alt") Alternate
107
+ option.mdw-theme(mdw-surface="card" value="50") 50
108
+ option.mdw-theme(mdw-surface="card" value="100") 100
109
+ option.mdw-theme(mdw-surface="card" value="200") 200
110
+ option.mdw-theme(mdw-surface="card" value="300") 300
111
+ option.mdw-theme(mdw-surface="card" value="400") 400
112
+ option.mdw-theme(mdw-surface="card" value="500") 500
113
+ option.mdw-theme(mdw-surface="card" value="600") 600
114
+ option.mdw-theme(mdw-surface="card" value="700") 700
115
+ option.mdw-theme(mdw-surface="card" value="800") 800
116
+ option.mdw-theme(mdw-surface="card" value="900") 900
117
+ .mdw-textfield__icon(mdw-dropdown)
118
+ .mdw-textfield__border
119
+ .mdw-textfield__outline-gap
120
+ .mdw-textfield__label Tone
121
+ script(src='color.min.js')
@@ -0,0 +1,323 @@
1
+ <% var T = '../../templates/index.eta' %>
2
+ <% layout('../_partials/_header.eta', {page: 'datatable'}) %>
3
+ <div class="mdw-grid" mdw-margin-top mdw-margin-bottom>
4
+ <div class="mdw-grid__item" mdw-colspan="100%">
5
+ <div class="mdw-card mdw-theme" mdw-surface="card" mdw-border-ink>
6
+ <div class="mdw-datatable mdw-theme" mdw-ink="primary" style="overflow-x:auto;">
7
+ <table>
8
+ <caption>Standard HTML Table (CSS Only)</caption>
9
+ <thead>
10
+ <tr>
11
+ <th>Dessert (100g serving)</th>
12
+ <th>Calories</th>
13
+ <th>Fat (g)</th>
14
+ <th>Carbs (g)</th>
15
+ <th>Protein (g)</th>
16
+ <th>Sodium (mg)</th>
17
+ <th>Calcium (%)</th>
18
+ <th>Iron (%)</th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <tr>
23
+ <td>Frozen Yogurt</td>
24
+ <td>159</td>
25
+ <td>6.0</td>
26
+ <td>24</td>
27
+ <td>4.0</td>
28
+ <td>87</td>
29
+ <td>14%</td>
30
+ <td>1%</td>
31
+ </tr>
32
+ <tr>
33
+ <td>Ice cream sandwich</td>
34
+ <td>237</td>
35
+ <td>9.0</td>
36
+ <td>37</td>
37
+ <td>4.3</td>
38
+ <td>129</td>
39
+ <td>8%</td>
40
+ <td>1%</td>
41
+ </tr>
42
+ <tr>
43
+ <td>Eclair</td>
44
+ <td>262</td>
45
+ <td>16.0</td>
46
+ <td>24</td>
47
+ <td>6.0</td>
48
+ <td>337</td>
49
+ <td>6%</td>
50
+ <td>7%</td>
51
+ </tr>
52
+ <tr>
53
+ <td>Cupcake</td>
54
+ <td>305</td>
55
+ <td>3.7</td>
56
+ <td>67</td>
57
+ <td>4.3</td>
58
+ <td>413</td>
59
+ <td>3%</td>
60
+ <td>8%</td>
61
+ </tr>
62
+ <tr>
63
+ <td>Gingerbread</td>
64
+ <td>356</td>
65
+ <td>16.0</td>
66
+ <td>49</td>
67
+ <td>3.9</td>
68
+ <td>327</td>
69
+ <td>7%</td>
70
+ <td>16%</td>
71
+ </tr>
72
+ <tr>
73
+ <td>Jelly bean</td>
74
+ <td>375</td>
75
+ <td>0.0</td>
76
+ <td>94</td>
77
+ <td>0.0</td>
78
+ <td>50</td>
79
+ <td>0%</td>
80
+ <td>0%</td>
81
+ </tr>
82
+ <tr>
83
+ <td>Lollipop</td>
84
+ <td>392</td>
85
+ <td>0.2</td>
86
+ <td>98</td>
87
+ <td>0</td>
88
+ <td>38</td>
89
+ <td>0%</td>
90
+ <td>2%</td>
91
+ </tr>
92
+ <tr>
93
+ <td>Honeycomb</td>
94
+ <td>408</td>
95
+ <td>3.2</td>
96
+ <td>87</td>
97
+ <td>6.5</td>
98
+ <td>562</td>
99
+ <td>0%</td>
100
+ <td>45%</td>
101
+ </tr>
102
+ <tr>
103
+ <td>Donut</td>
104
+ <td>452</td>
105
+ <td>25.0</td>
106
+ <td>51</td>
107
+ <td>4.9</td>
108
+ <td>326</td>
109
+ <td>2%</td>
110
+ <td>22%</td>
111
+ </tr>
112
+ <tr>
113
+ <td>Kitkat</td>
114
+ <td>518</td>
115
+ <td>26.0</td>
116
+ <td>65</td>
117
+ <td>7</td>
118
+ <td>54</td>
119
+ <td>12%</td>
120
+ <td>6%</td>
121
+ </tr>
122
+ </tbody>
123
+ </table>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="mdw-grid__item" mdw-colspan="100%">
128
+ <div class="mdw-card mdw-theme" mdw-surface="card" mdw-border-ink>
129
+ <div class="mdw-datatable js mdw-theme" mdw-ink="primary" mdw-cell-focusable>
130
+ <div class="mdw-datatable__header">
131
+ <div class="mdw-datatable__header-text">Customized HTML Table</div>
132
+ </div>
133
+ <div class="mdw-datatable__scroller">
134
+ <table>
135
+ <thead>
136
+ <tr>
137
+ <th aria-sort="none" mdw-text mdw-primary-column><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Dessert (100g serving)</th>
138
+ <th aria-sort="ascending" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span><span class="mdw-tooltip__wrapper"><span class="mdw-tooltip__target">Calories</span><div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark>The total amount of food energy in the given serving size.</div></span></th>
139
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Fat (g)</th>
140
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Carbs (g)</th>
141
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Protein (g)</th>
142
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Sodium (mg)</th>
143
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Calcium (%)</th>
144
+ <th aria-sort="none" mdw-number><span class="mdw-datatable__sort-icon material-icons">arrow_downward</span>Iron (%)</th>
145
+ </tr>
146
+ </thead>
147
+ <tbody>
148
+ <tr>
149
+ <td mdw-text mdw-primary-column>Frozen Yogurt</td>
150
+ <td mdw-number>159</td>
151
+ <td mdw-number>6.0</td>
152
+ <td mdw-number>24</td>
153
+ <td mdw-number>4.0</td>
154
+ <td mdw-number>87</td>
155
+ <td mdw-number>14%</td>
156
+ <td mdw-number>1%</td>
157
+ </tr>
158
+ <tr>
159
+ <td mdw-text mdw-primary-column>Ice cream sandwich</td>
160
+ <td mdw-number>237</td>
161
+ <td mdw-number>9.0</td>
162
+ <td mdw-number>37</td>
163
+ <td mdw-number>4.3</td>
164
+ <td mdw-number>129</td>
165
+ <td mdw-number>8%</td>
166
+ <td mdw-number>1%</td>
167
+ </tr>
168
+ <tr>
169
+ <td mdw-text mdw-primary-column>Eclair</td>
170
+ <td mdw-number>262</td>
171
+ <td mdw-number>16.0</td>
172
+ <td mdw-number>24</td>
173
+ <td mdw-number>6.0</td>
174
+ <td mdw-number>337</td>
175
+ <td mdw-number>6%</td>
176
+ <td mdw-number>7%</td>
177
+ </tr>
178
+ <tr>
179
+ <td mdw-text mdw-primary-column>Cupcake</td>
180
+ <td mdw-number>305</td>
181
+ <td mdw-number>3.7</td>
182
+ <td mdw-number>67</td>
183
+ <td mdw-number>4.3</td>
184
+ <td mdw-number>413</td>
185
+ <td mdw-number>3%</td>
186
+ <td mdw-number>8%</td>
187
+ </tr>
188
+ <tr>
189
+ <td mdw-text mdw-primary-column>Gingerbread</td>
190
+ <td mdw-number>356</td>
191
+ <td mdw-number>16.0</td>
192
+ <td mdw-number>49</td>
193
+ <td mdw-number>3.9</td>
194
+ <td mdw-number>327</td>
195
+ <td mdw-number>7%</td>
196
+ <td mdw-number>16%</td>
197
+ </tr>
198
+ <tr>
199
+ <td mdw-text mdw-primary-column>Jelly bean</td>
200
+ <td mdw-number>375</td>
201
+ <td mdw-number>0.0</td>
202
+ <td mdw-number>94</td>
203
+ <td mdw-number>0.0</td>
204
+ <td mdw-number>50</td>
205
+ <td mdw-number>0%</td>
206
+ <td mdw-number>0%</td>
207
+ </tr>
208
+ <tr>
209
+ <td mdw-text mdw-primary-column>Lollipop</td>
210
+ <td mdw-number>392</td>
211
+ <td mdw-number>0.2</td>
212
+ <td mdw-number>98</td>
213
+ <td mdw-number>0</td>
214
+ <td mdw-number>38</td>
215
+ <td mdw-number>0%</td>
216
+ <td mdw-number>2%</td>
217
+ </tr>
218
+ <tr>
219
+ <td mdw-text mdw-primary-column>Honeycomb</td>
220
+ <td mdw-number>408</td>
221
+ <td mdw-number>3.2</td>
222
+ <td mdw-number>87</td>
223
+ <td mdw-number>6.5</td>
224
+ <td mdw-number>562</td>
225
+ <td mdw-number>0%</td>
226
+ <td mdw-number>45%</td>
227
+ </tr>
228
+ <tr>
229
+ <td mdw-text mdw-primary-column>Donut</td>
230
+ <td mdw-number>452</td>
231
+ <td mdw-number>25.0</td>
232
+ <td mdw-number>51</td>
233
+ <td mdw-number>4.9</td>
234
+ <td mdw-number>326</td>
235
+ <td mdw-number>2%</td>
236
+ <td mdw-number>22%</td>
237
+ </tr>
238
+ <tr>
239
+ <td mdw-text mdw-primary-column>Kitkat</td>
240
+ <td mdw-number>518</td>
241
+ <td mdw-number>26.0</td>
242
+ <td mdw-number>65</td>
243
+ <td mdw-number>7</td>
244
+ <td mdw-number>54</td>
245
+ <td mdw-number>12%</td>
246
+ <td mdw-number>6%</td>
247
+ </tr>
248
+ </tbody>
249
+ </table>
250
+ </div>
251
+ <div class="mdw-datatable__footer">
252
+ <div class="mdw-datatable__footer-options">
253
+ <div>Rows per page</div>
254
+ <label class="mdw-textfield" mdw-solo>
255
+ <select class="mdw-textfield__input">
256
+ <option class="mdw-theme" mdw-surface="card" value="10">10</option>
257
+ <option class="mdw-theme" mdw-surface="card" value="25">25</option>
258
+ <option class="mdw-theme" mdw-surface="card" value="50">50</option>
259
+ <option class="mdw-theme" mdw-surface="card" value="100">100</option>
260
+ </select>
261
+ <div class="mdw-textfield__icon" mdw-dropdown></div>
262
+ </label>
263
+ </div>
264
+ <div class="mdw-datatable__footer-details">1-10 of 10</div>
265
+ <div class="mdw-datatable__footer-controls">
266
+ <%~ includeFile(T, { button: { icon:true, disabled:true , class:'material-icons', text:'chevron_left' }}) %>
267
+ <%~ includeFile(T, { button: { icon: true, disabled:true , class:'material-icons', text:'chevron_right' }}) %>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ <div class="mdw-grid__item" mdw-colspan="100%">
274
+ <div class="mdw-card mdw-theme" mdw-surface="card" mdw-border-ink>
275
+ <div class="mdw-datatable js mdw-theme" id="dynamic-table" mdw-ink="primary" mdw-row-focusable style="max-height:80vh;">
276
+ <div class="mdw-datatable__header">
277
+ <div class="mdw-datatable__header-text">Data Table Adapter</div>
278
+ <div class="mdw-datatable__header-controls">
279
+ <div class="mdw-menu__wrapper">
280
+ <%~ includeFile(T, { button: { icon:true, ink:'primary' , class:'material-icons', attributes: {'mdw-overlay-default':"medium", 'aria-pressed':"false"}, text:'filter_list' }}) %>
281
+ <div class="mdw-menu" mdw-position="end">
282
+ <div class="mdw-menu__popup mdw-theme" mdw-surface="card">
283
+ <div class="mdw-menu__item" aria-checked="true" data-filter="none">
284
+ <div class="mdw-menu__radio mdw-theme material-icons" mdw-ink="medium">check</div>
285
+ <div class="mdw-menu__text">No filter</div>
286
+ </div>
287
+ <div class="mdw-menu__item" data-filter="md">
288
+ <div class="mdw-menu__radio mdw-theme material-icons" mdw-ink="medium">check</div>
289
+ <div class="mdw-menu__text">Contains 'md'</div>
290
+ </div>
291
+ <div class="mdw-menu__item" data-filter="div9">
292
+ <div class="mdw-menu__radio mdw-theme material-icons" mdw-ink="medium">check</div>
293
+ <div class="mdw-menu__text">Random divisible by 9</div>
294
+ </div>
295
+ <div class="mdw-menu__item" data-filter="bool">
296
+ <div class="mdw-menu__radio mdw-theme material-icons" mdw-ink="medium">check</div>
297
+ <div class="mdw-menu__text">bool is checked</div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ <div class="mdw-menu__wrapper">
303
+ <%~ includeFile(T, { button: { icon:true, ink:'medium' , class:'material-icons', text:'more_vert' }}) %>
304
+ <div class="mdw-menu" mdw-position="end">
305
+ <div class="mdw-menu__popup mdw-theme" mdw-surface="card">
306
+ <div class="mdw-menu__item" aria-checked="true" data-option="throttle">
307
+ <div class="mdw-menu__check mdw-theme material-icons" mdw-ink="medium">check</div>
308
+ <div class="mdw-menu__text">Throttle</div>
309
+ </div>
310
+ <div class="mdw-menu__item" aria-checked="true" data-option="paginate">
311
+ <div class="mdw-menu__check mdw-theme material-icons" mdw-ink="medium">check</div>
312
+ <div class="mdw-menu__text">Paginate</div>
313
+ </div>
314
+ </div>
315
+ </div>
316
+ </div>
317
+ </div>
318
+ </div>
319
+ </div>
320
+ </div>
321
+ </div>
322
+ </div>
323
+ <script src="datatable.min.js"></script>