@supersoniks/concorde 3.1.94 → 3.1.96
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/build-infos.json +1 -1
- package/concorde-core.bundle.js +140 -137
- package/concorde-core.es.js +278 -275
- package/dist/concorde-core.bundle.js +140 -137
- package/dist/concorde-core.es.js +278 -275
- package/package.json +1 -1
- package/src/core/components/ui/modal/modal-subtitle.ts +1 -2
- package/src/core/components/ui/modal/modal.ts +54 -44
package/package.json
CHANGED
|
@@ -7,9 +7,8 @@ export class ModalSubTitle extends LitElement {
|
|
|
7
7
|
static styles = [
|
|
8
8
|
css`
|
|
9
9
|
:host {
|
|
10
|
-
font-size: 1.
|
|
10
|
+
font-size: 1.25rem;
|
|
11
11
|
display: block;
|
|
12
|
-
line-height: 1.1rem;
|
|
13
12
|
line-height: var(--sc-headings-line-height, 1.1);
|
|
14
13
|
font-family: var(
|
|
15
14
|
--sc-headings-font-family,
|
|
@@ -51,11 +51,14 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
51
51
|
:host {
|
|
52
52
|
--sc-modal-py: 2.5rem;
|
|
53
53
|
--sc-modal-px: 1.5rem;
|
|
54
|
-
|
|
55
|
-
--
|
|
54
|
+
|
|
55
|
+
--sc_backdrop-bg: var(
|
|
56
|
+
--sc_overlay-bg,
|
|
57
|
+
var(--sc-base-200, rgba(0, 0, 0, 0.12))
|
|
58
|
+
);
|
|
59
|
+
--sc_backdrop-opacity: 0;
|
|
56
60
|
--sc_rounded: var(--sc-rounded-lg);
|
|
57
61
|
--sc_z-index: 990;
|
|
58
|
-
--sc_backdrop-opacity: 0;
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
* {
|
|
@@ -67,7 +70,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
67
70
|
color: var(--sc-base-content, #000);
|
|
68
71
|
width: 100%;
|
|
69
72
|
box-shadow: var(--sc-shadow-lg);
|
|
70
|
-
border-radius: var(--sc_rounded) var(--sc_rounded)
|
|
73
|
+
border-radius: var(--sc_rounded) var(--sc_rounded);
|
|
71
74
|
transform: translateZ(0);
|
|
72
75
|
border: none;
|
|
73
76
|
outline: none;
|
|
@@ -83,10 +86,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
83
86
|
|
|
84
87
|
#backdrop {
|
|
85
88
|
opacity: var(--sc_backdrop-opacity, 0);
|
|
86
|
-
background: var(
|
|
87
|
-
--sc_overlay-bg,
|
|
88
|
-
var(--sc-base-200, rgba(0, 0, 0, 0.12))
|
|
89
|
-
);
|
|
89
|
+
background: var(--sc_backdrop-bg);
|
|
90
90
|
transition: opacity 0.15s linear;
|
|
91
91
|
inset: 0;
|
|
92
92
|
position: fixed;
|
|
@@ -101,12 +101,6 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
101
101
|
padding: var(--sc-modal-py) var(--sc-modal-px);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
::slotted(sonic-modal-subtitle),
|
|
105
|
-
sonic-modal-subtitle {
|
|
106
|
-
margin-top: -0.9rem;
|
|
107
|
-
margin-bottom: 2.5rem;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
104
|
@media (max-width: 767.5px) {
|
|
111
105
|
#modal {
|
|
112
106
|
max-width: none !important;
|
|
@@ -115,6 +109,10 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
115
109
|
border-radius: var(--sc_rounded) var(--sc_rounded) 0 0 !important;
|
|
116
110
|
}
|
|
117
111
|
}
|
|
112
|
+
|
|
113
|
+
:host([fullScreen]) {
|
|
114
|
+
--sc_rounded: 0;
|
|
115
|
+
}
|
|
118
116
|
:host([fullScreen]) #modal {
|
|
119
117
|
width: 100% !important;
|
|
120
118
|
height: 100% !important;
|
|
@@ -126,8 +124,14 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
126
124
|
/* Layout des éléments slottés */
|
|
127
125
|
::slotted(sonic-modal-title),
|
|
128
126
|
sonic-modal-title {
|
|
129
|
-
margin-bottom:
|
|
127
|
+
margin-bottom: 1.75rem;
|
|
130
128
|
}
|
|
129
|
+
::slotted(sonic-modal-subtitle),
|
|
130
|
+
sonic-modal-subtitle {
|
|
131
|
+
margin-bottom: 1.75rem;
|
|
132
|
+
margin-top: -1.25rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
131
135
|
:host([align="left"]) ::slotted(sonic-modal-title),
|
|
132
136
|
:host([align="left"]) sonic-modal-title {
|
|
133
137
|
padding-right: 1em;
|
|
@@ -188,12 +192,15 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
188
192
|
| "right"
|
|
189
193
|
| "left" = "left";
|
|
190
194
|
|
|
191
|
-
|
|
192
|
-
@property({ type: String })
|
|
193
|
-
@property({ type: String })
|
|
195
|
+
// Settings de base
|
|
196
|
+
@property({ type: String }) paddingX?: string;
|
|
197
|
+
@property({ type: String }) paddingY?: string;
|
|
198
|
+
@property({ type: String }) maxWidth = "min(100vw, 40rem)";
|
|
199
|
+
@property({ type: String }) maxHeight = "90vh";
|
|
200
|
+
@property({ type: String }) zIndex?: string;
|
|
201
|
+
|
|
194
202
|
@property({ type: String }) width = "100%";
|
|
195
203
|
@property({ type: String }) height = "fit-content";
|
|
196
|
-
@property({ type: String }) zIndex = "var(--sc_z-index)";
|
|
197
204
|
@property({ type: String }) effect: effectType = "slide";
|
|
198
205
|
|
|
199
206
|
@property({ type: Object }) options?: ModalCreateOptions;
|
|
@@ -209,8 +216,6 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
209
216
|
@state() private _animationState: "visible" | "in" | "out" | "hidden" =
|
|
210
217
|
"hidden";
|
|
211
218
|
|
|
212
|
-
_animationDuration = 300;
|
|
213
|
-
|
|
214
219
|
static create(options: ModalCreateOptions): Modal {
|
|
215
220
|
const modal = document.createElement(tagName) as Modal;
|
|
216
221
|
// modal styles
|
|
@@ -231,12 +236,9 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
231
236
|
if (options.fullScreen) modal.fullScreen = options?.fullScreen;
|
|
232
237
|
if (options.effect) modal.effect = options?.effect;
|
|
233
238
|
|
|
234
|
-
if (options.paddingX)
|
|
235
|
-
|
|
236
|
-
if (options.
|
|
237
|
-
modal.style.setProperty("--sc-modal-py", options?.paddingY);
|
|
238
|
-
if (options.zIndex)
|
|
239
|
-
modal.style.setProperty("--sc_z-index", options?.zIndex);
|
|
239
|
+
if (options.paddingX) modal.paddingX = options?.paddingX;
|
|
240
|
+
if (options.paddingY) modal.paddingY = options?.paddingY;
|
|
241
|
+
if (options.zIndex) modal.zIndex = options?.zIndex;
|
|
240
242
|
|
|
241
243
|
const container = Theme.getPopContainer();
|
|
242
244
|
container.appendChild(modal);
|
|
@@ -279,6 +281,17 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
279
281
|
}
|
|
280
282
|
}
|
|
281
283
|
|
|
284
|
+
if (_changedProperties.has("zIndex")) {
|
|
285
|
+
this.style.setProperty("--sc_z-index", this.zIndex || "990");
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (_changedProperties.has("paddingX")) {
|
|
289
|
+
this.style.setProperty("--sc-modal-px", this.paddingX || "");
|
|
290
|
+
}
|
|
291
|
+
if (_changedProperties.has("paddingY")) {
|
|
292
|
+
this.style.setProperty("--sc-modal-py", this.paddingY || "");
|
|
293
|
+
}
|
|
294
|
+
|
|
282
295
|
super.willUpdate(_changedProperties);
|
|
283
296
|
}
|
|
284
297
|
|
|
@@ -316,16 +329,11 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
316
329
|
maxHeight: this.maxHeight,
|
|
317
330
|
width: this.width,
|
|
318
331
|
height: this.height,
|
|
319
|
-
zIndex: this.zIndex,
|
|
320
|
-
borderRadius: this.fullScreen ? "0" : "var(--sc_rounded)",
|
|
321
332
|
pointerEvents: this._animationState === "visible" ? "auto" : "none",
|
|
322
333
|
};
|
|
323
334
|
|
|
324
|
-
const modalContentStyles = {
|
|
325
|
-
padding: this.padding,
|
|
326
|
-
};
|
|
327
|
-
|
|
328
335
|
const overlayStyles = {
|
|
336
|
+
display: this.fullScreen ? "none" : "block",
|
|
329
337
|
pointerEvents: this._animationState === "visible" ? "auto" : "none",
|
|
330
338
|
};
|
|
331
339
|
|
|
@@ -343,7 +351,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
343
351
|
style=${styleMap(modalStyles)}
|
|
344
352
|
>
|
|
345
353
|
${this._animationState !== "hidden"
|
|
346
|
-
? html`<div id="modal-content"
|
|
354
|
+
? html`<div id="modal-content">
|
|
347
355
|
${!this.forceAction
|
|
348
356
|
? html`<sonic-modal-close></sonic-modal-close>`
|
|
349
357
|
: nothing}
|
|
@@ -448,7 +456,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
448
456
|
linear: "linear",
|
|
449
457
|
translateY: "translateY(2.5rem)",
|
|
450
458
|
durationIn: 300,
|
|
451
|
-
durationOut:
|
|
459
|
+
durationOut: 300,
|
|
452
460
|
} as const;
|
|
453
461
|
|
|
454
462
|
// ------------------------
|
|
@@ -464,14 +472,16 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
464
472
|
|
|
465
473
|
const isEntering = direction === "in";
|
|
466
474
|
const duration = isEntering ? durationIn : durationOut;
|
|
467
|
-
|
|
475
|
+
const delay = !this.fullScreen && isEntering ? 100 : 0;
|
|
468
476
|
// Backdrop
|
|
469
|
-
if (
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
477
|
+
if (!this.fullScreen) {
|
|
478
|
+
if (isEntering) {
|
|
479
|
+
this.style.setProperty("--sc_backdrop-opacity", "0.8");
|
|
480
|
+
} else {
|
|
481
|
+
setTimeout(() => {
|
|
482
|
+
this.style.setProperty("--sc_backdrop-opacity", "0");
|
|
483
|
+
}, 150);
|
|
484
|
+
}
|
|
475
485
|
}
|
|
476
486
|
|
|
477
487
|
// Animations
|
|
@@ -489,7 +499,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
489
499
|
duration: duration,
|
|
490
500
|
easing: isEntering ? quartOut : quadOut,
|
|
491
501
|
fill: "both",
|
|
492
|
-
delay:
|
|
502
|
+
delay: delay,
|
|
493
503
|
}
|
|
494
504
|
)
|
|
495
505
|
);
|
|
@@ -500,7 +510,7 @@ export class Modal extends Subscriber(LitElement) {
|
|
|
500
510
|
duration: duration,
|
|
501
511
|
easing: linear,
|
|
502
512
|
fill: "both",
|
|
503
|
-
delay:
|
|
513
|
+
delay: delay,
|
|
504
514
|
}
|
|
505
515
|
)
|
|
506
516
|
);
|