@shortfuse/materialdesignweb 0.7.1-0 → 0.7.1-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/bin/generate-css.js +1 -2
- package/components/Badge.js +40 -3
- package/components/Body.js +16 -2
- package/components/BottomAppBar.js +25 -2
- package/components/Box.js +33 -3
- package/components/Button.js +146 -9
- package/components/Card.js +111 -3
- package/components/Checkbox.js +91 -3
- package/components/CheckboxIcon.js +92 -4
- package/components/Chip.js +38 -2
- package/components/Dialog.js +237 -3
- package/components/DialogActions.js +3 -2
- package/components/Divider.js +44 -3
- package/components/ExtendedFab.js +27 -2
- package/components/Fab.js +26 -2
- package/components/FilterChip.js +83 -2
- package/components/Headline.js +16 -2
- package/components/Icon.js +80 -4
- package/components/IconButton.js +153 -2
- package/components/Label.js +16 -2
- package/components/Layout.js +21 -3
- package/components/List.js +15 -2
- package/components/ListItem.js +229 -3
- package/components/ListOption.js +37 -3
- package/components/ListSelect.js +12 -2
- package/components/Menu.js +173 -3
- package/components/MenuItem.js +55 -2
- package/components/Nav.js +19 -2
- package/components/NavBar.js +37 -2
- package/components/NavBarItem.js +44 -2
- package/components/NavDrawer.js +34 -2
- package/components/NavDrawerItem.js +44 -2
- package/components/NavItem.js +183 -3
- package/components/NavRail.js +50 -2
- package/components/NavRailItem.js +25 -2
- package/components/Pane.js +263 -3
- package/components/Progress.js +469 -10
- package/components/Radio.js +97 -3
- package/components/RadioIcon.js +77 -5
- package/components/Ripple.js +76 -3
- package/components/SegmentedButton.js +97 -2
- package/components/SegmentedButtonGroup.js +15 -2
- package/components/Select.js +54 -2
- package/components/Shape.js +55 -18
- package/components/Slider.js +309 -3
- package/components/Snackbar.js +82 -2
- package/components/Surface.js +13 -4
- package/components/Switch.js +67 -4
- package/components/SwitchIcon.js +272 -5
- package/components/Tab.js +87 -3
- package/components/TabContent.js +21 -21
- package/components/TabList.js +131 -2
- package/components/TextArea.js +97 -3
- package/components/Title.js +16 -2
- package/components/Tooltip.js +42 -2
- package/components/TopAppBar.js +212 -3
- package/core/template.js +36 -9
- package/mixins/ControlMixin.js +65 -2
- package/mixins/DensityMixin.js +17 -3
- package/mixins/FlexableMixin.js +81 -3
- package/mixins/RippleMixin.js +15 -4
- package/mixins/ShapeMixin.js +279 -8
- package/mixins/StateMixin.js +87 -5
- package/mixins/SurfaceMixin.js +152 -3
- package/mixins/TextFieldMixin.js +661 -3
- package/mixins/ThemableMixin.js +206 -3
- package/mixins/TooltipTriggerMixin.js +30 -4
- package/mixins/TouchTargetMixin.js +29 -4
- package/package.json +2 -1
- package/theming/loader.js +0 -2
- package/components/Badge.css +0 -38
- package/components/Body.css +0 -14
- package/components/BottomAppBar.css +0 -23
- package/components/Box.css +0 -31
- package/components/Button.css +0 -147
- package/components/Card.css +0 -109
- package/components/Checkbox.css +0 -89
- package/components/CheckboxIcon.css +0 -90
- package/components/Chip.css +0 -35
- package/components/Dialog.css +0 -235
- package/components/Divider.css +0 -41
- package/components/ExtendedFab.css +0 -24
- package/components/Fab.css +0 -23
- package/components/FilterChip.css +0 -80
- package/components/Headline.css +0 -14
- package/components/Icon.css +0 -76
- package/components/IconButton.css +0 -150
- package/components/Label.css +0 -14
- package/components/Layout.css +0 -19
- package/components/List.css +0 -12
- package/components/ListItem.css +0 -224
- package/components/ListOption.css +0 -34
- package/components/ListSelect.css +0 -9
- package/components/Menu.css +0 -171
- package/components/MenuItem.css +0 -53
- package/components/Nav.css +0 -17
- package/components/NavBar.css +0 -34
- package/components/NavBarItem.css +0 -41
- package/components/NavDrawer.css +0 -31
- package/components/NavDrawerItem.css +0 -42
- package/components/NavItem.css +0 -181
- package/components/NavRail.css +0 -47
- package/components/NavRailItem.css +0 -25
- package/components/Outline.css +0 -138
- package/components/Pane.css +0 -261
- package/components/Progress.css +0 -75
- package/components/ProgressCircle.css +0 -226
- package/components/ProgressLine.css +0 -155
- package/components/Radio.css +0 -95
- package/components/RadioIcon.css +0 -73
- package/components/Ripple.css +0 -74
- package/components/SegmentedButton.css +0 -94
- package/components/SegmentedButtonGroup.css +0 -12
- package/components/Select.css +0 -52
- package/components/Shape.css +0 -132
- package/components/Slider.css +0 -307
- package/components/Snackbar.css +0 -80
- package/components/Surface.css +0 -10
- package/components/Switch.css +0 -64
- package/components/SwitchIcon.css +0 -178
- package/components/SwitchIconAnimations.css +0 -89
- package/components/Tab.css +0 -85
- package/components/TabList.css +0 -129
- package/components/TextArea.css +0 -93
- package/components/Title.css +0 -14
- package/components/Tooltip.css +0 -40
- package/components/TopAppBar.css +0 -209
- package/mixins/ControlMixin.css +0 -57
- package/mixins/DensityMixin.css +0 -40
- package/mixins/FlexableMixin.css +0 -79
- package/mixins/RippleMixin.css +0 -12
- package/mixins/ShapeMixin.css +0 -135
- package/mixins/StateMixin.css +0 -82
- package/mixins/SurfaceMixin.css +0 -150
- package/mixins/TextFieldMixin.css +0 -657
- package/mixins/ThemableMixin.css +0 -204
- package/mixins/TooltipTriggerMixin.css +0 -27
- package/mixins/TouchTargetMixin.css +0 -26
package/mixins/ThemableMixin.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import styles from './ThemableMixin.css' assert { type: 'css' };
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* @param {typeof import('../core/CustomElement.js').default} Base
|
|
5
3
|
*/
|
|
@@ -12,5 +10,210 @@ export default function ThemableMixin(Base) {
|
|
|
12
10
|
block: 'boolean',
|
|
13
11
|
typeStyle: 'string',
|
|
14
12
|
})
|
|
15
|
-
.css
|
|
13
|
+
.css`
|
|
14
|
+
:host([color="primary"]) {
|
|
15
|
+
--mdw-bg: var(--mdw-color__primary);
|
|
16
|
+
--mdw-ink: var(--mdw-color__on-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([color="primary-container"]) {
|
|
20
|
+
--mdw-bg: var(--mdw-color__primary-container);
|
|
21
|
+
--mdw-ink: var(--mdw-color__on-primary-container);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([color="secondary"]) {
|
|
25
|
+
--mdw-bg: var(--mdw-color__secondary);
|
|
26
|
+
--mdw-ink: var(--mdw-color__on-secondary);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([color="secondary-container"]) {
|
|
30
|
+
--mdw-bg: var(--mdw-color__secondary-container);
|
|
31
|
+
--mdw-ink: var(--mdw-color__on-secondary-container);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([color="tertiary"]) {
|
|
35
|
+
--mdw-bg: var(--mdw-color__tertiary);
|
|
36
|
+
--mdw-ink: var(--mdw-color__on-tertiary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([color="tertiary-container"]) {
|
|
40
|
+
--mdw-bg: var(--mdw-color__tertiary-container);
|
|
41
|
+
--mdw-ink: var(--mdw-color__on-tertiary-container);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([color="error"]) {
|
|
45
|
+
--mdw-bg: var(--mdw-color__error);
|
|
46
|
+
--mdw-ink: var(--mdw-color__on-error);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([color="error-container"]) {
|
|
50
|
+
--mdw-bg: var(--mdw-color__error-container);
|
|
51
|
+
--mdw-ink: var(--mdw-color__on-error-container);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([color="background"]) {
|
|
55
|
+
--mdw-bg: var(--mdw-color__background);
|
|
56
|
+
--mdw-ink: var(--mdw-color__on-background);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([color^="surface"]) {
|
|
60
|
+
--mdw-bg: var(--mdw-color__surface);
|
|
61
|
+
--mdw-ink: var(--mdw-color__on-surface);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Quality-of-life */
|
|
65
|
+
:host([color="surface-primary"]) {
|
|
66
|
+
--mdw-ink: var(--mdw-color__primary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([color$="variant"]) {
|
|
70
|
+
--mdw-bg: var(--mdw-color__surface-variant);
|
|
71
|
+
--mdw-ink: var(--mdw-color__on-surface-variant);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([color^="inverse"]) {
|
|
75
|
+
--mdw-bg: var(--mdw-color__inverse-surface);
|
|
76
|
+
--mdw-ink: var(--mdw-color__inverse-on-surface);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host([color="inverse-primary"]) {
|
|
80
|
+
--mdw-ink: var(--mdw-color__inverse-primary);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([color][disabled]) {
|
|
84
|
+
/* background-color: rgba(var(--mdw-color__on-surface), 0.12); */
|
|
85
|
+
/* color: rgba(var(--mdw-color__on-surface), 0.38); */
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host([ink="inverse-primary"]) {
|
|
89
|
+
--mdw-ink: var(--mdw-color__inverse-primary);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([ink="primary"]) {
|
|
93
|
+
--mdw-ink: var(--mdw-color__primary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([ink="on-primary-container"]) {
|
|
97
|
+
--mdw-ink: var(--mdw-color__on-primary-container);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:host([ink="secondary"]) {
|
|
101
|
+
--mdw-ink: var(--mdw-color__secondary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host([ink="on-secondary-container"]) {
|
|
105
|
+
--mdw-ink: var(--mdw-color__on-secondary-container);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([ink="tertiary"]) {
|
|
109
|
+
--mdw-ink: var(--mdw-color__tertiary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([ink="on-tertiary-container"]) {
|
|
113
|
+
--mdw-ink: var(--mdw-color__on-tertiary-container);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([ink="error"]) {
|
|
117
|
+
--mdw-ink: var(--mdw-color__error);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host([ink="outline"]) {
|
|
121
|
+
--mdw-ink: var(--mdw-color__outline);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host([ink="on-surface"]) {
|
|
125
|
+
--mdw-ink: var(--mdw-color__on-surface);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host([ink="surface-variant"]) {
|
|
129
|
+
--mdw-ink: var(--mdw-color__surface-variant);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host([ink="on-surface-variant"]) {
|
|
133
|
+
--mdw-ink: var(--mdw-color__on-surface-variant);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host([ink="inverse-on-surface"]) {
|
|
137
|
+
--mdw-ink: var(--mdw-color__inverse-on-surface);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host([ink="inherit"]) {
|
|
141
|
+
--mdw-ink: inherit;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host([type-style|="display"]) {
|
|
145
|
+
--mdw-type__font: var(--mdw-typescale__display-large__font);
|
|
146
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__display-large__letter-spacing);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:host([type-style="display-medium"]) {
|
|
150
|
+
--mdw-type__font: var(--mdw-typescale__display-medium__font);
|
|
151
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__display-medium__letter-spacing);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:host([type-style="display-small"]) {
|
|
155
|
+
--mdw-type__font: var(--mdw-typescale__display-small__font);
|
|
156
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__display-small__letter-spacing);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host([type-style|="headline"]) {
|
|
160
|
+
--mdw-type__font: var(--mdw-typescale__headline-large__font);
|
|
161
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__headline-large__letter-spacing);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([type-style="headline-medium"]) {
|
|
165
|
+
--mdw-type__font: var(--mdw-typescale__headline-medium__font);
|
|
166
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__headline-medium__letter-spacing);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host([type-style="headline-small"]) {
|
|
170
|
+
--mdw-type__font: var(--mdw-typescale__headline-small__font);
|
|
171
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__headline-small__letter-spacing);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([type-style|="title"]) {
|
|
175
|
+
--mdw-type__font: var(--mdw-typescale__title-large__font);
|
|
176
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__title-large__letter-spacing);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host([type-style="title-medium"]) {
|
|
180
|
+
--mdw-type__font: var(--mdw-typescale__title-medium__font);
|
|
181
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__title-medium__letter-spacing);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host([type-style="title-small"]) {
|
|
185
|
+
--mdw-type__font: var(--mdw-typescale__title-small__font);
|
|
186
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__title-small__letter-spacing);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host([type-style|="label"]) {
|
|
190
|
+
--mdw-type__font: var(--mdw-typescale__label-large__font);
|
|
191
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__label-large__letter-spacing);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host([type-style="label-medium"]) {
|
|
195
|
+
--mdw-type__font: var(--mdw-typescale__label-medium__font);
|
|
196
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__label-medium__letter-spacing);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:host([type-style="label-small"]) {
|
|
200
|
+
--mdw-type__font: var(--mdw-typescale__label-small__font);
|
|
201
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__label-small__letter-spacing);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host([type-style|="body"]) {
|
|
205
|
+
--mdw-type__font: var(--mdw-typescale__body-large__font);
|
|
206
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__body-large__letter-spacing);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:host([type-style="body-medium"]) {
|
|
210
|
+
--mdw-type__font: var(--mdw-typescale__body-medium__font);
|
|
211
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__body-medium__letter-spacing);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host([type-style="body-small"]) {
|
|
215
|
+
--mdw-type__font: var(--mdw-typescale__body-small__font);
|
|
216
|
+
--mdw-type__letter-spacing: var(--mdw-typescale__body-small__letter-spacing);
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
16
219
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import Tooltip from '../components/Tooltip.js';
|
|
2
2
|
import { canAnchorPopup } from '../utils/popup.js';
|
|
3
3
|
|
|
4
|
-
import styles from './TooltipTriggerMixin.css' assert { type: 'css' };
|
|
5
|
-
|
|
6
4
|
/**
|
|
7
5
|
* @param {ReturnType<import('./StateMixin.js').default>} Base
|
|
8
6
|
*/
|
|
9
7
|
export default function TooltipTriggerMixin(Base) {
|
|
10
8
|
class TooltipTrigger extends Base {
|
|
11
9
|
static {
|
|
12
|
-
this.css(styles);
|
|
13
|
-
|
|
14
10
|
this.on({
|
|
15
11
|
composed({ template, html }) {
|
|
16
12
|
template.append(html`
|
|
@@ -21,6 +17,36 @@ export default function TooltipTriggerMixin(Base) {
|
|
|
21
17
|
`);
|
|
22
18
|
},
|
|
23
19
|
});
|
|
20
|
+
// eslint-disable-next-line no-unused-expressions
|
|
21
|
+
this.css`
|
|
22
|
+
#tooltip {
|
|
23
|
+
position:absolute;
|
|
24
|
+
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
box-sizing: content-box;
|
|
28
|
+
|
|
29
|
+
block-size: 0;
|
|
30
|
+
inline-size: 0;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
|
|
34
|
+
transform: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#tooltip[open] {
|
|
38
|
+
display: block;
|
|
39
|
+
|
|
40
|
+
block-size: auto;
|
|
41
|
+
inline-size: auto;
|
|
42
|
+
|
|
43
|
+
cursor: default;
|
|
44
|
+
pointer-events:auto;
|
|
45
|
+
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transform: none;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
24
50
|
}
|
|
25
51
|
|
|
26
52
|
static TOOLTIP_MOUSE_IDLE_MS = 500;
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
-
import styles from './TouchTargetMixin.css' assert { type: 'css' };
|
|
2
|
-
|
|
3
1
|
/** @param {typeof import('../core/CustomElement.js').default} Base */
|
|
4
2
|
export default function TouchTargetMixin(Base) {
|
|
5
3
|
return Base
|
|
6
4
|
.extend()
|
|
7
|
-
.
|
|
8
|
-
.
|
|
5
|
+
.html/* html */`<div id=touch-target class=touch-target></div>`
|
|
6
|
+
.css`
|
|
7
|
+
.touch-target {
|
|
8
|
+
position: absolute;
|
|
9
|
+
inset: 50%;
|
|
10
|
+
/* --mdw-device-pixel-ratio: 1; */
|
|
11
|
+
|
|
12
|
+
block-size: 100%;
|
|
13
|
+
min-block-size: 48px;
|
|
14
|
+
/* min-block-size: 10mm; */
|
|
15
|
+
/* min-block-size: calc(0.393701in / var(--mdw-device-pixel-ratio, 1)); */
|
|
16
|
+
inline-size:100%;
|
|
17
|
+
min-inline-size: 48px;
|
|
18
|
+
/* min-inline-size: 10mm; */
|
|
19
|
+
/* min-inline-size: calc(0.393701in / var(--mdw-device-pixel-ratio, 1)); */
|
|
20
|
+
|
|
21
|
+
cursor: inherit;
|
|
22
|
+
|
|
23
|
+
/* box-sizing: border-box; */
|
|
24
|
+
/* border: solid 1px magenta; */
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
|
|
27
|
+
transform: translateX(-50%) translateY(-50%);
|
|
28
|
+
visibility: visible;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
|
|
31
|
+
border-radius: inherit;
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
9
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shortfuse/materialdesignweb",
|
|
3
|
-
"version": "0.7.1-
|
|
3
|
+
"version": "0.7.1-2",
|
|
4
4
|
"description": "Material Design for Web",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"c8": "^7.12.0",
|
|
62
62
|
"element-internals-polyfill": "^1.1.11",
|
|
63
63
|
"esbuild": "^0.17.12",
|
|
64
|
+
"esbuild-minify-templates": "^0.10.0",
|
|
64
65
|
"eslint": "^8.24.0",
|
|
65
66
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
66
67
|
"eslint-plugin-compat": "^4.0.2",
|
package/theming/loader.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css } from '../core/template.js';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
generateLayoutGlobalCSS,
|
|
5
4
|
generateThemeCSS,
|
|
6
5
|
generateTypographyGlobalCSS,
|
|
7
6
|
themeOptionsFromSearchParams,
|
|
@@ -10,7 +9,6 @@ import {
|
|
|
10
9
|
const rules = [
|
|
11
10
|
generateThemeCSS(themeOptionsFromSearchParams(new URL(import.meta.url).searchParams)),
|
|
12
11
|
generateTypographyGlobalCSS(),
|
|
13
|
-
generateLayoutGlobalCSS(),
|
|
14
12
|
].join('\n');
|
|
15
13
|
|
|
16
14
|
const parsed = css`${rules}`;
|
package/components/Badge.css
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
--mdw-shape__size: 8px;
|
|
3
|
-
--mdw-ink: var(--mdw-color__on-error);
|
|
4
|
-
--mdw-shape__bg: rgb(var(--mdw-color__error));
|
|
5
|
-
--mdw-type__font: var(--mdw-typescale__label-small__font);
|
|
6
|
-
--mdw-type__letter-spacing: var(--mdw-typescale__label-small__letter-spacing);
|
|
7
|
-
position: relative;
|
|
8
|
-
|
|
9
|
-
display: inline-block;
|
|
10
|
-
vertical-align: middle;
|
|
11
|
-
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
min-block-size: var(--mdw-typescale__label-small__line-height);
|
|
14
|
-
min-inline-size: var(--mdw-typescale__label-small__line-height);
|
|
15
|
-
padding-inline: max(4px, calc(4px + (var(--mdw-density) * 2px)));
|
|
16
|
-
|
|
17
|
-
color: rgb(var(--mdw-ink));
|
|
18
|
-
|
|
19
|
-
font: var(--mdw-type__font);
|
|
20
|
-
letter-spacing: var(--mdw-type__letter-spacing);
|
|
21
|
-
text-align: center;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@supports (width: 1lh) {
|
|
25
|
-
:host {
|
|
26
|
-
min-block-size: 1lh; /* Clamps to 1:1 */
|
|
27
|
-
min-inline-size: 1lh; /* Clamps to 1:1 */
|
|
28
|
-
padding-inline: max(0.25lh, calc(0.25lh + (var(--mdw-density) * 2px)));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host(:empty) {
|
|
33
|
-
vertical-align: middle;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host(:empty) #shape {
|
|
37
|
-
inset: 5px;
|
|
38
|
-
}
|
package/components/Body.css
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
font: var(--mdw-typescale__body-large__font);
|
|
3
|
-
letter-spacing: var(--mdw-typescale__body-large__letter-spacing);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:host([size="medium"]) {
|
|
7
|
-
font: var(--mdw-typescale__body-medium__font);
|
|
8
|
-
letter-spacing: var(--mdw-typescale__body-medium__letter-spacing);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([size="small"]) {
|
|
12
|
-
font: var(--mdw-typescale__body-small__font);
|
|
13
|
-
letter-spacing: var(--mdw-typescale__body-small__letter-spacing);
|
|
14
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* https://m3.material.io/components/bottom-app-bar/specs */
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--mdw-surface__tint: var(--mdw-surface__tint__2);
|
|
5
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint__2);
|
|
6
|
-
--mdw-bg: var(--mdw-color__surface);
|
|
7
|
-
--mdw-ink: var(--mdw-color__on-surface);
|
|
8
|
-
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
gap: 8px;
|
|
12
|
-
justify-content: flex-start;
|
|
13
|
-
|
|
14
|
-
box-sizing: content-box;
|
|
15
|
-
/* Don't apply density */
|
|
16
|
-
block-size: 56px;
|
|
17
|
-
padding-block: 12px;
|
|
18
|
-
padding-inline: 8px 16px;
|
|
19
|
-
|
|
20
|
-
box-shadow: none;
|
|
21
|
-
|
|
22
|
-
direction: ltr;
|
|
23
|
-
}
|
package/components/Box.css
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:host([inline]) {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host([flex]:where([inline])) {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([color]) {
|
|
14
|
-
background-color: rgb(var(--mdw-bg));
|
|
15
|
-
color: rgb(var(--mdw-ink));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([ink]) {
|
|
19
|
-
color: rgb(var(--mdw-ink));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([type-style]) {
|
|
23
|
-
font: var(--mdw-type__font);
|
|
24
|
-
letter-spacing: var(--mdw-type__letter-spacing);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
#slot {
|
|
28
|
-
/* Passthrough from parent */
|
|
29
|
-
block-size: inherit;
|
|
30
|
-
inline-size: inherit;
|
|
31
|
-
}
|
package/components/Button.css
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/* https://m3.material.io/components/buttons/specs */
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--mdw-shape__size: var(--mdw-shape__full);
|
|
5
|
-
--mdw-ink: var(--mdw-color__primary);
|
|
6
|
-
|
|
7
|
-
--mdw-type__font: var(--mdw-typescale__label-large__font);
|
|
8
|
-
--mdw-type__letter-spacing: var(--mdw-typescale__label-large__letter-spacing);
|
|
9
|
-
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
|
|
12
|
-
align-items: center;
|
|
13
|
-
gap: 0;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
vertical-align: middle;
|
|
16
|
-
|
|
17
|
-
/* box-sizing: border-box; */
|
|
18
|
-
min-block-size: 24px;
|
|
19
|
-
min-inline-size: 24px;
|
|
20
|
-
|
|
21
|
-
padding-block: calc(8px + (var(--mdw-density) * 2px));
|
|
22
|
-
padding-inline: calc(12px + (var(--mdw-density) * 2px));
|
|
23
|
-
|
|
24
|
-
-webkit-tap-highlight-color: transparent;
|
|
25
|
-
-webkit-user-select: none;
|
|
26
|
-
user-select: none;
|
|
27
|
-
|
|
28
|
-
color: rgb(var(--mdw-ink));
|
|
29
|
-
|
|
30
|
-
font: var(--mdw-type__font);
|
|
31
|
-
letter-spacing: var(--mdw-type__letter-spacing);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host(:where([elevated],[filled])) {
|
|
35
|
-
will-change: filter;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Elevated Color Defaults */
|
|
39
|
-
:host(:where([elevated])) {
|
|
40
|
-
--mdw-bg: var(--mdw-color__surface);
|
|
41
|
-
--mdw-ink: var(--mdw-color__primary);
|
|
42
|
-
--mdw-surface__shadow__resting: var(--mdw-surface__shadow__1);
|
|
43
|
-
--mdw-surface__shadow__raised: var(--mdw-surface__shadow__2);
|
|
44
|
-
--mdw-surface__tint: var(--mdw-surface__tint__1);
|
|
45
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint__2);
|
|
46
|
-
}
|
|
47
|
-
/** Filled Color Defaults */
|
|
48
|
-
:host(:where([filled])) {
|
|
49
|
-
--mdw-bg: var(--mdw-color__primary);
|
|
50
|
-
--mdw-ink: var(--mdw-color__on-primary);
|
|
51
|
-
--mdw-surface__shadow__resting: var(--mdw-surface__shadow__0);
|
|
52
|
-
--mdw-surface__shadow__raised: var(--mdw-surface__shadow__1);
|
|
53
|
-
--mdw-surface__tint: 0;
|
|
54
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint__1);
|
|
55
|
-
}
|
|
56
|
-
/** Filled Tonal Color Defaults */
|
|
57
|
-
:host(:where([filled="tonal"])) {
|
|
58
|
-
--mdw-bg: var(--mdw-color__secondary-container);
|
|
59
|
-
--mdw-ink: var(--mdw-color__on-secondary-container);
|
|
60
|
-
}
|
|
61
|
-
/** Outlined Color Defaults */
|
|
62
|
-
:host(:where([outlined])) {
|
|
63
|
-
--mdw-ink: var(--mdw-color__primary);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host(:where([icon])) {
|
|
67
|
-
gap: 8px;
|
|
68
|
-
|
|
69
|
-
padding-inline: calc(12px + (var(--mdw-density) * 2px)) calc(16px + (var(--mdw-density) * 2px));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:host(:where([outlined], [elevated], [filled])) {
|
|
73
|
-
padding-inline: calc(24px + (var(--mdw-density) * 2px));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host(:where([icon]):where([outlined], [elevated], [filled])) {
|
|
77
|
-
gap: 8px;
|
|
78
|
-
|
|
79
|
-
padding-inline: calc(16px + (var(--mdw-density) * 2px)) calc(24px + (var(--mdw-density) * 2px));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
#shape:where([elevated],[filled],[color]) {
|
|
83
|
-
background-color: rgb(var(--mdw-bg));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
#slot {
|
|
87
|
-
text-align: center;
|
|
88
|
-
text-decoration: none;
|
|
89
|
-
white-space: nowrap;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
#control {
|
|
93
|
-
cursor: inherit;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host([disabled]) {
|
|
97
|
-
/* cursor: not-allowed; */
|
|
98
|
-
|
|
99
|
-
color: rgba(var(--mdw-color__on-surface), 0.38);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
#shape[disabled]:is([elevated], [filled]) {
|
|
103
|
-
background-color: rgba(var(--mdw-color__on-surface), 0.12);
|
|
104
|
-
color: rgba(var(--mdw-color__on-surface), 0.38);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
#slot[disabled] {
|
|
108
|
-
color: rgba(var(--mdw-color__on-surface), 0.38);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
#icon {
|
|
112
|
-
font-size: calc(18/14 * 1em);
|
|
113
|
-
font-variation-settings: 'FILL' 1;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
#icon[outlined] {
|
|
117
|
-
font-variation-settings: 'FILL' 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
#icon[disabled] {
|
|
121
|
-
opacity: 0.38;
|
|
122
|
-
|
|
123
|
-
color: rgba(var(--mdw-color__on-surface));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
#label {
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
#label[disabled] {
|
|
131
|
-
cursor: not-allowed;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/*
|
|
135
|
-
@media screen and (max-resolution: 0.75dppx) { #touch-target { --mdw-device-pixel-ratio: 0.75; } }
|
|
136
|
-
@media screen and (max-resolution: 0.85dppx) { #touch-target { --mdw-device-pixel-ratio: 0.90; } }
|
|
137
|
-
@media screen and (max-resolution: 0.90dppx) { #touch-target { --mdw-device-pixel-ratio: 0.90; } }
|
|
138
|
-
@media screen and (min-resolution: 1.5dppx) { #touch-target { --mdw-device-pixel-ratio: 1.5; } }
|
|
139
|
-
@media screen and (min-resolution: 1.75dppx) { #touch-target { --mdw-device-pixel-ratio: 1.75; } }
|
|
140
|
-
@media screen and (min-resolution: 2dppx) { #touch-target { --mdw-device-pixel-ratio: 2; } }
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
@media (any-pointer: coarse) {
|
|
144
|
-
#touch-target {
|
|
145
|
-
visibility: visible;
|
|
146
|
-
}
|
|
147
|
-
}
|
package/components/Card.css
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/* https://m3.material.io/components/cards/specs */
|
|
2
|
-
|
|
3
|
-
:host {
|
|
4
|
-
--mdw-shape__size: 12px;
|
|
5
|
-
--mdw-surface__tint: var(--mdw-surface__tint__0);
|
|
6
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint);
|
|
7
|
-
|
|
8
|
-
--mdw-surface__shadow__resting: none;
|
|
9
|
-
--mdw-surface__shadow__raised: var(--mdw-surface__shadow__resting);
|
|
10
|
-
/* padding-inline: 12px; */
|
|
11
|
-
|
|
12
|
-
--mdw-bg: var(--mdw-color__surface);
|
|
13
|
-
--mdw-ink: var(--mdw-color__on-surface);
|
|
14
|
-
position: relative;
|
|
15
|
-
|
|
16
|
-
display: block;
|
|
17
|
-
|
|
18
|
-
color: rgb(var(--mdw-ink));
|
|
19
|
-
|
|
20
|
-
font: var(--mdw-type__font);
|
|
21
|
-
letter-spacing: var(--mdw-type__letter-spacing);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
#shape:is([elevated],[filled]) {
|
|
25
|
-
background-color: rgb(var(--mdw-bg));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host(:where([filled])) {
|
|
29
|
-
--mdw-bg: var(--mdw-color__surface-variant);
|
|
30
|
-
--mdw-ink: var(--mdw-color__on-surface-variant);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:host(:where([elevated])) {
|
|
34
|
-
--mdw-bg: var(--mdw-color__surface);
|
|
35
|
-
--mdw-ink: var(--mdw-color__on-surface);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([filled]) {
|
|
39
|
-
--mdw-surface__tint: var(--mdw-surface__tint__0);
|
|
40
|
-
--mdw-surface__shadow__resting: var(--mdw-surface__shadow__0);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:host([filled][actionable]) {
|
|
44
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint__1);
|
|
45
|
-
--mdw-surface__shadow__raised: var(--mdw-surface__shadow__1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([elevated]) {
|
|
49
|
-
--mdw-surface__tint: var(--mdw-surface__tint__1);
|
|
50
|
-
--mdw-surface__shadow__resting: var(--mdw-surface__shadow__1);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
:host([elevated][actionable]) {
|
|
54
|
-
--mdw-surface__tint__raised: var(--mdw-surface__tint__2);
|
|
55
|
-
--mdw-surface__shadow__raised: var(--mdw-surface__shadow__2);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
#shape[disabled] {
|
|
59
|
-
|
|
60
|
-
/* Works on images */
|
|
61
|
-
filter: grayscale();
|
|
62
|
-
|
|
63
|
-
color: rgb(var(--mdw-color__on-surface));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([disabled]) {
|
|
67
|
-
cursor: not-allowed;
|
|
68
|
-
|
|
69
|
-
filter: grayscale();
|
|
70
|
-
opacity: 0.38;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#slot[disabled] {
|
|
74
|
-
color: rgb(var(--mdw-color__on-surface));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#outline[disabled] {
|
|
78
|
-
color: rgba(var(--mdw-color__on-surface), calc(0.12/0.38));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** Firefox and Safari do not support [inert] */
|
|
82
|
-
|
|
83
|
-
#inert-blocker {
|
|
84
|
-
position: absolute;
|
|
85
|
-
inset: 0;
|
|
86
|
-
|
|
87
|
-
cursor: not-allowed;
|
|
88
|
-
pointer-events: auto;
|
|
89
|
-
|
|
90
|
-
z-index: 99;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
#shape[disabled][elevated] {
|
|
94
|
-
background-color: rgba(var(--mdw-color__surface-variant));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
#action {
|
|
98
|
-
--mdw-ink: inherit;
|
|
99
|
-
--mdw-shape__size: inherit;
|
|
100
|
-
|
|
101
|
-
position: absolute;
|
|
102
|
-
inset: 0;
|
|
103
|
-
|
|
104
|
-
padding: 0;
|
|
105
|
-
|
|
106
|
-
z-index: 0;
|
|
107
|
-
|
|
108
|
-
color: inherit
|
|
109
|
-
}
|