@shortfuse/materialdesignweb 0.0.9 → 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.
- package/.browserslistrc +3 -0
- package/.eslintrc.json +146 -27
- package/.stylelintrc.json +598 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/.vscode/tasks.json +19 -10
- package/CHANGELOG.md +24 -0
- package/README.md +84 -2
- package/adapters/datatable/column.js +203 -0
- package/adapters/datatable/index.js +972 -0
- package/adapters/dom/index.js +601 -0
- package/adapters/list/index.js +69 -0
- package/adapters/search/index.js +521 -0
- package/components/appbar/_spec.scss +225 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +118 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +85 -0
- package/components/bottomnav/_spec.scss +157 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +122 -0
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +89 -0
- package/components/{core/button → button}/README.md +16 -22
- package/components/button/_spec.scss +161 -0
- package/components/button/_theme.scss +65 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +43 -0
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +249 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +134 -0
- package/components/chip/_theme.scss +177 -0
- package/components/chip/index.js +21 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +288 -0
- package/components/datatable/_theme.scss +154 -0
- package/components/datatable/cell.js +45 -0
- package/components/datatable/columnheader.js +47 -0
- package/components/datatable/index.js +388 -0
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +49 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +213 -0
- package/components/dialog/_theme.scss +0 -0
- package/components/dialog/index.js +627 -0
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +13 -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/_spec.scss +222 -0
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +103 -0
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +312 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +33 -0
- package/components/layout/_spec.scss +1012 -0
- package/components/layout/_theme.scss +44 -0
- package/components/layout/index.js +464 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +397 -0
- package/components/list/_theme.scss +111 -0
- package/components/list/content.js +110 -0
- package/components/list/index.js +260 -0
- package/components/list/index.scss +2 -0
- package/components/list/item.js +170 -0
- package/components/list/secondary.js +46 -0
- package/components/menu/_spec.scss +362 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +721 -0
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +239 -0
- package/components/{core/progress/style.scss → progress/_spec.scss} +36 -25
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +36 -0
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +386 -0
- package/components/selection/_theme.scss +166 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +76 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +56 -0
- package/components/selection/radiogroup.js +47 -0
- package/components/slider/_spec.scss +64 -0
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +195 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +344 -0
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +235 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +205 -0
- package/components/tab/index.js +260 -0
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +89 -0
- package/components/tab/list.js +210 -0
- package/components/tab/panel.js +54 -0
- package/components/template/_theme.scss +27 -0
- package/components/{core/textfield → textfield}/README.md +70 -50
- package/components/textfield/_mixins.scss +52 -0
- package/components/textfield/_spec.scss +809 -0
- package/components/textfield/_theme.scss +299 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +168 -0
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +188 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +224 -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 +38 -0
- package/core/_length.scss +9 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +34 -0
- package/core/_type.scss +127 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +50 -0
- package/core/aria/keyboard.js +93 -0
- package/core/aria/rovingtabindex.js +178 -0
- package/core/aria/tab.js +60 -0
- package/core/color/_spec.scss +0 -0
- package/core/color/_theme.scss +390 -0
- package/core/color/index.scss +2 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +271 -0
- package/core/overlay/_spec.scss +31 -0
- package/core/overlay/_theme.scss +171 -0
- package/core/overlay/index.js +108 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +197 -0
- package/core/ripple/_theme.scss +40 -0
- package/core/ripple/index.js +294 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_config.scss +2 -0
- package/core/theme/_mixins.scss +172 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -150
- package/core/theme/_variables.scss +24 -0
- package/core/theme/index.js +50 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +468 -0
- package/docs/_flex.scss +22 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_mixins.pug +155 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +29 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +149 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +93 -0
- package/docs/_storage.js +33 -0
- package/docs/docs.scss +295 -0
- package/docs/index.eta +16 -0
- package/docs/index.js +0 -0
- package/docs/pages/appbar.eta +114 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/appbar.pug +78 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +115 -0
- package/docs/pages/bottomnav.pug +137 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/button.pug +121 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +177 -0
- package/docs/pages/card.pug +74 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +82 -0
- package/docs/pages/chip.pug +91 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +262 -0
- package/docs/pages/color.pug +121 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +164 -0
- package/docs/pages/datatable.pug +283 -0
- package/docs/pages/dialog.eta +186 -0
- package/docs/pages/dialog.js +177 -0
- package/docs/pages/dialog.pug +132 -0
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +143 -0
- package/docs/pages/dom.pug +22 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/elevation.pug +25 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/pages/fab.js +44 -0
- package/docs/pages/fab.pug +66 -0
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/grid.pug +95 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/layout.pug +7 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +9 -0
- package/docs/pages/list.pug +326 -0
- package/docs/pages/menu.eta +276 -0
- package/docs/pages/menu.js +217 -0
- package/docs/pages/menu.pug +205 -0
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +4 -0
- package/docs/pages/overlay.pug +55 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/pages/progress.js +12 -0
- package/docs/pages/progress.pug +16 -0
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +4 -0
- package/docs/pages/ripple.pug +21 -0
- package/docs/pages/search.eta +246 -0
- package/docs/pages/search.js +243 -0
- package/docs/pages/search.pug +165 -0
- package/docs/pages/selection.eta +111 -0
- package/docs/pages/selection.js +13 -0
- package/docs/pages/selection.pug +74 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/slider.pug +17 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/pages/snackbar.js +158 -0
- package/docs/pages/snackbar.pug +60 -0
- package/docs/pages/tab.eta +421 -0
- package/docs/pages/tab.js +151 -0
- package/docs/pages/tab.pug +304 -0
- package/docs/pages/textfield.eta +486 -0
- package/docs/pages/textfield.js +254 -0
- package/docs/pages/textfield.pug +360 -0
- package/docs/pages/tooltip.eta +94 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/tooltip.pug +78 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +54 -0
- package/docs/pages/transition.pug +76 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/pages/type.pug +29 -0
- package/docs/postrender.js +39 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_dialogs.pug +96 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/_menus.pug +11 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +480 -0
- package/docs/pwa/pwa.js +306 -0
- package/docs/pwa/pwa.pug +325 -0
- package/docs/pwa/pwa.scss +26 -0
- package/docs/spec.scss +26 -0
- package/docs/themes/_component-themes.scss +26 -0
- package/docs/themes/theme-colored-fallbacks.scss +17 -0
- package/docs/themes/theme-colored.scss +17 -0
- package/docs/themes/theme-default-fallbacks.scss +17 -0
- package/docs/themes/theme-default.scss +17 -0
- package/jsconfig.json +4 -2
- package/package.json +43 -28
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/utils/function.js +3 -0
- package/webpack.config.cjs +257 -0
- package/components/_index.scss +0 -4
- package/components/all-components.scss +0 -14
- package/components/common/functions.scss +0 -173
- package/components/common/mixins.scss +0 -107
- package/components/common/motion.scss +0 -36
- package/components/common/ripple.scss +0 -92
- package/components/common/variables.scss +0 -48
- package/components/complex/dialog/style.scss +0 -159
- package/components/complex/dialog/theming.scss +0 -29
- package/components/complex/navdrawer/style.scss +0 -477
- package/components/complex/navdrawer/theming.scss +0 -58
- package/components/complex/search/index.js +0 -492
- package/components/core/bottomnav/README.md +0 -85
- package/components/core/bottomnav/index.js +0 -140
- package/components/core/bottomnav/style.scss +0 -173
- package/components/core/bottomnav/theming.scss +0 -42
- package/components/core/button/index.js +0 -52
- package/components/core/button/style.scss +0 -283
- package/components/core/button/theming.scss +0 -131
- package/components/core/list/index.js +0 -94
- package/components/core/list/style.scss +0 -269
- package/components/core/list/theming.scss +0 -74
- package/components/core/menu/index.js +0 -127
- package/components/core/menu/style.scss +0 -239
- package/components/core/menu/theming.scss +0 -55
- package/components/core/progress/index.js +0 -33
- package/components/core/selection/style.scss +0 -249
- package/components/core/selection/theming.scss +0 -49
- package/components/core/switch/style.scss +0 -3
- package/components/core/tab/index.js +0 -174
- package/components/core/tab/style.scss +0 -202
- package/components/core/tab/theming.scss +0 -43
- package/components/core/textfield/index.js +0 -169
- package/components/core/textfield/style.scss +0 -672
- package/components/core/textfield/theming.scss +0 -262
- package/components/core/toolbar/style.scss +0 -109
- package/components/core/toolbar/theming.scss +0 -28
- package/components/core/tooltip/style.scss +0 -127
- package/components/core/type/style.scss +0 -133
- package/components/core/type/theming.scss +0 -25
- package/components/index.js +0 -24
- package/components/template/theming.scss +0 -31
- package/components/theming/theming.scss +0 -504
- package/docs/bottomnav.html +0 -171
- package/docs/bottomnav.min.js +0 -383
- package/docs/button.html +0 -322
- package/docs/button.min.js +0 -251
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -83
- package/docs/dialog.html +0 -103
- package/docs/dialog.min.js +0 -160
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -83
- package/docs/index.html +0 -55
- package/docs/index.min.js +0 -83
- package/docs/list.html +0 -442
- package/docs/list.min.js +0 -312
- package/docs/menu.html +0 -185
- package/docs/menu.min.js +0 -370
- package/docs/navdrawer.html +0 -199
- package/docs/navdrawer.min.js +0 -244
- package/docs/progress.html +0 -75
- package/docs/progress.min.js +0 -162
- package/docs/search.html +0 -230
- package/docs/search.min.js +0 -1202
- package/docs/selection.html +0 -188
- package/docs/selection.min.js +0 -160
- package/docs/src/complex/dialog.js +0 -3
- package/docs/src/complex/dialog.pug +0 -44
- package/docs/src/complex/navdrawer.js +0 -82
- package/docs/src/complex/navdrawer.pug +0 -109
- package/docs/src/complex/search.js +0 -207
- package/docs/src/complex/search.pug +0 -143
- package/docs/src/components.scss +0 -1
- package/docs/src/core/bottomnav.js +0 -22
- package/docs/src/core/bottomnav.pug +0 -93
- package/docs/src/core/button.js +0 -16
- package/docs/src/core/button.pug +0 -73
- package/docs/src/core/list.js +0 -21
- package/docs/src/core/list.pug +0 -246
- package/docs/src/core/menu.js +0 -33
- package/docs/src/core/menu.pug +0 -108
- package/docs/src/core/progress.js +0 -11
- package/docs/src/core/progress.pug +0 -17
- package/docs/src/core/selection.js +0 -4
- package/docs/src/core/selection.pug +0 -92
- package/docs/src/core/tab.js +0 -21
- package/docs/src/core/tab.pug +0 -180
- package/docs/src/core/textfield.js +0 -15
- package/docs/src/core/textfield.pug +0 -274
- package/docs/src/core/toolbar.js +0 -4
- package/docs/src/core/toolbar.pug +0 -79
- package/docs/src/core/tooltip.js +0 -4
- package/docs/src/core/tooltip.pug +0 -76
- package/docs/src/core/type.js +0 -4
- package/docs/src/core/type.pug +0 -36
- package/docs/src/docs.scss +0 -200
- package/docs/src/index.pug +0 -5
- package/docs/src/mixins.pug +0 -72
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -35
- package/docs/src/theming.scss +0 -36
- package/docs/tab.html +0 -301
- package/docs/tab.min.js +0 -397
- package/docs/textfield.html +0 -476
- package/docs/textfield.min.js +0 -381
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -83
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -83
- package/docs/toolbar.html +0 -213
- package/docs/toolbar.min.js +0 -160
- package/docs/tooltip.html +0 -138
- package/docs/tooltip.min.js +0 -160
- package/docs/type.html +0 -94
- package/docs/type.min.js +0 -160
- package/webpack.config.js +0 -176
package/docs/_mixins.pug
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
include ../templates/index.pug
|
|
2
|
+
|
|
3
|
+
mixin androidstatusbar(surfaceColor, lightness)
|
|
4
|
+
.androidstatusbar.mdw-theme(
|
|
5
|
+
mdw-surface=(surfaceColor ? surfaceColor : false)
|
|
6
|
+
mdw-light=(lightness=='light' ? '' : false)
|
|
7
|
+
mdw-dark=(lightness=='dark' ? '' : false))
|
|
8
|
+
div 12:30
|
|
9
|
+
i.material-icons(style="letter-spacing:2px;padding:0 2px") 
|
|
10
|
+
|
|
11
|
+
mixin appbar(surfaceColor, lightness, start, end)
|
|
12
|
+
.mdw-appbar.mdw-elevation.mdw-theme(
|
|
13
|
+
style="z-index:4"
|
|
14
|
+
mdw-elevation="4"
|
|
15
|
+
mdw-surface=(surfaceColor ? surfaceColor : false)
|
|
16
|
+
mdw-light=(lightness=='light' ? '' : false)
|
|
17
|
+
mdw-dark=(lightness=='dark' ? '' : false))
|
|
18
|
+
.mdw-appbar__action
|
|
19
|
+
.mdw-appbar__start
|
|
20
|
+
each icon in start
|
|
21
|
+
+mdwButton({ icon:true }).material-icons= icon
|
|
22
|
+
.mdw-appbar__title
|
|
23
|
+
block
|
|
24
|
+
.mdw-appbar__end
|
|
25
|
+
each icon in end
|
|
26
|
+
+mdwButton({ icon:true })(mdw-more-button=(icon === 'more_vert')).material-icons= icon
|
|
27
|
+
mixin androidnavbar
|
|
28
|
+
.androidnavbar
|
|
29
|
+
i.material-icons.back-button 
|
|
30
|
+
i.material-icons 
|
|
31
|
+
i.material-icons 
|
|
32
|
+
mixin target(url)
|
|
33
|
+
.target(style=`background-image: url(${url})`)
|
|
34
|
+
|
|
35
|
+
mixin navListItem(key, icon, name, activatedKey, color="secondary contrast")
|
|
36
|
+
li.mdw-list__item
|
|
37
|
+
a.mdw-list__content.mdw-overlay.mdw-ripple.mdw-theme(
|
|
38
|
+
aria-selected=(activatedKey==key ? 'true' : 'false')
|
|
39
|
+
aria-current=(activatedKey==key ? 'page' : false)
|
|
40
|
+
href=(key + ".html")
|
|
41
|
+
mdw-ink=color
|
|
42
|
+
)
|
|
43
|
+
if (icon)
|
|
44
|
+
.mdw-list__icon.mdw-theme.material-icons(mdw-ink="medium")=icon
|
|
45
|
+
.mdw-list__text
|
|
46
|
+
.mdw-list__text-block=name
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
mixin header(activated)
|
|
50
|
+
doctype html
|
|
51
|
+
html.mdw-layout.mdw-theme(lang='en' mdw-surface="binary" mdw-light)
|
|
52
|
+
head
|
|
53
|
+
title Material Design Web
|
|
54
|
+
meta(charset='utf-8')
|
|
55
|
+
meta(content='IE=edge', http-equiv='X-UA-Compatible')
|
|
56
|
+
meta(content='Material Design Web - CSS/JS Framework', name='description')
|
|
57
|
+
meta(content="width=device-width, initial-scale=1, viewport-fit=cover", name='viewport')
|
|
58
|
+
meta(name="theme-color" content="#C2185B")
|
|
59
|
+
meta(name="apple-mobile-web-app-status-bar-style" content="black-translucent")
|
|
60
|
+
meta(name="apple-mobile-web-app-capable" content="yes")
|
|
61
|
+
link(rel='stylesheet' href="https://fonts.googleapis.com/icon?family=Material+Icons")
|
|
62
|
+
link(rel='stylesheet' href='//fonts.googleapis.com/css?family=Roboto:300,400,500')
|
|
63
|
+
link(rel='stylesheet' href='//fonts.googleapis.com/css?family=Merriweather:300,400,500')
|
|
64
|
+
link(rel='stylesheet' href='docs.min.css')
|
|
65
|
+
link(rel='stylesheet' href='spec.min.css')
|
|
66
|
+
link(rel='stylesheet' href='theme-default.min.css' title="Default Theme")
|
|
67
|
+
link(rel='stylesheet' href='theme-default-fallbacks.min.css' media="all\\0" title="Default Theme")
|
|
68
|
+
link(rel='stylesheet' disabled href='theme-colored.min.css' title="Colored Theme")
|
|
69
|
+
link(rel='stylesheet' disabled href='theme-colored-fallbacks.min.css' media="all\\0" title="Colored Theme")
|
|
70
|
+
script(src='prerender.min.js')
|
|
71
|
+
body.mdw-layout__body.mdw-theme(mdw-surface="background" mdw-sidesheet-toggle="dismissible" mdw-sidesheet-style="modal")
|
|
72
|
+
.mdw-layout__menus
|
|
73
|
+
.mdw-layout__dialogs
|
|
74
|
+
nav#docs-navdrawer.mdw-layout__navdrawer
|
|
75
|
+
.mdw-layout__sheet-content.mdw-theme(mdw-surface="background" mdw-border-ink)
|
|
76
|
+
ul.mdw-list(style="padding-bottom:64px")
|
|
77
|
+
li.mdw-list__item
|
|
78
|
+
a.mdw-list__content.mdw-overlay.mdw-ripple.mdw-theme(
|
|
79
|
+
aria-current=activated=='Home'
|
|
80
|
+
aria-selected=(activatedKey=='Home' ? 'true' : 'false')
|
|
81
|
+
href='index.html'
|
|
82
|
+
mdw-ink="default")
|
|
83
|
+
.mdw-list__text Home
|
|
84
|
+
li.mdw-list__item(aria-expanded="true")
|
|
85
|
+
.mdw-list__content.mdw-list__subheader
|
|
86
|
+
.mdw-list__text.mdw-theme(mdw-ink="medium") Core
|
|
87
|
+
.mdw-list__secondary.mdw-theme.material-icons(mdw-ink="medium") expand_more
|
|
88
|
+
ul.mdw-list
|
|
89
|
+
+navListItem('color', 'compare', 'Color', activated, 'primary contrast')
|
|
90
|
+
+navListItem('overlay', 'tonality', 'Overlay', activated, 'primary contrast')
|
|
91
|
+
+navListItem('ripple', 'center_focus_strong', 'Ripple', activated, 'primary contrast')
|
|
92
|
+
+navListItem('transition', 'open_in_new', 'Transition', activated, 'primary contrast')
|
|
93
|
+
li.mdw-list__item.mdw-theme(aria-expanded="true")
|
|
94
|
+
.mdw-list__content.mdw-list__subheader
|
|
95
|
+
.mdw-list__text.mdw-theme(mdw-ink="medium") Components
|
|
96
|
+
.mdw-list__secondary.mdw-theme.material-icons(mdw-ink="medium") expand_more
|
|
97
|
+
ul.mdw-list
|
|
98
|
+
+navListItem('appbar', 'web_asset', 'App Bar', activated)
|
|
99
|
+
+navListItem('bottomnav', 'call_to_action', 'Bottom Navigation', activated)
|
|
100
|
+
+navListItem('button', 'crop_landscape', 'Button', activated)
|
|
101
|
+
+navListItem('card', 'crop_square', 'Card', activated)
|
|
102
|
+
+navListItem('chip', 'check_circle', 'Chip', activated)
|
|
103
|
+
+navListItem('datatable', 'format_align_justify', 'Data Table', activated)
|
|
104
|
+
+navListItem('dialog', 'select_all', 'Dialog', activated)
|
|
105
|
+
+navListItem('elevation', 'layers', 'Elevation', activated)
|
|
106
|
+
+navListItem('fab', 'add_circle', 'Floating Action Button', activated)
|
|
107
|
+
+navListItem('grid', 'view_compact', 'Grid', activated)
|
|
108
|
+
+navListItem('layout', 'view_quilt', 'Layout', activated)
|
|
109
|
+
+navListItem('list', 'view_list', 'List', activated)
|
|
110
|
+
+navListItem('menu', 'picture_in_picture', 'Menu', activated)
|
|
111
|
+
+navListItem('progress', 'timelapse', 'Progress', activated)
|
|
112
|
+
+navListItem('selection', 'toggle_on', 'Selection', activated)
|
|
113
|
+
+navListItem('slider', 'tune', 'Slider', activated)
|
|
114
|
+
+navListItem('snackbar', 'video_label', 'Snackbar', activated)
|
|
115
|
+
+navListItem('tab', 'tab', 'Tab', activated)
|
|
116
|
+
+navListItem('textfield', 'text_fields', 'Text Field', activated)
|
|
117
|
+
+navListItem('tooltip', 'info', 'Tooltip', activated)
|
|
118
|
+
+navListItem('type', 'font_download', 'Typography', activated)
|
|
119
|
+
li.mdw-list__item(aria-expanded="true")
|
|
120
|
+
.mdw-list__content.mdw-list__subheader
|
|
121
|
+
.mdw-list__text.mdw-theme(mdw-ink="medium") Adapters
|
|
122
|
+
.mdw-list__secondary.mdw-theme.material-icons(mdw-ink="medium") expand_more
|
|
123
|
+
ul.mdw-list
|
|
124
|
+
+navListItem('dom', 'calendar_view_day', 'DOM', activated)
|
|
125
|
+
+navListItem('search', 'search', 'Search', activated)
|
|
126
|
+
a.mdw-layout__scrim(href='#' tabindex="-1")
|
|
127
|
+
.mdw-layout__appbar.mdw-appbar.mdw-theme(mdw-autohide="mobile tablet" mdw-surface="secondary 500" mdw-dark)
|
|
128
|
+
.mdw-layout__appbar-shape
|
|
129
|
+
.mdw-appbar__action
|
|
130
|
+
.mdw-appbar__start
|
|
131
|
+
.mdw-tooltip__wrapper
|
|
132
|
+
+mdwButton({ icon:true }).mdw-tooltip__target.material-icons.mdw-layout__navdrawer-toggle(href="#docs-navdrawer") menu
|
|
133
|
+
.mdw-tooltip.mdw-theme(mdw-surface="background 700" mdw-dark mdw-align="start") Menu
|
|
134
|
+
.mdw-appbar__title=activated
|
|
135
|
+
#docs-menu-buttons.mdw-appbar__end
|
|
136
|
+
.mdw-tooltip__wrapper
|
|
137
|
+
+mdwButton({ icon: true })#altThemeButton.mdw-tooltip__target.material-icons(mdw-overlay-default="medium" mdw-overlay-off="activated" aria-pressed="false") palette
|
|
138
|
+
.mdw-tooltip.mdw-theme(mdw-surface="background 700" mdw-dark mdw-align="end") Alt Theme
|
|
139
|
+
.mdw-tooltip__wrapper
|
|
140
|
+
+mdwButton({ icon: true })#darkModeButton.mdw-tooltip__target.material-icons(mdw-overlay-default="medium" mdw-overlay-off="activated" aria-pressed="false") brightness_3
|
|
141
|
+
.mdw-tooltip.mdw-theme(mdw-surface="background 700" mdw-dark mdw-align="end") Dark Mode
|
|
142
|
+
.mdw-tooltip__wrapper
|
|
143
|
+
+mdwButton({ icon: true })#rtlButton.mdw-tooltip__target.material-icons(mdw-overlay-default="medium" mdw-overlay-off="activated" aria-pressed="false") format_align_right
|
|
144
|
+
.mdw-tooltip.mdw-theme(mdw-surface="background 700" mdw-dark mdw-align="end") Right-to-Left
|
|
145
|
+
.mdw-tooltip__wrapper
|
|
146
|
+
+mdwButton({ icon: true })#largeFontButton.mdw-tooltip__target.material-icons(mdw-overlay-default="medium" mdw-overlay-off="activated" aria-pressed="false") format_size
|
|
147
|
+
.mdw-tooltip.mdw-theme(mdw-surface="background 700" mdw-dark mdw-align="end") 200% Text
|
|
148
|
+
.mdw-layout__fab
|
|
149
|
+
.mdw-layout__snackbar
|
|
150
|
+
.mdw-layout__content
|
|
151
|
+
.mdw-layout__content-page
|
|
152
|
+
block
|
|
153
|
+
script(src='postrender.min.js')
|
|
154
|
+
script(src='entire-framework.min.js')
|
|
155
|
+
script(src='docs.common.min.js')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div <%~ Object.entries({
|
|
2
|
+
'class': 'androidstatusbar mdw-theme',
|
|
3
|
+
'mdw-surface': it?.surface,
|
|
4
|
+
'mdw-light': it?.light,
|
|
5
|
+
'mdw-dark': it?.dark
|
|
6
|
+
}).map(([key, value]) => {
|
|
7
|
+
if (value === true) return key;
|
|
8
|
+
if (value === false || value == null) return false;
|
|
9
|
+
return `${key}="${value}"`
|
|
10
|
+
}).filter(v=>v).join(' ')-%>>
|
|
11
|
+
<div>12:30</div>
|
|
12
|
+
<i class="material-icons" style="letter-spacing:2px;padding:0 2px;"></i>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<% var T = '../../templates/index.eta'; %>
|
|
2
|
+
<div <%~ Object.entries({
|
|
3
|
+
'class': 'mdw-appbar mdw-elevation mdw-theme',
|
|
4
|
+
'style': 'z-index:4',
|
|
5
|
+
'mdw-elevation': 4,
|
|
6
|
+
'mdw-surface': it?.surface,
|
|
7
|
+
'mdw-light': it?.light,
|
|
8
|
+
'mdw-dark': it?.dark
|
|
9
|
+
}).map(([key, value]) => {
|
|
10
|
+
if (value === true) return key;
|
|
11
|
+
if (value === false || value == null) return false;
|
|
12
|
+
return `${key}="${value}"`
|
|
13
|
+
}).filter(v=>v).join(' ')-%>>
|
|
14
|
+
<div class="mdw-appbar__action">
|
|
15
|
+
<div class="mdw-appbar__start">
|
|
16
|
+
<%_~ it?.start?.map((icon) => includeFile(T, { button: {
|
|
17
|
+
class:'material-icons', icon:true, text:icon }})).join(' ') ?? '' _%>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="mdw-appbar__title">
|
|
20
|
+
<%_~ it?.body ?? '' %><%= it?.text ?? '' _%>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="mdw-appbar__end">
|
|
23
|
+
<%_~ it?.end?.map((icon) => includeFile(T, { button:{
|
|
24
|
+
class:'material-icons', icon:true, text:icon,
|
|
25
|
+
attributes: { 'mdw-more-button': icon === 'more_vert' }
|
|
26
|
+
}})).join(' ') ?? '' _%>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<% var T = '../../templates/index.eta'; %>
|
|
2
|
+
<div class="display-flex flex-wrap">
|
|
3
|
+
<%~ includeFile(T, {button: { text: 'Text' }}) %>
|
|
4
|
+
<%~ includeFile(T, {button: { raised:true, text: 'Contained' }}) %>
|
|
5
|
+
<%~ includeFile(T, {button: { raised:true, disabled:true, text: 'Disabled' }}) %>
|
|
6
|
+
<%~ includeFile(T, {button: { borderInk:'default', text: 'Outlined' }}) %>
|
|
7
|
+
</div>
|
|
8
|
+
<div style="height:24px;"></div>
|
|
9
|
+
<div class="display-flex flex-wrap">
|
|
10
|
+
<%~ includeFile(T, {button: { ink:'primary', text:'Text' }}) %>
|
|
11
|
+
<%~ includeFile(T, {button: { ink:'primary', raised:true, text: 'Contained' }}) %>
|
|
12
|
+
<%~ includeFile(T, {button: { ink:'primary', raised:true, disabled:true, text:'Disabled' }}) %>
|
|
13
|
+
<%~ includeFile(T, {button: { ink:'secondary', text:'Secondary' }}) %>
|
|
14
|
+
<%~ includeFile(T, {button: { ink:'secondary', borderInk:true, text:'Outlined' }}) %>
|
|
15
|
+
</div>
|
|
16
|
+
<div style="height:24px;"></div>
|
|
17
|
+
<div class="display-flex flex-wrap">
|
|
18
|
+
<%~ includeFile(T, { button: { surface:'primary 500', dark:true, text:'Text' }}) %>
|
|
19
|
+
<%~ includeFile(T, { button: { surface:'primary 500', dark:true, raised:true, text:'Contained' }}) %>
|
|
20
|
+
<%~ includeFile(T, { button: { surface:'primary 500', dark:true, raised:true, disabled:true, text:'Disabled' }}) %>
|
|
21
|
+
<%~ includeFile(T, { button: { surface:'secondary 100', light:true, raised:true, text:'Outlined' }}) %>
|
|
22
|
+
</div>
|
|
23
|
+
<div style="height:24px;"></div>
|
|
24
|
+
<div class="display-flex flex-wrap">
|
|
25
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', icon:true }}) %>
|
|
26
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', ink:"warn", dark:true, icon:true }}) %>
|
|
27
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', surface:"warn 500", dark:true, icon:true }}) %>
|
|
28
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', surface:"warn 500", dark:true, icon:true, raised:true }}) %>
|
|
29
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', surface:"warn 500", dark:true, icon:true, raised:true, disabled:true }}) %>
|
|
30
|
+
<%~ includeFile(T, { button: { class:'material-icons', text:'favorite', icon:true, disabled:true }}) %>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<% var T = '../../templates/index.eta' -%>
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html class="mdw-layout mdw-theme" lang="en" mdw-surface="binary" mdw-light>
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Material Design Web</title>
|
|
7
|
+
<meta charset="utf-8">
|
|
8
|
+
<meta content="IE=edge" http-equiv="X-UA-Compatible">
|
|
9
|
+
<meta content="Material Design Web - CSS/JS Framework" name="description">
|
|
10
|
+
<meta content="width=device-width,initial-scale=1,viewport-fit=cover" name="viewport">
|
|
11
|
+
<meta name="theme-color" content="#C2185B">
|
|
12
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
13
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
14
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
15
|
+
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500">
|
|
16
|
+
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Merriweather:300,400,500">
|
|
17
|
+
<link rel="stylesheet" href="docs.min.css">
|
|
18
|
+
<link rel="stylesheet" href="spec.min.css">
|
|
19
|
+
<link rel="stylesheet" href="theme-default.min.css" title="Default Theme">
|
|
20
|
+
<link rel="stylesheet" href="theme-default-fallbacks.min.css" media="all\0" title="Default Theme">
|
|
21
|
+
<link rel="stylesheet" disabled href="theme-colored.min.css" title="Colored Theme">
|
|
22
|
+
<link rel="stylesheet" disabled href="theme-colored-fallbacks.min.css" media="all\0" title="Colored Theme">
|
|
23
|
+
<script src="prerender.min.js"></script>
|
|
24
|
+
</head>
|
|
25
|
+
|
|
26
|
+
<body class="mdw-layout__body mdw-theme" mdw-surface="background" mdw-sidesheet-toggle="dismissible" mdw-sidesheet-style="modal">
|
|
27
|
+
<div class="mdw-layout__menus"></div>
|
|
28
|
+
<div class="mdw-layout__dialogs"></div>
|
|
29
|
+
<nav class="mdw-layout__navdrawer" id="docs-navdrawer">
|
|
30
|
+
<div class="mdw-layout__sheet-content mdw-theme" mdw-surface="background" mdw-border-ink>
|
|
31
|
+
<ul class="mdw-list" style="padding-bottom:64px;">
|
|
32
|
+
<li class="mdw-list__item">
|
|
33
|
+
<a class="mdw-list__content mdw-overlay mdw-ripple mdw-theme" <%~ it.page === 'Home' ? 'aria-current="page"' : '' %> aria-selected="<%~ it.page === 'Home'%>" href="index.html" mdw-ink="default">
|
|
34
|
+
<div class="mdw-list__text">Home</div>
|
|
35
|
+
</a>
|
|
36
|
+
</li>
|
|
37
|
+
<li class="mdw-list__item" aria-expanded="true">
|
|
38
|
+
<div class="mdw-list__content mdw-list__subheader">
|
|
39
|
+
<div class="mdw-list__text mdw-theme" mdw-ink="medium">Core</div>
|
|
40
|
+
<div class="mdw-list__secondary mdw-theme material-icons" mdw-ink="medium">expand_more</div>
|
|
41
|
+
</div>
|
|
42
|
+
<ul class="mdw-list">
|
|
43
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key: 'color', icon: 'compare', name: 'Color', page: it.page, color: 'primary contrast'}) %>
|
|
44
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key: 'overlay', icon: 'tonality', name: 'Overlay', page: it.page, color: 'primary contrast'}) %>
|
|
45
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key: 'ripple', icon: 'center_focus_strong', name: 'Ripple', page: it.page, color: 'primary contrast'}) %>
|
|
46
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key: 'transition', icon: 'dynamic_feed', name: 'Transition', page: it.page, color: 'primary contrast'}) %>
|
|
47
|
+
</ul>
|
|
48
|
+
</li>
|
|
49
|
+
<li class="mdw-list__item mdw-theme" aria-expanded="true">
|
|
50
|
+
<div class="mdw-list__content mdw-list__subheader">
|
|
51
|
+
<div class="mdw-list__text mdw-theme" mdw-ink="medium">Components</div>
|
|
52
|
+
<div class="mdw-list__secondary mdw-theme material-icons" mdw-ink="medium">expand_more</div>
|
|
53
|
+
</div>
|
|
54
|
+
<ul class="mdw-list">
|
|
55
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'appbar', icon: 'web_asset', name: 'App Bar', page: it.page }) %>
|
|
56
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'bottomnav', icon: 'call_to_action', name: 'Bottom Navigation', page: it.page }) %>
|
|
57
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'button', icon: 'crop_landscape', name: 'Button', page: it.page }) %>
|
|
58
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'card', icon: 'crop_square', name: 'Card', page: it.page }) %>
|
|
59
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'chip', icon: 'check_circle', name: 'Chip', page: it.page }) %>
|
|
60
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'datatable', icon: 'format_align_justify', name: 'Data Table', page: it.page }) %>
|
|
61
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'dialog', icon: 'select_all', name: 'Dialog', page: it.page }) %>
|
|
62
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'elevation', icon: 'layers', name: 'Elevation', page: it.page }) %>
|
|
63
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'fab', icon: 'add_circle', name: 'Floating Action Button', page: it.page }) %>
|
|
64
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'grid', icon: 'view_compact', name: 'Grid', page: it.page }) %>
|
|
65
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'layout', icon: 'view_quilt', name: 'Layout', page: it.page }) %>
|
|
66
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'list', icon: 'view_list', name: 'List', page: it.page }) %>
|
|
67
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'menu', icon: 'picture_in_picture', name: 'Menu', page: it.page }) %>
|
|
68
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'progress', icon: 'timelapse', name: 'Progress', page: it.page }) %>
|
|
69
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'selection', icon: 'toggle_on', name: 'Selection', page: it.page }) %>
|
|
70
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'slider', icon: 'tune', name: 'Slider', page: it.page }) %>
|
|
71
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'snackbar', icon: 'video_label', name: 'Snackbar', page: it.page }) %>
|
|
72
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'tab', icon: 'tab', name: 'Tab', page: it.page }) %>
|
|
73
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'textfield', icon: 'text_fields', name: 'Text Field', page: it.page }) %>
|
|
74
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'tooltip', icon: 'info', name: 'Tooltip', page: it.page }) %>
|
|
75
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'type', icon: 'font_download', name: 'Typography', page: it.page }) %>
|
|
76
|
+
</ul>
|
|
77
|
+
</li>
|
|
78
|
+
<li class="mdw-list__item" aria-expanded="true">
|
|
79
|
+
<div class="mdw-list__content mdw-list__subheader">
|
|
80
|
+
<div class="mdw-list__text mdw-theme" mdw-ink="medium">Adapters</div>
|
|
81
|
+
<div class="mdw-list__secondary mdw-theme material-icons" mdw-ink="medium">expand_more</div>
|
|
82
|
+
</div>
|
|
83
|
+
<ul class="mdw-list">
|
|
84
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'dom', icon:'calendar_view_day', name:'DOM', page: it.page }) %>
|
|
85
|
+
<%~ includeFile('../_partials/_navlistitem.eta', {key:'search', icon:'search', name:'Search', page: it.page }) %>
|
|
86
|
+
</ul>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</div>
|
|
90
|
+
</nav>
|
|
91
|
+
<a class="mdw-layout__scrim" href="#" tabindex="-1"></a>
|
|
92
|
+
<div class="mdw-layout__appbar mdw-appbar mdw-theme" mdw-autohide="mobile tablet" mdw-surface="secondary 500" mdw-dark>
|
|
93
|
+
<div class="mdw-layout__appbar-shape"></div>
|
|
94
|
+
<div class="mdw-appbar__action">
|
|
95
|
+
<div class="mdw-appbar__start">
|
|
96
|
+
<div class="mdw-tooltip__wrapper">
|
|
97
|
+
<%~ includeFile(T, { button: {
|
|
98
|
+
class: 'mdw-tooltip__target material-icons mdw-layout__navdrawer-toggle',
|
|
99
|
+
text:'menu', icon:true, attributes: { href:"#docs-navdrawer" },
|
|
100
|
+
}}) %>
|
|
101
|
+
<div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark mdw-align="start">Menu</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="mdw-appbar__title"><%~ it.page %></div>
|
|
105
|
+
<div class="mdw-appbar__end" id="docs-menu-buttons">
|
|
106
|
+
<div class="mdw-tooltip__wrapper">
|
|
107
|
+
<%~ includeFile(T, { button: {
|
|
108
|
+
id: 'altThemeButton', class: 'mdw-tooltip__target material-icons',
|
|
109
|
+
text:'palette', icon:true, attributes: { 'mdw-overlay-default':'medium', 'mdw-overlay-off':'activated', 'aria-pressed':'false' },
|
|
110
|
+
}}) %>
|
|
111
|
+
<div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark mdw-align="end">Alt Theme</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="mdw-tooltip__wrapper">
|
|
114
|
+
<%~ includeFile(T, { button: {
|
|
115
|
+
id: 'darkModeButton', class: 'mdw-tooltip__target material-icons',
|
|
116
|
+
text: 'brightness_3', icon: true, attributes: { 'mdw-overlay-default':'medium', 'mdw-overlay-off':'activated', 'aria-pressed':'false' },
|
|
117
|
+
}}) %>
|
|
118
|
+
<div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark mdw-align="end">Dark Mode</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="mdw-tooltip__wrapper">
|
|
121
|
+
<%~ includeFile(T, { button: {
|
|
122
|
+
id: 'rtlButton', class: 'mdw-tooltip__target material-icons',
|
|
123
|
+
text: 'format_align_right', icon: true, attributes: { 'mdw-overlay-default': 'medium', 'mdw-overlay-off':'activated', 'aria-pressed':'false' },
|
|
124
|
+
}}) %>
|
|
125
|
+
<div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark mdw-align="end">Right-to-Left</div>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="mdw-tooltip__wrapper">
|
|
128
|
+
<%~ includeFile(T, { button: {
|
|
129
|
+
id: 'largeFontButton', class: 'mdw-tooltip__target material-icons',
|
|
130
|
+
text: 'format_size', icon: true, attributes: { 'mdw-overlay-default': 'medium', 'mdw-overlay-off':'activated', 'aria-pressed':'false' },
|
|
131
|
+
}}) %>
|
|
132
|
+
<div class="mdw-tooltip mdw-theme" mdw-surface="background 700" mdw-dark mdw-align="end">200% Text</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<div class="mdw-layout__fab"></div>
|
|
138
|
+
<div class="mdw-layout__snackbar"></div>
|
|
139
|
+
<div class="mdw-layout__content">
|
|
140
|
+
<div class="mdw-layout__content-page">
|
|
141
|
+
<%~ it?.body ?? '' %>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</body>
|
|
145
|
+
<script src="postrender.min.js"></script>
|
|
146
|
+
<script src="entire-framework.min.js"></script>
|
|
147
|
+
<script src="docs.common.min.js"></script>
|
|
148
|
+
|
|
149
|
+
</html>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<li class="mdw-list__item">
|
|
2
|
+
<a class="mdw-list__content mdw-overlay mdw-ripple mdw-theme" <%_~ [
|
|
3
|
+
it.page === it.key ? 'aria-current="page"' : '',
|
|
4
|
+
`aria-selected="${it.page === it.key}"`,
|
|
5
|
+
`href="${it.key}.html"`,
|
|
6
|
+
`mdw-ink="${it.color ?? 'secondary contrast'}"`,
|
|
7
|
+
].filter(v=>v).join(' ')
|
|
8
|
+
%>>
|
|
9
|
+
<% if (it.icon) { %>
|
|
10
|
+
<div class="mdw-list__icon mdw-theme material-icons" mdw-ink="medium"><%= it.icon ?? '' %></div>
|
|
11
|
+
<% } %>
|
|
12
|
+
<div class="mdw-list__text">
|
|
13
|
+
<div class="mdw-list__text-block"><%= it.name ?? '' %></div>
|
|
14
|
+
</div>
|
|
15
|
+
</a>
|
|
16
|
+
</li>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="target" style="background-image:url(<%~ it.url %>)"></div>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { iterateArrayLike } from '../core/dom.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param {Element|HTMLElement} element
|
|
5
|
+
* @param {boolean} [pug=false]
|
|
6
|
+
* @param {string} [linePrefix='']
|
|
7
|
+
* @return {string}
|
|
8
|
+
*/
|
|
9
|
+
function convertElementToCode(element, pug = false, linePrefix = '') {
|
|
10
|
+
const htmlType = element.tagName.toLowerCase();
|
|
11
|
+
/** @type {string[]} */
|
|
12
|
+
const attributes = [];
|
|
13
|
+
/** @type {string[]} */
|
|
14
|
+
const classes = [];
|
|
15
|
+
iterateArrayLike(element.classList, (c) => {
|
|
16
|
+
classes.push(c);
|
|
17
|
+
});
|
|
18
|
+
iterateArrayLike(element.attributes, (attr) => {
|
|
19
|
+
if (attr.name === 'class') {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (attr.value.length) {
|
|
23
|
+
attributes.push(`${attr.name}="${attr.value}"`);
|
|
24
|
+
} else {
|
|
25
|
+
attributes.push(attr.name);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
attributes.sort();
|
|
29
|
+
const syntaxItems = [
|
|
30
|
+
htmlType,
|
|
31
|
+
classes.length ? `class="${classes.join(' ')}"` : '',
|
|
32
|
+
attributes.join(' '),
|
|
33
|
+
];
|
|
34
|
+
const openingHTMLLine = pug
|
|
35
|
+
? `${htmlType === 'div' && classes.length ? '' : htmlType}${classes.length ? `.${classes.join('.')}` : ''}${attributes.length ? `(${attributes.join(' ')})` : ''}`
|
|
36
|
+
: `<${syntaxItems.filter((item) => item).join(' ').trim()}>`;
|
|
37
|
+
const closingHTMLLine = pug ? '' : `</${htmlType}>`;
|
|
38
|
+
const lines = [openingHTMLLine];
|
|
39
|
+
/** @type {string[]} */
|
|
40
|
+
const innerLines = [];
|
|
41
|
+
let onlyText = true;
|
|
42
|
+
iterateArrayLike(element.childNodes, (child) => {
|
|
43
|
+
let lineText;
|
|
44
|
+
if (child instanceof HTMLElement) {
|
|
45
|
+
lineText = convertElementToCode(child, pug, ` ${linePrefix}`);
|
|
46
|
+
if (lineText.trim()) {
|
|
47
|
+
onlyText = false;
|
|
48
|
+
}
|
|
49
|
+
} else if (child.nodeValue) {
|
|
50
|
+
if (pug) {
|
|
51
|
+
lineText = ` ${child.nodeValue}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (lineText && lineText.trim()) {
|
|
55
|
+
innerLines.push(lineText);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
if (onlyText) {
|
|
59
|
+
if (pug) {
|
|
60
|
+
return `${linePrefix + lines.join('')} ${innerLines.join('').trim()}`;
|
|
61
|
+
}
|
|
62
|
+
return linePrefix + lines.join('') + innerLines.join('').trim() + closingHTMLLine;
|
|
63
|
+
}
|
|
64
|
+
innerLines.forEach((line) => lines.push(line));
|
|
65
|
+
lines.push(linePrefix + closingHTMLLine);
|
|
66
|
+
return linePrefix + lines.filter((line) => line.trim()).join('\n');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @param {Element} element
|
|
71
|
+
* @param {string} tagname
|
|
72
|
+
* @return {Element}
|
|
73
|
+
*/
|
|
74
|
+
function changeElementTagName(element, tagname) {
|
|
75
|
+
const newElement = document.createElement(tagname);
|
|
76
|
+
for (let i = element.attributes.length - 1; i >= 0; i -= 1) {
|
|
77
|
+
const attr = element.attributes.item(i);
|
|
78
|
+
/** @type {Attr} */
|
|
79
|
+
const clonedAttr = (attr.cloneNode());
|
|
80
|
+
newElement.attributes.setNamedItem(clonedAttr);
|
|
81
|
+
}
|
|
82
|
+
while (element.firstChild) {
|
|
83
|
+
newElement.appendChild(element.firstChild);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
element.parentElement.replaceChild(newElement, element);
|
|
87
|
+
return newElement;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export {
|
|
91
|
+
convertElementToCode,
|
|
92
|
+
changeElementTagName,
|
|
93
|
+
};
|
package/docs/_storage.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} key
|
|
3
|
+
* @return {string}
|
|
4
|
+
*/
|
|
5
|
+
export function getStorageItem(key) {
|
|
6
|
+
if (!window.localStorage) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return localStorage.getItem(key);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} key
|
|
14
|
+
* @param {string} value
|
|
15
|
+
* @return {void}
|
|
16
|
+
*/
|
|
17
|
+
export function setStorageItem(key, value) {
|
|
18
|
+
if (!window.localStorage) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
localStorage.setItem(key, value);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @param {string} key
|
|
26
|
+
* @return {void}
|
|
27
|
+
*/
|
|
28
|
+
export function removeStorageItem(key) {
|
|
29
|
+
if (!window.localStorage) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
localStorage.removeItem(key);
|
|
33
|
+
}
|