@shortfuse/materialdesignweb 0.9.0 → 0.9.2
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 +50 -206
- package/components/Badge.js +5 -2
- package/components/Body.js +4 -0
- package/components/BottomAppBar.js +6 -2
- package/components/BottomSheet.js +62 -14
- package/components/Button.js +20 -0
- package/components/Card.js +20 -3
- package/components/Checkbox.js +8 -0
- package/components/CheckboxIcon.js +9 -3
- package/components/Chip.js +5 -2
- package/components/Dialog.js +22 -3
- package/components/DialogActions.js +4 -0
- package/components/Display.js +9 -0
- package/components/Divider.js +5 -0
- package/components/Fab.js +11 -0
- package/components/FabContainer.js +9 -0
- package/components/FilterChip.js +9 -0
- package/components/Grid.js +11 -0
- package/components/Headline.js +4 -0
- package/components/Icon.js +27 -3
- package/components/IconButton.js +8 -2
- package/components/Input.js +87 -14
- package/components/InputChip.js +33 -1
- package/components/Label.js +4 -0
- package/components/List.js +10 -0
- package/components/ListItem.js +53 -0
- package/components/ListOption.js +62 -1
- package/components/Listbox.js +44 -13
- package/components/Menu.js +31 -9
- package/components/MenuItem.js +24 -10
- package/components/NavBar.js +14 -3
- package/components/NavBarItem.js +5 -0
- package/components/NavDrawer.js +17 -0
- package/components/NavDrawerItem.js +5 -0
- package/components/NavItem.js +22 -2
- package/components/NavRail.js +9 -0
- package/components/NavRailItem.js +5 -0
- package/components/Page.js +15 -1
- package/components/Pane.js +7 -1
- package/components/Popup.js +6 -0
- package/components/Progress.js +25 -5
- package/components/Radio.js +6 -2
- package/components/RadioIcon.js +14 -1
- package/components/Ripple.js +14 -0
- package/components/Root.js +16 -0
- package/components/Scrim.js +10 -2
- package/components/Search.js +18 -5
- package/components/SegmentedButton.js +22 -6
- package/components/SegmentedButtonGroup.js +7 -10
- package/components/Select.js +13 -3
- package/components/Shape.js +4 -0
- package/components/SideSheet.js +31 -2
- package/components/Slider.js +22 -2
- package/components/Snackbar.js +30 -4
- package/components/SnackbarContainer.js +9 -0
- package/components/Surface.js +5 -0
- package/components/Switch.js +18 -2
- package/components/SwitchIcon.js +22 -1
- package/components/Tab.js +21 -0
- package/components/TabContent.js +32 -12
- package/components/TabList.js +36 -3
- package/components/TabPanel.js +9 -0
- package/components/Table.js +38 -3
- package/components/TextArea.js +32 -1
- package/components/Title.js +4 -0
- package/components/Tooltip.js +9 -2
- package/components/TopAppBar.js +15 -0
- package/core/Composition.js +45 -16
- package/core/CompositionAdapter.js +24 -6
- package/core/CustomElement.js +77 -49
- package/core/customTypes.js +43 -26
- package/core/dom.js +1 -0
- package/core/jsonMergePatch.js +15 -1
- package/core/observe.js +28 -21
- package/dist/CustomElement.min.js +2 -0
- package/dist/CustomElement.min.js.map +7 -0
- package/dist/core/CustomElement.min.js +2 -0
- package/dist/core/CustomElement.min.js.map +7 -0
- package/dist/index.min.js +9 -9
- package/dist/index.min.js.map +3 -3
- package/dist/meta.json +1 -1
- package/dom/HTMLOptionsCollectionProxy.js +5 -3
- package/mixins/AriaReflectorMixin.js +22 -13
- package/mixins/AriaToolbarMixin.js +3 -0
- package/mixins/ControlMixin.js +3 -0
- package/mixins/DelegatesFocusMixin.js +9 -1
- package/mixins/DensityMixin.js +5 -1
- package/mixins/ElevationMixin.js +1 -2
- package/mixins/FlexableMixin.js +21 -2
- package/mixins/FormAssociatedMixin.js +19 -5
- package/mixins/HyperlinkMixin.js +11 -1
- package/mixins/InputMixin.js +22 -0
- package/mixins/KeyboardNavMixin.js +3 -1
- package/mixins/PopupMixin.js +41 -12
- package/mixins/RTLObserverMixin.js +2 -0
- package/mixins/ResizeObserverMixin.js +2 -0
- package/mixins/RippleMixin.js +3 -1
- package/mixins/ScrollListenerMixin.js +13 -1
- package/mixins/SemiStickyMixin.js +7 -0
- package/mixins/ShapeMaskedMixin.js +9 -1
- package/mixins/ShapeMixin.js +9 -0
- package/mixins/StateMixin.js +4 -0
- package/mixins/TextFieldMixin.js +21 -2
- package/mixins/ThemableMixin.js +13 -0
- package/mixins/TooltipTriggerMixin.js +17 -3
- package/mixins/TouchTargetMixin.js +4 -1
- package/mixins/TypographyMixin.js +8 -1
- package/package.json +53 -45
- package/services/theme.js +4 -5
- package/types/components/BottomAppBar.d.ts +3 -4
- package/types/components/BottomSheet.d.ts +33 -7
- package/types/components/BottomSheet.d.ts.map +1 -1
- package/types/components/Button.d.ts +3 -472
- package/types/components/Button.d.ts.map +1 -1
- package/types/components/Card.d.ts +9 -274
- package/types/components/Card.d.ts.map +1 -1
- package/types/components/Checkbox.d.ts +2 -0
- package/types/components/Checkbox.d.ts.map +1 -1
- package/types/components/Chip.d.ts +3 -1180
- package/types/components/Dialog.d.ts +8 -191
- package/types/components/Dialog.d.ts.map +1 -1
- package/types/components/Display.d.ts +5 -4
- package/types/components/Display.d.ts.map +1 -1
- package/types/components/Fab.d.ts +2 -470
- package/types/components/FilterChip.d.ts +5 -4032
- package/types/components/Grid.d.ts +1 -0
- package/types/components/Grid.d.ts.map +1 -1
- package/types/components/Headline.d.ts +3 -4
- package/types/components/Icon.d.ts +1 -49
- package/types/components/Icon.d.ts.map +1 -1
- package/types/components/IconButton.d.ts +3 -1205
- package/types/components/Input.d.ts +1485 -50245
- package/types/components/Input.d.ts.map +1 -1
- package/types/components/InputChip.d.ts +2 -160
- package/types/components/List.d.ts +8 -4
- package/types/components/List.d.ts.map +1 -1
- package/types/components/ListItem.d.ts +10 -235
- package/types/components/ListItem.d.ts.map +1 -1
- package/types/components/ListOption.d.ts +17 -1352
- package/types/components/ListOption.d.ts.map +1 -1
- package/types/components/Listbox.d.ts +199 -11448
- package/types/components/Listbox.d.ts.map +1 -1
- package/types/components/Menu.d.ts +21 -10
- package/types/components/Menu.d.ts.map +1 -1
- package/types/components/MenuItem.d.ts +17 -2894
- package/types/components/MenuItem.d.ts.map +1 -1
- package/types/components/NavBar.d.ts +2 -0
- package/types/components/NavBar.d.ts.map +1 -1
- package/types/components/NavBarItem.d.ts +1 -90
- package/types/components/NavDrawer.d.ts +3 -4
- package/types/components/NavDrawerItem.d.ts +1 -90
- package/types/components/NavItem.d.ts +1 -92
- package/types/components/NavItem.d.ts.map +1 -1
- package/types/components/NavRail.d.ts +3 -4
- package/types/components/NavRailItem.d.ts +1 -90
- package/types/components/Page.d.ts +1 -0
- package/types/components/Page.d.ts.map +1 -1
- package/types/components/Popup.d.ts +5 -3
- package/types/components/Popup.d.ts.map +1 -1
- package/types/components/Progress.d.ts +2 -0
- package/types/components/Progress.d.ts.map +1 -1
- package/types/components/Radio.d.ts +2 -0
- package/types/components/Radio.d.ts.map +1 -1
- package/types/components/Ripple.d.ts +1 -0
- package/types/components/Ripple.d.ts.map +1 -1
- package/types/components/Root.d.ts +1 -1
- package/types/components/Root.d.ts.map +1 -1
- package/types/components/Search.d.ts +502 -2
- package/types/components/Search.d.ts.map +1 -1
- package/types/components/SegmentedButton.d.ts +4 -470
- package/types/components/SegmentedButton.d.ts.map +1 -1
- package/types/components/SegmentedButtonGroup.d.ts +3 -4
- package/types/components/SegmentedButtonGroup.d.ts.map +1 -1
- package/types/components/Select.d.ts +5 -1208
- package/types/components/Select.d.ts.map +1 -1
- package/types/components/SideSheet.d.ts +9 -4
- package/types/components/SideSheet.d.ts.map +1 -1
- package/types/components/Slider.d.ts +10 -189
- package/types/components/Slider.d.ts.map +1 -1
- package/types/components/Snackbar.d.ts +13 -5
- package/types/components/Snackbar.d.ts.map +1 -1
- package/types/components/Switch.d.ts +4 -0
- package/types/components/Switch.d.ts.map +1 -1
- package/types/components/SwitchIcon.d.ts +2 -110
- package/types/components/SwitchIcon.d.ts.map +1 -1
- package/types/components/Tab.d.ts +12 -752
- package/types/components/Tab.d.ts.map +1 -1
- package/types/components/TabContent.d.ts +23 -21
- package/types/components/TabContent.d.ts.map +1 -1
- package/types/components/TabList.d.ts +646 -5801
- package/types/components/TabList.d.ts.map +1 -1
- package/types/components/TabPanel.d.ts +4 -4
- package/types/components/TabPanel.d.ts.map +1 -1
- package/types/components/Table.d.ts +24 -1
- package/types/components/Table.d.ts.map +1 -1
- package/types/components/TextArea.d.ts +15 -1208
- package/types/components/TextArea.d.ts.map +1 -1
- package/types/components/Title.d.ts +3 -4
- package/types/components/Tooltip.d.ts +4 -4
- package/types/components/Tooltip.d.ts.map +1 -1
- package/types/components/TopAppBar.d.ts +4 -5
- package/types/components/TopAppBar.d.ts.map +1 -1
- package/types/constants/shapes.d.ts.map +1 -1
- package/types/core/Composition.d.ts +19 -11
- package/types/core/Composition.d.ts.map +1 -1
- package/types/core/CompositionAdapter.d.ts +30 -8
- package/types/core/CompositionAdapter.d.ts.map +1 -1
- package/types/core/CustomElement.d.ts +27 -25
- package/types/core/CustomElement.d.ts.map +1 -1
- package/types/core/customTypes.d.ts +2 -6
- package/types/core/customTypes.d.ts.map +1 -1
- package/types/core/dom.d.ts.map +1 -1
- package/types/core/jsonMergePatch.d.ts.map +1 -1
- package/types/core/observe.d.ts +20 -19
- package/types/core/observe.d.ts.map +1 -1
- package/types/core/template.d.ts.map +1 -1
- package/types/dom/HTMLOptionsCollectionProxy.d.ts +4 -4
- package/types/dom/HTMLOptionsCollectionProxy.d.ts.map +1 -1
- package/types/mixins/AriaReflectorMixin.d.ts +18 -10
- package/types/mixins/AriaReflectorMixin.d.ts.map +1 -1
- package/types/mixins/AriaToolbarMixin.d.ts +6 -4
- package/types/mixins/AriaToolbarMixin.d.ts.map +1 -1
- package/types/mixins/ControlMixin.d.ts +1 -1
- package/types/mixins/ControlMixin.d.ts.map +1 -1
- package/types/mixins/DelegatesFocusMixin.d.ts +9 -1
- package/types/mixins/DelegatesFocusMixin.d.ts.map +1 -1
- package/types/mixins/DensityMixin.d.ts +4 -1
- package/types/mixins/DensityMixin.d.ts.map +1 -1
- package/types/mixins/ElevationMixin.d.ts +1 -2
- package/types/mixins/ElevationMixin.d.ts.map +1 -1
- package/types/mixins/FlexableMixin.d.ts +1 -0
- package/types/mixins/FlexableMixin.d.ts.map +1 -1
- package/types/mixins/FormAssociatedMixin.d.ts +3 -2
- package/types/mixins/FormAssociatedMixin.d.ts.map +1 -1
- package/types/mixins/HyperlinkMixin.d.ts +4 -1
- package/types/mixins/HyperlinkMixin.d.ts.map +1 -1
- package/types/mixins/InputMixin.d.ts +1 -7
- package/types/mixins/InputMixin.d.ts.map +1 -1
- package/types/mixins/KeyboardNavMixin.d.ts +4 -5
- package/types/mixins/KeyboardNavMixin.d.ts.map +1 -1
- package/types/mixins/PopupMixin.d.ts +22 -6
- package/types/mixins/PopupMixin.d.ts.map +1 -1
- package/types/mixins/RTLObserverMixin.d.ts +1 -0
- package/types/mixins/RTLObserverMixin.d.ts.map +1 -1
- package/types/mixins/ResizeObserverMixin.d.ts +1 -0
- package/types/mixins/ResizeObserverMixin.d.ts.map +1 -1
- package/types/mixins/RippleMixin.d.ts +3 -1
- package/types/mixins/RippleMixin.d.ts.map +1 -1
- package/types/mixins/ScrollListenerMixin.d.ts +7 -2
- package/types/mixins/ScrollListenerMixin.d.ts.map +1 -1
- package/types/mixins/SemiStickyMixin.d.ts +1 -1
- package/types/mixins/SemiStickyMixin.d.ts.map +1 -1
- package/types/mixins/ShapeMaskedMixin.d.ts +4 -1
- package/types/mixins/ShapeMaskedMixin.d.ts.map +1 -1
- package/types/mixins/ShapeMixin.d.ts +1 -0
- package/types/mixins/ShapeMixin.d.ts.map +1 -1
- package/types/mixins/StateMixin.d.ts +2 -0
- package/types/mixins/StateMixin.d.ts.map +1 -1
- package/types/mixins/TextFieldMixin.d.ts +7 -1208
- package/types/mixins/TextFieldMixin.d.ts.map +1 -1
- package/types/mixins/ThemableMixin.d.ts +1 -0
- package/types/mixins/ThemableMixin.d.ts.map +1 -1
- package/types/mixins/TooltipTriggerMixin.d.ts +12 -4
- package/types/mixins/TooltipTriggerMixin.d.ts.map +1 -1
- package/types/mixins/TouchTargetMixin.d.ts +4 -1
- package/types/mixins/TouchTargetMixin.d.ts.map +1 -1
- package/types/mixins/TypographyMixin.d.ts +4 -1
- package/types/mixins/TypographyMixin.d.ts.map +1 -1
- package/types/services/theme.d.ts.map +1 -1
- package/types/utils/jsx-runtime.d.ts +3 -3
- package/types/utils/jsx-runtime.d.ts.map +1 -1
- package/types/utils/material-color/hct/Hct.d.ts.map +1 -1
- package/types/utils/material-color/palettes/CorePalette.d.ts +1 -1
- package/types/utils/material-color/palettes/CorePalette.d.ts.map +1 -1
- package/types/utils/material-color/scheme/Scheme.d.ts.map +1 -1
- package/types/utils/pixelmatch.d.ts +3 -3
- package/types/utils/pixelmatch.d.ts.map +1 -1
- package/types/utils/searchParams.d.ts.map +1 -1
- package/utils/jsx-runtime.js +9 -4
- package/utils/pixelmatch.js +10 -7
- package/utils/searchParams.js +3 -0
- package/components/Button.md +0 -61
package/README.md
CHANGED
|
@@ -4,211 +4,55 @@ Material Design for Web
|
|
|
4
4
|
*A standards-focused, zero-dependency implemention of Material Design 3 (Material You).*
|
|
5
5
|
|
|
6
6
|
   
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
58
|
-
| [ShadowRoot](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot) | 53 | 79 | 63 | 10 |
|
|
59
|
-
| [WeakRef](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef) | 84 | 84 | 79 | 14.1 |
|
|
60
|
-
| [:where()](https://developer.mozilla.org/en-US/docs/Web/CSS/:where) | 88 | 88 | 78 | 14 |
|
|
61
|
-
| | | | | |
|
|
62
|
-
| [Array.at](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at)† | 92 | 92 | 90 | 15.4 |
|
|
63
|
-
| [replaceChildren](https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceChildren)† | 84 | 86 | 79 | 14.1 |
|
|
64
|
-
| [ElementInternals](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals)† | 77 | 79 | 93 | 16.4 |
|
|
65
|
-
| [delegatesFocus](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus)† | 53 | 79 | 94 | 15 |
|
|
66
|
-
| [AdoptedStyleSheets](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets)* | 73 | 79 | 101 | 16.4 |
|
|
67
|
-
| [CSS container queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_container_queries)* | 106 | 106 | 110 | 16.0 |
|
|
68
|
-
| |
|
|
69
|
-
| Compatibility | 88 | 88 | 78 | 16.4 |
|
|
70
|
-
| Support | [Latest ChromeOS LTS Release](https://chromeos.dev/en/education/chromeos-lts) | [Microsoft Edge Extended Stable Channel](https://learn.microsoft.com/en-us/DeployEdge/microsoft-edge-channels#extended-stable-channel) | ESR 115 | Last 2 Versions |
|
|
71
|
-
| Status | [](https://github.com/clshortfuse/materialdesignweb/actions/workflows/test-chromium.yml) | [](https://github.com/clshortfuse/materialdesignweb/actions/workflows/test-chromium.yml) | [](https://github.com/clshortfuse/materialdesignweb/actions/workflows/test-firefox.yml) | [](https://github.com/clshortfuse/materialdesignweb/actions/workflows/test-webkit.yml) |
|
|
72
|
-
|
|
73
|
-
*Optional
|
|
74
|
-
|
|
75
|
-
†Can be polyfilled
|
|
76
|
-
|
|
77
|
-
Notes:
|
|
78
|
-
|
|
79
|
-
* Compatibility may be extended via polyfills (not included)
|
|
80
|
-
|
|
81
|
-
# Components
|
|
82
|
-
|
|
83
|
-
| Component | Features | Status | Size |
|
|
84
|
-
| :----------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
85
|
-
| [Badge](components/Badge.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") | [:heavy_check_mark:](# "Ready") |  |
|
|
86
|
-
| [Bottom App Bar](components/BottomAppBar.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Toolbar") | [:heavy_check_mark:](# "Ready") |  |
|
|
87
|
-
| Bottom Sheet | | [:memo:](# "Planned") | |
|
|
88
|
-
| [Button](components/Button.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Button") | [:heavy_check_mark:](# "Ready") |  |
|
|
89
|
-
| [Card](components/Card.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:arrow_up_down:](# "Flexable") [:wheelchair:](# "ARIA Figure") | [:heavy_check_mark:](# "Ready") |  |
|
|
90
|
-
| [Fab](components/Fab.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Button") | [:heavy_check_mark:](# "Ready") |  |
|
|
91
|
-
| [Fab - Extended](components/ExtendedFab.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Button") | [:heavy_check_mark:](# "Ready") |  |
|
|
92
|
-
| [Icon Button](components/IconButton.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Button \| Checkbox") | [:heavy_check_mark:](# "Ready") |  |
|
|
93
|
-
| [Segmented Button](components/SegmentedButton.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Option") | [:heavy_check_mark:](# "Ready") |  |
|
|
94
|
-
| [Segmented Button Group](components/SegmentedButtonGroup.js) | [:crayon:](# "Ink") [:wheelchair:](# "ARIA Listbox") | [:heavy_check_mark:](# "Ready") |  |
|
|
95
|
-
| [Checkbox](components/Checkbox.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Checkbox") | [:heavy_check_mark:](# "Ready") |   |
|
|
96
|
-
| [Chip](components/Chip.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Button") | [:heavy_check_mark:](# "Ready") |  |
|
|
97
|
-
| [Chip - Filter](components/FilterChip.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Checkbox \| Radio") | [:heavy_check_mark:](# "Ready") |  |
|
|
98
|
-
| Chip: Filter Dropdown | | [:construction:](# "Under Construction") | |
|
|
99
|
-
| Chip: Input | | [:construction:](# "Under Construction") | |
|
|
100
|
-
| Date Picker | | [:grey_question:](# "Unknown") | |
|
|
101
|
-
| [Dialog](components/Dialog.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Dialog") | [:heavy_check_mark:](# "Ready") |  |
|
|
102
|
-
| Dialog: Full-screen | | [:grey_question:](# "Unknown") | |
|
|
103
|
-
| [Divider](components/Divider.js) | [:crayon:](# "Ink") | [:heavy_check_mark:](# "Ready") |  |
|
|
104
|
-
| [Icon](components/Icon.js) | [:crayon:](# "Ink") | [:heavy_check_mark:](# "Ready") |  |
|
|
105
|
-
| [List](components/List.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA List") | [:heavy_check_mark:](# "Ready") |   |
|
|
106
|
-
| [Listbox](components/Listbox.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Option") | [:heavy_check_mark:](# "Ready") |   |
|
|
107
|
-
| [Menu](components/Menu.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Menu") | [:heavy_check_mark:](# "Ready") |   |
|
|
108
|
-
| [Navigation Bar](components/NavBar.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Nav") | [:heavy_check_mark:](# "Ready") |   |
|
|
109
|
-
| [Navigation Drawer](components/NavDrawer.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Nav") | [:construction:](# "Under Construction") |   |
|
|
110
|
-
| [Navigation Rail](components/NavDrawer.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Nav") | [:heavy_check_mark:](# "Ready") |   |
|
|
111
|
-
| [Progress Indicators](components/Progress.js) | [:crayon:](# "Ink") [:wheelchair:](# "ARIA Progress") | [:heavy_check_mark:](# "Ready") |  |
|
|
112
|
-
| [Search](components/Search.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Toolbar") | [:construction:](# "Under Construction") |  |
|
|
113
|
-
| [Radio](components/Radio.js) | [:crayon:](# "Ink") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Radio") | [:heavy_check_mark:](# "Ready") |   |
|
|
114
|
-
| [Side Sheet](components/SideSheet.js) | | [:construction:](# "Under Construction") | |
|
|
115
|
-
| [Slider](components/Slider.js) | [:crayon:](# "Ink") [:wheelchair:](# "ARIA Slider") | [:warning:](# "Issues") |  |
|
|
116
|
-
| [Snackbar](components/Snackbar.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Status") | [:heavy_check_mark:](# "Ready") |  |
|
|
117
|
-
| [Switch](components/Switch.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:a:](# "Font") [:wheelchair:](# "ARIA Switch") | [:heavy_check_mark:](# "Ready") |   |
|
|
118
|
-
| [Tab](components/Tab.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Tab List \| Tab \| Tab Panel") | [:heavy_check_mark:](# "Ready") |     |
|
|
119
|
-
| [Text Input](components/Input.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Textbox") | [:heavy_check_mark:](# "Ready") |  |
|
|
120
|
-
| [Text Area](components/TextArea.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Textarea") | [:heavy_check_mark:](# "Ready") |  |
|
|
121
|
-
| [Text Select](components/Select.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:large_blue_diamond:](# "Shape") [:signal_strength:](# "Density") [:wheelchair:](# "ARIA Combobox") | [:heavy_check_mark:](# "Ready") |  |
|
|
122
|
-
| Time Picker | | [:grey_question:](# "Unknown") | |
|
|
123
|
-
| [Tooltip](components/Tooltip.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:large_blue_diamond:](# "Shape") [:wheelchair:](# "ARIA Tooltip") | [:heavy_check_mark:](# "Ready") |  |
|
|
124
|
-
| [Top App Bar](components/TopAppBar.js) | [:paintbrush:](# "Background") [:crayon:](# "Ink") [:o:](# "Outline") [:a:](# "Font") [:wheelchair:](# "ARIA") | [:heavy_check_mark:](# "Ready") |  |
|
|
125
|
-
|
|
126
|
-
# Additional
|
|
127
|
-
|
|
128
|
-
| Component | Description | Status | Size |
|
|
129
|
-
| :--------------------------------- | :---------------------------------------------------- | :--------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
130
|
-
| [Box](components/Box.js) | Simple themeable component with Flex and Grid options | [:heavy_check_mark:](# "Ready") |  |
|
|
131
|
-
| [Layout](components/Layout.js) | Manages page nav, and pane layouts | [:construction:](# "Under Construction") |  |
|
|
132
|
-
| [Icon](components/Icon.js) | Font-icon, SVG, and IMG support | [:construction:](# "Under Construction") |  |
|
|
133
|
-
| [Body](components/Body.js) | Box with Body typography | [:heavy_check_mark:](# "Ready") |  |
|
|
134
|
-
| [Label](components/Label.js) | Box with Label typography | [:heavy_check_mark:](# "Ready") |  |
|
|
135
|
-
| [Headline](components/Headline.js) | Box with Headline typography | [:heavy_check_mark:](# "Ready") |  |
|
|
136
|
-
| [Title](components/Title.js) | Box with Title typography | [:heavy_check_mark:](# "Ready") |  |
|
|
137
|
-
| [Ripple](components/Ripple.js) | Ripple effect | [:heavy_check_mark:](# "Ready") |  |
|
|
138
|
-
| [Shape](components/Shape.js) | Themeable, flexable, shapeable element | [:heavy_check_mark:](# "Ready") |  |
|
|
139
|
-
| [Surface](components/Surface.js) | Themeable, flexable, shapeable, elevateable element | [:heavy_check_mark:](# "Ready") |  |
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
# Mixins
|
|
143
|
-
|
|
144
|
-
| Mixin | Description | Status | Size |
|
|
145
|
-
| :---------------------------------------------- | :----------------------------------------------- | :--------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
146
|
-
| [AriaReflector](mixins/AriaReflectorMixin.js) | Reflects ARIA Properties | [:heavy_check_mark:](# "Ready") |  |
|
|
147
|
-
| [AriaToolbar](mixins/AriaToolbarMixin.js) | Shared ARIA Toolbar functionality | [:heavy_check_mark:](# "Ready") |  |
|
|
148
|
-
| [Control](mixins/ControlMixin.js) | HTML Control wrapper | [:heavy_check_mark:](# "Ready") |  |
|
|
149
|
-
| [Density](mixins/DensityMixin.js) | Component density options | [:heavy_check_mark:](# "Ready") |  |
|
|
150
|
-
| [Flexable](mixins/FlexableMixin.js) | Add flexbox options as attributes | [:heavy_check_mark:](# "Ready") |  |
|
|
151
|
-
| [FormAssociated](mixins/FormAssociatedMixin.js) | Form-associated custom element support | [:heavy_check_mark:](# "Ready") |  |
|
|
152
|
-
| [Input](mixins/InputMixin.js) | HTMLInputElement wrapper | [:heavy_check_mark:](# "Ready") |  |
|
|
153
|
-
| [KeyboardNav](mixins/KeyboardNavMixin.js) | Adds arrow key navigation and roving tab index | [:warning:](# "Issues") |  |
|
|
154
|
-
| [ResizeObserver](mixins/ResizeObserverMixin.js) | Shared Eelement resize observer | [:heavy_check_mark:](# "Ready") |  |
|
|
155
|
-
| [Ripple](mixins/RippleMixin.js) | Replaces pressed state with ripple effect | [:heavy_check_mark:](# "Ready") |  |
|
|
156
|
-
| [RTLObserver](mixins/RTLObserverMixin.js) | Shared RTL paoge observer | [:heavy_check_mark:](# "Ready") |  |
|
|
157
|
-
| [ScrollListener](mixins/ScrollListenerMixin.js) | Listen for horizontal and vertical scroll events | [:heavy_check_mark:](# "Ready") |  |
|
|
158
|
-
| [Shape](mixins/ShapeMixin.js) | Adds shape and outline layer to elements | [:warning:](# "Issues") |  |
|
|
159
|
-
| [Surface](mixins/SurfaceMixin.js) | Adds shadows to elements | [:warning:](# "Issues") |  |
|
|
160
|
-
| [TextField](mixins/TextFieldMixin.js) | Shared text field functionality | [:heavy_check_mark:](# "Ready") |  |
|
|
161
|
-
| [TooltipTrigger](mixins/TooltipTriggerMixin.js) | Triggers tooltips based on events | [:construction:](# "Under Construction") |  |
|
|
162
|
-
| [TouchTarget](mixins/TouchTargetMixin.js) | Adds extended touch target to controls | [:construction:](# "Under Construction") |  |
|
|
163
|
-
|
|
164
|
-
# Core
|
|
165
|
-
|
|
166
|
-
| File | Description | Status | Size |
|
|
167
|
-
| :---------------------------------------- | :------------------------------------------------------------------------- | :--------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
168
|
-
| [Composition](core/Composition.js) | Composes templates based on styles, fragments, and watches. Renders data | [:construction:](# "Under Construction") |  |
|
|
169
|
-
| [CustomElement](core/CustomElement.js) | Handles ShadowDOM, ElementInternals, Property attributes, and compositions | [:construction:](# "Under Construction") |  |
|
|
170
|
-
| [CompositionAdapter](core/Composition.js) | Handles data array to elements binding | [:construction:](# "Under Construction") |  |
|
|
171
|
-
| [jsonMergePatch](core/jsonMergePatch.js) | Applies, constructors, and evaluates JSON Merge Patch | [:construction:](# "Under Construction") |  |
|
|
172
|
-
| [css](core/css.js) | CSS, CSSStyleSheet, HTMLStyleElement functions | [:heavy_check_mark:](# "Ready") |  |
|
|
173
|
-
| [customTypes](core/customTypes.js) | Non-primitive observable types | [:construction:](# "Under Construction") |  |
|
|
174
|
-
| [optimizations](core/optimizations.js) | Micro-optimizations functions | [:construction:](# "Under Construction") |  |
|
|
175
|
-
| [dom](core/dom.js) | DOM functions | [:warning:](# "Issues") |  |
|
|
176
|
-
| [observe](core/observe.js) | Observable pattern for primitives and objects | [:construction:](# "Under Construction") |  |
|
|
177
|
-
| [template](core/template.js) | Template literals for CSS (CSSStyleSheet) and HTML (DocumentFragment) | [:heavy_check_mark:](# "Ready") |  |
|
|
178
|
-
| [uid](core/uid.js) | Generates a UID string | [:heavy_check_mark:](# "Ready") |  |
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
# Other Components
|
|
182
|
-
|
|
183
|
-
These components do not have official M3 guidelines
|
|
184
|
-
|
|
185
|
-
| Component | Status |
|
|
186
|
-
| :----------- | :--------------------------------------: |
|
|
187
|
-
| ~~Backdrop~~ | [:skull:](# "Not planned") |
|
|
188
|
-
| Banner | [:construction:](# "Under Construction") |
|
|
189
|
-
| Data Table | [:memo:](# "Planned") |
|
|
190
|
-
| Image List | [:grey_question:](# "Unknown") |
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
# Legend
|
|
194
|
-
|
|
195
|
-
* [:paintbrush:](# "Background") - Background Theming
|
|
196
|
-
* [:crayon:](# "Ink") - Ink (Foreground) Theming
|
|
197
|
-
* [:o:](# "Outline") - Outline
|
|
198
|
-
* [:a:](# "Font") - Font Theming
|
|
199
|
-
* [:large_blue_diamond:](# "Shape") - Shape Size Theming
|
|
200
|
-
* [:signal_strength:](# "Density") - Density
|
|
201
|
-
* [:arrow_up_down:](# "Flexable") - Flexable layout
|
|
202
|
-
* [:wheelchair:](# "ARIA") - ARIA Role
|
|
203
|
-
|
|
204
|
-
* [:heavy_check_mark:](# "Ready") - Ready
|
|
205
|
-
* [:warning:](# "Issues") - Issues
|
|
206
|
-
* [:construction:](# "Under Construction") - Under Construction
|
|
207
|
-
* [:memo:](# "Planned") - Planned
|
|
208
|
-
* [:grey_question:](# "Unknown") - Unknown
|
|
209
|
-
* [:skull:](# "Not planned") - Not planned
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
# Archive
|
|
7
|
+
|
|
8
|
+
Live demo: https://clshortfuse.github.io/materialdesignweb/
|
|
9
|
+
|
|
10
|
+
Quick links
|
|
11
|
+
|
|
12
|
+
**Getting Started**
|
|
13
|
+
- [Getting started](docs/GETTING_STARTED.md)
|
|
14
|
+
- [Theming](docs/THEMING.md)
|
|
15
|
+
- [Component index](docs/COMPONENTS.md)
|
|
16
|
+
|
|
17
|
+
**Building Components**
|
|
18
|
+
- [Creating custom elements](docs/CREATING_CUSTOM_ELEMENTS.md)
|
|
19
|
+
- [Observable properties reference](docs/OBSERVABLE_PROPERTIES.md)
|
|
20
|
+
- [State management (element-local)](docs/STATE.md)
|
|
21
|
+
- [State management (MVP pattern)](docs/STATE-MVP.md)
|
|
22
|
+
|
|
23
|
+
**Advanced**
|
|
24
|
+
- [Component manifest (CEM)](docs/custom-elements.json) — see [custom-elements-manifest](https://github.com/webcomponents/custom-elements-manifest)
|
|
25
|
+
- [Custom elements manifest spec](docs/CUSTOM-ELEMENTS-MANIFEST.md)
|
|
26
|
+
- [Contributing](docs/CONTRIBUTING.md)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Install via npm:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @shortfuse/materialdesignweb
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use the CDN (zero-install):
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@shortfuse/materialdesignweb?color=6750A4"></script>
|
|
39
|
+
<mdw-button>Hello World</mdw-button>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Import what you need (ESM):
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import '@shortfuse/materialdesignweb'; // full bundle
|
|
46
|
+
// or
|
|
47
|
+
import Button from '@shortfuse/materialdesignweb/components/Button.js'; // single component
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
See theming options: [docs/THEMING.md](docs/THEMING.md)
|
|
51
|
+
|
|
52
|
+
Theming
|
|
53
|
+
|
|
54
|
+
- Use the CDN `?color=` param for quick prototyping, or see [docs/THEMING.md](docs/THEMING.md) for runtime/build options.
|
|
55
|
+
|
|
56
|
+
Archive
|
|
213
57
|
|
|
214
58
|
The Material Design 1/2 version has been archived in the [`archive-md2`](https://github.com/clshortfuse/materialdesignweb/tree/archive-md2) branch.
|
package/components/Badge.js
CHANGED
|
@@ -3,8 +3,11 @@ import DensityMixin from '../mixins/DensityMixin.js';
|
|
|
3
3
|
import ShapeMixin from '../mixins/ShapeMixin.js';
|
|
4
4
|
import ThemableMixin from '../mixins/ThemableMixin.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Badges show notifications, counts, or status information on
|
|
8
|
+
* navigation items and icons.
|
|
9
|
+
* @see https://m3.material.io/components/badges/specs
|
|
10
|
+
*/
|
|
8
11
|
export default CustomElement
|
|
9
12
|
.extend()
|
|
10
13
|
.mixin(ThemableMixin)
|
package/components/Body.js
CHANGED
|
@@ -2,6 +2,10 @@ import TypographyMixin from '../mixins/TypographyMixin.js';
|
|
|
2
2
|
|
|
3
3
|
import Box from './Box.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Material Design Type scale: Body.
|
|
7
|
+
* @see https://m3.material.io/styles/typography/type-scale-tokens
|
|
8
|
+
*/
|
|
5
9
|
export default Box
|
|
6
10
|
.extend()
|
|
7
11
|
.mixin(TypographyMixin)
|
|
@@ -8,6 +8,12 @@ import Surface from './Surface.js';
|
|
|
8
8
|
* next on the DOM, so users can logically tab to it.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* BottomAppBar component that extends Surface and mixes in AriaToolbarMixin.
|
|
13
|
+
* It observes color properties and applies specific CSS styles.
|
|
14
|
+
* (deprecated) - The original bottom app bar is no longer recommended. It should be replaced with the docked toolbar, which is very similar and more flexible.
|
|
15
|
+
* @see https://m3.material.io/components/bottom-app-bar/specs
|
|
16
|
+
*/
|
|
11
17
|
export default Surface
|
|
12
18
|
.extend()
|
|
13
19
|
.mixin(AriaToolbarMixin)
|
|
@@ -15,8 +21,6 @@ export default Surface
|
|
|
15
21
|
color: { empty: 'surface-container' },
|
|
16
22
|
})
|
|
17
23
|
.css`
|
|
18
|
-
/* https://m3.material.io/components/bottom-app-bar/specs */
|
|
19
|
-
|
|
20
24
|
:host {
|
|
21
25
|
--mdw-bg: var(--mdw-color__surface-container);
|
|
22
26
|
--mdw-ink: var(--mdw-color__on-surface);
|