@albi_scando/as-design-system-lib 1.9.0 → 1.9.2
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/dist/as-design-system-lib.es.js +571 -426
- package/dist/as-design-system-lib.umd.js +53 -23
- package/dist/types/main.d.ts +1 -0
- package/dist/types/web-components/buttons/base-button/component.d.ts +6 -0
- package/dist/types/web-components/buttons/close-button/component.d.ts +25 -2
- package/dist/types/web-components/buttons/confirm-button/component.d.ts +23 -2
- package/dist/types/web-components/buttons/next-button/component.d.ts +21 -3
- package/dist/types/web-components/buttons/previous-button/component.d.ts +21 -3
- package/dist/types/web-components/buttons/undo-button/component.d.ts +28 -2
- package/dist/types/web-components/loaders/loader-bars/component.d.ts +34 -6
- package/dist/types/web-components/loaders/loader-bars/main.d.ts +2 -0
- package/dist/types/web-components/loaders/loader-bars/selector.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
1
|
+
const ze = "as-design-system-lib";
|
|
2
|
+
class Me {
|
|
3
3
|
/**
|
|
4
4
|
* Creates an instance of WebComponentsRegistry.
|
|
5
5
|
* Registers all custom elements provided in the map of components.
|
|
@@ -19,8 +19,8 @@ class xe {
|
|
|
19
19
|
* @returns {void}
|
|
20
20
|
*/
|
|
21
21
|
registerAllComponents(t) {
|
|
22
|
-
Array.from(t.entries()).forEach(([e,
|
|
23
|
-
this.registerComponent(e,
|
|
22
|
+
Array.from(t.entries()).forEach(([e, i]) => {
|
|
23
|
+
this.registerComponent(e, i);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -36,10 +36,10 @@ class xe {
|
|
|
36
36
|
customElements.get(t) === void 0 ? (customElements.define(t, e), console.log(`Registered Web Component: ${t}`)) : console.warn(`Web Component "${t}" is already registered.`);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const j = {
|
|
40
40
|
CONFIRMATION_DIALOG_CONFIRM: "confirmation-dialog-confirm",
|
|
41
41
|
CONFIRMATION_DIALOG_UNDO: "confirmation-dialog-undo"
|
|
42
|
-
},
|
|
42
|
+
}, S = {
|
|
43
43
|
COSMO: "Cosmo theme with a futuristic and space-inspired design.",
|
|
44
44
|
DARK: "Dark theme with a sleek and modern look.",
|
|
45
45
|
DARK_PURPLE: "Dark Purple theme with a luxurious and elegant feel.",
|
|
@@ -49,7 +49,7 @@ const T = {
|
|
|
49
49
|
LIGHT: "Light theme with a clean and minimalistic design.",
|
|
50
50
|
LIGHT_BLUE: "Light Blue theme with a refreshing and calm appearance.",
|
|
51
51
|
WATER: "Water theme with a serene and tranquil feel."
|
|
52
|
-
},
|
|
52
|
+
}, x = {
|
|
53
53
|
COSMO: "🚀",
|
|
54
54
|
DARK: "🌙",
|
|
55
55
|
DARK_PURPLE: "🟣",
|
|
@@ -69,7 +69,7 @@ const T = {
|
|
|
69
69
|
LIGHT: "Light",
|
|
70
70
|
LIGHT_BLUE: "Light Blue",
|
|
71
71
|
WATER: "Water"
|
|
72
|
-
},
|
|
72
|
+
}, k = {
|
|
73
73
|
COSMO: "cosmo",
|
|
74
74
|
DARK: "dark",
|
|
75
75
|
DARK_PURPLE: "dark-purple",
|
|
@@ -89,107 +89,107 @@ const T = {
|
|
|
89
89
|
LIGHT: "light",
|
|
90
90
|
LIGHT_BLUE: "light-blue",
|
|
91
91
|
WATER: "water"
|
|
92
|
-
},
|
|
92
|
+
}, ht = /* @__PURE__ */ new Map([
|
|
93
93
|
[
|
|
94
94
|
u.COSMO,
|
|
95
95
|
{
|
|
96
|
-
description:
|
|
97
|
-
icon:
|
|
96
|
+
description: S.COSMO,
|
|
97
|
+
icon: x.COSMO,
|
|
98
98
|
id: u.COSMO,
|
|
99
99
|
name: E.COSMO,
|
|
100
|
-
value:
|
|
100
|
+
value: k.COSMO
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
103
|
[
|
|
104
104
|
u.DARK,
|
|
105
105
|
{
|
|
106
|
-
description:
|
|
107
|
-
icon:
|
|
106
|
+
description: S.DARK,
|
|
107
|
+
icon: x.DARK,
|
|
108
108
|
id: u.DARK,
|
|
109
109
|
name: E.DARK,
|
|
110
|
-
value:
|
|
110
|
+
value: k.DARK
|
|
111
111
|
}
|
|
112
112
|
],
|
|
113
113
|
[
|
|
114
114
|
u.DARK_PURPLE,
|
|
115
115
|
{
|
|
116
|
-
description:
|
|
117
|
-
icon:
|
|
116
|
+
description: S.DARK_PURPLE,
|
|
117
|
+
icon: x.DARK_PURPLE,
|
|
118
118
|
id: u.DARK_PURPLE,
|
|
119
119
|
name: E.DARK_PURPLE,
|
|
120
|
-
value:
|
|
120
|
+
value: k.DARK_PURPLE
|
|
121
121
|
}
|
|
122
122
|
],
|
|
123
123
|
[
|
|
124
124
|
u.FERRARI,
|
|
125
125
|
{
|
|
126
|
-
description:
|
|
127
|
-
icon:
|
|
126
|
+
description: S.FERRARI,
|
|
127
|
+
icon: x.FERRARI,
|
|
128
128
|
id: u.FERRARI,
|
|
129
129
|
name: E.FERRARI,
|
|
130
|
-
value:
|
|
130
|
+
value: k.FERRARI
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
133
|
[
|
|
134
134
|
u.FIRE,
|
|
135
135
|
{
|
|
136
|
-
description:
|
|
137
|
-
icon:
|
|
136
|
+
description: S.FIRE,
|
|
137
|
+
icon: x.FIRE,
|
|
138
138
|
id: u.FIRE,
|
|
139
139
|
name: E.FIRE,
|
|
140
|
-
value:
|
|
140
|
+
value: k.FIRE
|
|
141
141
|
}
|
|
142
142
|
],
|
|
143
143
|
[
|
|
144
144
|
u.FOREST,
|
|
145
145
|
{
|
|
146
|
-
description:
|
|
147
|
-
icon:
|
|
146
|
+
description: S.FOREST,
|
|
147
|
+
icon: x.FOREST,
|
|
148
148
|
id: u.FOREST,
|
|
149
149
|
name: E.FOREST,
|
|
150
|
-
value:
|
|
150
|
+
value: k.FOREST
|
|
151
151
|
}
|
|
152
152
|
],
|
|
153
153
|
[
|
|
154
154
|
u.LIGHT,
|
|
155
155
|
{
|
|
156
|
-
description:
|
|
157
|
-
icon:
|
|
156
|
+
description: S.LIGHT,
|
|
157
|
+
icon: x.LIGHT,
|
|
158
158
|
id: u.LIGHT,
|
|
159
159
|
name: E.LIGHT,
|
|
160
|
-
value:
|
|
160
|
+
value: k.LIGHT
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
163
|
[
|
|
164
164
|
u.LIGHT_BLUE,
|
|
165
165
|
{
|
|
166
|
-
description:
|
|
167
|
-
icon:
|
|
166
|
+
description: S.LIGHT_BLUE,
|
|
167
|
+
icon: x.LIGHT_BLUE,
|
|
168
168
|
id: u.LIGHT_BLUE,
|
|
169
169
|
name: E.LIGHT_BLUE,
|
|
170
|
-
value:
|
|
170
|
+
value: k.LIGHT_BLUE
|
|
171
171
|
}
|
|
172
172
|
],
|
|
173
173
|
[
|
|
174
174
|
u.WATER,
|
|
175
175
|
{
|
|
176
|
-
description:
|
|
177
|
-
icon:
|
|
176
|
+
description: S.WATER,
|
|
177
|
+
icon: x.WATER,
|
|
178
178
|
id: u.WATER,
|
|
179
179
|
name: E.WATER,
|
|
180
|
-
value:
|
|
180
|
+
value: k.WATER
|
|
181
181
|
}
|
|
182
182
|
]
|
|
183
|
-
]),
|
|
184
|
-
|
|
185
|
-
const t =
|
|
183
|
+
]), Oe = (O) => {
|
|
184
|
+
bt();
|
|
185
|
+
const t = ht.get(O)?.value;
|
|
186
186
|
t !== void 0 && document.body.classList.add(t);
|
|
187
|
-
},
|
|
187
|
+
}, bt = () => {
|
|
188
188
|
document.body.classList.remove(...Object.values(u));
|
|
189
|
-
},
|
|
189
|
+
}, vt = "base-button", d = "", N = {
|
|
190
190
|
SHOW_MODAL: "show-modal",
|
|
191
191
|
CLOSE: "close"
|
|
192
|
-
},
|
|
192
|
+
}, gt = {
|
|
193
193
|
CUSTOM_CROSSHAIR: `<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
194
194
|
<!-- White border (underneath) -->
|
|
195
195
|
<line x1="16" y1="2" x2="16" y2="30" stroke="white" stroke-width="5"/>
|
|
@@ -200,20 +200,20 @@ const T = {
|
|
|
200
200
|
<line x1="2" y1="16" x2="30" y2="16" stroke="black" stroke-width="2"/>
|
|
201
201
|
</svg>`
|
|
202
202
|
};
|
|
203
|
-
`${btoa(
|
|
204
|
-
const
|
|
203
|
+
`${btoa(gt.CUSTOM_CROSSHAIR)}`;
|
|
204
|
+
const F = {
|
|
205
205
|
ANY: "any",
|
|
206
206
|
NONE: "none"
|
|
207
|
-
},
|
|
207
|
+
}, U = {
|
|
208
208
|
KEY_DOWN: "keydown"
|
|
209
|
-
},
|
|
209
|
+
}, z = {
|
|
210
210
|
CLICK: "click"
|
|
211
|
-
},
|
|
211
|
+
}, pt = `<button part="button">
|
|
212
212
|
<slot></slot>
|
|
213
213
|
</button>
|
|
214
|
-
`,
|
|
215
|
-
|
|
216
|
-
class
|
|
214
|
+
`, ft = "*{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}:where(button,input[type=button],input[type=submit],input[type=reset]),:where(input[type=file])::file-selector-button{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);font-family:var(--font-family-base);letter-spacing:var(--letter-spacing-wide);line-height:var(--line-height-normal);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);display:inline-flex;justify-content:center;align-items:center;text-align:center;gap:var(--gap-sm);background:var(--color-bg-secondary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-lg);box-shadow:var(--shadow-sm);transition:background var(--transition-fast),border-color var(--transition-fast),box-shadow var(--transition-fast),transform var(--transition-fast),filter var(--transition-fast)}:where(button,input[type=button],input[type=submit],input[type=reset])>.material-symbols-outlined{font-size:var(--font-size-xl);font-family:Material Symbols Outlined;line-height:1}:where(button,input[type=button],input[type=submit],input[type=reset])[disabled]{opacity:.35;cursor:not-allowed;box-shadow:none}:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):hover){background:var(--color-hover-bg-secondary);border-color:var(--color-hover-border-secondary);box-shadow:var(--shadow-md)}:where(button,input[type=button],input[type=submit],input[type=reset]):where(:not(:disabled):active){background:var(--color-hover-bg-secondary);border-color:var(--color-hover-border-secondary);box-shadow:var(--shadow-sm)}:where(button,input[type=button],input[type=submit],input[type=reset]):focus-visible{outline:2px solid var(--color-primary);outline-offset:3px}:where(input[type=file]){inline-size:100%;max-inline-size:max-content;background-color:var(--color-bg-secondary)}", K = new CSSStyleSheet();
|
|
215
|
+
K.replaceSync(ft);
|
|
216
|
+
class r extends HTMLElement {
|
|
217
217
|
/**
|
|
218
218
|
* @see HTMLButtonElement.autofocus
|
|
219
219
|
*/
|
|
@@ -251,73 +251,73 @@ class s extends HTMLElement {
|
|
|
251
251
|
* @ignore
|
|
252
252
|
*/
|
|
253
253
|
constructor() {
|
|
254
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
254
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(K);
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
257
|
* Specifies which attributes should be observed for changes.
|
|
258
258
|
*/
|
|
259
259
|
static get observedAttributes() {
|
|
260
260
|
return [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
r.autofocusAttribute,
|
|
262
|
+
r.commandAttribute,
|
|
263
|
+
r.commandforAttribute,
|
|
264
|
+
r.disabledAttribute,
|
|
265
|
+
r.nameAttribute,
|
|
266
|
+
r.titleAttribute,
|
|
267
|
+
r.typeAttribute,
|
|
268
|
+
r.valueAttribute
|
|
269
269
|
];
|
|
270
270
|
}
|
|
271
271
|
get buttonElement() {
|
|
272
272
|
return this.shadowRoot?.querySelector("button");
|
|
273
273
|
}
|
|
274
274
|
get autofocus() {
|
|
275
|
-
return this.hasAttribute(
|
|
275
|
+
return this.hasAttribute(r.autofocusAttribute);
|
|
276
276
|
}
|
|
277
277
|
set autofocus(t) {
|
|
278
|
-
t ? this.setAttribute(
|
|
278
|
+
t ? this.setAttribute(r.autofocusAttribute, d) : this.removeAttribute(r.autofocusAttribute);
|
|
279
279
|
}
|
|
280
280
|
get command() {
|
|
281
|
-
return this.getAttribute(
|
|
281
|
+
return this.getAttribute(r.commandAttribute) ?? d;
|
|
282
282
|
}
|
|
283
283
|
set command(t) {
|
|
284
|
-
this.setAttribute(
|
|
284
|
+
this.setAttribute(r.commandAttribute, t);
|
|
285
285
|
}
|
|
286
286
|
get commandfor() {
|
|
287
|
-
return this.getAttribute(
|
|
287
|
+
return this.getAttribute(r.commandforAttribute) ?? d;
|
|
288
288
|
}
|
|
289
289
|
set commandfor(t) {
|
|
290
|
-
t !== d ? this.setAttribute(
|
|
290
|
+
t !== d ? this.setAttribute(r.commandforAttribute, t) : this.removeAttribute(r.commandforAttribute);
|
|
291
291
|
}
|
|
292
292
|
get disabled() {
|
|
293
|
-
return this.hasAttribute(
|
|
293
|
+
return this.hasAttribute(r.disabledAttribute);
|
|
294
294
|
}
|
|
295
295
|
set disabled(t) {
|
|
296
|
-
t ? this.setAttribute(
|
|
296
|
+
t ? this.setAttribute(r.disabledAttribute, d) : this.removeAttribute(r.disabledAttribute);
|
|
297
297
|
}
|
|
298
298
|
get name() {
|
|
299
|
-
return this.getAttribute(
|
|
299
|
+
return this.getAttribute(r.nameAttribute) ?? d;
|
|
300
300
|
}
|
|
301
301
|
set name(t) {
|
|
302
|
-
t !== d ? this.setAttribute(
|
|
302
|
+
t !== d ? this.setAttribute(r.nameAttribute, t) : this.removeAttribute(r.nameAttribute);
|
|
303
303
|
}
|
|
304
304
|
get headline() {
|
|
305
|
-
return this.getAttribute(
|
|
305
|
+
return this.getAttribute(r.titleAttribute) ?? d;
|
|
306
306
|
}
|
|
307
307
|
set headline(t) {
|
|
308
|
-
t !== d ? this.setAttribute(
|
|
308
|
+
t !== d ? this.setAttribute(r.titleAttribute, t) : this.removeAttribute(r.titleAttribute);
|
|
309
309
|
}
|
|
310
310
|
get type() {
|
|
311
|
-
return this.getAttribute(
|
|
311
|
+
return this.getAttribute(r.typeAttribute) ?? "button";
|
|
312
312
|
}
|
|
313
313
|
set type(t) {
|
|
314
|
-
t !== d ? this.setAttribute(
|
|
314
|
+
t !== d ? this.setAttribute(r.typeAttribute, t) : this.removeAttribute(r.typeAttribute);
|
|
315
315
|
}
|
|
316
316
|
get value() {
|
|
317
|
-
return this.getAttribute(
|
|
317
|
+
return this.getAttribute(r.valueAttribute) ?? "button";
|
|
318
318
|
}
|
|
319
319
|
set value(t) {
|
|
320
|
-
t !== d ? this.setAttribute(
|
|
320
|
+
t !== d ? this.setAttribute(r.valueAttribute, t) : this.removeAttribute(r.valueAttribute);
|
|
321
321
|
}
|
|
322
322
|
/**
|
|
323
323
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
@@ -344,15 +344,15 @@ class s extends HTMLElement {
|
|
|
344
344
|
* @param newValue - The new value (or null if removed)
|
|
345
345
|
* @returns {void}
|
|
346
346
|
*/
|
|
347
|
-
attributeChangedCallback(t, e,
|
|
348
|
-
|
|
347
|
+
attributeChangedCallback(t, e, i) {
|
|
348
|
+
i !== e && this._syncAttribute(t);
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
* Renders the component's HTML structure.
|
|
352
352
|
* Syncs host attributes to the internal button element.
|
|
353
353
|
*/
|
|
354
354
|
_render() {
|
|
355
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
355
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = pt, this._syncAttributes());
|
|
356
356
|
}
|
|
357
357
|
/**
|
|
358
358
|
* Adds event listeners to the component.
|
|
@@ -360,7 +360,7 @@ class s extends HTMLElement {
|
|
|
360
360
|
* @returns {void}
|
|
361
361
|
*/
|
|
362
362
|
_addEventListeners() {
|
|
363
|
-
this.buttonElement
|
|
363
|
+
this.buttonElement?.addEventListener(z.CLICK, this._handleClick);
|
|
364
364
|
}
|
|
365
365
|
/**
|
|
366
366
|
* Removes event listeners from the component.
|
|
@@ -368,7 +368,10 @@ class s extends HTMLElement {
|
|
|
368
368
|
* @returns {void}
|
|
369
369
|
*/
|
|
370
370
|
_removeEventListeners() {
|
|
371
|
-
this.buttonElement
|
|
371
|
+
this.buttonElement?.removeEventListener(
|
|
372
|
+
z.CLICK,
|
|
373
|
+
this._handleClick
|
|
374
|
+
);
|
|
372
375
|
}
|
|
373
376
|
/**
|
|
374
377
|
* Handles the internal button click event and executes the configured command.
|
|
@@ -400,10 +403,10 @@ class s extends HTMLElement {
|
|
|
400
403
|
return;
|
|
401
404
|
const e = t;
|
|
402
405
|
switch (this.command) {
|
|
403
|
-
case
|
|
406
|
+
case N.SHOW_MODAL:
|
|
404
407
|
e.showModal?.();
|
|
405
408
|
break;
|
|
406
|
-
case
|
|
409
|
+
case N.CLOSE:
|
|
407
410
|
e.close?.();
|
|
408
411
|
break;
|
|
409
412
|
}
|
|
@@ -416,14 +419,14 @@ class s extends HTMLElement {
|
|
|
416
419
|
* @returns The element if found, null otherwise
|
|
417
420
|
*/
|
|
418
421
|
_findElementInShadowDOM(t) {
|
|
419
|
-
const
|
|
420
|
-
let
|
|
421
|
-
if (
|
|
422
|
-
return
|
|
422
|
+
const i = `#${CSS.escape(t)}`;
|
|
423
|
+
let s = this.querySelector(i);
|
|
424
|
+
if (s !== null || (s = this._searchInShadowRootsOfChildren(this, i), s !== null))
|
|
425
|
+
return s;
|
|
423
426
|
let a = this.parentElement;
|
|
424
427
|
for (; a !== null; ) {
|
|
425
|
-
if (
|
|
426
|
-
return
|
|
428
|
+
if (s = a.querySelector(i), s !== null || (s = this._searchInShadowRootsOfChildren(a, i), s !== null))
|
|
429
|
+
return s;
|
|
427
430
|
const v = a.parentElement;
|
|
428
431
|
if (v !== null)
|
|
429
432
|
a = v;
|
|
@@ -445,21 +448,21 @@ class s extends HTMLElement {
|
|
|
445
448
|
* @returns The element if found, null otherwise
|
|
446
449
|
*/
|
|
447
450
|
_searchInShadowRootsOfChildren(t, e) {
|
|
448
|
-
const
|
|
449
|
-
for (const
|
|
450
|
-
if (
|
|
451
|
-
const v =
|
|
451
|
+
const i = t.children;
|
|
452
|
+
for (const s of i) {
|
|
453
|
+
if (s.shadowRoot !== null) {
|
|
454
|
+
const v = s.shadowRoot.querySelector(e);
|
|
452
455
|
if (v !== null)
|
|
453
456
|
return v;
|
|
454
457
|
const c = this._searchInShadowRootsOfChildren(
|
|
455
|
-
|
|
458
|
+
s.shadowRoot,
|
|
456
459
|
e
|
|
457
460
|
);
|
|
458
461
|
if (c !== null)
|
|
459
462
|
return c;
|
|
460
463
|
}
|
|
461
464
|
const a = this._searchInShadowRootsOfChildren(
|
|
462
|
-
|
|
465
|
+
s,
|
|
463
466
|
e
|
|
464
467
|
);
|
|
465
468
|
if (a !== null)
|
|
@@ -470,12 +473,18 @@ class s extends HTMLElement {
|
|
|
470
473
|
/**
|
|
471
474
|
* Syncs a single attribute from host to button element.
|
|
472
475
|
*
|
|
476
|
+
* The `command` and `commandfor` attributes are intentionally excluded from
|
|
477
|
+
* this sync: they live on the host element and are read there by the custom
|
|
478
|
+
* `_handleClick` handler. Putting them on the inner `<button>` would trigger
|
|
479
|
+
* the browser's native Invoker Commands API, which can conflict with our own
|
|
480
|
+
* click handling logic.
|
|
481
|
+
*
|
|
473
482
|
* @param name - The attribute name to sync
|
|
474
483
|
* @returns {void}
|
|
475
484
|
*/
|
|
476
485
|
_syncAttribute(t) {
|
|
477
486
|
const e = this.buttonElement;
|
|
478
|
-
e !== null && (this.hasAttribute(t) ? e.setAttribute(t, this.getAttribute(t) ?? d) : e.removeAttribute(t));
|
|
487
|
+
e !== null && (t === r.commandAttribute || t === r.commandforAttribute || (this.hasAttribute(t) ? e.setAttribute(t, this.getAttribute(t) ?? d) : e.removeAttribute(t)));
|
|
479
488
|
}
|
|
480
489
|
/**
|
|
481
490
|
* Syncs all observed attributes from host to button element.
|
|
@@ -484,168 +493,201 @@ class s extends HTMLElement {
|
|
|
484
493
|
* @returns {void}
|
|
485
494
|
*/
|
|
486
495
|
_syncAttributes() {
|
|
487
|
-
|
|
496
|
+
r.observedAttributes.forEach((t) => {
|
|
488
497
|
this._syncAttribute(t);
|
|
489
498
|
});
|
|
490
499
|
}
|
|
491
500
|
}
|
|
492
|
-
const
|
|
501
|
+
const $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
493
502
|
__proto__: null,
|
|
494
|
-
BaseButtonComponent:
|
|
495
|
-
selector:
|
|
496
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
503
|
+
BaseButtonComponent: r,
|
|
504
|
+
selector: vt
|
|
505
|
+
}, Symbol.toStringTag, { value: "Module" })), mt = `<button title="Undo" part="button">
|
|
497
506
|
<span class="material-symbols-outlined">undo</span>
|
|
498
507
|
<span>Undo</span>
|
|
499
508
|
</button>
|
|
500
|
-
`,
|
|
501
|
-
|
|
502
|
-
class
|
|
509
|
+
`, yt = "*{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}button[part=button]{background:var(--color-warning);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", G = new CSSStyleSheet();
|
|
510
|
+
G.replaceSync(yt);
|
|
511
|
+
class At extends r {
|
|
503
512
|
/**
|
|
504
513
|
* @constructor
|
|
505
514
|
* @ignore
|
|
506
515
|
*/
|
|
507
516
|
constructor() {
|
|
508
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
517
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(G);
|
|
509
518
|
}
|
|
510
519
|
/**
|
|
511
520
|
* Specifies which attributes should be observed for changes.
|
|
512
521
|
*/
|
|
513
522
|
static get observedAttributes() {
|
|
514
|
-
return
|
|
523
|
+
return r.observedAttributes;
|
|
515
524
|
}
|
|
516
525
|
/**
|
|
517
526
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
518
527
|
*/
|
|
519
528
|
connectedCallback() {
|
|
520
|
-
this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
529
|
+
this.hasAttribute("command") || this.setAttribute("command", N.CLOSE), this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
533
|
+
*/
|
|
534
|
+
disconnectedCallback() {
|
|
535
|
+
this._removeEventListeners();
|
|
521
536
|
}
|
|
522
537
|
/**
|
|
523
538
|
* Renders the component's HTML structure.
|
|
524
539
|
*/
|
|
525
540
|
_render() {
|
|
526
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
541
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = mt, this._syncAttributes());
|
|
527
542
|
}
|
|
528
543
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
544
|
+
* Finds the closest parent dialog and sets the `commandfor` attribute to its
|
|
545
|
+
* ID so that clicking the button closes the dialog automatically.
|
|
546
|
+
*
|
|
547
|
+
* Only sets `commandfor` when the button is nested inside a recognised dialog
|
|
548
|
+
* element. When used standalone the caller is responsible for setting it.
|
|
531
549
|
*
|
|
532
550
|
* @returns {void}
|
|
533
551
|
*/
|
|
534
552
|
_setCommandForAttribute() {
|
|
553
|
+
if (this.hasAttribute("commandfor"))
|
|
554
|
+
return;
|
|
535
555
|
let t = this.getRootNode();
|
|
536
556
|
"host" in t && t.host !== null && t.host !== void 0 && (t = t.host);
|
|
537
557
|
const e = t instanceof Element ? t.closest("base-dialog") ?? t.closest("confirmation-dialog") : null;
|
|
538
558
|
e !== null && (this.commandfor = e.id);
|
|
539
559
|
}
|
|
540
560
|
}
|
|
541
|
-
const
|
|
561
|
+
const q = "undo-button", Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
542
562
|
__proto__: null,
|
|
543
|
-
UndoButtonComponent:
|
|
544
|
-
selector:
|
|
545
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
563
|
+
UndoButtonComponent: At,
|
|
564
|
+
selector: q
|
|
565
|
+
}, Symbol.toStringTag, { value: "Module" })), _t = `<div class="tooltip">Close</div>
|
|
546
566
|
<button part="button" title="Close">
|
|
547
567
|
<span class="material-symbols-outlined">close</span>
|
|
548
568
|
</button>
|
|
549
|
-
`,
|
|
550
|
-
|
|
551
|
-
class
|
|
569
|
+
`, wt = "*{box-sizing:border-box}:host{position:relative;display:inline-flex;vertical-align:middle}.tooltip{position:absolute;top:auto;bottom:calc(100% + .5rem);left:50%;right:auto;transform:translate(-50%);width:max-content;height:auto;padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);z-index:10000;margin:0}button[part=button]{background:var(--color-error);border:none;border-radius:var(--border-radius-md);padding:var(--spacing-2);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1;transition:all var(--transition-base);box-shadow:var(--shadow-md);position:relative}button[part=button]:hover{filter:brightness(1.2)}:host(:hover) .tooltip{opacity:1;visibility:visible}", C = new CSSStyleSheet();
|
|
570
|
+
C.replaceSync(wt);
|
|
571
|
+
class St extends r {
|
|
552
572
|
/**
|
|
553
573
|
* @constructor
|
|
554
574
|
* @ignore
|
|
555
575
|
*/
|
|
556
576
|
constructor() {
|
|
557
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
577
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(C);
|
|
558
578
|
}
|
|
559
579
|
/**
|
|
560
580
|
* Specifies which attributes should be observed for changes.
|
|
561
581
|
*/
|
|
562
582
|
static get observedAttributes() {
|
|
563
|
-
return
|
|
583
|
+
return r.observedAttributes;
|
|
564
584
|
}
|
|
565
585
|
/**
|
|
566
586
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
567
587
|
*/
|
|
568
588
|
connectedCallback() {
|
|
569
|
-
this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
589
|
+
this.hasAttribute("command") || this.setAttribute("command", N.CLOSE), this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
593
|
+
*/
|
|
594
|
+
disconnectedCallback() {
|
|
595
|
+
this._removeEventListeners();
|
|
570
596
|
}
|
|
571
597
|
/**
|
|
572
598
|
* Renders the component's HTML structure.
|
|
573
599
|
*/
|
|
574
600
|
_render() {
|
|
575
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
601
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = _t, this._syncAttributes());
|
|
576
602
|
}
|
|
577
603
|
/**
|
|
578
|
-
*
|
|
579
|
-
*
|
|
604
|
+
* Finds the closest parent dialog and sets the `commandfor` attribute to its ID
|
|
605
|
+
* so that clicking the button closes the dialog automatically.
|
|
606
|
+
*
|
|
607
|
+
* Only sets `commandfor` when the button is nested inside a recognized dialog
|
|
608
|
+
* element. When used standalone the caller is responsible for setting it.
|
|
580
609
|
*
|
|
581
610
|
* @returns {void}
|
|
582
611
|
*/
|
|
583
612
|
_setCommandForAttribute() {
|
|
613
|
+
if (this.hasAttribute("commandfor"))
|
|
614
|
+
return;
|
|
584
615
|
let t = this.getRootNode();
|
|
585
616
|
"host" in t && t.host !== null && t.host !== void 0 && (t = t.host);
|
|
586
617
|
const e = t instanceof Element ? t.closest("base-dialog") ?? t.closest("confirmation-dialog") : null;
|
|
587
618
|
e !== null && (this.commandfor = e.id);
|
|
588
619
|
}
|
|
589
620
|
}
|
|
590
|
-
const
|
|
621
|
+
const xt = "close-button", He = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
591
622
|
__proto__: null,
|
|
592
|
-
CloseButtonComponent:
|
|
593
|
-
selector:
|
|
594
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
623
|
+
CloseButtonComponent: St,
|
|
624
|
+
selector: xt
|
|
625
|
+
}, Symbol.toStringTag, { value: "Module" })), Et = `<button title="Confirm" part="button">
|
|
595
626
|
<span class="material-symbols-outlined">check</span>
|
|
596
627
|
<span>Confirm</span>
|
|
597
628
|
</button>
|
|
598
|
-
`,
|
|
599
|
-
|
|
600
|
-
class
|
|
629
|
+
`, kt = "*{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}button[part=button]{background:var(--color-success);font-weight:var(--font-weight-medium);padding-block:var(--button-padding-block-md);padding-inline:var(--button-padding-inline-md);border-radius:var(--border-radius-lg);border:none;box-shadow:var(--shadow-md);transition:all var(--transition-base);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:var(--gap-sm)}button[part=button]:hover{filter:brightness(1.2)}", W = new CSSStyleSheet();
|
|
630
|
+
W.replaceSync(kt);
|
|
631
|
+
class Lt extends r {
|
|
601
632
|
/**
|
|
602
633
|
* @constructor
|
|
603
634
|
* @ignore
|
|
604
635
|
*/
|
|
605
636
|
constructor() {
|
|
606
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
637
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(W);
|
|
607
638
|
}
|
|
608
639
|
/**
|
|
609
640
|
* Specifies which attributes should be observed for changes.
|
|
610
641
|
*/
|
|
611
642
|
static get observedAttributes() {
|
|
612
|
-
return
|
|
643
|
+
return r.observedAttributes;
|
|
613
644
|
}
|
|
614
645
|
/**
|
|
615
646
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
616
647
|
*/
|
|
617
648
|
connectedCallback() {
|
|
618
|
-
this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
649
|
+
this.hasAttribute("command") || this.setAttribute("command", N.CLOSE), this._render(), this._setCommandForAttribute(), this._addEventListeners();
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
653
|
+
*/
|
|
654
|
+
disconnectedCallback() {
|
|
655
|
+
this._removeEventListeners();
|
|
619
656
|
}
|
|
620
657
|
/**
|
|
621
658
|
* Renders the component's HTML structure.
|
|
622
659
|
*/
|
|
623
660
|
_render() {
|
|
624
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
661
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Et, this._syncAttributes());
|
|
625
662
|
}
|
|
626
663
|
/**
|
|
627
|
-
*
|
|
628
|
-
*
|
|
664
|
+
* Finds the closest parent dialog and sets the `commandfor` attribute to its
|
|
665
|
+
* ID so that clicking the button closes the dialog automatically.
|
|
666
|
+
*
|
|
667
|
+
* Only sets `commandfor` when the button is nested inside a recognised dialog
|
|
668
|
+
* element. When used standalone the caller is responsible for setting it.
|
|
629
669
|
*
|
|
630
670
|
* @returns {void}
|
|
631
671
|
*/
|
|
632
672
|
_setCommandForAttribute() {
|
|
673
|
+
if (this.hasAttribute("commandfor"))
|
|
674
|
+
return;
|
|
633
675
|
let t = this.getRootNode();
|
|
634
676
|
"host" in t && t.host !== null && t.host !== void 0 && (t = t.host);
|
|
635
677
|
const e = t instanceof Element ? t.closest("base-dialog") ?? t.closest("confirmation-dialog") : null;
|
|
636
678
|
e !== null && (this.commandfor = e.id);
|
|
637
679
|
}
|
|
638
680
|
}
|
|
639
|
-
const
|
|
681
|
+
const P = "confirm-button", Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
640
682
|
__proto__: null,
|
|
641
|
-
ConfirmButtonComponent:
|
|
642
|
-
selector:
|
|
643
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
683
|
+
ConfirmButtonComponent: Lt,
|
|
684
|
+
selector: P
|
|
685
|
+
}, Symbol.toStringTag, { value: "Module" })), Rt = `<button part="button">
|
|
644
686
|
<span class="material-symbols-outlined">chevron_left</span>
|
|
645
687
|
</button>
|
|
646
|
-
`,
|
|
647
|
-
|
|
648
|
-
class H extends
|
|
688
|
+
`, zt = "*{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", Y = new CSSStyleSheet();
|
|
689
|
+
Y.replaceSync(zt);
|
|
690
|
+
class H extends r {
|
|
649
691
|
static _disabledAttribute = "disabled";
|
|
650
692
|
static _titleAttribute = "title";
|
|
651
693
|
/**
|
|
@@ -653,13 +695,13 @@ class H extends s {
|
|
|
653
695
|
* @ignore
|
|
654
696
|
*/
|
|
655
697
|
constructor() {
|
|
656
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
698
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(Y);
|
|
657
699
|
}
|
|
658
700
|
/**
|
|
659
701
|
* Specifies which attributes should be observed for changes.
|
|
660
702
|
*/
|
|
661
703
|
static get observedAttributes() {
|
|
662
|
-
return
|
|
704
|
+
return r.observedAttributes;
|
|
663
705
|
}
|
|
664
706
|
/**
|
|
665
707
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
@@ -667,18 +709,24 @@ class H extends s {
|
|
|
667
709
|
connectedCallback() {
|
|
668
710
|
this._render(), this._addEventListeners(), this._updateTitle();
|
|
669
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
714
|
+
*/
|
|
715
|
+
disconnectedCallback() {
|
|
716
|
+
this._removeEventListeners();
|
|
717
|
+
}
|
|
670
718
|
/**
|
|
671
719
|
* Lifecycle hook invoked whenever an observed attribute changes.
|
|
672
720
|
* Updates the title visibility based on disabled state.
|
|
673
721
|
*/
|
|
674
|
-
attributeChangedCallback(t, e,
|
|
675
|
-
super.attributeChangedCallback(t, e,
|
|
722
|
+
attributeChangedCallback(t, e, i) {
|
|
723
|
+
super.attributeChangedCallback(t, e, i), t === H._disabledAttribute && this._updateTitle();
|
|
676
724
|
}
|
|
677
725
|
/**
|
|
678
726
|
* Renders the component's HTML structure.
|
|
679
727
|
*/
|
|
680
728
|
_render() {
|
|
681
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
729
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Rt, this._syncAttributes());
|
|
682
730
|
}
|
|
683
731
|
/**
|
|
684
732
|
* Updates the title attribute based on disabled state.
|
|
@@ -691,16 +739,16 @@ class H extends s {
|
|
|
691
739
|
t !== null && (this.disabled ? t.removeAttribute(H._titleAttribute) : t.setAttribute(H._titleAttribute, "Previous"));
|
|
692
740
|
}
|
|
693
741
|
}
|
|
694
|
-
const
|
|
742
|
+
const Mt = "previous-button", Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
695
743
|
__proto__: null,
|
|
696
744
|
PreviousButtonComponent: H,
|
|
697
|
-
selector:
|
|
698
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
745
|
+
selector: Mt
|
|
746
|
+
}, Symbol.toStringTag, { value: "Module" })), Ot = `<button part="button">
|
|
699
747
|
<span class="material-symbols-outlined">chevron_right</span>
|
|
700
748
|
</button>
|
|
701
|
-
`,
|
|
702
|
-
|
|
703
|
-
class
|
|
749
|
+
`, $t = "*{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}button[part=button]{border:none;background:transparent}button[part=button]:not(:disabled):hover{transform:scale(1.2)}", V = new CSSStyleSheet();
|
|
750
|
+
V.replaceSync($t);
|
|
751
|
+
class T extends r {
|
|
704
752
|
static _disabledAttribute = "disabled";
|
|
705
753
|
static _titleAttribute = "title";
|
|
706
754
|
/**
|
|
@@ -708,13 +756,13 @@ class N extends s {
|
|
|
708
756
|
* @ignore
|
|
709
757
|
*/
|
|
710
758
|
constructor() {
|
|
711
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
759
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(V);
|
|
712
760
|
}
|
|
713
761
|
/**
|
|
714
762
|
* Specifies which attributes should be observed for changes.
|
|
715
763
|
*/
|
|
716
764
|
static get observedAttributes() {
|
|
717
|
-
return
|
|
765
|
+
return r.observedAttributes;
|
|
718
766
|
}
|
|
719
767
|
/**
|
|
720
768
|
* Lifecycle hook invoked when the component is inserted into the DOM.
|
|
@@ -722,18 +770,24 @@ class N extends s {
|
|
|
722
770
|
connectedCallback() {
|
|
723
771
|
this._render(), this._addEventListeners(), this._updateTitle();
|
|
724
772
|
}
|
|
773
|
+
/**
|
|
774
|
+
* Lifecycle hook invoked when the component is removed from the DOM.
|
|
775
|
+
*/
|
|
776
|
+
disconnectedCallback() {
|
|
777
|
+
this._removeEventListeners();
|
|
778
|
+
}
|
|
725
779
|
/**
|
|
726
780
|
* Lifecycle hook invoked whenever an observed attribute changes.
|
|
727
781
|
* Updates the title visibility based on disabled state.
|
|
728
782
|
*/
|
|
729
|
-
attributeChangedCallback(t, e,
|
|
730
|
-
super.attributeChangedCallback(t, e,
|
|
783
|
+
attributeChangedCallback(t, e, i) {
|
|
784
|
+
super.attributeChangedCallback(t, e, i), t === T._disabledAttribute && this._updateTitle();
|
|
731
785
|
}
|
|
732
786
|
/**
|
|
733
787
|
* Renders the component's HTML structure.
|
|
734
788
|
*/
|
|
735
789
|
_render() {
|
|
736
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
790
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Ot, this._syncAttributes());
|
|
737
791
|
}
|
|
738
792
|
/**
|
|
739
793
|
* Updates the title attribute based on disabled state.
|
|
@@ -743,19 +797,19 @@ class N extends s {
|
|
|
743
797
|
const t = this.shadowRoot?.querySelector(
|
|
744
798
|
"button"
|
|
745
799
|
);
|
|
746
|
-
t !== null && (this.disabled ? t.removeAttribute(
|
|
800
|
+
t !== null && (this.disabled ? t.removeAttribute(T._titleAttribute) : t.setAttribute(T._titleAttribute, "Next"));
|
|
747
801
|
}
|
|
748
802
|
}
|
|
749
|
-
const
|
|
803
|
+
const It = "next-button", je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
750
804
|
__proto__: null,
|
|
751
|
-
NextButtonComponent:
|
|
752
|
-
selector:
|
|
753
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
805
|
+
NextButtonComponent: T,
|
|
806
|
+
selector: It
|
|
807
|
+
}, Symbol.toStringTag, { value: "Module" })), Ht = `<dialog part="dialog">
|
|
754
808
|
<slot></slot>
|
|
755
809
|
</dialog>
|
|
756
|
-
`,
|
|
757
|
-
|
|
758
|
-
class
|
|
810
|
+
`, Tt = "*{box-sizing:border-box}dialog{background-color:var(--color-bg-primary);color:var(--color-text-primary);border:var(--border-width-1) solid var(--color-border-secondary);border-radius:var(--border-radius-xl);padding:var(--spacing-4);font-family:var(--font-family-base);line-height:var(--line-height-normal);font-size:var(--font-size-sm);box-shadow:var(--shadow-2xl);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:slideIn var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog.closing{animation:slideOut var(--transition-base) cubic-bezier(.34,1.56,.64,1) forwards}dialog::backdrop{background:var(--window-backdrop);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn var(--transition-base) ease-out forwards}dialog.closing::backdrop{animation:fadeOut var(--transition-base) ease-out forwards}@keyframes slideIn{0%{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes slideOut{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.95) translateY(-20px)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}", X = new CSSStyleSheet();
|
|
811
|
+
X.replaceSync(Tt);
|
|
812
|
+
class M extends HTMLElement {
|
|
759
813
|
/**
|
|
760
814
|
* @see HTMLDialogElement.closedBy
|
|
761
815
|
*/
|
|
@@ -764,31 +818,31 @@ class z extends HTMLElement {
|
|
|
764
818
|
* Defines how the dialog can be closed.
|
|
765
819
|
* @see DialogClosedBy
|
|
766
820
|
*/
|
|
767
|
-
_closedBy =
|
|
821
|
+
_closedBy = F.ANY;
|
|
768
822
|
/**
|
|
769
823
|
* @constructor
|
|
770
824
|
* @ignore
|
|
771
825
|
*/
|
|
772
826
|
constructor() {
|
|
773
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
827
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(X);
|
|
774
828
|
}
|
|
775
829
|
/**
|
|
776
830
|
* Specifies which attributes should be observed for changes.
|
|
777
831
|
*/
|
|
778
832
|
static get observedAttributes() {
|
|
779
|
-
return [
|
|
833
|
+
return [M.closedByAttribute];
|
|
780
834
|
}
|
|
781
835
|
get dialogElement() {
|
|
782
836
|
return this.shadowRoot?.querySelector("dialog");
|
|
783
837
|
}
|
|
784
838
|
get command() {
|
|
785
|
-
return this.getAttribute(
|
|
839
|
+
return this.getAttribute(M.closedByAttribute) ?? F.ANY;
|
|
786
840
|
}
|
|
787
841
|
get closedBy() {
|
|
788
842
|
return this._closedBy;
|
|
789
843
|
}
|
|
790
844
|
set closedBy(t) {
|
|
791
|
-
this._closedBy = t, this.setAttribute(
|
|
845
|
+
this._closedBy = t, this.setAttribute(M.closedByAttribute, t);
|
|
792
846
|
}
|
|
793
847
|
/**
|
|
794
848
|
* Lifecycle
|
|
@@ -816,9 +870,9 @@ class z extends HTMLElement {
|
|
|
816
870
|
* @param newValue - The new value (or null if removed)
|
|
817
871
|
* @returns {void}
|
|
818
872
|
*/
|
|
819
|
-
attributeChangedCallback(t, e,
|
|
820
|
-
const
|
|
821
|
-
|
|
873
|
+
attributeChangedCallback(t, e, i) {
|
|
874
|
+
const s = this.dialogElement;
|
|
875
|
+
s != null && i !== e && this._syncAttribute(t);
|
|
822
876
|
}
|
|
823
877
|
/**
|
|
824
878
|
* Adds event listeners to the component.
|
|
@@ -840,7 +894,7 @@ class z extends HTMLElement {
|
|
|
840
894
|
* @returns {void}
|
|
841
895
|
*/
|
|
842
896
|
_render() {
|
|
843
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
897
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Ht, this._syncAttributes());
|
|
844
898
|
}
|
|
845
899
|
/**
|
|
846
900
|
* Syncs a single attribute from host to dialog element.
|
|
@@ -859,7 +913,7 @@ class z extends HTMLElement {
|
|
|
859
913
|
* @returns {void}
|
|
860
914
|
*/
|
|
861
915
|
_syncAttributes() {
|
|
862
|
-
|
|
916
|
+
M.observedAttributes.forEach((t) => {
|
|
863
917
|
this._syncAttribute(t);
|
|
864
918
|
});
|
|
865
919
|
}
|
|
@@ -885,11 +939,11 @@ class z extends HTMLElement {
|
|
|
885
939
|
}, 300);
|
|
886
940
|
}
|
|
887
941
|
}
|
|
888
|
-
const
|
|
942
|
+
const Nt = "base-dialog", Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
889
943
|
__proto__: null,
|
|
890
|
-
BaseDialogComponent:
|
|
891
|
-
selector:
|
|
892
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
944
|
+
BaseDialogComponent: M,
|
|
945
|
+
selector: Nt
|
|
946
|
+
}, Symbol.toStringTag, { value: "Module" })), jt = `<dialog part="dialog">
|
|
893
947
|
<header part="header">
|
|
894
948
|
<h2></h2>
|
|
895
949
|
</header>
|
|
@@ -901,7 +955,7 @@ const Ht = "base-dialog", Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
|
|
|
901
955
|
<undo-button></undo-button>
|
|
902
956
|
</footer>
|
|
903
957
|
</dialog>
|
|
904
|
-
`,
|
|
958
|
+
`, Ft = "*{box-sizing:border-box}dialog header[part=header] h2{margin:0;padding:0}dialog div[part=body] p{margin:0;padding:0}dialog footer[part=footer]{display:flex;gap:var(--gap-md);justify-content:flex-end}", qt = `<dialog part="dialog">
|
|
905
959
|
<header part="header">
|
|
906
960
|
<slot name="header"></slot>
|
|
907
961
|
</header>
|
|
@@ -912,9 +966,9 @@ const Ht = "base-dialog", Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Obj
|
|
|
912
966
|
<slot name="footer"></slot>
|
|
913
967
|
</footer>
|
|
914
968
|
</dialog>
|
|
915
|
-
`,
|
|
916
|
-
B.replaceSync(
|
|
917
|
-
class
|
|
969
|
+
`, Pt = '*{box-sizing:border-box}dialog[open]{max-width:100%;max-height:100%;display:flex;flex-direction:column;gap:var(--spacing-4)}dialog>[part]{position:relative}dialog>[part][hidden]{display:none}dialog>[part][data-divider=true]:after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:var(--border-width-1) solid var(--color-neutral-600)}dialog>[part][data-divider=true]{padding-bottom:var(--spacing-4)}dialog div[part=body]{flex:1;min-height:0;overflow-y:auto}', B = new CSSStyleSheet();
|
|
970
|
+
B.replaceSync(Pt);
|
|
971
|
+
class D extends M {
|
|
918
972
|
_sectionNames = ["header", "body", "footer"];
|
|
919
973
|
_handleSlotChange = () => {
|
|
920
974
|
this._updateSectionState();
|
|
@@ -931,7 +985,7 @@ class P extends z {
|
|
|
931
985
|
* Uses parent's attributes since we're extending the base dialog.
|
|
932
986
|
*/
|
|
933
987
|
static get observedAttributes() {
|
|
934
|
-
return
|
|
988
|
+
return M.observedAttributes;
|
|
935
989
|
}
|
|
936
990
|
/**
|
|
937
991
|
* Renders the component's HTML structure.
|
|
@@ -940,7 +994,7 @@ class P extends z {
|
|
|
940
994
|
* @returns {void}
|
|
941
995
|
*/
|
|
942
996
|
_render() {
|
|
943
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
997
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = qt, this._syncAttributes());
|
|
944
998
|
}
|
|
945
999
|
/**
|
|
946
1000
|
* Adds slot listeners so sections can react to projected content changes.
|
|
@@ -972,23 +1026,23 @@ class P extends z {
|
|
|
972
1026
|
return;
|
|
973
1027
|
const t = [];
|
|
974
1028
|
this._sectionNames.forEach((e) => {
|
|
975
|
-
const
|
|
1029
|
+
const i = this.shadowRoot?.querySelector(
|
|
976
1030
|
`[part='${e}']`
|
|
977
|
-
),
|
|
1031
|
+
), s = this.shadowRoot?.querySelector(
|
|
978
1032
|
`slot[name='${e}']`
|
|
979
1033
|
);
|
|
980
|
-
if (
|
|
1034
|
+
if (i === null || s === null)
|
|
981
1035
|
return;
|
|
982
|
-
const a =
|
|
983
|
-
|
|
1036
|
+
const a = s.assignedNodes({ flatten: !0 }).some((v) => v.nodeType === Node.TEXT_NODE ? v.textContent?.trim().length !== 0 : v.nodeType === Node.ELEMENT_NODE);
|
|
1037
|
+
i.toggleAttribute("hidden", a === !1), i.dataset.filled = String(a), i.removeAttribute("data-divider"), a === !0 && t.push(i);
|
|
984
1038
|
}), t.slice(0, -1).forEach((e) => {
|
|
985
1039
|
e.dataset.divider = "true";
|
|
986
1040
|
});
|
|
987
1041
|
}
|
|
988
1042
|
}
|
|
989
|
-
const
|
|
990
|
-
|
|
991
|
-
class
|
|
1043
|
+
const J = new CSSStyleSheet();
|
|
1044
|
+
J.replaceSync(Ft);
|
|
1045
|
+
class p extends D {
|
|
992
1046
|
/**
|
|
993
1047
|
* The title of the confirmation dialog.
|
|
994
1048
|
*/
|
|
@@ -1017,7 +1071,7 @@ class g extends P {
|
|
|
1017
1071
|
* @constructor
|
|
1018
1072
|
*/
|
|
1019
1073
|
constructor() {
|
|
1020
|
-
super(), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1074
|
+
super(), this.shadowRoot?.adoptedStyleSheets.push(J);
|
|
1021
1075
|
}
|
|
1022
1076
|
/**
|
|
1023
1077
|
* Specifies which attributes should be observed for changes.
|
|
@@ -1025,23 +1079,23 @@ class g extends P {
|
|
|
1025
1079
|
*/
|
|
1026
1080
|
static get observedAttributes() {
|
|
1027
1081
|
return [
|
|
1028
|
-
...
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1082
|
+
...D.observedAttributes,
|
|
1083
|
+
p.textAttribute,
|
|
1084
|
+
p.headlineAttribute,
|
|
1085
|
+
p.valueAttribute
|
|
1032
1086
|
];
|
|
1033
1087
|
}
|
|
1034
1088
|
get headline() {
|
|
1035
1089
|
return this._headline;
|
|
1036
1090
|
}
|
|
1037
1091
|
set headline(t) {
|
|
1038
|
-
this._headline = t, this.setAttribute(
|
|
1092
|
+
this._headline = t, this.setAttribute(p.headlineAttribute, t);
|
|
1039
1093
|
}
|
|
1040
1094
|
get text() {
|
|
1041
1095
|
return this._text;
|
|
1042
1096
|
}
|
|
1043
1097
|
set text(t) {
|
|
1044
|
-
this._text = t, this.setAttribute(
|
|
1098
|
+
this._text = t, this.setAttribute(p.textAttribute, t);
|
|
1045
1099
|
}
|
|
1046
1100
|
get value() {
|
|
1047
1101
|
return this._value;
|
|
@@ -1055,7 +1109,7 @@ class g extends P {
|
|
|
1055
1109
|
* @returns {void}
|
|
1056
1110
|
*/
|
|
1057
1111
|
connectedCallback() {
|
|
1058
|
-
this._render(), this._addEventListeners(), this.closedBy =
|
|
1112
|
+
this._render(), this._addEventListeners(), this.closedBy = F.NONE;
|
|
1059
1113
|
}
|
|
1060
1114
|
/**
|
|
1061
1115
|
* Renders the component's HTML structure.
|
|
@@ -1064,7 +1118,7 @@ class g extends P {
|
|
|
1064
1118
|
* @returns {void}
|
|
1065
1119
|
*/
|
|
1066
1120
|
_render() {
|
|
1067
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1121
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = jt, this._syncAttributes());
|
|
1068
1122
|
}
|
|
1069
1123
|
/**
|
|
1070
1124
|
* Syncs a single attribute from host to the DOM elements.
|
|
@@ -1073,21 +1127,21 @@ class g extends P {
|
|
|
1073
1127
|
* @returns {void}
|
|
1074
1128
|
*/
|
|
1075
1129
|
_syncAttribute(t) {
|
|
1076
|
-
if (
|
|
1130
|
+
if (p.observedAttributes.includes(t))
|
|
1077
1131
|
switch (t) {
|
|
1078
|
-
case
|
|
1132
|
+
case p.headlineAttribute: {
|
|
1079
1133
|
this._headline = this.getAttribute(t) ?? d;
|
|
1080
1134
|
const e = this.shadowRoot?.querySelector("h2");
|
|
1081
1135
|
e != null && (e.textContent = this._headline);
|
|
1082
1136
|
break;
|
|
1083
1137
|
}
|
|
1084
|
-
case
|
|
1138
|
+
case p.textAttribute: {
|
|
1085
1139
|
this._text = this.getAttribute(t) ?? d;
|
|
1086
1140
|
const e = this.shadowRoot?.querySelector("p");
|
|
1087
1141
|
e != null && (e.textContent = this._text);
|
|
1088
1142
|
break;
|
|
1089
1143
|
}
|
|
1090
|
-
case
|
|
1144
|
+
case p.valueAttribute: {
|
|
1091
1145
|
this._value = this.getAttribute(t);
|
|
1092
1146
|
break;
|
|
1093
1147
|
}
|
|
@@ -1104,7 +1158,7 @@ class g extends P {
|
|
|
1104
1158
|
* @returns {void}
|
|
1105
1159
|
*/
|
|
1106
1160
|
_syncAttributes() {
|
|
1107
|
-
super._syncAttributes(),
|
|
1161
|
+
super._syncAttributes(), p.observedAttributes.forEach((t) => {
|
|
1108
1162
|
this._syncAttribute(t);
|
|
1109
1163
|
});
|
|
1110
1164
|
}
|
|
@@ -1114,9 +1168,7 @@ class g extends P {
|
|
|
1114
1168
|
* @returns {void}
|
|
1115
1169
|
*/
|
|
1116
1170
|
_addEventListeners() {
|
|
1117
|
-
super._addEventListeners(), this.shadowRoot?.querySelector(
|
|
1118
|
-
q
|
|
1119
|
-
)?.addEventListener(R.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(F)?.addEventListener(R.CLICK, this._handleUndo);
|
|
1171
|
+
super._addEventListeners(), this.shadowRoot?.querySelector(P)?.addEventListener(z.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(q)?.addEventListener(z.CLICK, this._handleUndo);
|
|
1120
1172
|
}
|
|
1121
1173
|
/**
|
|
1122
1174
|
* Removes event listeners.
|
|
@@ -1124,9 +1176,7 @@ class g extends P {
|
|
|
1124
1176
|
* @returns {void}
|
|
1125
1177
|
*/
|
|
1126
1178
|
_removeEventListeners() {
|
|
1127
|
-
super._removeEventListeners(), this.shadowRoot?.querySelector(
|
|
1128
|
-
q
|
|
1129
|
-
)?.removeEventListener(R.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(F)?.removeEventListener(R.CLICK, this._handleUndo);
|
|
1179
|
+
super._removeEventListeners(), this.shadowRoot?.querySelector(P)?.removeEventListener(z.CLICK, this._handleConfirm), this.shadowRoot?.querySelector(q)?.removeEventListener(z.CLICK, this._handleUndo);
|
|
1130
1180
|
}
|
|
1131
1181
|
/**
|
|
1132
1182
|
* Handles the confirm button click event.
|
|
@@ -1136,7 +1186,7 @@ class g extends P {
|
|
|
1136
1186
|
*/
|
|
1137
1187
|
_handleConfirm = () => {
|
|
1138
1188
|
const t = new CustomEvent(
|
|
1139
|
-
|
|
1189
|
+
j.CONFIRMATION_DIALOG_CONFIRM,
|
|
1140
1190
|
{
|
|
1141
1191
|
bubbles: !0,
|
|
1142
1192
|
composed: !0,
|
|
@@ -1149,7 +1199,7 @@ class g extends P {
|
|
|
1149
1199
|
};
|
|
1150
1200
|
_handleUndo = () => {
|
|
1151
1201
|
const t = new CustomEvent(
|
|
1152
|
-
|
|
1202
|
+
j.CONFIRMATION_DIALOG_UNDO,
|
|
1153
1203
|
{
|
|
1154
1204
|
bubbles: !0,
|
|
1155
1205
|
composed: !0,
|
|
@@ -1161,19 +1211,19 @@ class g extends P {
|
|
|
1161
1211
|
this.dispatchEvent(t), this._value = void 0;
|
|
1162
1212
|
};
|
|
1163
1213
|
}
|
|
1164
|
-
const
|
|
1165
|
-
CONFIRMATION_DIALOG_CONFIRM:
|
|
1166
|
-
CONFIRMATION_DIALOG_UNDO:
|
|
1167
|
-
},
|
|
1168
|
-
__proto__: null,
|
|
1169
|
-
COMPONENT_CUSTOM_MESSAGES: Pt,
|
|
1170
|
-
ConfirmationDialogComponent: g,
|
|
1171
|
-
selector: qt
|
|
1172
|
-
}, Symbol.toStringTag, { value: "Module" })), Dt = "header-body-footer-dialog", Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1214
|
+
const Dt = "confirmation-dialog", Ut = {
|
|
1215
|
+
CONFIRMATION_DIALOG_CONFIRM: j.CONFIRMATION_DIALOG_CONFIRM,
|
|
1216
|
+
CONFIRMATION_DIALOG_UNDO: j.CONFIRMATION_DIALOG_UNDO
|
|
1217
|
+
}, qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1173
1218
|
__proto__: null,
|
|
1174
|
-
|
|
1219
|
+
COMPONENT_CUSTOM_MESSAGES: Ut,
|
|
1220
|
+
ConfirmationDialogComponent: p,
|
|
1175
1221
|
selector: Dt
|
|
1176
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1222
|
+
}, Symbol.toStringTag, { value: "Module" })), Kt = "header-body-footer-dialog", Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1223
|
+
__proto__: null,
|
|
1224
|
+
HeaderBodyFooterDialogComponent: D,
|
|
1225
|
+
selector: Kt
|
|
1226
|
+
}, Symbol.toStringTag, { value: "Module" })), Gt = `<div class="bar-menu-container">
|
|
1177
1227
|
<previous-button class="nav-prev" part="nav-prev-button"></previous-button>
|
|
1178
1228
|
|
|
1179
1229
|
<div class="buttons-wrapper" part="buttons-wrapper">
|
|
@@ -1182,8 +1232,8 @@ const qt = "confirmation-dialog", Pt = {
|
|
|
1182
1232
|
|
|
1183
1233
|
<next-button class="nav-next" part="nav-next-button"></next-button>
|
|
1184
1234
|
</div>
|
|
1185
|
-
`,
|
|
1186
|
-
|
|
1235
|
+
`, Ct = "*{box-sizing:border-box}:host{display:block;width:100%}.bar-menu-container{display:flex;align-items:center;justify-content:space-between;height:100%;gap:var(--gap-sm);padding:var(--spacing-1);background:var(--color-bg-primary);border-radius:var(--border-radius-full);border:var(--border-width-2) solid var(--color-border-secondary);box-shadow:var(--shadow-sm);margin:0 auto}.bar-menu-container .nav-prev,.bar-menu-container .nav-next{flex-shrink:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease-in-out,visibility .2s ease-in-out}.bar-menu-container .nav-prev.visible,.bar-menu-container .nav-next.visible{opacity:1;visibility:visible;pointer-events:auto}.bar-menu-container .nav-prev::part(button),.bar-menu-container .nav-next::part(button){background-color:transparent;box-shadow:none}.bar-menu-container .buttons-wrapper{display:grid;grid-template-columns:repeat(var(--bar-menu-visible-count, 3),1fr);grid-auto-rows:max-content;align-items:center;justify-items:center;gap:var(--gap-sm);overflow:hidden;position:relative;width:auto}::slotted(*){display:none;flex-shrink:0;will-change:opacity,transform;contain:layout style paint;opacity:0;transform:scale(.8)}::slotted(.animating){transition:opacity .4s cubic-bezier(.34,1.56,.64,1),transform .4s cubic-bezier(.34,1.56,.64,1)}::slotted(.visible-button){display:inline-flex!important;pointer-events:auto;opacity:1;transform:scale(1)}", Q = new CSSStyleSheet();
|
|
1236
|
+
Q.replaceSync(Ct);
|
|
1187
1237
|
class y extends HTMLElement {
|
|
1188
1238
|
static _visibleCountAttribute = "visible-count";
|
|
1189
1239
|
static _cyclicalNavigationAttribute = "cyclical-navigation";
|
|
@@ -1202,7 +1252,7 @@ class y extends HTMLElement {
|
|
|
1202
1252
|
* @constructor
|
|
1203
1253
|
*/
|
|
1204
1254
|
constructor() {
|
|
1205
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1255
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(Q);
|
|
1206
1256
|
}
|
|
1207
1257
|
/**
|
|
1208
1258
|
* Specifies which attributes should be observed for changes.
|
|
@@ -1252,7 +1302,7 @@ class y extends HTMLElement {
|
|
|
1252
1302
|
/**
|
|
1253
1303
|
* Lifecycle hook: observed attribute changed
|
|
1254
1304
|
*/
|
|
1255
|
-
attributeChangedCallback(t, e,
|
|
1305
|
+
attributeChangedCallback(t, e, i) {
|
|
1256
1306
|
t === y._visibleCountAttribute ? (this._visibleCount = this.visibleButtons, this._buttonsWrapper !== null && this._buttonsWrapper.style.setProperty(
|
|
1257
1307
|
"--bar-menu-visible-count",
|
|
1258
1308
|
String(this.visibleButtons)
|
|
@@ -1262,7 +1312,7 @@ class y extends HTMLElement {
|
|
|
1262
1312
|
* Render the component's Shadow DOM structure
|
|
1263
1313
|
*/
|
|
1264
1314
|
_render() {
|
|
1265
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1315
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Gt);
|
|
1266
1316
|
}
|
|
1267
1317
|
/**
|
|
1268
1318
|
* Cache Shadow DOM elements for performance
|
|
@@ -1271,9 +1321,9 @@ class y extends HTMLElement {
|
|
|
1271
1321
|
this._slotElement = this.shadowRoot?.querySelector("slot") ?? null, this._navPrevButton = this.shadowRoot?.querySelector(".nav-prev") ?? null, this._navNextButton = this.shadowRoot?.querySelector(".nav-next") ?? null, this._buttonsWrapper = this.shadowRoot?.querySelector(".buttons-wrapper") ?? null, this._buttonsWrapper !== null && this._buttonsWrapper.style.setProperty(
|
|
1272
1322
|
"--bar-menu-visible-count",
|
|
1273
1323
|
String(this.visibleButtons)
|
|
1274
|
-
), this._navPrevButton !== null && (this._navPrevButton.setAttribute("aria-label", "Previous"), this._navPrevButton.addEventListener(
|
|
1324
|
+
), this._navPrevButton !== null && (this._navPrevButton.setAttribute("aria-label", "Previous"), this._navPrevButton.addEventListener(z.CLICK, () => {
|
|
1275
1325
|
this._scrollPrevious();
|
|
1276
|
-
})), this._navNextButton !== null && (this._navNextButton.setAttribute("aria-label", "Next"), this._navNextButton.addEventListener(
|
|
1326
|
+
})), this._navNextButton !== null && (this._navNextButton.setAttribute("aria-label", "Next"), this._navNextButton.addEventListener(z.CLICK, () => {
|
|
1277
1327
|
this._scrollNext();
|
|
1278
1328
|
}));
|
|
1279
1329
|
}
|
|
@@ -1300,13 +1350,13 @@ class y extends HTMLElement {
|
|
|
1300
1350
|
_setupKeyboardListener() {
|
|
1301
1351
|
this._keyDownListener = (t) => {
|
|
1302
1352
|
t.key === "ArrowLeft" ? (t.preventDefault(), this._scrollPrevious()) : t.key === "ArrowRight" && (t.preventDefault(), this._scrollNext());
|
|
1303
|
-
}, this.addEventListener(
|
|
1353
|
+
}, this.addEventListener(U.KEY_DOWN, this._keyDownListener);
|
|
1304
1354
|
}
|
|
1305
1355
|
/**
|
|
1306
1356
|
* Remove keyboard listener
|
|
1307
1357
|
*/
|
|
1308
1358
|
_removeKeyboardListener() {
|
|
1309
|
-
this._keyDownListener !== null && this.removeEventListener(
|
|
1359
|
+
this._keyDownListener !== null && this.removeEventListener(U.KEY_DOWN, this._keyDownListener);
|
|
1310
1360
|
}
|
|
1311
1361
|
/**
|
|
1312
1362
|
* Get all slotted button elements
|
|
@@ -1318,34 +1368,34 @@ class y extends HTMLElement {
|
|
|
1318
1368
|
* Update button visibility by showing/hiding rows with fade
|
|
1319
1369
|
*/
|
|
1320
1370
|
_updateButtonVisibility(t) {
|
|
1321
|
-
const e = this._getSlottedButtons(),
|
|
1322
|
-
e.forEach((c,
|
|
1323
|
-
const I =
|
|
1371
|
+
const e = this._getSlottedButtons(), i = e.length, s = this.visibleButtons, a = this._currentIndex, v = Math.min(a + s, i);
|
|
1372
|
+
e.forEach((c, g) => {
|
|
1373
|
+
const I = g >= a && g < v, $ = c;
|
|
1324
1374
|
I || (c.classList.remove("visible-button"), c.classList.remove("animating"), $.style.display = "none");
|
|
1325
|
-
}), t !== void 0 ? (e[0]?.offsetHeight, e.forEach((c,
|
|
1326
|
-
if (
|
|
1375
|
+
}), t !== void 0 ? (e[0]?.offsetHeight, e.forEach((c, g) => {
|
|
1376
|
+
if (g >= a && g < v) {
|
|
1327
1377
|
const $ = c;
|
|
1328
1378
|
$.style.display = "inline-flex", c.classList.add("animating");
|
|
1329
|
-
const
|
|
1330
|
-
$.style.transitionDelay = `${
|
|
1379
|
+
const ut = g % this.visibleButtons * 50;
|
|
1380
|
+
$.style.transitionDelay = `${ut}ms`;
|
|
1331
1381
|
}
|
|
1332
|
-
}), e[0]?.offsetHeight, e.forEach((c,
|
|
1333
|
-
|
|
1382
|
+
}), e[0]?.offsetHeight, e.forEach((c, g) => {
|
|
1383
|
+
g >= a && g < v && c.classList.add("visible-button");
|
|
1334
1384
|
}), setTimeout(() => {
|
|
1335
1385
|
e.forEach((c) => {
|
|
1336
1386
|
c.classList.remove("animating"), c.style.transitionDelay = d;
|
|
1337
1387
|
});
|
|
1338
|
-
}, 400)) : e.forEach((c,
|
|
1339
|
-
const I =
|
|
1388
|
+
}, 400)) : e.forEach((c, g) => {
|
|
1389
|
+
const I = g >= a && g < v, $ = c;
|
|
1340
1390
|
I && ($.style.display = "inline-flex", c.classList.add("visible-button"));
|
|
1341
|
-
}), this._updateNavigationButtons(
|
|
1391
|
+
}), this._updateNavigationButtons(i, s);
|
|
1342
1392
|
}
|
|
1343
1393
|
/**
|
|
1344
1394
|
* Update navigation buttons visibility and disabled state
|
|
1345
1395
|
*/
|
|
1346
1396
|
_updateNavigationButtons(t, e) {
|
|
1347
|
-
const
|
|
1348
|
-
this._navPrevButton !== null && (
|
|
1397
|
+
const i = t > e, s = this._currentIndex + e < t, a = this._currentIndex === 0, v = !s;
|
|
1398
|
+
this._navPrevButton !== null && (i ? (this._navPrevButton.classList.add("visible"), this._navPrevButton.disabled = !this._cyclicalNavigation && a) : this._navPrevButton.classList.remove("visible")), this._navNextButton !== null && (i ? (this._navNextButton.classList.add("visible"), this._navNextButton.disabled = !this._cyclicalNavigation && v) : this._navNextButton.classList.remove("visible"));
|
|
1349
1399
|
}
|
|
1350
1400
|
/**
|
|
1351
1401
|
* Navigate to previous page (scrolls by visibleCount buttons)
|
|
@@ -1360,17 +1410,17 @@ class y extends HTMLElement {
|
|
|
1360
1410
|
* In cyclical mode, wraps to the beginning when at the end.
|
|
1361
1411
|
*/
|
|
1362
1412
|
_scrollNext() {
|
|
1363
|
-
const t = this._getSlottedButtons().length, e = this.visibleButtons,
|
|
1364
|
-
|
|
1413
|
+
const t = this._getSlottedButtons().length, e = this.visibleButtons, i = this._currentIndex + e;
|
|
1414
|
+
i < t ? (this._currentIndex = i, this._updateButtonVisibility("next")) : this._cyclicalNavigation && t > e && (this._currentIndex = 0, this._updateButtonVisibility("next"));
|
|
1365
1415
|
}
|
|
1366
1416
|
/**
|
|
1367
1417
|
* Public API: scroll to specific button by index
|
|
1368
1418
|
*/
|
|
1369
1419
|
scrollToButton(t) {
|
|
1370
|
-
const e = this._getSlottedButtons().length,
|
|
1420
|
+
const e = this._getSlottedButtons().length, i = this.visibleButtons;
|
|
1371
1421
|
t >= 0 && t < e && (this._currentIndex = Math.max(
|
|
1372
1422
|
0,
|
|
1373
|
-
Math.min(t, e -
|
|
1423
|
+
Math.min(t, e - i)
|
|
1374
1424
|
), this._updateButtonVisibility());
|
|
1375
1425
|
}
|
|
1376
1426
|
/**
|
|
@@ -1394,21 +1444,21 @@ class y extends HTMLElement {
|
|
|
1394
1444
|
return this._currentIndex;
|
|
1395
1445
|
}
|
|
1396
1446
|
}
|
|
1397
|
-
const
|
|
1447
|
+
const Wt = "bar-menu", De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1398
1448
|
__proto__: null,
|
|
1399
1449
|
BarMenuComponent: y,
|
|
1400
|
-
selector:
|
|
1401
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1450
|
+
selector: Wt
|
|
1451
|
+
}, Symbol.toStringTag, { value: "Module" })), Yt = "ds-spinner", Vt = `<div part="spinner" class="spinner" role="status" aria-label="Loading">
|
|
1402
1452
|
<div class="spinner-ring"></div>
|
|
1403
1453
|
</div>
|
|
1404
|
-
`,
|
|
1405
|
-
|
|
1454
|
+
`, Xt = "*{box-sizing:border-box}:host{display:inline-flex;align-items:center;justify-content:center}.spinner{display:inline-flex;align-items:center;justify-content:center}.spinner-ring{width:var(--spinner-size, 2rem);height:var(--spinner-size, 2rem);border:3px solid var(--color-border-primary);border-top-color:var(--color-primary);border-radius:var(--border-radius-full);animation:spin var(--transition-slow) linear infinite}:host([size=sm]) .spinner-ring{width:1rem;height:1rem;border-width:2px}:host([size=md]) .spinner-ring{width:2rem;height:2rem;border-width:3px}:host([size=lg]) .spinner-ring{width:3rem;height:3rem;border-width:4px}:host([variant=primary]) .spinner-ring{border-top-color:var(--color-primary)}:host([variant=success]) .spinner-ring{border-top-color:var(--color-success)}:host([variant=warning]) .spinner-ring{border-top-color:var(--color-warning)}:host([variant=error]) .spinner-ring{border-top-color:var(--color-error)}@keyframes spin{to{transform:rotate(360deg)}}", Z = new CSSStyleSheet();
|
|
1455
|
+
Z.replaceSync(Xt);
|
|
1406
1456
|
class f extends HTMLElement {
|
|
1407
1457
|
static _sizeAttribute = "size";
|
|
1408
1458
|
static _variantAttribute = "variant";
|
|
1409
1459
|
static _labelAttribute = "label";
|
|
1410
1460
|
constructor() {
|
|
1411
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1461
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(Z);
|
|
1412
1462
|
}
|
|
1413
1463
|
static get observedAttributes() {
|
|
1414
1464
|
return [
|
|
@@ -1440,20 +1490,20 @@ class f extends HTMLElement {
|
|
|
1440
1490
|
connectedCallback() {
|
|
1441
1491
|
this._render();
|
|
1442
1492
|
}
|
|
1443
|
-
attributeChangedCallback(t, e,
|
|
1444
|
-
|
|
1493
|
+
attributeChangedCallback(t, e, i) {
|
|
1494
|
+
i !== e && t === f._labelAttribute && this.shadowRoot?.querySelector(".spinner")?.setAttribute("aria-label", i ?? "Loading");
|
|
1445
1495
|
}
|
|
1446
1496
|
_render() {
|
|
1447
1497
|
if (this.shadowRoot === null)
|
|
1448
1498
|
return;
|
|
1449
|
-
this.shadowRoot.innerHTML =
|
|
1499
|
+
this.shadowRoot.innerHTML = Vt, this.shadowRoot.querySelector(".spinner")?.setAttribute("aria-label", this.label);
|
|
1450
1500
|
}
|
|
1451
1501
|
}
|
|
1452
|
-
const
|
|
1502
|
+
const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1453
1503
|
__proto__: null,
|
|
1454
1504
|
SpinnerComponent: f,
|
|
1455
|
-
selector:
|
|
1456
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1505
|
+
selector: Yt
|
|
1506
|
+
}, Symbol.toStringTag, { value: "Module" })), Bt = "ds-progress-bar", Jt = `<div
|
|
1457
1507
|
part="container"
|
|
1458
1508
|
class="progress-container"
|
|
1459
1509
|
role="progressbar"
|
|
@@ -1465,8 +1515,8 @@ const je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1465
1515
|
</div>
|
|
1466
1516
|
<span class="progress-label"></span>
|
|
1467
1517
|
</div>
|
|
1468
|
-
`,
|
|
1469
|
-
|
|
1518
|
+
`, Qt = "*{box-sizing:border-box}:host{display:block;width:100%}.progress-container{display:flex;flex-direction:column;gap:var(--gap-xs)}.progress-track{width:100%;height:.5rem;background-color:var(--color-bg-secondary);border-radius:var(--border-radius-full);overflow:hidden;border:1px solid var(--color-border-primary)}:host([size=sm]) .progress-track{height:.25rem}:host([size=md]) .progress-track{height:.5rem}:host([size=lg]) .progress-track{height:1rem}.progress-fill{height:100%;width:0%;background:var(--color-primary);border-radius:var(--border-radius-full);transition:width var(--transition-base) ease}:host([variant=success]) .progress-fill{background:var(--color-success)}:host([variant=warning]) .progress-fill{background:var(--color-warning)}:host([variant=error]) .progress-fill{background:var(--color-error)}:host([variant=info]) .progress-fill{background:var(--color-info)}:host([indeterminate]) .progress-fill{width:40%!important;animation:indeterminate var(--transition-slow) ease-in-out infinite}.progress-label{font-family:var(--font-family-base);font-size:var(--font-size-xs);color:var(--color-text-secondary);align-self:flex-end}:host(:not([show-label])) .progress-label{display:none}@keyframes indeterminate{0%{transform:translate(-100%)}to{transform:translate(350%)}}", tt = new CSSStyleSheet();
|
|
1519
|
+
tt.replaceSync(Qt);
|
|
1470
1520
|
class h extends HTMLElement {
|
|
1471
1521
|
static _valueAttribute = "value";
|
|
1472
1522
|
static _variantAttribute = "variant";
|
|
@@ -1475,7 +1525,7 @@ class h extends HTMLElement {
|
|
|
1475
1525
|
static _showLabelAttribute = "show-label";
|
|
1476
1526
|
static _labelAttribute = "label";
|
|
1477
1527
|
constructor() {
|
|
1478
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1528
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(tt);
|
|
1479
1529
|
}
|
|
1480
1530
|
static get observedAttributes() {
|
|
1481
1531
|
return [
|
|
@@ -1517,35 +1567,35 @@ class h extends HTMLElement {
|
|
|
1517
1567
|
connectedCallback() {
|
|
1518
1568
|
this._render();
|
|
1519
1569
|
}
|
|
1520
|
-
attributeChangedCallback(t, e,
|
|
1521
|
-
|
|
1570
|
+
attributeChangedCallback(t, e, i) {
|
|
1571
|
+
i !== e && this._update();
|
|
1522
1572
|
}
|
|
1523
1573
|
_render() {
|
|
1524
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1574
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = Jt, this._update());
|
|
1525
1575
|
}
|
|
1526
1576
|
_update() {
|
|
1527
1577
|
const t = this.shadowRoot?.querySelector(".progress-fill"), e = this.shadowRoot?.querySelector(
|
|
1528
1578
|
".progress-container"
|
|
1529
|
-
),
|
|
1579
|
+
), i = this.shadowRoot?.querySelector(".progress-label");
|
|
1530
1580
|
t != null && (t.style.width = this.indeterminate ? "40%" : `${this.value}%`), e != null && (e.setAttribute("aria-valuenow", String(this.value)), this.getAttribute(h._labelAttribute) !== null && this.getAttribute(h._labelAttribute) !== "" && e.setAttribute(
|
|
1531
1581
|
"aria-label",
|
|
1532
1582
|
this.getAttribute(h._labelAttribute) ?? ""
|
|
1533
|
-
)),
|
|
1583
|
+
)), i != null && (i.textContent = this.indeterminate ? "" : `${this.value}%`);
|
|
1534
1584
|
}
|
|
1535
1585
|
}
|
|
1536
|
-
const
|
|
1586
|
+
const Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1537
1587
|
__proto__: null,
|
|
1538
1588
|
ProgressBarComponent: h,
|
|
1539
|
-
selector:
|
|
1540
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1541
|
-
`,
|
|
1542
|
-
|
|
1589
|
+
selector: Bt
|
|
1590
|
+
}, Symbol.toStringTag, { value: "Module" })), Zt = "ds-skeleton", te = `<div part="skeleton" class="skeleton" aria-hidden="true"></div>
|
|
1591
|
+
`, ee = "*{box-sizing:border-box}:host{display:block;width:100%}.skeleton{background:linear-gradient(90deg,var(--color-bg-secondary) 25%,var(--color-bg-tertiary) 50%,var(--color-bg-secondary) 75%);background-size:200% 100%;border-radius:var(--border-radius-md);animation:shimmer 1.5s infinite;min-height:1rem;width:100%}:host([shape=circle]) .skeleton{border-radius:var(--border-radius-full);width:var(--skeleton-size, 3rem);height:var(--skeleton-size, 3rem)}:host([shape=text]) .skeleton{border-radius:var(--border-radius-sm);height:1em}:host([shape=rect]) .skeleton{border-radius:var(--border-radius-md)}:host([width=full]){width:100%}:host([width=half]){width:50%}:host([width=quarter]){width:25%}:host([width=three-quarters]){width:75%}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}", et = new CSSStyleSheet();
|
|
1592
|
+
et.replaceSync(ee);
|
|
1543
1593
|
class A extends HTMLElement {
|
|
1544
1594
|
static _shapeAttribute = "shape";
|
|
1545
1595
|
static _heightAttribute = "height";
|
|
1546
1596
|
static _widthAttribute = "width";
|
|
1547
1597
|
constructor() {
|
|
1548
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1598
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(et);
|
|
1549
1599
|
}
|
|
1550
1600
|
static get observedAttributes() {
|
|
1551
1601
|
return [
|
|
@@ -1569,78 +1619,172 @@ class A extends HTMLElement {
|
|
|
1569
1619
|
connectedCallback() {
|
|
1570
1620
|
this._render();
|
|
1571
1621
|
}
|
|
1572
|
-
attributeChangedCallback(t, e,
|
|
1573
|
-
|
|
1622
|
+
attributeChangedCallback(t, e, i) {
|
|
1623
|
+
i !== e && t === A._heightAttribute && this._applyHeight(i);
|
|
1574
1624
|
}
|
|
1575
1625
|
_render() {
|
|
1576
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1626
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = te, this._applyHeight(this.height));
|
|
1577
1627
|
}
|
|
1578
1628
|
_applyHeight(t) {
|
|
1579
1629
|
const e = this.shadowRoot?.querySelector(".skeleton");
|
|
1580
1630
|
e != null && t !== null && t !== "" && (e.style.height = t);
|
|
1581
1631
|
}
|
|
1582
1632
|
}
|
|
1583
|
-
const
|
|
1633
|
+
const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1584
1634
|
__proto__: null,
|
|
1585
1635
|
SkeletonComponent: A,
|
|
1586
|
-
selector:
|
|
1587
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1636
|
+
selector: Zt
|
|
1637
|
+
}, Symbol.toStringTag, { value: "Module" })), ie = `<div
|
|
1638
|
+
class="cv-viewer__loader"
|
|
1639
|
+
aria-live="polite"
|
|
1640
|
+
aria-label="Loading"
|
|
1641
|
+
role="status"
|
|
1642
|
+
>
|
|
1643
|
+
<div class="cv-viewer__loader-pulse">
|
|
1644
|
+
<div
|
|
1645
|
+
class="cv-viewer__loader-bar"
|
|
1646
|
+
style="width: 60%; animation-delay: 0s"
|
|
1647
|
+
></div>
|
|
1648
|
+
<div
|
|
1649
|
+
class="cv-viewer__loader-bar"
|
|
1650
|
+
style="width: 90%; animation-delay: 0.15s"
|
|
1651
|
+
></div>
|
|
1652
|
+
<div
|
|
1653
|
+
class="cv-viewer__loader-bar"
|
|
1654
|
+
style="width: 75%; animation-delay: 0.3s"
|
|
1655
|
+
></div>
|
|
1656
|
+
<div
|
|
1657
|
+
class="cv-viewer__loader-bar"
|
|
1658
|
+
style="width: 85%; animation-delay: 0.45s"
|
|
1659
|
+
></div>
|
|
1660
|
+
<div
|
|
1661
|
+
class="cv-viewer__loader-bar"
|
|
1662
|
+
style="width: 50%; animation-delay: 0.6s"
|
|
1663
|
+
></div>
|
|
1664
|
+
</div>
|
|
1665
|
+
<p class="cv-viewer__loader-label">Loading…</p>
|
|
1666
|
+
</div>
|
|
1667
|
+
`, re = ":host{display:block}:host(:not([loading])),:host([loading=false]){display:none}.cv-viewer__loader{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:32px;padding:48px;background:#1a1a1a;transition:opacity .4s ease;z-index:2}.cv-viewer__loader--hidden{opacity:0;pointer-events:none}.cv-viewer__loader-pulse{display:flex;flex-direction:column;gap:14px;width:min(520px,80%)}.cv-viewer__loader-bar{height:12px;border-radius:2px;background:linear-gradient(90deg,#ffffff0a 25%,#ffffff1a,#ffffff0a 75%);background-size:200% 100%;animation:shimmer 1.8s infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}", it = new CSSStyleSheet();
|
|
1668
|
+
it.replaceSync(re);
|
|
1669
|
+
class _ extends HTMLElement {
|
|
1670
|
+
static _labelAttribute = "label";
|
|
1671
|
+
static _loadingAttribute = "loading";
|
|
1672
|
+
/**
|
|
1673
|
+
* @constructor
|
|
1674
|
+
* @ignore
|
|
1675
|
+
*/
|
|
1676
|
+
constructor() {
|
|
1677
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(it);
|
|
1678
|
+
}
|
|
1679
|
+
/**
|
|
1680
|
+
* Specifies which attributes should be observed for changes.
|
|
1681
|
+
*/
|
|
1682
|
+
static get observedAttributes() {
|
|
1683
|
+
return [
|
|
1684
|
+
_._labelAttribute,
|
|
1685
|
+
_._loadingAttribute
|
|
1686
|
+
];
|
|
1687
|
+
}
|
|
1688
|
+
get loading() {
|
|
1689
|
+
const t = this.getAttribute(_._loadingAttribute);
|
|
1690
|
+
return t !== null && t !== "false";
|
|
1691
|
+
}
|
|
1692
|
+
set loading(t) {
|
|
1693
|
+
t ? this.setAttribute(_._loadingAttribute, "true") : this.setAttribute(_._loadingAttribute, "false");
|
|
1694
|
+
}
|
|
1695
|
+
get label() {
|
|
1696
|
+
return this.getAttribute(_._labelAttribute) ?? "Loading…";
|
|
1697
|
+
}
|
|
1698
|
+
set label(t) {
|
|
1699
|
+
this.setAttribute(_._labelAttribute, t);
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Lifecycle hook: component inserted into DOM.
|
|
1703
|
+
*/
|
|
1704
|
+
connectedCallback() {
|
|
1705
|
+
this._render();
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Lifecycle hook: observed attribute changed.
|
|
1709
|
+
*/
|
|
1710
|
+
attributeChangedCallback(t, e, i) {
|
|
1711
|
+
i !== e && t === _._labelAttribute && this._updateLabel();
|
|
1712
|
+
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Renders the component's Shadow DOM structure.
|
|
1715
|
+
*/
|
|
1716
|
+
_render() {
|
|
1717
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = ie, this._updateLabel());
|
|
1718
|
+
}
|
|
1719
|
+
/**
|
|
1720
|
+
* Updates the label text in the shadow DOM.
|
|
1721
|
+
*/
|
|
1722
|
+
_updateLabel() {
|
|
1723
|
+
const t = this.shadowRoot?.querySelector(".cv-viewer__loader-label");
|
|
1724
|
+
t != null && (t.textContent = this.label);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
const se = "loader-bars", Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1728
|
+
__proto__: null,
|
|
1729
|
+
LoaderBarsComponent: _,
|
|
1730
|
+
selector: se
|
|
1731
|
+
}, Symbol.toStringTag, { value: "Module" })), oe = "ds-card", ae = `<div part="card" class="card">
|
|
1588
1732
|
<slot name="header" class="card-header-slot"></slot>
|
|
1589
1733
|
<div class="card-body">
|
|
1590
1734
|
<slot></slot>
|
|
1591
1735
|
</div>
|
|
1592
1736
|
<slot name="footer" class="card-footer-slot"></slot>
|
|
1593
1737
|
</div>
|
|
1594
|
-
`,
|
|
1595
|
-
|
|
1596
|
-
class
|
|
1738
|
+
`, ne = '*{box-sizing:border-box}:host{display:block}.card{background:var(--color-bg-secondary);border:1px solid var(--color-border-primary);border-radius:var(--border-radius-xl);box-shadow:var(--shadow-md);overflow:hidden;transition:box-shadow var(--transition-fast),transform var(--transition-fast),border-color var(--transition-fast);font-family:var(--font-family-base);color:var(--color-text-primary);position:relative}.card:before{content:"";display:block;height:2px;background:linear-gradient(90deg,var(--color-primary) 0%,var(--color-primary-light) 100%);opacity:0;transition:opacity var(--transition-fast)}:host([hoverable]) .card:hover{box-shadow:var(--shadow-xl);transform:translateY(-3px);border-color:var(--color-border-secondary)}:host([hoverable]) .card:hover:before{opacity:1}:host([variant=outlined]) .card{background:transparent;box-shadow:none;border:var(--border-width-2) solid var(--color-border-secondary)}:host([variant=elevated]) .card{background:var(--color-bg-primary);box-shadow:var(--shadow-xl);border:none}:host([variant=filled]) .card{background:var(--color-bg-secondary);border:none;box-shadow:none}.card-body{padding:var(--spacing-4) var(--spacing-5)}::slotted([slot=header]){display:block;padding:var(--spacing-5) var(--spacing-5) var(--spacing-2);font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);color:var(--color-text-primary);letter-spacing:var(--letter-spacing-tight)}::slotted([slot=footer]){display:block;padding:var(--spacing-3) var(--spacing-5) var(--spacing-4);font-size:var(--font-size-sm);color:var(--color-text-secondary);border-top:1px solid var(--color-border-primary)}', rt = new CSSStyleSheet();
|
|
1739
|
+
rt.replaceSync(ne);
|
|
1740
|
+
class L extends HTMLElement {
|
|
1597
1741
|
static _variantAttribute = "variant";
|
|
1598
1742
|
static _hoverableAttribute = "hoverable";
|
|
1599
1743
|
constructor() {
|
|
1600
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1744
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(rt);
|
|
1601
1745
|
}
|
|
1602
1746
|
static get observedAttributes() {
|
|
1603
1747
|
return [
|
|
1604
|
-
|
|
1605
|
-
|
|
1748
|
+
L._variantAttribute,
|
|
1749
|
+
L._hoverableAttribute
|
|
1606
1750
|
];
|
|
1607
1751
|
}
|
|
1608
1752
|
get variant() {
|
|
1609
|
-
return this.getAttribute(
|
|
1753
|
+
return this.getAttribute(L._variantAttribute) ?? "default";
|
|
1610
1754
|
}
|
|
1611
1755
|
set variant(t) {
|
|
1612
|
-
this.setAttribute(
|
|
1756
|
+
this.setAttribute(L._variantAttribute, t);
|
|
1613
1757
|
}
|
|
1614
1758
|
get hoverable() {
|
|
1615
|
-
return this.hasAttribute(
|
|
1759
|
+
return this.hasAttribute(L._hoverableAttribute);
|
|
1616
1760
|
}
|
|
1617
1761
|
set hoverable(t) {
|
|
1618
|
-
t ? this.setAttribute(
|
|
1762
|
+
t ? this.setAttribute(L._hoverableAttribute, "") : this.removeAttribute(L._hoverableAttribute);
|
|
1619
1763
|
}
|
|
1620
1764
|
connectedCallback() {
|
|
1621
1765
|
this._render();
|
|
1622
1766
|
}
|
|
1623
|
-
attributeChangedCallback(t, e,
|
|
1767
|
+
attributeChangedCallback(t, e, i) {
|
|
1624
1768
|
}
|
|
1625
1769
|
_render() {
|
|
1626
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1770
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = ae);
|
|
1627
1771
|
}
|
|
1628
1772
|
}
|
|
1629
|
-
const
|
|
1773
|
+
const We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1630
1774
|
__proto__: null,
|
|
1631
|
-
BaseCardComponent:
|
|
1632
|
-
selector:
|
|
1633
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1775
|
+
BaseCardComponent: L,
|
|
1776
|
+
selector: oe
|
|
1777
|
+
}, Symbol.toStringTag, { value: "Module" })), le = "ds-badge", de = `<span part="badge" class="badge">
|
|
1634
1778
|
<slot></slot>
|
|
1635
1779
|
</span>
|
|
1636
|
-
`,
|
|
1637
|
-
|
|
1780
|
+
`, ce = "*{box-sizing:border-box}:host{display:inline-flex}.badge{display:inline-flex;align-items:center;justify-content:center;gap:var(--gap-xs);padding-block:.2em;padding-inline:.6em;border-radius:var(--border-radius-full);font-family:var(--font-family-base);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);line-height:1.4;white-space:nowrap;background-color:var(--color-primary);color:#fff;border:1px solid transparent}:host([variant=secondary]) .badge{background-color:var(--color-bg-secondary);color:var(--color-text-primary);border-color:var(--color-border-primary)}:host([variant=success]) .badge{background-color:var(--color-success);color:#fff}:host([variant=warning]) .badge{background-color:var(--color-warning);color:#1a1a1a}:host([variant=error]) .badge{background-color:var(--color-error);color:#fff}:host([variant=info]) .badge{background-color:var(--color-info);color:#fff}:host([variant=outline]) .badge{background-color:transparent;color:var(--color-primary);border-color:var(--color-primary)}:host([size=sm]) .badge{font-size:.65rem;padding-block:.1em;padding-inline:.4em}:host([size=lg]) .badge{font-size:var(--font-size-sm);padding-block:.3em;padding-inline:.8em}:host([dot]) .badge{width:.5rem;height:.5rem;padding:0;font-size:0}", st = new CSSStyleSheet();
|
|
1781
|
+
st.replaceSync(ce);
|
|
1638
1782
|
class m extends HTMLElement {
|
|
1639
1783
|
static _variantAttribute = "variant";
|
|
1640
1784
|
static _sizeAttribute = "size";
|
|
1641
1785
|
static _dotAttribute = "dot";
|
|
1642
1786
|
constructor() {
|
|
1643
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1787
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(st);
|
|
1644
1788
|
}
|
|
1645
1789
|
static get observedAttributes() {
|
|
1646
1790
|
return [
|
|
@@ -1670,17 +1814,17 @@ class m extends HTMLElement {
|
|
|
1670
1814
|
connectedCallback() {
|
|
1671
1815
|
this._render();
|
|
1672
1816
|
}
|
|
1673
|
-
attributeChangedCallback(t, e,
|
|
1817
|
+
attributeChangedCallback(t, e, i) {
|
|
1674
1818
|
}
|
|
1675
1819
|
_render() {
|
|
1676
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1820
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = de);
|
|
1677
1821
|
}
|
|
1678
1822
|
}
|
|
1679
|
-
const
|
|
1823
|
+
const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1680
1824
|
__proto__: null,
|
|
1681
1825
|
BadgeComponent: m,
|
|
1682
|
-
selector:
|
|
1683
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1826
|
+
selector: le
|
|
1827
|
+
}, Symbol.toStringTag, { value: "Module" })), ue = "ds-alert", he = `<div part="alert" class="alert" role="alert">
|
|
1684
1828
|
<span class="alert-icon"></span>
|
|
1685
1829
|
<div class="alert-content">
|
|
1686
1830
|
<slot name="title" class="alert-title-slot"></slot>
|
|
@@ -1695,31 +1839,31 @@ const De = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1695
1839
|
<span class="close-icon">✕</span>
|
|
1696
1840
|
</button>
|
|
1697
1841
|
</div>
|
|
1698
|
-
`,
|
|
1699
|
-
|
|
1700
|
-
class
|
|
1842
|
+
`, be = '@charset "UTF-8";*{box-sizing:border-box}:host{display:block}:host([hidden]){display:none}.alert{display:flex;align-items:center;gap:var(--gap-sm);padding:var(--spacing-3);border-radius:var(--border-radius-lg);border-left:4px solid var(--color-primary);background-color:var(--color-bg-secondary);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-sm);line-height:var(--line-height-normal);animation:alertIn var(--transition-fast) ease-out}:host([variant=success]) .alert{border-left-color:#22c55e;background-color:#1a3f1f;color:#d1fae5}:host([variant=warning]) .alert{border-left-color:#facc15;background-color:#3f3011;color:#e0c600}:host([variant=error]) .alert{border-left-color:#dc2626;background-color:color-mix(in srgb,#dc2626 10%,var(--color-bg-primary))}:host([variant=info]) .alert,:host([variant=hint]) .alert{border-left-color:var(--color-primary);background-color:color-mix(in srgb,var(--color-primary) 15%,var(--color-bg-primary));color:var(--color-text-primary)}.alert-icon{font-size:var(--font-size-lg);flex-shrink:0;display:flex;align-items:center;justify-content:center;min-width:1.25em;height:1.25em}:host([variant=success]) .alert-icon:before{content:"✓"}:host([variant=warning]) .alert-icon:before{content:"⚠"}:host([variant=error]) .alert-icon:before{content:"✕"}:host([variant=info]) .alert-icon:before{content:"ℹ"}:host([variant=hint]) .alert-icon:before{content:"💡"}.alert-content{flex:1;min-width:0;padding:0 var(--gap-sm);border-left:1px solid}::slotted([slot=title]){display:block;font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);margin-bottom:var(--spacing-1)}.alert-close{flex-shrink:0;background:transparent;border:none;cursor:pointer;padding:var(--spacing-1);border-radius:var(--border-radius-sm);color:var(--color-text-secondary);font-size:var(--font-size-md);line-height:1;display:flex;align-items:center;justify-content:center;transition:background var(--transition-fast),color var(--transition-fast)}.alert-close:hover{background:var(--color-hover-bg-secondary);color:var(--color-text-primary)}:host(:not([dismissible])) .alert-close{display:none}@keyframes alertIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}', ot = new CSSStyleSheet();
|
|
1843
|
+
ot.replaceSync(be);
|
|
1844
|
+
class R extends HTMLElement {
|
|
1701
1845
|
static _variantAttribute = "variant";
|
|
1702
1846
|
static _dismissibleAttribute = "dismissible";
|
|
1703
1847
|
constructor() {
|
|
1704
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1848
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(ot);
|
|
1705
1849
|
}
|
|
1706
1850
|
static get observedAttributes() {
|
|
1707
1851
|
return [
|
|
1708
|
-
|
|
1709
|
-
|
|
1852
|
+
R._variantAttribute,
|
|
1853
|
+
R._dismissibleAttribute
|
|
1710
1854
|
];
|
|
1711
1855
|
}
|
|
1712
1856
|
get variant() {
|
|
1713
|
-
return this.getAttribute(
|
|
1857
|
+
return this.getAttribute(R._variantAttribute) ?? "info";
|
|
1714
1858
|
}
|
|
1715
1859
|
set variant(t) {
|
|
1716
|
-
this.setAttribute(
|
|
1860
|
+
this.setAttribute(R._variantAttribute, t);
|
|
1717
1861
|
}
|
|
1718
1862
|
get dismissible() {
|
|
1719
|
-
return this.hasAttribute(
|
|
1863
|
+
return this.hasAttribute(R._dismissibleAttribute);
|
|
1720
1864
|
}
|
|
1721
1865
|
set dismissible(t) {
|
|
1722
|
-
t ? this.setAttribute(
|
|
1866
|
+
t ? this.setAttribute(R._dismissibleAttribute, "") : this.removeAttribute(R._dismissibleAttribute);
|
|
1723
1867
|
}
|
|
1724
1868
|
connectedCallback() {
|
|
1725
1869
|
this._render(), this._addEventListeners();
|
|
@@ -1727,7 +1871,7 @@ class L extends HTMLElement {
|
|
|
1727
1871
|
disconnectedCallback() {
|
|
1728
1872
|
this._removeEventListeners();
|
|
1729
1873
|
}
|
|
1730
|
-
attributeChangedCallback(t, e,
|
|
1874
|
+
attributeChangedCallback(t, e, i) {
|
|
1731
1875
|
}
|
|
1732
1876
|
_handleClose = () => {
|
|
1733
1877
|
this.dispatchEvent(
|
|
@@ -1741,14 +1885,14 @@ class L extends HTMLElement {
|
|
|
1741
1885
|
this.shadowRoot?.querySelector(".alert-close")?.removeEventListener("click", this._handleClose);
|
|
1742
1886
|
}
|
|
1743
1887
|
_render() {
|
|
1744
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1888
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = he, this._addEventListeners());
|
|
1745
1889
|
}
|
|
1746
1890
|
}
|
|
1747
|
-
const
|
|
1891
|
+
const Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1748
1892
|
__proto__: null,
|
|
1749
|
-
AlertComponent:
|
|
1750
|
-
selector:
|
|
1751
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1893
|
+
AlertComponent: R,
|
|
1894
|
+
selector: ue
|
|
1895
|
+
}, Symbol.toStringTag, { value: "Module" })), ve = "ds-tag", ge = `<span part="tag" class="tag">
|
|
1752
1896
|
<slot></slot>
|
|
1753
1897
|
<button
|
|
1754
1898
|
part="remove-button"
|
|
@@ -1759,33 +1903,33 @@ const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1759
1903
|
✕
|
|
1760
1904
|
</button>
|
|
1761
1905
|
</span>
|
|
1762
|
-
`,
|
|
1763
|
-
|
|
1764
|
-
class
|
|
1906
|
+
`, pe = "*{box-sizing:border-box}:host{display:inline-flex}.tag{display:inline-flex;align-items:center;gap:var(--gap-xs);padding-block:.25em;padding-inline:.75em;border-radius:var(--border-radius-full);font-family:var(--font-family-base);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);background-color:var(--color-bg-secondary);color:var(--color-text-primary);border:1px solid var(--color-border-primary);transition:all var(--transition-fast)}:host([variant=primary]) .tag{background-color:var(--color-primary);color:#fff;border-color:transparent}:host([variant=success]) .tag{background-color:var(--color-success);color:#fff;border-color:transparent}:host([variant=warning]) .tag{background-color:var(--color-warning);color:#1a1a1a;border-color:transparent}:host([variant=error]) .tag{background-color:var(--color-error);color:#fff;border-color:transparent}:host([size=sm]) .tag{font-size:var(--font-size-xs);padding-block:.15em;padding-inline:.5em}:host([size=lg]) .tag{font-size:var(--font-size-md);padding-block:.35em;padding-inline:1em}.tag-remove{display:none;background:transparent;border:none;cursor:pointer;padding:0;font-size:.75em;color:inherit;opacity:.7;line-height:1;border-radius:var(--border-radius-full);transition:opacity var(--transition-fast)}:host([removable]) .tag-remove{display:inline-flex;align-items:center;justify-content:center}.tag-remove:hover{opacity:1}", at = new CSSStyleSheet();
|
|
1907
|
+
at.replaceSync(pe);
|
|
1908
|
+
class w extends HTMLElement {
|
|
1765
1909
|
static _variantAttribute = "variant";
|
|
1766
1910
|
static _sizeAttribute = "size";
|
|
1767
1911
|
static _removableAttribute = "removable";
|
|
1768
1912
|
constructor() {
|
|
1769
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1913
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(at);
|
|
1770
1914
|
}
|
|
1771
1915
|
static get observedAttributes() {
|
|
1772
1916
|
return [
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1917
|
+
w._variantAttribute,
|
|
1918
|
+
w._sizeAttribute,
|
|
1919
|
+
w._removableAttribute
|
|
1776
1920
|
];
|
|
1777
1921
|
}
|
|
1778
1922
|
get variant() {
|
|
1779
|
-
return this.getAttribute(
|
|
1923
|
+
return this.getAttribute(w._variantAttribute) ?? "default";
|
|
1780
1924
|
}
|
|
1781
1925
|
set variant(t) {
|
|
1782
|
-
this.setAttribute(
|
|
1926
|
+
this.setAttribute(w._variantAttribute, t);
|
|
1783
1927
|
}
|
|
1784
1928
|
get removable() {
|
|
1785
|
-
return this.hasAttribute(
|
|
1929
|
+
return this.hasAttribute(w._removableAttribute);
|
|
1786
1930
|
}
|
|
1787
1931
|
set removable(t) {
|
|
1788
|
-
t ? this.setAttribute(
|
|
1932
|
+
t ? this.setAttribute(w._removableAttribute, "") : this.removeAttribute(w._removableAttribute);
|
|
1789
1933
|
}
|
|
1790
1934
|
connectedCallback() {
|
|
1791
1935
|
this._render(), this._addEventListeners();
|
|
@@ -1793,7 +1937,7 @@ class _ extends HTMLElement {
|
|
|
1793
1937
|
disconnectedCallback() {
|
|
1794
1938
|
this._removeEventListeners();
|
|
1795
1939
|
}
|
|
1796
|
-
attributeChangedCallback(t, e,
|
|
1940
|
+
attributeChangedCallback(t, e, i) {
|
|
1797
1941
|
}
|
|
1798
1942
|
_handleRemove = () => {
|
|
1799
1943
|
this.dispatchEvent(
|
|
@@ -1807,20 +1951,20 @@ class _ extends HTMLElement {
|
|
|
1807
1951
|
this.shadowRoot?.querySelector(".tag-remove")?.removeEventListener("click", this._handleRemove);
|
|
1808
1952
|
}
|
|
1809
1953
|
_render() {
|
|
1810
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
1954
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = ge, this._addEventListeners());
|
|
1811
1955
|
}
|
|
1812
1956
|
}
|
|
1813
|
-
const
|
|
1957
|
+
const Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1814
1958
|
__proto__: null,
|
|
1815
|
-
TagComponent:
|
|
1816
|
-
selector:
|
|
1817
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1959
|
+
TagComponent: w,
|
|
1960
|
+
selector: ve
|
|
1961
|
+
}, Symbol.toStringTag, { value: "Module" })), fe = "ds-avatar", me = `<div part="avatar" class="avatar" role="img">
|
|
1818
1962
|
<img class="avatar-image" alt="" />
|
|
1819
1963
|
<span class="avatar-initials"></span>
|
|
1820
1964
|
<span class="avatar-icon">👤</span>
|
|
1821
1965
|
</div>
|
|
1822
|
-
`,
|
|
1823
|
-
|
|
1966
|
+
`, ye = "*{box-sizing:border-box}:host{display:inline-flex}.avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:var(--border-radius-full);background-color:var(--color-primary);color:#fff;font-family:var(--font-family-base);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);overflow:hidden;-webkit-user-select:none;user-select:none;flex-shrink:0}:host([size=xs]) .avatar{width:1.5rem;height:1.5rem;font-size:var(--font-size-xs)}:host([size=sm]) .avatar{width:2rem;height:2rem;font-size:var(--font-size-xs)}:host([size=md]) .avatar{width:2.5rem;height:2.5rem;font-size:var(--font-size-sm)}:host([size=lg]) .avatar{width:3.5rem;height:3.5rem;font-size:var(--font-size-lg)}:host([size=xl]) .avatar{width:5rem;height:5rem;font-size:var(--font-size-2xl)}:host([shape=square]) .avatar{border-radius:var(--border-radius-md)}:host([shape=rounded]) .avatar{border-radius:var(--border-radius-lg)}:host([color=secondary]) .avatar{background-color:var(--color-bg-secondary);color:var(--color-text-primary);border:1px solid var(--color-border-primary)}:host([color=success]) .avatar{background-color:var(--color-success)}:host([color=warning]) .avatar{background-color:var(--color-warning);color:#1a1a1a}:host([color=error]) .avatar{background-color:var(--color-error)}.avatar-image{width:100%;height:100%;object-fit:cover;display:none;border-radius:inherit}.avatar-initials{display:none;line-height:1}.avatar-icon{display:flex;font-size:1.2em;line-height:1}:host([src]) .avatar-image{display:block}:host([src]) .avatar-initials{display:none}:host([src]) .avatar-icon{display:none}:host([initials]:not([src])) .avatar-initials{display:block}:host([initials]:not([src])) .avatar-icon{display:none}", nt = new CSSStyleSheet();
|
|
1967
|
+
nt.replaceSync(ye);
|
|
1824
1968
|
class n extends HTMLElement {
|
|
1825
1969
|
static _srcAttribute = "src";
|
|
1826
1970
|
static _altAttribute = "alt";
|
|
@@ -1829,7 +1973,7 @@ class n extends HTMLElement {
|
|
|
1829
1973
|
static _shapeAttribute = "shape";
|
|
1830
1974
|
static _colorAttribute = "color";
|
|
1831
1975
|
constructor() {
|
|
1832
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
1976
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(nt);
|
|
1833
1977
|
}
|
|
1834
1978
|
static get observedAttributes() {
|
|
1835
1979
|
return [
|
|
@@ -1871,35 +2015,35 @@ class n extends HTMLElement {
|
|
|
1871
2015
|
connectedCallback() {
|
|
1872
2016
|
this._render();
|
|
1873
2017
|
}
|
|
1874
|
-
attributeChangedCallback(t, e,
|
|
1875
|
-
|
|
2018
|
+
attributeChangedCallback(t, e, i) {
|
|
2019
|
+
i !== e && this._update(t, i);
|
|
1876
2020
|
}
|
|
1877
2021
|
_render() {
|
|
1878
|
-
this.shadowRoot !== null && (this.shadowRoot.innerHTML =
|
|
2022
|
+
this.shadowRoot !== null && (this.shadowRoot.innerHTML = me, this._update(n._srcAttribute, this.src), this._update(n._initialsAttribute, this.initials), this._update(n._altAttribute, this.alt));
|
|
1879
2023
|
}
|
|
1880
2024
|
_update(t, e) {
|
|
1881
2025
|
if (t === n._srcAttribute) {
|
|
1882
|
-
const
|
|
1883
|
-
|
|
2026
|
+
const i = this.shadowRoot?.querySelector(".avatar-image");
|
|
2027
|
+
i != null && (i.src = e ?? "");
|
|
1884
2028
|
} else if (t === n._initialsAttribute) {
|
|
1885
|
-
const
|
|
1886
|
-
|
|
2029
|
+
const i = this.shadowRoot?.querySelector(".avatar-initials");
|
|
2030
|
+
i != null && (i.textContent = e ?? "");
|
|
1887
2031
|
} else if (t === n._altAttribute) {
|
|
1888
|
-
const
|
|
1889
|
-
|
|
2032
|
+
const i = this.shadowRoot?.querySelector(".avatar-image"), s = this.shadowRoot?.querySelector(".avatar");
|
|
2033
|
+
i != null && (i.alt = e ?? ""), s?.setAttribute("aria-label", e ?? "");
|
|
1890
2034
|
}
|
|
1891
2035
|
}
|
|
1892
2036
|
}
|
|
1893
|
-
const
|
|
2037
|
+
const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1894
2038
|
__proto__: null,
|
|
1895
2039
|
AvatarComponent: n,
|
|
1896
|
-
selector:
|
|
1897
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2040
|
+
selector: fe
|
|
2041
|
+
}, Symbol.toStringTag, { value: "Module" })), Ae = "ds-tooltip", _e = `<slot></slot>
|
|
1898
2042
|
<div part="tooltip" class="tooltip" role="tooltip">
|
|
1899
2043
|
<slot name="content"></slot>
|
|
1900
2044
|
</div>
|
|
1901
|
-
`,
|
|
1902
|
-
|
|
2045
|
+
`, we = "*{box-sizing:border-box}:host{position:relative;display:inline-flex;align-items:center}.tooltip{position:absolute;z-index:var(--z-index-tooltip, 1070);bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);padding:var(--spacing-1) var(--spacing-2);background-color:var(--color-bg-tertiary, #1e1e2e);color:var(--color-text-primary);font-family:var(--font-family-base);font-size:var(--font-size-xs);line-height:var(--line-height-normal);border-radius:var(--border-radius-md);box-shadow:var(--shadow-lg);white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--transition-fast),visibility var(--transition-fast);max-width:16rem;white-space:normal;text-align:center}:host([placement=bottom]) .tooltip{bottom:auto;top:calc(100% + .5rem)}:host([placement=left]) .tooltip{bottom:auto;left:auto;right:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([placement=right]) .tooltip{bottom:auto;left:calc(100% + .5rem);top:50%;transform:translateY(-50%)}:host([open]) .tooltip,:host(:hover) .tooltip,:host(:focus-within) .tooltip{opacity:1;visibility:visible}:host([follow-cursor]) .tooltip{position:fixed;bottom:auto;left:0;top:0;transform:none}:host([follow-cursor]) .tooltip{opacity:1;visibility:visible}", lt = new CSSStyleSheet();
|
|
2046
|
+
lt.replaceSync(we);
|
|
1903
2047
|
class b extends HTMLElement {
|
|
1904
2048
|
static _placementAttribute = "placement";
|
|
1905
2049
|
static _contentAttribute = "content";
|
|
@@ -1908,7 +2052,7 @@ class b extends HTMLElement {
|
|
|
1908
2052
|
_lastMouseX = 0;
|
|
1909
2053
|
_lastMouseY = 0;
|
|
1910
2054
|
constructor() {
|
|
1911
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
2055
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(lt);
|
|
1912
2056
|
}
|
|
1913
2057
|
static get observedAttributes() {
|
|
1914
2058
|
return [
|
|
@@ -1950,13 +2094,13 @@ class b extends HTMLElement {
|
|
|
1950
2094
|
disconnectedCallback() {
|
|
1951
2095
|
this._removeEventListeners();
|
|
1952
2096
|
}
|
|
1953
|
-
attributeChangedCallback(t, e,
|
|
1954
|
-
|
|
2097
|
+
attributeChangedCallback(t, e, i) {
|
|
2098
|
+
i !== e && (t === b._contentAttribute && this._updateContent(i), t === b._followCursorAttribute && (i !== null ? this._attachEventListeners() : this._removeEventListeners()));
|
|
1955
2099
|
}
|
|
1956
2100
|
_render() {
|
|
1957
2101
|
if (this.shadowRoot === null)
|
|
1958
2102
|
return;
|
|
1959
|
-
this.shadowRoot.innerHTML =
|
|
2103
|
+
this.shadowRoot.innerHTML = _e, this._updateContent(this.content);
|
|
1960
2104
|
const t = this.shadowRoot.querySelector(".tooltip");
|
|
1961
2105
|
if (t != null) {
|
|
1962
2106
|
const e = `tooltip-${Math.random().toString(36).slice(2, 7)}`;
|
|
@@ -1990,16 +2134,16 @@ class b extends HTMLElement {
|
|
|
1990
2134
|
_updateContent(t) {
|
|
1991
2135
|
const e = this.shadowRoot?.querySelector(".tooltip");
|
|
1992
2136
|
if (e != null && t !== null && t !== "") {
|
|
1993
|
-
const
|
|
1994
|
-
(
|
|
2137
|
+
const i = e.querySelector("slot");
|
|
2138
|
+
(i === null || i.assignedNodes().length === 0) && (e.textContent = t);
|
|
1995
2139
|
}
|
|
1996
2140
|
}
|
|
1997
2141
|
}
|
|
1998
|
-
const
|
|
2142
|
+
const Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1999
2143
|
__proto__: null,
|
|
2000
2144
|
TooltipComponent: b,
|
|
2001
|
-
selector:
|
|
2002
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2145
|
+
selector: Ae
|
|
2146
|
+
}, Symbol.toStringTag, { value: "Module" })), Se = "ds-text-input", xe = `<div part="wrapper" class="input-wrapper">
|
|
2003
2147
|
<label class="input-label" part="label"></label>
|
|
2004
2148
|
<div class="input-container">
|
|
2005
2149
|
<slot name="prefix" class="input-prefix"></slot>
|
|
@@ -2008,8 +2152,8 @@ const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2008
2152
|
</div>
|
|
2009
2153
|
<span class="input-helper" part="helper"></span>
|
|
2010
2154
|
</div>
|
|
2011
|
-
`,
|
|
2012
|
-
|
|
2155
|
+
`, Ee = "*{box-sizing:border-box}:host{display:block;width:100%}.input-wrapper{display:flex;flex-direction:column;gap:var(--gap-xs);font-family:var(--font-family-base)}.input-label{font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);color:var(--color-text-primary)}.input-label:empty{display:none}.input-container{display:flex;align-items:center;background-color:var(--color-bg-primary);border:1px solid var(--color-border-primary);border-radius:var(--border-radius-md);transition:border-color var(--transition-fast),box-shadow var(--transition-fast);overflow:hidden}.input-container:focus-within{border-color:var(--color-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--color-primary) 20%,transparent);outline:none}:host([state=error]) .input-container{border-color:#dc2626;box-shadow:none}:host([state=error]) .input-container:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,#dc2626 20%,transparent)}:host([state=success]) .input-container{border-color:var(--color-success)}.input{flex:1;min-width:0;padding:var(--spacing-2) var(--spacing-3);background:transparent;border:none;outline:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);color:var(--color-text-primary);line-height:var(--line-height-normal)}.input::placeholder{color:var(--color-text-secondary);opacity:.7}.input:disabled{opacity:.5;cursor:not-allowed}:host([size=sm]) .input{padding:var(--spacing-1) var(--spacing-2);font-size:var(--font-size-xs)}:host([size=lg]) .input{padding:var(--spacing-3) var(--spacing-4);font-size:var(--font-size-md)}.input-helper{font-size:var(--font-size-xs);color:var(--color-text-secondary)}.input-helper:empty{display:none}:host([state=error]) .input-helper{color:#dc2626}:host([state=success]) .input-helper{color:var(--color-success)}::slotted([slot=prefix]),::slotted([slot=suffix]){display:flex;align-items:center;padding-inline:var(--spacing-2);color:var(--color-text-secondary);font-size:var(--font-size-sm);flex-shrink:0}", dt = new CSSStyleSheet();
|
|
2156
|
+
dt.replaceSync(Ee);
|
|
2013
2157
|
class o extends HTMLElement {
|
|
2014
2158
|
static _labelAttribute = "label";
|
|
2015
2159
|
static _placeholderAttribute = "placeholder";
|
|
@@ -2022,7 +2166,7 @@ class o extends HTMLElement {
|
|
|
2022
2166
|
static _sizeAttribute = "size";
|
|
2023
2167
|
static _nameAttribute = "name";
|
|
2024
2168
|
constructor() {
|
|
2025
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
2169
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(dt);
|
|
2026
2170
|
}
|
|
2027
2171
|
static get observedAttributes() {
|
|
2028
2172
|
return [
|
|
@@ -2083,8 +2227,8 @@ class o extends HTMLElement {
|
|
|
2083
2227
|
disconnectedCallback() {
|
|
2084
2228
|
this._removeEventListeners();
|
|
2085
2229
|
}
|
|
2086
|
-
attributeChangedCallback(t, e,
|
|
2087
|
-
|
|
2230
|
+
attributeChangedCallback(t, e, i) {
|
|
2231
|
+
i !== e && this._syncAttribute(t, i);
|
|
2088
2232
|
}
|
|
2089
2233
|
_handleInput = () => {
|
|
2090
2234
|
this.dispatchEvent(
|
|
@@ -2111,66 +2255,66 @@ class o extends HTMLElement {
|
|
|
2111
2255
|
this._inputElement?.removeEventListener("input", this._handleInput), this._inputElement?.removeEventListener("change", this._handleChange);
|
|
2112
2256
|
}
|
|
2113
2257
|
_syncAttribute(t, e) {
|
|
2114
|
-
const
|
|
2258
|
+
const i = this._inputElement, s = this.shadowRoot?.querySelector(".input-label"), a = this.shadowRoot?.querySelector(".input-helper");
|
|
2115
2259
|
switch (t) {
|
|
2116
2260
|
case o._labelAttribute:
|
|
2117
|
-
|
|
2261
|
+
s != null && (s.textContent = e ?? "");
|
|
2118
2262
|
break;
|
|
2119
2263
|
case o._placeholderAttribute:
|
|
2120
|
-
|
|
2264
|
+
i?.setAttribute("placeholder", e ?? "");
|
|
2121
2265
|
break;
|
|
2122
2266
|
case o._valueAttribute:
|
|
2123
|
-
|
|
2267
|
+
i != null && (i.value = e ?? "");
|
|
2124
2268
|
break;
|
|
2125
2269
|
case o._typeAttribute:
|
|
2126
|
-
|
|
2270
|
+
i?.setAttribute("type", e ?? "text");
|
|
2127
2271
|
break;
|
|
2128
2272
|
case o._disabledAttribute:
|
|
2129
|
-
e !== null ?
|
|
2273
|
+
e !== null ? i?.setAttribute("disabled", "") : i?.removeAttribute("disabled");
|
|
2130
2274
|
break;
|
|
2131
2275
|
case o._requiredAttribute:
|
|
2132
|
-
e !== null ?
|
|
2276
|
+
e !== null ? i?.setAttribute("required", "") : i?.removeAttribute("required");
|
|
2133
2277
|
break;
|
|
2134
2278
|
case o._helperAttribute:
|
|
2135
2279
|
a != null && (a.textContent = e ?? "");
|
|
2136
2280
|
break;
|
|
2137
2281
|
case o._nameAttribute:
|
|
2138
|
-
e !== null && e !== "" ?
|
|
2282
|
+
e !== null && e !== "" ? i?.setAttribute("name", e) : i?.removeAttribute("name");
|
|
2139
2283
|
break;
|
|
2140
2284
|
}
|
|
2141
2285
|
}
|
|
2142
2286
|
_render() {
|
|
2143
2287
|
if (this.shadowRoot === null)
|
|
2144
2288
|
return;
|
|
2145
|
-
this.shadowRoot.innerHTML =
|
|
2289
|
+
this.shadowRoot.innerHTML = xe;
|
|
2146
2290
|
const t = this._inputElement;
|
|
2147
2291
|
if (t !== null) {
|
|
2148
2292
|
t.setAttribute(
|
|
2149
2293
|
"type",
|
|
2150
2294
|
this.getAttribute(o._typeAttribute) ?? "text"
|
|
2151
2295
|
), t.setAttribute("placeholder", this.placeholder), t.value = this.getAttribute(o._valueAttribute) ?? "", this.disabled && t.setAttribute("disabled", ""), this.hasAttribute(o._requiredAttribute) && t.setAttribute("required", "");
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2296
|
+
const s = this.getAttribute(o._nameAttribute);
|
|
2297
|
+
s !== null && s !== "" && t.setAttribute("name", s);
|
|
2154
2298
|
}
|
|
2155
2299
|
const e = this.shadowRoot.querySelector(".input-label");
|
|
2156
2300
|
e !== null && (e.textContent = this.label);
|
|
2157
|
-
const
|
|
2158
|
-
|
|
2301
|
+
const i = this.shadowRoot.querySelector(".input-helper");
|
|
2302
|
+
i !== null && (i.textContent = this.helper), this._addEventListeners();
|
|
2159
2303
|
}
|
|
2160
2304
|
}
|
|
2161
|
-
const
|
|
2305
|
+
const Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2162
2306
|
__proto__: null,
|
|
2163
2307
|
TextInputComponent: o,
|
|
2164
|
-
selector:
|
|
2165
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2308
|
+
selector: Se
|
|
2309
|
+
}, Symbol.toStringTag, { value: "Module" })), ke = "ds-toggle", Le = `<label class="toggle-wrapper" part="wrapper">
|
|
2166
2310
|
<input class="toggle-input" type="checkbox" role="switch" />
|
|
2167
2311
|
<span class="toggle-track" part="track">
|
|
2168
2312
|
<span class="toggle-thumb" part="thumb"></span>
|
|
2169
2313
|
</span>
|
|
2170
2314
|
<span class="toggle-label" part="label"><slot></slot></span>
|
|
2171
2315
|
</label>
|
|
2172
|
-
`,
|
|
2173
|
-
|
|
2316
|
+
`, Re = "*{box-sizing:border-box}:host{display:inline-flex}.toggle-wrapper{display:inline-flex;align-items:center;gap:var(--gap-sm);cursor:pointer;-webkit-user-select:none;user-select:none;font-family:var(--font-family-base);font-size:var(--font-size-sm);color:var(--color-text-primary)}.toggle-input{position:absolute;opacity:0;width:0;height:0}.toggle-track{position:relative;display:inline-flex;align-items:center;width:2.75rem;height:1.5rem;border-radius:var(--border-radius-full);background-color:var(--color-border-primary);transition:background-color var(--transition-fast);flex-shrink:0}.toggle-input:checked+.toggle-track{background-color:var(--color-primary)}.toggle-thumb{position:absolute;left:3px;width:1.125rem;height:1.125rem;border-radius:var(--border-radius-full);background-color:#fff;box-shadow:var(--shadow-sm);transition:transform var(--transition-fast)}.toggle-input:checked+.toggle-track .toggle-thumb{transform:translate(1.25rem)}.toggle-input:focus-visible+.toggle-track{outline:2px solid var(--color-primary);outline-offset:2px}.toggle-input:disabled+.toggle-track{opacity:.4;cursor:not-allowed}:host([disabled]) .toggle-wrapper{cursor:not-allowed;opacity:.5}:host([size=sm]) .toggle-track{width:2rem;height:1.125rem}:host([size=sm]) .toggle-thumb{width:.875rem;height:.875rem}:host([size=sm]) .toggle-input:checked+.toggle-track .toggle-thumb{transform:translate(.875rem)}:host([size=lg]) .toggle-track{width:3.5rem;height:2rem}:host([size=lg]) .toggle-thumb{width:1.5rem;height:1.5rem}:host([size=lg]) .toggle-input:checked+.toggle-track .toggle-thumb{transform:translate(1.5rem)}:host([variant=success]) .toggle-input:checked+.toggle-track{background-color:var(--color-success)}:host([variant=warning]) .toggle-input:checked+.toggle-track{background-color:var(--color-warning)}:host([variant=error]) .toggle-input:checked+.toggle-track{background-color:var(--color-error)}.toggle-label:empty{display:none}", ct = new CSSStyleSheet();
|
|
2317
|
+
ct.replaceSync(Re);
|
|
2174
2318
|
class l extends HTMLElement {
|
|
2175
2319
|
static _checkedAttribute = "checked";
|
|
2176
2320
|
static _disabledAttribute = "disabled";
|
|
@@ -2179,7 +2323,7 @@ class l extends HTMLElement {
|
|
|
2179
2323
|
static _nameAttribute = "name";
|
|
2180
2324
|
static _valueAttribute = "value";
|
|
2181
2325
|
constructor() {
|
|
2182
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(
|
|
2326
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.adoptedStyleSheets.push(ct);
|
|
2183
2327
|
}
|
|
2184
2328
|
static get observedAttributes() {
|
|
2185
2329
|
return [
|
|
@@ -2214,11 +2358,11 @@ class l extends HTMLElement {
|
|
|
2214
2358
|
disconnectedCallback() {
|
|
2215
2359
|
this._removeEventListeners();
|
|
2216
2360
|
}
|
|
2217
|
-
attributeChangedCallback(t, e,
|
|
2218
|
-
if (
|
|
2361
|
+
attributeChangedCallback(t, e, i) {
|
|
2362
|
+
if (i === e)
|
|
2219
2363
|
return;
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2364
|
+
const s = this._inputElement;
|
|
2365
|
+
s !== null && (t === l._checkedAttribute ? s.checked = i !== null : t === l._disabledAttribute && (s.disabled = i !== null));
|
|
2222
2366
|
}
|
|
2223
2367
|
_handleChange = () => {
|
|
2224
2368
|
const t = this._inputElement?.checked ?? !1;
|
|
@@ -2239,41 +2383,42 @@ class l extends HTMLElement {
|
|
|
2239
2383
|
_render() {
|
|
2240
2384
|
if (this.shadowRoot === null)
|
|
2241
2385
|
return;
|
|
2242
|
-
this.shadowRoot.innerHTML =
|
|
2386
|
+
this.shadowRoot.innerHTML = Le;
|
|
2243
2387
|
const t = this._inputElement;
|
|
2244
2388
|
t != null && (t.checked = this.checked, t.disabled = this.disabled, this.getAttribute(l._nameAttribute) !== null && this.getAttribute(l._nameAttribute) !== "" && (t.name = this.getAttribute(l._nameAttribute) ?? ""), this.getAttribute(l._valueAttribute) !== null && this.getAttribute(l._valueAttribute) !== "" && (t.value = this.getAttribute(l._valueAttribute) ?? "on")), this._addEventListeners();
|
|
2245
2389
|
}
|
|
2246
2390
|
}
|
|
2247
|
-
const
|
|
2391
|
+
const Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2248
2392
|
__proto__: null,
|
|
2249
2393
|
ToggleComponent: l,
|
|
2250
|
-
selector:
|
|
2394
|
+
selector: ke
|
|
2251
2395
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2252
2396
|
export {
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2397
|
+
ze as APPLICATION_NAME,
|
|
2398
|
+
Ve as Alert,
|
|
2399
|
+
Be as Avatar,
|
|
2400
|
+
Ye as Badge,
|
|
2401
|
+
De as BarMenu,
|
|
2402
|
+
$e as BaseButton,
|
|
2403
|
+
We as BaseCard,
|
|
2404
|
+
Fe as BaseDialog,
|
|
2405
|
+
j as CUSTOM_MESSAGES,
|
|
2406
|
+
He as CloseButton,
|
|
2407
|
+
Te as ConfirmButton,
|
|
2408
|
+
qe as ConfirmationDialog,
|
|
2409
|
+
Pe as HeaderBodyFooterDialog,
|
|
2410
|
+
Ce as LoaderBars,
|
|
2411
|
+
je as NextButton,
|
|
2412
|
+
Ne as PreviousButton,
|
|
2413
|
+
Ke as ProgressBar,
|
|
2414
|
+
Ge as Skeleton,
|
|
2415
|
+
Ue as Spinner,
|
|
2416
|
+
Xe as Tag,
|
|
2417
|
+
Qe as TextInput,
|
|
2418
|
+
Ze as Toggle,
|
|
2419
|
+
Je as Tooltip,
|
|
2420
|
+
Ie as UndoButton,
|
|
2421
|
+
Me as WebComponentsRegistry,
|
|
2422
|
+
bt as clearThemes,
|
|
2423
|
+
Oe as switchTheme
|
|
2279
2424
|
};
|