@getflip/swirl-components 0.437.0 → 0.438.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +69 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-app-layout_5.cjs.entry.js +10 -7
- package/dist/cjs/swirl-button.cjs.entry.js +7 -5
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.css +82 -36
- package/dist/collection/components/swirl-app-layout/swirl-app-layout.js +54 -6
- package/dist/collection/components/swirl-button/swirl-button.js +7 -5
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/swirl-app-layout2.js +12 -7
- package/dist/components/swirl-button2.js +7 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-app-layout_5.entry.js +10 -7
- package/dist/esm/swirl-button.entry.js +7 -5
- package/dist/esm/swirl-components.js +1 -1
- package/dist/swirl-components/p-7d6f4ebc.entry.js +1 -0
- package/dist/swirl-components/p-91f91a33.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-app-layout/swirl-app-layout.d.ts +3 -1
- package/dist/types/components/swirl-button/swirl-button.d.ts +1 -0
- package/dist/types/components.d.ts +12 -2
- package/package.json +1 -1
- package/vscode-data.json +16 -0
- package/dist/swirl-components/p-661bf0ca.entry.js +0 -1
- package/dist/swirl-components/p-f0477d6a.entry.js +0 -1
|
@@ -139,24 +139,24 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
@media (min-width: 768px) {
|
|
142
|
-
.app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-opening .app-layout__grid {
|
|
142
|
+
.app-layout--has-sidebar:not(.app-layout--has-navigation):not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening .app-layout__grid {
|
|
143
143
|
animation: app-layout-no-nav-sidebar-slide-in 0.3s;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
@media (prefers-reduced-motion) {
|
|
147
|
-
.app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-opening .app-layout__grid {
|
|
147
|
+
.app-layout--has-sidebar:not(.app-layout--has-navigation):not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening .app-layout__grid {
|
|
148
148
|
animation: none
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
@media (min-width: 768px) {
|
|
154
|
-
.app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-closing .app-layout__grid {
|
|
154
|
+
.app-layout--has-sidebar:not(.app-layout--has-navigation):not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing .app-layout__grid {
|
|
155
155
|
animation: app-layout-no-nav-sidebar-slide-out 0.3s;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
@media (prefers-reduced-motion) {
|
|
159
|
-
.app-layout--has-sidebar:not(.app-layout--has-navigation).app-layout--sidebar-closing .app-layout__grid {
|
|
159
|
+
.app-layout--has-sidebar:not(.app-layout--has-navigation):not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing .app-layout__grid {
|
|
160
160
|
animation: none
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -180,7 +180,18 @@
|
|
|
180
180
|
|
|
181
181
|
@media (min-width: 1800px) {
|
|
182
182
|
|
|
183
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-
|
|
183
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay) .app-layout__sidebar {
|
|
184
|
+
position: static;
|
|
185
|
+
width: 25rem;
|
|
186
|
+
z-index: auto;
|
|
187
|
+
box-shadow: none;
|
|
188
|
+
animation: none
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@media (min-width: 1800px) {
|
|
193
|
+
|
|
194
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening .app-layout__grid, .app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-active .app-layout__grid {
|
|
184
195
|
grid-template-columns: 25rem 1fr 25rem;
|
|
185
196
|
grid-template-areas:
|
|
186
197
|
"header body sidebar"
|
|
@@ -189,32 +200,32 @@
|
|
|
189
200
|
}
|
|
190
201
|
|
|
191
202
|
@media (min-width: 1800px) {
|
|
192
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-opening .app-layout__grid {
|
|
203
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening .app-layout__grid {
|
|
193
204
|
animation: app-layout-sidebar-slide-in 0.3s;
|
|
194
205
|
animation-fill-mode: forwards;
|
|
195
206
|
}
|
|
196
207
|
|
|
197
208
|
@media (prefers-reduced-motion) {
|
|
198
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-opening .app-layout__grid {
|
|
209
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening .app-layout__grid {
|
|
199
210
|
animation: none
|
|
200
211
|
}
|
|
201
212
|
}
|
|
202
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-opening.app-layout--nav-collapsed .app-layout__grid, .app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-opening.app-layout--nav-overlayed .app-layout__grid {
|
|
213
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening.app-layout--nav-collapsed .app-layout__grid, .app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-opening.app-layout--nav-overlayed .app-layout__grid {
|
|
203
214
|
animation: app-layout-sidebar-slide-in-with-collapsed-nav 0.3s;
|
|
204
215
|
}
|
|
205
216
|
}
|
|
206
217
|
|
|
207
218
|
@media (min-width: 1800px) {
|
|
208
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-closing .app-layout__grid {
|
|
219
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing .app-layout__grid {
|
|
209
220
|
animation: app-layout-sidebar-slide-out 0.3s;
|
|
210
221
|
}
|
|
211
222
|
|
|
212
223
|
@media (prefers-reduced-motion) {
|
|
213
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-closing .app-layout__grid {
|
|
224
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing .app-layout__grid {
|
|
214
225
|
animation: none
|
|
215
226
|
}
|
|
216
227
|
}
|
|
217
|
-
.app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-closing.app-layout--nav-collapsed .app-layout__grid, .app-layout--has-navigation.app-layout--has-sidebar.app-layout--sidebar-closing.app-layout--nav-overlayed .app-layout__grid {
|
|
228
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing.app-layout--nav-collapsed .app-layout__grid, .app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--sidebar-positioning-overlay).app-layout--sidebar-closing.app-layout--nav-overlayed .app-layout__grid {
|
|
218
229
|
animation: app-layout-sidebar-slide-out-with-collapsed-nav 0.3s;
|
|
219
230
|
}
|
|
220
231
|
}
|
|
@@ -252,7 +263,7 @@
|
|
|
252
263
|
}
|
|
253
264
|
}
|
|
254
265
|
|
|
255
|
-
@media (min-width: 768px)
|
|
266
|
+
@media (min-width: 768px) {
|
|
256
267
|
.app-layout--has-navigation.app-layout--has-sidebar .app-layout__sidebar {
|
|
257
268
|
position: absolute;
|
|
258
269
|
top: 0;
|
|
@@ -260,6 +271,9 @@
|
|
|
260
271
|
bottom: 0;
|
|
261
272
|
width: min(40%, 25rem);
|
|
262
273
|
z-index: 3;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.app-layout--has-navigation.app-layout--has-sidebar:not(.app-layout--rounded-corners) {
|
|
263
277
|
border-left: var(--s-border-width-default) solid var(--s-border-default);
|
|
264
278
|
box-shadow: var(--s-shadow-level-3);
|
|
265
279
|
}
|
|
@@ -326,10 +340,10 @@
|
|
|
326
340
|
|
|
327
341
|
@media (min-width: 1800px) {
|
|
328
342
|
|
|
329
|
-
.app-layout--sidebar-closing .app-layout__sidebar {
|
|
330
|
-
|
|
331
|
-
}
|
|
343
|
+
.app-layout--sidebar-closing:not(.app-layout--sidebar-positioning-overlay) .app-layout__sidebar {
|
|
344
|
+
animation: none
|
|
332
345
|
}
|
|
346
|
+
}
|
|
333
347
|
|
|
334
348
|
.app-layout--has-app-bar-controls .app-layout__app-bar-controls {
|
|
335
349
|
display: block;
|
|
@@ -451,13 +465,6 @@
|
|
|
451
465
|
padding-left: var(--s-space-8);
|
|
452
466
|
}
|
|
453
467
|
|
|
454
|
-
@media (min-width: 768px) {
|
|
455
|
-
|
|
456
|
-
.app-layout__app-bar-mobile-menu-button {
|
|
457
|
-
padding-left: 0
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
468
|
.app-layout__navigation-back-button {
|
|
462
469
|
margin-left: calc(-1 * var(--s-space-4));
|
|
463
470
|
}
|
|
@@ -509,6 +516,7 @@
|
|
|
509
516
|
"app-bar"
|
|
510
517
|
"banner"
|
|
511
518
|
"content";
|
|
519
|
+
background-color: var(--s-background-default);
|
|
512
520
|
}
|
|
513
521
|
|
|
514
522
|
.app-layout__app-bar {
|
|
@@ -519,7 +527,6 @@
|
|
|
519
527
|
min-width: 0;
|
|
520
528
|
align-items: center;
|
|
521
529
|
border-bottom: var(--s-border-width-default) solid transparent;
|
|
522
|
-
background-color: var(--s-background-default);
|
|
523
530
|
grid-area: app-bar;
|
|
524
531
|
gap: var(--s-space-8);
|
|
525
532
|
}
|
|
@@ -528,7 +535,6 @@
|
|
|
528
535
|
display: none;
|
|
529
536
|
min-width: 0;
|
|
530
537
|
align-items: center;
|
|
531
|
-
background-color: var(--s-background-default);
|
|
532
538
|
grid-area: bottom-bar;
|
|
533
539
|
}
|
|
534
540
|
|
|
@@ -571,7 +577,6 @@
|
|
|
571
577
|
|
|
572
578
|
.app-layout__content {
|
|
573
579
|
overflow: auto;
|
|
574
|
-
background-color: var(--s-background-default);
|
|
575
580
|
grid-area: content;
|
|
576
581
|
}
|
|
577
582
|
|
|
@@ -585,6 +590,7 @@
|
|
|
585
590
|
grid-template-areas:
|
|
586
591
|
"sidebar-header"
|
|
587
592
|
"sidebar-content";
|
|
593
|
+
background-color: var(--s-background-default);
|
|
588
594
|
}
|
|
589
595
|
|
|
590
596
|
@media (min-width: 768px) {
|
|
@@ -601,19 +607,10 @@
|
|
|
601
607
|
}
|
|
602
608
|
}
|
|
603
609
|
|
|
604
|
-
@media (min-width: 1800px) {
|
|
605
|
-
|
|
606
|
-
.app-layout__sidebar {
|
|
607
|
-
width: 25rem;
|
|
608
|
-
animation: none
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
610
|
.app-layout__custom-sidebar-header {
|
|
613
611
|
display: none;
|
|
614
612
|
min-width: 0;
|
|
615
613
|
border-bottom: var(--s-border-width-default) solid transparent;
|
|
616
|
-
background-color: var(--s-background-default);
|
|
617
614
|
grid-area: sidebar-header;
|
|
618
615
|
}
|
|
619
616
|
|
|
@@ -626,7 +623,6 @@
|
|
|
626
623
|
padding-left: var(--s-space-8);
|
|
627
624
|
align-items: center;
|
|
628
625
|
border-bottom: var(--s-border-width-default) solid transparent;
|
|
629
|
-
background-color: var(--s-background-default);
|
|
630
626
|
grid-area: sidebar-header;
|
|
631
627
|
gap: var(--s-space-8);
|
|
632
628
|
}
|
|
@@ -656,10 +652,60 @@
|
|
|
656
652
|
|
|
657
653
|
.app-layout__sidebar-content {
|
|
658
654
|
overflow-y: auto;
|
|
659
|
-
background-color: var(--s-background-default);
|
|
660
655
|
grid-area: sidebar-content;
|
|
661
656
|
}
|
|
662
657
|
|
|
658
|
+
@media (min-width: 768px) {
|
|
659
|
+
.app-layout--rounded-corners .app-layout__grid {
|
|
660
|
+
-moz-column-gap: var(--s-space-8);
|
|
661
|
+
column-gap: var(--s-space-8);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.app-layout--rounded-corners .app-layout__header {
|
|
665
|
+
border-right: none;
|
|
666
|
+
border-radius: var(--s-border-radius-l) var(--s-border-radius-l) 0 0;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.app-layout--rounded-corners .app-layout__navigation {
|
|
670
|
+
border-right: none;
|
|
671
|
+
border-radius: 0 0 var(--s-border-radius-l) var(--s-border-radius-l);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.app-layout--rounded-corners .app-layout__body,
|
|
675
|
+
.app-layout--rounded-corners .app-layout__sidebar {
|
|
676
|
+
border-radius: var(--s-border-radius-l);
|
|
677
|
+
overflow: hidden;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.app-layout--rounded-corners .app-layout__sidebar {
|
|
681
|
+
border-left: none;
|
|
682
|
+
/* adaptation of shadow-level-3 to support rounded corners */
|
|
683
|
+
box-shadow: -12px 0 32px -10px rgba(23, 23, 23, 0.12), -8px 4px 12px -8px rgba(23, 23, 23, 0.08);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
@media (min-width: 768px) {
|
|
688
|
+
.app-layout--sidebar-positioning-overlay:not(.app-layout--has-navigation).app-layout--has-sidebar.app-layout--sidebar-active .app-layout__grid, .app-layout--sidebar-positioning-overlay:not(.app-layout--has-navigation).app-layout--has-sidebar.app-layout--sidebar-opening .app-layout__grid {
|
|
689
|
+
grid-template-columns: 100%;
|
|
690
|
+
grid-template-areas:
|
|
691
|
+
"body"
|
|
692
|
+
"body";
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@media (min-width: 768px) {
|
|
697
|
+
.app-layout--sidebar-positioning-overlay:not(.app-layout--has-navigation).app-layout--has-sidebar .app-layout__sidebar {
|
|
698
|
+
position: absolute;
|
|
699
|
+
top: 0;
|
|
700
|
+
right: 0;
|
|
701
|
+
bottom: 0;
|
|
702
|
+
width: min(50%, 25rem);
|
|
703
|
+
z-index: 3;
|
|
704
|
+
border-left: var(--s-border-width-default) solid var(--s-border-default);
|
|
705
|
+
box-shadow: var(--s-shadow-level-3);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
663
709
|
@keyframes app-layout-nav-overlay-slide-in-desktop {
|
|
664
710
|
from {
|
|
665
711
|
width: 0;
|
|
@@ -24,6 +24,7 @@ export class SwirlAppLayout {
|
|
|
24
24
|
this.navigationExpansionStateStorageKey = SWIRL_APP_LAYOUT_NAV_EXPANSION_STATE_STORAGE_KEY;
|
|
25
25
|
this.navigationToggleLabel = "Toggle navigation";
|
|
26
26
|
this.navigationOverlayLabel = "Show navigation";
|
|
27
|
+
this.sidebarPositioning = "auto";
|
|
27
28
|
this.sidebarCloseButtonLabel = "Close sidebar";
|
|
28
29
|
this.transitionStyle = "slides";
|
|
29
30
|
this.contentScrollState = {
|
|
@@ -155,7 +156,8 @@ export class SwirlAppLayout {
|
|
|
155
156
|
clearTimeout(this.sidebarClosingTimeout);
|
|
156
157
|
}
|
|
157
158
|
this.sidebarClosing = true;
|
|
158
|
-
|
|
159
|
+
// 10ms offset to prevent the sidebar from flickering when closing
|
|
160
|
+
const delay = isMobileViewport() || prefersReducedMotion() ? 0 : 300 - 10;
|
|
159
161
|
this.sidebarClosingTimeout = setTimeout(() => {
|
|
160
162
|
this.sidebarActive = false;
|
|
161
163
|
this.sidebarClosing = false;
|
|
@@ -308,7 +310,7 @@ export class SwirlAppLayout {
|
|
|
308
310
|
(!this.collapsibleNavigation ||
|
|
309
311
|
this.navExpansionState !== "collapsed" ||
|
|
310
312
|
!this.isDesktop);
|
|
311
|
-
const className = classnames("app-layout", `app-layout--mobile-view-${this.mobileView}`, `app-layout--nav-${this.isDesktop ? this.navExpansionState : "expanded"}`, `app-layout--transitioning-from-${this.transitioningFrom}`, `app-layout--transitioning-to-${this.transitioningTo}`, `app-layout--transition-style-${this.transitionStyle}`, {
|
|
313
|
+
const className = classnames("app-layout", `app-layout--mobile-view-${this.mobileView}`, `app-layout--nav-${this.isDesktop ? this.navExpansionState : "expanded"}`, `app-layout--transitioning-from-${this.transitioningFrom}`, `app-layout--transitioning-to-${this.transitioningTo}`, `app-layout--transition-style-${this.transitionStyle}`, `app-layout--sidebar-positioning-${this.sidebarPositioning}`, {
|
|
312
314
|
"app-layout--content-scrollable": this.contentScrollState.scrollable,
|
|
313
315
|
"app-layout--content-scrolled-to-top": this.contentScrollState.scrolledToTop,
|
|
314
316
|
"app-layout--content-scrolled-to-bottom": this.contentScrollState.scrolledToBottom,
|
|
@@ -324,20 +326,21 @@ export class SwirlAppLayout {
|
|
|
324
326
|
"app-layout--nav-collapsible": this.collapsibleNavigation && this.isDesktop,
|
|
325
327
|
"app-layout--nav-scrollable": this.navScrollState.scrollable,
|
|
326
328
|
"app-layout--nav-scrolled-to-top": this.navScrollState.scrolledToTop,
|
|
329
|
+
"app-layout--rounded-corners": this.roundedCorners,
|
|
327
330
|
"app-layout--sidebar-active": this.mobileView === "sidebar" || this.sidebarActive,
|
|
328
331
|
"app-layout--sidebar-closing": this.sidebarClosing,
|
|
329
332
|
"app-layout--sidebar-opening": this.sidebarOpening,
|
|
330
333
|
"app-layout--sidebar-scrollable": this.sidebarScrollState.scrollable,
|
|
331
334
|
"app-layout--sidebar-scrolled-to-top": this.sidebarScrollState.scrolledToTop,
|
|
332
335
|
});
|
|
333
|
-
return (h(Host, { key: '
|
|
336
|
+
return (h(Host, { key: 'df8a5acd24320b865a9c4cf032bf2fb703ed3386' }, h("section", { key: 'e7016cf44a4cfa485b08019f41c01c2005f9dfef', "aria-labelledby": "app-name", class: className }, h("div", { key: '13b615d04a0378b81bc9053dc7b65e80366f1852', class: "app-layout__grid" }, h("header", { key: '24ab8601f721a963a7f731c47a9000cadb496453', class: "app-layout__header", ref: (el) => (this.headerEl = el) }, h("span", { key: '8370880b409c548483eb737fe135ca1de0cbca62', class: "app-layout__navigation-mobile-menu-button" }, h("slot", { key: 'a0dce39b41e162e153142bb40e1fbafd70bdc8d9', name: "navigation-mobile-menu-button" })), this.collapsibleNavigation && (h("span", { key: '5da184e76a533f8621d06d8f0e6707de9712ffd3', class: "app-layout__nav-overlay-toggle" }, h("swirl-button", { key: 'd99c208b7a0904f0829381fbe9711951675e2305', hideLabel: true, icon: this.navExpansionState !== "expanded"
|
|
334
337
|
? "<swirl-icon-dock-left-expand></swirl-icon-dock-left-expand>"
|
|
335
|
-
: "<swirl-icon-dock-left-collapse></swirl-icon-dock-left-collapse>", label: this.navigationToggleLabel, onClick: this.toggleNavigation }))), this.showNavigationBackButton && (h("span", { key: '
|
|
338
|
+
: "<swirl-icon-dock-left-collapse></swirl-icon-dock-left-collapse>", label: this.navigationToggleLabel, onClick: this.toggleNavigation }))), this.showNavigationBackButton && (h("span", { key: 'f317b07b3c7680772a43c7e882dabdf88110a69f', class: "app-layout__navigation-back-button" }, h("swirl-button", { key: 'fc7dde4d4b6401f007e2f798b39f4f4fb7144fe0', hideLabel: true, icon: "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.navigationBackButtonLabel, onClick: this.onNavigationBackButtonClick }))), h("swirl-heading", { key: '235f3529e5a479a0803985f6ed5ad8b960aeed26', as: "h1", class: "app-layout__app-name", headingId: "app-name", level: 3, text: this.appName }), navigationActive && (h("span", { key: 'ae1cca0ddc466f7ffb910d64cdcf1b81cb56ccdb', class: "app-layout__navigation-controls" }, h("slot", { key: 'cdb33bb61253985cef2adb2800dba9c817759a76', name: "navigation-controls" })))), h("nav", { key: '8afc88add61d69ff5015f3e0cef1b9fd923df7c8', "aria-label": this.navigationLabel, class: "app-layout__navigation", onScroll: this.onNavScroll, ref: (el) => (this.navEl = el), inert: this.isDesktop &&
|
|
336
339
|
this.collapsibleNavigation &&
|
|
337
|
-
this.navExpansionState === "collapsed" }, h("slot", { key: '
|
|
340
|
+
this.navExpansionState === "collapsed" }, h("slot", { key: '45c7901638de02975cef711f76144c01ce569d28', name: "navigation" })), h("section", { key: '5a4be5e6f097151ab095d4580e7cd77d3fc0261e', "aria-labelledby": "app-name", class: "app-layout__body" }, !this.hideAppBar && (h("header", { key: '56fb7311e24e1d556034c23a7cd69a53a55644cf', class: "app-layout__app-bar" }, h("span", { key: 'dbd7ebbe69ff5c2a951f256d5ea64b3507e346d6', class: "app-layout__app-bar-mobile-menu-button" }, h("slot", { key: 'e0ae20e33b99ade5e06abe18dfdcf1187bf97d1f', name: "app-bar-mobile-menu-button" })), showBackToNavigationButton && (h("span", { key: '908cb69f87ba63753d52edca57b248e1001e84b2', class: "app-layout__back-to-navigation-button" }, h("swirl-button", { key: '740f2d35bbe48bbe5c6f0019089beeda1d90d60e', hideLabel: true, icon: this.transitionStyle === "dialog"
|
|
338
341
|
? "<swirl-icon-close></swirl-icon-close>"
|
|
339
342
|
: "<swirl-icon-arrow-back></swirl-icon-arrow-back>", label: this.backToNavigationViewButtonLabel, onClick: this.onBackToNavigationViewButtonClick }))), this.collapsibleNavigation &&
|
|
340
|
-
this.navExpansionState !== "expanded" && (h("span", { key: '
|
|
343
|
+
this.navExpansionState !== "expanded" && (h("span", { key: 'b0df382fabdb5760d873bc9fa4b7be5f2c46c90d', class: "app-layout__nav-expansion-toggle" }, h("swirl-button", { key: '969148a7a8e88f44f566172daaef506a926bd875', hideLabel: true, icon: "<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>", label: this.navigationOverlayLabel, onClick: this.overlayNavigation }))), h("span", { key: '56a4370295b8631ae6581315ef112adb91a9380c', class: "app-layout__custom-app-bar-back-button" }, h("slot", { key: '89ba2faf27b331bc70154ab4fcc5e51249436d91', name: "custom-app-bar-back-button" })), h("div", { key: '32722f7370724e615b5ecf4716b13b554c7777a9', class: "app-layout__app-bar-content" }, h("slot", { key: '78706429b99c7b9102dc325ce4b9f74b56bc0440', name: "app-bar" })), h("div", { key: 'f923d55ed6f8a2972116c8d43c987128384d62db', class: "app-layout__app-bar-controls" }, h("slot", { key: 'b3935748903a08089da4e667a9542431a208920e', name: "app-bar-controls" })))), h("div", { key: '669b851e195c49406c87a281d30b48449b8797ce', class: "app-layout__banner" }, h("slot", { key: 'cea8e68f02a259eece9aa0b6abd04f842078f8b9', name: "banner" })), h("div", { key: '39a8168686aee0134a3e0d8ebf473b5e50d5a5c7', class: "app-layout__content", onScroll: this.onContentScroll, ref: (el) => (this.contentEl = el) }, h("slot", { key: '854a3787e72fb6f9a45e47b051e707b686d6dbc8', name: "content" })), h("div", { key: '1986d465287b3a74ba85556c948ae2f0840bcef8', class: "app-layout__bottom-bar" }, h("slot", { key: 'b0c50199b0b75aa7b3e60a9ed6cf82465b2d499c', name: "bottom-bar" }))), h("aside", { key: '083484009691c0278cb7d5762bfb00b8557354d6', class: "app-layout__sidebar" }, h("header", { key: 'd7ae4b461dbcd81ecacc7afac2c7a5d11ad9177b', class: "app-layout__custom-sidebar-header" }, h("slot", { key: '01bdd1689ed091bc0673d859b1d400f5b40ec6dd', name: "custom-sidebar-header" })), h("header", { key: '9a8d6ecc2a6bf0f8f80103cf8277861f760fc7e3', class: "app-layout__sidebar-header" }, h("swirl-button", { key: '16138381869b8fb622e75f0644721d0752f111fc', class: "app-layout__sidebar-close-button", hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.sidebarCloseButtonLabel, onClick: this.onSidebarCloseButtonClick }), h("swirl-heading", { key: 'f500b1f029b89346d262c4cfb12c465a5e19c941', as: "h3", class: "app-layout__sidebar-heading", headingId: "sidebar-heading", level: 3, text: this.sidebarHeading })), h("div", { key: '5fc3cee15e4dc3d8c39f6a3aca0f72474297f1d6', class: "app-layout__sidebar-content", onScroll: this.onSidebarScroll, ref: (el) => (this.sidebarEl = el) }, h("slot", { key: '007392df47e74ff25300563853e6cf85a157a566', name: "sidebar" }))), h("span", { key: 'a3f6719b121bc8103938526879b081a49e0630ff', class: "app-layout__floating-action-button" }, this.ctaLabel && (h("swirl-button", { key: 'afdf4c3e3adcfa4bc5daace58de67a72086939fb', hideLabel: Boolean(this.ctaIcon), icon: this.ctaIcon, intent: "primary", label: this.ctaLabel, onClick: this.onCtaClick, variant: "floating" })), h("slot", { key: '3662430e701b8c6e05c1d3f2c16fd15995cd5b94', name: "floating-action-button" }))))));
|
|
341
344
|
}
|
|
342
345
|
static get is() { return "swirl-app-layout"; }
|
|
343
346
|
static get encapsulation() { return "shadow"; }
|
|
@@ -611,6 +614,25 @@ export class SwirlAppLayout {
|
|
|
611
614
|
"setter": false,
|
|
612
615
|
"reflect": false
|
|
613
616
|
},
|
|
617
|
+
"roundedCorners": {
|
|
618
|
+
"type": "boolean",
|
|
619
|
+
"attribute": "rounded-corners",
|
|
620
|
+
"mutable": false,
|
|
621
|
+
"complexType": {
|
|
622
|
+
"original": "boolean",
|
|
623
|
+
"resolved": "boolean",
|
|
624
|
+
"references": {}
|
|
625
|
+
},
|
|
626
|
+
"required": false,
|
|
627
|
+
"optional": true,
|
|
628
|
+
"docs": {
|
|
629
|
+
"tags": [],
|
|
630
|
+
"text": ""
|
|
631
|
+
},
|
|
632
|
+
"getter": false,
|
|
633
|
+
"setter": false,
|
|
634
|
+
"reflect": false
|
|
635
|
+
},
|
|
614
636
|
"showNavigationBackButton": {
|
|
615
637
|
"type": "boolean",
|
|
616
638
|
"attribute": "show-navigation-back-button",
|
|
@@ -630,6 +652,32 @@ export class SwirlAppLayout {
|
|
|
630
652
|
"setter": false,
|
|
631
653
|
"reflect": false
|
|
632
654
|
},
|
|
655
|
+
"sidebarPositioning": {
|
|
656
|
+
"type": "string",
|
|
657
|
+
"attribute": "sidebar-positioning",
|
|
658
|
+
"mutable": false,
|
|
659
|
+
"complexType": {
|
|
660
|
+
"original": "SwirlAppLayoutSidebarPositioning",
|
|
661
|
+
"resolved": "\"auto\" | \"overlay\"",
|
|
662
|
+
"references": {
|
|
663
|
+
"SwirlAppLayoutSidebarPositioning": {
|
|
664
|
+
"location": "local",
|
|
665
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-app-layout/swirl-app-layout.tsx",
|
|
666
|
+
"id": "src/components/swirl-app-layout/swirl-app-layout.tsx::SwirlAppLayoutSidebarPositioning"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"required": false,
|
|
671
|
+
"optional": true,
|
|
672
|
+
"docs": {
|
|
673
|
+
"tags": [],
|
|
674
|
+
"text": ""
|
|
675
|
+
},
|
|
676
|
+
"getter": false,
|
|
677
|
+
"setter": false,
|
|
678
|
+
"reflect": false,
|
|
679
|
+
"defaultValue": "\"auto\""
|
|
680
|
+
},
|
|
633
681
|
"sidebarCloseButtonLabel": {
|
|
634
682
|
"type": "string",
|
|
635
683
|
"attribute": "sidebar-close-button-label",
|
|
@@ -20,16 +20,18 @@ export class SwirlButton {
|
|
|
20
20
|
componentDidLoad() {
|
|
21
21
|
this.updateFormAttribute();
|
|
22
22
|
this.mediaQueryUnsubscribe = DesktopMediaQuery.subscribe((isDesktop) => {
|
|
23
|
-
this.
|
|
23
|
+
this.isDesktop = isDesktop;
|
|
24
|
+
this.forceIconProps();
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
componentDidRender() {
|
|
27
28
|
this.updateFormAttribute();
|
|
29
|
+
this.forceIconProps();
|
|
28
30
|
}
|
|
29
31
|
disconnectedCallback() {
|
|
30
32
|
this.mediaQueryUnsubscribe();
|
|
31
33
|
}
|
|
32
|
-
forceIconProps(
|
|
34
|
+
forceIconProps() {
|
|
33
35
|
if (!Boolean(this.iconEl)) {
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
@@ -37,7 +39,7 @@ export class SwirlButton {
|
|
|
37
39
|
if (icon?.tagName.startsWith("SWIRL-ICON") ||
|
|
38
40
|
icon?.tagName.startsWith("SWIRL-EMOJI") ||
|
|
39
41
|
icon?.tagName.startsWith("SWIRL-SYMBOL")) {
|
|
40
|
-
icon?.setAttribute("size",
|
|
42
|
+
icon?.setAttribute("size", this.isDesktop ? "20" : "24");
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
getAriaLabel(hideLabel) {
|
|
@@ -77,13 +79,13 @@ export class SwirlButton {
|
|
|
77
79
|
"button--pressed": this.pressed,
|
|
78
80
|
});
|
|
79
81
|
const Tag = isLink ? "a" : "button";
|
|
80
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '08f425e502d0f95c2cefd7468e1dcafa24ee48cc', style: { pointerEvents: this.disabled ? "none" : "" } }, h(Tag, { key: '78c9d582bacd29ed0bb5045b701da915621d1988', "aria-controls": this.swirlAriaControls, "aria-current": this.swirlAriaCurrent, "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled && !isLink ? "true" : undefined, "aria-expanded": this.swirlAriaExpanded, "aria-haspopup": this.swirlAriaHaspopup, "aria-label": ariaLabel, "aria-pressed": this.pressed ? "true" : undefined, class: className, disabled: isLink ? undefined : this.disabled, download: isLink ? undefined : this.download, form: isLink ? undefined : this.form, href: this.href, name: isLink ? undefined : this.name, ref: (el) => (this.buttonEl = el), target: isLink ? this.target : undefined, type: isLink ? undefined : this.type, value: isLink ? undefined : this.value, style: {
|
|
81
83
|
cursor: !this.disabled && this.cursor !== "pointer"
|
|
82
84
|
? this.cursor
|
|
83
85
|
: undefined,
|
|
84
86
|
fontSize: this.inheritFontSize ? "inherit" : undefined,
|
|
85
87
|
lineHeight: this.inheritFontSize ? "inherit" : undefined,
|
|
86
|
-
} }, Boolean(this.icon) && (h("span", { key: '
|
|
88
|
+
} }, Boolean(this.icon) && (h("span", { key: 'ca742100720788f3b187a2b4eb7d24a0527da881', class: "button__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), !Boolean(this.icon) && (h("span", { key: '85c755f928c33a2076a28ae44c961ecd48126749', class: "button__icon", ref: (el) => (this.iconEl = el) }, h("slot", { key: '84a67a65f34f200261c1a70b0f3d3679f8413351', name: "icon" }))), !hideLabel && h("span", { key: '33d82152407febb56c8b27a956b1a60b9eb9d61e', class: "button__label" }, this.label), hasTag && (h("span", { key: 'dd715d4605571e384e6a28b110191474ca4b0c44', class: "button__tag" }, h("slot", { key: '3a5e3a9b4f54048fb16c0dca3ccdc4ff11c7f699', name: "tag" }))), hasTrailingSlot && (h("div", { key: 'd3d469056217738fce0c0485d18785be43df66a9', class: "button__trailing-slot" }, h("slot", { key: '55b7587f089c3cfbc832e46e18e78421d559fe3b', name: "trailing" }))))));
|
|
87
89
|
}
|
|
88
90
|
static get is() { return "swirl-button"; }
|
|
89
91
|
static get encapsulation() { return "scoped"; }
|