@webqit/webflo 0.20.47 → 0.20.49
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/package.json +1 -1
- package/src/webflo-runtime/webflo-client/DeviceCapabilities.js +3 -0
- package/src/webflo-runtime/webflo-client/webflo-elements.js +838 -525
- package/test/browser/elements.src.build.js +668 -490
- package/test/browser/elements.src.build.js.map +3 -3
- package/test/browser/index.html +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var
|
|
1
|
+
(()=>{var n=class extends HTMLElement{static get events(){return[]}static get observedAttributes(){return this.events.map(r=>`on${r}`)}#r={};#e(r,e){for(let t of this.constructor.events)r===`on${t}`&&(this.#r[r]&&(this.removeEventListener(t,this.#r[r]),this.#r[r]=null),e&&(this.#r[r]=Function("event",e).bind(this),this.addEventListener(t,this.#r[r])))}#o(){for(let r of this.constructor.events){let e=`on${r}`,t=null;Object.defineProperty(this,e,{get:()=>t,set:s=>{if(t&&(this.removeEventListener(r,t),t=null),typeof s=="function")this.addEventListener(r,s);else if(s!=null)throw new Error(`[${e}] handler must be null or a function`);t=s}})}}attributeChangedCallback(r,e,t){this.#e(r,t)}constructor(){super(),this.#o()}},h=class extends n{set type(r){[void 0,null].includes(r)?this.removeAttribute("type"):this.setAttribute("type",r)}get type(){return this.getAttribute("type")}get contentHTML(){return""}get css(){return""}#r=null;#e(){this.#r&&(this.shadowRoot.appendChild(this.#r),this.matches(":popover-open")&&this.#r.showPopover())}_processVisibility(r){this.hasAttribute("oncontent")&&(r.assignedNodes().find(e=>e.nodeName!=="#text"||e.textContent.trim())?this.showPopover():this.hidePopover())}render({content:r,context:e},t=null,s=1){if(e&&s>0){let a=document.createElement(this.tagName);a.setAttribute("popover",this.getAttribute("popover")||"auto"),this.classList.contains("_top")&&a.classList.add("_top"),a.render({content:r},t,0),this.render(e,a,s+1);return}this.#r?.remove(),this.#r=t,this.#e();let c=parseFloat(t?.style.getPropertyValue("--start-delay")||"0");this.style.setProperty("--start-delay",c+.1+"s"),this.type=r.type,this.innerHTML=r.message}connectedCallback(){this.popover||(this.popover="auto")}constructor(){super(),this.attachShadow({mode:"open"}),this.addEventListener("toggle",r=>{r.newState==="open"?this.#r?.showPopover():r.newState==="closed"&&(this.#r?.hidePopover(),this.getAttribute("oncontent")==="always"&&(this.innerHTML=""))}),this.shadowRoot.innerHTML=`
|
|
2
2
|
<div class="container">
|
|
3
3
|
|
|
4
4
|
<svg class="icon _info" xmlns="http://www.w3.org/2000/svg" height="1.4em" width="1.4em" viewBox="0 -960 960 960" fill="currentColor"><path d="M444-296h72v-228h-72v228Zm36-312q20 0 33-13t13-33q0-20-13-33t-33-13q-20 0-33 13t-13 33q0 20 13 33t33 13Zm0 528q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Z"/></svg>
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
--color-error: var(--toast-color-error, coral);
|
|
42
42
|
--color-warning: var(--toast-color-warning, coral);
|
|
43
43
|
|
|
44
|
-
--
|
|
44
|
+
--radius: var(--toast-radius, 1rem);
|
|
45
45
|
--background: var(--toast-background, rgb(30, 30, 30));
|
|
46
46
|
--shadow: var(--toast-shadow, rgb(30, 30, 30));
|
|
47
47
|
|
|
48
|
-
--
|
|
49
|
-
--translation: calc(var(--toast-translation, 50px) * var(--
|
|
50
|
-
--exit-
|
|
48
|
+
--entry-exit-translation-polarity: 1;
|
|
49
|
+
--translation: calc(var(--toast-translation, 50px) * var(--entry-exit-translation-polarity));
|
|
50
|
+
--exit-translation-polarity: var(--toast--exit-translation-polarity, -1);
|
|
51
51
|
|
|
52
52
|
--entry-transform: translateY(var(--translation));
|
|
53
|
-
--exit-transform: translateY(calc(var(--translation) * var(--exit-
|
|
53
|
+
--exit-transform: translateY(calc(var(--translation) * var(--exit-translation-polarity)));
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
:host {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
:host(._top) {
|
|
79
79
|
margin-bottom: auto;
|
|
80
80
|
margin-top: 0;
|
|
81
|
-
--
|
|
81
|
+
--entry-exit-translation-polarity: -1;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/* ----------- */
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
padding-block: 0.8rem;
|
|
94
94
|
padding-inline: 1.2rem;
|
|
95
|
-
border-radius: var(--
|
|
95
|
+
border-radius: var(--radius);
|
|
96
96
|
|
|
97
97
|
color: var(--color-default);
|
|
98
98
|
background-color: var(--background);
|
|
@@ -118,30 +118,32 @@
|
|
|
118
118
|
|
|
119
119
|
/* ----------- */
|
|
120
120
|
|
|
121
|
-
:host(:not([popover="manual"]):popover-open)::backdrop {
|
|
121
|
+
:host(:not([popover="manual"], ._manual-dismiss):popover-open)::backdrop {
|
|
122
122
|
animation: flash 0.3s ease-in;
|
|
123
123
|
animation-iteration-count: 3;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
:host([popover="manual"])::backdrop {
|
|
126
|
+
:host(:is([popover="manual"], ._manual-dismiss))::backdrop {
|
|
127
127
|
/* Transition */
|
|
128
128
|
transition:
|
|
129
129
|
display 0.2s allow-discrete,
|
|
130
130
|
overlay 0.2s allow-discrete,
|
|
131
|
-
backdrop-filter 0.2s
|
|
131
|
+
backdrop-filter 0.2s,
|
|
132
|
+
background 0.2s;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
:host([popover="manual"]:popover-open)::backdrop {
|
|
135
|
+
:host(:is([popover="manual"], ._manual-dismiss):popover-open)::backdrop {
|
|
135
136
|
backdrop-filter: blur(3px);
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
@starting-style {
|
|
139
|
-
:host([popover="manual"]:popover-open)::backdrop {
|
|
140
|
+
:host(:is([popover="manual"], ._manual-dismiss):popover-open)::backdrop {
|
|
140
141
|
backdrop-filter: none;
|
|
142
|
+
background: none;
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
:host([popover="manual"]:popover-open)::before {
|
|
146
|
+
:host(:is([popover="manual"], ._manual-dismiss):popover-open)::before {
|
|
145
147
|
position: fixed;
|
|
146
148
|
inset: 0;
|
|
147
149
|
display: block;
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
transform: translateX(0.1rem);
|
|
192
194
|
}
|
|
193
195
|
|
|
194
|
-
:host(:not([popover="manual"])) .close-button {
|
|
196
|
+
:host(:not([popover="manual"], ._manual-dismiss)) .close-button {
|
|
195
197
|
display: none;
|
|
196
198
|
}
|
|
197
199
|
|
|
@@ -224,7 +226,7 @@
|
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
${this.css}
|
|
227
|
-
</style>`,this.#e()}},d=class extends Event{#
|
|
229
|
+
</style>`,this.#e()}},d=class extends Event{#r;get ratio(){return this.#r}constructor(r){super("minmax"),this.#r=r}},l=class extends n{static get events(){return super.events.concat(["minmax"])}static get observedAttributes(){return super.observedAttributes.concat(["class"])}get delegatesFocus(){return!1}get autoFocus(){return!0}set type(r){[void 0,null].includes(r)?this.removeAttribute("type"):this.setAttribute("type",r)}get type(){return this.getAttribute("type")}get headerBoxHTML(){return""}get headerHTML(){return""}get headerExtendedHTML(){return""}get mainHTML(){return""}get contentHTML(){return""}get footerHTML(){return""}get css(){return""}#r;#e;#o;#i;#n;#l;calcViewDimensions(){let r=this.#r.offsetWidth,e=this.#r.offsetHeight;this.style.setProperty("--view-width",r+"px"),this.style.setProperty("--view-height",e+"px")}calcHeaderDimensions(){this.style.setProperty("--header-box-height",this.#n.offsetHeight+"px"),this.style.setProperty("--header-max-height",this.#i.offsetHeight+"px")}calcFooterDimensions(){this.style.setProperty("--footer-max-height",this.#l.offsetHeight+"px")}calcScrollability(){this.style.setProperty("--view-scroll-height",this.#r.scrollHeight+"px"),this.style.setProperty("--view-scroll-width",this.#r.scrollWidth+"px")}updateScrollViewDimensions(){requestAnimationFrame(()=>{let r=this.classList.contains("_swipe-dismiss"),e=!!window.getComputedStyle(this).getPropertyValue("--modal-minmax-length");(r||e)&&requestAnimationFrame(()=>{let t=0,s=0;this.matches("._left._horz, ._top:not(._horz)")?this.#r.scrollTo({top:s,left:t}):(this.classList.contains("_horz")?t=this.#e.offsetWidth:s=this.#e.offsetHeight,(this.#r.scrollTop<s||this.#r.scrollLeft<t)&&this.#r.scrollTo({top:s,left:t}))}),this.calcHeaderDimensions(),this.calcFooterDimensions(),this.calcScrollability(),!this.classList.contains("_container")&&this.calcViewDimensions()})}#s=null;bindMinmaxWorker(){let r=this.classList.contains("_swipe-dismiss"),e=this.classList.contains("_minmax-events");if(!r&&!e)return;let t={root:this.#r,threshold:[0,1]},s=new IntersectionObserver(c=>{for(let a of c){if(a.target===this.#o){let b=new d(1-a.intersectionRatio);this.dispatchEvent(b)}this.#a&&a.target===this.#e&&a.isIntersecting&&a.intersectionRatio>=.8&&this.hidePopover()}},t);setTimeout(()=>{e&&s.observe(this.#o),r&&s.observe(this.#e)},200),this.#s=()=>s.disconnect()}#a=!1;#t;#c(){this.#a=!1;let r=()=>this.#a=!0;this.#r.addEventListener("scroll",r),this.updateScrollViewDimensions();let e=()=>this.updateScrollViewDimensions();window.addEventListener("resize",e),this.#t?.(),this.#t=()=>{window.removeEventListener("resize",e),this.#r.removeEventListener("scroll",r)}}attributeChangedCallback(r,e,t){super.attributeChangedCallback?.(r,e,t),r==="class"&&e!==t&&this.#c()}connectedCallback(){super.connectedCallback?.(),this.popover||(this.popover="manual"),this.hasAttribute("open")&&this.showPopover()}disconnectedCallback(){super.disconnectedCallback?.(),this.#t?.(),this.#t=null,this.#s?.(),this.#s=null}constructor(){super(),this.attachShadow({mode:"open",delegatesFocus:this.delegatesFocus}),this.addEventListener("toggle",r=>{r.newState==="open"?(CSS.supports("selector(:has(*))")&&"chrome"in globalThis&&!("safari"in globalThis)&&(this.style.animation="none",this.offsetHeight,this.style.animation=""),this.#c(),this.bindMinmaxWorker(),!this.delegatesFocus&&this.autoFocus&&!this.querySelector("[autofocus]")&&this.shadowRoot.querySelector("[autofocus]")?.focus()):r.newState==="closed"&&(this.#t?.(),this.#t=null,this.#s?.(),this.#s=null)}),this.shadowRoot.innerHTML=`
|
|
228
230
|
<div class="spacing"></div>
|
|
229
231
|
<div class="view" part="view">
|
|
230
232
|
|
|
@@ -236,7 +238,7 @@
|
|
|
236
238
|
<div class="header-box" part="header-box">
|
|
237
239
|
<slot
|
|
238
240
|
name="header-box"
|
|
239
|
-
onslotchange="this.classList.toggle('has-slotted', !!this.assignedElements().length); this.
|
|
241
|
+
onslotchange="this.classList.toggle('has-slotted', !!this.assignedElements().length); this.getRootNode().host.calcHeaderDimensions();"
|
|
240
242
|
>${this.headerBoxHTML}</slot>
|
|
241
243
|
</div>
|
|
242
244
|
|
|
@@ -249,7 +251,7 @@
|
|
|
249
251
|
<div class="_content" style="flex-grow: 1">
|
|
250
252
|
<slot
|
|
251
253
|
name="header"
|
|
252
|
-
onslotchange="this.
|
|
254
|
+
onslotchange="this.getRootNode().host.calcHeaderDimensions();"
|
|
253
255
|
>${this.headerHTML}</slot>
|
|
254
256
|
</div>
|
|
255
257
|
</div>
|
|
@@ -261,7 +263,7 @@
|
|
|
261
263
|
${this.headerExtendedHTML||`
|
|
262
264
|
<slot
|
|
263
265
|
name="header-extended"
|
|
264
|
-
onslotchange="this.
|
|
266
|
+
onslotchange="this.getRootNode().host.calcHeaderDimensions();"
|
|
265
267
|
></slot>`}
|
|
266
268
|
|
|
267
269
|
</header>
|
|
@@ -276,13 +278,14 @@
|
|
|
276
278
|
</div>
|
|
277
279
|
</div>
|
|
278
280
|
|
|
279
|
-
${this.mainHTML||`<div class="main" part="main">${this.contentHTML
|
|
281
|
+
${this.mainHTML||`<div class="main" part="main">${this.contentHTML||`
|
|
282
|
+
<slot onslotchange="this.getRootNode().host.calcScrollability();"></slot>`}</div>`}
|
|
280
283
|
|
|
281
284
|
<footer part="footer">
|
|
282
285
|
<div class="footer-bar" part="footer-bar">
|
|
283
286
|
<slot
|
|
284
287
|
name="footer"
|
|
285
|
-
onslotchange="this.classList.toggle('has-slotted', !!this.assignedElements().length); this.
|
|
288
|
+
onslotchange="this.classList.toggle('has-slotted', !!this.assignedElements().length); this.getRootNode().host.calcFooterDimensions();"
|
|
286
289
|
>${this.footerHTML}</slot>
|
|
287
290
|
</div>
|
|
288
291
|
</footer>
|
|
@@ -292,47 +295,30 @@
|
|
|
292
295
|
<span class="spacing-b"></span>
|
|
293
296
|
|
|
294
297
|
<style>
|
|
298
|
+
/*
|
|
299
|
+
* Start: resets
|
|
300
|
+
*/
|
|
301
|
+
|
|
295
302
|
* {
|
|
296
303
|
box-sizing: border-box;
|
|
297
304
|
}
|
|
298
305
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
@keyframes transform-n {
|
|
304
|
-
to { transform: var(--transform); }
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
@keyframes appear {
|
|
308
|
-
from { opacity: 0; }
|
|
309
|
-
to { opacity: 1; }
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
@keyframes disappear {
|
|
313
|
-
from { opacity: 1; }
|
|
314
|
-
to { opacity: 0; }
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
@keyframes header-chrome {
|
|
318
|
-
from { background: var(--header-open-background); }
|
|
319
|
-
to { background: var(--header-background); }
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
@keyframes move-scrollbar-thumb {
|
|
323
|
-
from { transform: var(--scrollbar-thumb-start); }
|
|
324
|
-
to { transform: var(--scrollbar-thumb-length); }
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
@keyframes radius0 {
|
|
328
|
-
to { --wq-radius: 0; }
|
|
329
|
-
}
|
|
306
|
+
/*
|
|
307
|
+
* End: resets
|
|
308
|
+
* Start: general vars
|
|
309
|
+
*/
|
|
330
310
|
|
|
331
311
|
:host {
|
|
332
|
-
--wq-radius: var(--modal-radius, 1rem);
|
|
333
312
|
--aero-blur: var(--modal-aero-blur, 10px);
|
|
313
|
+
--backdrop-filter: var(--modal-backdrop-filter, blur(3px));
|
|
314
|
+
|
|
315
|
+
--radius-length: var(--modal-radius, 1rem);
|
|
316
|
+
|
|
334
317
|
--background: var(--modal-background, rgba(80, 80, 80, 1));
|
|
335
318
|
|
|
319
|
+
--background-accent: var(--modal-background-accent, var(--background));
|
|
320
|
+
--color-accent: var(--modal-color-accent, var(--color-default));
|
|
321
|
+
|
|
336
322
|
--color-default: var(--modal-color-default, whitesmoke);
|
|
337
323
|
--color-info: var(--modal-color-info, whitesmoke);
|
|
338
324
|
--color-success: var(--modal-color-success, whitesmoke);
|
|
@@ -353,6 +339,8 @@
|
|
|
353
339
|
--footer-color-error: var(--modal-footer-color-error, coral);
|
|
354
340
|
--footer-background: var(--modal-footer-background, var(--background));
|
|
355
341
|
|
|
342
|
+
--close-button-color: var(--modal-close-button-color, var(--color-default));
|
|
343
|
+
|
|
356
344
|
--expanse-length: var(--modal-expanse-length, 0px);
|
|
357
345
|
--minmax-length: var(--modal-minmax-length, 0px);
|
|
358
346
|
|
|
@@ -360,163 +348,507 @@
|
|
|
360
348
|
--scrollbar-thumb-width: var(--modal-scrollbar-thumb-width, 4px);
|
|
361
349
|
--scrollbar-thumb-height: var(--modal-scrollbar-thumb-height, 30px);
|
|
362
350
|
|
|
363
|
-
--translation: calc(var(--modal-translation, 50px) * var(--
|
|
364
|
-
--exit-
|
|
365
|
-
}
|
|
351
|
+
--entry-exit-translation: calc(var(--modal-translation, 50px) * var(--entry-exit-translation-polarity));
|
|
352
|
+
--exit-translation-polarity: var(--modal-exit-translation-polarity, -1);
|
|
366
353
|
|
|
367
|
-
|
|
354
|
+
/* -------- box lengths -------- */
|
|
368
355
|
|
|
369
|
-
|
|
370
|
-
--
|
|
371
|
-
--
|
|
372
|
-
|
|
356
|
+
--header-max-height: 1.6rem;
|
|
357
|
+
--header-box-height: 0px;
|
|
358
|
+
--footer-max-height: 0px;
|
|
359
|
+
|
|
360
|
+
--header-min-height: calc(var(--header-max-height) - var(--header-box-height));
|
|
361
|
+
--footer-min-height: var(--footer-max-height);
|
|
362
|
+
|
|
363
|
+
--view-inner-height: calc(var(--view-height) - var(--header-min-height) - var(--footer-min-height));
|
|
364
|
+
|
|
365
|
+
--total-minmax-length: calc(var(--minmax-length) + var(--swipe-dismiss-length, 0));
|
|
373
366
|
}
|
|
374
367
|
|
|
375
|
-
:host(.
|
|
376
|
-
--
|
|
368
|
+
:host(._container:not(._horz)) {
|
|
369
|
+
--view-height: calc(100cqh - var(--expanse-length));
|
|
370
|
+
--view-width: 100cqw;
|
|
377
371
|
}
|
|
378
372
|
|
|
379
|
-
:host(._horz
|
|
380
|
-
--
|
|
373
|
+
:host(._container._horz) {
|
|
374
|
+
--view-height: 100cqh;
|
|
375
|
+
--view-width: calc(100cqw - var(--expanse-length));
|
|
381
376
|
}
|
|
382
|
-
|
|
383
|
-
/* transform reversal */
|
|
384
377
|
|
|
385
|
-
|
|
378
|
+
/*
|
|
379
|
+
* End: general vars
|
|
380
|
+
* Start: entry/exit transition
|
|
381
|
+
*/
|
|
386
382
|
|
|
387
|
-
|
|
383
|
+
:host { --entry-exit-translation-polarity: 1; }
|
|
384
|
+
:host(:is(._top, ._left)) { --entry-exit-translation-polarity: -1; }
|
|
385
|
+
:host(._edge-tight) { --exit-translation-polarity: var(--modal-exit-translation-polarity, 1); }
|
|
386
|
+
:host(:not([popover="manual"], ._manual-dismiss):popover-open) { --backdrop-filter: blur(0px); }
|
|
387
|
+
|
|
388
|
+
:host {
|
|
389
|
+
--entry-transform: translateY(var(--entry-exit-translation));
|
|
390
|
+
--exit-transform: translateY(calc(var(--entry-exit-translation) * var(--exit-translation-polarity)));
|
|
391
|
+
}
|
|
388
392
|
|
|
389
393
|
:host(:is(._left, ._right, ._horz)) {
|
|
390
|
-
--entry-transform: translateX(var(--translation));
|
|
391
|
-
--exit-transform: translateX(calc(var(--translation) * var(--exit-
|
|
394
|
+
--entry-transform: translateX(var(--entry-exit-translation));
|
|
395
|
+
--exit-transform: translateX(calc(var(--entry-exit-translation) * var(--exit-translation-polarity)));
|
|
392
396
|
}
|
|
393
397
|
|
|
394
|
-
|
|
398
|
+
/* ----------- */
|
|
395
399
|
|
|
396
|
-
|
|
400
|
+
:host {
|
|
401
|
+
transition:
|
|
402
|
+
opacity 0.2s,
|
|
403
|
+
transform 0.2s,
|
|
404
|
+
overlay 0.2s allow-discrete,
|
|
405
|
+
display 0.2s allow-discrete;
|
|
406
|
+
transition-timing-function: ease-out;
|
|
407
|
+
|
|
408
|
+
transform: var(--exit-transform);
|
|
409
|
+
opacity: 0;
|
|
410
|
+
}
|
|
397
411
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
412
|
+
:host(:popover-open) {
|
|
413
|
+
display: flex;
|
|
414
|
+
opacity: 1;
|
|
415
|
+
transform: none;
|
|
416
|
+
}
|
|
402
417
|
|
|
403
|
-
|
|
404
|
-
|
|
418
|
+
@starting-style {
|
|
419
|
+
:host(:popover-open) {
|
|
420
|
+
opacity: 0;
|
|
421
|
+
transform: var(--entry-transform);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
405
424
|
|
|
406
|
-
|
|
407
|
-
--total-minmax-length: var(--minmax-length);
|
|
408
|
-
|
|
409
|
-
--y-scroll-effect-exclude: var(--total-minmax-length);
|
|
410
|
-
--scrollbar-appear-range: calc(var(--total-minmax-length) - 25px) var(--total-minmax-length);
|
|
411
|
-
|
|
412
|
-
--scrollbar-progress-range-start: calc(var(--total-minmax-length) + var(--header-box-height));
|
|
413
|
-
--scrollbar-progress-range-end: 100%;
|
|
414
|
-
--scrollbar-progress-range: var(--scrollbar-progress-range-start) var(--scrollbar-progress-range-end);
|
|
425
|
+
/* ----------- */
|
|
415
426
|
|
|
416
|
-
|
|
417
|
-
|
|
427
|
+
:host::backdrop {
|
|
428
|
+
transition:
|
|
429
|
+
display 0.2s allow-discrete,
|
|
430
|
+
overlay 0.2s allow-discrete,
|
|
431
|
+
backdrop-filter 0.2s,
|
|
432
|
+
background 0.2s;
|
|
433
|
+
}
|
|
418
434
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
--radius-bottom-left: var(--wq-radius);
|
|
422
|
-
--radius-bottom-right: var(--wq-radius);
|
|
435
|
+
:host(:popover-open)::backdrop {
|
|
436
|
+
backdrop-filter: var(--backdrop-filter);
|
|
423
437
|
}
|
|
424
438
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
439
|
+
@starting-style {
|
|
440
|
+
:host(:popover-open)::backdrop {
|
|
441
|
+
backdrop-filter: none;
|
|
442
|
+
background: none;
|
|
443
|
+
}
|
|
428
444
|
}
|
|
429
445
|
|
|
430
|
-
:host(.
|
|
431
|
-
|
|
432
|
-
--view-width: calc(100cqw - var(--expanse-length));
|
|
446
|
+
:host(:not([popover="manual"], ._manual-dismiss):popover-open)::backdrop {
|
|
447
|
+
backdrop-filter: blur(0px);
|
|
433
448
|
}
|
|
434
449
|
|
|
435
|
-
|
|
436
|
-
|
|
450
|
+
/*
|
|
451
|
+
* End: entry/exit transition
|
|
452
|
+
* Start: scroll-driven animations
|
|
453
|
+
*/
|
|
454
|
+
|
|
455
|
+
@keyframes radius-progress {
|
|
456
|
+
from { --wq-internal-var-radius-progress: 0; }
|
|
457
|
+
to { --wq-internal-var-radius-progress: 1; }
|
|
437
458
|
}
|
|
438
459
|
|
|
439
|
-
|
|
440
|
-
--
|
|
460
|
+
@keyframes header-box-progress {
|
|
461
|
+
from { --wq-internal-var-header-box-progress: 0; }
|
|
462
|
+
to { --wq-internal-var-header-box-progress: 1; }
|
|
441
463
|
}
|
|
442
464
|
|
|
443
|
-
|
|
465
|
+
@keyframes header-box-progress-a {
|
|
466
|
+
from { --wq-internal-var-header-box-progress-a: 0; }
|
|
467
|
+
to { --wq-internal-var-header-box-progress-a: 1; }
|
|
468
|
+
}
|
|
444
469
|
|
|
445
|
-
|
|
446
|
-
--
|
|
447
|
-
--
|
|
470
|
+
@keyframes header-box-progress-b {
|
|
471
|
+
from { --wq-internal-var-header-box-progress-b: 0; }
|
|
472
|
+
to { --wq-internal-var-header-box-progress-b: 1; }
|
|
473
|
+
}
|
|
448
474
|
|
|
449
|
-
|
|
450
|
-
--
|
|
475
|
+
@keyframes minmax-progress {
|
|
476
|
+
from { --wq-internal-var-minmax-progress: 0; }
|
|
477
|
+
to { --wq-internal-var-minmax-progress: 1; }
|
|
451
478
|
}
|
|
452
479
|
|
|
453
|
-
|
|
454
|
-
--
|
|
455
|
-
--
|
|
480
|
+
@keyframes minmax-progress-a {
|
|
481
|
+
from { --wq-internal-var-minmax-progress-a: 0; }
|
|
482
|
+
to { --wq-internal-var-minmax-progress-a: 1; }
|
|
456
483
|
}
|
|
457
484
|
|
|
458
|
-
|
|
459
|
-
--
|
|
460
|
-
--
|
|
485
|
+
@keyframes minmax-progress-b {
|
|
486
|
+
from { --wq-internal-var-minmax-progress-b: 0; }
|
|
487
|
+
to { --wq-internal-var-minmax-progress-b: 1; }
|
|
461
488
|
}
|
|
462
489
|
|
|
463
|
-
|
|
490
|
+
@keyframes total-minmax-progress {
|
|
491
|
+
from { --wq-internal-var-total-minmax-progress: 0; }
|
|
492
|
+
to { --wq-internal-var-total-minmax-progress: 1; }
|
|
493
|
+
}
|
|
464
494
|
|
|
465
|
-
|
|
466
|
-
--
|
|
467
|
-
--
|
|
495
|
+
@keyframes swipe-dismiss-progress {
|
|
496
|
+
from { --wq-internal-var-swipe-dismiss-progress: 0; }
|
|
497
|
+
to { --wq-internal-var-swipe-dismiss-progress: 1; }
|
|
468
498
|
}
|
|
469
499
|
|
|
470
|
-
|
|
471
|
-
--
|
|
472
|
-
--
|
|
500
|
+
@keyframes scrollbar-appear-progress {
|
|
501
|
+
from { --wq-internal-var-scrollbar-appear-progress: 0; }
|
|
502
|
+
to { --wq-internal-var-scrollbar-appear-progress: 1; }
|
|
473
503
|
}
|
|
474
504
|
|
|
475
|
-
|
|
476
|
-
--
|
|
477
|
-
--
|
|
505
|
+
@keyframes scrollbar-progress {
|
|
506
|
+
from { --wq-internal-var-scrollbar-progress: 0; }
|
|
507
|
+
to { --wq-internal-var-scrollbar-progress: 1; }
|
|
478
508
|
}
|
|
479
509
|
|
|
480
|
-
|
|
481
|
-
--
|
|
482
|
-
--
|
|
510
|
+
@keyframes scrollbar-progress-a {
|
|
511
|
+
from { --wq-internal-var-scrollbar-progress-a: 0; }
|
|
512
|
+
to { --wq-internal-var-scrollbar-progress-a: 1; }
|
|
483
513
|
}
|
|
484
514
|
|
|
485
|
-
|
|
515
|
+
@keyframes scrollbar-progress-b {
|
|
516
|
+
from { --wq-internal-var-scrollbar-progress-b: 0; }
|
|
517
|
+
to { --wq-internal-var-scrollbar-progress-b: 1; }
|
|
518
|
+
}
|
|
486
519
|
|
|
487
520
|
:host {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
padding: 0;
|
|
521
|
+
timeline-scope: --view-scroll;
|
|
522
|
+
animation-timeline: --view-scroll;
|
|
491
523
|
|
|
492
|
-
|
|
493
|
-
|
|
524
|
+
animation-timing-function: linear;
|
|
525
|
+
animation-fill-mode: both;
|
|
494
526
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
527
|
+
animation-name:
|
|
528
|
+
radius-progress,
|
|
529
|
+
header-box-progress,
|
|
530
|
+
header-box-progress-a,
|
|
531
|
+
header-box-progress-b,
|
|
532
|
+
minmax-progress,
|
|
533
|
+
minmax-progress-a,
|
|
534
|
+
minmax-progress-b,
|
|
535
|
+
total-minmax-progress,
|
|
536
|
+
swipe-dismiss-progress,
|
|
537
|
+
scrollbar-appear-progress,
|
|
538
|
+
scrollbar-progress,
|
|
539
|
+
scrollbar-progress-a,
|
|
540
|
+
scrollbar-progress-b;
|
|
541
|
+
|
|
542
|
+
animation-range:
|
|
543
|
+
var(--radius-progress-range, 0 0),
|
|
544
|
+
var(--header-box-progress-range, 0 0),
|
|
545
|
+
var(--header-box-progress-range-a, 0 0),
|
|
546
|
+
var(--header-box-progress-range-b, 0 0),
|
|
547
|
+
var(--minmax-progress-range, 0 0),
|
|
548
|
+
var(--minmax-progress-range-a, 0 0),
|
|
549
|
+
var(--minmax-progress-range-b, 0 0),
|
|
550
|
+
var(--total-minmax-progress-range, 0 0),
|
|
551
|
+
var(--swipe-dismiss-progress-range, 0 0),
|
|
552
|
+
var(--scrollbar-appear-range, 0 0),
|
|
553
|
+
var(--scrollbar-progress-range, 0 0),
|
|
554
|
+
var(--scrollbar-progress-range-a, 0 0),
|
|
555
|
+
var(--scrollbar-progress-range-b, 0 0);
|
|
556
|
+
|
|
557
|
+
animation-direction:
|
|
558
|
+
var(--radius-progress-direction, normal),
|
|
559
|
+
var(--header-box-progress-direction, normal),
|
|
560
|
+
var(--header-box-progress-direction-a, normal),
|
|
561
|
+
var(--header-box-progress-direction-b, normal),
|
|
562
|
+
var(--minmax-progress-direction, normal),
|
|
563
|
+
var(--minmax-progress-direction-a, normal),
|
|
564
|
+
var(--minmax-progress-direction-b, normal),
|
|
565
|
+
var(--total-minmax-progress-direction, normal),
|
|
566
|
+
var(--swipe-dismiss-progress-direction, normal),
|
|
567
|
+
var(--scrollbar-appear-direction, normal),
|
|
568
|
+
var(--scrollbar-progress-direction, normal),
|
|
569
|
+
var(--scrollbar-progress-direction-a, normal),
|
|
570
|
+
var(--scrollbar-progress-direction-b, normal);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* ----------- radius ----------- */
|
|
574
|
+
|
|
575
|
+
:host(._edge-tight._alt-edge-tight:not(._top:not(._horz), ._left._horz)) {
|
|
576
|
+
--radius-progress-range:
|
|
577
|
+
calc(var(--total-minmax-length) - var(--radius-length))
|
|
578
|
+
var(--total-minmax-length);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
:host(._edge-tight._alt-edge-tight:is(._top:not(._horz), ._left._horz)) {
|
|
582
|
+
--radius-progress-range:
|
|
583
|
+
calc(100% - var(--total-minmax-length))
|
|
584
|
+
calc(100% - (var(--total-minmax-length) - var(--radius-length)));
|
|
585
|
+
--radius-progress-direction: reverse;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
:host(._edge-tight._alt-edge-tight) {
|
|
589
|
+
--effective-radius: calc(var(--radius-length) * (1 - var(--wq-internal-var-radius-progress)));
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
:host(:not(._edge-tight._alt-edge-tight)) {
|
|
593
|
+
--effective-radius: var(--radius-length);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
:host {
|
|
597
|
+
--effective-top-left-radius: var(--effective-radius);
|
|
598
|
+
--effective-top-right-radius: var(--effective-radius);
|
|
599
|
+
--effective-bottom-left-radius: var(--effective-radius);
|
|
600
|
+
--effective-bottom-right-radius: var(--effective-radius);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
:host(._top._edge-tight) {
|
|
604
|
+
--effective-top-left-radius: 0px;
|
|
605
|
+
--effective-top-right-radius: 0px;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
:host(._bottom._edge-tight) {
|
|
609
|
+
--effective-bottom-left-radius: 0px;
|
|
610
|
+
--effective-bottom-right-radius: 0px;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
:host(._left._edge-tight) {
|
|
614
|
+
--effective-top-left-radius: 0px;
|
|
615
|
+
--effective-bottom-left-radius: 0px;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
:host(._right._edge-tight) {
|
|
619
|
+
--effective-top-right-radius: 0px;
|
|
620
|
+
--effective-bottom-right-radius: 0px;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.view {
|
|
624
|
+
border-top-left-radius: var(--effective-top-left-radius);
|
|
625
|
+
border-top-right-radius: var(--effective-top-right-radius);
|
|
626
|
+
border-bottom-left-radius: var(--effective-bottom-left-radius);
|
|
627
|
+
border-bottom-right-radius: var(--effective-bottom-right-radius);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
header {
|
|
631
|
+
border-top-left-radius: var(--effective-top-left-radius);
|
|
632
|
+
border-top-right-radius: var(--effective-top-right-radius);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.view:not(:has(footer slot:is(.has-slotted, :not(:empty)))) .main {
|
|
636
|
+
border-bottom-left-radius: var(--effective-bottom-left-radius);
|
|
637
|
+
border-bottom-right-radius: var(--effective-bottom-right-radius);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
footer {
|
|
641
|
+
border-bottom-left-radius: var(--effective-bottom-left-radius);
|
|
642
|
+
border-bottom-right-radius: var(--effective-bottom-right-radius);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/* ----------- minmax ----------- */
|
|
646
|
+
|
|
647
|
+
:host {
|
|
648
|
+
--minmax-progress-range: var(--minmax-progress-range-start) var(--minmax-progress-range-end);
|
|
649
|
+
--minmax-progress-range-start: 0%;
|
|
650
|
+
--minmax-progress-range-end: var(--minmax-length);
|
|
651
|
+
|
|
652
|
+
--minmax-progress-range-a: var(--minmax-progress-range-a-start) var(--minmax-progress-range-a-end);
|
|
653
|
+
--minmax-progress-range-a-start: var(--minmax-progress-range-start);
|
|
654
|
+
--minmax-progress-range-a-end: calc(var(--minmax-progress-range-start) + (var(--minmax-progress-range-end) - var(--minmax-progress-range-start)) / 2);
|
|
655
|
+
|
|
656
|
+
--minmax-progress-range-b: var(--minmax-progress-range-b-start) var(--minmax-progress-range-b-end);
|
|
657
|
+
--minmax-progress-range-b-start: calc(var(--minmax-progress-range-start) + (var(--minmax-progress-range-end) - var(--minmax-progress-range-start)) / 2);
|
|
658
|
+
--minmax-progress-range-b-end: var(--minmax-progress-range-end);
|
|
659
|
+
|
|
660
|
+
--total-minmax-progress-range: var(--total-minmax-progress-range-start) var(--total-minmax-progress-range-end);
|
|
661
|
+
--total-minmax-progress-range-start: 0%;
|
|
662
|
+
--total-minmax-progress-range-end: var(--total-minmax-length);
|
|
663
|
+
}
|
|
502
664
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
665
|
+
:host(:is(._top:not(._horz), ._left._horz)) {
|
|
666
|
+
--minmax-progress-range-start: calc(100% - var(--minmax-length));
|
|
667
|
+
--minmax-progress-range-end: 100%;
|
|
668
|
+
|
|
669
|
+
--total-minmax-progress-range-start: calc(100% - var(--total-minmax-length));
|
|
670
|
+
--total-minmax-progress-range-end: 100%;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
:host {
|
|
674
|
+
--effective-minmax-balance-offset: calc(var(--total-minmax-length) / -2 * (1 - var(--wq-internal-var-total-minmax-progress)));
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
:host(:not(._horz, ._top, ._bottom)) .view {
|
|
678
|
+
transform: translateY(var(--effective-minmax-balance-offset));
|
|
506
679
|
}
|
|
680
|
+
|
|
681
|
+
:host(._horz:not(._left, ._right)) .view {
|
|
682
|
+
transform: translateX(var(--effective-minmax-balance-offset));
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/* ----------- swipe-dismiss ----------- */
|
|
507
686
|
|
|
508
|
-
:host(:not(._horz
|
|
509
|
-
|
|
687
|
+
:host(._swipe-dismiss:not(._horz)) {
|
|
688
|
+
--swipe-dismiss-length: var(--modal-swipe-dismiss-length, calc(var(--view-height) - var(--minmax-length)));
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
:host(._swipe-dismiss._horz) {
|
|
692
|
+
--swipe-dismiss-length: var(--modal-swipe-dismiss-length, calc(var(--view-width) - var(--minmax-length)));
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
:host(._swipe-dismiss:not(._top:not(._horz), ._left._horz)) {
|
|
696
|
+
--swipe-dismiss-progress-range: 0% var(--swipe-dismiss-length);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
:host(._swipe-dismiss:is(._top:not(._horz), ._left._horz)) {
|
|
700
|
+
--swipe-dismiss-progress-range:
|
|
701
|
+
calc(100% - var(--swipe-dismiss-length))
|
|
702
|
+
100%;
|
|
703
|
+
--swipe-dismiss-progress-direction: reverse;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
:host(._swipe-dismiss) {
|
|
707
|
+
--effective-swipe-dismiss-opacity: calc(1 * var(--wq-internal-var-swipe-dismiss-progress));
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
:host(._swipe-dismiss)::backdrop,
|
|
711
|
+
:host(._swipe-dismiss._swipe-dismiss-fadeout) .view {
|
|
712
|
+
opacity: var(--effective-swipe-dismiss-opacity);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/* ----------- header-box ----------- */
|
|
716
|
+
|
|
717
|
+
:host(:not(._horz)) {
|
|
718
|
+
--header-box-progress-range:
|
|
719
|
+
var(--total-minmax-length)
|
|
720
|
+
calc(var(--total-minmax-length) + var(--header-box-height));
|
|
721
|
+
|
|
722
|
+
--header-box-progress-range-a:
|
|
723
|
+
var(--total-minmax-length)
|
|
724
|
+
calc(var(--total-minmax-length) + (var(--header-box-height) / 2));
|
|
725
|
+
|
|
726
|
+
--header-box-progress-range-b:
|
|
727
|
+
calc(var(--total-minmax-length) + (var(--header-box-height) / 2))
|
|
728
|
+
calc(var(--total-minmax-length) + var(--header-box-height));
|
|
729
|
+
|
|
730
|
+
--effective-header-box-progress-transform: translateY(calc(35% * var(--wq-internal-var-header-box-progress-a)));
|
|
731
|
+
--effective-header-box-progress-a-opacity: calc(1 * (1 - var(--wq-internal-var-header-box-progress-a)));
|
|
732
|
+
--effective-header-box-progress-b-opacity: calc(1 * var(--wq-internal-var-header-box-progress-b));
|
|
733
|
+
|
|
734
|
+
.header-box {
|
|
735
|
+
transform: var(--effective-header-box-progress-transform);
|
|
736
|
+
opacity: var(--effective-header-box-progress-a-opacity);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
.header-left {
|
|
740
|
+
opacity: var(--effective-header-box-progress-b-opacity);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/* ----------- scrollbars and scroll-unfold ----------- */
|
|
745
|
+
|
|
746
|
+
:host(:is(._scrollbars, ._scroll-unfold, ._horz)) {
|
|
747
|
+
--scrollable-length: calc(var(--view-scroll-width) - var(--total-minmax-length) - var(--view-width));
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
:host(:is(._scrollbars, ._scroll-unfold):not(._horz)) {
|
|
751
|
+
--scrollable-length: calc(var(--view-scroll-height) - var(--total-minmax-length) - var(--header-box-height) - var(--view-height));
|
|
510
752
|
}
|
|
511
753
|
|
|
512
|
-
|
|
754
|
+
:host(:is(._scrollbars, ._scroll-unfold)) {
|
|
755
|
+
--scrollability: calc(1 * min(1, calc(var(--scrollable-length) / 1px)));
|
|
756
|
+
|
|
757
|
+
.scrollport {
|
|
758
|
+
opacity: var(--scrollability);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
:host {
|
|
763
|
+
--scrollbar-appear-range: var(--scrollbar-appear-range-start) var(--scrollbar-appear-range-end);
|
|
764
|
+
--scrollbar-appear-range-start: calc(var(--total-minmax-length) - 25px);
|
|
765
|
+
--scrollbar-appear-range-end: var(--total-minmax-length);
|
|
766
|
+
|
|
767
|
+
--scrollbar-progress-range: var(--scrollbar-progress-range-start) var(--scrollbar-progress-range-end);
|
|
768
|
+
--scrollbar-progress-range-start: var(--total-minmax-length);
|
|
769
|
+
--scrollbar-progress-range-end: 100%;
|
|
770
|
+
|
|
771
|
+
--scrollbar-progress-range-a: var(--scrollbar-progress-range-a-start) var(--scrollbar-progress-range-a-end);
|
|
772
|
+
--scrollbar-progress-range-a-start: var(--scrollbar-progress-range-start);
|
|
773
|
+
--scrollbar-progress-range-a-end: calc(var(--scrollbar-progress-range-start) + (var(--scrollbar-progress-range-end) - var(--scrollbar-progress-range-start)) / 2);
|
|
774
|
+
|
|
775
|
+
--scrollbar-progress-range-b: var(--scrollbar-progress-range-b-start) var(--scrollbar-progress-range-b-end);
|
|
776
|
+
--scrollbar-progress-range-b-start: calc(var(--scrollbar-progress-range-start) + (var(--scrollbar-progress-range-end) - var(--scrollbar-progress-range-start)) / 2);
|
|
777
|
+
--scrollbar-progress-range-b-end: var(--scrollbar-progress-range-end);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
:host(:not(._horz)) {
|
|
781
|
+
--scrollbar-progress-range-start: calc(var(--total-minmax-length) + var(--header-box-height));
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
:host(._top:not(._horz)) {
|
|
785
|
+
--scrollbar-appear-range-start: -25px;
|
|
786
|
+
--scrollbar-appear-range-end: 0%;
|
|
787
|
+
|
|
788
|
+
--scrollbar-progress-range-start: var(--header-box-height);
|
|
789
|
+
--scrollbar-progress-range-end: calc(100% - var(--total-minmax-length));
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
:host(._left._horz) {
|
|
793
|
+
--scrollbar-appear-range-start: -25px;
|
|
794
|
+
--scrollbar-appear-range-end: 0%;
|
|
795
|
+
|
|
796
|
+
--scrollbar-progress-range-start: 0%;
|
|
797
|
+
--scrollbar-progress-range-end: calc(100% - var(--total-minmax-length));
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
:host(._scrollbars) {
|
|
801
|
+
--effective-scrollbar-appear-opacity: calc(1 * var(--wq-internal-var-scrollbar-appear-progress));
|
|
802
|
+
|
|
803
|
+
.scrollbar-track {
|
|
804
|
+
opacity: var(--effective-scrollbar-appear-opacity);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
:host(._scrollbars:not(._horz)) {
|
|
809
|
+
--effective-scrollbar-progress: calc((var(--view-inner-height) - 100%) * var(--wq-internal-var-scrollbar-progress));
|
|
810
|
+
|
|
811
|
+
.scrollbar-thumb {
|
|
812
|
+
transform: translateY(var(--effective-scrollbar-progress));
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
:host(._scrollbars._horz) {
|
|
817
|
+
--effective-scrollbar-progress: calc((var(--view-width) - 100%) * var(--wq-internal-var-scrollbar-progress));
|
|
818
|
+
|
|
819
|
+
.scrollbar-thumb {
|
|
820
|
+
transform: translateX(var(--effective-scrollbar-progress));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
:host(._scroll-unfold) {
|
|
825
|
+
--effective-scroll-unfold-a-opacity: calc(1 * var(--wq-internal-var-scrollbar-progress-b));
|
|
826
|
+
--effective-scroll-unfold-b-opacity: calc(1 * (1 - var(--wq-internal-var-scrollbar-progress-a)));
|
|
827
|
+
|
|
828
|
+
.scroll-fold-start {
|
|
829
|
+
opacity: var(--effective-scroll-unfold-a-opacity);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.scroll-fold-end {
|
|
833
|
+
opacity: var(--effective-scroll-unfold-b-opacity);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/*
|
|
838
|
+
* End: scroll-driven animations
|
|
839
|
+
* Start: actual styling
|
|
840
|
+
*/
|
|
841
|
+
|
|
842
|
+
/* ----------- anchoring, direction, ordering ----------- */
|
|
843
|
+
|
|
844
|
+
/* anchoring */
|
|
513
845
|
|
|
514
846
|
:host(._top) { margin-top: 0; }
|
|
515
847
|
:host(._bottom) { margin-bottom: 0; }
|
|
516
848
|
:host(._left) { margin-left: 0; }
|
|
517
849
|
:host(._right) { margin-right: 0; }
|
|
518
850
|
|
|
519
|
-
/*
|
|
851
|
+
/* direction */
|
|
520
852
|
|
|
521
853
|
:host,
|
|
522
854
|
.view {
|
|
@@ -529,16 +861,30 @@
|
|
|
529
861
|
flex-direction: row;
|
|
530
862
|
}
|
|
531
863
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
864
|
+
/* ordering */
|
|
865
|
+
|
|
866
|
+
header { order: 1; }
|
|
867
|
+
.scrollport-anchor { order: 2; justify-content: start; }
|
|
868
|
+
.main { order: 3; }
|
|
869
|
+
footer { order: 5; }
|
|
870
|
+
|
|
871
|
+
:host(:is(._top:not(._horz), ._left._horz)) {
|
|
872
|
+
.view,
|
|
873
|
+
.container {
|
|
874
|
+
order: -1;
|
|
875
|
+
}
|
|
536
876
|
|
|
537
|
-
|
|
538
|
-
|
|
877
|
+
.sentinel {
|
|
878
|
+
order: 1000;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.scrollport-anchor {
|
|
882
|
+
order: 4;
|
|
883
|
+
justify-content: end;
|
|
884
|
+
}
|
|
539
885
|
}
|
|
540
886
|
|
|
541
|
-
/* spacing */
|
|
887
|
+
/* ----------- spacing ----------- */
|
|
542
888
|
|
|
543
889
|
:host>.spacing,
|
|
544
890
|
.view>.spacing,
|
|
@@ -565,49 +911,82 @@
|
|
|
565
911
|
|
|
566
912
|
:host(:not(._horz)) .view>.sentinel { height: var(--swipe-dismiss-length); }
|
|
567
913
|
:host(._horz) .view>.sentinel { width: var(--swipe-dismiss-length); }
|
|
914
|
+
|
|
915
|
+
/* ----------- scroll-snapping ----------- */
|
|
568
916
|
|
|
569
|
-
|
|
917
|
+
:host(:not(._top:not(._horz), ._left._horz)) .view {
|
|
918
|
+
--scroll-snap-start: start;
|
|
919
|
+
--scroll-snap-end: end;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
:host(:is(._top:not(._horz), ._left._horz)) .view {
|
|
923
|
+
--scroll-snap-start: end;
|
|
924
|
+
--scroll-snap-end: start;
|
|
925
|
+
}
|
|
570
926
|
|
|
571
927
|
.view {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
display: flex;
|
|
928
|
+
scroll-snap-type: y mandatory;
|
|
929
|
+
}
|
|
575
930
|
|
|
576
|
-
|
|
931
|
+
:host(._horz) .view {
|
|
932
|
+
scroll-snap-type: x mandatory;
|
|
933
|
+
}
|
|
577
934
|
|
|
578
|
-
|
|
579
|
-
|
|
935
|
+
.view>.spacing,
|
|
936
|
+
.view>.sentinel {
|
|
937
|
+
scroll-snap-align: var(--scroll-snap-start);
|
|
938
|
+
}
|
|
580
939
|
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
940
|
+
.main {
|
|
941
|
+
scroll-margin-top: var(--header-min-height);
|
|
942
|
+
scroll-margin-bottom: var(--footer-min-height);
|
|
943
|
+
scroll-snap-align: var(--scroll-snap-start);
|
|
944
|
+
}
|
|
585
945
|
|
|
586
|
-
|
|
946
|
+
:host(:is(._top, ._left._horz)) .main {
|
|
947
|
+
scroll-snap-align: none;
|
|
948
|
+
}
|
|
587
949
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
animation-timeline: --view-scroll;
|
|
950
|
+
:host(:is(._top, ._left._horz)) .container {
|
|
951
|
+
scroll-snap-align: var(--scroll-snap-start);
|
|
952
|
+
}
|
|
592
953
|
|
|
593
|
-
|
|
954
|
+
header {
|
|
955
|
+
scroll-snap-align: start;
|
|
594
956
|
}
|
|
595
957
|
|
|
596
|
-
|
|
597
|
-
|
|
958
|
+
.header-bar {
|
|
959
|
+
scroll-snap-align: start;
|
|
598
960
|
}
|
|
599
961
|
|
|
600
|
-
|
|
601
|
-
|
|
962
|
+
/* ----------- elements ----------- */
|
|
963
|
+
|
|
964
|
+
:host {
|
|
965
|
+
background: none;
|
|
966
|
+
border: none;
|
|
967
|
+
padding: 0;
|
|
968
|
+
|
|
969
|
+
max-height: 100vh;
|
|
970
|
+
max-width: 100vw;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
:host(:not(._horz, ._left, ._right, ._top, ._bottom)) {
|
|
974
|
+
max-width: 800px;
|
|
602
975
|
}
|
|
603
976
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
977
|
+
/* view */
|
|
978
|
+
|
|
979
|
+
.view {
|
|
980
|
+
position: relative;
|
|
981
|
+
flex-grow: 1;
|
|
982
|
+
display: flex;
|
|
983
|
+
|
|
984
|
+
pointer-events: none;
|
|
609
985
|
|
|
610
|
-
|
|
986
|
+
scroll-timeline-name: --view-scroll;
|
|
987
|
+
|
|
988
|
+
overflow-y: auto;
|
|
989
|
+
scrollbar-width: none;
|
|
611
990
|
}
|
|
612
991
|
|
|
613
992
|
:host(._horz) .view {
|
|
@@ -619,7 +998,7 @@
|
|
|
619
998
|
|
|
620
999
|
.view::-webkit-scrollbar { display: none; }
|
|
621
1000
|
|
|
622
|
-
/*
|
|
1001
|
+
/* container */
|
|
623
1002
|
|
|
624
1003
|
.container {
|
|
625
1004
|
position: relative;
|
|
@@ -631,25 +1010,20 @@
|
|
|
631
1010
|
flex-direction: column;
|
|
632
1011
|
}
|
|
633
1012
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
animation-timeline: --view-scroll;
|
|
639
|
-
animation-range: 0 var(--swipe-dismiss-length);
|
|
640
|
-
}
|
|
1013
|
+
/* main */
|
|
1014
|
+
|
|
1015
|
+
.main {
|
|
1016
|
+
flex-grow: 1;
|
|
641
1017
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
animation-range: calc(100% - var(--swipe-dismiss-length)) 100%;
|
|
1018
|
+
min-width: var(--view-width);
|
|
1019
|
+
min-height: var(--view-inner-height);
|
|
645
1020
|
}
|
|
646
1021
|
|
|
647
|
-
/*
|
|
648
|
-
|
|
1022
|
+
/* header */
|
|
1023
|
+
|
|
649
1024
|
header {
|
|
650
1025
|
position: sticky;
|
|
651
1026
|
top: calc(var(--header-box-height) * -1);
|
|
652
|
-
z-index: 2;
|
|
653
1027
|
|
|
654
1028
|
display: flex;
|
|
655
1029
|
flex-direction: column;
|
|
@@ -657,38 +1031,15 @@
|
|
|
657
1031
|
color: var(--header-color-default);
|
|
658
1032
|
background: var(--header-background);
|
|
659
1033
|
|
|
660
|
-
|
|
661
|
-
border-top-right-radius: var(--radius-top-right);
|
|
662
|
-
|
|
663
|
-
order: 1;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
:host(:not(._horz)) header {
|
|
667
|
-
animation-timing-function: linear;
|
|
668
|
-
animation-fill-mode: both;
|
|
669
|
-
animation-name: header-chrome;
|
|
670
|
-
animation-timeline: --view-scroll;
|
|
671
|
-
animation-range: var(--y-scroll-effect-exclude) calc(var(--y-scroll-effect-exclude) + var(--header-box-height));
|
|
1034
|
+
z-index: 2;
|
|
672
1035
|
}
|
|
673
1036
|
|
|
674
|
-
:host(._aero) :is(header, .main, footer) {
|
|
675
|
-
backdrop-filter: blur(var(--aero-blur));
|
|
676
|
-
}
|
|
677
|
-
|
|
678
1037
|
.header-box {
|
|
679
1038
|
position: relative;
|
|
680
1039
|
|
|
681
1040
|
display: flex;
|
|
682
|
-
align-items: center;
|
|
683
|
-
justify-content: center;
|
|
684
|
-
|
|
685
|
-
--transform: translateY(35%);
|
|
686
|
-
|
|
687
|
-
animation-timing-function: linear;
|
|
688
|
-
animation-fill-mode: forwards;
|
|
689
|
-
animation-name: disappear, transform-n;
|
|
690
|
-
animation-timeline: --view-scroll;
|
|
691
|
-
animation-range: var(--y-scroll-effect-exclude) calc(var(--y-scroll-effect-exclude) + (var(--header-box-height) / 2));
|
|
1041
|
+
align-items: center;
|
|
1042
|
+
justify-content: center;
|
|
692
1043
|
}
|
|
693
1044
|
|
|
694
1045
|
:host(._horz) .header-box {
|
|
@@ -697,135 +1048,50 @@
|
|
|
697
1048
|
|
|
698
1049
|
.header-bar {
|
|
699
1050
|
position: relative;
|
|
700
|
-
z-index: 1;
|
|
701
1051
|
|
|
702
1052
|
display: flex;
|
|
703
1053
|
align-items: start;
|
|
704
1054
|
justify-content: space-between;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.header-bar {
|
|
708
1055
|
gap: 0.6rem;
|
|
1056
|
+
|
|
709
1057
|
padding-block: 0.8rem;
|
|
710
1058
|
padding-inline: 1.2rem;
|
|
1059
|
+
|
|
1060
|
+
z-index: 1;
|
|
711
1061
|
}
|
|
712
1062
|
|
|
713
1063
|
.header-left {
|
|
714
1064
|
display: flex;
|
|
715
1065
|
align-items: start;
|
|
716
1066
|
gap: 0.6rem;
|
|
717
|
-
|
|
718
|
-
opacity: 0;
|
|
719
|
-
|
|
720
|
-
animation-timing-function: linear;
|
|
721
|
-
animation-fill-mode: forwards;
|
|
722
|
-
animation-name: appear;
|
|
723
|
-
animation-timeline: --view-scroll;
|
|
724
|
-
animation-range: calc(var(--y-scroll-effect-exclude) + (var(--header-box-height) / 2)) calc(var(--y-scroll-effect-exclude) + var(--header-box-height));
|
|
725
1067
|
}
|
|
726
1068
|
|
|
727
1069
|
:host(._horz) .header-left,
|
|
728
1070
|
header:not(:has(slot[name="header-box"]:is(.has-slotted, :not(:empty)))) .header-left {
|
|
729
|
-
opacity: 1;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
:host([type="info"]) header {
|
|
733
|
-
color: var(--header-color-info);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
:host([type="success"]) header {
|
|
737
|
-
color: var(--header-color-success);
|
|
1071
|
+
opacity: 1 !important;
|
|
738
1072
|
}
|
|
739
1073
|
|
|
740
|
-
|
|
741
|
-
color: var(--header-color-error);
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
/* ----------- */
|
|
1074
|
+
/* footer */
|
|
745
1075
|
|
|
746
1076
|
footer {
|
|
747
1077
|
position: sticky;
|
|
748
1078
|
bottom: 0;
|
|
749
|
-
z-index: 1;
|
|
750
|
-
|
|
751
|
-
border-bottom-left-radius: var(--radius-bottom-left);
|
|
752
|
-
border-bottom-right-radius: var(--radius-bottom-right);
|
|
753
1079
|
|
|
754
1080
|
color: var(--footer-color-default);
|
|
755
1081
|
background: var(--footer-background);
|
|
756
1082
|
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
:host([type="info"]) footer {
|
|
761
|
-
color: var(--footer-color-info);
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
:host([type="success"]) footer {
|
|
765
|
-
color: var(--footer-color-success);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
:host([type="error"]) footer {
|
|
769
|
-
color: var(--footer-color-error);
|
|
1083
|
+
z-index: 1;
|
|
770
1084
|
}
|
|
771
|
-
|
|
772
|
-
/* ------------ */
|
|
773
|
-
|
|
1085
|
+
|
|
774
1086
|
footer .footer-bar {
|
|
775
1087
|
position: sticky;
|
|
776
1088
|
left: 0;
|
|
777
1089
|
right: 0;
|
|
778
1090
|
}
|
|
779
|
-
|
|
780
|
-
/*
|
|
781
|
-
|
|
782
|
-
.view {
|
|
783
|
-
scroll-snap-type: y mandatory;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
:host(._horz) .view {
|
|
787
|
-
scroll-snap-type: x mandatory;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
.view>.spacing,
|
|
791
|
-
.view>.sentinel {
|
|
792
|
-
scroll-snap-align: var(--scroll-snap-start);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
.main {
|
|
796
|
-
flex-grow: 1;
|
|
797
|
-
|
|
798
|
-
min-width: var(--view-width);
|
|
799
|
-
min-height: var(--view-inner-height);
|
|
800
|
-
|
|
801
|
-
scroll-margin-top: var(--header-min-height);
|
|
802
|
-
scroll-margin-bottom: var(--footer-min-height);
|
|
803
|
-
scroll-snap-align: var(--scroll-snap-start);
|
|
804
|
-
|
|
805
|
-
order: 3;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
:host(:is(._top, ._left._horz)) .main {
|
|
809
|
-
scroll-snap-align: none;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
:host(:is(._top, ._left._horz)) .container {
|
|
813
|
-
scroll-snap-align: var(--scroll-snap-start);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
header {
|
|
817
|
-
scroll-snap-align: start;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.header-bar {
|
|
821
|
-
scroll-snap-align: start;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/* ----------- */
|
|
1091
|
+
|
|
1092
|
+
/* scrollport */
|
|
825
1093
|
|
|
826
1094
|
.scrollport-anchor {
|
|
827
|
-
order: 2;
|
|
828
|
-
|
|
829
1095
|
position: sticky;
|
|
830
1096
|
top: var(--header-min-height);
|
|
831
1097
|
bottom: var(--footer-min-height);
|
|
@@ -840,11 +1106,6 @@
|
|
|
840
1106
|
z-index: 1;
|
|
841
1107
|
}
|
|
842
1108
|
|
|
843
|
-
:host(:is(._left._horz, ._top:not(._horz))) .scrollport-anchor {
|
|
844
|
-
justify-content: end;
|
|
845
|
-
order: 4;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
1109
|
.scrollport {
|
|
849
1110
|
position: relative;
|
|
850
1111
|
|
|
@@ -859,76 +1120,12 @@
|
|
|
859
1120
|
height: calc(var(--view-inner-height) - var(--header-box-height));
|
|
860
1121
|
}
|
|
861
1122
|
|
|
862
|
-
/* --
|
|
863
|
-
|
|
864
|
-
:host(._scroll-unfold) .scrollport {
|
|
865
|
-
display: flex;
|
|
866
|
-
flex-direction: column;
|
|
867
|
-
justify-content: space-between;
|
|
868
|
-
align-items: stretch;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
:host(._scroll-unfold._horz) .scrollport {
|
|
872
|
-
flex-direction: row;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
:host(._scroll-unfold) .scrollport .scroll-fold {
|
|
876
|
-
position: sticky;
|
|
877
|
-
opacity: 0;
|
|
878
|
-
|
|
879
|
-
background: var(--background);
|
|
880
|
-
|
|
881
|
-
mask-repeat: no-repeat;
|
|
882
|
-
mask-size: 100% 100%;
|
|
883
|
-
|
|
884
|
-
animation-timing-function: linear;
|
|
885
|
-
animation-fill-mode: forwards;
|
|
886
|
-
animation-name: appear;
|
|
887
|
-
animation-timeline: --view-scroll;
|
|
888
|
-
|
|
889
|
-
animation-range-start: var(--scrollbar-progress-range-start);
|
|
890
|
-
animation-range-end: calc(var(--scrollbar-progress-range-end) + 1px);
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
:host(._scroll-unfold) .scrollport .scroll-fold-end {
|
|
894
|
-
animation-range-start: calc(var(--scrollbar-progress-range-start) - 1px);
|
|
895
|
-
animation-range-end: var(--scrollbar-progress-range-end);
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
:host(._scroll-unfold:not(._horz)) .scrollport .scroll-fold {
|
|
899
|
-
top: var(--header-min-height);
|
|
900
|
-
height: 25%;
|
|
901
|
-
|
|
902
|
-
mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
|
|
903
|
-
-webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
:host(._scroll-unfold:not(._horz)) .scrollport .scroll-fold-end {
|
|
907
|
-
bottom: var(--footer-min-height);
|
|
908
|
-
top: auto;
|
|
909
|
-
opacity: 1;
|
|
910
|
-
animation-name: disappear;
|
|
911
|
-
transform: scaleY(-1);
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
:host(._scroll-unfold._horz) .scrollport .scroll-fold {
|
|
915
|
-
left: 0;
|
|
916
|
-
width: 25%;
|
|
917
|
-
|
|
918
|
-
mask-image: linear-gradient(to right, black 0%, transparent 100%);
|
|
919
|
-
-webkit-mask-image: linear-gradient(to right, black 0%, transparent 100%);
|
|
920
|
-
}
|
|
1123
|
+
/* -- scrollbars -- */
|
|
921
1124
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
left: auto;
|
|
925
|
-
opacity: 1;
|
|
926
|
-
animation-name: disappear;
|
|
927
|
-
transform: scaleX(-1);
|
|
1125
|
+
.scrollbar-track {
|
|
1126
|
+
display: none;
|
|
928
1127
|
}
|
|
929
1128
|
|
|
930
|
-
/* -- scrollbar -- */
|
|
931
|
-
|
|
932
1129
|
:host(._scrollbars) .scrollbar-track {
|
|
933
1130
|
position: absolute;
|
|
934
1131
|
display: block;
|
|
@@ -938,13 +1135,6 @@
|
|
|
938
1135
|
top: 0;
|
|
939
1136
|
right: 0;
|
|
940
1137
|
padding-inline: 2px;
|
|
941
|
-
|
|
942
|
-
opacity: 0;
|
|
943
|
-
|
|
944
|
-
animation: appear linear;
|
|
945
|
-
animation-timeline: --view-scroll;
|
|
946
|
-
animation-range: var(--scrollbar-appear-range);
|
|
947
|
-
animation-fill-mode: forwards;
|
|
948
1138
|
}
|
|
949
1139
|
|
|
950
1140
|
:host(._scrollbars._horz) .scrollbar-track {
|
|
@@ -961,114 +1151,71 @@
|
|
|
961
1151
|
height: var(--scrollbar-thumb-height);
|
|
962
1152
|
background: var(--scrollbar-thumb-color);
|
|
963
1153
|
border-radius: 10px;
|
|
964
|
-
|
|
965
|
-
--scrollbar-thumb-start: translateY(0);
|
|
966
|
-
--scrollbar-thumb-length: translateY(calc(var(--view-inner-height) - 100%));
|
|
967
|
-
|
|
968
|
-
animation: move-scrollbar-thumb linear both;
|
|
969
|
-
animation-timeline: --view-scroll;
|
|
970
|
-
animation-range: var(--scrollbar-progress-range);
|
|
971
1154
|
}
|
|
972
1155
|
|
|
973
1156
|
:host(._scrollbars._horz) .scrollbar-thumb {
|
|
974
1157
|
height: var(--scrollbar-thumb-width);
|
|
975
1158
|
width: var(--scrollbar-thumb-height);
|
|
976
|
-
|
|
977
|
-
--scrollbar-thumb-start: translateX(0);
|
|
978
|
-
--scrollbar-thumb-length: translateX(calc(var(--view-width) - 100%));
|
|
979
1159
|
}
|
|
980
1160
|
|
|
981
|
-
/*
|
|
1161
|
+
/* scroll unfold */
|
|
982
1162
|
|
|
983
|
-
:host(
|
|
1163
|
+
:host(._scroll-unfold) .scrollport {
|
|
984
1164
|
display: flex;
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
@starting-style {
|
|
990
|
-
:host(:popover-open) {
|
|
991
|
-
opacity: 0;
|
|
992
|
-
transform: var(--entry-transform);
|
|
993
|
-
}
|
|
1165
|
+
flex-direction: column;
|
|
1166
|
+
justify-content: space-between;
|
|
1167
|
+
align-items: stretch;
|
|
994
1168
|
}
|
|
995
1169
|
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
:host::backdrop {
|
|
999
|
-
/* Transition */
|
|
1000
|
-
transition:
|
|
1001
|
-
display 0.2s allow-discrete,
|
|
1002
|
-
overlay 0.2s allow-discrete,
|
|
1003
|
-
backdrop-filter 0.2s;
|
|
1170
|
+
:host(._scroll-unfold._horz) .scrollport {
|
|
1171
|
+
flex-direction: row;
|
|
1004
1172
|
}
|
|
1005
|
-
|
|
1006
|
-
:host(.
|
|
1007
|
-
|
|
1173
|
+
|
|
1174
|
+
:host(._scroll-unfold) .scroll-fold {
|
|
1175
|
+
position: sticky;
|
|
1008
1176
|
}
|
|
1009
1177
|
|
|
1010
|
-
:host(.
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
animation-fill-mode: forwards;
|
|
1015
|
-
animation-name: appear;
|
|
1016
|
-
animation-timeline: --view-scroll;
|
|
1017
|
-
|
|
1018
|
-
animation-range: 0 calc(100cqh - var(--expanse-length) - var(--minmax-length));
|
|
1019
|
-
}
|
|
1178
|
+
:host(._scroll-unfold:not(._horz)) {
|
|
1179
|
+
.scroll-fold {
|
|
1180
|
+
height: 25%;
|
|
1181
|
+
}
|
|
1020
1182
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1183
|
+
.scroll-fold-start {
|
|
1184
|
+
top: var(--header-min-height);
|
|
1185
|
+
background: linear-gradient(to bottom, var(--background) 0%, transparent 100%);
|
|
1186
|
+
}
|
|
1024
1187
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1188
|
+
.scroll-fold-end {
|
|
1189
|
+
bottom: var(--footer-min-height);
|
|
1190
|
+
background: linear-gradient(to top, var(--background) 0%, transparent 100%);
|
|
1191
|
+
}
|
|
1029
1192
|
}
|
|
1030
1193
|
|
|
1031
|
-
:host(.
|
|
1032
|
-
|
|
1033
|
-
|
|
1194
|
+
:host(._scroll-unfold._horz) {
|
|
1195
|
+
.scroll-fold {
|
|
1196
|
+
width: 25%;
|
|
1197
|
+
}
|
|
1034
1198
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1199
|
+
.scroll-fold-start {
|
|
1200
|
+
left: 0;
|
|
1201
|
+
background: linear-gradient(to right, var(--background) 0%, transparent 100%);
|
|
1202
|
+
}
|
|
1038
1203
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1204
|
+
.scroll-fold-end {
|
|
1205
|
+
right: 0;
|
|
1206
|
+
background: linear-gradient(to left, var(--background) 0%, transparent 100%);
|
|
1207
|
+
}
|
|
1041
1208
|
}
|
|
1042
1209
|
|
|
1043
|
-
|
|
1044
|
-
backdrop-filter: blur(0px);
|
|
1045
|
-
}
|
|
1210
|
+
/* ----------- theming ----------- */
|
|
1046
1211
|
|
|
1047
|
-
|
|
1048
|
-
:host(:popover-open)::backdrop {
|
|
1049
|
-
backdrop-filter: none;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
:host(:popover-open)::before {
|
|
1054
|
-
position: fixed;
|
|
1055
|
-
inset: 0;
|
|
1056
|
-
display: block;
|
|
1057
|
-
content: "";
|
|
1058
|
-
z-index: -1;
|
|
1059
|
-
}
|
|
1212
|
+
/* aero-blur */
|
|
1060
1213
|
|
|
1061
|
-
.
|
|
1062
|
-
|
|
1063
|
-
opacity: 0.6;
|
|
1214
|
+
:host(._aero) :is(header, .main, footer) {
|
|
1215
|
+
backdrop-filter: blur(var(--aero-blur));
|
|
1064
1216
|
}
|
|
1065
1217
|
|
|
1066
|
-
|
|
1067
|
-
:host([type="success"]) .icon._success,
|
|
1068
|
-
:host([type="error"]) .icon._error,
|
|
1069
|
-
:host([type="warning"]) .icon._warning {
|
|
1070
|
-
display: block;
|
|
1071
|
-
}
|
|
1218
|
+
/* coloring */
|
|
1072
1219
|
|
|
1073
1220
|
:host([type="info"]) .container {
|
|
1074
1221
|
color: var(--color-info);
|
|
@@ -1091,10 +1238,45 @@
|
|
|
1091
1238
|
background: var(--background);
|
|
1092
1239
|
}
|
|
1093
1240
|
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1241
|
+
:host([type="info"]) header {
|
|
1242
|
+
color: var(--header-color-info);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
:host([type="success"]) header {
|
|
1246
|
+
color: var(--header-color-success);
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
:host([type="error"]) header {
|
|
1250
|
+
color: var(--header-color-error);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
:host([type="info"]) footer {
|
|
1254
|
+
color: var(--footer-color-info);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
:host([type="success"]) footer {
|
|
1258
|
+
color: var(--footer-color-success);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
:host([type="error"]) footer {
|
|
1262
|
+
color: var(--footer-color-error);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
/* ----------- icons ----------- */
|
|
1266
|
+
|
|
1267
|
+
.icon {
|
|
1268
|
+
display: none;
|
|
1269
|
+
opacity: 0.6;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
:host([type="info"]) .icon._info,
|
|
1273
|
+
:host([type="success"]) .icon._success,
|
|
1274
|
+
:host([type="error"]) .icon._error,
|
|
1275
|
+
:host([type="warning"]) .icon._warning {
|
|
1276
|
+
display: block;
|
|
1097
1277
|
}
|
|
1278
|
+
|
|
1279
|
+
/* ----------- controls ----------- */
|
|
1098
1280
|
|
|
1099
1281
|
.close-button {
|
|
1100
1282
|
padding-inline: 0;
|
|
@@ -1103,17 +1285,13 @@
|
|
|
1103
1285
|
justify-content: center;
|
|
1104
1286
|
appearance: none;
|
|
1105
1287
|
font-size: inherit;
|
|
1106
|
-
color:
|
|
1288
|
+
color: var(--close-button-color);
|
|
1107
1289
|
cursor: pointer;
|
|
1108
1290
|
border: none;
|
|
1109
1291
|
background: none;
|
|
1110
1292
|
}
|
|
1111
|
-
|
|
1112
|
-
:host(:not([popover="manual"])) {
|
|
1113
|
-
pointer-events: none;
|
|
1114
|
-
}
|
|
1115
1293
|
|
|
1116
|
-
:host(:not([popover="manual"])) .close-button {
|
|
1294
|
+
:host(:not([popover="manual"], ._manual-dismiss)) .close-button {
|
|
1117
1295
|
display: none;
|
|
1118
1296
|
}
|
|
1119
1297
|
|
|
@@ -1129,7 +1307,7 @@
|
|
|
1129
1307
|
|
|
1130
1308
|
${this.css}
|
|
1131
1309
|
</style>
|
|
1132
|
-
`,this.#
|
|
1310
|
+
`,this.#r=this.shadowRoot.querySelector(".view"),this.#e=this.#r.querySelector(".sentinel"),this.#o=this.#r.querySelector(".spacing"),this.#i=this.#r.querySelector("header"),this.#n=this.#r.querySelector(".header-box"),this.#l=this.#r.querySelector("footer")}},p=class extends Event{#r;get data(){return this.#r}constructor(r){super("response"),this.#r=r}},i=class extends l{static get events(){return super.events.concat(["response"])}get delegatesFocus(){return!0}hidePopover(){this.respondWith(null)}respondWith(r){let e=new p(r);super.hidePopover(),this.dispatchEvent(e)}respondWithData(){let r=this.querySelector("form")||this.shadowRoot.querySelector("form");this.respondWith(r)}render(r={}){this.type=r.type;let e=[r.message];r.actions?.[0]&&e.push(`<span slot="action-0">${r.actions[0]}</span>`),r.actions?.[1]&&e.push(`<span slot="action-1">${r.actions[1]}</span>`),this.innerHTML=e.join(`
|
|
1133
1311
|
`)}get actionTexts(){return["Cancel","Submit"]}get footerHTML(){return`
|
|
1134
1312
|
<button
|
|
1135
1313
|
part="action-0"
|
|
@@ -1209,7 +1387,7 @@
|
|
|
1209
1387
|
button.action:not(:has(slot:is(.has-slotted, :not(:empty)))) {
|
|
1210
1388
|
display: none;
|
|
1211
1389
|
}
|
|
1212
|
-
`}},
|
|
1390
|
+
`}},g=class extends i{static get observedAttributes(){return super.observedAttributes.concat(["value","placeholder"])}attributeChangedCallback(r,e,t){super.attributeChangedCallback?.(r,e,t);let s=this.shadowRoot.querySelector("input");r==="value"&&(s.value=t),r==="placeholder"&&(s.placeholder=t)}set placeholder(r){[void 0,null].includes(r)?this.removeAttribute("placeholder"):this.setAttribute("placeholder",r)}get placeholder(){return this.getAttribute("placeholder")}set value(r){[void 0,null].includes(r)?this.removeAttribute("value"):this.setAttribute("value",r)}get value(){return this.getAttribute("value")}respondWithData(){let r=this.shadowRoot.querySelector("input").value;this.respondWith(r)}render(r={}){this.value=r.value,this.placeholder=r.placeholder,super.render(r)}get mainHTML(){return`
|
|
1213
1391
|
<form class="main" part="main" onsubmit="this.getRootNode().host.respondWithData(); event.preventDefault();">
|
|
1214
1392
|
<slot></slot>
|
|
1215
1393
|
<slot name="input">
|
|
@@ -1235,5 +1413,5 @@
|
|
|
1235
1413
|
input::placeholder {
|
|
1236
1414
|
color: currentColor;
|
|
1237
1415
|
}
|
|
1238
|
-
`}},
|
|
1416
|
+
`}},m=class extends i{get actionTexts(){return["No","Yes"]}respondWith(r){super.respondWith(!!r)}respondWithData(){super.respondWith(!0)}},v=class extends i{get actionTexts(){return["","Got it"]}};function u(){try{CSS.registerProperty({name:"--wq-internal-var-radius-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-header-box-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-header-box-progress-a",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-header-box-progress-b",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-minmax-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-minmax-progress-a",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-minmax-progress-b",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-total-minmax-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-swipe-dismiss-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-scrollbar-appear-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-scrollbar-progress",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-scrollbar-progress-a",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}try{CSS.registerProperty({name:"--wq-internal-var-scrollbar-progress-b",syntax:"<number>",inherits:!0,initialValue:"0"})}catch{}customElements.define("wq-toast",h),customElements.define("wq-modal",l),customElements.define("wq-dialog",i),customElements.define("wq-prompt",g),customElements.define("wq-confirm",m),customElements.define("wq-alert",v)}u();})();
|
|
1239
1417
|
//# sourceMappingURL=elements.src.build.js.map
|