@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldMixin.d.ts","sourceRoot":"","sources":["../../mixins/TextFieldMixin.js"],"names":[],"mappings":"AAIA,0EAA0E;AAE1E
|
|
1
|
+
{"version":3,"file":"TextFieldMixin.d.ts","sourceRoot":"","sources":["../../mixins/TextFieldMixin.js"],"names":[],"mappings":"AAIA,0EAA0E;AAE1E;;;GAGG;AACH,6CAFW,UAAU,CAAC,0CAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOpD,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkvBvD;4BA7vBa,OAAO,0BAA0B,EAAE,OAAO"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Adds theming attributes (`color`, `ink`, `typeStyle`) that map to CSS tokens.
|
|
2
3
|
* @param {typeof import('../core/CustomElement.js').default} Base
|
|
3
4
|
*/
|
|
4
5
|
export default function ThemableMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default & import("../core/CustomElement.js").Class<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemableMixin.d.ts","sourceRoot":"","sources":["../../mixins/ThemableMixin.js"],"names":[],"mappings":"AAwCA
|
|
1
|
+
{"version":3,"file":"ThemableMixin.d.ts","sourceRoot":"","sources":["../../mixins/ThemableMixin.js"],"names":[],"mappings":"AAwCA;;;GAGG;AACH,4CAFW,cAAc,0BAA0B,EAAE,OAAO;;;;UAmG3D"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @typedef {import('../components/Tooltip.js').default} Tooltip */
|
|
2
2
|
/**
|
|
3
|
+
* Adds tooltip scheduling, positioning, and show/hide behavior for host elements.
|
|
3
4
|
* @param {ReturnType<import('./StateMixin.js').default>} Base
|
|
4
5
|
*/
|
|
5
6
|
export default function TooltipTriggerMixin(Base: ReturnType<typeof import("./StateMixin.js").default>): typeof import("../index.js").CustomElement & import("../core/CustomElement.js").Class<{
|
|
@@ -25,17 +26,25 @@ export default function TooltipTriggerMixin(Base: ReturnType<typeof import("./St
|
|
|
25
26
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
26
27
|
stateTargetElement: HTMLElement;
|
|
27
28
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
29
|
+
/** Idle delay before showing tooltip for mouse (ms) */
|
|
28
30
|
TOOLTIP_MOUSE_IDLE_MS: number;
|
|
31
|
+
/** Idle delay before showing tooltip for touch (ms) */
|
|
29
32
|
TOOLTIP_TOUCH_IDLE_MS: number;
|
|
33
|
+
/** Timer id used for tooltip show/hide debouncing */
|
|
30
34
|
/** @type {any} */
|
|
31
35
|
_idleDebounce: any;
|
|
36
|
+
/** Parents being observed for layout changes */
|
|
32
37
|
/** @type {HTMLElement[]} */
|
|
33
38
|
_watchedParents: HTMLElement[];
|
|
39
|
+
/** ResizeObserver used to track tooltip/anchor size changes */
|
|
34
40
|
/** @type {ResizeObserver} */
|
|
35
41
|
_resizeObserver: ResizeObserver;
|
|
42
|
+
/** IntersectionObserver used to detect occlusion */
|
|
36
43
|
/** @type {IntersectionObserver} */
|
|
37
44
|
_intersectObserver: IntersectionObserver;
|
|
45
|
+
/** Bound scroll listener attached to parent elements */
|
|
38
46
|
_parentScrollListener: any;
|
|
47
|
+
/** Slot id to use when cloning tooltip content */
|
|
39
48
|
tooltipSlotId: string;
|
|
40
49
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
41
50
|
tooltip: string;
|
|
@@ -60,11 +69,10 @@ export default function TooltipTriggerMixin(Base: ReturnType<typeof import("./St
|
|
|
60
69
|
export type Tooltip = typeof import("../index.js").CustomElement & import("../core/CustomElement.js").Class<{
|
|
61
70
|
_ariaRole: string;
|
|
62
71
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
63
|
-
|
|
64
|
-
hasFiredConnected: boolean;
|
|
72
|
+
_onConnectAriaValues: Map<import("./AriaReflectorMixin.js").StringKeyOfARIAMixin<keyof ARIAMixin>, ARIAMixin[import("./AriaReflectorMixin.js").StringKeyOfARIAMixin<keyof ARIAMixin>]>;
|
|
65
73
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
66
|
-
readAriaProperty(name: keyof HTMLElement & keyof ElementInternals): string | ShadowRoot;
|
|
67
|
-
updateAriaProperty(name:
|
|
74
|
+
readAriaProperty(name: keyof HTMLElement & keyof ElementInternals): string | ShadowRoot | Element | readonly Element[];
|
|
75
|
+
updateAriaProperty<K extends StringKeyOfARIAMixin<keyof ARIAMixin>>(name: K, value: ARIAMixin[K]): void;
|
|
68
76
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
69
77
|
disabled: boolean;
|
|
70
78
|
focused: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipTriggerMixin.d.ts","sourceRoot":"","sources":["../../mixins/TooltipTriggerMixin.js"],"names":[],"mappings":"AAIA,oEAAoE;AAEpE
|
|
1
|
+
{"version":3,"file":"TooltipTriggerMixin.d.ts","sourceRoot":"","sources":["../../mixins/TooltipTriggerMixin.js"],"names":[],"mappings":"AAIA,oEAAoE;AAEpE;;;GAGG;AACH,kDAFW,UAAU,CAAC,wCAAiC,CAAC;;;;;;;;;;;;;;;;;;;;;;;IAKlD,uDAAuD;;IAEvD,uDAAuD;;IAEvD,qDAAqD;IACrD,kBAAkB;mBAAP,GAAG;IAEd,gDAAgD;IAChD,4BAA4B;qBAAjB,WAAW,EAAE;IAExB,+DAA+D;IAC/D,6BAA6B;qBAAlB,cAAc;IAEzB,oDAAoD;IACpD,mCAAmC;wBAAxB,oBAAoB;IAE/B,wDAAwD;;IAExD,kDAAkD;;;;;;;IAoBlD,+CAA+C;8BAAnC,OAAO,GAAC,OAAO,GAAC,UAAU;IAyBtC,+CAA+C;8BAAnC,OAAO,GAAC,OAAO,GAAC,UAAU;;;IAkEtC;;;;OAIG;oCAFQ,OAAO,GACN,IAAI;;;UAyLrB"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Provides a visually hidden touch target area to meet touch size recommendations.
|
|
3
|
+
* @param {typeof import('../core/CustomElement.js').default} Base
|
|
4
|
+
*/
|
|
2
5
|
export default function TouchTargetMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default;
|
|
3
6
|
//# sourceMappingURL=TouchTargetMixin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TouchTargetMixin.d.ts","sourceRoot":"","sources":["../../mixins/TouchTargetMixin.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TouchTargetMixin.d.ts","sourceRoot":"","sources":["../../mixins/TouchTargetMixin.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,+CAFW,cAAc,0BAA0B,EAAE,OAAO,qDAmC3D"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Provides typographic padding and leading helpers for text content.
|
|
3
|
+
* @param {typeof import('../core/CustomElement.js').default} Base
|
|
4
|
+
*/
|
|
2
5
|
export default function TypographyMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default & import("../core/CustomElement.js").Class<{
|
|
3
6
|
delegatesFocus: boolean;
|
|
4
7
|
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypographyMixin.d.ts","sourceRoot":"","sources":["../../mixins/TypographyMixin.js"],"names":[],"mappings":"AAcA
|
|
1
|
+
{"version":3,"file":"TypographyMixin.d.ts","sourceRoot":"","sources":["../../mixins/TypographyMixin.js"],"names":[],"mappings":"AAcA;;;GAGG;AACH,8CAFW,cAAc,0BAA0B,EAAE,OAAO;;;;;;;;;;;;;;UA+G3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../services/theme.js"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,+CAHW,OAAO,kBAAkB,GACxB,MAAM,CAoGjB;AAED,uBAAuB;AACvB,+CADa,MAAM,CAalB;AAED;;;GAGG;AACH,0CAHW,OAAO,qBAAqB,GAC3B,MAAM,CAsBjB;AAaD;;;GAGG;AACH,+DAHW,YAAY,GACX,MAAM,CAWjB;AAED;;;GAGG;AACH,yDAHW,YAAY,GACX,IAAI,CAiBf;AAED;;;GAGG;AACH,2DAHW,eAAe,GACd,YAAY,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../services/theme.js"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,+CAHW,OAAO,kBAAkB,GACxB,MAAM,CAoGjB;AAED,uBAAuB;AACvB,+CADa,MAAM,CAalB;AAED;;;GAGG;AACH,0CAHW,OAAO,qBAAqB,GAC3B,MAAM,CAsBjB;AAaD;;;GAGG;AACH,+DAHW,YAAY,GACX,MAAM,CAWjB;AAED;;;GAGG;AACH,yDAHW,YAAY,GACX,IAAI,CAiBf;AAED;;;GAGG;AACH,2DAHW,eAAe,GACd,YAAY,CAWvB;AAED;;;GAGG;AACH,+DAHW,YAAY,GACX,MAAM,CAqBjB;AA3TD,gCAME;AAEF,mCAME;;YAIQ,MAAM;;;;aACN,QAAQ,CAAC,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC,CAAC;gBAC1B,MAAM,GAAC,OAAO,GAAC,MAAM;;mCAxBI,4BAA4B;sCADzB,wBAAwB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** eslint-env browser */
|
|
2
|
-
export const
|
|
2
|
+
export const FRAGMENT_TAG: "$FRAGMENT";
|
|
3
3
|
/**
|
|
4
4
|
* @param {string} tagName
|
|
5
|
-
* @param {{ children?: DocumentFragment|string }} attrs
|
|
5
|
+
* @param {{ children?: DocumentFragment|string } & Record<string, any>} attrs
|
|
6
6
|
* @return {HTMLElement|DocumentFragment}
|
|
7
7
|
*/
|
|
8
8
|
export function jsx(tagName: string, attrs?: {
|
|
9
9
|
children?: DocumentFragment | string;
|
|
10
|
-
}): HTMLElement | DocumentFragment;
|
|
10
|
+
} & Record<string, any>): HTMLElement | DocumentFragment;
|
|
11
11
|
/**
|
|
12
12
|
* @param {string} tagName
|
|
13
13
|
* @param {Record<string, any> & { children: HTMLElement[], style:string|CSSStyleDeclaration }} attrs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../utils/jsx-runtime.js"],"names":[],"mappings":"AAAA,yBAAyB;AAEzB,
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../utils/jsx-runtime.js"],"names":[],"mappings":"AAAA,yBAAyB;AAEzB,2BAA4B,WAAW,CAAC;AAsDxC;;;;GAIG;AACH,6BAJW,MAAM,UACN;IAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAC,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC3D,WAAW,GAAC,gBAAgB,CA2CvC;AA/FD;;;;GAIG;AACH,8BAJW,MAAM,SACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAC,MAAM,GAAC,mBAAmB,CAAA;CAAE,GAClF,WAAW,GAAC,gBAAgB,CA4CvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hct.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/hct/Hct.js"],"names":[],"mappings":"AAuCA;;;;GAIG;AACH;IACE;;;;;;;OAOG;IAEH;;;;;OAKG;IACH,iBALW,MAAM,UACN,MAAM,QACN,MAAM,GACL,GAAG,CAId;IAED;;;OAGG;IACH,qBAHW,MAAM,GACL,GAAG,CAId;IAWD,2BAA2B;IAC3B,kBADY,MAAM,EAOjB;IAhBD,qBAAqB;IACrB,aADW,MAAM,CACL;IAEZ,qBAAqB;IACrB,gBADW,MAAM,CACF;IAEf,qBAAqB;IACrB,cADW,MAAM,CACJ;IAQX,aAAgB;IAGlB,uBAAuB;IACvB,SADa,MAAM,CAGlB;IAWD;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"Hct.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/hct/Hct.js"],"names":[],"mappings":"AAuCA;;;;GAIG;AACH;IACE;;;;;;;OAOG;IAEH;;;;;OAKG;IACH,iBALW,MAAM,UACN,MAAM,QACN,MAAM,GACL,GAAG,CAId;IAED;;;OAGG;IACH,qBAHW,MAAM,GACL,GAAG,CAId;IAWD,2BAA2B;IAC3B,kBADY,MAAM,EAOjB;IAhBD,qBAAqB;IACrB,aADW,MAAM,CACL;IAEZ,qBAAqB;IACrB,gBADW,MAAM,CACF;IAEf,qBAAqB;IACrB,cADW,MAAM,CACJ;IAQX,aAAgB;IAGlB,uBAAuB;IACvB,SADa,MAAM,CAGlB;IAWD;;;;OAIG;IACH,gBAJW,MAAM,EAYhB;IAtBD;;;;OAIG;IACH,WAFY,MAAM,CAIjB;IAsBD;;;;OAIG;IACH,sBAJW,MAAM,EAYhB;IAlBD,uBAAuB;IACvB,cADa,MAAM,CAGlB;IAyBD;;;;OAIG;IACH,kBAJW,MAAM,EAYhB;IArBD;;;OAGG;IACH,YAFY,MAAM,CAIjB;IAiBD;;;OAGG;IACH,yBAMC;IAED;;;;;;;;;;;;;;;OAeG;IACH,wBAHW,iBAAiB,GAChB,GAAG,CAwBd;CACF;8BAjL6B,wBAAwB"}
|
|
@@ -19,7 +19,7 @@ export default class CorePalette {
|
|
|
19
19
|
* @param {CorePaletteColors} colors
|
|
20
20
|
* @return {CorePalette}
|
|
21
21
|
*/
|
|
22
|
-
static "__#
|
|
22
|
+
static "__#private@#createPaletteFromColors"(content: boolean, colors: CorePaletteColors): CorePalette;
|
|
23
23
|
/**
|
|
24
24
|
* @param {number} argb ARGB representation of a color
|
|
25
25
|
* @return {CorePalette}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorePalette.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/palettes/CorePalette.js"],"names":[],"mappings":"AAqBA;;;;;;;;;GASG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"CorePalette.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/palettes/CorePalette.js"],"names":[],"mappings":"AAqBA;;;;;;;;;GASG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,sDAJW,OAAO,UACP,iBAAiB,GAChB,WAAW,CAyBtB;IAED;;;OAGG;IACH,gBAHW,MAAM,GACL,WAAW,CAItB;IAED;;;OAGG;IACH,uBAHW,MAAM,GACL,WAAW,CAItB;IAED;;;;OAIG;IACH,0BAHW,iBAAiB,GAChB,WAAW,CAItB;IAED;;;;OAIG;IACH,iCAHW,iBAAiB,GAChB,WAAW,CAItB;IAoBD;;;OAGG;IACH,kBAHW,MAAM,aACN,OAAO,EAoBjB;IAxCD,2BAA2B;IAC3B,IADW,YAAY,CACpB;IAEH,2BAA2B;IAC3B,IADW,YAAY,CACpB;IAEH,2BAA2B;IAC3B,IADW,YAAY,CACpB;IAEH,2BAA2B;IAC3B,IADW,YAAY,CACpB;IAEH,2BAA2B;IAC3B,IADW,YAAY,CACpB;IAEH,2BAA2B;IAC3B,OADW,YAAY,CACjB;CAyBP;;;;;aAvHS,MAAM;gBACN,MAAM;eACN,MAAM;cACN,MAAM;qBACN,MAAM;YACN,MAAM;;yBAVS,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scheme.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/scheme/Scheme.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH;IACE;;;OAGG;IACH,mBAHW,MAAM,GACL,MAAM,CAIjB;IAED;;;OAGG;IACH,kBAHW,MAAM,GACL,MAAM,CAIjB;IAED;;;OAGG;IACH,0BAHW,MAAM,GACL,MAAM,CAIjB;IAED;;;OAGG;IACH,yBAHW,MAAM,GACL,MAAM,CAIjB;IAED;;;;OAIG;IACH,kCAHW,WAAW,GACV,MAAM,CAyCjB;IAED;;;;OAIG;IACH,iCAHW,WAAW,GACV,MAAM,CAyCjB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,mBArCG;QAAsB,OAAO,EAArB,MAAM;QACQ,SAAS,EAAvB,MAAM;QACQ,gBAAgB,EAA9B,MAAM;QACQ,kBAAkB,EAAhC,MAAM;QACQ,SAAS,EAAvB,MAAM;QACQ,WAAW,EAAzB,MAAM;QACQ,kBAAkB,EAAhC,MAAM;QACQ,oBAAoB,EAAlC,MAAM;QACQ,QAAQ,EAAtB,MAAM;QACQ,UAAU,EAAxB,MAAM;QACQ,iBAAiB,EAA/B,MAAM;QACQ,mBAAmB,EAAjC,MAAM;QACQ,KAAK,EAAnB,MAAM;QACQ,OAAO,EAArB,MAAM;QACQ,cAAc,EAA5B,MAAM;QACQ,gBAAgB,EAA9B,MAAM;QACQ,UAAU,EAAxB,MAAM;QACQ,YAAY,EAA1B,MAAM;QACQ,OAAO,EAArB,MAAM;QACQ,SAAS,EAAvB,MAAM;QACQ,UAAU,EAAxB,MAAM;QACQ,aAAa,EAA3B,MAAM;QACQ,sBAAsB,EAApC,MAAM;QACQ,mBAAmB,EAAjC,MAAM;QACQ,gBAAgB,EAA9B,MAAM;QACQ,oBAAoB,EAAlC,MAAM;QACQ,uBAAuB,EAArC,MAAM;QACQ,cAAc,EAA5B,MAAM;QACQ,gBAAgB,EAA9B,MAAM;QACQ,OAAO,EAArB,MAAM;QACQ,cAAc,EAA5B,MAAM;QACQ,MAAM,EAApB,MAAM;QACQ,KAAK,EAAnB,MAAM;QACQ,cAAc,EAA5B,MAAM;QACQ,gBAAgB,EAA9B,MAAM;QACQ,cAAc,EAA5B,MAAM;KAChB,EAGA;IADC;iBAtCS,MAAM;mBACN,MAAM;0BACN,MAAM;4BACN,MAAM;mBACN,MAAM;qBACN,MAAM;4BACN,MAAM;8BACN,MAAM;kBACN,MAAM;oBACN,MAAM;2BACN,MAAM;6BACN,MAAM;eACN,MAAM;iBACN,MAAM;wBACN,MAAM;0BACN,MAAM;oBACN,MAAM;sBACN,MAAM;iBACN,MAAM;mBACN,MAAM;oBACN,MAAM;uBACN,MAAM;gCACN,MAAM;6BACN,MAAM;0BACN,MAAM;8BACN,MAAM;iCACN,MAAM;wBACN,MAAM;0BACN,MAAM;iBACN,MAAM;wBACN,MAAM;gBACN,MAAM;eACN,MAAM;wBACN,MAAM;0BACN,MAAM;wBACN,MAAM;MAGG;IAGpB,uBAAuB;IACvB,
|
|
1
|
+
{"version":3,"file":"Scheme.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/scheme/Scheme.js"],"names":[],"mappings":"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"}
|
|
@@ -13,9 +13,9 @@ declare namespace DEFAULT_OPTIONS {
|
|
|
13
13
|
let threshold: number;
|
|
14
14
|
let includeAA: boolean;
|
|
15
15
|
let alpha: number;
|
|
16
|
-
let aaColor: number
|
|
17
|
-
let diffColor: number
|
|
18
|
-
let diffColorAlt:
|
|
16
|
+
let aaColor: [number, number, number];
|
|
17
|
+
let diffColor: [number, number, number];
|
|
18
|
+
let diffColorAlt: [number, number, number];
|
|
19
19
|
let diffMask: boolean;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixelmatch.d.ts","sourceRoot":"","sources":["../../utils/pixelmatch.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pixelmatch.d.ts","sourceRoot":"","sources":["../../utils/pixelmatch.js"],"names":[],"mappings":"AA8RA;;;;;;;;GAQG;AACH,iCARW,UAAU,GAAC,iBAAiB,QAC5B,UAAU,GAAC,iBAAiB,UAC5B,UAAU,GAAC,iBAAiB,SAC5B,MAAM,UACN,MAAM,YACN,OAAO,eAAe,GACrB,MAAM,CAqEjB;uBAzVU,MAAM;;;;;iBASJ,CAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAC;mBAEtB,CAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAC;sBAKvB,CAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchParams.d.ts","sourceRoot":"","sources":["../../utils/searchParams.js"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,0CADa,eAAe,
|
|
1
|
+
{"version":3,"file":"searchParams.d.ts","sourceRoot":"","sources":["../../utils/searchParams.js"],"names":[],"mappings":"AAGA,gCAAgC;AAChC,0CADa,eAAe,CAkB3B"}
|
package/utils/jsx-runtime.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/** eslint-env browser */
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const FRAGMENT_TAG = '$FRAGMENT';
|
|
4
|
+
|
|
5
|
+
// https://github.com/reactjs/rfcs/pull/107
|
|
6
|
+
// https://github.com/facebook/react/blob/main/packages/react/src/jsx/ReactJSXElement.js
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* @param {string} tagName
|
|
@@ -11,7 +14,7 @@ function createElementStatic(tagName, attrs) {
|
|
|
11
14
|
const { children } = attrs;
|
|
12
15
|
if (!children) throw new Error('Static elements much have children');
|
|
13
16
|
|
|
14
|
-
if (tagName ===
|
|
17
|
+
if (tagName === FRAGMENT_TAG) {
|
|
15
18
|
const fragment = document.createDocumentFragment();
|
|
16
19
|
fragment.append(...children);
|
|
17
20
|
return fragment;
|
|
@@ -39,6 +42,7 @@ function createElementStatic(tagName, attrs) {
|
|
|
39
42
|
break;
|
|
40
43
|
default:
|
|
41
44
|
if (key in element) {
|
|
45
|
+
// @ts-ignore Default assignment
|
|
42
46
|
element[key] = value;
|
|
43
47
|
} else if (key.startsWith('data-')) {
|
|
44
48
|
element.dataset[key.slice('data-'.length)] = value;
|
|
@@ -52,11 +56,11 @@ function createElementStatic(tagName, attrs) {
|
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
58
|
* @param {string} tagName
|
|
55
|
-
* @param {{ children?: DocumentFragment|string }} attrs
|
|
59
|
+
* @param {{ children?: DocumentFragment|string } & Record<string, any>} attrs
|
|
56
60
|
* @return {HTMLElement|DocumentFragment}
|
|
57
61
|
*/
|
|
58
62
|
function createElementDynamic(tagName, attrs = {}) {
|
|
59
|
-
if (tagName ===
|
|
63
|
+
if (tagName === FRAGMENT_TAG) {
|
|
60
64
|
const fragment = document.createDocumentFragment();
|
|
61
65
|
const { children } = attrs;
|
|
62
66
|
if (children == null) return fragment;
|
|
@@ -86,6 +90,7 @@ function createElementDynamic(tagName, attrs = {}) {
|
|
|
86
90
|
break;
|
|
87
91
|
default:
|
|
88
92
|
if (key in element) {
|
|
93
|
+
// @ts-ignore Default assignment
|
|
89
94
|
element[key] = value;
|
|
90
95
|
} else if (key.startsWith('data-')) {
|
|
91
96
|
element.dataset[key.slice('data-'.length)] = value;
|
package/utils/pixelmatch.js
CHANGED
|
@@ -24,12 +24,14 @@ const DEFAULT_OPTIONS = {
|
|
|
24
24
|
/** opacity of original image in diff output */
|
|
25
25
|
alpha: 0.1,
|
|
26
26
|
/* color of anti-aliased pixels in diff output */
|
|
27
|
+
/** @type {[number,number,number]} */
|
|
27
28
|
aaColor: [255, 255, 0],
|
|
29
|
+
/** @type {[number,number,number]} */
|
|
28
30
|
diffColor: [255, 0, 0], // color of different pixels in diff output
|
|
29
31
|
/**
|
|
30
32
|
* whether to detect dark on light differences between img1 and img2 and set
|
|
31
33
|
* an alternative color to differentiate between the two
|
|
32
|
-
* @type {
|
|
34
|
+
* @type {[number,number,number]}
|
|
33
35
|
*/
|
|
34
36
|
diffColorAlt: null,
|
|
35
37
|
/** draw the diff over a transparent background (a mask) */
|
|
@@ -41,12 +43,13 @@ const DEFAULT_OPTIONS = {
|
|
|
41
43
|
*/
|
|
42
44
|
function isPixelData(arr) {
|
|
43
45
|
// work around instanceof Uint8Array not working properly in some Jest environments
|
|
44
|
-
|
|
46
|
+
// @ts-ignore Bad typings
|
|
47
|
+
return ArrayBuffer.isView(arr) && (arr).constructor.BYTES_PER_ELEMENT === 1;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/**
|
|
48
51
|
* Check if a pixel has 3+ adjacent pixels of the same color.
|
|
49
|
-
* @param {
|
|
52
|
+
* @param {ArrayLike<number>} img
|
|
50
53
|
* @param {number} x1
|
|
51
54
|
* @param {number} y1
|
|
52
55
|
* @param {number} width
|
|
@@ -137,8 +140,8 @@ function yiqFromRGB(red, green, blue) {
|
|
|
137
140
|
* calculate color difference according to the paper "Measuring perceived color
|
|
138
141
|
* difference using YIQ NTSC transmission color space in mobile applications"
|
|
139
142
|
* by Y. Kotsarenko and F. Ramos
|
|
140
|
-
* @param {
|
|
141
|
-
* @param {
|
|
143
|
+
* @param {ArrayLike<number>} img1
|
|
144
|
+
* @param {ArrayLike<number>} img2
|
|
142
145
|
* @param {number} k
|
|
143
146
|
* @param {number} m
|
|
144
147
|
* @param {boolean} [yOnly]
|
|
@@ -222,12 +225,12 @@ function drawGrayPixel(source, index, alpha, destination) {
|
|
|
222
225
|
*
|
|
223
226
|
* Based on "Anti-aliased Pixel and Intensity Slope Detector" paper by V.
|
|
224
227
|
* Vysniauskas, 2009
|
|
225
|
-
* @param {
|
|
228
|
+
* @param {ArrayLike<number>} img
|
|
226
229
|
* @param {number} x1
|
|
227
230
|
* @param {number} y1
|
|
228
231
|
* @param {number} width
|
|
229
232
|
* @param {number} height
|
|
230
|
-
* @param {
|
|
233
|
+
* @param {ArrayLike<number>} img2
|
|
231
234
|
*/
|
|
232
235
|
function antialiased(img, x1, y1, width, height, img2) {
|
|
233
236
|
const x0 = Math.max(x1 - 1, 0);
|
package/utils/searchParams.js
CHANGED
|
@@ -13,6 +13,9 @@ export function getCurrentSearchParams() {
|
|
|
13
13
|
url = /** @type {HTMLScriptElement} */ (document.currentScript).src;
|
|
14
14
|
} catch {}
|
|
15
15
|
}
|
|
16
|
+
if (!url) {
|
|
17
|
+
return new URLSearchParams();
|
|
18
|
+
}
|
|
16
19
|
currentSearchParams = new URL(url).searchParams;
|
|
17
20
|
}
|
|
18
21
|
return currentSearchParams;
|
package/components/Button.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Syntax
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Elevated
|
|
5
|
-
```html
|
|
6
|
-
<mdw-button elevated>Elevated</mdw-button>
|
|
7
|
-
<mdw-button disabled elevated>Elevated (disabled)</mdw-button>
|
|
8
|
-
<mdw-button elevated icon=search>Elevated icon</mdw-button>
|
|
9
|
-
<mdw-button elevated color=surface ink=tertiary>Elevated Surface-Tertiary</mdw-button>
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Filled
|
|
13
|
-
```html
|
|
14
|
-
<mdw-button filled>Filled button</mdw-button>
|
|
15
|
-
<mdw-button disabled filled>Filled button (Disabled)</mdw-button>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Filled Tonal
|
|
19
|
-
```html
|
|
20
|
-
<mdw-button filled=tonal>Filled tonal button</mdw-button>
|
|
21
|
-
<mdw-button disabled filled=tonal>Filled tonal button (Disabled)</mdw-button>
|
|
22
|
-
<mdw-button filled=tonal icon=search>Filled tonal button</mdw-button>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Outlined
|
|
26
|
-
```html
|
|
27
|
-
<mdw-button outlined>Outlined</mdw-button>
|
|
28
|
-
<mdw-button outlined icon=add>Outlined icon</mdw-button>
|
|
29
|
-
<mdw-button outlinedsurface icon=add>Outlined surface icon</mdw-button>
|
|
30
|
-
<mdw-button disabled outlined>Outlined (Disabled)</mdw-button>
|
|
31
|
-
<mdw-button disabled outlined icon=add>Outlined icon (Disabled)</mdw-button>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Text
|
|
35
|
-
```html
|
|
36
|
-
<mdw-button>Text</mdw-button>
|
|
37
|
-
<mdw-button ink=tertiary icon=add>Tertiary</mdw-button>
|
|
38
|
-
<mdw-button ink=tertiary disabled>Text (Disabled)</mdw-button>
|
|
39
|
-
<mdw-button ink=primary disabled icon=add>Icon text (Disabled)</mdw-button>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Custom
|
|
43
|
-
```html
|
|
44
|
-
<mdw-button ink=yellow>Custom text</mdw-button>
|
|
45
|
-
<mdw-button elevated ink=yellow>Custom elevated</mdw-button>
|
|
46
|
-
<mdw-button filled color=yellow>Custom filled</mdw-button>
|
|
47
|
-
<mdw-button filled=tonal icon=add color=yellow-container>Custom tonal</mdw-button>
|
|
48
|
-
<mdw-button outlined ink=yellow>Custom outlined</mdw-button>
|
|
49
|
-
<mdw-button disabled outlined>Outlined (Disabled)</mdw-button>
|
|
50
|
-
<mdw-button disabled outlined icon=add>Outlined icon (Disabled)</mdw-button>
|
|
51
|
-
<mdw-button disabled ink=yellow>Custom text</mdw-button>
|
|
52
|
-
<mdw-button disabled elevated=yellow>Custom elevated</mdw-button>
|
|
53
|
-
<mdw-button disabled filled color=yellow>Custom filled</mdw-button>
|
|
54
|
-
<mdw-button disabled filled=tonal icon=add color=yellow-container>Custom tonal</mdw-button>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import Button from "components/Button.js";
|
|
59
|
-
|
|
60
|
-
Button.register()
|
|
61
|
-
```
|