@shortfuse/materialdesignweb 0.5.0 → 0.7.1-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 +38 -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 +147 -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 +89 -0
- package/components/Checkbox.js +59 -0
- package/components/CheckboxIcon.css +90 -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 +150 -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 +75 -0
- package/components/Progress.js +67 -0
- package/components/ProgressCircle.css +226 -0
- package/components/ProgressLine.css +155 -0
- package/components/Radio.css +95 -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 +307 -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 +64 -0
- package/components/Switch.js +127 -0
- package/components/SwitchIcon.css +178 -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/index.js +77 -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 +55 -49
- package/theming/index.js +473 -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 +12 -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
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/banners.html
|
|
2
|
-
|
|
3
|
-
@use '../../core/_breakpoint.scss' as breakpoint;
|
|
4
|
-
@use '../../core/_length.scss' as *;
|
|
5
|
-
@use '../../core/_type.scss' as type;
|
|
6
|
-
|
|
7
|
-
:root {
|
|
8
|
-
--mdw-banner__flex-wrap: nowrap;
|
|
9
|
-
--mdw-banner__text-padding-inline-start: 24px;
|
|
10
|
-
--mdw-banner__buttons-margin-inline-start: 0;
|
|
11
|
-
@include breakpoint.has16DPMargin() {
|
|
12
|
-
--mdw-banner__text-padding-inline-start: 16px;
|
|
13
|
-
}
|
|
14
|
-
@include breakpoint.minMediumWindow() {
|
|
15
|
-
--mdw-banner__flex-wrap: wrap;
|
|
16
|
-
--mdw-banner__buttons-margin-inline-start: 90px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.mdw-banner {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
flex-direction: row;
|
|
24
|
-
flex-wrap: var(--mdw-banner__flex-wrap);
|
|
25
|
-
justify-content: center;
|
|
26
|
-
|
|
27
|
-
inline-size: 100%;
|
|
28
|
-
border-block-end: solid 1px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.mdw-banner__container {
|
|
32
|
-
@include type.addRules('body-2');
|
|
33
|
-
|
|
34
|
-
display: flex;
|
|
35
|
-
position: relative;
|
|
36
|
-
align-items: center;
|
|
37
|
-
flex-wrap: wrap;
|
|
38
|
-
justify-content: flex-end;
|
|
39
|
-
|
|
40
|
-
box-sizing: border-box;
|
|
41
|
-
max-inline-size: 960px;
|
|
42
|
-
flex: 1;
|
|
43
|
-
padding-block: 8px 7px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.mdw-banner__icon {
|
|
47
|
-
position: absolute;
|
|
48
|
-
|
|
49
|
-
inset-block-start: 24px;
|
|
50
|
-
inset-inline: 16px auto;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.mdw-banner__text {
|
|
54
|
-
@include type.textTopToTop(12);
|
|
55
|
-
@include type.baselineToBottom(12);
|
|
56
|
-
|
|
57
|
-
flex-grow: 1;
|
|
58
|
-
|
|
59
|
-
padding-inline-start: var(--mdw-banner__text-padding-inline-start);
|
|
60
|
-
|
|
61
|
-
white-space: pre-line;
|
|
62
|
-
|
|
63
|
-
.mdw-banner__icon ~ & {
|
|
64
|
-
margin-inline: 56px 0; // 40 + 16
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.mdw-banner__buttons {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: row-reverse;
|
|
71
|
-
flex-wrap: wrap;
|
|
72
|
-
justify-content: flex-start;
|
|
73
|
-
|
|
74
|
-
max-inline-size: 100%;
|
|
75
|
-
flex: none;
|
|
76
|
-
margin-inline-start: var(--mdw-banner__buttons-margin-inline-start);
|
|
77
|
-
|
|
78
|
-
.mdw-button {
|
|
79
|
-
margin-inline: 0 8px;
|
|
80
|
-
|
|
81
|
-
text-align: end;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
File without changes
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Syntax
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Fixed (Primary Color)
|
|
5
|
-
|
|
6
|
-
```
|
|
7
|
-
form.mdw-bottomnav.mdw-theme(mdw-ink="primary 500")
|
|
8
|
-
label.mdw-bottomnav__item
|
|
9
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="recents")
|
|
10
|
-
.mdw-bottomnav__icon.material-icons history
|
|
11
|
-
.mdw-bottomnav__label Recents
|
|
12
|
-
label.mdw-bottomnav__item
|
|
13
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="favorites" checked)
|
|
14
|
-
.mdw-bottomnav__icon.material-icons favorite
|
|
15
|
-
.mdw-bottomnav__label Favorites
|
|
16
|
-
label.mdw-bottomnav__item
|
|
17
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="nearby")
|
|
18
|
-
.mdw-bottomnav__icon.material-icons near_me
|
|
19
|
-
.mdw-bottomnav__label Nearby
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Fixed (Filled)
|
|
23
|
-
```
|
|
24
|
-
form.mdw-bottomnav.mdw-theme(mdw-surface="primary 700")
|
|
25
|
-
label.mdw-bottomnav__item
|
|
26
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="recents")
|
|
27
|
-
.mdw-bottomnav__icon.material-icons history
|
|
28
|
-
.mdw-bottomnav__label Recents
|
|
29
|
-
label.mdw-bottomnav__item
|
|
30
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="favorites" checked)
|
|
31
|
-
.mdw-bottomnav__icon.material-icons favorite
|
|
32
|
-
.mdw-bottomnav__label Favorites
|
|
33
|
-
label.mdw-bottomnav__item
|
|
34
|
-
input.mdw-bottomnav__input(type="radio" name="bottomnav" value="nearby")
|
|
35
|
-
.mdw-bottomnav__icon.material-icons near_me
|
|
36
|
-
.mdw-bottomnav__label Nearby
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Shifting (Primary Color)
|
|
40
|
-
```
|
|
41
|
-
form.mdw-bottomnav.mdw-theme(mdw-ink="primary 500" mdw-shifting)
|
|
42
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="movies" id='value1')
|
|
43
|
-
label.mdw-bottomnav__item(for='value1')
|
|
44
|
-
.mdw-bottomnav__icon.material-icons tv
|
|
45
|
-
.mdw-bottomnav__label Movies & TV
|
|
46
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="music" id='value2' checked )
|
|
47
|
-
label.mdw-bottomnav__item(for='value2')
|
|
48
|
-
.mdw-bottomnav__icon.material-icons music_note
|
|
49
|
-
.mdw-bottomnav__label Music
|
|
50
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="books" id='value3')
|
|
51
|
-
label.mdw-bottomnav__item(for='value3')
|
|
52
|
-
.mdw-bottomnav__icon.material-icons book
|
|
53
|
-
.mdw-bottomnav__label Books
|
|
54
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="newsstand" id='value4')
|
|
55
|
-
label.mdw-bottomnav__item(for='value4')
|
|
56
|
-
.mdw-bottomnav__icon.material-icons assignment
|
|
57
|
-
.mdw-bottomnav__label Newsstand
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Shifting (Filled)
|
|
61
|
-
```
|
|
62
|
-
form.mdw-bottomnav.mdw-theme(mdw-surface="primary 700" mdw-shifting)
|
|
63
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="movies" id='value1')
|
|
64
|
-
label.mdw-bottomnav__item(for='value1')
|
|
65
|
-
.mdw-bottomnav__icon.material-icons tv
|
|
66
|
-
.mdw-bottomnav__label Movies & TV
|
|
67
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="music" id='value2' checked )
|
|
68
|
-
label.mdw-bottomnav__item(for='value2')
|
|
69
|
-
.mdw-bottomnav__icon.material-icons music_note
|
|
70
|
-
.mdw-bottomnav__label Music
|
|
71
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="books" id='value3')
|
|
72
|
-
label.mdw-bottomnav__item(for='value3')
|
|
73
|
-
.mdw-bottomnav__icon.material-icons book
|
|
74
|
-
.mdw-bottomnav__label Books
|
|
75
|
-
input.mdw-bottomnav__input(type="radio" name="shiftingbottomnav" value="newsstand" id='value4')
|
|
76
|
-
label.mdw-bottomnav__item(for='value4')
|
|
77
|
-
.mdw-bottomnav__icon.material-icons assignment
|
|
78
|
-
.mdw-bottomnav__label Newsstand
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
# Notes
|
|
82
|
-
|
|
83
|
-
Shifting items requires use of `input` elements *immediately* preceeding its corresponding the `.mdw-bottomnav__item` element.
|
|
84
|
-
|
|
85
|
-
See `.mdw-button` documentation for more information regardling ripple origins.
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/bottom-navigation.html#specs
|
|
2
|
-
|
|
3
|
-
@use '../../core/_length.scss' as *;
|
|
4
|
-
@use '../../core/_motion.scss' as motion;
|
|
5
|
-
@use '../../core/_type.scss' as type;
|
|
6
|
-
|
|
7
|
-
:root {
|
|
8
|
-
--mdw-bottomnav__label-opacity: 1;
|
|
9
|
-
--mdw-bottomnav__label-transform: none;
|
|
10
|
-
--mdw-bottomnav__icon-transform: #{translateY(8px)};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.mdw-bottomnav {
|
|
14
|
-
display: flex;
|
|
15
|
-
position: relative;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
|
|
19
|
-
min-block-size: 56px;
|
|
20
|
-
inline-size: 100%;
|
|
21
|
-
|
|
22
|
-
&[mdw-shifting] {
|
|
23
|
-
.mdw-bottomnav__item:not([aria-selected="true"]) {
|
|
24
|
-
--mdw-bottomnav__label-opacity: 0;
|
|
25
|
-
--mdw-bottomnav__label-transform: #{translateY(8px)};
|
|
26
|
-
--mdw-bottomnav__icon-transform: #{translateY(16px)};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.mdw-bottomnav__item {
|
|
32
|
-
display: flex;
|
|
33
|
-
position: relative;
|
|
34
|
-
align-items: center;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
justify-content: flex-start;
|
|
37
|
-
overflow: visible;
|
|
38
|
-
|
|
39
|
-
min-inline-size: 80px;
|
|
40
|
-
flex: 168px;
|
|
41
|
-
flex-grow: 0;
|
|
42
|
-
// flex-shrink: 1;
|
|
43
|
-
// flex-basis: 168px;
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
46
|
-
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
-webkit-tap-highlight-color: transparent;
|
|
49
|
-
-moz-user-select: none;
|
|
50
|
-
-ms-user-select: none;
|
|
51
|
-
-webkit-user-select: none;
|
|
52
|
-
user-select: none;
|
|
53
|
-
|
|
54
|
-
z-index: 0;
|
|
55
|
-
|
|
56
|
-
border-radius: 0;
|
|
57
|
-
box-shadow: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.mdw-bottomnav__icon {
|
|
61
|
-
display: flex;
|
|
62
|
-
position: absolute;
|
|
63
|
-
inset-block-start: 0;
|
|
64
|
-
inset-inline-start: 50%;
|
|
65
|
-
|
|
66
|
-
margin-inline-start: -12px;
|
|
67
|
-
|
|
68
|
-
margin: 0;
|
|
69
|
-
padding: 0;
|
|
70
|
-
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
|
|
73
|
-
transition-duration: motion.$shapeChangeDuration, motion.$simpleDuration;
|
|
74
|
-
transition-property: transform, color;
|
|
75
|
-
transition-timing-function: motion.$standardEasing;
|
|
76
|
-
|
|
77
|
-
transform: var(--mdw-bottomnav__icon-transform);
|
|
78
|
-
|
|
79
|
-
&:last-child {
|
|
80
|
-
// No label
|
|
81
|
-
transform: translateY(16px);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.mdw-bottomnav__badge {
|
|
86
|
-
position: absolute;
|
|
87
|
-
inset-block-start: 0;
|
|
88
|
-
inset-inline: 16px auto;
|
|
89
|
-
|
|
90
|
-
box-sizing: border-box;
|
|
91
|
-
min-block-size: 8px;
|
|
92
|
-
min-inline-size: 8px;
|
|
93
|
-
padding: 2px;
|
|
94
|
-
|
|
95
|
-
visibility: hidden;
|
|
96
|
-
|
|
97
|
-
z-index: 1;
|
|
98
|
-
|
|
99
|
-
border-radius: 8px;
|
|
100
|
-
|
|
101
|
-
font: inherit;
|
|
102
|
-
|
|
103
|
-
font-weight: type.$weightRegular;
|
|
104
|
-
font-size: 10px;
|
|
105
|
-
line-height: 12px;
|
|
106
|
-
letter-spacing: normal;
|
|
107
|
-
|
|
108
|
-
&[mdw-badge] {
|
|
109
|
-
visibility: visible;
|
|
110
|
-
|
|
111
|
-
&::before {
|
|
112
|
-
content: attr(mdw-badge);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&[data-mdw-badge] {
|
|
117
|
-
visibility: visible;
|
|
118
|
-
|
|
119
|
-
&::before {
|
|
120
|
-
content: attr(data-mdw-badge);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.mdw-bottomnav__label {
|
|
126
|
-
@include type.addRules('caption');
|
|
127
|
-
@include type.textTopToTop(32);
|
|
128
|
-
@include type.baselineToBottom(8);
|
|
129
|
-
|
|
130
|
-
// Overriding 12dp for baseline bottom with 8dp for oversized and textwrapped
|
|
131
|
-
// Baseline top will ensure type.baselineToBottom is 12dp for standard layouts
|
|
132
|
-
|
|
133
|
-
box-sizing: border-box;
|
|
134
|
-
max-inline-size: 100%;
|
|
135
|
-
padding: 0 12px;
|
|
136
|
-
|
|
137
|
-
pointer-events: none;
|
|
138
|
-
|
|
139
|
-
transition-duration: motion.$shapeChangeDuration;
|
|
140
|
-
transition-property: transform, opacity, color;
|
|
141
|
-
transition-timing-function: motion.$standardEasing;
|
|
142
|
-
|
|
143
|
-
opacity: var(--mdw-bottomnav__label-opacity);
|
|
144
|
-
transform: var(--mdw-bottomnav__label-transform);
|
|
145
|
-
|
|
146
|
-
text-align: center;
|
|
147
|
-
word-break: break-all;
|
|
148
|
-
word-break: break-word;
|
|
149
|
-
}
|
|
File without changes
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
// https://www.w3.org/TR/wai-aria-practices/#tabpanel
|
|
2
|
-
|
|
3
|
-
import * as Keyboard from '../../core/aria/keyboard.js';
|
|
4
|
-
import * as RovingTabIndex from '../../core/aria/rovingtabindex.js';
|
|
5
|
-
|
|
6
|
-
import * as BottomNavItem from './item.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {Event} event
|
|
10
|
-
* @return {void}
|
|
11
|
-
*/
|
|
12
|
-
function onTabIndexZeroed(event) {
|
|
13
|
-
event.stopPropagation();
|
|
14
|
-
const bottomnavElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
15
|
-
const currentItem = /** @type {HTMLElement} */ (event.target);
|
|
16
|
-
RovingTabIndex.removeTabIndex(bottomnavElement.querySelectorAll('[role="tab"]'), [currentItem]);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @param {CustomEvent} event
|
|
21
|
-
* @return {void}
|
|
22
|
-
*/
|
|
23
|
-
function onForwardsRequested(event) {
|
|
24
|
-
if (event.detail.ctrlKey || event.detail.altKey
|
|
25
|
-
|| event.detail.shiftKey || event.detail.metaKey) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
event.preventDefault();
|
|
29
|
-
event.stopPropagation();
|
|
30
|
-
const bottomnavElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
31
|
-
RovingTabIndex.selectNext(bottomnavElement.querySelectorAll('[role="tab"]'));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @param {CustomEvent} event
|
|
36
|
-
* @return {void}
|
|
37
|
-
*/
|
|
38
|
-
function onBackwardsRequested(event) {
|
|
39
|
-
if (event.detail.ctrlKey || event.detail.altKey
|
|
40
|
-
|| event.detail.shiftKey || event.detail.metaKey) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
event.preventDefault();
|
|
44
|
-
event.stopPropagation();
|
|
45
|
-
const bottomnavElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
46
|
-
RovingTabIndex.selectPrevious(bottomnavElement.querySelectorAll('[role="tab"]'));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @param {Element} bottomnavElement
|
|
51
|
-
* @return {void}
|
|
52
|
-
*/
|
|
53
|
-
export function setupARIA(bottomnavElement) {
|
|
54
|
-
bottomnavElement.setAttribute('role', 'tablist');
|
|
55
|
-
bottomnavElement.setAttribute('aria-multiselectable', 'false');
|
|
56
|
-
bottomnavElement.setAttribute('aria-orientation', 'horizontal');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @param {CustomEvent} event
|
|
61
|
-
* @return {void}
|
|
62
|
-
*/
|
|
63
|
-
export function onSelectedChangeEvent(event) {
|
|
64
|
-
const itemElement = /** @type {HTMLElement} */ (event.target);
|
|
65
|
-
if (event.detail.value !== 'true') {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const bottomnavElement = /** @type {HTMLElement} */ (event.currentTarget);
|
|
69
|
-
for (const item of bottomnavElement.querySelectorAll('[role="tab"]')) {
|
|
70
|
-
if (item !== itemElement) {
|
|
71
|
-
BottomNavItem.setSelected(item, false);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @param {Element} bottomnavElement
|
|
78
|
-
* @return {void}
|
|
79
|
-
*/
|
|
80
|
-
export function attach(bottomnavElement) {
|
|
81
|
-
setupARIA(bottomnavElement);
|
|
82
|
-
/** @type {?Element} */
|
|
83
|
-
let selectedItem = null;
|
|
84
|
-
const items = bottomnavElement.getElementsByClassName('mdw-bottomnav__item');
|
|
85
|
-
|
|
86
|
-
for (const item of items) {
|
|
87
|
-
BottomNavItem.attach(item);
|
|
88
|
-
if (!selectedItem && item.getAttribute('aria-selected') === 'true') {
|
|
89
|
-
selectedItem = item;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (!selectedItem) {
|
|
93
|
-
selectedItem = items[0];
|
|
94
|
-
}
|
|
95
|
-
if (selectedItem) {
|
|
96
|
-
BottomNavItem.setSelected(selectedItem, true, true);
|
|
97
|
-
}
|
|
98
|
-
RovingTabIndex.setupTabIndexes(bottomnavElement.querySelectorAll('[role="tab"]'));
|
|
99
|
-
bottomnavElement.addEventListener(BottomNavItem.SELECTED_CHANGE_EVENT, onSelectedChangeEvent);
|
|
100
|
-
bottomnavElement.addEventListener(Keyboard.FORWARD_ARROW_KEY, onForwardsRequested);
|
|
101
|
-
bottomnavElement.addEventListener(Keyboard.BACK_ARROW_KEY, onBackwardsRequested);
|
|
102
|
-
bottomnavElement.addEventListener(RovingTabIndex.TABINDEX_ZEROED, onTabIndexZeroed);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @param {Element} bottomnavElement
|
|
107
|
-
* @return {void}
|
|
108
|
-
*/
|
|
109
|
-
export function detach(bottomnavElement) {
|
|
110
|
-
bottomnavElement.removeEventListener(BottomNavItem.SELECTED_CHANGE_EVENT, onSelectedChangeEvent);
|
|
111
|
-
bottomnavElement.removeEventListener(Keyboard.FORWARD_ARROW_KEY, onForwardsRequested);
|
|
112
|
-
bottomnavElement.removeEventListener(Keyboard.BACK_ARROW_KEY, onBackwardsRequested);
|
|
113
|
-
bottomnavElement.removeEventListener(RovingTabIndex.TABINDEX_ZEROED, onTabIndexZeroed);
|
|
114
|
-
for (const element of bottomnavElement.getElementsByClassName('mdw-bottomnav__item')) {
|
|
115
|
-
BottomNavItem.detach(element);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// https://www.w3.org/TR/wai-aria-1.1/#tab
|
|
2
|
-
|
|
3
|
-
import * as AriaTab from '../../core/aria/tab.js';
|
|
4
|
-
import * as Overlay from '../../core/overlay/index.js';
|
|
5
|
-
import * as Ripple from '../../core/ripple/index.js';
|
|
6
|
-
|
|
7
|
-
export const SELECTED_CHANGE_EVENT = 'mdw:bottomnavitem-selectedchange';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param {Element} element
|
|
11
|
-
* @param {string|boolean} value
|
|
12
|
-
* @param {boolean} [dispatchEvent=true]
|
|
13
|
-
* @return {boolean} successful
|
|
14
|
-
*/
|
|
15
|
-
export function setSelected(element, value, dispatchEvent = true) {
|
|
16
|
-
return AriaTab.setSelected(element, value, dispatchEvent ? SELECTED_CHANGE_EVENT : null);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @param {MouseEvent} event
|
|
21
|
-
* @return {void}
|
|
22
|
-
*/
|
|
23
|
-
function onClick(event) {
|
|
24
|
-
const element = /** @type {HTMLElement} */ (event.currentTarget);
|
|
25
|
-
if (element.getAttribute('aria-disabled') === 'true') {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
setSelected(element, true);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @param {Element} element
|
|
33
|
-
* @return {void}
|
|
34
|
-
*/
|
|
35
|
-
export function attachAria(element) {
|
|
36
|
-
AriaTab.attach(element);
|
|
37
|
-
for (const el of element.getElementsByClassName('mdw-bottomnav__icon')) {
|
|
38
|
-
el.setAttribute('aria-hidden', 'true');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @param {Element} element
|
|
44
|
-
* @return {void}
|
|
45
|
-
*/
|
|
46
|
-
export function attachCore(element) {
|
|
47
|
-
attachAria(element);
|
|
48
|
-
element.addEventListener('click', onClick);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* @param {Element} element
|
|
53
|
-
* @return {void}
|
|
54
|
-
*/
|
|
55
|
-
export function attach(element) {
|
|
56
|
-
element.classList.add('mdw-overlay');
|
|
57
|
-
if (!element.hasAttribute('mdw-overlay-off')) {
|
|
58
|
-
element.setAttribute('mdw-overlay-off', 'selected activated');
|
|
59
|
-
}
|
|
60
|
-
if (!element.hasAttribute('mdw-overlay-default')) {
|
|
61
|
-
element.setAttribute('mdw-overlay-default', 'medium');
|
|
62
|
-
}
|
|
63
|
-
Overlay.attach(element);
|
|
64
|
-
|
|
65
|
-
element.classList.add('mdw-ripple');
|
|
66
|
-
Ripple.attach(element);
|
|
67
|
-
|
|
68
|
-
attachCore(element);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @param {Element} element
|
|
73
|
-
* @return {void}
|
|
74
|
-
*/
|
|
75
|
-
export function detachCore(element) {
|
|
76
|
-
AriaTab.detach(element);
|
|
77
|
-
element.removeEventListener('click', onClick);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @param {Element} element
|
|
82
|
-
* @return {void}
|
|
83
|
-
*/
|
|
84
|
-
export function detach(element) {
|
|
85
|
-
detachCore(element);
|
|
86
|
-
Ripple.detach(element);
|
|
87
|
-
Overlay.detach(element);
|
|
88
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Syntax
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Flat
|
|
5
|
-
```
|
|
6
|
-
.mdw-button
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Raised
|
|
10
|
-
```
|
|
11
|
-
.mdw-button(mdw-raised)
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Colored (Primary)
|
|
15
|
-
```
|
|
16
|
-
.mdw-button.mdw-theme(mdw-ink="primary contrast")
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Colored (Custom)
|
|
20
|
-
```
|
|
21
|
-
.mdw-button.mdw-theme(mdw-ink="green contrast")
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Filled Light
|
|
25
|
-
```
|
|
26
|
-
.mdw-button.mdw-theme(mdw-surface="primary 100" mdw-light)
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Filled Dark
|
|
30
|
-
```
|
|
31
|
-
.mdw-button.mdw-theme(mdw-surface="secondary 600" mdw-dark)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Toggled
|
|
35
|
-
```
|
|
36
|
-
.mdw-button(aria-pressed="true")
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Disabled
|
|
40
|
-
```
|
|
41
|
-
a.mdw-button(disabled)
|
|
42
|
-
button.mdw-button(disabled)
|
|
43
|
-
.mdw-button(aria-disabled="true")
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Icon Button
|
|
47
|
-
```
|
|
48
|
-
.mdw-button(mdw-icon).material-icons favorite
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
# Javascript
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
for (const el of document.getElementsByClassName("mdw-button")) Button.attach(el);
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
# Notes
|
|
58
|
-
|
|
59
|
-
The click ripple aftereffect is centered when using keyboard or when using only CSS. Initializing the element with Javascript will ensure the ripple will spawn from the cursor position.
|
|
60
|
-
|
|
61
|
-
Use of `HTMLElementButton` or `HTMLAnchorElement` is supported, but note that using interactive content descendents violates the HTML specifications. Therefore, some browsers may not apply interactive elements such as ripples.
|