@shortfuse/materialdesignweb 0.5.0 → 0.7.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/README.md +155 -77
- package/bin/generate-css.js +12 -0
- package/components/Badge.css +30 -0
- package/components/Badge.js +15 -0
- package/components/Body.css +14 -0
- package/components/Body.js +7 -0
- package/components/BottomAppBar.css +23 -0
- package/components/BottomAppBar.js +25 -0
- package/components/Box.css +31 -0
- package/components/Box.js +24 -0
- package/components/Button.css +146 -0
- package/components/Button.js +95 -0
- package/components/Button.md +61 -0
- package/components/Card.css +109 -0
- package/components/Card.js +82 -0
- package/components/Checkbox.css +77 -0
- package/components/Checkbox.js +59 -0
- package/components/CheckboxIcon.css +89 -0
- package/components/CheckboxIcon.js +41 -0
- package/components/Chip.css +35 -0
- package/components/Chip.js +22 -0
- package/components/Dialog.css +235 -0
- package/components/Dialog.js +327 -0
- package/components/DialogActions.js +13 -0
- package/components/Divider.css +41 -0
- package/components/Divider.js +13 -0
- package/components/ExtendedFab.css +24 -0
- package/components/ExtendedFab.js +11 -0
- package/components/Fab.css +23 -0
- package/components/Fab.js +26 -0
- package/components/FilterChip.css +80 -0
- package/components/FilterChip.js +51 -0
- package/components/Headline.css +14 -0
- package/components/Headline.js +33 -0
- package/components/Icon.css +76 -0
- package/components/Icon.js +174 -0
- package/components/IconButton.css +151 -0
- package/components/IconButton.js +65 -0
- package/components/Input.js +16 -0
- package/components/Label.css +14 -0
- package/components/Label.js +7 -0
- package/components/Layout.css +19 -0
- package/components/Layout.js +12 -0
- package/components/List.css +12 -0
- package/components/List.js +17 -0
- package/components/ListItem.css +224 -0
- package/components/ListItem.js +112 -0
- package/components/ListOption.css +34 -0
- package/components/ListOption.js +122 -0
- package/components/ListSelect.css +9 -0
- package/components/ListSelect.js +206 -0
- package/components/Menu.css +171 -0
- package/components/Menu.js +470 -0
- package/components/MenuItem.css +53 -0
- package/components/MenuItem.js +215 -0
- package/components/Nav.css +17 -0
- package/components/Nav.js +23 -0
- package/components/NavBar.css +34 -0
- package/components/NavBar.js +88 -0
- package/components/NavBarItem.css +41 -0
- package/components/NavBarItem.js +7 -0
- package/components/NavDrawer.css +31 -0
- package/components/NavDrawer.js +13 -0
- package/components/NavDrawerItem.css +42 -0
- package/components/NavDrawerItem.js +12 -0
- package/components/NavItem.css +181 -0
- package/components/NavItem.js +83 -0
- package/components/NavRail.css +47 -0
- package/components/NavRail.js +17 -0
- package/components/NavRailItem.css +25 -0
- package/components/NavRailItem.js +7 -0
- package/components/Option.js +91 -0
- package/components/Outline.css +138 -0
- package/components/Pane.css +261 -0
- package/components/Pane.js +21 -0
- package/components/Progress.css +74 -0
- package/components/Progress.js +67 -0
- package/components/ProgressCircle.css +226 -0
- package/components/ProgressLine.css +155 -0
- package/components/Radio.css +83 -0
- package/components/Radio.js +42 -0
- package/components/RadioIcon.css +73 -0
- package/components/RadioIcon.js +37 -0
- package/components/Ripple.css +74 -0
- package/components/Ripple.js +114 -0
- package/components/SegmentedButton.css +94 -0
- package/components/SegmentedButton.js +49 -0
- package/components/SegmentedButtonGroup.css +12 -0
- package/components/SegmentedButtonGroup.js +44 -0
- package/components/Select.css +52 -0
- package/components/Select.js +71 -0
- package/components/Shape.css +132 -0
- package/components/Shape.js +25 -0
- package/components/Slider.css +306 -0
- package/components/Slider.js +206 -0
- package/components/Snackbar.css +80 -0
- package/components/Snackbar.js +75 -0
- package/components/Surface.css +10 -0
- package/components/Surface.js +23 -0
- package/components/Switch.css +63 -0
- package/components/Switch.js +127 -0
- package/components/SwitchIcon.css +177 -0
- package/components/SwitchIcon.js +89 -0
- package/components/SwitchIconAnimations.css +89 -0
- package/components/Tab.css +85 -0
- package/components/Tab.js +103 -0
- package/components/TabContent.js +151 -0
- package/components/TabList.css +129 -0
- package/components/TabList.js +309 -0
- package/components/TabPanel.js +37 -0
- package/components/TextArea.css +93 -0
- package/components/TextArea.js +229 -0
- package/components/Title.css +14 -0
- package/components/Title.js +15 -0
- package/components/Tooltip.css +40 -0
- package/components/Tooltip.js +22 -0
- package/components/TopAppBar.css +209 -0
- package/components/TopAppBar.js +201 -0
- package/core/Composition.js +988 -0
- package/core/CustomElement.js +844 -0
- package/core/ICustomElement.d.ts +288 -0
- package/core/ICustomElement.js +1 -0
- package/core/css.js +51 -0
- package/core/customTypes.js +125 -0
- package/core/dom.js +56 -154
- package/core/identify.js +40 -0
- package/core/observe.js +410 -0
- package/core/template.js +121 -0
- package/core/typings.d.ts +135 -0
- package/core/typings.js +1 -0
- package/mixins/AriaReflectorMixin.js +42 -0
- package/mixins/AriaToolbarMixin.js +13 -0
- package/mixins/ControlMixin.css +57 -0
- package/mixins/ControlMixin.js +212 -0
- package/mixins/DensityMixin.css +40 -0
- package/mixins/DensityMixin.js +11 -0
- package/mixins/FlexableMixin.css +79 -0
- package/mixins/FlexableMixin.js +32 -0
- package/mixins/FormAssociatedMixin.js +170 -0
- package/mixins/InputMixin.js +335 -0
- package/mixins/KeyboardNavMixin.js +244 -0
- package/mixins/RTLObserverMixin.js +35 -0
- package/mixins/ResizeObserverMixin.js +38 -0
- package/mixins/RippleMixin.css +12 -0
- package/mixins/RippleMixin.js +115 -0
- package/mixins/ScrollListenerMixin.js +100 -0
- package/mixins/ShapeMixin.css +135 -0
- package/mixins/ShapeMixin.js +31 -0
- package/mixins/StateMixin.css +82 -0
- package/mixins/StateMixin.js +114 -0
- package/mixins/SurfaceMixin.css +150 -0
- package/mixins/SurfaceMixin.js +32 -0
- package/mixins/TextFieldMixin.css +657 -0
- package/mixins/TextFieldMixin.js +121 -0
- package/mixins/ThemableMixin.css +204 -0
- package/mixins/ThemableMixin.js +16 -0
- package/mixins/TooltipTriggerMixin.css +27 -0
- package/mixins/TooltipTriggerMixin.js +366 -0
- package/mixins/TouchTargetMixin.css +26 -0
- package/mixins/TouchTargetMixin.js +9 -0
- package/package.json +54 -49
- package/theming/index.js +594 -0
- package/theming/loader.js +24 -0
- package/utils/cli.js +11 -0
- package/utils/color_keywords.js +151 -0
- package/utils/hct/Cam16.js +298 -0
- package/utils/hct/CorePalette.js +84 -0
- package/utils/hct/Hct.js +172 -0
- package/utils/hct/Scheme.js +587 -0
- package/utils/hct/TonalPalette.js +68 -0
- package/utils/hct/ViewingConditions.js +136 -0
- package/utils/hct/blend.js +93 -0
- package/utils/hct/colorUtils.js +302 -0
- package/utils/hct/hctSolver.js +559 -0
- package/utils/hct/helper.js +182 -0
- package/utils/hct/mathUtils.js +153 -0
- package/utils/jsonMergePatch.js +100 -0
- package/utils/jsx-runtime.js +101 -0
- package/utils/popup.js +117 -0
- package/utils/svg.js +129 -0
- package/.browserslistrc +0 -4
- package/.eslintrc.json +0 -204
- package/.stylelintrc.json +0 -645
- package/.vscode/launch.json +0 -31
- package/.vscode/settings.json +0 -3
- package/.vscode/tasks.json +0 -32
- package/CHANGELOG.md +0 -36
- package/CODE_OF_CONDUCT.md +0 -46
- package/adapters/datatable/column.js +0 -176
- package/adapters/datatable/index.js +0 -960
- package/adapters/dom/index.js +0 -586
- package/adapters/list/index.js +0 -69
- package/adapters/search/index.js +0 -495
- package/components/appbar/_spec.scss +0 -165
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +0 -2
- package/components/banner/_spec.scss +0 -83
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +0 -2
- package/components/bottomnav/README.md +0 -85
- package/components/bottomnav/_spec.scss +0 -149
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +0 -117
- package/components/bottomnav/index.scss +0 -2
- package/components/bottomnav/item.js +0 -88
- package/components/button/README.md +0 -61
- package/components/button/_spec.scss +0 -162
- package/components/button/_theme.scss +0 -42
- package/components/button/index.eta +0 -32
- package/components/button/index.js +0 -43
- package/components/button/index.pug +0 -18
- package/components/button/index.scss +0 -2
- package/components/card/_spec.scss +0 -241
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +0 -2
- package/components/chip/_spec.scss +0 -111
- package/components/chip/_theme.scss +0 -105
- package/components/chip/index.js +0 -23
- package/components/chip/index.scss +0 -2
- package/components/chip/item.js +0 -20
- package/components/datatable/_spec.scss +0 -225
- package/components/datatable/_theme.scss +0 -128
- package/components/datatable/cell.js +0 -44
- package/components/datatable/columnheader.js +0 -46
- package/components/datatable/index.js +0 -374
- package/components/datatable/index.scss +0 -2
- package/components/datatable/row.js +0 -48
- package/components/datatable/rowheader.js +0 -18
- package/components/dialog/_spec.scss +0 -203
- package/components/dialog/_theme.scss +0 -7
- package/components/dialog/index.js +0 -601
- package/components/dialog/index.scss +0 -2
- package/components/divider/_spec.scss +0 -11
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +0 -2
- package/components/elevation/_spec.scss +0 -9
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +0 -2
- package/components/fab/_spec.scss +0 -210
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +0 -99
- package/components/fab/index.scss +0 -2
- package/components/grid/_spec.scss +0 -169
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +0 -2
- package/components/layout/_mixins.scss +0 -11
- package/components/layout/_spec.scss +0 -916
- package/components/layout/_theme.scss +0 -19
- package/components/layout/index.js +0 -454
- package/components/layout/index.scss +0 -2
- package/components/list/_spec.scss +0 -363
- package/components/list/_theme.scss +0 -102
- package/components/list/content.js +0 -106
- package/components/list/index.js +0 -256
- package/components/list/index.scss +0 -2
- package/components/list/item.js +0 -167
- package/components/list/secondary.js +0 -45
- package/components/menu/_spec.scss +0 -329
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +0 -705
- package/components/menu/index.scss +0 -2
- package/components/menu/item.js +0 -231
- package/components/progress/_spec.scss +0 -156
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +0 -36
- package/components/progress/index.scss +0 -2
- package/components/selection/_spec.scss +0 -376
- package/components/selection/_theme.scss +0 -134
- package/components/selection/index.eta +0 -60
- package/components/selection/index.js +0 -70
- package/components/selection/index.pug +0 -30
- package/components/selection/index.scss +0 -2
- package/components/selection/input.js +0 -54
- package/components/selection/radiogroup.js +0 -40
- package/components/slider/_spec.scss +0 -59
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +0 -2
- package/components/snackbar/_spec.scss +0 -150
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +0 -338
- package/components/snackbar/index.scss +0 -2
- package/components/tab/_spec.scss +0 -220
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +0 -210
- package/components/tab/index.js +0 -257
- package/components/tab/index.scss +0 -2
- package/components/tab/item.js +0 -88
- package/components/tab/list.js +0 -196
- package/components/tab/panel.js +0 -54
- package/components/textfield/README.md +0 -179
- package/components/textfield/_spec.scss +0 -763
- package/components/textfield/_theme.scss +0 -264
- package/components/textfield/index.eta +0 -74
- package/components/textfield/index.js +0 -160
- package/components/textfield/index.pug +0 -30
- package/components/textfield/index.scss +0 -2
- package/components/tooltip/_spec.scss +0 -185
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +0 -2
- package/components/type/_spec.scss +0 -227
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +0 -2
- package/core/_breakpoint.scss +0 -189
- package/core/_elevation.scss +0 -78
- package/core/_length.scss +0 -8
- package/core/_motion.scss +0 -31
- package/core/_platform.scss +0 -12
- package/core/_type.scss +0 -128
- package/core/aria/attributes.js +0 -141
- package/core/aria/button.js +0 -49
- package/core/aria/keyboard.js +0 -92
- package/core/aria/rovingtabindex.js +0 -175
- package/core/aria/tab.js +0 -59
- package/core/document/index.js +0 -39
- package/core/overlay/_spec.scss +0 -28
- package/core/overlay/_theme.scss +0 -147
- package/core/overlay/index.js +0 -95
- package/core/overlay/index.scss +0 -2
- package/core/ripple/_spec.scss +0 -196
- package/core/ripple/_theme.scss +0 -20
- package/core/ripple/index.js +0 -286
- package/core/ripple/index.scss +0 -2
- package/core/theme/_aliases.scss +0 -15
- package/core/theme/_config.scss +0 -8
- package/core/theme/_functions.scss +0 -22
- package/core/theme/_palettes.scss +0 -405
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +0 -268
- package/core/theme/index.js +0 -50
- package/core/theme/index.scss +0 -4
- package/core/throttler.js +0 -42
- package/core/transition/index.js +0 -465
- package/docs/_flex.scss +0 -28
- package/docs/_menuoptions.js +0 -183
- package/docs/_partials/_androidnavbar.eta +0 -5
- package/docs/_partials/_androidstatusbar.eta +0 -13
- package/docs/_partials/_appbar.eta +0 -27
- package/docs/_partials/_buttontest.eta +0 -31
- package/docs/_partials/_header.eta +0 -146
- package/docs/_partials/_navlistitem.eta +0 -16
- package/docs/_partials/_target.eta +0 -1
- package/docs/_sample-utils.js +0 -88
- package/docs/_storage.js +0 -33
- package/docs/docs.scss +0 -331
- package/docs/framework.scss +0 -26
- package/docs/index.eta +0 -12
- package/docs/index.js +0 -7
- package/docs/pages/appbar.eta +0 -108
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +0 -188
- package/docs/pages/bottomnav.js +0 -118
- package/docs/pages/button.eta +0 -124
- package/docs/pages/button.js +0 -224
- package/docs/pages/card.eta +0 -90
- package/docs/pages/card.js +0 -175
- package/docs/pages/chip.eta +0 -122
- package/docs/pages/chip.js +0 -80
- package/docs/pages/color.eta +0 -143
- package/docs/pages/color.js +0 -261
- package/docs/pages/datatable.eta +0 -323
- package/docs/pages/datatable.js +0 -160
- package/docs/pages/dialog.eta +0 -184
- package/docs/pages/dialog.js +0 -174
- package/docs/pages/dom.eta +0 -26
- package/docs/pages/dom.js +0 -140
- package/docs/pages/elevation.eta +0 -35
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +0 -99
- package/docs/pages/fab.js +0 -43
- package/docs/pages/grid.eta +0 -135
- package/docs/pages/grid.js +0 -128
- package/docs/pages/layout.eta +0 -8
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +0 -465
- package/docs/pages/list.js +0 -8
- package/docs/pages/menu.eta +0 -274
- package/docs/pages/menu.js +0 -213
- package/docs/pages/overlay.eta +0 -69
- package/docs/pages/overlay.js +0 -3
- package/docs/pages/progress.eta +0 -23
- package/docs/pages/progress.js +0 -12
- package/docs/pages/ripple.eta +0 -27
- package/docs/pages/ripple.js +0 -3
- package/docs/pages/search.eta +0 -242
- package/docs/pages/search.js +0 -226
- package/docs/pages/selection.eta +0 -107
- package/docs/pages/selection.js +0 -12
- package/docs/pages/slider.eta +0 -23
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +0 -83
- package/docs/pages/snackbar.js +0 -157
- package/docs/pages/tab.eta +0 -407
- package/docs/pages/tab.js +0 -152
- package/docs/pages/textfield.eta +0 -487
- package/docs/pages/textfield.js +0 -257
- package/docs/pages/tooltip.eta +0 -92
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +0 -117
- package/docs/pages/transition.js +0 -52
- package/docs/pages/type.eta +0 -31
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +0 -41
- package/docs/prerender.js +0 -16
- package/docs/pwa/_dialogs.eta +0 -143
- package/docs/pwa/_menus.eta +0 -16
- package/docs/pwa/pwa-prerender.js +0 -3
- package/docs/pwa/pwa.eta +0 -478
- package/docs/pwa/pwa.js +0 -298
- package/docs/pwa/pwa.scss +0 -31
- package/docs/themes/theme-colored.scss +0 -15
- package/docs/themes/theme-default.scss +0 -3
- package/index.scss +0 -27
- package/jsconfig.json +0 -16
- package/scripts/deploy-docs.sh +0 -9
- package/templates/index.eta +0 -2
- package/templates/index.pug +0 -3
- package/tsconfig.json +0 -16
- package/webpack.config.js +0 -304
package/docs/pages/color.js
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import * as Overlay from '../../core/overlay/index.js';
|
|
2
|
-
import * as Ripple from '../../core/ripple/index.js';
|
|
3
|
-
|
|
4
|
-
for (const el of document.getElementsByClassName('mdw-overlay')) Overlay.attach(el);
|
|
5
|
-
for (const el of document.getElementsByClassName('mdw-ripple')) Ripple.attach(el);
|
|
6
|
-
|
|
7
|
-
const sampleSurface = document.getElementById('sample-surface');
|
|
8
|
-
const sampleInk = document.getElementById('sample-ink');
|
|
9
|
-
|
|
10
|
-
const sampleButton = document.getElementById('sample-button');
|
|
11
|
-
const sampleButtonSelected = document.getElementById('sample-button__selected');
|
|
12
|
-
const sampleButtonActivated = document.getElementById('sample-button__activated');
|
|
13
|
-
|
|
14
|
-
const sampleContrastText = document.getElementById('sample-contrast__text');
|
|
15
|
-
const sampleContrastSelected = document.getElementById('sample-contrast__selected');
|
|
16
|
-
const sampleContrastActivated = document.getElementById('sample-contrast__activated');
|
|
17
|
-
|
|
18
|
-
/** @typedef {{r:number,g:number,b:number,a:number}} Color */
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param {Color} color
|
|
22
|
-
* @return {string}
|
|
23
|
-
*/
|
|
24
|
-
function colorToString(color) {
|
|
25
|
-
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @param {string} colorString
|
|
30
|
-
* @return {Color}
|
|
31
|
-
*/
|
|
32
|
-
function parseColor(colorString) {
|
|
33
|
-
if (colorString === 'transparent') {
|
|
34
|
-
return {
|
|
35
|
-
r: 0, g: 0, b: 0, a: 0,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
return colorString
|
|
39
|
-
.match(/\(([^)]+)\)/)[1]
|
|
40
|
-
.split(',')
|
|
41
|
-
.map((value) => (value == null ? 1 : Number.parseFloat(value)))
|
|
42
|
-
.reduce((prev, curr, index) => {
|
|
43
|
-
if (index > 3) {
|
|
44
|
-
throw new Error('Unexpected 5th value');
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
r: index === 0 ? curr : prev.r,
|
|
48
|
-
g: index === 1 ? curr : prev.g,
|
|
49
|
-
b: index === 2 ? curr : prev.b,
|
|
50
|
-
a: index === 3 ? curr : prev.a,
|
|
51
|
-
};
|
|
52
|
-
}, {
|
|
53
|
-
r: 255, g: 255, b: 255, a: 1,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @param {Color} color
|
|
59
|
-
* @param {Color} overlay
|
|
60
|
-
* @return {Color}
|
|
61
|
-
*/
|
|
62
|
-
function overlayColor(color, overlay) {
|
|
63
|
-
return {
|
|
64
|
-
r: (1 - overlay.a) * color.r + overlay.a * overlay.r,
|
|
65
|
-
g: (1 - overlay.a) * color.g + overlay.a * overlay.g,
|
|
66
|
-
b: (1 - overlay.a) * color.b + overlay.a * overlay.b,
|
|
67
|
-
a: 1,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @param {number} colorValue
|
|
73
|
-
* @return {number}
|
|
74
|
-
*/
|
|
75
|
-
function sRGBMapping(colorValue) {
|
|
76
|
-
if (colorValue <= (0.039_28 * 255)) {
|
|
77
|
-
return colorValue / 255 / 12.92;
|
|
78
|
-
}
|
|
79
|
-
return ((colorValue / 255 + 0.055) / 1.055) ** 2.4;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
84
|
-
* @param {Color} color
|
|
85
|
-
* @return {number}
|
|
86
|
-
*/
|
|
87
|
-
function getLuminance(color) {
|
|
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);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
|
|
96
|
-
* @param {Color} a
|
|
97
|
-
* @param {Color} b
|
|
98
|
-
* @return {number} X:1 ratio
|
|
99
|
-
*/
|
|
100
|
-
function getContrastRatio(a, b) {
|
|
101
|
-
const lumA = getLuminance(a);
|
|
102
|
-
const lumB = getLuminance(b);
|
|
103
|
-
if (lumA === 0 && lumB === 0) {
|
|
104
|
-
return 0;
|
|
105
|
-
}
|
|
106
|
-
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @param {string} name
|
|
111
|
-
* @return {void}
|
|
112
|
-
*/
|
|
113
|
-
function updateSurfaces(name) {
|
|
114
|
-
sampleButton.setAttribute('mdw-surface', name);
|
|
115
|
-
sampleButtonSelected.setAttribute('mdw-surface', name);
|
|
116
|
-
sampleButtonActivated.setAttribute('mdw-surface', name);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @param {string} name
|
|
121
|
-
* @return {void}
|
|
122
|
-
*/
|
|
123
|
-
function updateInks(name) {
|
|
124
|
-
sampleButton.setAttribute('mdw-ink', name);
|
|
125
|
-
sampleButtonSelected.setAttribute('mdw-ink', name);
|
|
126
|
-
sampleButtonActivated.setAttribute('mdw-ink', name);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/** @return {void} */
|
|
130
|
-
function calculateContrast() {
|
|
131
|
-
requestAnimationFrame(() => {
|
|
132
|
-
const style = window.getComputedStyle(sampleButton);
|
|
133
|
-
const surfaceColor = parseColor(style.backgroundColor);
|
|
134
|
-
const inkColor = parseColor(style.color);
|
|
135
|
-
sampleSurface.textContent = colorToString(surfaceColor);
|
|
136
|
-
sampleInk.textContent = colorToString(inkColor);
|
|
137
|
-
const flattenedInk = overlayColor(surfaceColor, inkColor);
|
|
138
|
-
sampleContrastText.textContent = getContrastRatio(surfaceColor, flattenedInk).toFixed(2);
|
|
139
|
-
|
|
140
|
-
let selectedOpacity = 0.08;
|
|
141
|
-
let activatedOpacity = 0.12;
|
|
142
|
-
let overlayInkColor = inkColor;
|
|
143
|
-
|
|
144
|
-
if (document.documentElement.hasAttribute('mdw-dark')) {
|
|
145
|
-
selectedOpacity = 0.12;
|
|
146
|
-
activatedOpacity = 0.24;
|
|
147
|
-
overlayInkColor = inkColor;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
const selectedInkColor = parseColor(window.getComputedStyle(sampleButtonSelected).color);
|
|
151
|
-
const selectedFlattenedInk = overlayColor(surfaceColor, selectedInkColor);
|
|
152
|
-
const selectedOverlay = parseColor(`rgba(${overlayInkColor.r},${overlayInkColor.g},${overlayInkColor.b},${selectedOpacity})`);
|
|
153
|
-
const selectedBackground = overlayColor(surfaceColor, selectedOverlay);
|
|
154
|
-
const selectedColor = overlayColor(selectedFlattenedInk, selectedOverlay);
|
|
155
|
-
sampleContrastSelected.textContent = getContrastRatio(selectedBackground, selectedColor).toFixed(2);
|
|
156
|
-
|
|
157
|
-
const activatedOverlay = parseColor(`rgba(${overlayInkColor.r},${overlayInkColor.g},${overlayInkColor.b},${activatedOpacity})`);
|
|
158
|
-
const activatedBackground = overlayColor(surfaceColor, activatedOverlay);
|
|
159
|
-
const activatedColor = overlayColor(flattenedInk, activatedOverlay);
|
|
160
|
-
sampleContrastActivated.textContent = getContrastRatio(activatedBackground, activatedColor).toFixed(2);
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* @param {MouseEvent} event
|
|
166
|
-
* @return {void}
|
|
167
|
-
*/
|
|
168
|
-
function onItemClick(event) {
|
|
169
|
-
const item = /** @type {HTMLElement} */ (event.currentTarget);
|
|
170
|
-
if (item.id) {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
const ink = item.getAttribute('mdw-ink');
|
|
174
|
-
if (ink == null) {
|
|
175
|
-
updateSurfaces(item.getAttribute('mdw-surface'));
|
|
176
|
-
} else {
|
|
177
|
-
updateInks(item.getAttribute('mdw-ink'));
|
|
178
|
-
}
|
|
179
|
-
calculateContrast();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const currentInkOptions = {
|
|
183
|
-
color: 'secondary',
|
|
184
|
-
tone: 'contrast',
|
|
185
|
-
opacity: '',
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
const currentSurfaceOptions = {
|
|
189
|
-
color: 'binary',
|
|
190
|
-
tone: '',
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
/** @return {void} */
|
|
194
|
-
function refresh() {
|
|
195
|
-
const inkProperties = [
|
|
196
|
-
currentInkOptions.color,
|
|
197
|
-
currentInkOptions.tone,
|
|
198
|
-
currentInkOptions.opacity,
|
|
199
|
-
].filter(Boolean).join(' ');
|
|
200
|
-
const surfaceProperties = [
|
|
201
|
-
currentSurfaceOptions.color,
|
|
202
|
-
currentSurfaceOptions.tone,
|
|
203
|
-
].filter(Boolean).join(' ');
|
|
204
|
-
for (const el of document.querySelectorAll('#color-sample-area .demo-core-item')) {
|
|
205
|
-
el.setAttribute('mdw-ink', inkProperties);
|
|
206
|
-
el.setAttribute('mdw-surface', surfaceProperties);
|
|
207
|
-
}
|
|
208
|
-
calculateContrast();
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* @param {Event} event
|
|
213
|
-
* @return {void}
|
|
214
|
-
*/
|
|
215
|
-
function onOptionChange(event) {
|
|
216
|
-
const selectElement = /** @type {HTMLSelectElement} */ (event.target);
|
|
217
|
-
const { name, value } = selectElement;
|
|
218
|
-
switch (name) {
|
|
219
|
-
case 'ink-color':
|
|
220
|
-
currentInkOptions.color = value;
|
|
221
|
-
break;
|
|
222
|
-
case 'ink-tone':
|
|
223
|
-
currentInkOptions.tone = value;
|
|
224
|
-
break;
|
|
225
|
-
case 'ink-opacity':
|
|
226
|
-
currentInkOptions.opacity = value;
|
|
227
|
-
break;
|
|
228
|
-
case 'surface-color':
|
|
229
|
-
currentSurfaceOptions.color = value;
|
|
230
|
-
break;
|
|
231
|
-
case 'surface-tone':
|
|
232
|
-
currentSurfaceOptions.tone = value;
|
|
233
|
-
break;
|
|
234
|
-
default:
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
refresh();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/** @return {void} */
|
|
241
|
-
function setupComponentOptions() {
|
|
242
|
-
// sampleComponent = document.querySelector('.component-sample .mdw-button');
|
|
243
|
-
// Button.attach(sampleComponent);
|
|
244
|
-
for (const el of document.querySelectorAll('#color-page-options [name]')) {
|
|
245
|
-
el.addEventListener('change', onOptionChange);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
for (const item of document.getElementsByClassName('demo-core-item')) {
|
|
250
|
-
item.addEventListener('click', onItemClick);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
for (const button of [
|
|
254
|
-
document.getElementById('darkModeButton'),
|
|
255
|
-
document.getElementById('altThemeButton'),
|
|
256
|
-
]) {
|
|
257
|
-
button?.addEventListener('click', calculateContrast);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
setupComponentOptions();
|
|
261
|
-
refresh();
|
package/docs/pages/datatable.eta
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
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>
|