@ionic/core 9.0.11-dev.11793736984.1580a194 → 9.0.11-dev.11793792571.1765ff65
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/components/ion-badge.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/{p-B7ExaLVL.js → p-BCQSEpww.js} +1 -1
- package/components/p-Da8LCPwo.js +4 -0
- package/components/p-DirxxGzo.js +4 -0
- package/components/{p-BCYVFy50.js → p-py1vB-7U.js} +1 -1
- package/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +13 -5
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime-button.cjs.entry.js +6 -33
- package/dist/cjs/ion-datetime.cjs.entry.js +36 -353
- package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/badge/badge.ionic.css +1 -1
- package/dist/collection/components/button/button.ionic.css +1 -1
- package/dist/collection/components/content/content.ionic.css +352 -0
- package/dist/collection/components/content/{content.css → content.ios.css} +65 -41
- package/dist/collection/components/content/content.js +9 -5
- package/dist/collection/components/content/content.md.css +347 -0
- package/dist/collection/components/datetime/datetime.ionic.css +5 -187
- package/dist/collection/components/datetime/datetime.ios.css +2 -142
- package/dist/collection/components/datetime/datetime.js +33 -406
- package/dist/collection/components/datetime/datetime.md.css +0 -128
- package/dist/collection/components/datetime/utils/state.js +1 -18
- package/dist/collection/components/datetime-button/datetime-button.js +6 -34
- package/dist/collection/components/item-option/item-option.ionic.css +1 -1
- package/dist/docs.json +127 -160
- package/dist/esm/{format-DUHrIiJq.js → format-NT7iHsbA.js} +1 -1
- package/dist/esm/ion-app_8.entry.js +13 -5
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-button_2.entry.js +1 -1
- package/dist/esm/ion-datetime-button.entry.js +7 -34
- package/dist/esm/ion-datetime.entry.js +37 -354
- package/dist/esm/ion-item-option_3.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +0 -20
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-0743a26a.entry.js +4 -0
- package/dist/ionic/p-1d709b26.entry.js +4 -0
- package/dist/ionic/p-39e3be74.entry.js +4 -0
- package/dist/ionic/p-6e4ee264.entry.js +4 -0
- package/dist/ionic/{p-CaOPF8Xt.js → p-BtccSO5J.js} +1 -1
- package/dist/ionic/p-ad46d2fd.entry.js +4 -0
- package/dist/ionic/{p-8231e914.entry.js → p-b51eb274.entry.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +0 -4
- package/dist/types/components/datetime/datetime.d.ts +2 -71
- package/dist/types/components/datetime/utils/state.d.ts +2 -5
- package/dist/types/components.d.ts +0 -33
- package/hydrate/index.js +59 -403
- package/hydrate/index.mjs +59 -403
- package/package.json +1 -1
- package/components/p-ByE0slik.js +0 -4
- package/components/p-DktrWeJE.js +0 -4
- package/dist/ionic/p-41680415.entry.js +0 -4
- package/dist/ionic/p-5e094639.entry.js +0 -4
- package/dist/ionic/p-a52cba2f.entry.js +0 -4
- package/dist/ionic/p-b30b468d.entry.js +0 -4
- package/dist/ionic/p-ceca04fb.entry.js +0 -4
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A heuristic that applies CSS to tablet
|
|
3
|
+
* viewports.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* @include tablet-viewport() {
|
|
7
|
+
* :host {
|
|
8
|
+
* background-color: green;
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A heuristic that applies CSS to mobile
|
|
14
|
+
* viewports (i.e. phones, not tablets).
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* @include mobile-viewport() {
|
|
18
|
+
* :host {
|
|
19
|
+
* background-color: blue;
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
:host {
|
|
24
|
+
/**
|
|
25
|
+
* @prop --background: Background of the content
|
|
26
|
+
*
|
|
27
|
+
* @prop --color: Color of the content
|
|
28
|
+
*
|
|
29
|
+
* @prop --padding-top: Top padding of the content
|
|
30
|
+
* @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the content
|
|
31
|
+
* @prop --padding-bottom: Bottom padding of the content
|
|
32
|
+
* @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the content
|
|
33
|
+
*
|
|
34
|
+
* @prop --keyboard-offset: Keyboard offset of the content
|
|
35
|
+
*
|
|
36
|
+
* @prop --offset-top: Offset top of the content
|
|
37
|
+
* @prop --offset-bottom: Offset bottom of the content
|
|
38
|
+
*/
|
|
39
|
+
--padding-top: 0px;
|
|
40
|
+
--padding-bottom: 0px;
|
|
41
|
+
--padding-start: 0px;
|
|
42
|
+
--padding-end: 0px;
|
|
43
|
+
--keyboard-offset: 0px;
|
|
44
|
+
--offset-top: 0px;
|
|
45
|
+
--offset-bottom: 0px;
|
|
46
|
+
--overflow: auto;
|
|
47
|
+
display: block;
|
|
48
|
+
position: relative;
|
|
49
|
+
flex: 1;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
/* stylelint-disable */
|
|
53
|
+
margin: 0 !important;
|
|
54
|
+
padding: 0 !important;
|
|
55
|
+
/* stylelint-enable */
|
|
56
|
+
font-family: var(--ion-font-family, inherit);
|
|
57
|
+
contain: size style;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host(.ion-color) .inner-scroll {
|
|
61
|
+
background: var(--ion-color-base);
|
|
62
|
+
color: var(--ion-color-contrast);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#background-content {
|
|
66
|
+
right: 0px;
|
|
67
|
+
left: 0px;
|
|
68
|
+
top: calc(var(--offset-top) * -1);
|
|
69
|
+
bottom: calc(var(--offset-bottom) * -1);
|
|
70
|
+
position: absolute;
|
|
71
|
+
background: var(--background);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.inner-scroll {
|
|
75
|
+
right: 0px;
|
|
76
|
+
left: 0px;
|
|
77
|
+
top: calc(var(--offset-top) * -1);
|
|
78
|
+
bottom: calc(var(--offset-bottom) * -1);
|
|
79
|
+
-webkit-padding-start: var(--padding-start);
|
|
80
|
+
padding-inline-start: var(--padding-start);
|
|
81
|
+
-webkit-padding-end: var(--padding-end);
|
|
82
|
+
padding-inline-end: var(--padding-end);
|
|
83
|
+
padding-top: calc(var(--padding-top) + var(--offset-top));
|
|
84
|
+
padding-bottom: calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--internal-content-safe-area-padding-bottom, 0px));
|
|
85
|
+
position: absolute;
|
|
86
|
+
color: var(--color);
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
/**
|
|
90
|
+
* touch-action: manipulation is an alias
|
|
91
|
+
* for this, but WebKit has an issue
|
|
92
|
+
* where pointercancel events are not fired
|
|
93
|
+
* when scrolling: https://bugs.webkit.org/show_bug.cgi?id=240917
|
|
94
|
+
* Using the long form below avoids the issue.
|
|
95
|
+
*/
|
|
96
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.scroll-y,
|
|
100
|
+
.scroll-x {
|
|
101
|
+
-webkit-overflow-scrolling: touch;
|
|
102
|
+
/**
|
|
103
|
+
* This adds `.inner-scroll` as part of the
|
|
104
|
+
* stacking context in WebKit. Without it,
|
|
105
|
+
* children of ion-content are treated as
|
|
106
|
+
* siblings rather than descendants. This
|
|
107
|
+
* can result in the children being put
|
|
108
|
+
* into their own layers, degrading
|
|
109
|
+
* scrolling performance.
|
|
110
|
+
*
|
|
111
|
+
* An optimization called "layer backing
|
|
112
|
+
* sharing" usually kicks in to prevent
|
|
113
|
+
* this, but having translate3d defeats
|
|
114
|
+
* this optimization.
|
|
115
|
+
*
|
|
116
|
+
* See: https://bugs.webkit.org/show_bug.cgi?id=216701
|
|
117
|
+
*/
|
|
118
|
+
z-index: 0;
|
|
119
|
+
will-change: scroll-position;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.scroll-y {
|
|
123
|
+
overflow-y: var(--overflow);
|
|
124
|
+
overscroll-behavior-y: contain;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.scroll-x {
|
|
128
|
+
overflow-x: var(--overflow);
|
|
129
|
+
overscroll-behavior-x: contain;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.overscroll::before,
|
|
133
|
+
.overscroll::after {
|
|
134
|
+
position: absolute;
|
|
135
|
+
width: 1px;
|
|
136
|
+
height: 1px;
|
|
137
|
+
content: "";
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.overscroll::before {
|
|
141
|
+
bottom: -1px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.overscroll::after {
|
|
145
|
+
top: -1px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host(.content-sizing) {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
/**
|
|
152
|
+
* This resolves a sizing issue in popovers where extra long content
|
|
153
|
+
* would overflow the popover's height, preventing scrolling. It's a
|
|
154
|
+
* quirk of flexbox that forces the content to shrink to fit.
|
|
155
|
+
*
|
|
156
|
+
* overflow: hidden can't be used here because it prevents the visual
|
|
157
|
+
* effect from showing on translucent headers.
|
|
158
|
+
*/
|
|
159
|
+
min-height: 0;
|
|
160
|
+
contain: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host(.content-sizing) .inner-scroll {
|
|
164
|
+
position: relative;
|
|
165
|
+
/**
|
|
166
|
+
* Because the outer content has display: flex here (to help enable
|
|
167
|
+
* scrolling in a popover), offsetting via `top` (such as when using
|
|
168
|
+
* a translucent header) creates white space under the content. Use
|
|
169
|
+
* a negative margin instead to keep the bottom in place. (A similar
|
|
170
|
+
* thing happens with `bottom` and footers.)
|
|
171
|
+
*/
|
|
172
|
+
top: 0;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
margin-top: calc(var(--offset-top) * -1);
|
|
175
|
+
margin-bottom: calc(var(--offset-bottom) * -1);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.transition-effect {
|
|
179
|
+
display: none;
|
|
180
|
+
position: absolute;
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100vh;
|
|
183
|
+
opacity: 0;
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host(.content-ltr) .transition-effect {
|
|
188
|
+
/* stylelint-disable property-disallowed-list */
|
|
189
|
+
left: -100%;
|
|
190
|
+
/* stylelint-enable property-disallowed-list */
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host(.content-rtl) .transition-effect {
|
|
194
|
+
/* stylelint-disable property-disallowed-list */
|
|
195
|
+
right: -100%;
|
|
196
|
+
/* stylelint-enable property-disallowed-list */
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.transition-cover {
|
|
200
|
+
position: absolute;
|
|
201
|
+
/* stylelint-disable property-disallowed-list */
|
|
202
|
+
right: 0;
|
|
203
|
+
/* stylelint-enable property-disallowed-list */
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: 100%;
|
|
206
|
+
background: black;
|
|
207
|
+
opacity: 0.1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.transition-shadow {
|
|
211
|
+
display: block;
|
|
212
|
+
position: absolute;
|
|
213
|
+
width: 100%;
|
|
214
|
+
height: 100%;
|
|
215
|
+
box-shadow: inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:host(.content-ltr) .transition-shadow {
|
|
219
|
+
/* stylelint-disable property-disallowed-list */
|
|
220
|
+
right: 0;
|
|
221
|
+
/* stylelint-enable property-disallowed-list */
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:host(.content-rtl) .transition-shadow {
|
|
225
|
+
/* stylelint-disable property-disallowed-list */
|
|
226
|
+
left: 0;
|
|
227
|
+
/* stylelint-enable property-disallowed-list */
|
|
228
|
+
transform: scaleX(-1);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
::slotted([slot=fixed]) {
|
|
232
|
+
position: absolute;
|
|
233
|
+
/**
|
|
234
|
+
* When presenting ion-content inside of an ion-modal, the .inner-scroll
|
|
235
|
+
* element is composited. In WebKit, the fixed content is not composited
|
|
236
|
+
* causing it to appear under the main scrollable content as a result.
|
|
237
|
+
* The fixed content is correctly composited in other browsers. Adding
|
|
238
|
+
* the translateZ forces the fixed content to be composited so it correctly
|
|
239
|
+
* shows on top of the scrollable content. Setting a negative z-index will
|
|
240
|
+
* still allow the fixed content to appear under the scroll content if specified.
|
|
241
|
+
*/
|
|
242
|
+
transform: translateZ(0);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll {
|
|
246
|
+
transition: transform 300ms cubic-bezier(0, 0, 0.2, 1), height 300ms cubic-bezier(0, 0, 0.2, 1);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll {
|
|
250
|
+
height: calc(100% + var(--internal-header-hide-height, 0px));
|
|
251
|
+
transform: translateY(calc(-1 * var(--internal-header-hide-height, 0px)));
|
|
252
|
+
transition: transform 200ms cubic-bezier(0.4, 0, 1, 1), height 200ms cubic-bezier(0.4, 0, 1, 1);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll {
|
|
256
|
+
transition: height 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll {
|
|
260
|
+
height: calc(100% + var(--internal-footer-hide-height, 0px));
|
|
261
|
+
transition: height 350ms cubic-bezier(0.4, 0, 1, 1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll {
|
|
265
|
+
transition: height 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll {
|
|
269
|
+
height: calc(100% + var(--internal-tab-bar-hide-height, 0px));
|
|
270
|
+
transition: height 350ms cubic-bezier(0.4, 0, 1, 1);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@media (prefers-reduced-motion: reduce) {
|
|
274
|
+
:host(.content-header-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,
|
|
275
|
+
:host(.content-header-hide-scroll-partner:not(.content-fullscreen).content-header-hide-scroll-hidden) .inner-scroll,
|
|
276
|
+
:host(.content-footer-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,
|
|
277
|
+
:host(.content-footer-hide-scroll-partner:not(.content-fullscreen).content-footer-hide-scroll-hidden) .inner-scroll,
|
|
278
|
+
:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen)) .inner-scroll,
|
|
279
|
+
:host(.content-tab-bar-hide-scroll-partner:not(.content-fullscreen).content-tab-bar-hide-scroll-hidden) .inner-scroll {
|
|
280
|
+
transition: none;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Convert a pixels given value into rem
|
|
285
|
+
*
|
|
286
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
287
|
+
* @param context (optional) - Baseline value
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* Convert a font size to a dynamic font size.
|
|
291
|
+
* Fonts that participate in Dynamic Type should use
|
|
292
|
+
* dynamic font sizes.
|
|
293
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
294
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
295
|
+
* convert to a unit other than $baselineUnit.
|
|
296
|
+
*/
|
|
297
|
+
/**
|
|
298
|
+
* Convert a font size to a dynamic font size but impose
|
|
299
|
+
* a maximum font size.
|
|
300
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
301
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
302
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
303
|
+
* convert to a unit other than $baselineUnit.
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* Convert a font size to a dynamic font size but impose
|
|
307
|
+
* a minimum font size.
|
|
308
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
309
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
310
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
311
|
+
* convert to a unit other than $baselineUnit.
|
|
312
|
+
*/
|
|
313
|
+
/**
|
|
314
|
+
* Convert a font size to a dynamic font size but impose
|
|
315
|
+
* maximum and minimum font sizes.
|
|
316
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
317
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
318
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
319
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
320
|
+
* convert to a unit other than $baselineUnit.
|
|
321
|
+
*/
|
|
322
|
+
/**
|
|
323
|
+
* A heuristic that applies CSS to tablet
|
|
324
|
+
* viewports.
|
|
325
|
+
*
|
|
326
|
+
* Usage:
|
|
327
|
+
* @include tablet-viewport() {
|
|
328
|
+
* :host {
|
|
329
|
+
* background-color: green;
|
|
330
|
+
* }
|
|
331
|
+
* }
|
|
332
|
+
*/
|
|
333
|
+
/**
|
|
334
|
+
* A heuristic that applies CSS to mobile
|
|
335
|
+
* viewports (i.e. phones, not tablets).
|
|
336
|
+
*
|
|
337
|
+
* Usage:
|
|
338
|
+
* @include mobile-viewport() {
|
|
339
|
+
* :host {
|
|
340
|
+
* background-color: blue;
|
|
341
|
+
* }
|
|
342
|
+
* }
|
|
343
|
+
*/
|
|
344
|
+
:host {
|
|
345
|
+
--background: var(--ion-background-color, #fff);
|
|
346
|
+
--color: var(--ion-text-color, #000);
|
|
347
|
+
}
|
|
@@ -346,116 +346,11 @@
|
|
|
346
346
|
|
|
347
347
|
:host .calendar-day-wrapper {
|
|
348
348
|
display: flex;
|
|
349
|
-
position: relative;
|
|
350
349
|
align-items: center;
|
|
351
350
|
justify-content: center;
|
|
352
351
|
min-width: 0;
|
|
353
352
|
min-height: 0;
|
|
354
353
|
overflow: visible;
|
|
355
|
-
/**
|
|
356
|
-
* Create a stacking context so the range track
|
|
357
|
-
* (::before with z-index: -1) stays behind the
|
|
358
|
-
* day button but above the host background.
|
|
359
|
-
*/
|
|
360
|
-
z-index: 0;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* The focus ring can extend past the cell, so lift the focused day
|
|
365
|
-
* above the following days, whose range track would otherwise cover it.
|
|
366
|
-
*/
|
|
367
|
-
:host .calendar-day-wrapper:focus-within {
|
|
368
|
-
z-index: 1;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Each day in the range draws its own piece of the track with a
|
|
373
|
-
* ::before. In-range days fill the cell, while the start and end
|
|
374
|
-
* caps cover the half between the pill center and the next day.
|
|
375
|
-
*
|
|
376
|
-
* Grid columns are `1fr`, so cell edges land on fractional pixels
|
|
377
|
-
* and a cell's track can fall a hairline short of its neighbor's.
|
|
378
|
-
* Each day therefore extends 1px toward the next day in the range,
|
|
379
|
-
* which the next day paints over except inside such a gap.
|
|
380
|
-
*
|
|
381
|
-
* @prop --range-background: The background color of the range selection track.
|
|
382
|
-
*/
|
|
383
|
-
:host .calendar-day-wrapper-in-range::before,
|
|
384
|
-
:host .calendar-day-wrapper-range-start::before,
|
|
385
|
-
:host .calendar-day-wrapper-range-end::before {
|
|
386
|
-
position: absolute;
|
|
387
|
-
top: 50%;
|
|
388
|
-
inset-inline-start: 0;
|
|
389
|
-
inset-inline-end: 0;
|
|
390
|
-
height: var(--range-track-height);
|
|
391
|
-
transform: translateY(-50%);
|
|
392
|
-
/**
|
|
393
|
-
* `--range-background` is translucent by default, so it is layered
|
|
394
|
-
* over the datetime background to paint an opaque track. Where two
|
|
395
|
-
* days overlap, the color stays the same instead of doubling up
|
|
396
|
-
* into a darker line.
|
|
397
|
-
*/
|
|
398
|
-
background: linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));
|
|
399
|
-
content: "";
|
|
400
|
-
z-index: -1;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
:host .calendar-day-wrapper-range-start::before {
|
|
404
|
-
inset-inline-start: 50%;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
:host .calendar-day-wrapper-range-end::before {
|
|
408
|
-
inset-inline-end: 50%;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Only extend toward a day that draws the track as well. The last
|
|
413
|
-
* day of a week is followed by the next row, and the next day is
|
|
414
|
-
* unpainted when it ends the selection or is disabled inside the
|
|
415
|
-
* range, so extending there would leave a 1px nub.
|
|
416
|
-
*/
|
|
417
|
-
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
418
|
-
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before,
|
|
419
|
-
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
420
|
-
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before {
|
|
421
|
-
inset-inline-end: -1px;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* A range that continues onto the next week runs the track
|
|
426
|
-
* through the grid padding to the edge of the calendar.
|
|
427
|
-
*/
|
|
428
|
-
:host .calendar-day-wrapper-in-range:nth-child(7n)::before,
|
|
429
|
-
:host .calendar-day-wrapper-range-start:nth-child(7n)::before {
|
|
430
|
-
inset-inline-end: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,
|
|
434
|
-
:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before {
|
|
435
|
-
inset-inline-start: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* When a single day is both the start and end of the range,
|
|
440
|
-
* do not show a track since there is nothing to connect.
|
|
441
|
-
*/
|
|
442
|
-
:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before {
|
|
443
|
-
display: none;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* When the component is disabled, fade the whole grid once instead of
|
|
448
|
-
* fading each day. Fading a day makes it its own compositing group, so
|
|
449
|
-
* the 1px that each day extends toward the next would be painted twice
|
|
450
|
-
* and read as a darker seam. The day buttons drop their own disabled
|
|
451
|
-
* opacity so the grid is the only thing applying it.
|
|
452
|
-
*/
|
|
453
|
-
:host(.datetime-disabled.datetime-range) .calendar-month-grid {
|
|
454
|
-
opacity: 0.4;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
:host(.datetime-disabled.datetime-range) .calendar-month-grid .calendar-day[disabled] {
|
|
458
|
-
opacity: 1;
|
|
459
354
|
}
|
|
460
355
|
|
|
461
356
|
/**
|
|
@@ -556,7 +451,7 @@
|
|
|
556
451
|
*/
|
|
557
452
|
--background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
558
453
|
--focus-ring-color: var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));
|
|
559
|
-
--focus-ring-width: var(--token-border-
|
|
454
|
+
--focus-ring-width: var(--token-border-radius-025, var(--token-scale-050, 2px));
|
|
560
455
|
/**
|
|
561
456
|
* TODO(FW-6931): Remove these variables upon solving the root cause
|
|
562
457
|
*/
|
|
@@ -706,16 +601,16 @@
|
|
|
706
601
|
}
|
|
707
602
|
|
|
708
603
|
.calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
709
|
-
color: var(--token-
|
|
604
|
+
color: var(--token-primitives-neutral-500, #9fa5ad);
|
|
710
605
|
}
|
|
711
606
|
|
|
712
607
|
.calendar-day.calendar-day-today {
|
|
713
|
-
color: var(--token-
|
|
608
|
+
color: var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
714
609
|
}
|
|
715
610
|
|
|
716
611
|
.calendar-day.calendar-day-active,
|
|
717
612
|
.calendar-day.calendar-day-active.calendar-day-adjacent-day {
|
|
718
|
-
background: var(--token-
|
|
613
|
+
background: var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));
|
|
719
614
|
}
|
|
720
615
|
|
|
721
616
|
.calendar-day:focus-visible {
|
|
@@ -723,7 +618,7 @@
|
|
|
723
618
|
}
|
|
724
619
|
|
|
725
620
|
@media (any-hover: hover) {
|
|
726
|
-
.calendar-day:not([disabled]):not(:active):
|
|
621
|
+
.calendar-day:not([disabled]):not(:active):hover {
|
|
727
622
|
background: var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff));
|
|
728
623
|
}
|
|
729
624
|
}
|
|
@@ -740,83 +635,6 @@
|
|
|
740
635
|
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
741
636
|
}
|
|
742
637
|
|
|
743
|
-
:host {
|
|
744
|
-
--range-background: var(--token-bg-primary-subtle-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff)));
|
|
745
|
-
--range-track-height: var(--token-scale-1200, 48px);
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
:host .calendar-day.calendar-day-range-start,
|
|
749
|
-
:host .calendar-day.calendar-day-range-end {
|
|
750
|
-
border-radius: var(--token-border-radius-full, 999px);
|
|
751
|
-
background: var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef))));
|
|
752
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
.calendar-day.calendar-day-in-range {
|
|
756
|
-
border-radius: 0;
|
|
757
|
-
background: none;
|
|
758
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.calendar-day.calendar-day-today.calendar-day-in-range {
|
|
762
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
:host .calendar-day.calendar-day-today.calendar-day-range-start,
|
|
766
|
-
:host .calendar-day.calendar-day-today.calendar-day-range-end {
|
|
767
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
@media (any-hover: hover) {
|
|
771
|
-
.calendar-day.calendar-day-range-start:not([disabled]):not(:active):hover,
|
|
772
|
-
.calendar-day.calendar-day-range-end:not([disabled]):not(:active):hover {
|
|
773
|
-
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
.calendar-day.calendar-day-range-start:active,
|
|
777
|
-
.calendar-day.calendar-day-range-end:active {
|
|
778
|
-
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.calendar-day.calendar-day-in-range:active {
|
|
782
|
-
background: var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)));
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
:host(.datetime-disabled.datetime-range) .calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
786
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-adjacent-day[disabled] {
|
|
790
|
-
color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a));
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-today[disabled] {
|
|
794
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-start[disabled],
|
|
798
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-end[disabled] {
|
|
799
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-range-start[disabled],
|
|
803
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-range-end[disabled] {
|
|
804
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-in-range[disabled] {
|
|
808
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-in-range[disabled] {
|
|
812
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-start[disabled],
|
|
816
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-end[disabled] {
|
|
817
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
818
|
-
}
|
|
819
|
-
|
|
820
638
|
:host .datetime-time {
|
|
821
639
|
-webkit-padding-start: var(--token-space-400, var(--token-scale-400, 16px));
|
|
822
640
|
padding-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
|