@getflip/swirl-components 0.78.1 → 0.80.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 +140 -6
- package/dist/cjs/file-manager.cjs.entry.js +2 -1
- package/dist/cjs/index-506fe4ea.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-app-layout_7.cjs.entry.js +7 -4
- package/dist/cjs/swirl-button.cjs.entry.js +3 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-date-input.cjs.entry.js +1 -1
- package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
- package/dist/cjs/swirl-pdf-reader.cjs.entry.js +2 -2
- package/dist/cjs/{swirl-popover.cjs.entry.js → swirl-popover_2.cjs.entry.js} +105 -18
- package/dist/cjs/swirl-select.cjs.entry.js +2 -2
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +22 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/swirl-button/swirl-button.js +37 -1
- package/dist/collection/components/swirl-date-input/swirl-date-input.js +1 -1
- package/dist/collection/components/swirl-date-input/swirl-date-input.spec.js +6 -4
- package/dist/collection/components/swirl-lightbox/swirl-lightbox.js +1 -1
- package/dist/collection/components/swirl-lightbox/swirl-lightbox.spec.js +6 -4
- package/dist/collection/components/swirl-menu/swirl-menu.spec.js +38 -14
- package/dist/collection/components/swirl-menu/swirl-menu.stories.js +35 -33
- package/dist/collection/components/swirl-pdf-reader/swirl-pdf-reader.js +2 -2
- package/dist/collection/components/swirl-pdf-reader/swirl-pdf-reader.spec.js +4 -2
- package/dist/collection/components/swirl-popover/swirl-popover.js +53 -39
- package/dist/collection/components/swirl-popover/swirl-popover.spec.js +20 -11
- package/dist/collection/components/swirl-popover/swirl-popover.stories.js +8 -25
- package/dist/collection/components/swirl-popover-trigger/swirl-popover-trigger.css +3 -0
- package/dist/collection/components/swirl-popover-trigger/swirl-popover-trigger.js +132 -0
- package/dist/collection/components/swirl-popover-trigger/swirl-popover-trigger.spec.js +26 -0
- package/dist/collection/components/swirl-popover-trigger/swirl-popover-trigger.stories.js +48 -0
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.css +7 -0
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +7 -3
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.spec.js +1 -0
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.stories.js +29 -29
- package/dist/collection/components/swirl-select/swirl-select.js +2 -2
- package/dist/collection/components/swirl-select/swirl-select.spec.js +4 -2
- package/dist/collection/prototypes/file-manager/file-manager.js +4 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.js +22 -0
- package/dist/components/file-manager.js +54 -46
- package/dist/components/swirl-button2.js +5 -1
- package/dist/components/swirl-date-input.js +13 -7
- package/dist/components/swirl-lightbox.js +21 -15
- package/dist/components/swirl-pdf-reader.js +48 -42
- package/dist/components/swirl-popover-trigger.d.ts +11 -0
- package/dist/components/swirl-popover-trigger.js +6 -0
- package/dist/components/swirl-popover-trigger2.js +99 -0
- package/dist/components/swirl-popover2.js +27 -19
- package/dist/components/swirl-resource-list-item2.js +19 -10
- package/dist/components/swirl-select.js +18 -12
- package/dist/esm/file-manager.entry.js +2 -1
- package/dist/esm/index-99d0060d.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-app-layout_7.entry.js +7 -4
- package/dist/esm/swirl-button.entry.js +3 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-date-input.entry.js +1 -1
- package/dist/esm/swirl-lightbox.entry.js +1 -1
- package/dist/esm/swirl-pdf-reader.entry.js +2 -2
- package/dist/esm/{swirl-popover.entry.js → swirl-popover_2.entry.js} +105 -19
- package/dist/esm/swirl-select.entry.js +2 -2
- package/dist/swirl-components/p-0fce283f.entry.js +1 -0
- package/dist/swirl-components/p-2278aeae.entry.js +1 -0
- package/dist/swirl-components/p-251884ec.entry.js +1 -0
- package/dist/swirl-components/{p-a16a6381.entry.js → p-30ae7d5c.entry.js} +1 -1
- package/dist/swirl-components/p-3abcd491.entry.js +1 -0
- package/dist/swirl-components/p-6832ee6c.entry.js +1 -0
- package/dist/swirl-components/p-794d25e2.entry.js +1 -0
- package/dist/swirl-components/p-ed921838.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-button/swirl-button.d.ts +2 -0
- package/dist/types/components/swirl-popover/swirl-popover.d.ts +4 -5
- package/dist/types/components/swirl-popover/swirl-popover.stories.d.ts +0 -3
- package/dist/types/components/swirl-popover-trigger/swirl-popover-trigger.d.ts +13 -0
- package/dist/types/components/swirl-popover-trigger/swirl-popover-trigger.stories.d.ts +22 -0
- package/dist/types/components/swirl-resource-list-item/swirl-resource-list-item.d.ts +1 -0
- package/dist/types/components/swirl-resource-list-item/swirl-resource-list-item.stories.d.ts +8 -3
- package/dist/types/components.d.ts +26 -5
- package/dist/types/prototypes/file-manager/file-manager.d.ts +1 -0
- package/package.json +1 -1
- package/vscode-data.json +25 -0
- package/dist/swirl-components/p-8c507544.entry.js +0 -1
- package/dist/swirl-components/p-acd95936.entry.js +0 -1
- package/dist/swirl-components/p-b105d565.entry.js +0 -1
- package/dist/swirl-components/p-b28fadcf.entry.js +0 -1
- package/dist/swirl-components/p-d98edc75.entry.js +0 -1
- package/dist/swirl-components/p-ef50db1d.entry.js +0 -1
- package/dist/swirl-components/p-f990566c.entry.js +0 -1
- package/dist/typings.d.ts +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$
|
|
18
|
-
import { d as defineCustomElement$
|
|
19
|
-
import { d as defineCustomElement$
|
|
20
|
-
import { d as defineCustomElement$
|
|
21
|
-
import { d as defineCustomElement$
|
|
22
|
-
import { d as defineCustomElement$
|
|
23
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { d as defineCustomElement$u } from './swirl-app-layout2.js';
|
|
3
|
+
import { d as defineCustomElement$t } from './swirl-box2.js';
|
|
4
|
+
import { d as defineCustomElement$s } from './swirl-button2.js';
|
|
5
|
+
import { d as defineCustomElement$r } from './swirl-empty-state2.js';
|
|
6
|
+
import { d as defineCustomElement$q } from './swirl-file-viewer2.js';
|
|
7
|
+
import { d as defineCustomElement$p } from './swirl-file-viewer-audio2.js';
|
|
8
|
+
import { d as defineCustomElement$o } from './swirl-file-viewer-csv2.js';
|
|
9
|
+
import { d as defineCustomElement$n } from './swirl-file-viewer-image2.js';
|
|
10
|
+
import { d as defineCustomElement$m } from './swirl-file-viewer-pdf2.js';
|
|
11
|
+
import { d as defineCustomElement$l } from './swirl-file-viewer-text2.js';
|
|
12
|
+
import { d as defineCustomElement$k } from './swirl-file-viewer-video2.js';
|
|
13
|
+
import { d as defineCustomElement$j } from './swirl-heading2.js';
|
|
14
|
+
import { d as defineCustomElement$i } from './swirl-icon-check-small2.js';
|
|
15
|
+
import { d as defineCustomElement$h } from './swirl-icon-check-strong2.js';
|
|
16
|
+
import { d as defineCustomElement$g } from './swirl-icon-drag-handle2.js';
|
|
17
|
+
import { d as defineCustomElement$f } from './swirl-icon-error2.js';
|
|
18
|
+
import { d as defineCustomElement$e } from './swirl-icon-file2.js';
|
|
19
|
+
import { d as defineCustomElement$d } from './swirl-icon-folder-shared2.js';
|
|
20
|
+
import { d as defineCustomElement$c } from './swirl-inline-error2.js';
|
|
21
|
+
import { d as defineCustomElement$b } from './swirl-option-list2.js';
|
|
22
|
+
import { d as defineCustomElement$a } from './swirl-option-list-item2.js';
|
|
23
|
+
import { d as defineCustomElement$9 } from './swirl-popover2.js';
|
|
24
|
+
import { d as defineCustomElement$8 } from './swirl-popover-trigger2.js';
|
|
24
25
|
import { d as defineCustomElement$7 } from './swirl-resource-list2.js';
|
|
25
26
|
import { d as defineCustomElement$6 } from './swirl-resource-list-item2.js';
|
|
26
27
|
import { d as defineCustomElement$5 } from './swirl-spinner2.js';
|
|
@@ -78,6 +79,7 @@ const FileManager$1 = /*@__PURE__*/ proxyCustomElement(class FileManager extends
|
|
|
78
79
|
};
|
|
79
80
|
this.selectedDirectory = undefined;
|
|
80
81
|
this.selectedFile = undefined;
|
|
82
|
+
this.sortMenu = undefined;
|
|
81
83
|
}
|
|
82
84
|
renderNavigation() {
|
|
83
85
|
const items = Boolean(this.selectedDirectory)
|
|
@@ -89,17 +91,18 @@ const FileManager$1 = /*@__PURE__*/ proxyCustomElement(class FileManager extends
|
|
|
89
91
|
}
|
|
90
92
|
render() {
|
|
91
93
|
var _a, _b;
|
|
92
|
-
return (h(Host, null, h("swirl-app-layout", { appName: "Documents", backToNavigationViewButtonLabel: "Back to documents list", ctaIcon: "<swirl-icon-add></swirl-icon-add>", ctaLabel: "Upload file", navigationLabel: "Documents", onNavigationBackButtonClick: this.resetSelectedDirectory, ref: (el) => (this.layout = el), sidebarCloseButtonLabel: "Close file info", sidebarHeading: "File info", showNavigationBackButton: Boolean(this.selectedDirectory), transitionStyle: "dialog" }, h("swirl-resource-list", { label: "Documents", slot: "navigation" }, this.renderNavigation()), h("swirl-
|
|
94
|
+
return (h(Host, null, h("swirl-app-layout", { appName: "Documents", backToNavigationViewButtonLabel: "Back to documents list", ctaIcon: "<swirl-icon-add></swirl-icon-add>", ctaLabel: "Upload file", navigationLabel: "Documents", onNavigationBackButtonClick: this.resetSelectedDirectory, ref: (el) => (this.layout = el), sidebarCloseButtonLabel: "Close file info", sidebarHeading: "File info", showNavigationBackButton: Boolean(this.selectedDirectory), transitionStyle: "dialog" }, h("swirl-resource-list", { label: "Documents", slot: "navigation" }, this.renderNavigation()), h("swirl-popover-trigger", { popover: this.sortMenu, slot: "navigation-controls" }, h("swirl-button", { label: "Sort items" })), h("swirl-stack", { orientation: "horizontal", slot: "app-bar" }, h("swirl-stack", null, h("swirl-heading", { as: "h2", level: 4, text: (_a = this.selectedFile) === null || _a === void 0 ? void 0 : _a.name }), h("swirl-text", { color: "subdued", truncate: true }, (_b = this.selectedFile) === null || _b === void 0 ? void 0 : _b.description))), Boolean(this.selectedFile) ? (h("swirl-file-viewer", { file: this.selectedFile.url, slot: "content", type: this.selectedFile.type })) : (h("swirl-box", { cover: true, centerBlock: true, centerInline: true, padding: "16", slot: "content" }, h("swirl-empty-state", { heading: "Nothing to see here.", illustration: "/images/empty-state-1.svg" }, "Please select a file from the list."))), h("div", { slot: "app-bar-controls" }, this.selectedFile && (h("swirl-button", { "hide-label": true, class: "info-button", icon: "<swirl-icon-info></swirl-icon-info>", label: "Open file info", onClick: this.toggleSidebar }))), h("swirl-box", { padding: "16", slot: "sidebar" }, h("swirl-text", { color: "subdued", weight: "medium" }, "File info goes here \u2026"))), h("swirl-popover", { label: "Sort items", ref: (el) => (this.sortMenu = el) }, h("swirl-option-list", { value: ["ascending"] }, h("swirl-option-list-item", { icon: "<swirl-icon-expand-less></swirl-icon-expand-less>", label: "Ascending", value: "ascending" }), h("swirl-option-list-item", { icon: "<swirl-icon-expand-more></swirl-icon-expand-more>", label: "Descending", value: "descending" }), h("swirl-option-list-item", { icon: "<swirl-icon-time-outlined></swirl-icon-time-outlined>", label: "By date", value: "date" })))));
|
|
93
95
|
}
|
|
94
96
|
}, [1, "file-manager", {
|
|
95
97
|
"selectedDirectory": [32],
|
|
96
|
-
"selectedFile": [32]
|
|
98
|
+
"selectedFile": [32],
|
|
99
|
+
"sortMenu": [32]
|
|
97
100
|
}]);
|
|
98
101
|
function defineCustomElement$1() {
|
|
99
102
|
if (typeof customElements === "undefined") {
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
102
|
-
const components = ["file-manager", "swirl-app-layout", "swirl-box", "swirl-button", "swirl-empty-state", "swirl-file-viewer", "swirl-file-viewer-audio", "swirl-file-viewer-csv", "swirl-file-viewer-image", "swirl-file-viewer-pdf", "swirl-file-viewer-text", "swirl-file-viewer-video", "swirl-heading", "swirl-icon-check-small", "swirl-icon-check-strong", "swirl-icon-drag-handle", "swirl-icon-error", "swirl-icon-file", "swirl-icon-folder-shared", "swirl-inline-error", "swirl-option-list", "swirl-option-list-item", "swirl-popover", "swirl-resource-list", "swirl-resource-list-item", "swirl-spinner", "swirl-stack", "swirl-text", "swirl-visually-hidden"];
|
|
105
|
+
const components = ["file-manager", "swirl-app-layout", "swirl-box", "swirl-button", "swirl-empty-state", "swirl-file-viewer", "swirl-file-viewer-audio", "swirl-file-viewer-csv", "swirl-file-viewer-image", "swirl-file-viewer-pdf", "swirl-file-viewer-text", "swirl-file-viewer-video", "swirl-heading", "swirl-icon-check-small", "swirl-icon-check-strong", "swirl-icon-drag-handle", "swirl-icon-error", "swirl-icon-file", "swirl-icon-folder-shared", "swirl-inline-error", "swirl-option-list", "swirl-option-list-item", "swirl-popover", "swirl-popover-trigger", "swirl-resource-list", "swirl-resource-list-item", "swirl-spinner", "swirl-stack", "swirl-text", "swirl-visually-hidden"];
|
|
103
106
|
components.forEach(tagName => { switch (tagName) {
|
|
104
107
|
case "file-manager":
|
|
105
108
|
if (!customElements.get(tagName)) {
|
|
@@ -108,110 +111,115 @@ function defineCustomElement$1() {
|
|
|
108
111
|
break;
|
|
109
112
|
case "swirl-app-layout":
|
|
110
113
|
if (!customElements.get(tagName)) {
|
|
111
|
-
defineCustomElement$
|
|
114
|
+
defineCustomElement$u();
|
|
112
115
|
}
|
|
113
116
|
break;
|
|
114
117
|
case "swirl-box":
|
|
115
118
|
if (!customElements.get(tagName)) {
|
|
116
|
-
defineCustomElement$
|
|
119
|
+
defineCustomElement$t();
|
|
117
120
|
}
|
|
118
121
|
break;
|
|
119
122
|
case "swirl-button":
|
|
120
123
|
if (!customElements.get(tagName)) {
|
|
121
|
-
defineCustomElement$
|
|
124
|
+
defineCustomElement$s();
|
|
122
125
|
}
|
|
123
126
|
break;
|
|
124
127
|
case "swirl-empty-state":
|
|
125
128
|
if (!customElements.get(tagName)) {
|
|
126
|
-
defineCustomElement$
|
|
129
|
+
defineCustomElement$r();
|
|
127
130
|
}
|
|
128
131
|
break;
|
|
129
132
|
case "swirl-file-viewer":
|
|
130
133
|
if (!customElements.get(tagName)) {
|
|
131
|
-
defineCustomElement$
|
|
134
|
+
defineCustomElement$q();
|
|
132
135
|
}
|
|
133
136
|
break;
|
|
134
137
|
case "swirl-file-viewer-audio":
|
|
135
138
|
if (!customElements.get(tagName)) {
|
|
136
|
-
defineCustomElement$
|
|
139
|
+
defineCustomElement$p();
|
|
137
140
|
}
|
|
138
141
|
break;
|
|
139
142
|
case "swirl-file-viewer-csv":
|
|
140
143
|
if (!customElements.get(tagName)) {
|
|
141
|
-
defineCustomElement$
|
|
144
|
+
defineCustomElement$o();
|
|
142
145
|
}
|
|
143
146
|
break;
|
|
144
147
|
case "swirl-file-viewer-image":
|
|
145
148
|
if (!customElements.get(tagName)) {
|
|
146
|
-
defineCustomElement$
|
|
149
|
+
defineCustomElement$n();
|
|
147
150
|
}
|
|
148
151
|
break;
|
|
149
152
|
case "swirl-file-viewer-pdf":
|
|
150
153
|
if (!customElements.get(tagName)) {
|
|
151
|
-
defineCustomElement$
|
|
154
|
+
defineCustomElement$m();
|
|
152
155
|
}
|
|
153
156
|
break;
|
|
154
157
|
case "swirl-file-viewer-text":
|
|
155
158
|
if (!customElements.get(tagName)) {
|
|
156
|
-
defineCustomElement$
|
|
159
|
+
defineCustomElement$l();
|
|
157
160
|
}
|
|
158
161
|
break;
|
|
159
162
|
case "swirl-file-viewer-video":
|
|
160
163
|
if (!customElements.get(tagName)) {
|
|
161
|
-
defineCustomElement$
|
|
164
|
+
defineCustomElement$k();
|
|
162
165
|
}
|
|
163
166
|
break;
|
|
164
167
|
case "swirl-heading":
|
|
165
168
|
if (!customElements.get(tagName)) {
|
|
166
|
-
defineCustomElement$
|
|
169
|
+
defineCustomElement$j();
|
|
167
170
|
}
|
|
168
171
|
break;
|
|
169
172
|
case "swirl-icon-check-small":
|
|
170
173
|
if (!customElements.get(tagName)) {
|
|
171
|
-
defineCustomElement$
|
|
174
|
+
defineCustomElement$i();
|
|
172
175
|
}
|
|
173
176
|
break;
|
|
174
177
|
case "swirl-icon-check-strong":
|
|
175
178
|
if (!customElements.get(tagName)) {
|
|
176
|
-
defineCustomElement$
|
|
179
|
+
defineCustomElement$h();
|
|
177
180
|
}
|
|
178
181
|
break;
|
|
179
182
|
case "swirl-icon-drag-handle":
|
|
180
183
|
if (!customElements.get(tagName)) {
|
|
181
|
-
defineCustomElement$
|
|
184
|
+
defineCustomElement$g();
|
|
182
185
|
}
|
|
183
186
|
break;
|
|
184
187
|
case "swirl-icon-error":
|
|
185
188
|
if (!customElements.get(tagName)) {
|
|
186
|
-
defineCustomElement$
|
|
189
|
+
defineCustomElement$f();
|
|
187
190
|
}
|
|
188
191
|
break;
|
|
189
192
|
case "swirl-icon-file":
|
|
190
193
|
if (!customElements.get(tagName)) {
|
|
191
|
-
defineCustomElement$
|
|
194
|
+
defineCustomElement$e();
|
|
192
195
|
}
|
|
193
196
|
break;
|
|
194
197
|
case "swirl-icon-folder-shared":
|
|
195
198
|
if (!customElements.get(tagName)) {
|
|
196
|
-
defineCustomElement$
|
|
199
|
+
defineCustomElement$d();
|
|
197
200
|
}
|
|
198
201
|
break;
|
|
199
202
|
case "swirl-inline-error":
|
|
200
203
|
if (!customElements.get(tagName)) {
|
|
201
|
-
defineCustomElement$
|
|
204
|
+
defineCustomElement$c();
|
|
202
205
|
}
|
|
203
206
|
break;
|
|
204
207
|
case "swirl-option-list":
|
|
205
208
|
if (!customElements.get(tagName)) {
|
|
206
|
-
defineCustomElement$
|
|
209
|
+
defineCustomElement$b();
|
|
207
210
|
}
|
|
208
211
|
break;
|
|
209
212
|
case "swirl-option-list-item":
|
|
210
213
|
if (!customElements.get(tagName)) {
|
|
211
|
-
defineCustomElement$
|
|
214
|
+
defineCustomElement$a();
|
|
212
215
|
}
|
|
213
216
|
break;
|
|
214
217
|
case "swirl-popover":
|
|
218
|
+
if (!customElements.get(tagName)) {
|
|
219
|
+
defineCustomElement$9();
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
case "swirl-popover-trigger":
|
|
215
223
|
if (!customElements.get(tagName)) {
|
|
216
224
|
defineCustomElement$8();
|
|
217
225
|
}
|
|
@@ -14,8 +14,10 @@ const SwirlButton = /*@__PURE__*/ proxyCustomElement(class SwirlButton extends H
|
|
|
14
14
|
};
|
|
15
15
|
this.disabled = undefined;
|
|
16
16
|
this.download = undefined;
|
|
17
|
+
this.swirlAriaControls = undefined;
|
|
17
18
|
this.swirlAriaDescribedby = undefined;
|
|
18
19
|
this.swirlAriaExpanded = undefined;
|
|
20
|
+
this.swirlAriaHaspopup = undefined;
|
|
19
21
|
this.swirlAriaLabel = undefined;
|
|
20
22
|
this.form = undefined;
|
|
21
23
|
this.hideLabel = undefined;
|
|
@@ -69,14 +71,16 @@ const SwirlButton = /*@__PURE__*/ proxyCustomElement(class SwirlButton extends H
|
|
|
69
71
|
"button--pill": this.pill,
|
|
70
72
|
});
|
|
71
73
|
const Tag = isLink ? "a" : "button";
|
|
72
|
-
return (h(Host, { style: { pointerEvents: this.disabled ? "none" : "" } }, h(Tag, { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled && !isLink ? "true" : undefined, "aria-expanded": this.swirlAriaExpanded, "aria-label": ariaLabel, 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, target: isLink ? this.target : undefined, type: isLink ? undefined : this.type, value: isLink ? undefined : this.value }, this.icon && (h("span", { class: "button__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), !hideLabel && h("span", { class: "button__label" }, this.label))));
|
|
74
|
+
return (h(Host, { style: { pointerEvents: this.disabled ? "none" : "" } }, h(Tag, { "aria-controls": this.swirlAriaControls, "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled && !isLink ? "true" : undefined, "aria-expanded": this.swirlAriaExpanded, "aria-haspopup": this.swirlAriaHaspopup, "aria-label": ariaLabel, 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, target: isLink ? this.target : undefined, type: isLink ? undefined : this.type, value: isLink ? undefined : this.value }, this.icon && (h("span", { class: "button__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), !hideLabel && h("span", { class: "button__label" }, this.label))));
|
|
73
75
|
}
|
|
74
76
|
static get style() { return swirlButtonCss; }
|
|
75
77
|
}, [2, "swirl-button", {
|
|
76
78
|
"disabled": [4],
|
|
77
79
|
"download": [1],
|
|
80
|
+
"swirlAriaControls": [1, "swirl-aria-controls"],
|
|
78
81
|
"swirlAriaDescribedby": [1, "swirl-aria-describedby"],
|
|
79
82
|
"swirlAriaExpanded": [1, "swirl-aria-expanded"],
|
|
83
|
+
"swirlAriaHaspopup": [1, "swirl-aria-haspopup"],
|
|
80
84
|
"swirlAriaLabel": [1, "swirl-aria-label"],
|
|
81
85
|
"form": [1],
|
|
82
86
|
"hideLabel": [4, "hide-label"],
|
|
@@ -2,9 +2,10 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { c as classnames } from './index2.js';
|
|
3
3
|
import { p as parse, i as isValid, f as format, m as maska } from './maska.js';
|
|
4
4
|
import { g as getDesktopMediaQuery } from './utils.js';
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
5
|
+
import { d as defineCustomElement$6 } from './swirl-date-picker2.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './swirl-icon-today2.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './swirl-popover2.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './swirl-popover-trigger2.js';
|
|
8
9
|
import { d as defineCustomElement$2 } from './wc-datepicker2.js';
|
|
9
10
|
|
|
10
11
|
const swirlDateInputCss = ".sc-swirl-date-input-h{display:flex;width:100%}.sc-swirl-date-input-h *.sc-swirl-date-input{box-sizing:border-box}.date-input.sc-swirl-date-input{position:relative;display:flex;width:100%;align-items:center;color:var(--s-text-default);line-height:var(--s-line-height-sm)}.date-input--inline.sc-swirl-date-input .date-input__date-picker-button.sc-swirl-date-input{top:-0.0625rem}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-input--inline.sc-swirl-date-input .date-input__date-picker-button.sc-swirl-date-input{top:0}}.date-input__input.sc-swirl-date-input{display:inline-flex;width:calc(100% - 1.25rem - var(--s-space-8));margin:0;padding:0;border:none;color:var(--s-text-default);background-color:transparent;font:inherit;font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);caret-color:var(--s-border-highlight)}.date-input__input.sc-swirl-date-input:focus{outline:none}.date-input__input.sc-swirl-date-input:disabled{color:var(--s-text-disabled);background-color:transparent}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-input__input.sc-swirl-date-input{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.date-input__date-picker-button.sc-swirl-date-input{position:absolute;top:calc(-1 * var(--s-space-12));right:0;display:inline-flex;margin:0;padding:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:pointer}.date-input__date-picker-button.sc-swirl-date-input:focus:not(:focus-visible){outline:none}.date-input__date-picker-button.sc-swirl-date-input:focus-visible{outline-color:var(--s-focus-default);outline-offset:var(--s-space-2)}.date-input__date-picker-button.sc-swirl-date-input:disabled{color:var(--s-icon-disabled);cursor:default}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.date-input__date-picker-button.sc-swirl-date-input{top:-0.625rem}}";
|
|
@@ -112,7 +113,7 @@ const SwirlDateInput$1 = /*@__PURE__*/ proxyCustomElement(class SwirlDateInput e
|
|
|
112
113
|
const className = classnames("date-input", {
|
|
113
114
|
"date-input--inline": this.inline,
|
|
114
115
|
});
|
|
115
|
-
return (h(Host, null, h("div", { class: className }, h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled,
|
|
116
|
+
return (h(Host, null, h("div", { class: className }, h("input", { "aria-describedby": this.swirlAriaDescribedby, "aria-disabled": this.disabled ? "true" : undefined, "aria-invalid": ariaInvalid, autoFocus: this.autoFocus, class: "date-input__input", disabled: this.disabled, id: this.id, onClick: this.onClick, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder, required: this.required, type: "text", value: displayValue }), h("swirl-popover-trigger", { popover: `popover-${this.id}` }, h("button", { "aria-label": this.datePickerTriggerLabel, class: "date-input__date-picker-button", disabled: this.disabled, type: "button" }, h("swirl-icon-today", { size: this.iconSize })))), !this.disabled && (h("swirl-popover", { animation: "scale-in-y", id: `popover-${this.id}`, label: this.datePickerLabel, placement: "bottom-end", ref: (el) => (this.pickerPopover = el) }, h("swirl-date-picker", { labels: this.labels, locale: this.locale, onValueChange: this.onPickDate, value: dateValue })))));
|
|
116
117
|
}
|
|
117
118
|
get el() { return this; }
|
|
118
119
|
static get watchers() { return {
|
|
@@ -140,7 +141,7 @@ function defineCustomElement$1() {
|
|
|
140
141
|
if (typeof customElements === "undefined") {
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
|
-
const components = ["swirl-date-input", "swirl-date-picker", "swirl-icon-today", "swirl-popover", "wc-datepicker"];
|
|
144
|
+
const components = ["swirl-date-input", "swirl-date-picker", "swirl-icon-today", "swirl-popover", "swirl-popover-trigger", "wc-datepicker"];
|
|
144
145
|
components.forEach(tagName => { switch (tagName) {
|
|
145
146
|
case "swirl-date-input":
|
|
146
147
|
if (!customElements.get(tagName)) {
|
|
@@ -149,15 +150,20 @@ function defineCustomElement$1() {
|
|
|
149
150
|
break;
|
|
150
151
|
case "swirl-date-picker":
|
|
151
152
|
if (!customElements.get(tagName)) {
|
|
152
|
-
defineCustomElement$
|
|
153
|
+
defineCustomElement$6();
|
|
153
154
|
}
|
|
154
155
|
break;
|
|
155
156
|
case "swirl-icon-today":
|
|
156
157
|
if (!customElements.get(tagName)) {
|
|
157
|
-
defineCustomElement$
|
|
158
|
+
defineCustomElement$5();
|
|
158
159
|
}
|
|
159
160
|
break;
|
|
160
161
|
case "swirl-popover":
|
|
162
|
+
if (!customElements.get(tagName)) {
|
|
163
|
+
defineCustomElement$4();
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
case "swirl-popover-trigger":
|
|
161
167
|
if (!customElements.get(tagName)) {
|
|
162
168
|
defineCustomElement$3();
|
|
163
169
|
}
|
|
@@ -3,13 +3,14 @@ import { A as A11yDialog } from './a11y-dialog.esm.js';
|
|
|
3
3
|
import { d as disableBodyScroll, e as enableBodyScroll } from './bodyScrollLock.esm.js';
|
|
4
4
|
import { c as classnames } from './index2.js';
|
|
5
5
|
import { q as querySelectorAllDeep } from './utils.js';
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
6
|
+
import { d as defineCustomElement$d } from './swirl-action-list2.js';
|
|
7
|
+
import { d as defineCustomElement$c } from './swirl-action-list-item2.js';
|
|
8
|
+
import { d as defineCustomElement$b } from './swirl-icon-arrow-left2.js';
|
|
9
|
+
import { d as defineCustomElement$a } from './swirl-icon-arrow-right2.js';
|
|
10
|
+
import { d as defineCustomElement$9 } from './swirl-icon-close2.js';
|
|
11
|
+
import { d as defineCustomElement$8 } from './swirl-icon-more-vertikal2.js';
|
|
12
|
+
import { d as defineCustomElement$7 } from './swirl-popover2.js';
|
|
13
|
+
import { d as defineCustomElement$6 } from './swirl-popover-trigger2.js';
|
|
13
14
|
import { d as defineCustomElement$5 } from './swirl-separator2.js';
|
|
14
15
|
import { d as defineCustomElement$4 } from './swirl-stack2.js';
|
|
15
16
|
import { d as defineCustomElement$3 } from './swirl-text2.js';
|
|
@@ -243,7 +244,7 @@ const SwirlLightbox$1 = /*@__PURE__*/ proxyCustomElement(class SwirlLightbox ext
|
|
|
243
244
|
const className = classnames("lightbox", {
|
|
244
245
|
"lightbox--closing": this.closing,
|
|
245
246
|
});
|
|
246
|
-
return (h(Host, null, h("section", { "aria-hidden": "true", "aria-label": this.label, class: className, id: "lightbox", onMouseDown: this.onPointerDown, onMouseMove: this.onPointerMove, onMouseOut: this.onPointerUp, onMouseUp: this.onPointerUp, onKeyDown: this.onKeyDown, onTouchEnd: this.onPointerUp, onTouchMove: this.onPointerMove, onTouchStart: this.onPointerDown, ref: (el) => (this.modalEl = el) }, h("div", { class: "lightbox__body", role: "document" }, h("header", { class: "lightbox__header" }, h("button", { "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, h("swirl-icon-close", null)), h("button", { "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button"
|
|
247
|
+
return (h(Host, null, h("section", { "aria-hidden": "true", "aria-label": this.label, class: className, id: "lightbox", onMouseDown: this.onPointerDown, onMouseMove: this.onPointerMove, onMouseOut: this.onPointerUp, onMouseUp: this.onPointerUp, onKeyDown: this.onKeyDown, onTouchEnd: this.onPointerUp, onTouchMove: this.onPointerMove, onTouchStart: this.onPointerDown, ref: (el) => (this.modalEl = el) }, h("div", { class: "lightbox__body", role: "document" }, h("header", { class: "lightbox__header" }, h("button", { "aria-label": this.closeButtonLabel, class: "lightbox__close-button", onClick: this.onCloseButtonClick }, h("swirl-icon-close", null)), h("swirl-popover-trigger", { popover: this.menu }, h("button", { "aria-label": this.menuTriggerLabel, class: "lightbox__menu-button" }, h("swirl-icon-more-vertikal", null)))), h("div", { "aria-roledescription": "carousel", class: "lightbox__content", role: "group" }, h("div", { "aria-atomic": "false", "aria-live": "polite", class: "lightbox__slides" }, h("slot", { onSlotchange: this.registerSlides }))), h("div", { class: "lightbox__controls" }, h("button", { "aria-label": this.previousSlideButtonLabel, class: "lightbox__previous-slide-button", disabled: this.activeSlideIndex === 0, onClick: this.onPreviousSlideClick }, h("swirl-icon-arrow-left", null)), h("button", { "aria-label": this.nextSlideButtonLabel, class: "lightbox__next-slide-button", disabled: this.activeSlideIndex === this.slides.length - 1, onClick: this.onNextSlideClick }, h("swirl-icon-arrow-right", null))), showPagination && (h("span", { class: "lightbox__pagination" }, h("span", { "aria-current": "page" }, this.activeSlideIndex + 1), " /", " ", this.slides.length))), h("swirl-popover", { animation: "scale-in-y", disableScrollLock: true, id: "slide-menu", label: this.menuLabel, placement: "bottom-end", ref: (el) => (this.menu = el) }, h("swirl-stack", null, h("div", { class: "lightbox__meta" }, currentThumbnailUrl && (h("div", { class: "lightbox__thumbnail" }, h("swirl-thumbnail", { alt: "", src: currentThumbnailUrl }))), h("div", { class: "lightbox__file-info" }, h("swirl-text", { truncate: true, weight: "semibold" }, currentFileName), h("swirl-text", { color: "subdued", size: "sm", truncate: true }, currentFileType))), h("swirl-separator", null), h("swirl-action-list", null, h("swirl-action-list-item", { icon: "<swirl-icon-download></swirl-icon-download>", label: this.downloadButtonLabel, onClick: this.onDownloadButtonClick }), h("slot", { name: "menu-items" })))))));
|
|
247
248
|
}
|
|
248
249
|
get el() { return this; }
|
|
249
250
|
static get style() { return swirlLightboxCss; }
|
|
@@ -266,7 +267,7 @@ function defineCustomElement$1() {
|
|
|
266
267
|
if (typeof customElements === "undefined") {
|
|
267
268
|
return;
|
|
268
269
|
}
|
|
269
|
-
const components = ["swirl-lightbox", "swirl-action-list", "swirl-action-list-item", "swirl-icon-arrow-left", "swirl-icon-arrow-right", "swirl-icon-close", "swirl-icon-more-vertikal", "swirl-popover", "swirl-separator", "swirl-stack", "swirl-text", "swirl-thumbnail"];
|
|
270
|
+
const components = ["swirl-lightbox", "swirl-action-list", "swirl-action-list-item", "swirl-icon-arrow-left", "swirl-icon-arrow-right", "swirl-icon-close", "swirl-icon-more-vertikal", "swirl-popover", "swirl-popover-trigger", "swirl-separator", "swirl-stack", "swirl-text", "swirl-thumbnail"];
|
|
270
271
|
components.forEach(tagName => { switch (tagName) {
|
|
271
272
|
case "swirl-lightbox":
|
|
272
273
|
if (!customElements.get(tagName)) {
|
|
@@ -275,35 +276,40 @@ function defineCustomElement$1() {
|
|
|
275
276
|
break;
|
|
276
277
|
case "swirl-action-list":
|
|
277
278
|
if (!customElements.get(tagName)) {
|
|
278
|
-
defineCustomElement$
|
|
279
|
+
defineCustomElement$d();
|
|
279
280
|
}
|
|
280
281
|
break;
|
|
281
282
|
case "swirl-action-list-item":
|
|
282
283
|
if (!customElements.get(tagName)) {
|
|
283
|
-
defineCustomElement$
|
|
284
|
+
defineCustomElement$c();
|
|
284
285
|
}
|
|
285
286
|
break;
|
|
286
287
|
case "swirl-icon-arrow-left":
|
|
287
288
|
if (!customElements.get(tagName)) {
|
|
288
|
-
defineCustomElement$
|
|
289
|
+
defineCustomElement$b();
|
|
289
290
|
}
|
|
290
291
|
break;
|
|
291
292
|
case "swirl-icon-arrow-right":
|
|
292
293
|
if (!customElements.get(tagName)) {
|
|
293
|
-
defineCustomElement$
|
|
294
|
+
defineCustomElement$a();
|
|
294
295
|
}
|
|
295
296
|
break;
|
|
296
297
|
case "swirl-icon-close":
|
|
297
298
|
if (!customElements.get(tagName)) {
|
|
298
|
-
defineCustomElement$
|
|
299
|
+
defineCustomElement$9();
|
|
299
300
|
}
|
|
300
301
|
break;
|
|
301
302
|
case "swirl-icon-more-vertikal":
|
|
302
303
|
if (!customElements.get(tagName)) {
|
|
303
|
-
defineCustomElement$
|
|
304
|
+
defineCustomElement$8();
|
|
304
305
|
}
|
|
305
306
|
break;
|
|
306
307
|
case "swirl-popover":
|
|
308
|
+
if (!customElements.get(tagName)) {
|
|
309
|
+
defineCustomElement$7();
|
|
310
|
+
}
|
|
311
|
+
break;
|
|
312
|
+
case "swirl-popover-trigger":
|
|
307
313
|
if (!customElements.get(tagName)) {
|
|
308
314
|
defineCustomElement$6();
|
|
309
315
|
}
|