material-inspired-component-library 4.0.2 → 5.0.1
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 +14 -0
- package/components/alert/index.scss +4 -4
- package/components/appbar/index.scss +3 -2
- package/components/badge/index.scss +2 -2
- package/components/bottomsheet/index.scss +6 -5
- package/components/button/index.scss +21 -20
- package/components/card/index.scss +10 -9
- package/components/checkbox/index.scss +11 -11
- package/components/datepicker/index.scss +435 -0
- package/components/datepicker/index.ts +600 -0
- package/components/dialog/README.md +14 -12
- package/components/dialog/index.scss +79 -62
- package/components/divider/index.scss +2 -0
- package/components/iconbutton/index.scss +18 -17
- package/components/list/index.scss +10 -10
- package/components/menu/index.scss +2 -1
- package/components/navigationrail/index.scss +10 -9
- package/components/radio/README.md +0 -1
- package/components/radio/index.scss +11 -11
- package/components/select/index.scss +2 -1
- package/components/sidesheet/index.scss +3 -1
- package/components/slider/index.scss +7 -7
- package/components/stepper/index.scss +5 -4
- package/components/switch/README.md +0 -1
- package/components/switch/index.scss +21 -21
- package/components/textfield/index.scss +6 -5
- package/components/textfield/index.ts +7 -6
- package/components/timepicker/README.md +135 -0
- package/components/timepicker/index.scss +245 -122
- package/components/timepicker/index.ts +348 -45
- package/dist/alert.css +1 -1
- package/dist/appbar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/bottomsheet.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/datepicker/index.d.ts +6 -0
- package/dist/datepicker.css +1 -0
- package/dist/datepicker.js +1 -0
- package/dist/dialog.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/foundations.css +1 -0
- package/dist/foundations.js +1 -0
- package/dist/iconbutton.css +1 -1
- package/dist/layout.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/scrollbar.css +1 -0
- package/dist/scrollbar.js +1 -0
- package/dist/select.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/stepper.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/textfield.css +1 -1
- package/dist/timepicker.css +1 -1
- package/docs/accordion.html +3 -1
- package/docs/alert.html +3 -1
- package/docs/bottomsheet.html +4 -2
- package/docs/button.html +3 -1
- package/docs/card.html +3 -1
- package/docs/checkbox.html +3 -1
- package/docs/datepicker.html +151 -0
- package/docs/dialog.html +33 -19
- package/docs/divider.html +3 -1
- package/docs/docs.js +43 -0
- package/docs/iconbutton.html +1 -1
- package/docs/index.html +34 -8
- package/docs/list.html +3 -1
- package/docs/menu.html +3 -1
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/navigationrail.html +3 -1
- package/docs/radio.html +3 -1
- package/docs/select.html +3 -1
- package/docs/sidesheet.html +3 -1
- package/docs/slider.html +1 -1
- package/docs/stepper.html +3 -1
- package/docs/switch.html +3 -1
- package/docs/textfield.html +3 -1
- package/docs/timepicker.html +66 -27
- package/foundations/index.scss +102 -0
- package/foundations/layout/index.scss +0 -52
- package/foundations/scrollbar/index.scss +46 -0
- package/intl.d.ts +9 -0
- package/micl.ts +18 -8
- package/package.json +17 -15
- package/styles/README.md +17 -8
- package/styles/motion.scss +3 -0
- package/styles/shapes.scss +23 -18
- package/styles/statelayer.scss +4 -0
- package/styles/typography.scss +2 -2
- package/styles.scss +3 -26
- package/tsconfig.json +2 -2
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
+
@use '../../foundations';
|
|
22
23
|
@use '../../styles/motion';
|
|
23
24
|
@use '../../styles/shapes';
|
|
24
25
|
@use '../../styles/statelayer';
|
|
@@ -27,6 +28,8 @@
|
|
|
27
28
|
:root {
|
|
28
29
|
--md-sys-timepicker-input-height: 72px;
|
|
29
30
|
--md-sys-timepicker-input-width: 96px;
|
|
31
|
+
--md-sys-timepicker-input-width-24h: 114px;
|
|
32
|
+
--md-sys-timepicker-separator-width: 24px;
|
|
30
33
|
--md-sys-timepicker-period-height: 72px;
|
|
31
34
|
--md-sys-timepicker-period-width: 52px;
|
|
32
35
|
--md-sys-timepicker-dial-size: 256px;
|
|
@@ -35,222 +38,342 @@
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
dialog.micl-dialog.micl-timepicker {
|
|
38
|
-
|
|
39
|
-
@include typography.label-medium;
|
|
41
|
+
--md-sys-timepicker-motion-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
.micl-dialog__headline {
|
|
44
|
+
padding-block-end: 20px;
|
|
45
|
+
|
|
46
|
+
h2 {
|
|
47
|
+
@include typography.label-medium;
|
|
48
|
+
|
|
49
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
50
|
+
}
|
|
42
51
|
}
|
|
43
52
|
.micl-dialog__content {
|
|
44
53
|
display: grid;
|
|
45
|
-
|
|
54
|
+
padding-block-start: 1px;
|
|
55
|
+
grid-template-areas:
|
|
56
|
+
"timepicker-hour timepicker-separator timepicker-minute timepicker-period"
|
|
57
|
+
"timepicker-hour-supporting timepicker-hour-supporting timepicker-minute-supporting timepicker-minute-supporting"
|
|
58
|
+
"timepicker-dial timepicker-dial timepicker-dial timepicker-dial";
|
|
59
|
+
grid-template-columns: auto var(--md-sys-timepicker-separator-width) var(--md-sys-timepicker-input-width) auto;
|
|
46
60
|
}
|
|
47
|
-
|
|
61
|
+
.micl-dialog__actions {
|
|
62
|
+
&:has(.micl-timepicker__inputmode) {
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
}
|
|
48
65
|
|
|
49
|
-
.micl-
|
|
50
|
-
|
|
66
|
+
.micl-timepicker__inputmode {
|
|
67
|
+
margin-inline-start: -8px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
&:has(.micl-timepicker__dial:not(.micl-hidden)) {
|
|
72
|
+
--md-sys-timepicker-input-height: 80px;
|
|
73
|
+
--md-sys-timepicker-period-height: 80px;
|
|
53
74
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
padding: 0;
|
|
57
|
-
border: none;
|
|
58
|
-
outline: none;
|
|
59
|
-
background-color: transparent;
|
|
60
|
-
color: var(--md-sys-color-on-surface);
|
|
61
|
-
-webkit-tap-highlight-color: transparent;
|
|
75
|
+
&.micl-timepicker--horizontal {
|
|
76
|
+
--md-sys-timepicker-period-height: 38px;
|
|
62
77
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
.micl-dialog__headline {
|
|
79
|
+
padding-block-end: 0;
|
|
80
|
+
}
|
|
81
|
+
.micl-dialog__content {
|
|
82
|
+
grid-template-areas:
|
|
83
|
+
"timepicker-dummy timepicker-dummy timepicker-dummy timepicker-dial"
|
|
84
|
+
"timepicker-hour timepicker-separator timepicker-minute timepicker-dial"
|
|
85
|
+
"timepicker-period timepicker-period timepicker-period timepicker-dial";
|
|
86
|
+
grid-template-rows: 72px var(--md-sys-timepicker-input-height) auto;
|
|
87
|
+
|
|
88
|
+
.micl-timepicker__period {
|
|
89
|
+
--md-sys-timepicker-ampm-height: var(--md-sys-timepicker-period-height);
|
|
90
|
+
--md-sys-timepicker-period-width: calc(2 * var(--md-sys-timepicker-input-width) + var(--md-sys-timepicker-separator-width));
|
|
91
|
+
|
|
92
|
+
display: flex;
|
|
93
|
+
align-self: flex-start;
|
|
94
|
+
margin-inline: 0;
|
|
95
|
+
margin-block: 16px 0;
|
|
96
|
+
|
|
97
|
+
.micl-timepicker__am {
|
|
98
|
+
border-start-end-radius: 0;
|
|
99
|
+
border-end-start-radius: var(--md-sys-shape-corner-small);
|
|
100
|
+
}
|
|
101
|
+
.micl-timepicker__pm {
|
|
102
|
+
border-block-start-width: 1px;
|
|
103
|
+
border-inline-start-width: 0px;
|
|
104
|
+
border-start-end-radius: var(--md-sys-shape-corner-small);
|
|
105
|
+
border-end-start-radius: 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
.micl-timepicker__dial {
|
|
109
|
+
margin-block: 0;
|
|
110
|
+
margin-inline: 40px 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
.micl-timepicker__supporting-text-hour,
|
|
115
|
+
.micl-timepicker__supporting-text-minute {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
71
118
|
}
|
|
72
|
-
|
|
73
|
-
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.micl-timepicker {
|
|
122
|
+
input[name=hour],
|
|
123
|
+
input[name=minute] {
|
|
74
124
|
--statelayer-color: var(--md-sys-color-on-surface);
|
|
75
125
|
|
|
76
|
-
display
|
|
77
|
-
|
|
78
|
-
|
|
126
|
+
@include typography.display-medium;
|
|
127
|
+
|
|
128
|
+
box-sizing: border-box;
|
|
79
129
|
inline-size: var(--md-sys-timepicker-input-width);
|
|
80
130
|
block-size: var(--md-sys-timepicker-input-height);
|
|
131
|
+
margin: 0;
|
|
81
132
|
padding: 0;
|
|
133
|
+
border: none;
|
|
134
|
+
outline: none;
|
|
82
135
|
border-radius: var(--md-sys-shape-corner-small);
|
|
83
136
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
84
137
|
background-image: linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
85
138
|
background-repeat: no-repeat;
|
|
86
139
|
background-size: 100%;
|
|
87
|
-
|
|
140
|
+
color: var(--md-sys-color-on-surface);
|
|
141
|
+
text-align: center;
|
|
142
|
+
user-select: none;
|
|
143
|
+
-webkit-tap-highlight-color: transparent;
|
|
144
|
+
-moz-appearance: textfield;
|
|
88
145
|
transition: --statelayer-opacity var(--md-sys-timepicker-motion-duration) linear;
|
|
89
146
|
|
|
147
|
+
&::-webkit-inner-spin-button,
|
|
148
|
+
&::-webkit-outer-spin-button {
|
|
149
|
+
-webkit-appearance: none;
|
|
150
|
+
}
|
|
151
|
+
&::selection {
|
|
152
|
+
background-color: transparent;
|
|
153
|
+
}
|
|
154
|
+
&.micl-timepicker--selected {
|
|
155
|
+
--statelayer-color: var(--md-sys-color-on-primary-container);
|
|
156
|
+
|
|
157
|
+
background-color: var(--md-sys-color-primary-container);
|
|
158
|
+
color: var(--md-sys-color-on-primary-container);
|
|
159
|
+
border: 2px solid var(--md-sys-color-primary);
|
|
160
|
+
}
|
|
90
161
|
&:hover {
|
|
91
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
162
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
163
|
+
}
|
|
164
|
+
&:focus-visible {
|
|
165
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
166
|
+
}
|
|
167
|
+
&:active {
|
|
168
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
92
169
|
}
|
|
93
170
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
171
|
+
input[name=hour] {
|
|
172
|
+
grid-area: timepicker-hour;
|
|
173
|
+
justify-self: flex-end;
|
|
174
|
+
}
|
|
175
|
+
input[name=minute] {
|
|
176
|
+
grid-area: timepicker-minute;
|
|
177
|
+
}
|
|
178
|
+
&:has(.micl-timepicker__dial:not(.micl-hidden)) {
|
|
179
|
+
input[name=hour],
|
|
180
|
+
input[name=minute] {
|
|
181
|
+
@include typography.display-large;
|
|
182
|
+
|
|
183
|
+
border: none;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
}
|
|
101
186
|
}
|
|
102
|
-
|
|
103
|
-
|
|
187
|
+
&:not(:has(.micl-timepicker__am)):not(:has(.micl-timepicker__dial:not(.micl-hidden))) {
|
|
188
|
+
--md-sys-timepicker-input-width: var(--md-sys-timepicker-input-width-24h);
|
|
104
189
|
}
|
|
105
|
-
|
|
190
|
+
}
|
|
191
|
+
.micl-timepicker__separator {
|
|
192
|
+
@include typography.display-large;
|
|
193
|
+
|
|
194
|
+
grid-area: timepicker-separator;
|
|
195
|
+
block-size: var(--md-sys-timepicker-input-height);
|
|
196
|
+
line-height: var(--md-sys-timepicker-input-height);
|
|
197
|
+
inline-size: var(--md-sys-timepicker-separator-width);
|
|
198
|
+
text-align: center;
|
|
199
|
+
color: var(--md-sys-color-on-surface);
|
|
200
|
+
}
|
|
201
|
+
.micl-timepicker__period {
|
|
202
|
+
--md-sys-timepicker-ampm-height: calc(var(--md-sys-timepicker-period-height) / 2);
|
|
203
|
+
|
|
204
|
+
grid-area: timepicker-period;
|
|
205
|
+
block-size: var(--md-sys-timepicker-period-height);
|
|
206
|
+
inline-size: 0;
|
|
207
|
+
|
|
208
|
+
&:has(.micl-timepicker__am) {
|
|
209
|
+
inline-size: var(--md-sys-timepicker-period-width);
|
|
210
|
+
margin-inline: 12px 0;
|
|
211
|
+
}
|
|
212
|
+
.micl-timepicker__am,
|
|
213
|
+
.micl-timepicker__pm {
|
|
106
214
|
--statelayer-color: var(--md-sys-color-on-surface-variant);
|
|
107
215
|
|
|
216
|
+
@include typography.title-medium;
|
|
217
|
+
|
|
218
|
+
appearance: none;
|
|
108
219
|
box-sizing: border-box;
|
|
109
|
-
|
|
220
|
+
position: relative;
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
110
223
|
inline-size: var(--md-sys-timepicker-period-width);
|
|
111
|
-
|
|
224
|
+
block-size: var(--md-sys-timepicker-ampm-height);
|
|
225
|
+
min-block-size: var(--md-sys-timepicker-ampm-height);
|
|
112
226
|
margin: 0;
|
|
113
|
-
border
|
|
227
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
228
|
+
outline: none;
|
|
229
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
114
230
|
background-color: transparent;
|
|
115
|
-
color: transparent;
|
|
116
231
|
background-image: linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
117
232
|
background-repeat: no-repeat;
|
|
118
233
|
background-size: 100%;
|
|
119
|
-
z-index: 1;
|
|
120
234
|
cursor: pointer;
|
|
235
|
+
-webkit-tap-highlight-color: transparent;
|
|
121
236
|
transition: --statelayer-opacity var(--md-sys-timepicker-motion-duration) linear;
|
|
122
237
|
|
|
123
|
-
|
|
124
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
&::-webkit-datetime-edit-ampm-field:focus-within {
|
|
128
|
-
border: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
|
|
129
|
-
}
|
|
130
|
-
&:has(::-webkit-datetime-edit-ampm-field) {
|
|
131
|
-
&::before,
|
|
132
|
-
&::after {
|
|
133
|
-
@include typography.title-medium;
|
|
134
|
-
|
|
238
|
+
&::before {
|
|
135
239
|
content: "AM";
|
|
136
|
-
box-sizing: border-box;
|
|
137
240
|
position: absolute;
|
|
138
|
-
|
|
139
|
-
align
|
|
140
|
-
justify-content: center;
|
|
141
|
-
block-size: calc(50% + 0.5px);
|
|
142
|
-
inline-size: var(--md-sys-timepicker-period-width);
|
|
143
|
-
inset-inline-end: 0;
|
|
144
|
-
inset-block-start: 0;
|
|
145
|
-
border: 1px solid var(--md-sys-color-outline);
|
|
146
|
-
border-start-start-radius: var(--md-sys-shape-corner-small);
|
|
147
|
-
border-start-end-radius: var(--md-sys-shape-corner-small);
|
|
148
|
-
background-color: var(--md-sys-color-tertiary-container);
|
|
149
|
-
color: var(--md-sys-color-on-tertiary-container);
|
|
241
|
+
inline-size: 100%;
|
|
242
|
+
text-align: center;
|
|
150
243
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
border-start-start-radius: 0;
|
|
155
|
-
border-start-end-radius: 0;
|
|
156
|
-
border-end-start-radius: var(--md-sys-shape-corner-small);
|
|
157
|
-
border-end-end-radius: var(--md-sys-shape-corner-small);
|
|
158
|
-
background-color: transparent;
|
|
159
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
244
|
+
&:checked {
|
|
245
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
246
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
160
247
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
248
|
+
&:hover,
|
|
249
|
+
&:focus-visible,
|
|
250
|
+
&:active {
|
|
251
|
+
&:checked {
|
|
252
|
+
--statelayer-color: var(--md-sys-color-on-tertiary-container);
|
|
165
253
|
}
|
|
166
254
|
&::after {
|
|
167
|
-
|
|
168
|
-
color: var(--md-sys-color-on-tertiary-container);
|
|
255
|
+
border-color: var(--md-sys-color-on-surface);
|
|
169
256
|
}
|
|
257
|
+
&:checked::after {
|
|
258
|
+
border-color: var(--md-sys-color-primary);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
&:hover {
|
|
262
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
263
|
+
}
|
|
264
|
+
&:focus-visible {
|
|
265
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
266
|
+
|
|
267
|
+
outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
|
|
268
|
+
outline-offset: -2px;
|
|
269
|
+
}
|
|
270
|
+
&:active {
|
|
271
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
.micl-timepicker__am {
|
|
275
|
+
border-start-start-radius: var(--md-sys-shape-corner-small);
|
|
276
|
+
border-start-end-radius: var(--md-sys-shape-corner-small);
|
|
277
|
+
}
|
|
278
|
+
.micl-timepicker__pm {
|
|
279
|
+
border-block-start-width: 0px;
|
|
280
|
+
border-end-start-radius: var(--md-sys-shape-corner-small);
|
|
281
|
+
border-end-end-radius: var(--md-sys-shape-corner-small);
|
|
282
|
+
|
|
283
|
+
&::before {
|
|
284
|
+
content: "PM";
|
|
170
285
|
}
|
|
171
286
|
}
|
|
172
287
|
}
|
|
288
|
+
|
|
173
289
|
.micl-timepicker__supporting-text-hour,
|
|
174
290
|
.micl-timepicker__supporting-text-minute {
|
|
175
291
|
@include typography.body-small;
|
|
176
292
|
|
|
177
|
-
grid-area:
|
|
293
|
+
grid-area: timepicker-hour-supporting;
|
|
178
294
|
padding-block: 4px 0;
|
|
179
295
|
color: var(--md-sys-color-on-surface-variant);
|
|
180
296
|
}
|
|
181
297
|
.micl-timepicker__supporting-text-minute {
|
|
182
|
-
grid-area:
|
|
183
|
-
padding-inline-start: 16px;
|
|
298
|
+
grid-area: timepicker-minute-supporting;
|
|
184
299
|
}
|
|
185
300
|
|
|
186
|
-
|
|
187
301
|
.micl-timepicker .micl-timepicker__dial {
|
|
188
|
-
--
|
|
302
|
+
--micl-dial-radius: calc((var(--md-sys-timepicker-dial-size, 256px) - var(--md-sys-target-size, 48px)) / 2);
|
|
303
|
+
--micl-hour-radius: var(--micl-dial-radius);
|
|
304
|
+
--micl-angle: 0deg;
|
|
189
305
|
|
|
190
306
|
position: relative;
|
|
191
|
-
grid-area: dial;
|
|
192
|
-
|
|
307
|
+
grid-area: timepicker-dial;
|
|
308
|
+
justify-self: center;
|
|
193
309
|
block-size: var(--md-sys-timepicker-dial-size, 256px);
|
|
194
310
|
inline-size: var(--md-sys-timepicker-dial-size, 256px);
|
|
195
|
-
|
|
311
|
+
margin-block: 36px 0;
|
|
312
|
+
margin-inline: 0;
|
|
313
|
+
outline: none;
|
|
196
314
|
border-radius: var(--md-sys-shape-corner-full);
|
|
197
315
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
198
316
|
list-style-type: none;
|
|
317
|
+
touch-action: none;
|
|
318
|
+
|
|
319
|
+
data.micl-timepicker__dial-inner {
|
|
320
|
+
--micl-hour-radius: calc(var(--micl-dial-radius) - var(--md-sys-target-size, 48px) + 12px);
|
|
199
321
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
time:nth-child(9) { --d: 150deg; }
|
|
209
|
-
time:nth-child(10) { --d: 180deg; }
|
|
210
|
-
time:nth-child(11) { --d: 210deg; }
|
|
211
|
-
time:nth-child(12) { --d: 240deg; }
|
|
212
|
-
|
|
213
|
-
time {
|
|
214
|
-
--x: calc(var(--r) + (var(--r) * cos(var(--d))));
|
|
215
|
-
--y: calc(var(--r) + (var(--r) * sin(var(--d))));
|
|
322
|
+
z-index: 2;
|
|
323
|
+
&::before {
|
|
324
|
+
z-index: 2;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
data {
|
|
328
|
+
--micl-a: calc(var(--micl-dial-radius) + (var(--micl-hour-radius) * cos(var(--micl-angle))));
|
|
329
|
+
--micl-b: calc(var(--micl-dial-radius) + (var(--micl-hour-radius) * sin(var(--micl-angle))));
|
|
216
330
|
|
|
217
331
|
@include typography.body-large;
|
|
218
332
|
|
|
219
333
|
position: absolute;
|
|
220
334
|
display: grid;
|
|
335
|
+
place-content: center;
|
|
221
336
|
block-size: var(--md-sys-target-size, 48px);
|
|
222
337
|
inline-size: var(--md-sys-target-size, 48px);
|
|
223
|
-
inset-inline-start: var(--
|
|
224
|
-
inset-block-start: var(--
|
|
338
|
+
inset-inline-start: var(--micl-a);
|
|
339
|
+
inset-block-start: var(--micl-b);
|
|
340
|
+
outline: none;
|
|
225
341
|
border-radius: var(--md-sys-shape-corner-full);
|
|
226
|
-
|
|
342
|
+
color: var(--md-sys-color-on-surface);
|
|
227
343
|
cursor: pointer;
|
|
344
|
+
z-index: 1;
|
|
228
345
|
user-select: none;
|
|
346
|
+
-webkit-tap-highlight-color: transparent;
|
|
229
347
|
|
|
230
348
|
&.micl-timepicker__time--selected {
|
|
231
349
|
color: var(--md-sys-color-on-primary);
|
|
232
350
|
background-color: var(--md-sys-color-primary);
|
|
233
351
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
352
|
+
&::before {
|
|
353
|
+
content: "";
|
|
354
|
+
position: absolute;
|
|
355
|
+
block-size: var(--md-sys-target-size, 48px);
|
|
356
|
+
inline-size: calc(2 * var(--md-sys-target-size, 48px));
|
|
357
|
+
inset-inline-start: 0;
|
|
358
|
+
inset-block-end: 0;
|
|
359
|
+
transform: rotate(var(--micl-angle)) translate(calc(-1 * var(--md-sys-target-size, 48px)));
|
|
360
|
+
transform-origin: calc(var(--md-sys-target-size, 48px) / 2) center;
|
|
361
|
+
z-index: 1;
|
|
239
362
|
}
|
|
240
363
|
}
|
|
241
364
|
|
|
242
365
|
.micl-timepicker__track {
|
|
243
|
-
--
|
|
366
|
+
--micl-track-length: 92px;
|
|
244
367
|
|
|
245
368
|
position: relative;
|
|
246
369
|
display: block;
|
|
247
370
|
inline-size: var(--md-sys-timepicker-dial-track-width, 2px);
|
|
248
|
-
block-size: var(--
|
|
371
|
+
block-size: var(--micl-track-length);
|
|
249
372
|
inset-inline-start: calc((var(--md-sys-timepicker-dial-size, 256px) - var(--md-sys-timepicker-dial-track-width, 2px)) / 2);
|
|
250
|
-
inset-block-start: calc((var(--md-sys-timepicker-dial-size, 256px) / 2) - var(--
|
|
373
|
+
inset-block-start: calc((var(--md-sys-timepicker-dial-size, 256px) / 2) - var(--micl-track-length));
|
|
251
374
|
border-radius: calc(var(--md-sys-timepicker-dial-track-width, 2px) * 2);
|
|
252
375
|
background-color: var(--md-sys-color-primary);
|
|
253
|
-
transform: rotate(
|
|
376
|
+
transform: rotate(calc(90deg + var(--micl-angle)));
|
|
254
377
|
transform-origin: bottom;
|
|
255
378
|
|
|
256
379
|
&::before {
|