@getflip/swirl-components 0.288.0 → 0.289.0
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 +296 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-action-list_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-app-layout_5.cjs.entry.js +1 -1
- package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
- package/dist/cjs/swirl-banner.cjs.entry.js +1 -1
- package/dist/cjs/swirl-button.cjs.entry.js +1 -1
- package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
- package/dist/cjs/swirl-chip.cjs.entry.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-date-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-file-viewer_8.cjs.entry.js +1 -1
- package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon-check-small_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/swirl-inline-status.cjs.entry.js +1 -1
- package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
- package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
- package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
- package/dist/cjs/swirl-option-list_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
- package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
- package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +1 -1
- package/dist/cjs/swirl-search.cjs.entry.js +1 -1
- package/dist/cjs/swirl-select.cjs.entry.js +1 -1
- package/dist/cjs/swirl-shell-layout.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tab-bar.cjs.entry.js +34 -4
- package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tabs.cjs.entry.js +7 -3
- package/dist/cjs/swirl-text-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-time-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toast.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/{utils-ea8f1bbc.js → utils-1a1dd8d3.js} +16 -0
- package/dist/collection/components/swirl-modal/swirl-modal.css +11 -0
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.css +72 -30
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.js +104 -4
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.spec.js +4 -4
- package/dist/collection/components/swirl-tabs/swirl-tabs.js +77 -3
- package/dist/collection/components/swirl-tabs/swirl-tabs.spec.js +1 -1
- package/dist/collection/utils.js +15 -0
- package/dist/components/swirl-app-layout2.js +1 -1
- package/dist/components/swirl-date-picker2.js +1 -1
- package/dist/components/swirl-file-viewer-pdf2.js +1 -1
- package/dist/components/swirl-modal.js +1 -1
- package/dist/components/swirl-tab-bar2.js +38 -5
- package/dist/components/swirl-tabs.js +10 -3
- package/dist/components/utils.js +16 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-action-list_2.entry.js +1 -1
- package/dist/esm/swirl-app-layout_5.entry.js +1 -1
- package/dist/esm/swirl-autocomplete.entry.js +1 -1
- package/dist/esm/swirl-banner.entry.js +1 -1
- package/dist/esm/swirl-button.entry.js +1 -1
- package/dist/esm/swirl-carousel.entry.js +1 -1
- package/dist/esm/swirl-chip.entry.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-console-layout.entry.js +1 -1
- package/dist/esm/swirl-date-input.entry.js +1 -1
- package/dist/esm/swirl-date-picker_2.entry.js +1 -1
- package/dist/esm/swirl-file-viewer_8.entry.js +1 -1
- package/dist/esm/swirl-form-control.entry.js +1 -1
- package/dist/esm/swirl-icon-check-small_3.entry.js +1 -1
- package/dist/esm/swirl-icon-error_3.entry.js +1 -1
- package/dist/esm/swirl-image-grid-item.entry.js +1 -1
- package/dist/esm/swirl-inline-status.entry.js +1 -1
- package/dist/esm/swirl-lightbox.entry.js +1 -1
- package/dist/esm/swirl-menu-item.entry.js +1 -1
- package/dist/esm/swirl-menu.entry.js +1 -1
- package/dist/esm/swirl-modal.entry.js +1 -1
- package/dist/esm/swirl-option-list_2.entry.js +1 -1
- package/dist/esm/swirl-pagination.entry.js +1 -1
- package/dist/esm/swirl-pdf-reader.entry.js +1 -1
- package/dist/esm/swirl-popover_2.entry.js +1 -1
- package/dist/esm/swirl-resource-list-file-item.entry.js +1 -1
- package/dist/esm/swirl-search.entry.js +1 -1
- package/dist/esm/swirl-select.entry.js +1 -1
- package/dist/esm/swirl-shell-layout.entry.js +1 -1
- package/dist/esm/swirl-tab-bar.entry.js +35 -5
- package/dist/esm/swirl-table-column.entry.js +1 -1
- package/dist/esm/swirl-table-row.entry.js +1 -1
- package/dist/esm/swirl-table.entry.js +1 -1
- package/dist/esm/swirl-tabs.entry.js +7 -3
- package/dist/esm/swirl-text-input.entry.js +1 -1
- package/dist/esm/swirl-time-input.entry.js +1 -1
- package/dist/esm/swirl-toast.entry.js +1 -1
- package/dist/esm/swirl-toolbar.entry.js +1 -1
- package/dist/esm/{utils-fbb8b494.js → utils-877a768f.js} +16 -1
- package/dist/swirl-components/{p-3035680c.entry.js → p-06bdccc8.entry.js} +1 -1
- package/dist/swirl-components/{p-e5fa524b.entry.js → p-107317f7.entry.js} +1 -1
- package/dist/swirl-components/p-138cbd38.entry.js +1 -0
- package/dist/swirl-components/{p-1a8cc28b.entry.js → p-1a6e40b5.entry.js} +1 -1
- package/dist/swirl-components/{p-1d545c20.entry.js → p-1fb940a5.entry.js} +1 -1
- package/dist/swirl-components/{p-97e844bc.entry.js → p-20bd4e9f.entry.js} +1 -1
- package/dist/swirl-components/{p-13dfb234.entry.js → p-242a3a2e.entry.js} +1 -1
- package/dist/swirl-components/{p-ac4d5f89.entry.js → p-286a4e5f.entry.js} +1 -1
- package/dist/swirl-components/{p-8aae965a.entry.js → p-2be118fe.entry.js} +1 -1
- package/dist/swirl-components/{p-581d4452.entry.js → p-3393c37e.entry.js} +1 -1
- package/dist/swirl-components/{p-c58fb3e4.entry.js → p-40a8920a.entry.js} +1 -1
- package/dist/swirl-components/{p-84fedd39.entry.js → p-4203d5bd.entry.js} +1 -1
- package/dist/swirl-components/{p-d55652aa.entry.js → p-42a8e0d3.entry.js} +1 -1
- package/dist/swirl-components/{p-a075cbf9.entry.js → p-47997f42.entry.js} +1 -1
- package/dist/swirl-components/{p-0f3e0216.js → p-5136b9f9.js} +1 -1
- package/dist/swirl-components/{p-30d69cd9.entry.js → p-53609073.entry.js} +1 -1
- package/dist/swirl-components/{p-3d225eb0.entry.js → p-648b2513.entry.js} +1 -1
- package/dist/swirl-components/{p-a935ab50.entry.js → p-67986fbf.entry.js} +1 -1
- package/dist/swirl-components/{p-21adf412.entry.js → p-6e63989b.entry.js} +1 -1
- package/dist/swirl-components/{p-5d981c71.entry.js → p-729b5778.entry.js} +1 -1
- package/dist/swirl-components/{p-56085b5f.entry.js → p-8105788c.entry.js} +1 -1
- package/dist/swirl-components/{p-5c750dc8.entry.js → p-879737fa.entry.js} +1 -1
- package/dist/swirl-components/{p-626aa890.entry.js → p-881701f9.entry.js} +1 -1
- package/dist/swirl-components/{p-6a3a0bbb.entry.js → p-896d79a5.entry.js} +1 -1
- package/dist/swirl-components/p-8d7ad114.entry.js +1 -0
- package/dist/swirl-components/{p-6ccc3c41.entry.js → p-917fbbd8.entry.js} +1 -1
- package/dist/swirl-components/{p-3400acf0.entry.js → p-9536fdc4.entry.js} +1 -1
- package/dist/swirl-components/{p-a7bf1966.entry.js → p-a2afb995.entry.js} +1 -1
- package/dist/swirl-components/{p-389b4dc5.entry.js → p-a9f98674.entry.js} +1 -1
- package/dist/swirl-components/{p-abcbb236.entry.js → p-b6eaeb29.entry.js} +1 -1
- package/dist/swirl-components/{p-e97590df.entry.js → p-ba40bf8f.entry.js} +1 -1
- package/dist/swirl-components/{p-da913f77.entry.js → p-c202911e.entry.js} +1 -1
- package/dist/swirl-components/{p-1449f6ec.entry.js → p-c71f17c9.entry.js} +1 -1
- package/dist/swirl-components/{p-305b560c.entry.js → p-d587d1b6.entry.js} +1 -1
- package/dist/swirl-components/{p-dee55c67.entry.js → p-db3dc350.entry.js} +1 -1
- package/dist/swirl-components/{p-4de8e4d1.entry.js → p-de850f13.entry.js} +1 -1
- package/dist/swirl-components/{p-279f67be.entry.js → p-ea418410.entry.js} +1 -1
- package/dist/swirl-components/{p-8efcb985.entry.js → p-eb81439a.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-tab-bar/swirl-tab-bar.d.ts +7 -0
- package/dist/types/components/swirl-tabs/swirl-tabs.d.ts +4 -1
- package/dist/types/components.d.ts +16 -4
- package/dist/types/utils.d.ts +13 -0
- package/package.json +1 -1
- package/vscode-data.json +144 -0
- package/dist/swirl-components/p-0dacf15d.entry.js +0 -1
- package/dist/swirl-components/p-9f59a11b.entry.js +0 -1
|
@@ -12,9 +12,19 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
width: 100%;
|
|
14
14
|
justify-content: flex-start;
|
|
15
|
-
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
scrollbar-width: none;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
.tab-bar.tab-bar--variant-default {
|
|
20
|
+
border-bottom: var(--swirl-tab-bar-border-width) solid
|
|
21
|
+
var(--s-border-default);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tab-bar.tab-bar--variant-pill {
|
|
25
|
+
gap: var(--s-space-8);
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
.tab-bar--justify-evenly > * {
|
|
19
29
|
flex: 1;
|
|
20
30
|
}
|
|
@@ -22,13 +32,12 @@
|
|
|
22
32
|
.tab-bar__tab {
|
|
23
33
|
position: relative;
|
|
24
34
|
display: flex;
|
|
25
|
-
min-width:
|
|
35
|
+
min-width: -webkit-fit-content;
|
|
36
|
+
min-width: -moz-fit-content;
|
|
37
|
+
min-width: fit-content;
|
|
26
38
|
margin: 0;
|
|
27
|
-
padding: var(--s-space-4) var(--s-space-8);
|
|
28
39
|
align-items: center;
|
|
29
40
|
border: none;
|
|
30
|
-
color: var(--s-interactive-neutral-default);
|
|
31
|
-
background-color: transparent;
|
|
32
41
|
font: inherit;
|
|
33
42
|
font-weight: var(--s-font-weight-medium);
|
|
34
43
|
line-height: var(--s-line-height-lg);
|
|
@@ -36,28 +45,77 @@
|
|
|
36
45
|
justify-content: center;
|
|
37
46
|
}
|
|
38
47
|
|
|
39
|
-
.tab-bar__tab
|
|
40
|
-
|
|
48
|
+
.tab-bar__tab.tab-bar__tab--variant-default {
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
color: var(--s-interactive-neutral-default);
|
|
51
|
+
padding: var(--s-space-4) var(--s-space-8);
|
|
41
52
|
}
|
|
42
53
|
|
|
43
|
-
.tab-bar__tab:
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
.tab-bar__tab.tab-bar__tab--variant-default:not(.tab-bar__tab--active):hover:after {
|
|
55
|
+
position: absolute;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
left: 50%;
|
|
58
|
+
width: calc(100% - var(--s-space-8));
|
|
59
|
+
height: 0.1875rem;
|
|
60
|
+
border-radius: 0.125rem;
|
|
61
|
+
background-color: var(--s-border-default);
|
|
62
|
+
content: "";
|
|
63
|
+
transform: translateX(-50%);
|
|
64
|
+
pointer-events: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active {
|
|
68
|
+
color: var(--s-text-highlight);
|
|
46
69
|
}
|
|
47
70
|
|
|
48
|
-
.tab-bar__tab
|
|
71
|
+
.tab-bar__tab.tab-bar__tab--variant-default.tab-bar__tab--active:after {
|
|
49
72
|
position: absolute;
|
|
50
73
|
bottom: 0;
|
|
51
74
|
left: 50%;
|
|
52
75
|
width: calc(100% - var(--s-space-8));
|
|
53
76
|
height: 0.1875rem;
|
|
54
77
|
border-radius: 0.125rem;
|
|
55
|
-
background-color: var(--s-border-
|
|
78
|
+
background-color: var(--s-border-highlight);
|
|
56
79
|
content: "";
|
|
57
80
|
transform: translateX(-50%);
|
|
58
81
|
pointer-events: none;
|
|
59
82
|
}
|
|
60
83
|
|
|
84
|
+
.tab-bar__tab.tab-bar__tab--variant-default:focus {
|
|
85
|
+
outline: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.tab-bar__tab.tab-bar__tab--variant-default:focus-visible .tab-bar__tab-label {
|
|
89
|
+
border-radius: var(--s-border-radius-s);
|
|
90
|
+
box-shadow: inset 0 0 0 0.125rem var(--s-focus-default);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tab-bar__tab.tab-bar__tab--variant-pill {
|
|
94
|
+
border-radius: var(--s-border-radius-full-round);
|
|
95
|
+
background: var(--s-action-neutral-default);
|
|
96
|
+
color: var(--s-text-default);
|
|
97
|
+
padding: var(--s-space-8) var(--s-space-16);
|
|
98
|
+
gap: var(--s-space-8);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.tab-bar__tab.tab-bar__tab--variant-pill:hover {
|
|
102
|
+
background: var(--s-action-neutral-hovered);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.tab-bar__tab.tab-bar__tab--variant-pill:active {
|
|
106
|
+
background: var(--s-action-neutral-pressed);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.tab-bar__tab.tab-bar__tab--variant-pill.tab-bar__tab--active {
|
|
110
|
+
background: var(--s-action-primary-default);
|
|
111
|
+
color: var(--s-text-on-action-primary);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.tab-bar__tab.tab-bar__tab--variant-pill:focus-visible {
|
|
115
|
+
outline-color: var(--s-focus-default);
|
|
116
|
+
outline-offset: var(--s-space-2);
|
|
117
|
+
}
|
|
118
|
+
|
|
61
119
|
@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {
|
|
62
120
|
|
|
63
121
|
.tab-bar__tab {
|
|
@@ -73,26 +131,10 @@
|
|
|
73
131
|
|
|
74
132
|
.tab-bar__tab-label {
|
|
75
133
|
display: inline-flex;
|
|
76
|
-
overflow: hidden;
|
|
77
134
|
padding: var(--s-space-8) var(--s-space-8);
|
|
78
135
|
text-align: center;
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
text-overflow: ellipsis;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.tab-bar__tab--active {
|
|
84
|
-
color: var(--s-text-highlight);
|
|
85
136
|
}
|
|
86
137
|
|
|
87
|
-
.tab-bar__tab--
|
|
88
|
-
|
|
89
|
-
bottom: 0;
|
|
90
|
-
left: 50%;
|
|
91
|
-
width: calc(100% - var(--s-space-8));
|
|
92
|
-
height: 0.1875rem;
|
|
93
|
-
border-radius: 0.125rem;
|
|
94
|
-
background-color: var(--s-border-highlight);
|
|
95
|
-
content: "";
|
|
96
|
-
transform: translateX(-50%);
|
|
97
|
-
pointer-events: none;
|
|
138
|
+
.tab-bar__tab-label.tab-bar__tab-label--variant-pill {
|
|
139
|
+
padding: 0;
|
|
98
140
|
}
|
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import classnames from "classnames";
|
|
3
|
+
import { getCircularArrayIndex } from "../../utils";
|
|
3
4
|
export class SwirlTabBar {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.onKeyDown = (event) => {
|
|
6
7
|
if (event.code === "ArrowLeft") {
|
|
7
8
|
event.preventDefault();
|
|
9
|
+
this.focusAdjacentTab(true);
|
|
8
10
|
this.activatePreviousTab.emit();
|
|
9
11
|
}
|
|
10
12
|
else if (event.code === "ArrowRight") {
|
|
11
13
|
event.preventDefault();
|
|
14
|
+
this.focusAdjacentTab(false);
|
|
12
15
|
this.activateNextTab.emit();
|
|
13
16
|
}
|
|
14
17
|
};
|
|
15
18
|
this.disableTabSemantics = undefined;
|
|
16
19
|
this.label = undefined;
|
|
17
20
|
this.justify = "start";
|
|
21
|
+
this.paddingBlockEnd = undefined;
|
|
22
|
+
this.paddingBlockStart = undefined;
|
|
18
23
|
this.paddingInlineEnd = undefined;
|
|
19
24
|
this.paddingInlineStart = undefined;
|
|
20
25
|
this.tabs = [];
|
|
26
|
+
this.variant = "default";
|
|
27
|
+
}
|
|
28
|
+
focusAdjacentTab(previous) {
|
|
29
|
+
const tabs = this.getTabs();
|
|
30
|
+
const selectedTabIndex = tabs.findIndex((tab) => tab.ariaSelected === "true");
|
|
31
|
+
const nextIndex = getCircularArrayIndex(previous ? selectedTabIndex - 1 : selectedTabIndex + 1, tabs.length);
|
|
32
|
+
tabs[nextIndex].focus();
|
|
33
|
+
}
|
|
34
|
+
getTabs() {
|
|
35
|
+
return Array.from(this.el.querySelectorAll('[role="tab"]'));
|
|
21
36
|
}
|
|
22
37
|
render() {
|
|
23
|
-
const className = classnames("tab-bar", `tab-bar--justify-${this.justify}
|
|
38
|
+
const className = classnames("tab-bar", `tab-bar--justify-${this.justify}`, {
|
|
39
|
+
"tab-bar--variant-pill": this.variant === "pill",
|
|
40
|
+
"tab-bar--variant-default": this.variant === "default",
|
|
41
|
+
});
|
|
24
42
|
const styles = {
|
|
25
43
|
paddingInlineEnd: Boolean(this.paddingInlineEnd)
|
|
26
44
|
? `var(--s-space-${this.paddingInlineEnd})`
|
|
@@ -28,10 +46,21 @@ export class SwirlTabBar {
|
|
|
28
46
|
paddingInlineStart: Boolean(this.paddingInlineStart)
|
|
29
47
|
? `var(--s-space-${this.paddingInlineStart})`
|
|
30
48
|
: undefined,
|
|
49
|
+
paddingBlockEnd: Boolean(this.paddingBlockEnd)
|
|
50
|
+
? `var(--s-space-${this.paddingBlockEnd})`
|
|
51
|
+
: undefined,
|
|
52
|
+
paddingBlockStart: Boolean(this.paddingBlockStart)
|
|
53
|
+
? `var(--s-space-${this.paddingBlockStart})`
|
|
54
|
+
: undefined,
|
|
31
55
|
};
|
|
32
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'deb50eba4e47565ae6338a5af43b7a0a1054e6b1' }, h("div", { key: '75cc9b8e1ffbe76ff00165fb3428799fcd7ea2ac', "aria-label": this.label, class: className, onKeyDown: this.onKeyDown, role: this.disableTabSemantics ? undefined : "tablist", style: styles }, this.tabs.map((tab) => {
|
|
33
57
|
const className = classnames("tab-bar__tab", {
|
|
34
58
|
"tab-bar__tab--active": tab.active,
|
|
59
|
+
"tab-bar__tab--variant-pill": this.variant === "pill",
|
|
60
|
+
"tab-bar__tab--variant-default": this.variant === "default",
|
|
61
|
+
});
|
|
62
|
+
const labelClassName = classnames("tab-bar__tab-label", {
|
|
63
|
+
"tab-bar__tab-label--variant-pill": this.variant === "pill",
|
|
35
64
|
});
|
|
36
65
|
return (h("button", { "aria-controls": this.disableTabSemantics ? undefined : tab.id, "aria-selected": this.disableTabSemantics
|
|
37
66
|
? undefined
|
|
@@ -39,7 +68,7 @@ export class SwirlTabBar {
|
|
|
39
68
|
? "true"
|
|
40
69
|
: "false", class: className, id: `tab-${tab.id}`, key: tab.id,
|
|
41
70
|
// eslint-disable-next-line react/jsx-no-bind
|
|
42
|
-
onClick: () => this.activateTab.emit(tab.id), role: this.disableTabSemantics ? undefined : "tab", tabIndex: this.disableTabSemantics ? undefined : tab.active ? 0 : -1, type: "button" }, tab.icon && (h("span", { class: "tab-bar__tab-icon", innerHTML: tab.icon })), h("span", { class:
|
|
71
|
+
onClick: () => this.activateTab.emit(tab.id), role: this.disableTabSemantics ? undefined : "tab", tabIndex: this.disableTabSemantics ? undefined : tab.active ? 0 : -1, type: "button" }, tab.icon && (h("span", { class: "tab-bar__tab-icon", innerHTML: tab.icon })), h("span", { class: labelClassName }, tab.label)));
|
|
43
72
|
}))));
|
|
44
73
|
}
|
|
45
74
|
static get is() { return "swirl-tab-bar"; }
|
|
@@ -114,6 +143,52 @@ export class SwirlTabBar {
|
|
|
114
143
|
"reflect": false,
|
|
115
144
|
"defaultValue": "\"start\""
|
|
116
145
|
},
|
|
146
|
+
"paddingBlockEnd": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "SwirlTabBarPadding",
|
|
151
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"4\" | \"8\"",
|
|
152
|
+
"references": {
|
|
153
|
+
"SwirlTabBarPadding": {
|
|
154
|
+
"location": "local",
|
|
155
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-tab-bar/swirl-tab-bar.tsx",
|
|
156
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarPadding"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"required": false,
|
|
161
|
+
"optional": true,
|
|
162
|
+
"docs": {
|
|
163
|
+
"tags": [],
|
|
164
|
+
"text": ""
|
|
165
|
+
},
|
|
166
|
+
"attribute": "padding-block-end",
|
|
167
|
+
"reflect": false
|
|
168
|
+
},
|
|
169
|
+
"paddingBlockStart": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"mutable": false,
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "SwirlTabBarPadding",
|
|
174
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"4\" | \"8\"",
|
|
175
|
+
"references": {
|
|
176
|
+
"SwirlTabBarPadding": {
|
|
177
|
+
"location": "local",
|
|
178
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-tab-bar/swirl-tab-bar.tsx",
|
|
179
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarPadding"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": true,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
},
|
|
189
|
+
"attribute": "padding-block-start",
|
|
190
|
+
"reflect": false
|
|
191
|
+
},
|
|
117
192
|
"paddingInlineEnd": {
|
|
118
193
|
"type": "string",
|
|
119
194
|
"mutable": false,
|
|
@@ -181,6 +256,30 @@ export class SwirlTabBar {
|
|
|
181
256
|
"text": ""
|
|
182
257
|
},
|
|
183
258
|
"defaultValue": "[]"
|
|
259
|
+
},
|
|
260
|
+
"variant": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "SwirlTabBarVariant",
|
|
265
|
+
"resolved": "\"default\" | \"pill\"",
|
|
266
|
+
"references": {
|
|
267
|
+
"SwirlTabBarVariant": {
|
|
268
|
+
"location": "local",
|
|
269
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-tab-bar/swirl-tab-bar.tsx",
|
|
270
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarVariant"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"required": false,
|
|
275
|
+
"optional": true,
|
|
276
|
+
"docs": {
|
|
277
|
+
"tags": [],
|
|
278
|
+
"text": ""
|
|
279
|
+
},
|
|
280
|
+
"attribute": "variant",
|
|
281
|
+
"reflect": false,
|
|
282
|
+
"defaultValue": "\"default\""
|
|
184
283
|
}
|
|
185
284
|
};
|
|
186
285
|
}
|
|
@@ -232,4 +331,5 @@ export class SwirlTabBar {
|
|
|
232
331
|
}
|
|
233
332
|
}];
|
|
234
333
|
}
|
|
334
|
+
static get elementRef() { return "el"; }
|
|
235
335
|
}
|
|
@@ -26,18 +26,18 @@ describe("swirl-tab-bar", () => {
|
|
|
26
26
|
await page.waitForChanges();
|
|
27
27
|
expect(page.root).toEqualHtml(`
|
|
28
28
|
<swirl-tab-bar label="Tabs">
|
|
29
|
-
<div aria-label="Tabs" class="tab-bar tab-bar--justify-start" role="tablist">
|
|
30
|
-
<button aria-controls="tab1" aria-selected="false" class="tab-bar__tab" id="tab-tab1" role="tab" tabindex="-1" type="button">
|
|
29
|
+
<div aria-label="Tabs" class="tab-bar tab-bar--justify-start tab-bar--variant-default" role="tablist">
|
|
30
|
+
<button aria-controls="tab1" aria-selected="false" class="tab-bar__tab tab-bar__tab--variant-default" id="tab-tab1" role="tab" tabindex="-1" type="button">
|
|
31
31
|
<span class="tab-bar__tab-label">
|
|
32
32
|
Tab #1
|
|
33
33
|
</span>
|
|
34
34
|
</button>
|
|
35
|
-
<button aria-controls="tab2" aria-selected="true" class="tab-bar__tab tab-bar__tab--active" id="tab-tab2" role="tab" tabindex="0" type="button">
|
|
35
|
+
<button aria-controls="tab2" aria-selected="true" class="tab-bar__tab tab-bar__tab--variant-default tab-bar__tab--active" id="tab-tab2" role="tab" tabindex="0" type="button">
|
|
36
36
|
<span class="tab-bar__tab-label">
|
|
37
37
|
Tab #2
|
|
38
38
|
</span>
|
|
39
39
|
</button>
|
|
40
|
-
<button aria-controls="tab3" aria-selected="false" class="tab-bar__tab" id="tab-tab3" role="tab" tabindex="-1" type="button">
|
|
40
|
+
<button aria-controls="tab3" aria-selected="false" class="tab-bar__tab tab-bar__tab--variant-default" id="tab-tab3" role="tab" tabindex="-1" type="button">
|
|
41
41
|
<span class="tab-bar__tab-label">
|
|
42
42
|
Tab #3
|
|
43
43
|
</span>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { getCircularArrayIndex } from "../../utils";
|
|
2
3
|
export class SwirlTabs {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.tabs = [];
|
|
@@ -14,8 +15,11 @@ export class SwirlTabs {
|
|
|
14
15
|
this.initialTab = undefined;
|
|
15
16
|
this.label = undefined;
|
|
16
17
|
this.justifyTabBar = undefined;
|
|
18
|
+
this.tabBarPaddingBlockEnd = undefined;
|
|
19
|
+
this.tabBarPaddingBlockStart = undefined;
|
|
17
20
|
this.tabBarPaddingInlineEnd = undefined;
|
|
18
21
|
this.tabBarPaddingInlineStart = undefined;
|
|
22
|
+
this.tabBarVariant = "default";
|
|
19
23
|
this.activeTab = undefined;
|
|
20
24
|
this.tabBarTabs = [];
|
|
21
25
|
}
|
|
@@ -43,7 +47,7 @@ export class SwirlTabs {
|
|
|
43
47
|
}
|
|
44
48
|
activateNextTab() {
|
|
45
49
|
const currentIndex = this.tabs.findIndex((tab) => tab.tabId === this.activeTab);
|
|
46
|
-
const nextIndex =
|
|
50
|
+
const nextIndex = getCircularArrayIndex(currentIndex + 1, this.tabs.length);
|
|
47
51
|
this.activateTab(this.tabs[nextIndex].tabId);
|
|
48
52
|
requestAnimationFrame(() => {
|
|
49
53
|
this.el.querySelector(".tabs__tab--active")?.focus();
|
|
@@ -51,7 +55,7 @@ export class SwirlTabs {
|
|
|
51
55
|
}
|
|
52
56
|
activatePreviousTab() {
|
|
53
57
|
const currentIndex = this.tabs.findIndex((tab) => tab.tabId === this.activeTab);
|
|
54
|
-
const previousIndex =
|
|
58
|
+
const previousIndex = getCircularArrayIndex(currentIndex - 1, this.tabs.length);
|
|
55
59
|
this.activateTab(this.tabs[previousIndex].tabId);
|
|
56
60
|
requestAnimationFrame(() => {
|
|
57
61
|
this.el.querySelector(".tabs__tab--active")?.focus();
|
|
@@ -74,7 +78,7 @@ export class SwirlTabs {
|
|
|
74
78
|
}));
|
|
75
79
|
}
|
|
76
80
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '1ac2dfa2ae746878117dd5a9d084c4f01b3bfea8' }, h("div", { key: '01e1a9a7f5fd4801af2bd54750f3e7954a6fff50', class: "tabs" }, h("swirl-tab-bar", { key: '9435cfed3336d04ae4f531992c26e1fbd54c4520', label: this.label, onActivateNextTab: this.onActivateNextTab, onActivatePreviousTab: this.onActivatePreviousTab, onActivateTab: this.onActivateTab, tabs: this.tabBarTabs, justify: this.justifyTabBar, paddingBlockEnd: this.tabBarPaddingBlockEnd, paddingBlockStart: this.tabBarPaddingBlockStart, paddingInlineEnd: this.tabBarPaddingInlineEnd, paddingInlineStart: this.tabBarPaddingInlineStart, variant: this.tabBarVariant })), h("slot", { key: '649844c197a13ebc8cd4a7925acb1cf48d728404' })));
|
|
78
82
|
}
|
|
79
83
|
static get is() { return "swirl-tabs"; }
|
|
80
84
|
static get encapsulation() { return "scoped"; }
|
|
@@ -147,6 +151,52 @@ export class SwirlTabs {
|
|
|
147
151
|
"attribute": "justify-tab-bar",
|
|
148
152
|
"reflect": false
|
|
149
153
|
},
|
|
154
|
+
"tabBarPaddingBlockEnd": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "SwirlTabBarPadding",
|
|
159
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"4\" | \"8\"",
|
|
160
|
+
"references": {
|
|
161
|
+
"SwirlTabBarPadding": {
|
|
162
|
+
"location": "import",
|
|
163
|
+
"path": "../swirl-tab-bar/swirl-tab-bar",
|
|
164
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarPadding"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": true,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": ""
|
|
173
|
+
},
|
|
174
|
+
"attribute": "tab-bar-padding-block-end",
|
|
175
|
+
"reflect": false
|
|
176
|
+
},
|
|
177
|
+
"tabBarPaddingBlockStart": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "SwirlTabBarPadding",
|
|
182
|
+
"resolved": "\"0\" | \"12\" | \"16\" | \"2\" | \"20\" | \"24\" | \"4\" | \"8\"",
|
|
183
|
+
"references": {
|
|
184
|
+
"SwirlTabBarPadding": {
|
|
185
|
+
"location": "import",
|
|
186
|
+
"path": "../swirl-tab-bar/swirl-tab-bar",
|
|
187
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarPadding"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": true,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": ""
|
|
196
|
+
},
|
|
197
|
+
"attribute": "tab-bar-padding-block-start",
|
|
198
|
+
"reflect": false
|
|
199
|
+
},
|
|
150
200
|
"tabBarPaddingInlineEnd": {
|
|
151
201
|
"type": "string",
|
|
152
202
|
"mutable": false,
|
|
@@ -192,6 +242,30 @@ export class SwirlTabs {
|
|
|
192
242
|
},
|
|
193
243
|
"attribute": "tab-bar-padding-inline-start",
|
|
194
244
|
"reflect": false
|
|
245
|
+
},
|
|
246
|
+
"tabBarVariant": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"mutable": false,
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "SwirlTabBarVariant",
|
|
251
|
+
"resolved": "\"default\" | \"pill\"",
|
|
252
|
+
"references": {
|
|
253
|
+
"SwirlTabBarVariant": {
|
|
254
|
+
"location": "import",
|
|
255
|
+
"path": "../swirl-tab-bar/swirl-tab-bar",
|
|
256
|
+
"id": "src/components/swirl-tab-bar/swirl-tab-bar.tsx::SwirlTabBarVariant"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": true,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [],
|
|
264
|
+
"text": ""
|
|
265
|
+
},
|
|
266
|
+
"attribute": "tab-bar-variant",
|
|
267
|
+
"reflect": false,
|
|
268
|
+
"defaultValue": "\"default\""
|
|
195
269
|
}
|
|
196
270
|
};
|
|
197
271
|
}
|
|
@@ -17,7 +17,7 @@ describe("swirl-tabs", () => {
|
|
|
17
17
|
expect(page.root).toEqualHtml(`
|
|
18
18
|
<swirl-tabs label="Tabs">
|
|
19
19
|
<div class="tabs">
|
|
20
|
-
<swirl-tab-bar label="Tabs"></swirl-tab-bar>
|
|
20
|
+
<swirl-tab-bar label="Tabs" variant="default"></swirl-tab-bar>
|
|
21
21
|
</div>
|
|
22
22
|
<swirl-tab aria-labelledby="tab-tab-1" class="tab tab--active" id="tab-1" label="Tab #1" role="tabpanel" tab-id="tab-1" tabindex="0" style="padding: var(--s-space-8);">
|
|
23
23
|
<mock:shadow-root>
|
package/dist/collection/utils.js
CHANGED
|
@@ -194,3 +194,18 @@ export function getISODateString(date) {
|
|
|
194
194
|
}
|
|
195
195
|
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
196
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Adjusts the index to fit inside the length of the array, going in a circular fashion.
|
|
199
|
+
* Index of 5 in a list of length = 5 becomes 0 (first item).
|
|
200
|
+
* Index of -1 in a list of length = 5 becomes 4 (last item).
|
|
201
|
+
*
|
|
202
|
+
* This function is needed due to a known Javascript issue with the modulo operator.
|
|
203
|
+
* https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers
|
|
204
|
+
*
|
|
205
|
+
* @param index - The next desired index
|
|
206
|
+
* @param arrayLength - The length of the array
|
|
207
|
+
* @returns The adjusted index
|
|
208
|
+
*/
|
|
209
|
+
export function getCircularArrayIndex(index, arrayLength) {
|
|
210
|
+
return ((index % arrayLength) + arrayLength) % arrayLength;
|
|
211
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as classNames } from './index2.js';
|
|
3
|
-
import { g as getDesktopMediaQuery, d as debounce, i as isMobileViewport,
|
|
3
|
+
import { g as getDesktopMediaQuery, d as debounce, i as isMobileViewport, h as prefersReducedMotion } from './utils.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './swirl-button2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './swirl-heading2.js';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { r as removeTimezoneOffset,
|
|
2
|
+
import { r as removeTimezoneOffset, j as getISODateString } from './utils.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './wc-datepicker2.js';
|
|
4
4
|
|
|
5
5
|
const swirlDatePickerCss = ":host{display:block}:host *{box-sizing:border-box}.date-picker{padding:var(--s-space-8) var(--s-space-16);background-color:var(--s-surface-overlay-default);font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);letter-spacing:var(--s-letter-spacing-tighter)}@media (min-width: 768px){.date-picker{max-width:17.5rem}}.date-picker__header{display:flex;margin-bottom:var(--s-space-8);align-items:center}.date-picker__current-month{display:flex;padding:var(--s-space-8);flex-grow:1;align-items:center;order:1;gap:var(--s-space-4)}.date-picker__next-month-button,.date-picker__previous-month-button{position:relative;display:inline-flex;width:2.5rem;height:2.5rem;margin:0;padding:0;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:50%;color:var(--s-icon-highlight);background-color:transparent;cursor:pointer}.date-picker__next-month-button:after,.date-picker__previous-month-button:after{position:absolute;background-color:currentColor;content:\"\";inset:0;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.date-picker__next-month-button:hover,.date-picker__previous-month-button:hover{background-color:var(--s-surface-overlay-hovered)}.date-picker__next-month-button:focus:not(:focus-visible),.date-picker__previous-month-button:focus:not(:focus-visible){outline:none}.date-picker__next-month-button:focus-visible,.date-picker__previous-month-button:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__next-month-button>svg,.date-picker__previous-month-button>svg{display:none}.date-picker__next-month-button{order:3}.date-picker__next-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__previous-month-button{order:2}.date-picker__previous-month-button:after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg class='swirl-icon swirl-icon--size-24' fill='none' height='24' part='icon' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z' fill='currentColor'%3E%3C/path%3E%3C/svg%3E\")}.date-picker__month-select,.date-picker__year-select{margin:0;padding:0;border:none;background-color:var(--s-surface-overlay-default);font:inherit;font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left;cursor:pointer}.date-picker__month-select:focus:not(:focus-visible),.date-picker__year-select:focus:not(:focus-visible){outline:none}.date-picker__month-select:focus-visible,.date-picker__year-select:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-picker__month-select,.date-picker__year-select{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-picker__month-select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.date-picker__year-select{max-width:4rem}.date-picker__calendar{display:block;width:100%}.date-picker__calendar tbody{display:block}.date-picker__calendar-header{display:block}.date-picker__weekday-row,.date-picker__calendar-row{display:flex}.date-picker__weekday-row{margin-bottom:var(--s-space-8)}.date-picker__weekday{display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;color:var(--s-text-subdued);font-weight:var(--s-font-weight-regular);aspect-ratio:1}.date-picker__date{position:relative;z-index:1;display:inline-flex;min-width:2.25rem;flex-basis:calc(100 / 7 * 1%);justify-content:center;align-items:center;font-weight:var(--s-font-weight-medium);cursor:pointer;aspect-ratio:1}.date-picker__date:before{position:absolute;z-index:-1;border-radius:50%;background-color:transparent;content:\"\";inset:0}.date-picker__date:hover:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:before{background-color:var(--s-surface-overlay-hovered)}.date-picker__date--current:focus:not(:focus-visible){outline:none}.date-picker__date--current:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-picker__date--overflowing{color:var(--s-text-subdued)}.date-picker__date--selected{color:var(--s-text-on-action-primary)}.date-picker__date--selected:before{background-color:var(--s-action-primary-default)}.date-picker__date--selected:hover{color:var(--s-text-on-action-primary)}.date-picker__date--selected:hover:before{background-color:var(--s-action-primary-hovered)}.date-picker__date--selected>strong{font-weight:var(--s-font-weight-medium)}.date-picker__date--in-range:not(.date-picker__date--selected):after{position:absolute;border-radius:0px;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0px}.date-picker__date--start:not(.date-picker__date--end){color:var(--s-text-on-action-primary)}.date-picker__date--start:not(.date-picker__date--end):before{background-color:var(--s-action-primary-default)}.date-picker__date--start:not(.date-picker__date--end):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 0 0.0625rem 50%}.date-picker__date--end:not(.date-picker__date--start){color:var(--s-text-on-action-primary)}.date-picker__date--end:not(.date-picker__date--start):before{background-color:var(--s-action-primary-default)}.date-picker__date--end:not(.date-picker__date--start):after{position:absolute;z-index:-1;border-radius:0;background-color:var(--s-action-primary-default);content:\"\";opacity:0.2;inset:0.0625rem 50% 0.0625rem 0}.date-picker__date--today:before{box-shadow:inset 0 0 0 var(--s-border-width-default)\n var(--s-border-highlight)}.date-picker__date--today>em{font-style:normal}.date-picker__date--disabled{color:var(--s-text-disabled);cursor:default;pointer-events:none}.date-picker__date--disabled:before{background-color:transparent}.date-picker__date--disabled:hover{color:var(--s-text-disabled)}.date-picker__date--disabled:hover:before{background-color:transparent}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as classNames } from './index2.js';
|
|
3
3
|
import { c as commonjsGlobal, g as getAugmentedNamespace, a as getDefaultExportFromCjs, b as commonjsRequire } from './_commonjsHelpers.js';
|
|
4
|
-
import { d as debounce,
|
|
4
|
+
import { d as debounce, k as getVisibleHeight, i as isMobileViewport } from './utils.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './swirl-icon-error2.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './swirl-inline-error2.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './swirl-spinner2.js';
|
|
@@ -7,7 +7,7 @@ import { d as defineCustomElement$4 } from './swirl-button-group2.js';
|
|
|
7
7
|
import { d as defineCustomElement$3 } from './swirl-heading2.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './swirl-stack2.js';
|
|
9
9
|
|
|
10
|
-
const swirlModalCss = ":host{display:block}:host *{box-sizing:border-box}.modal{--swirl-ghost-button-background-default:var(--s-surface-overlay-default);--swirl-ghost-button-background-hovered:var(--s-surface-overlay-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-overlay-pressed);--swirl-resource-list-item-background-default:var(\n --s-surface-overlay-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-overlay-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-overlay-pressed\n );--swirl-modal-height:auto;--swirl-modal-max-height:90vh;--swirl-modal-view-height:100vh;--swirl-modal-max-width:40rem;--swirl-modal-footer-padding-small:var(--s-space-12) var(--s-space-16)\n var(--s-space-12) var(--s-space-16);--swirl-modal-footer-padding-large:var(--s-space-16) var(--s-space-24)\n var(--s-space-16) var(--s-space-24)}@supports (height: 100dvh){.modal{--swirl-modal-max-height:90dvh;--swirl-modal-view-height:100dvh}}.modal{position:fixed;z-index:var(--s-z-40);display:flex;justify-content:center;align-items:center;height:var(--swirl-modal-view-height);inset:0}.modal[aria-hidden=\"true\"]{display:none}.modal--variant-default.modal--closing{animation:0.15s modal-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-default.modal--closing{animation:none}}.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:0.15s modal-backdrop-fade-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:none}}.modal--variant-default:not(.modal--closing) .modal__body{animation:0.15s modal-scale-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__body{animation:none}}.modal--variant-drawer{justify-content:end;align-items:stretch}.modal--variant-drawer.modal--closing{animation:0.15s modal-drawer-slide-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-drawer.modal--closing{animation:none}}@media (min-width: 768px){.modal--variant-drawer.modal--hide-label .modal__header-bar{height:auto;padding-top:var(--s-space-4);padding-bottom:var(--s-space-4)}}.modal--variant-drawer .modal__backdrop{background-color:transparent;animation:none}.modal--variant-drawer .modal__body{height:100%;max-height:none;border-radius:0;animation:0.15s modal-drawer-slide-in;box-shadow:var(--s-shadow-level-3)}@media (prefers-reduced-motion){.modal--variant-drawer .modal__body{animation:none}}.modal--variant-drawer .modal__header-bar{background-color:var(--s-surface-overlay-default)}.modal--variant-drawer .modal__header-bar .modal__close-button{margin-left:calc(-1 * var(--s-space-8))}@media (min-width: 768px){.modal--variant-drawer .modal__header-bar{flex-direction:row}}@media (min-width: 768px){.modal--variant-drawer.modal--padded .modal__content{padding-top:var(--s-space-8)}}.modal--padded .modal__content{padding-top:var(--s-space-24);padding-right:var(--s-space-16);padding-bottom:var(--s-space-24);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal--padded .modal__content{padding-top:0;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:var(--s-space-24)}}@media (min-width: 768px){.modal--scrollable .modal__content{padding-bottom:0}}.modal--scrollable:not(.modal--scrolled-down).modal--has-custom-footer .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--scrollable:not(.modal--scrolled-down):not(.modal--has-custom-footer) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-custom-header .modal__custom-header{display:block}.modal--has-custom-header .modal__content{padding-top:var(--s-space-16)}.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-header-tools .modal__header{border-bottom-color:transparent}.modal--has-header-tools .modal__header-tools{display:block}.modal--has-secondary-content .modal__body{max-width:64rem}.modal--has-secondary-content:not(.modal--has-header-tools):not(.modal--hide-secondary-content-borders) .modal__header{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-header-tools:not(.modal--hide-secondary-content-borders) .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-custom-footer:not(.modal--hide-secondary-content-borders) .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-secondary-content:not(.modal--has-custom-footer):not(.modal--hide-secondary-content-borders) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 992px){.modal--has-secondary-content .modal__header-tools,.modal--has-secondary-content .modal__content{padding-right:0}}.modal--has-secondary-content .modal__primary-content{overflow:visible;max-height:60%;flex-basis:auto}@media (min-width: 992px){.modal--has-secondary-content .modal__primary-content{max-width:calc(100% - 24rem);max-height:none;flex-basis:calc(100% - 24rem)}}.modal--has-secondary-content .modal__secondary-content{display:block}@media (min-width: 768px){.modal--scrolled:not(.modal--has-header-tools) .modal__header{border-bottom-color:var(--s-border-default)}.modal--scrolled.modal--has-header-tools .modal__header-tools{border-bottom-color:var(--s-border-default)}}.modal__backdrop{position:fixed;background-color:rgba(0, 0, 0, 0.2);inset:0}.modal__body{--swirl-card-background-default:var(--s-surface-overlay-default);--swirl-card-background-hovered:var(--s-surface-overlay-hovered);--swirl-card-background-pressed:var(--s-surface-overlay-pressed);--swirl-accordion-item-toggle-default:var(--s-surface-overlay-default);--swirl-accordion-item-toggle-hovered:var(--s-surface-overlay-hovered);--swirl-accordion-item-toggle-pressed:var(--s-surface-overlay-pressed);position:relative;z-index:var(--s-z-40);display:flex;overflow:hidden;width:100vw;height:var(--swirl-modal-view-height);background-color:var(--s-surface-overlay-default);flex-direction:column}@media (min-width: 768px){.modal__body{width:90vw;max-width:var(--swirl-modal-max-width);max-height:var(--swirl-modal-max-height);border-radius:var(--s-border-radius-base);box-shadow:var(--s-shadow-level-3)}}@media (min-width: 992px){.modal__body{height:var(--swirl-modal-height)}}.modal__header{border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header{border-bottom:var(--s-border-width-default) solid transparent}}.modal__header-bar{display:flex;height:3.5rem;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-shrink:0;align-items:center;gap:var(--s-space-8)}@media (min-width: 768px){.modal__header-bar{height:3.75rem;padding-top:var(--s-space-12);padding-right:var(--s-space-24);padding-bottom:var(--s-space-12);padding-left:var(--s-space-24);flex-direction:row-reverse;gap:var(--s-space-16)}}.modal__header-tools{display:none;padding-right:var(--s-space-16);padding-left:var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header-tools{padding-right:var(--s-space-24);padding-left:var(--s-space-24);border-bottom-color:transparent}}.modal__custom-header{display:none;flex-shrink:0;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}.modal__heading{overflow:hidden}.modal__heading .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.modal__content-container{display:flex;overflow:hidden;flex-grow:1;flex-direction:column;gap:var(--s-space-24)}@media (min-width: 992px){.modal__content-container{flex-direction:row}}.modal__primary-content{display:flex;overflow:hidden;flex-basis:100%;flex-direction:column}.modal__content{overflow-x:hidden;overflow-y:auto;height:100%}.modal__content ::slotted(*){margin:0}.modal__secondary-content{display:none;overflow:visible;overflow-x:hidden;overflow-y:auto;max-width:none;max-height:40%;padding-right:var(--s-space-16);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal__secondary-content{padding-left:var(--s-space-24)}}@media (min-width: 992px){.modal__secondary-content{overflow-x:hidden;overflow-y:auto;max-width:24rem;max-height:none;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:0;flex-basis:50%}}.modal__custom-footer{flex-shrink:0}.modal__controls{display:flex;padding:var(--swirl-modal-footer-padding-small);flex-shrink:0;justify-content:flex-end}@media (min-width: 768px){.modal__controls{padding:var(--swirl-modal-footer-padding-large)}}@keyframes modal-scale-in{from{transform:scale(0)}to{transform:scale(1)}}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-fade-out{from{opacity:1}to{opacity:0}}@keyframes modal-drawer-slide-in{from{transform:translate3d(100%, 0, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes modal-drawer-slide-out{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0)}}";
|
|
10
|
+
const swirlModalCss = ":host{display:block}:host *{box-sizing:border-box}.modal{--swirl-ghost-button-background-default:var(--s-surface-overlay-default);--swirl-ghost-button-background-hovered:var(--s-surface-overlay-hovered);--swirl-ghost-button-background-pressed:var(--s-surface-overlay-pressed);--swirl-resource-list-item-background-default:var(\n --s-surface-overlay-default\n );--swirl-resource-list-item-background-hovered:var(\n --s-surface-overlay-hovered\n );--swirl-resource-list-item-background-pressed:var(\n --s-surface-overlay-pressed\n );--swirl-modal-height:auto;--swirl-modal-max-height:90vh;--swirl-modal-view-height:100vh;--swirl-modal-max-width:40rem;--swirl-modal-footer-padding-small:var(--s-space-12) var(--s-space-16)\n var(--s-space-12) var(--s-space-16);--swirl-modal-footer-padding-large:var(--s-space-16) var(--s-space-24)\n var(--s-space-16) var(--s-space-24)}@supports (height: 100dvh){.modal{--swirl-modal-max-height:90dvh;--swirl-modal-view-height:100dvh}}.modal{position:fixed;z-index:var(--s-z-40);display:flex;justify-content:center;align-items:center;height:var(--swirl-modal-view-height);inset:0}.modal[aria-hidden=\"true\"]{display:none}.modal--variant-default.modal--closing{animation:0.15s modal-fade-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-default.modal--closing{animation:none}}.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:0.15s modal-backdrop-fade-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__backdrop{animation:none}}.modal--variant-default:not(.modal--closing) .modal__body{animation:0.15s modal-scale-in}@media (prefers-reduced-motion){.modal--variant-default:not(.modal--closing) .modal__body{animation:none}}.modal--variant-drawer{justify-content:end;align-items:stretch}.modal--variant-drawer.modal--closing{animation:0.15s modal-drawer-slide-out;animation-fill-mode:forwards}@media (prefers-reduced-motion){.modal--variant-drawer.modal--closing{animation:none}}@media (min-width: 768px){.modal--variant-drawer.modal--hide-label .modal__header-bar{height:auto;padding-top:var(--s-space-4);padding-bottom:var(--s-space-4)}}.modal--variant-drawer .modal__backdrop{background-color:transparent;animation:none}.modal--variant-drawer .modal__body{height:100%;max-height:none;border-radius:0;animation:0.15s modal-drawer-slide-in;box-shadow:var(--s-shadow-level-3)}@media (prefers-reduced-motion){.modal--variant-drawer .modal__body{animation:none}}.modal--variant-drawer .modal__header-bar{background-color:var(--s-surface-overlay-default)}.modal--variant-drawer .modal__header-bar .modal__close-button{margin-left:calc(-1 * var(--s-space-8))}@media (min-width: 768px){.modal--variant-drawer .modal__header-bar{flex-direction:row}}@media (min-width: 768px){.modal--variant-drawer.modal--padded .modal__content{padding-top:var(--s-space-8)}}.modal--padded .modal__content{padding-top:var(--s-space-24);padding-right:var(--s-space-16);padding-bottom:var(--s-space-24);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal--padded .modal__content{padding-top:0;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:var(--s-space-24)}}@media (min-width: 768px){.modal--scrollable .modal__content{padding-bottom:0}}.modal--scrollable:not(.modal--scrolled-down).modal--has-custom-footer .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--scrollable:not(.modal--scrolled-down):not(.modal--has-custom-footer) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-custom-header .modal__custom-header{display:block}.modal--has-custom-header .modal__content{padding-top:var(--s-space-16)}.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-small)}@media (min-width: 768px){.modal--has-custom-footer .modal__custom-footer{padding:var(--swirl-modal-footer-padding-large)}}.modal--has-header-tools .modal__header{border-bottom-color:transparent}.modal--has-header-tools .modal__header-tools{display:block}.modal--has-secondary-content .modal__body{max-width:64rem}.modal--has-secondary-content:not(.modal--has-header-tools):not(.modal--hide-secondary-content-borders) .modal__header{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-header-tools:not(.modal--hide-secondary-content-borders) .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--has-secondary-content.modal--has-custom-footer:not(.modal--hide-secondary-content-borders) .modal__custom-footer{border-top:var(--s-border-width-default) solid var(--s-border-default)}.modal--has-secondary-content:not(.modal--has-custom-footer):not(.modal--hide-secondary-content-borders) .modal__controls{border-top:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 992px){.modal--has-secondary-content .modal__header-tools,.modal--has-secondary-content .modal__content{padding-right:0}}.modal--has-secondary-content .modal__primary-content{overflow:visible;max-height:60%;flex-basis:auto}@media (min-width: 992px){.modal--has-secondary-content .modal__primary-content{max-width:calc(100% - 24rem);max-height:none;flex-basis:calc(100% - 24rem)}}.modal--has-secondary-content .modal__secondary-content{display:block}@media (min-width: 768px){.modal--scrolled:not(.modal--has-header-tools) .modal__header{border-bottom-color:var(--s-border-default)}.modal--scrolled.modal--has-header-tools .modal__header-tools{border-bottom-color:var(--s-border-default)}.modal--scrolled .modal__custom-header{border-bottom-color:var(--s-border-default)}}.modal__backdrop{position:fixed;background-color:rgba(0, 0, 0, 0.2);inset:0}.modal__body{--swirl-card-background-default:var(--s-surface-overlay-default);--swirl-card-background-hovered:var(--s-surface-overlay-hovered);--swirl-card-background-pressed:var(--s-surface-overlay-pressed);--swirl-accordion-item-toggle-default:var(--s-surface-overlay-default);--swirl-accordion-item-toggle-hovered:var(--s-surface-overlay-hovered);--swirl-accordion-item-toggle-pressed:var(--s-surface-overlay-pressed);position:relative;z-index:var(--s-z-40);display:flex;overflow:hidden;width:100vw;height:var(--swirl-modal-view-height);background-color:var(--s-surface-overlay-default);flex-direction:column}@media (min-width: 768px){.modal__body{width:90vw;max-width:var(--swirl-modal-max-width);max-height:var(--swirl-modal-max-height);border-radius:var(--s-border-radius-base);box-shadow:var(--s-shadow-level-3)}}@media (min-width: 992px){.modal__body{height:var(--swirl-modal-height)}}.modal__header{border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header{border-bottom:var(--s-border-width-default) solid transparent}}.modal__header-bar{display:flex;height:3.5rem;padding-top:var(--s-space-8);padding-right:var(--s-space-16);padding-bottom:var(--s-space-8);padding-left:var(--s-space-16);flex-shrink:0;align-items:center;gap:var(--s-space-8)}@media (min-width: 768px){.modal__header-bar{height:3.75rem;padding-top:var(--s-space-12);padding-right:var(--s-space-24);padding-bottom:var(--s-space-12);padding-left:var(--s-space-24);flex-direction:row-reverse;gap:var(--s-space-16)}}.modal__header-tools{display:none;padding-right:var(--s-space-16);padding-left:var(--s-space-16);border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__header-tools{padding-right:var(--s-space-24);padding-left:var(--s-space-24);border-bottom-color:transparent}}.modal__custom-header{display:none;flex-shrink:0;border-bottom:var(--s-border-width-default) solid var(--s-border-default)}@media (min-width: 768px){.modal__custom-header{border-bottom-color:transparent}}.modal__heading{overflow:hidden}.modal__heading .heading{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.modal__content-container{display:flex;overflow:hidden;flex-grow:1;flex-direction:column;gap:var(--s-space-24)}@media (min-width: 992px){.modal__content-container{flex-direction:row}}.modal__primary-content{display:flex;overflow:hidden;flex-basis:100%;flex-direction:column}.modal__content{overflow-x:hidden;overflow-y:auto;height:100%}.modal__content ::slotted(*){margin:0}.modal__secondary-content{display:none;overflow:visible;overflow-x:hidden;overflow-y:auto;max-width:none;max-height:40%;padding-right:var(--s-space-16);padding-left:var(--s-space-16)}@media (min-width: 768px){.modal__secondary-content{padding-left:var(--s-space-24)}}@media (min-width: 992px){.modal__secondary-content{overflow-x:hidden;overflow-y:auto;max-width:24rem;max-height:none;padding-right:var(--s-space-24);padding-bottom:var(--s-space-16);padding-left:0;flex-basis:50%}}.modal__custom-footer{flex-shrink:0}.modal__controls{display:flex;padding:var(--swirl-modal-footer-padding-small);flex-shrink:0;justify-content:flex-end}@media (min-width: 768px){.modal__controls{padding:var(--swirl-modal-footer-padding-large)}}@keyframes modal-scale-in{from{transform:scale(0)}to{transform:scale(1)}}@keyframes modal-backdrop-fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-fade-out{from{opacity:1}to{opacity:0}}@keyframes modal-drawer-slide-in{from{transform:translate3d(100%, 0, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes modal-drawer-slide-out{from{transform:translate3d(0, 0, 0)}to{transform:translate3d(100%, 0, 0)}}";
|
|
11
11
|
const SwirlModalStyle0 = swirlModalCss;
|
|
12
12
|
|
|
13
13
|
const SwirlModal$1 = /*@__PURE__*/ proxyCustomElement(class SwirlModal extends HTMLElement {
|