@shortfuse/materialdesignweb 0.2.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +2 -1
- package/.eslintrc.json +188 -30
- package/.stylelintrc.json +643 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +36 -0
- package/README.md +82 -2
- package/adapters/datatable/column.js +176 -0
- package/adapters/datatable/index.js +253 -437
- package/adapters/dom/index.js +586 -0
- package/adapters/list/index.js +36 -113
- package/adapters/search/index.js +153 -180
- package/components/appbar/_spec.scss +165 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +83 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +4 -4
- package/components/bottomnav/_spec.scss +149 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +100 -120
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +88 -0
- package/components/button/README.md +16 -22
- package/components/button/_spec.scss +162 -0
- package/components/button/_theme.scss +42 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +37 -48
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +241 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +111 -0
- package/components/chip/_theme.scss +105 -0
- package/components/chip/index.js +23 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +225 -0
- package/components/datatable/_theme.scss +128 -0
- package/components/datatable/cell.js +44 -0
- package/components/datatable/columnheader.js +46 -0
- package/components/datatable/index.js +339 -443
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +48 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +203 -0
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +512 -437
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +11 -0
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +2 -0
- package/components/elevation/_spec.scss +9 -0
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +2 -0
- package/components/fab/{style.scss → _spec.scss} +104 -79
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +85 -79
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +169 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +11 -0
- package/components/layout/_spec.scss +916 -0
- package/components/layout/_theme.scss +19 -0
- package/components/layout/index.js +454 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +363 -0
- package/components/list/_theme.scss +102 -0
- package/components/list/content.js +106 -0
- package/components/list/index.js +234 -79
- package/components/list/index.scss +2 -0
- package/components/list/item.js +167 -0
- package/components/list/secondary.js +45 -0
- package/components/menu/_spec.scss +329 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +636 -651
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +231 -0
- package/components/progress/_spec.scss +156 -0
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +29 -13
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +376 -0
- package/components/selection/_theme.scss +134 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +70 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +54 -0
- package/components/selection/radiogroup.js +40 -0
- package/components/slider/{style.scss → _spec.scss} +31 -34
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +150 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +293 -206
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +220 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +210 -0
- package/components/tab/index.js +229 -213
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +88 -0
- package/components/tab/list.js +196 -0
- package/components/tab/panel.js +54 -0
- package/components/textfield/README.md +4 -4
- package/components/textfield/_spec.scss +763 -0
- package/components/textfield/_theme.scss +264 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +132 -138
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +185 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +227 -0
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +2 -0
- package/core/_breakpoint.scss +189 -0
- package/core/_elevation.scss +78 -0
- package/core/_length.scss +8 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +12 -0
- package/core/_type.scss +128 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +49 -0
- package/core/aria/keyboard.js +92 -0
- package/core/aria/rovingtabindex.js +175 -0
- package/core/aria/tab.js +59 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +180 -0
- package/core/overlay/_spec.scss +28 -0
- package/core/overlay/_theme.scss +147 -0
- package/core/overlay/index.js +95 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +196 -0
- package/core/ripple/_theme.scss +20 -0
- package/core/ripple/index.js +286 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -0
- package/core/theme/_functions.scss +22 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -151
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.js +50 -0
- package/core/theme/index.scss +4 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +465 -0
- package/docs/_flex.scss +28 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +27 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +146 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +88 -0
- package/docs/{src/storage.js → _storage.js} +0 -0
- package/docs/docs.scss +331 -0
- package/docs/framework.scss +26 -0
- package/docs/index.eta +12 -0
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +108 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +118 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +175 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +80 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +261 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +160 -0
- package/docs/pages/dialog.eta +184 -0
- package/docs/{src/components → pages}/dialog.js +35 -48
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +140 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/{src/components → pages}/fab.js +6 -13
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +8 -0
- package/docs/pages/menu.eta +274 -0
- package/docs/{src/components → pages}/menu.js +26 -42
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +3 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/{src/components → pages}/progress.js +2 -4
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +3 -0
- package/docs/pages/search.eta +242 -0
- package/docs/pages/search.js +226 -0
- package/docs/pages/selection.eta +107 -0
- package/docs/pages/selection.js +12 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/{src/components → pages}/snackbar.js +31 -36
- package/docs/pages/tab.eta +407 -0
- package/docs/pages/tab.js +152 -0
- package/docs/pages/textfield.eta +487 -0
- package/docs/{src/components → pages}/textfield.js +41 -45
- package/docs/pages/tooltip.eta +92 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +52 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +41 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +478 -0
- package/docs/pwa/pwa.js +298 -0
- package/docs/pwa/pwa.scss +31 -0
- package/docs/themes/theme-colored.scss +15 -0
- package/docs/themes/theme-default.scss +3 -0
- package/index.scss +27 -0
- package/jsconfig.json +8 -2
- package/package.json +54 -27
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/tsconfig.json +16 -0
- package/utils/function.js +3 -0
- package/webpack.config.js +224 -68
- package/_index.scss +0 -4
- package/components/all-components.scss +0 -21
- package/components/bottomnav/style.scss +0 -190
- package/components/bottomnav/theming.scss +0 -76
- package/components/button/style.scss +0 -315
- package/components/button/theming.scss +0 -134
- package/components/card/style.scss +0 -175
- package/components/card/theming.scss +0 -43
- package/components/common/dom.js +0 -51
- package/components/common/functions.scss +0 -174
- package/components/common/mixins.scss +0 -122
- package/components/common/motion.scss +0 -36
- package/components/common/type.scss +0 -104
- package/components/common/variables.scss +0 -46
- package/components/datatable/style.scss +0 -257
- package/components/datatable/theming.scss +0 -119
- package/components/dialog/style.scss +0 -159
- package/components/dialog/theming.scss +0 -29
- package/components/divider/style.scss +0 -7
- package/components/divider/theming.scss +0 -20
- package/components/elevation/style.scss +0 -32
- package/components/layout/style.scss +0 -223
- package/components/list/style.scss +0 -358
- package/components/list/theming.scss +0 -83
- package/components/menu/style.scss +0 -280
- package/components/menu/theming.scss +0 -80
- package/components/navdrawer/index.js +0 -200
- package/components/navdrawer/style.scss +0 -595
- package/components/navdrawer/theming.scss +0 -62
- package/components/progress/style.scss +0 -136
- package/components/ripple/index.js +0 -63
- package/components/ripple/ripple.scss +0 -122
- package/components/selection/style.scss +0 -320
- package/components/selection/theming.scss +0 -98
- package/components/snackbar/style.scss +0 -212
- package/components/switch/style.scss +0 -3
- package/components/tab/style.scss +0 -275
- package/components/tab/theming.scss +0 -34
- package/components/template/theming.scss +0 -31
- package/components/textfield/style.scss +0 -795
- package/components/textfield/theming.scss +0 -256
- package/components/theming/globals.scss +0 -25
- package/components/theming/theming.scss +0 -559
- package/components/toolbar/style.scss +0 -190
- package/components/toolbar/theming.scss +0 -32
- package/components/tooltip/style.scss +0 -135
- package/components/type/style.scss +0 -167
- package/components/type/theming.scss +0 -25
- package/docs/bottomnav.html +0 -1
- package/docs/bottomnav.min.js +0 -2
- package/docs/bottomnav.min.js.map +0 -1
- package/docs/button.html +0 -1
- package/docs/button.min.js +0 -2
- package/docs/button.min.js.map +0 -1
- package/docs/card.html +0 -1
- package/docs/card.min.js +0 -2
- package/docs/card.min.js.map +0 -1
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -2
- package/docs/components.min.js.map +0 -1
- package/docs/datatable.html +0 -1
- package/docs/datatable.min.js +0 -2
- package/docs/datatable.min.js.map +0 -1
- package/docs/dialog.html +0 -1
- package/docs/dialog.min.js +0 -2
- package/docs/dialog.min.js.map +0 -1
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -2
- package/docs/docs.min.js.map +0 -1
- package/docs/elevation.html +0 -1
- package/docs/elevation.min.js +0 -2
- package/docs/elevation.min.js.map +0 -1
- package/docs/fab.html +0 -1
- package/docs/fab.min.js +0 -2
- package/docs/fab.min.js.map +0 -1
- package/docs/index.html +0 -1
- package/docs/index.min.js +0 -2
- package/docs/index.min.js.map +0 -1
- package/docs/layout.html +0 -1
- package/docs/layout.min.js +0 -2
- package/docs/layout.min.js.map +0 -1
- package/docs/list.html +0 -1
- package/docs/list.min.js +0 -2
- package/docs/list.min.js.map +0 -1
- package/docs/menu.html +0 -1
- package/docs/menu.min.js +0 -2
- package/docs/menu.min.js.map +0 -1
- package/docs/navdrawer.html +0 -1
- package/docs/navdrawer.min.js +0 -2
- package/docs/navdrawer.min.js.map +0 -1
- package/docs/prerender.min.js +0 -2
- package/docs/prerender.min.js.map +0 -1
- package/docs/progress.html +0 -1
- package/docs/progress.min.js +0 -2
- package/docs/progress.min.js.map +0 -1
- package/docs/search.html +0 -1
- package/docs/search.min.js +0 -2
- package/docs/search.min.js.map +0 -1
- package/docs/selection.html +0 -1
- package/docs/selection.min.js +0 -2
- package/docs/selection.min.js.map +0 -1
- package/docs/slider.html +0 -1
- package/docs/slider.min.js +0 -2
- package/docs/slider.min.js.map +0 -1
- package/docs/snackbar.html +0 -1
- package/docs/snackbar.min.js +0 -2
- package/docs/snackbar.min.js.map +0 -1
- package/docs/src/components/bottomnav.js +0 -16
- package/docs/src/components/bottomnav.pug +0 -112
- package/docs/src/components/button.js +0 -156
- package/docs/src/components/button.pug +0 -194
- package/docs/src/components/card.js +0 -136
- package/docs/src/components/card.pug +0 -133
- package/docs/src/components/datatable.js +0 -183
- package/docs/src/components/datatable.pug +0 -324
- package/docs/src/components/dialog.pug +0 -138
- package/docs/src/components/elevation.js +0 -3
- package/docs/src/components/elevation.pug +0 -17
- package/docs/src/components/fab.pug +0 -84
- package/docs/src/components/layout.js +0 -116
- package/docs/src/components/layout.pug +0 -104
- package/docs/src/components/list.js +0 -15
- package/docs/src/components/list.pug +0 -293
- package/docs/src/components/menu.pug +0 -292
- package/docs/src/components/navdrawer.js +0 -112
- package/docs/src/components/navdrawer.pug +0 -113
- package/docs/src/components/progress.pug +0 -17
- package/docs/src/components/search.js +0 -206
- package/docs/src/components/search.pug +0 -149
- package/docs/src/components/selection.js +0 -6
- package/docs/src/components/selection.pug +0 -116
- package/docs/src/components/slider.js +0 -3
- package/docs/src/components/slider.pug +0 -19
- package/docs/src/components/snackbar.pug +0 -145
- package/docs/src/components/tab.js +0 -137
- package/docs/src/components/tab.pug +0 -329
- package/docs/src/components/textfield.pug +0 -416
- package/docs/src/components/toolbar.js +0 -6
- package/docs/src/components/toolbar.pug +0 -86
- package/docs/src/components/tooltip.js +0 -6
- package/docs/src/components/tooltip.pug +0 -76
- package/docs/src/components/type.js +0 -6
- package/docs/src/components/type.pug +0 -34
- package/docs/src/components.scss +0 -1
- package/docs/src/docs.scss +0 -284
- package/docs/src/index.js +0 -3
- package/docs/src/index.pug +0 -6
- package/docs/src/menuoptions.js +0 -136
- package/docs/src/mixins.pug +0 -139
- package/docs/src/prerender.js +0 -26
- package/docs/src/sample-utils.js +0 -108
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -18
- package/docs/src/theming.scss +0 -18
- package/docs/tab.html +0 -1
- package/docs/tab.min.js +0 -2
- package/docs/tab.min.js.map +0 -1
- package/docs/textfield.html +0 -2
- package/docs/textfield.min.js +0 -2
- package/docs/textfield.min.js.map +0 -1
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -2
- package/docs/theming.ie11.min.js.map +0 -1
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -2
- package/docs/theming.min.js.map +0 -1
- package/docs/toolbar.html +0 -1
- package/docs/toolbar.min.js +0 -2
- package/docs/toolbar.min.js.map +0 -1
- package/docs/tooltip.html +0 -1
- package/docs/tooltip.min.js +0 -2
- package/docs/tooltip.min.js.map +0 -1
- package/docs/type.html +0 -1
- package/docs/type.min.js +0 -2
- package/docs/type.min.js.map +0 -1
- package/index.js +0 -16
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { Button } from '../../../components/button/index';
|
|
2
|
-
import { DataTable } from '../../../components/datatable/index';
|
|
3
|
-
import { Menu } from '../../../components/menu/index';
|
|
4
|
-
import { setupMenuOptions } from '../menuoptions';
|
|
5
|
-
import { DataTableAdapter } from '../../../adapters/datatable/index';
|
|
6
|
-
|
|
7
|
-
/** @return {void} */
|
|
8
|
-
function initializeMdwComponents() {
|
|
9
|
-
let components;
|
|
10
|
-
components = document.querySelectorAll('.mdw-datatable');
|
|
11
|
-
for (let i = 0; i < components.length; i += 1) {
|
|
12
|
-
DataTable.attach(components.item(i));
|
|
13
|
-
}
|
|
14
|
-
components = document.querySelectorAll('.mdw-button');
|
|
15
|
-
for (let i = 0; i < components.length; i += 1) {
|
|
16
|
-
Button.attach(components.item(i));
|
|
17
|
-
}
|
|
18
|
-
components = document.querySelectorAll('.mdw-menu');
|
|
19
|
-
for (let i = 0; i < components.length; i += 1) {
|
|
20
|
-
Menu.attach(components.item(i));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/** @type {DataTableAdapter} */
|
|
26
|
-
let dynamicTableAdapter = null;
|
|
27
|
-
/** @return {void} */
|
|
28
|
-
function buildDynamicTable() {
|
|
29
|
-
const datasource = [];
|
|
30
|
-
let count = 1;
|
|
31
|
-
const addDatasourceObject = () => {
|
|
32
|
-
datasource.push({
|
|
33
|
-
text: Math.random().toString(36).substring(2),
|
|
34
|
-
text2: Math.random().toString(36).substring(2),
|
|
35
|
-
check1: Math.random() > 0.5,
|
|
36
|
-
increment: count,
|
|
37
|
-
random: Math.floor(Math.random() * 99999),
|
|
38
|
-
});
|
|
39
|
-
count += 1;
|
|
40
|
-
};
|
|
41
|
-
for (let i = 0; i < 256; i += 1) {
|
|
42
|
-
addDatasourceObject();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const datatable = document.getElementById('dynamic-table');
|
|
46
|
-
dynamicTableAdapter = new DataTableAdapter({ datatable, datasource });
|
|
47
|
-
dynamicTableAdapter.addColumn({
|
|
48
|
-
key: 'selected',
|
|
49
|
-
type: 'checkbox',
|
|
50
|
-
rowSelector: true,
|
|
51
|
-
});
|
|
52
|
-
dynamicTableAdapter.addColumn({
|
|
53
|
-
key: 'text',
|
|
54
|
-
name: 'Primary Column (full-width)',
|
|
55
|
-
primaryColumn: true,
|
|
56
|
-
sortable: true,
|
|
57
|
-
type: 'text',
|
|
58
|
-
});
|
|
59
|
-
dynamicTableAdapter.addColumn({
|
|
60
|
-
key: 'text2',
|
|
61
|
-
name: 'Text field',
|
|
62
|
-
sortable: true,
|
|
63
|
-
type: 'text',
|
|
64
|
-
});
|
|
65
|
-
dynamicTableAdapter.addColumn({
|
|
66
|
-
key: 'check1',
|
|
67
|
-
name: 'bool',
|
|
68
|
-
type: 'checkbox',
|
|
69
|
-
tooltip: 'Non-selection boolean value',
|
|
70
|
-
sortable: true,
|
|
71
|
-
});
|
|
72
|
-
dynamicTableAdapter.addColumn({
|
|
73
|
-
key: 'increment',
|
|
74
|
-
name: 'Increment',
|
|
75
|
-
type: 'number',
|
|
76
|
-
sortable: true,
|
|
77
|
-
});
|
|
78
|
-
dynamicTableAdapter.addColumn({
|
|
79
|
-
key: 'random',
|
|
80
|
-
name: 'Random',
|
|
81
|
-
sortable: true,
|
|
82
|
-
type: 'number',
|
|
83
|
-
});
|
|
84
|
-
dynamicTableAdapter.setUseLazyRendering(true);
|
|
85
|
-
dynamicTableAdapter.setPagination();
|
|
86
|
-
dynamicTableAdapter.refresh();
|
|
87
|
-
const buttons = dynamicTableAdapter.element.querySelectorAll('.mdw-datatable__header-controls .mdw-button');
|
|
88
|
-
const filterButton = buttons[0];
|
|
89
|
-
const optionsButton = buttons[1];
|
|
90
|
-
const menus = dynamicTableAdapter.element.querySelectorAll('.mdw-datatable__header-controls .mdw-menu');
|
|
91
|
-
const filterMenu = menus[0];
|
|
92
|
-
const optionsMenu = menus[1];
|
|
93
|
-
|
|
94
|
-
filterButton.addEventListener('click', (event) => {
|
|
95
|
-
Menu.show(filterMenu, event);
|
|
96
|
-
});
|
|
97
|
-
const filterMenuItems = filterMenu.querySelectorAll('.mdw-menu__item');
|
|
98
|
-
const noFilterMenuItem = filterMenuItems[0];
|
|
99
|
-
const mdFilterMenuItem = filterMenuItems[1];
|
|
100
|
-
const randomDivBy9MenuItem = filterMenuItems[2];
|
|
101
|
-
const checkedFilterMenuItem = filterMenuItems[3];
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @param {NodeListOf<Element>} menuItems
|
|
105
|
-
* @param {number} checkedIndex
|
|
106
|
-
* @return {void}
|
|
107
|
-
*/
|
|
108
|
-
function setMenuChecked(menuItems, checkedIndex) {
|
|
109
|
-
for (let i = 0; i < menuItems.length; i += 1) {
|
|
110
|
-
const menuItem = menuItems.item(i);
|
|
111
|
-
if (checkedIndex === i) {
|
|
112
|
-
menuItem.setAttribute('mdw-checked', '');
|
|
113
|
-
} else {
|
|
114
|
-
menuItem.removeAttribute('mdw-checked');
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
noFilterMenuItem.addEventListener('click', () => {
|
|
119
|
-
dynamicTableAdapter.setFilter(null);
|
|
120
|
-
dynamicTableAdapter.refresh();
|
|
121
|
-
Menu.hide(filterMenu);
|
|
122
|
-
setMenuChecked(filterMenuItems, 0);
|
|
123
|
-
filterButton.setAttribute('mdw-inactive', '');
|
|
124
|
-
filterButton.removeAttribute('mdw-active');
|
|
125
|
-
});
|
|
126
|
-
mdFilterMenuItem.addEventListener('click', () => {
|
|
127
|
-
dynamicTableAdapter.setFilter(data => data.text.indexOf('md') !== -1 || data.text2.indexOf('md') !== -1);
|
|
128
|
-
dynamicTableAdapter.refresh();
|
|
129
|
-
Menu.hide(filterMenu);
|
|
130
|
-
setMenuChecked(filterMenuItems, 1);
|
|
131
|
-
filterButton.setAttribute('mdw-active', '');
|
|
132
|
-
filterButton.removeAttribute('mdw-inactive');
|
|
133
|
-
});
|
|
134
|
-
randomDivBy9MenuItem.addEventListener('click', () => {
|
|
135
|
-
dynamicTableAdapter.setFilter(data => data.random % 9 === 0);
|
|
136
|
-
dynamicTableAdapter.refresh();
|
|
137
|
-
Menu.hide(filterMenu);
|
|
138
|
-
setMenuChecked(filterMenuItems, 2);
|
|
139
|
-
filterButton.setAttribute('mdw-active', '');
|
|
140
|
-
filterButton.removeAttribute('mdw-inactive');
|
|
141
|
-
});
|
|
142
|
-
checkedFilterMenuItem.addEventListener('click', () => {
|
|
143
|
-
dynamicTableAdapter.setFilter(data => data.check1);
|
|
144
|
-
dynamicTableAdapter.refresh();
|
|
145
|
-
Menu.hide(filterMenu);
|
|
146
|
-
setMenuChecked(filterMenuItems, 3);
|
|
147
|
-
filterButton.setAttribute('mdw-active', '');
|
|
148
|
-
filterButton.removeAttribute('mdw-inactive');
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
const menuItems = optionsMenu.querySelectorAll('.mdw-menu__item');
|
|
152
|
-
const throttleMenuItem = menuItems[0];
|
|
153
|
-
const paginateMenuItem = menuItems[1];
|
|
154
|
-
optionsButton.addEventListener('click', (event) => {
|
|
155
|
-
Menu.show(optionsMenu, event);
|
|
156
|
-
});
|
|
157
|
-
throttleMenuItem.addEventListener('click', () => {
|
|
158
|
-
if (throttleMenuItem.hasAttribute('mdw-checked')) {
|
|
159
|
-
dynamicTableAdapter.setUseLazyRendering(false);
|
|
160
|
-
throttleMenuItem.removeAttribute('mdw-checked');
|
|
161
|
-
} else {
|
|
162
|
-
dynamicTableAdapter.setUseLazyRendering(true);
|
|
163
|
-
throttleMenuItem.setAttribute('mdw-checked', '');
|
|
164
|
-
}
|
|
165
|
-
Menu.hide(optionsMenu);
|
|
166
|
-
dynamicTableAdapter.refresh();
|
|
167
|
-
});
|
|
168
|
-
paginateMenuItem.addEventListener('click', () => {
|
|
169
|
-
if (paginateMenuItem.hasAttribute('mdw-checked')) {
|
|
170
|
-
dynamicTableAdapter.setPagination({ disabled: true });
|
|
171
|
-
paginateMenuItem.removeAttribute('mdw-checked');
|
|
172
|
-
} else {
|
|
173
|
-
dynamicTableAdapter.setPagination();
|
|
174
|
-
paginateMenuItem.setAttribute('mdw-checked', '');
|
|
175
|
-
}
|
|
176
|
-
Menu.hide(optionsMenu);
|
|
177
|
-
dynamicTableAdapter.refresh();
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
initializeMdwComponents();
|
|
182
|
-
setupMenuOptions();
|
|
183
|
-
buildDynamicTable();
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
include ../mixins.pug
|
|
2
|
-
|
|
3
|
-
+header()
|
|
4
|
-
+navdrawer("datatable")
|
|
5
|
-
div(display="flex" flex-direction="column").mdw-theme-toolbar.js
|
|
6
|
-
.mdw-card.mdw-datatable(mdw-theme-color="primary" style="margin:16px")
|
|
7
|
-
table
|
|
8
|
-
caption Standard HTML Table
|
|
9
|
-
thead
|
|
10
|
-
tr
|
|
11
|
-
th Dessert (100g serving)
|
|
12
|
-
th Calories
|
|
13
|
-
th Fat (g)
|
|
14
|
-
th Carbs (g)
|
|
15
|
-
th Protein (g)
|
|
16
|
-
th Sodium (mg)
|
|
17
|
-
th Calcium (%)
|
|
18
|
-
th Iron (%)
|
|
19
|
-
tbody
|
|
20
|
-
tr
|
|
21
|
-
td Frozen Yogurt
|
|
22
|
-
td 159
|
|
23
|
-
td 6.0
|
|
24
|
-
td 24
|
|
25
|
-
td 4.0
|
|
26
|
-
td 87
|
|
27
|
-
td 14%
|
|
28
|
-
td 1%
|
|
29
|
-
tr
|
|
30
|
-
td Ice cream sandwich
|
|
31
|
-
td 237
|
|
32
|
-
td 9.0
|
|
33
|
-
td 37
|
|
34
|
-
td 4.3
|
|
35
|
-
td 129
|
|
36
|
-
td 8%
|
|
37
|
-
td 1%
|
|
38
|
-
tr
|
|
39
|
-
td Eclair
|
|
40
|
-
td 262
|
|
41
|
-
td 16.0
|
|
42
|
-
td 24
|
|
43
|
-
td 6.0
|
|
44
|
-
td 337
|
|
45
|
-
td 6%
|
|
46
|
-
td 7%
|
|
47
|
-
tr
|
|
48
|
-
td Cupcake
|
|
49
|
-
td 305
|
|
50
|
-
td 3.7
|
|
51
|
-
td 67
|
|
52
|
-
td 4.3
|
|
53
|
-
td 413
|
|
54
|
-
td 3%
|
|
55
|
-
td 8%
|
|
56
|
-
tr
|
|
57
|
-
td Gingerbread
|
|
58
|
-
td 356
|
|
59
|
-
td 16.0
|
|
60
|
-
td 49
|
|
61
|
-
td 3.9
|
|
62
|
-
td 327
|
|
63
|
-
td 7%
|
|
64
|
-
td 16%
|
|
65
|
-
tr
|
|
66
|
-
td Jelly bean
|
|
67
|
-
td 375
|
|
68
|
-
td 0.0
|
|
69
|
-
td 94
|
|
70
|
-
td 0.0
|
|
71
|
-
td 50
|
|
72
|
-
td 0%
|
|
73
|
-
td 0%
|
|
74
|
-
tr
|
|
75
|
-
td Lollipop
|
|
76
|
-
td 392
|
|
77
|
-
td 0.2
|
|
78
|
-
td 98
|
|
79
|
-
td 0
|
|
80
|
-
td 38
|
|
81
|
-
td 0%
|
|
82
|
-
td 2%
|
|
83
|
-
tr
|
|
84
|
-
td Honeycomb
|
|
85
|
-
td 408
|
|
86
|
-
td 3.2
|
|
87
|
-
td 87
|
|
88
|
-
td 6.5
|
|
89
|
-
td 562
|
|
90
|
-
td 0%
|
|
91
|
-
td 45%
|
|
92
|
-
tr
|
|
93
|
-
td Donut
|
|
94
|
-
td 452
|
|
95
|
-
td 25.0
|
|
96
|
-
td 51
|
|
97
|
-
td 4.9
|
|
98
|
-
td 326
|
|
99
|
-
td 2%
|
|
100
|
-
td 22%
|
|
101
|
-
tr
|
|
102
|
-
td Kitkat
|
|
103
|
-
td 518
|
|
104
|
-
td 26.0
|
|
105
|
-
td 65
|
|
106
|
-
td 7
|
|
107
|
-
td 54
|
|
108
|
-
td 12%
|
|
109
|
-
td 6%
|
|
110
|
-
.mdw-card.mdw-datatable(mdw-theme-color="primary" style="margin:16px" mdw-cell-focusable)
|
|
111
|
-
.mdw-datatable__header
|
|
112
|
-
.mdw-datatable__header-text Customized HTML Table
|
|
113
|
-
table
|
|
114
|
-
thead
|
|
115
|
-
tr
|
|
116
|
-
th(data-type="checkbox" mdw-selector)
|
|
117
|
-
label.mdw-selection
|
|
118
|
-
input.mdw-selection__input(type="checkbox")
|
|
119
|
-
.mdw-selection__icon
|
|
120
|
-
th(mdw-sortable data-type="text" mdw-primary-column)
|
|
121
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
122
|
-
span Dessert (100g serving)
|
|
123
|
-
th(mdw-sortable data-type="number" mdw-sorted='')
|
|
124
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
125
|
-
span.mdw-tooltip__wrapper
|
|
126
|
-
span.mdw-tooltip__target Calories
|
|
127
|
-
.mdw-tooltip The total amount of food energy in the given serving size.
|
|
128
|
-
th(mdw-sortable data-type="number")
|
|
129
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
130
|
-
span Fat (g)
|
|
131
|
-
th(mdw-sortable data-type="number")
|
|
132
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
133
|
-
span Carbs (g)
|
|
134
|
-
th(mdw-sortable data-type="number")
|
|
135
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
136
|
-
span Protein (g)
|
|
137
|
-
th(mdw-sortable data-type="number")
|
|
138
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
139
|
-
span Sodium (mg)
|
|
140
|
-
th(mdw-sortable data-type="number")
|
|
141
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
142
|
-
span.mdw-tooltip__wrapper
|
|
143
|
-
span.mdw-tooltip__target Calcium (%)
|
|
144
|
-
.mdw-tooltip The amount of calcium as a percentage of the recommended daily amount.
|
|
145
|
-
th(mdw-sortable data-type="number")
|
|
146
|
-
.mdw-datatable__sort-icon.material-icons arrow_downward
|
|
147
|
-
span Iron (%)
|
|
148
|
-
tbody
|
|
149
|
-
tr
|
|
150
|
-
td(data-type="checkbox" mdw-selector)
|
|
151
|
-
label.mdw-selection
|
|
152
|
-
input.mdw-selection__input(type="checkbox")
|
|
153
|
-
.mdw-selection__icon
|
|
154
|
-
td(data-type="text" mdw-primary-column) Frozen Yogurt
|
|
155
|
-
td(data-type="number") 159
|
|
156
|
-
td(data-type="number") 6.0
|
|
157
|
-
td(data-type="number") 24
|
|
158
|
-
td(data-type="number") 4.0
|
|
159
|
-
td(data-type="number") 87
|
|
160
|
-
td(data-type="number") 14%
|
|
161
|
-
td(data-type="number") 1%
|
|
162
|
-
tr
|
|
163
|
-
td(data-type="checkbox" mdw-selector)
|
|
164
|
-
label.mdw-selection
|
|
165
|
-
input.mdw-selection__input(type="checkbox")
|
|
166
|
-
.mdw-selection__icon
|
|
167
|
-
td(data-type="text" mdw-primary-column) Ice cream sandwich
|
|
168
|
-
td(data-type="number") 237
|
|
169
|
-
td(data-type="number") 9.0
|
|
170
|
-
td(data-type="number") 37
|
|
171
|
-
td(data-type="number") 4.3
|
|
172
|
-
td(data-type="number") 129
|
|
173
|
-
td(data-type="number") 8%
|
|
174
|
-
td(data-type="number") 1%
|
|
175
|
-
tr
|
|
176
|
-
td(data-type="checkbox" mdw-selector)
|
|
177
|
-
label.mdw-selection
|
|
178
|
-
input.mdw-selection__input(type="checkbox")
|
|
179
|
-
.mdw-selection__icon
|
|
180
|
-
td(data-type="text" mdw-primary-column) Eclair
|
|
181
|
-
td(data-type="number") 262
|
|
182
|
-
td(data-type="number") 16.0
|
|
183
|
-
td(data-type="number") 24
|
|
184
|
-
td(data-type="number") 6.0
|
|
185
|
-
td(data-type="number") 337
|
|
186
|
-
td(data-type="number") 6%
|
|
187
|
-
td(data-type="number") 7%
|
|
188
|
-
tr
|
|
189
|
-
td(data-type="checkbox" mdw-selector)
|
|
190
|
-
label.mdw-selection
|
|
191
|
-
input.mdw-selection__input(type="checkbox")
|
|
192
|
-
.mdw-selection__icon
|
|
193
|
-
td(data-type="text" mdw-primary-column) Cupcake
|
|
194
|
-
td(data-type="number") 305
|
|
195
|
-
td(data-type="number") 3.7
|
|
196
|
-
td(data-type="number") 67
|
|
197
|
-
td(data-type="number") 4.3
|
|
198
|
-
td(data-type="number") 413
|
|
199
|
-
td(data-type="number") 3%
|
|
200
|
-
td(data-type="number") 8%
|
|
201
|
-
tr
|
|
202
|
-
td(data-type="checkbox" mdw-selector)
|
|
203
|
-
label.mdw-selection
|
|
204
|
-
input.mdw-selection__input(type="checkbox")
|
|
205
|
-
.mdw-selection__icon
|
|
206
|
-
td(data-type="text" mdw-primary-column) Gingerbread
|
|
207
|
-
td(data-type="number") 356
|
|
208
|
-
td(data-type="number") 16.0
|
|
209
|
-
td(data-type="number") 49
|
|
210
|
-
td(data-type="number") 3.9
|
|
211
|
-
td(data-type="number") 327
|
|
212
|
-
td(data-type="number") 7%
|
|
213
|
-
td(data-type="number") 16%
|
|
214
|
-
tr
|
|
215
|
-
td(data-type="checkbox" mdw-selector)
|
|
216
|
-
label.mdw-selection
|
|
217
|
-
input.mdw-selection__input(type="checkbox")
|
|
218
|
-
.mdw-selection__icon
|
|
219
|
-
td(data-type="text" mdw-primary-column) Jelly bean
|
|
220
|
-
td(data-type="number") 375
|
|
221
|
-
td(data-type="number") 0.0
|
|
222
|
-
td(data-type="number") 94
|
|
223
|
-
td(data-type="number") 0.0
|
|
224
|
-
td(data-type="number") 50
|
|
225
|
-
td(data-type="number") 0%
|
|
226
|
-
td(data-type="number") 0%
|
|
227
|
-
tr
|
|
228
|
-
td(data-type="checkbox" mdw-selector)
|
|
229
|
-
label.mdw-selection
|
|
230
|
-
input.mdw-selection__input(type="checkbox")
|
|
231
|
-
.mdw-selection__icon
|
|
232
|
-
td(data-type="text" mdw-primary-column) Lollipop
|
|
233
|
-
td(data-type="number") 392
|
|
234
|
-
td(data-type="number") 0.2
|
|
235
|
-
td(data-type="number") 98
|
|
236
|
-
td(data-type="number") 0
|
|
237
|
-
td(data-type="number") 38
|
|
238
|
-
td(data-type="number") 0%
|
|
239
|
-
td(data-type="number") 2%
|
|
240
|
-
tr
|
|
241
|
-
td(data-type="checkbox" mdw-selector)
|
|
242
|
-
label.mdw-selection
|
|
243
|
-
input.mdw-selection__input(type="checkbox")
|
|
244
|
-
.mdw-selection__icon
|
|
245
|
-
td(data-type="text" mdw-primary-column) Honeycomb
|
|
246
|
-
td(data-type="number") 408
|
|
247
|
-
td(data-type="number") 3.2
|
|
248
|
-
td(data-type="number") 87
|
|
249
|
-
td(data-type="number") 6.5
|
|
250
|
-
td(data-type="number") 562
|
|
251
|
-
td(data-type="number") 0%
|
|
252
|
-
td(data-type="number") 45%
|
|
253
|
-
tr
|
|
254
|
-
td(data-type="checkbox" mdw-selector)
|
|
255
|
-
label.mdw-selection
|
|
256
|
-
input.mdw-selection__input(type="checkbox")
|
|
257
|
-
.mdw-selection__icon
|
|
258
|
-
td(data-type="text" mdw-primary-column) Donut
|
|
259
|
-
td(data-type="number") 452
|
|
260
|
-
td(data-type="number") 25.0
|
|
261
|
-
td(data-type="number") 51
|
|
262
|
-
td(data-type="number") 4.9
|
|
263
|
-
td(data-type="number") 326
|
|
264
|
-
td(data-type="number") 2%
|
|
265
|
-
td(data-type="number") 22%
|
|
266
|
-
tr
|
|
267
|
-
td(data-type="checkbox" mdw-selector)
|
|
268
|
-
label.mdw-selection
|
|
269
|
-
input.mdw-selection__input(type="checkbox")
|
|
270
|
-
.mdw-selection__icon
|
|
271
|
-
td(data-type="text" mdw-primary-column) Kitkat
|
|
272
|
-
td(data-type="number") 518
|
|
273
|
-
td(data-type="number") 26.0
|
|
274
|
-
td(data-type="number") 65
|
|
275
|
-
td(data-type="number") 7
|
|
276
|
-
td(data-type="number") 54
|
|
277
|
-
td(data-type="number") 12%
|
|
278
|
-
td(data-type="number") 6%
|
|
279
|
-
.mdw-datatable__footer
|
|
280
|
-
.mdw-datatable__footer-options
|
|
281
|
-
span Rows per page
|
|
282
|
-
label.mdw-textfield(mdw-solo)
|
|
283
|
-
select.mdw-textfield__input
|
|
284
|
-
option(value="10") 10
|
|
285
|
-
option(value="25") 25
|
|
286
|
-
option(value="50") 50
|
|
287
|
-
option(value="100") 100
|
|
288
|
-
.mdw-textfield__icon(mdw-dropdown)
|
|
289
|
-
.mdw-datatable__footer-details 1-10 of 10
|
|
290
|
-
.mdw-datatable__footer-controls
|
|
291
|
-
button.mdw-button.material-icons(mdw-icon disabled) chevron_left
|
|
292
|
-
button.mdw-button.material-icons(mdw-icon disabled) chevron_right
|
|
293
|
-
.mdw-card.mdw-datatable#dynamic-table(mdw-theme-color="primary" mdw-row-focusable
|
|
294
|
-
style="margin:16px;max-height:800px;overflow-y:auto")
|
|
295
|
-
.mdw-datatable__header
|
|
296
|
-
.mdw-datatable__header-text Dynamic Table
|
|
297
|
-
.mdw-datatable__header-controls
|
|
298
|
-
.mdw-menu__wrapper
|
|
299
|
-
button.mdw-button.material-icons(mdw-icon mdw-inactive mdw-theme-color="primary") filter_list
|
|
300
|
-
.mdw-menu(mdw-position="end")
|
|
301
|
-
.mdw-menu__popup
|
|
302
|
-
.mdw-menu__item(mdw-checked)
|
|
303
|
-
.mdw-menu__check.material-icons check
|
|
304
|
-
.mdw-menu__text No filter
|
|
305
|
-
.mdw-menu__item
|
|
306
|
-
.mdw-menu__check.material-icons check
|
|
307
|
-
.mdw-menu__text Contains 'md'
|
|
308
|
-
.mdw-menu__item
|
|
309
|
-
.mdw-menu__check.material-icons check
|
|
310
|
-
.mdw-menu__text Random divisible by 9
|
|
311
|
-
.mdw-menu__item
|
|
312
|
-
.mdw-menu__check.material-icons check
|
|
313
|
-
.mdw-menu__text bool is checked
|
|
314
|
-
.mdw-menu__wrapper
|
|
315
|
-
button.mdw-button.material-icons(mdw-icon) more_vert
|
|
316
|
-
.mdw-menu(mdw-position="end")
|
|
317
|
-
.mdw-menu__popup
|
|
318
|
-
.mdw-menu__item(mdw-checked)
|
|
319
|
-
.mdw-menu__check.material-icons check
|
|
320
|
-
.mdw-menu__text Throttle
|
|
321
|
-
.mdw-menu__item(mdw-checked)
|
|
322
|
-
.mdw-menu__check.material-icons check
|
|
323
|
-
.mdw-menu__text Paginate
|
|
324
|
-
script(src='datatable.min.js')
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
include ../mixins.pug
|
|
2
|
-
|
|
3
|
-
+header()
|
|
4
|
-
+navdrawer("dialog")
|
|
5
|
-
.mdw-layout(mdw-margin-top mdw-margin-bottom)
|
|
6
|
-
.mdw-layout__item(mdw-colspan="100%")
|
|
7
|
-
div
|
|
8
|
-
h5.mdw-type(mdw-baseline-next="36") Dialogs inform users about a specific task and may contain critical information, require decisions, or involve multiple tasks.
|
|
9
|
-
p.mdw-type Dialogs contain text and UI controls. They retain focus until dismissed or a required action has been taken. Use dialogs sparingly because they are interruptive.
|
|
10
|
-
.mdw-layout__item(mdw-colspan="4")
|
|
11
|
-
.component-sample
|
|
12
|
-
.component-sample__container
|
|
13
|
-
a.mdw-button(href="#sample-dialog") Open
|
|
14
|
-
.mdw-dialog#sample-dialog
|
|
15
|
-
a.mdw-dialog__close(href="#")
|
|
16
|
-
.mdw-dialog__popup
|
|
17
|
-
.mdw-dialog__title Sample title
|
|
18
|
-
.mdw-dialog__body Sample body text
|
|
19
|
-
.mdw-dialog__button-area
|
|
20
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Agree
|
|
21
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Disagree
|
|
22
|
-
.mdw-layout__item(mdw-colspan="8")
|
|
23
|
-
div
|
|
24
|
-
.mdw-type(mdw-style="subtitle") Javascript
|
|
25
|
-
div
|
|
26
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
27
|
-
input.mdw-selection__input(type="radio" name="javascript" value="required")
|
|
28
|
-
.mdw-selection__icon
|
|
29
|
-
.mdw-selection__label Required
|
|
30
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
31
|
-
input.mdw-selection__input(type="radio" name="javascript" value="optional" checked)
|
|
32
|
-
.mdw-selection__icon
|
|
33
|
-
.mdw-selection__label Optional
|
|
34
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
35
|
-
input.mdw-selection__input(type="radio" name="javascript" value="none")
|
|
36
|
-
.mdw-selection__icon
|
|
37
|
-
.mdw-selection__label None
|
|
38
|
-
.mdw-type(mdw-style="subtitle") Options
|
|
39
|
-
div
|
|
40
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
41
|
-
input.mdw-selection__input(type="checkbox" name="stacked-buttons")
|
|
42
|
-
.mdw-selection__icon
|
|
43
|
-
.mdw-selection__label Stacked Buttons
|
|
44
|
-
.mdw-type(mdw-style="subtitle") Width Units
|
|
45
|
-
div
|
|
46
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
47
|
-
input.mdw-selection__input(type="radio" name="width" value="auto" checked)
|
|
48
|
-
.mdw-selection__icon
|
|
49
|
-
.mdw-selection__label Auto
|
|
50
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
51
|
-
input.mdw-selection__input(type="radio" name="width" value="3")
|
|
52
|
-
.mdw-selection__icon
|
|
53
|
-
.mdw-selection__label 3
|
|
54
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
55
|
-
input.mdw-selection__input(type="radio" name="width" value="4")
|
|
56
|
-
.mdw-selection__icon
|
|
57
|
-
.mdw-selection__label 4
|
|
58
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
59
|
-
input.mdw-selection__input(type="radio" name="width" value="5")
|
|
60
|
-
.mdw-selection__icon
|
|
61
|
-
.mdw-selection__label 5
|
|
62
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
63
|
-
input.mdw-selection__input(type="radio" name="width" value="6")
|
|
64
|
-
.mdw-selection__icon
|
|
65
|
-
.mdw-selection__label 6
|
|
66
|
-
label.mdw-selection(mdw-theme-color="accent" style="margin:16px 8px")
|
|
67
|
-
input.mdw-selection__input(type="radio" name="width" value="7")
|
|
68
|
-
.mdw-selection__icon
|
|
69
|
-
.mdw-selection__label 7
|
|
70
|
-
.mdw-layout__item(mdw-colspan="100%" style="max-height:0")
|
|
71
|
-
.mdw-layout__item(mdw-colspan="100%")
|
|
72
|
-
.display-flex(flex-column)
|
|
73
|
-
h6.mdw-type HTML Code
|
|
74
|
-
.mdw-card.component-code.component-html
|
|
75
|
-
.mdw-layout__item(mdw-colspan="100%")
|
|
76
|
-
.display-flex(flex-column)
|
|
77
|
-
h6.mdw-type Javascript Code
|
|
78
|
-
.mdw-card.component-code.component-js
|
|
79
|
-
.mdw-layout__item(mdw-colspan="100%")
|
|
80
|
-
h6.mdw-type Samples
|
|
81
|
-
.mdw-layout__item.display-flex(mdw-colspan="4" flex-justify-content="center")
|
|
82
|
-
.render
|
|
83
|
-
div.display-flex.flex-1(flex-column style="position:relative")
|
|
84
|
-
+androidstatusbar('primary-700 dark')
|
|
85
|
-
.mdw-toolbar(mdw-theme-fill="primary-500 dark")
|
|
86
|
-
.mdw-toolbar__action
|
|
87
|
-
.mdw-toolbar__start
|
|
88
|
-
.mdw-tooltip__wrapper
|
|
89
|
-
.mdw-tooltip__target.mdw-button(mdw-icon).material-icons menu
|
|
90
|
-
.mdw-tooltip Menu
|
|
91
|
-
.mdw-toolbar__end
|
|
92
|
-
.mdw-tooltip__wrapper
|
|
93
|
-
.mdw-tooltip__target.mdw-button(mdw-icon mdw-more-button).material-icons more_vert
|
|
94
|
-
.mdw-tooltip Options
|
|
95
|
-
.content(style="padding:16px 8px;")
|
|
96
|
-
a.mdw-button(mdw-theme-fill="primary dark" mdw-raised href="#confirmdialog-titled") Titled
|
|
97
|
-
a.mdw-button(mdw-theme-fill="primary dark" mdw-raised href="#confirmdialog-text") Text
|
|
98
|
-
a.mdw-button(mdw-theme-fill="primary dark" mdw-raised href="#dialog-scrolling") Scrolling
|
|
99
|
-
.display-flex(style="padding:16px 0").js
|
|
100
|
-
button.mdw-button(mdw-theme-fill="primary dark" mdw-raised) JS
|
|
101
|
-
.mdw-dialog#confirmdialog-titled
|
|
102
|
-
a.mdw-dialog__close(href="#")
|
|
103
|
-
.mdw-dialog__popup
|
|
104
|
-
.mdw-dialog__title Use Google's location service?
|
|
105
|
-
.mdw-dialog__body Let Google help apps determine location. This means sending anonymous location data to Google, even when no apps are running.
|
|
106
|
-
.mdw-dialog__button-area
|
|
107
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Agree
|
|
108
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Disagree
|
|
109
|
-
.mdw-dialog#dialog-scrolling
|
|
110
|
-
a.mdw-dialog__close(href="#")
|
|
111
|
-
.mdw-dialog__popup
|
|
112
|
-
.mdw-dialog__header
|
|
113
|
-
.mdw-dialog__title Dialog header
|
|
114
|
-
.mdw-divider
|
|
115
|
-
.mdw-dialog__scrolling
|
|
116
|
-
.mdw-list
|
|
117
|
-
.mdw-list__item Item 1
|
|
118
|
-
.mdw-list__item Item 2
|
|
119
|
-
.mdw-list__item Item 3
|
|
120
|
-
.mdw-list__item Item 4
|
|
121
|
-
.mdw-list__item Item 5
|
|
122
|
-
.mdw-list__item Item 6
|
|
123
|
-
.mdw-list__item Item 7
|
|
124
|
-
.mdw-list__item Item 8
|
|
125
|
-
.mdw-list__item Item 9
|
|
126
|
-
.mdw-divider
|
|
127
|
-
.mdw-dialog__button-area
|
|
128
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Agree
|
|
129
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Disagree
|
|
130
|
-
.mdw-dialog#confirmdialog-text
|
|
131
|
-
a.mdw-dialog__close(href="#")
|
|
132
|
-
.mdw-dialog__popup
|
|
133
|
-
.mdw-dialog__body Discard draft?
|
|
134
|
-
.mdw-dialog__button-area
|
|
135
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Discard
|
|
136
|
-
a.mdw-button(mdw-theme-color="accent" href="#") Cancel
|
|
137
|
-
+androidnavbar
|
|
138
|
-
script(src='dialog.min.js')
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
include ../mixins.pug
|
|
2
|
-
|
|
3
|
-
+header()
|
|
4
|
-
+navdrawer("elevation")
|
|
5
|
-
.comparison
|
|
6
|
-
.display-flex.flex-wrap.flex-1(flex-justify-content="center" flex-align-items="center")
|
|
7
|
-
div(style="margin:32px;padding:24px" mdw-elevation=1) 1dp elevation
|
|
8
|
-
div(style="margin:32px;padding:24px" mdw-elevation=2) 2dp elevation
|
|
9
|
-
div(style="margin:32px;padding:24px" mdw-elevation=3) 3dp elevation
|
|
10
|
-
div(style="margin:32px;padding:24px" mdw-elevation=4) 4dp elevation
|
|
11
|
-
div(style="margin:32px;padding:24px" mdw-elevation=6) 6dp elevation
|
|
12
|
-
div(style="margin:32px;padding:24px" mdw-elevation=8) 8dp elevation
|
|
13
|
-
div(style="margin:32px;padding:24px" mdw-elevation=9) 9dp elevation
|
|
14
|
-
div(style="margin:32px;padding:24px" mdw-elevation=12) 12dp elevation
|
|
15
|
-
div(style="margin:32px;padding:24px" mdw-elevation=16) 16dp elevation
|
|
16
|
-
div(style="margin:32px;padding:24px" mdw-elevation=24) 24dp elevation
|
|
17
|
-
script(src='elevation.min.js')
|