nve-designsystem 3.1.0 → 3.3.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/chunks/chunk.2PCBEMQZ.js +163 -226
- package/chunks/chunk.36O46B5H.js +15 -15
- package/chunks/chunk.4TUIT776.js +78 -96
- package/chunks/chunk.5JY5FUCG.js +965 -1245
- package/chunks/chunk.5P45LHIX.js +668 -96
- package/chunks/chunk.6CTB5ZDJ.js +107 -100
- package/chunks/chunk.B4BZKR24.js +29 -39
- package/chunks/chunk.D5YQDJ7X.js +122 -166
- package/chunks/chunk.EA437WHD.js +5 -5
- package/chunks/chunk.GI7VDIWX.js +14 -15
- package/chunks/chunk.GMYPQTFK.js +18 -20
- package/chunks/chunk.HVTXQL7M.js +191 -215
- package/chunks/chunk.IKV4VH3T.js +18 -16
- package/chunks/chunk.IVVHNXMC.js +26 -27
- package/chunks/chunk.JHOXTQXA.js +65 -74
- package/chunks/chunk.JXOKFADN.js +63 -90
- package/chunks/chunk.K7JGTRV7.js +24 -23
- package/chunks/chunk.KPLQLAWP.js +132 -147
- package/chunks/chunk.LD4M4QGE.js +61 -74
- package/chunks/chunk.MSKEYBDI.js +53 -71
- package/chunks/chunk.NYIIDP5N.js +39 -45
- package/chunks/chunk.RWUUFNUL.js +91 -114
- package/chunks/chunk.SAPQLUO4.js +249 -228
- package/chunks/chunk.SI4ACBFK.js +139 -5
- package/chunks/chunk.TP2GB2HO.js +361 -460
- package/chunks/chunk.UDWRA64J.js +185 -223
- package/chunks/chunk.URTPIBTY.js +119 -151
- package/chunks/chunk.VESXC477.js +63 -66
- package/chunks/chunk.XA43ZQPC.js +198 -313
- package/chunks/chunk.XQ2OKYYA.js +25 -26
- package/chunks/chunk.XZNBUGX7.js +6 -6
- package/chunks/chunk.YHLNUJ7P.js +93 -116
- package/chunks/chunk.ZH2AND3P.js +340 -399
- package/chunks/chunk.ZL53POKZ.js +61 -156
- package/chunks/chunk.js +20 -0
- package/chunks/class-map.js +49 -45
- package/chunks/decorate.js +105 -0
- package/chunks/directive-helpers.js +5 -7
- package/chunks/if-defined.js +5 -5
- package/chunks/lit.js +525 -0
- package/chunks/live.js +24 -24
- package/chunks/nve-alert.component.js +163 -0
- package/chunks/nve-carousel-item.component.js +36 -0
- package/chunks/nve-carousel.component.js +41 -0
- package/chunks/nve-checkbox-group.component.js +114 -0
- package/chunks/nve-checkbox.component.js +28 -0
- package/chunks/nve-dialog.component.js +39 -0
- package/chunks/nve-divider.component.js +23 -0
- package/chunks/nve-drawer.component.js +40 -0
- package/chunks/nve-dropdown.component.js +83 -0
- package/chunks/nve-input.component.js +80 -0
- package/chunks/nve-label.component.js +89 -0
- package/chunks/nve-menu-item.component.js +35 -0
- package/chunks/nve-menu.component.js +17 -0
- package/chunks/nve-option.component.js +27 -0
- package/chunks/nve-popup.component.js +15 -0
- package/chunks/nve-radio-button.component.js +20 -0
- package/chunks/nve-radio-group.component.js +78 -0
- package/chunks/nve-radio.component.js +18 -0
- package/chunks/nve-select.component.js +58 -0
- package/chunks/nve-skeleton.component.js +20 -0
- package/chunks/nve-spinner.component.js +23 -0
- package/chunks/nve-tooltip.component.js +20 -0
- package/chunks/nve-warning-level.component.js +57 -0
- package/chunks/ref.js +75 -84
- package/chunks/shoelace.js +10006 -0
- package/chunks/static-html.js +27 -0
- package/chunks/unsafe-html.js +24 -20
- package/chunks/updateInvalidProperty.js +7 -7
- package/chunks/watch.js +20 -20
- package/components/nve-accordion/nve-accordion.component.js +24 -30
- package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
- package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
- package/components/nve-alert/nve-alert.component.js +2 -227
- package/components/nve-alert/nve-alert.styles.js +45 -27
- package/components/nve-badge/nve-badge.component.js +41 -45
- package/components/nve-badge/nve-badge.styles.js +33 -31
- package/components/nve-button/nve-button.component.d.ts +110 -10
- package/components/nve-button/nve-button.component.js +146 -39
- package/components/nve-button/nve-button.styles.js +214 -157
- package/components/nve-carousel/nve-carousel.component.js +2 -47
- package/components/nve-carousel/nve-carousel.styles.js +6 -6
- package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
- package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
- package/components/nve-checkbox/nve-checkbox.component.js +2 -34
- package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
- package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
- package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
- package/components/nve-combobox/nve-combobox.component.js +222 -440
- package/components/nve-combobox/nve-combobox.styles.js +6 -6
- package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
- package/components/nve-dialog/nve-dialog-styles.js +6 -6
- package/components/nve-dialog/nve-dialog.component.js +2 -54
- package/components/nve-divider/nve-divider.component.js +2 -30
- package/components/nve-drawer/nve-drawer.component.js +2 -44
- package/components/nve-drawer/nve-drawer.styles.js +6 -6
- package/components/nve-dropdown/nve-dropdown.component.js +2 -79
- package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
- package/components/nve-heading/nve-heading.component.d.ts +29 -0
- package/components/nve-heading/nve-heading.component.js +45 -0
- package/components/nve-heading/nve-heading.styles.d.ts +2 -0
- package/components/nve-heading/nve-heading.styles.js +41 -0
- package/components/nve-icon/nve-icon.component.js +145 -164
- package/components/nve-icon/nve-icon.styles.js +11 -6
- package/components/nve-icon/offline-icons.js +16 -13
- package/components/nve-input/nve-input.component.js +2 -100
- package/components/nve-input/nve-input.styles.js +5 -5
- package/components/nve-label/nve-label.component.js +2 -115
- package/components/nve-label/nve-label.styles.js +5 -5
- package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
- package/components/nve-link-card/nve-link-card.component.js +44 -80
- package/components/nve-link-card/nve-link-card.styles.js +71 -66
- package/components/nve-menu/nve-menu.component.js +2 -22
- package/components/nve-menu/nve-menu.styles.js +5 -5
- package/components/nve-menu-item/nve-menu-item.component.js +2 -43
- package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
- package/components/nve-message-card/nve-message-card.component.js +61 -91
- package/components/nve-message-card/nve-message-card.styles.js +24 -27
- package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
- package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
- package/components/nve-option/nve-option.component.js +2 -41
- package/components/nve-option/nve-option.styles.js +5 -5
- package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
- package/components/nve-paragraph/nve-paragraph.component.js +26 -0
- package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
- package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
- package/components/nve-popup/nve-popup.component.js +2 -22
- package/components/nve-radio/nve-radio.component.js +2 -23
- package/components/nve-radio/nve-radio.styles.js +5 -5
- package/components/nve-radio-button/nve-radio-button.component.js +2 -25
- package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
- package/components/nve-radio-group/nve-radio-group.component.js +2 -119
- package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
- package/components/nve-relative-time/nve-relative-time.component.js +21 -56
- package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
- package/components/nve-select/nve-select.component.js +2 -80
- package/components/nve-select/nve-select.styles.js +6 -6
- package/components/nve-skeleton/nve-skeleton.component.js +2 -27
- package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
- package/components/nve-spinner/nve-spinner.component.js +2 -31
- package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
- package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
- package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
- package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
- package/components/nve-stepper/nve-stepper.component.js +94 -139
- package/components/nve-stepper/nve-stepper.styles.js +5 -5
- package/components/nve-switch/nve-switch.component.js +75 -107
- package/components/nve-switch/nve-switch.styles.js +7 -7
- package/components/nve-tab/nve-tab.component.js +30 -42
- package/components/nve-tab/nve-tab.styles.js +7 -7
- package/components/nve-tab-group/nve-tab-group.component.js +180 -260
- package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
- package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
- package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
- package/components/nve-tag/nve-tag.component.d.ts +3 -3
- package/components/nve-tag/nve-tag.component.js +71 -72
- package/components/nve-tag/nve-tag.styles.js +23 -22
- package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
- package/components/nve-textarea/nve-textarea.component.js +112 -173
- package/components/nve-textarea/nve-textarea.styles.js +10 -5
- package/components/nve-tooltip/nve-tooltip.component.js +2 -30
- package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
- package/components/nve-warning-level/nve-warning-level.component.js +2 -78
- package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
- package/css/global.css +13 -55
- package/css/nve.css +1048 -393
- package/css/nve_dark.css +406 -305
- package/css/rme.css +1050 -395
- package/css/rme_dark.css +408 -307
- package/css/shoelace-styles.css +539 -0
- package/css/varsom.css +1046 -391
- package/css/varsom_dark.css +404 -303
- package/custom-elements.json +2905 -12389
- package/fonts/LICENSE.txt +37 -0
- package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
- package/interfaces/NveComponent.interface.js +0 -1
- package/nve-designsystem.d.ts +5 -0
- package/nve-designsystem.js +46 -86
- package/package.json +26 -8
- package/registerIcons/systemLibraryCustomization.js +23 -91
- package/vite-env.d.js +0 -1
- package/chunks/chunk.3RPBFEDE.js +0 -162
- package/chunks/chunk.JCXLDPQF.js +0 -225
- package/chunks/chunk.JQBT7BOV.js +0 -8446
- package/chunks/chunk.MAQXLKQ7.js +0 -598
- package/chunks/lit-element.js +0 -508
- package/chunks/property.js +0 -37
- package/chunks/query.js +0 -13
- package/chunks/state.js +0 -7
- package/chunks/static.js +0 -26
- package/nve-designsystem.css +0 -1
- package/vscode.css-custom-data.json +0 -621
- package/vscode.html-custom-data.json +0 -2354
package/chunks/chunk.SAPQLUO4.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { n as
|
|
13
|
-
|
|
14
|
-
var
|
|
1
|
+
import { a as e, u as t } from "./lit.js";
|
|
2
|
+
import { o as n, r } from "./decorate.js";
|
|
3
|
+
import { n as i, r as a, t as o } from "./chunk.4TUIT776.js";
|
|
4
|
+
import { t as s } from "./chunk.NYIIDP5N.js";
|
|
5
|
+
import { t as c } from "./chunk.GMYPQTFK.js";
|
|
6
|
+
import { t as l } from "./class-map.js";
|
|
7
|
+
import { t as u } from "./if-defined.js";
|
|
8
|
+
import { t as d } from "./chunk.6CTB5ZDJ.js";
|
|
9
|
+
import { n as f, t as p } from "./chunk.K7JGTRV7.js";
|
|
10
|
+
import { n as m, o as h, t as g } from "./chunk.B4BZKR24.js";
|
|
11
|
+
import { i as _, r as v, t as y } from "./chunk.RWUUFNUL.js";
|
|
12
|
+
import { n as b, t as x } from "./chunk.LD4M4QGE.js";
|
|
13
|
+
//#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BRQKZQRB.js
|
|
14
|
+
var S = t`
|
|
15
15
|
:host {
|
|
16
16
|
--size: 25rem;
|
|
17
17
|
--header-spacing: var(--sl-spacing-large);
|
|
@@ -165,100 +165,88 @@ var A = v`
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
`;
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.C5MXLBOG.js
|
|
170
|
+
function C(e) {
|
|
171
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
170
172
|
}
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
this.open && !this.contained && (this.modal.activate(), h(this)), this.open && this.contained && (this.modal.deactivate(), c(this));
|
|
235
|
-
}
|
|
236
|
-
/** Shows the drawer. */
|
|
237
|
-
async show() {
|
|
238
|
-
if (!this.open)
|
|
239
|
-
return this.open = !0, m(this, "sl-after-show");
|
|
240
|
-
}
|
|
241
|
-
/** Hides the drawer */
|
|
242
|
-
async hide() {
|
|
243
|
-
if (this.open)
|
|
244
|
-
return this.open = !1, m(this, "sl-after-hide");
|
|
245
|
-
}
|
|
246
|
-
render() {
|
|
247
|
-
return f`
|
|
173
|
+
var w = class extends o {
|
|
174
|
+
constructor() {
|
|
175
|
+
super(...arguments), this.hasSlotController = new s(this, "footer"), this.localize = new d(this), this.modal = new b(this), this.open = !1, this.label = "", this.placement = "end", this.contained = !1, this.noHeader = !1, this.handleDocumentKeyDown = (e) => {
|
|
176
|
+
this.contained || e.key === "Escape" && this.modal.isActive() && this.open && (e.stopImmediatePropagation(), this.requestClose("keyboard"));
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
firstUpdated() {
|
|
180
|
+
this.drawer.hidden = !this.open, this.open && (this.addOpenListeners(), this.contained || (this.modal.activate(), y(this)));
|
|
181
|
+
}
|
|
182
|
+
disconnectedCallback() {
|
|
183
|
+
super.disconnectedCallback(), v(this), this.removeOpenListeners();
|
|
184
|
+
}
|
|
185
|
+
requestClose(e) {
|
|
186
|
+
if (this.emit("sl-request-close", {
|
|
187
|
+
cancelable: !0,
|
|
188
|
+
detail: { source: e }
|
|
189
|
+
}).defaultPrevented) {
|
|
190
|
+
let e = p(this, "drawer.denyClose", { dir: this.localize.dir() });
|
|
191
|
+
m(this.panel, e.keyframes, e.options);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this.hide();
|
|
195
|
+
}
|
|
196
|
+
addOpenListeners() {
|
|
197
|
+
var e;
|
|
198
|
+
"CloseWatcher" in window ? ((e = this.closeWatcher) == null || e.destroy(), this.contained || (this.closeWatcher = new CloseWatcher(), this.closeWatcher.onclose = () => this.requestClose("keyboard"))) : document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
199
|
+
}
|
|
200
|
+
removeOpenListeners() {
|
|
201
|
+
var e;
|
|
202
|
+
document.removeEventListener("keydown", this.handleDocumentKeyDown), (e = this.closeWatcher) == null || e.destroy();
|
|
203
|
+
}
|
|
204
|
+
async handleOpenChange() {
|
|
205
|
+
if (this.open) {
|
|
206
|
+
this.emit("sl-show"), this.addOpenListeners(), this.originalTrigger = document.activeElement, this.contained || (this.modal.activate(), y(this));
|
|
207
|
+
let e = this.querySelector("[autofocus]");
|
|
208
|
+
e && e.removeAttribute("autofocus"), await Promise.all([h(this.drawer), h(this.overlay)]), this.drawer.hidden = !1, requestAnimationFrame(() => {
|
|
209
|
+
this.emit("sl-initial-focus", { cancelable: !0 }).defaultPrevented || (e ? e.focus({ preventScroll: !0 }) : this.panel.focus({ preventScroll: !0 })), e && e.setAttribute("autofocus", "");
|
|
210
|
+
});
|
|
211
|
+
let t = p(this, `drawer.show${C(this.placement)}`, { dir: this.localize.dir() }), n = p(this, "drawer.overlay.show", { dir: this.localize.dir() });
|
|
212
|
+
await Promise.all([m(this.panel, t.keyframes, t.options), m(this.overlay, n.keyframes, n.options)]), this.emit("sl-after-show");
|
|
213
|
+
} else {
|
|
214
|
+
x(this), this.emit("sl-hide"), this.removeOpenListeners(), this.contained || (this.modal.deactivate(), v(this)), await Promise.all([h(this.drawer), h(this.overlay)]);
|
|
215
|
+
let e = p(this, `drawer.hide${C(this.placement)}`, { dir: this.localize.dir() }), t = p(this, "drawer.overlay.hide", { dir: this.localize.dir() });
|
|
216
|
+
await Promise.all([m(this.overlay, t.keyframes, t.options).then(() => {
|
|
217
|
+
this.overlay.hidden = !0;
|
|
218
|
+
}), m(this.panel, e.keyframes, e.options).then(() => {
|
|
219
|
+
this.panel.hidden = !0;
|
|
220
|
+
})]), this.drawer.hidden = !0, this.overlay.hidden = !1, this.panel.hidden = !1;
|
|
221
|
+
let n = this.originalTrigger;
|
|
222
|
+
typeof n?.focus == "function" && setTimeout(() => n.focus()), this.emit("sl-after-hide");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
handleNoModalChange() {
|
|
226
|
+
this.open && !this.contained && (this.modal.activate(), y(this)), this.open && this.contained && (this.modal.deactivate(), v(this));
|
|
227
|
+
}
|
|
228
|
+
async show() {
|
|
229
|
+
if (!this.open) return this.open = !0, g(this, "sl-after-show");
|
|
230
|
+
}
|
|
231
|
+
async hide() {
|
|
232
|
+
if (this.open) return this.open = !1, g(this, "sl-after-hide");
|
|
233
|
+
}
|
|
234
|
+
render() {
|
|
235
|
+
return e`
|
|
248
236
|
<div
|
|
249
237
|
part="base"
|
|
250
|
-
class=${
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
238
|
+
class=${l({
|
|
239
|
+
drawer: !0,
|
|
240
|
+
"drawer--open": this.open,
|
|
241
|
+
"drawer--top": this.placement === "top",
|
|
242
|
+
"drawer--end": this.placement === "end",
|
|
243
|
+
"drawer--bottom": this.placement === "bottom",
|
|
244
|
+
"drawer--start": this.placement === "start",
|
|
245
|
+
"drawer--contained": this.contained,
|
|
246
|
+
"drawer--fixed": !this.contained,
|
|
247
|
+
"drawer--rtl": this.localize.dir() === "rtl",
|
|
248
|
+
"drawer--has-footer": this.hasSlotController.test("footer")
|
|
249
|
+
})}
|
|
262
250
|
>
|
|
263
251
|
<div part="overlay" class="drawer__overlay" @click=${() => this.requestClose("overlay")} tabindex="-1"></div>
|
|
264
252
|
|
|
@@ -272,11 +260,11 @@ var t = class extends z {
|
|
|
272
260
|
aria-labelledby=${u(this.noHeader ? void 0 : "title")}
|
|
273
261
|
tabindex="0"
|
|
274
262
|
>
|
|
275
|
-
${this.noHeader ? "" :
|
|
263
|
+
${this.noHeader ? "" : e`
|
|
276
264
|
<header part="header" class="drawer__header">
|
|
277
265
|
<h2 part="title" class="drawer__title" id="title">
|
|
278
266
|
<!-- If there's no label, use an invisible character to prevent the header from collapsing -->
|
|
279
|
-
<slot name="label"> ${this.label.length > 0 ? this.label : "
|
|
267
|
+
<slot name="label"> ${this.label.length > 0 ? this.label : ""} </slot>
|
|
280
268
|
</h2>
|
|
281
269
|
<div part="header-actions" class="drawer__header-actions">
|
|
282
270
|
<slot name="header-actions"></slot>
|
|
@@ -301,126 +289,159 @@ var t = class extends z {
|
|
|
301
289
|
</div>
|
|
302
290
|
</div>
|
|
303
291
|
`;
|
|
304
|
-
|
|
292
|
+
}
|
|
305
293
|
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
],
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
294
|
+
w.styles = [i, S], w.dependencies = { "sl-icon-button": _ }, a([r(".drawer")], w.prototype, "drawer", 2), a([r(".drawer__panel")], w.prototype, "panel", 2), a([r(".drawer__overlay")], w.prototype, "overlay", 2), a([n({
|
|
295
|
+
type: Boolean,
|
|
296
|
+
reflect: !0
|
|
297
|
+
})], w.prototype, "open", 2), a([n({ reflect: !0 })], w.prototype, "label", 2), a([n({ reflect: !0 })], w.prototype, "placement", 2), a([n({
|
|
298
|
+
type: Boolean,
|
|
299
|
+
reflect: !0
|
|
300
|
+
})], w.prototype, "contained", 2), a([n({
|
|
301
|
+
attribute: "no-header",
|
|
302
|
+
type: Boolean,
|
|
303
|
+
reflect: !0
|
|
304
|
+
})], w.prototype, "noHeader", 2), a([c("open", { waitUntilFirstUpdate: !0 })], w.prototype, "handleOpenChange", 1), a([c("contained", { waitUntilFirstUpdate: !0 })], w.prototype, "handleNoModalChange", 1), f("drawer.showTop", {
|
|
305
|
+
keyframes: [{
|
|
306
|
+
opacity: 0,
|
|
307
|
+
translate: "0 -100%"
|
|
308
|
+
}, {
|
|
309
|
+
opacity: 1,
|
|
310
|
+
translate: "0 0"
|
|
311
|
+
}],
|
|
312
|
+
options: {
|
|
313
|
+
duration: 250,
|
|
314
|
+
easing: "ease"
|
|
315
|
+
}
|
|
316
|
+
}), f("drawer.hideTop", {
|
|
317
|
+
keyframes: [{
|
|
318
|
+
opacity: 1,
|
|
319
|
+
translate: "0 0"
|
|
320
|
+
}, {
|
|
321
|
+
opacity: 0,
|
|
322
|
+
translate: "0 -100%"
|
|
323
|
+
}],
|
|
324
|
+
options: {
|
|
325
|
+
duration: 250,
|
|
326
|
+
easing: "ease"
|
|
327
|
+
}
|
|
328
|
+
}), f("drawer.showEnd", {
|
|
329
|
+
keyframes: [{
|
|
330
|
+
opacity: 0,
|
|
331
|
+
translate: "100%"
|
|
332
|
+
}, {
|
|
333
|
+
opacity: 1,
|
|
334
|
+
translate: "0"
|
|
335
|
+
}],
|
|
336
|
+
rtlKeyframes: [{
|
|
337
|
+
opacity: 0,
|
|
338
|
+
translate: "-100%"
|
|
339
|
+
}, {
|
|
340
|
+
opacity: 1,
|
|
341
|
+
translate: "0"
|
|
342
|
+
}],
|
|
343
|
+
options: {
|
|
344
|
+
duration: 250,
|
|
345
|
+
easing: "ease"
|
|
346
|
+
}
|
|
347
|
+
}), f("drawer.hideEnd", {
|
|
348
|
+
keyframes: [{
|
|
349
|
+
opacity: 1,
|
|
350
|
+
translate: "0"
|
|
351
|
+
}, {
|
|
352
|
+
opacity: 0,
|
|
353
|
+
translate: "100%"
|
|
354
|
+
}],
|
|
355
|
+
rtlKeyframes: [{
|
|
356
|
+
opacity: 1,
|
|
357
|
+
translate: "0"
|
|
358
|
+
}, {
|
|
359
|
+
opacity: 0,
|
|
360
|
+
translate: "-100%"
|
|
361
|
+
}],
|
|
362
|
+
options: {
|
|
363
|
+
duration: 250,
|
|
364
|
+
easing: "ease"
|
|
365
|
+
}
|
|
366
|
+
}), f("drawer.showBottom", {
|
|
367
|
+
keyframes: [{
|
|
368
|
+
opacity: 0,
|
|
369
|
+
translate: "0 100%"
|
|
370
|
+
}, {
|
|
371
|
+
opacity: 1,
|
|
372
|
+
translate: "0 0"
|
|
373
|
+
}],
|
|
374
|
+
options: {
|
|
375
|
+
duration: 250,
|
|
376
|
+
easing: "ease"
|
|
377
|
+
}
|
|
378
|
+
}), f("drawer.hideBottom", {
|
|
379
|
+
keyframes: [{
|
|
380
|
+
opacity: 1,
|
|
381
|
+
translate: "0 0"
|
|
382
|
+
}, {
|
|
383
|
+
opacity: 0,
|
|
384
|
+
translate: "0 100%"
|
|
385
|
+
}],
|
|
386
|
+
options: {
|
|
387
|
+
duration: 250,
|
|
388
|
+
easing: "ease"
|
|
389
|
+
}
|
|
390
|
+
}), f("drawer.showStart", {
|
|
391
|
+
keyframes: [{
|
|
392
|
+
opacity: 0,
|
|
393
|
+
translate: "-100%"
|
|
394
|
+
}, {
|
|
395
|
+
opacity: 1,
|
|
396
|
+
translate: "0"
|
|
397
|
+
}],
|
|
398
|
+
rtlKeyframes: [{
|
|
399
|
+
opacity: 0,
|
|
400
|
+
translate: "100%"
|
|
401
|
+
}, {
|
|
402
|
+
opacity: 1,
|
|
403
|
+
translate: "0"
|
|
404
|
+
}],
|
|
405
|
+
options: {
|
|
406
|
+
duration: 250,
|
|
407
|
+
easing: "ease"
|
|
408
|
+
}
|
|
409
|
+
}), f("drawer.hideStart", {
|
|
410
|
+
keyframes: [{
|
|
411
|
+
opacity: 1,
|
|
412
|
+
translate: "0"
|
|
413
|
+
}, {
|
|
414
|
+
opacity: 0,
|
|
415
|
+
translate: "-100%"
|
|
416
|
+
}],
|
|
417
|
+
rtlKeyframes: [{
|
|
418
|
+
opacity: 1,
|
|
419
|
+
translate: "0"
|
|
420
|
+
}, {
|
|
421
|
+
opacity: 0,
|
|
422
|
+
translate: "100%"
|
|
423
|
+
}],
|
|
424
|
+
options: {
|
|
425
|
+
duration: 250,
|
|
426
|
+
easing: "ease"
|
|
427
|
+
}
|
|
428
|
+
}), f("drawer.denyClose", {
|
|
429
|
+
keyframes: [
|
|
430
|
+
{ scale: 1 },
|
|
431
|
+
{ scale: 1.01 },
|
|
432
|
+
{ scale: 1 }
|
|
433
|
+
],
|
|
434
|
+
options: { duration: 250 }
|
|
435
|
+
}), f("drawer.overlay.show", {
|
|
436
|
+
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
437
|
+
options: { duration: 250 }
|
|
438
|
+
}), f("drawer.overlay.hide", {
|
|
439
|
+
keyframes: [{ opacity: 1 }, { opacity: 0 }],
|
|
440
|
+
options: { duration: 250 }
|
|
387
441
|
});
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
{ opacity: 0, translate: "100%" },
|
|
395
|
-
{ opacity: 1, translate: "0" }
|
|
396
|
-
],
|
|
397
|
-
options: { duration: 250, easing: "ease" }
|
|
398
|
-
});
|
|
399
|
-
a("drawer.hideStart", {
|
|
400
|
-
keyframes: [
|
|
401
|
-
{ opacity: 1, translate: "0" },
|
|
402
|
-
{ opacity: 0, translate: "-100%" }
|
|
403
|
-
],
|
|
404
|
-
rtlKeyframes: [
|
|
405
|
-
{ opacity: 1, translate: "0" },
|
|
406
|
-
{ opacity: 0, translate: "100%" }
|
|
407
|
-
],
|
|
408
|
-
options: { duration: 250, easing: "ease" }
|
|
409
|
-
});
|
|
410
|
-
a("drawer.denyClose", {
|
|
411
|
-
keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],
|
|
412
|
-
options: { duration: 250 }
|
|
413
|
-
});
|
|
414
|
-
a("drawer.overlay.show", {
|
|
415
|
-
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
416
|
-
options: { duration: 250 }
|
|
417
|
-
});
|
|
418
|
-
a("drawer.overlay.hide", {
|
|
419
|
-
keyframes: [{ opacity: 1 }, { opacity: 0 }],
|
|
420
|
-
options: { duration: 250 }
|
|
421
|
-
});
|
|
422
|
-
var I = t;
|
|
423
|
-
t.define("sl-drawer");
|
|
424
|
-
export {
|
|
425
|
-
I as d
|
|
426
|
-
};
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.SAPQLUO4.js
|
|
444
|
+
var T = w;
|
|
445
|
+
w.define("sl-drawer");
|
|
446
|
+
//#endregion
|
|
447
|
+
export { T as t };
|
package/chunks/chunk.SI4ACBFK.js
CHANGED
|
@@ -1,5 +1,140 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { u as e } from "./lit.js";
|
|
2
|
+
import { a as t, i as n } from "./chunk.4TUIT776.js";
|
|
3
|
+
//#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3RPBFEDE.js
|
|
4
|
+
var r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new WeakMap(), c = class {
|
|
5
|
+
constructor(e, n) {
|
|
6
|
+
this.handleFormData = (e) => {
|
|
7
|
+
let t = this.options.disabled(this.host), n = this.options.name(this.host), r = this.options.value(this.host), i = this.host.tagName.toLowerCase() === "sl-button";
|
|
8
|
+
this.host.isConnected && !t && !i && typeof n == "string" && n.length > 0 && r !== void 0 && (Array.isArray(r) ? r.forEach((t) => {
|
|
9
|
+
e.formData.append(n, t.toString());
|
|
10
|
+
}) : e.formData.append(n, r.toString()));
|
|
11
|
+
}, this.handleFormSubmit = (e) => {
|
|
12
|
+
var t;
|
|
13
|
+
let n = this.options.disabled(this.host), i = this.options.reportValidity;
|
|
14
|
+
this.form && !this.form.noValidate && ((t = r.get(this.form)) == null || t.forEach((e) => {
|
|
15
|
+
this.setUserInteracted(e, !0);
|
|
16
|
+
})), this.form && !this.form.noValidate && !n && !i(this.host) && (e.preventDefault(), e.stopImmediatePropagation());
|
|
17
|
+
}, this.handleFormReset = () => {
|
|
18
|
+
this.options.setValue(this.host, this.options.defaultValue(this.host)), this.setUserInteracted(this.host, !1), s.set(this.host, []);
|
|
19
|
+
}, this.handleInteraction = (e) => {
|
|
20
|
+
let t = s.get(this.host);
|
|
21
|
+
t.includes(e.type) || t.push(e.type), t.length === this.options.assumeInteractionOn.length && this.setUserInteracted(this.host, !0);
|
|
22
|
+
}, this.checkFormValidity = () => {
|
|
23
|
+
if (this.form && !this.form.noValidate) {
|
|
24
|
+
let e = this.form.querySelectorAll("*");
|
|
25
|
+
for (let t of e) if (typeof t.checkValidity == "function" && !t.checkValidity()) return !1;
|
|
26
|
+
}
|
|
27
|
+
return !0;
|
|
28
|
+
}, this.reportFormValidity = () => {
|
|
29
|
+
if (this.form && !this.form.noValidate) {
|
|
30
|
+
let e = this.form.querySelectorAll("*");
|
|
31
|
+
for (let t of e) if (typeof t.reportValidity == "function" && !t.reportValidity()) return !1;
|
|
32
|
+
}
|
|
33
|
+
return !0;
|
|
34
|
+
}, (this.host = e).addController(this), this.options = t({
|
|
35
|
+
form: (e) => {
|
|
36
|
+
let t = e.form;
|
|
37
|
+
if (t) {
|
|
38
|
+
let n = e.getRootNode().querySelector(`#${t}`);
|
|
39
|
+
if (n) return n;
|
|
40
|
+
}
|
|
41
|
+
return e.closest("form");
|
|
42
|
+
},
|
|
43
|
+
name: (e) => e.name,
|
|
44
|
+
value: (e) => e.value,
|
|
45
|
+
defaultValue: (e) => e.defaultValue,
|
|
46
|
+
disabled: (e) => e.disabled ?? !1,
|
|
47
|
+
reportValidity: (e) => typeof e.reportValidity == "function" ? e.reportValidity() : !0,
|
|
48
|
+
checkValidity: (e) => typeof e.checkValidity == "function" ? e.checkValidity() : !0,
|
|
49
|
+
setValue: (e, t) => e.value = t,
|
|
50
|
+
assumeInteractionOn: ["sl-input"]
|
|
51
|
+
}, n);
|
|
52
|
+
}
|
|
53
|
+
hostConnected() {
|
|
54
|
+
let e = this.options.form(this.host);
|
|
55
|
+
e && this.attachForm(e), s.set(this.host, []), this.options.assumeInteractionOn.forEach((e) => {
|
|
56
|
+
this.host.addEventListener(e, this.handleInteraction);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
hostDisconnected() {
|
|
60
|
+
this.detachForm(), s.delete(this.host), this.options.assumeInteractionOn.forEach((e) => {
|
|
61
|
+
this.host.removeEventListener(e, this.handleInteraction);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
hostUpdated() {
|
|
65
|
+
let e = this.options.form(this.host);
|
|
66
|
+
e || this.detachForm(), e && this.form !== e && (this.detachForm(), this.attachForm(e)), this.host.hasUpdated && this.setValidity(this.host.validity.valid);
|
|
67
|
+
}
|
|
68
|
+
attachForm(e) {
|
|
69
|
+
e ? (this.form = e, r.has(this.form) ? r.get(this.form).add(this.host) : r.set(this.form, /* @__PURE__ */ new Set([this.host])), this.form.addEventListener("formdata", this.handleFormData), this.form.addEventListener("submit", this.handleFormSubmit), this.form.addEventListener("reset", this.handleFormReset), i.has(this.form) || (i.set(this.form, this.form.reportValidity), this.form.reportValidity = () => this.reportFormValidity()), a.has(this.form) || (a.set(this.form, this.form.checkValidity), this.form.checkValidity = () => this.checkFormValidity())) : this.form = void 0;
|
|
70
|
+
}
|
|
71
|
+
detachForm() {
|
|
72
|
+
if (!this.form) return;
|
|
73
|
+
let e = r.get(this.form);
|
|
74
|
+
e && (e.delete(this.host), e.size <= 0 && (this.form.removeEventListener("formdata", this.handleFormData), this.form.removeEventListener("submit", this.handleFormSubmit), this.form.removeEventListener("reset", this.handleFormReset), i.has(this.form) && (this.form.reportValidity = i.get(this.form), i.delete(this.form)), a.has(this.form) && (this.form.checkValidity = a.get(this.form), a.delete(this.form)), this.form = void 0));
|
|
75
|
+
}
|
|
76
|
+
setUserInteracted(e, t) {
|
|
77
|
+
t ? o.add(e) : o.delete(e), e.requestUpdate();
|
|
78
|
+
}
|
|
79
|
+
doAction(e, t) {
|
|
80
|
+
if (this.form) {
|
|
81
|
+
let n = document.createElement("button");
|
|
82
|
+
n.type = e, n.style.position = "absolute", n.style.width = "0", n.style.height = "0", n.style.clipPath = "inset(50%)", n.style.overflow = "hidden", n.style.whiteSpace = "nowrap", t && (n.name = t.name, n.value = t.value, [
|
|
83
|
+
"formaction",
|
|
84
|
+
"formenctype",
|
|
85
|
+
"formmethod",
|
|
86
|
+
"formnovalidate",
|
|
87
|
+
"formtarget"
|
|
88
|
+
].forEach((e) => {
|
|
89
|
+
t.hasAttribute(e) && n.setAttribute(e, t.getAttribute(e));
|
|
90
|
+
})), this.form.append(n), n.click(), n.remove();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
getForm() {
|
|
94
|
+
return this.form ?? null;
|
|
95
|
+
}
|
|
96
|
+
reset(e) {
|
|
97
|
+
this.doAction("reset", e);
|
|
98
|
+
}
|
|
99
|
+
submit(e) {
|
|
100
|
+
this.doAction("submit", e);
|
|
101
|
+
}
|
|
102
|
+
setValidity(e) {
|
|
103
|
+
let t = this.host, n = !!o.has(t), r = !!t.required;
|
|
104
|
+
t.toggleAttribute("data-required", r), t.toggleAttribute("data-optional", !r), t.toggleAttribute("data-invalid", !e), t.toggleAttribute("data-valid", e), t.toggleAttribute("data-user-invalid", !e && n), t.toggleAttribute("data-user-valid", e && n);
|
|
105
|
+
}
|
|
106
|
+
updateValidity() {
|
|
107
|
+
let e = this.host;
|
|
108
|
+
this.setValidity(e.validity.valid);
|
|
109
|
+
}
|
|
110
|
+
emitInvalidEvent(e) {
|
|
111
|
+
let t = new CustomEvent("sl-invalid", {
|
|
112
|
+
bubbles: !1,
|
|
113
|
+
composed: !1,
|
|
114
|
+
cancelable: !0,
|
|
115
|
+
detail: {}
|
|
116
|
+
});
|
|
117
|
+
e || t.preventDefault(), this.host.dispatchEvent(t) || e?.preventDefault();
|
|
118
|
+
}
|
|
119
|
+
}, l = Object.freeze({
|
|
120
|
+
badInput: !1,
|
|
121
|
+
customError: !1,
|
|
122
|
+
patternMismatch: !1,
|
|
123
|
+
rangeOverflow: !1,
|
|
124
|
+
rangeUnderflow: !1,
|
|
125
|
+
stepMismatch: !1,
|
|
126
|
+
tooLong: !1,
|
|
127
|
+
tooShort: !1,
|
|
128
|
+
typeMismatch: !1,
|
|
129
|
+
valid: !0,
|
|
130
|
+
valueMissing: !1
|
|
131
|
+
}), u = Object.freeze(n(t({}, l), {
|
|
132
|
+
valid: !1,
|
|
133
|
+
valueMissing: !0
|
|
134
|
+
})), d = Object.freeze(n(t({}, l), {
|
|
135
|
+
valid: !1,
|
|
136
|
+
customError: !0
|
|
137
|
+
})), f = e`
|
|
3
138
|
.form-control .form-control__label {
|
|
4
139
|
display: none;
|
|
5
140
|
}
|
|
@@ -56,6 +191,5 @@ var r = o`
|
|
|
56
191
|
margin-top: var(--sl-spacing-2x-small);
|
|
57
192
|
}
|
|
58
193
|
`;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
194
|
+
//#endregion
|
|
195
|
+
export { u as a, l as i, c as n, d as r, f as t };
|