@ionic/core 9.0.11-dev.11793728481.1fc40367 → 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 -179
- package/dist/collection/components/datetime/datetime.ios.css +2 -134
- package/dist/collection/components/datetime/datetime.js +33 -406
- package/dist/collection/components/datetime/datetime.md.css +0 -120
- 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-56d77e95.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,108 +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
|
-
* Each day in the range draws its own piece of the track with a
|
|
365
|
-
* ::before. In-range days fill the cell, while the start and end
|
|
366
|
-
* caps cover the half between the pill center and the next day.
|
|
367
|
-
*
|
|
368
|
-
* Grid columns are `1fr`, so cell edges land on fractional pixels
|
|
369
|
-
* and a cell's track can fall a hairline short of its neighbor's.
|
|
370
|
-
* Each day therefore extends 1px toward the next day in the range,
|
|
371
|
-
* which the next day paints over except inside such a gap.
|
|
372
|
-
*
|
|
373
|
-
* @prop --range-background: The background color of the range selection track.
|
|
374
|
-
*/
|
|
375
|
-
:host .calendar-day-wrapper-in-range::before,
|
|
376
|
-
:host .calendar-day-wrapper-range-start::before,
|
|
377
|
-
:host .calendar-day-wrapper-range-end::before {
|
|
378
|
-
position: absolute;
|
|
379
|
-
top: 50%;
|
|
380
|
-
inset-inline-start: 0;
|
|
381
|
-
inset-inline-end: 0;
|
|
382
|
-
height: var(--range-track-height);
|
|
383
|
-
transform: translateY(-50%);
|
|
384
|
-
/**
|
|
385
|
-
* `--range-background` is translucent by default, so it is layered
|
|
386
|
-
* over the datetime background to paint an opaque track. Where two
|
|
387
|
-
* days overlap, the color stays the same instead of doubling up
|
|
388
|
-
* into a darker line.
|
|
389
|
-
*/
|
|
390
|
-
background: linear-gradient(var(--range-background), var(--range-background)), linear-gradient(var(--background), var(--background));
|
|
391
|
-
content: "";
|
|
392
|
-
z-index: -1;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
:host .calendar-day-wrapper-range-start::before {
|
|
396
|
-
inset-inline-start: 50%;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
:host .calendar-day-wrapper-range-end::before {
|
|
400
|
-
inset-inline-end: 50%;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Only extend toward a day that draws the track as well. The last
|
|
405
|
-
* day of a week is followed by the next row, and the next day is
|
|
406
|
-
* unpainted when it ends the selection or is disabled inside the
|
|
407
|
-
* range, so extending there would leave a 1px nub.
|
|
408
|
-
*/
|
|
409
|
-
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
410
|
-
:host .calendar-day-wrapper-in-range:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before,
|
|
411
|
-
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-in-range)::before,
|
|
412
|
-
:host .calendar-day-wrapper-range-start:not(:nth-child(7n)):has(+ .calendar-day-wrapper-range-end)::before {
|
|
413
|
-
inset-inline-end: -1px;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* A range that continues onto the next week runs the track
|
|
418
|
-
* through the grid padding to the edge of the calendar.
|
|
419
|
-
*/
|
|
420
|
-
:host .calendar-day-wrapper-in-range:nth-child(7n)::before,
|
|
421
|
-
:host .calendar-day-wrapper-range-start:nth-child(7n)::before {
|
|
422
|
-
inset-inline-end: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
:host .calendar-day-wrapper-in-range:nth-child(7n+1)::before,
|
|
426
|
-
:host .calendar-day-wrapper-range-end:nth-child(7n+1)::before {
|
|
427
|
-
inset-inline-start: calc(var(--range-track-edge-overflow, 0px) * -1);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* When a single day is both the start and end of the range,
|
|
432
|
-
* do not show a track since there is nothing to connect.
|
|
433
|
-
*/
|
|
434
|
-
:host .calendar-day-wrapper-range-start.calendar-day-wrapper-range-end::before {
|
|
435
|
-
display: none;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* When the component is disabled, fade the whole grid once instead of
|
|
440
|
-
* fading each day. Fading a day makes it its own compositing group, so
|
|
441
|
-
* the 1px that each day extends toward the next would be painted twice
|
|
442
|
-
* and read as a darker seam. The day buttons drop their own disabled
|
|
443
|
-
* opacity so the grid is the only thing applying it.
|
|
444
|
-
*/
|
|
445
|
-
:host(.datetime-disabled.datetime-range) .calendar-month-grid {
|
|
446
|
-
opacity: 0.4;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
:host(.datetime-disabled.datetime-range) .calendar-month-grid .calendar-day[disabled] {
|
|
450
|
-
opacity: 1;
|
|
451
354
|
}
|
|
452
355
|
|
|
453
356
|
/**
|
|
@@ -548,7 +451,7 @@
|
|
|
548
451
|
*/
|
|
549
452
|
--background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
550
453
|
--focus-ring-color: var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));
|
|
551
|
-
--focus-ring-width: var(--token-border-
|
|
454
|
+
--focus-ring-width: var(--token-border-radius-025, var(--token-scale-050, 2px));
|
|
552
455
|
/**
|
|
553
456
|
* TODO(FW-6931): Remove these variables upon solving the root cause
|
|
554
457
|
*/
|
|
@@ -698,16 +601,16 @@
|
|
|
698
601
|
}
|
|
699
602
|
|
|
700
603
|
.calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
701
|
-
color: var(--token-
|
|
604
|
+
color: var(--token-primitives-neutral-500, #9fa5ad);
|
|
702
605
|
}
|
|
703
606
|
|
|
704
607
|
.calendar-day.calendar-day-today {
|
|
705
|
-
color: var(--token-
|
|
608
|
+
color: var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
706
609
|
}
|
|
707
610
|
|
|
708
611
|
.calendar-day.calendar-day-active,
|
|
709
612
|
.calendar-day.calendar-day-active.calendar-day-adjacent-day {
|
|
710
|
-
background: var(--token-
|
|
613
|
+
background: var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff));
|
|
711
614
|
}
|
|
712
615
|
|
|
713
616
|
.calendar-day:focus-visible {
|
|
@@ -715,7 +618,7 @@
|
|
|
715
618
|
}
|
|
716
619
|
|
|
717
620
|
@media (any-hover: hover) {
|
|
718
|
-
.calendar-day:not([disabled]):not(:active):
|
|
621
|
+
.calendar-day:not([disabled]):not(:active):hover {
|
|
719
622
|
background: var(--token-semantics-primary-200, var(--token-primitives-blue-200, #e4e8ff));
|
|
720
623
|
}
|
|
721
624
|
}
|
|
@@ -732,83 +635,6 @@
|
|
|
732
635
|
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
733
636
|
}
|
|
734
637
|
|
|
735
|
-
:host {
|
|
736
|
-
--range-background: var(--token-bg-primary-subtle-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #f0f2ff)));
|
|
737
|
-
--range-track-height: var(--token-scale-1200, 48px);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
:host .calendar-day.calendar-day-range-start,
|
|
741
|
-
:host .calendar-day.calendar-day-range-end {
|
|
742
|
-
border-radius: var(--token-border-radius-full, 999px);
|
|
743
|
-
background: var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef))));
|
|
744
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.calendar-day.calendar-day-in-range {
|
|
748
|
-
border-radius: 0;
|
|
749
|
-
background: none;
|
|
750
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.calendar-day.calendar-day-today.calendar-day-in-range {
|
|
754
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
:host .calendar-day.calendar-day-today.calendar-day-range-start,
|
|
758
|
-
:host .calendar-day.calendar-day-today.calendar-day-range-end {
|
|
759
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
@media (any-hover: hover) {
|
|
763
|
-
.calendar-day.calendar-day-range-start:not([disabled]):not(:active):hover,
|
|
764
|
-
.calendar-day.calendar-day-range-end:not([disabled]):not(:active):hover {
|
|
765
|
-
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
.calendar-day.calendar-day-range-start:active,
|
|
769
|
-
.calendar-day.calendar-day-range-end:active {
|
|
770
|
-
background: var(--token-bg-primary-base-press, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)));
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
.calendar-day.calendar-day-in-range:active {
|
|
774
|
-
background: var(--token-bg-primary-subtle-press, var(--token-semantics-primary-300, var(--token-primitives-blue-300, #d0d7fa)));
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
:host(.datetime-disabled.datetime-range) .calendar-day[disabled]:not(.calendar-day-constrained) {
|
|
778
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-adjacent-day[disabled] {
|
|
782
|
-
color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a));
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-today[disabled] {
|
|
786
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-start[disabled],
|
|
790
|
-
:host(.datetime-disabled.datetime-range) .calendar-day.calendar-day-range-end[disabled] {
|
|
791
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-range-start[disabled],
|
|
795
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-range-end[disabled] {
|
|
796
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-in-range[disabled] {
|
|
800
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-in-range[disabled] {
|
|
804
|
-
color: var(--token-text-select, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)));
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-start[disabled],
|
|
808
|
-
:host(.datetime-readonly) .calendar-day.calendar-day-today.calendar-day-range-end[disabled] {
|
|
809
|
-
color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
810
|
-
}
|
|
811
|
-
|
|
812
638
|
:host .datetime-time {
|
|
813
639
|
-webkit-padding-start: var(--token-space-400, var(--token-scale-400, 16px));
|
|
814
640
|
padding-inline-start: var(--token-space-400, var(--token-scale-400, 16px));
|