@supersoniks/concorde 3.1.88 → 3.1.90
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 +336 -356
- package/concorde-core.es.js +2793 -2769
- package/dist/concorde-core.bundle.js +336 -356
- package/dist/concorde-core.es.js +2793 -2769
- package/package.json +1 -1
- package/src/core/components/ui/button/button.ts +1 -0
- package/src/core/components/ui/modal/modal-close.ts +21 -19
- package/src/core/components/ui/modal/modal.md +0 -4
- package/src/core/components/ui/modal/modal.ts +267 -235
- package/src/core/components/ui/toast/toast.ts +0 -0
package/package.json
CHANGED
|
@@ -641,6 +641,7 @@ export class Button extends FormCheckable(FormElement(Subscriber(LitElement))) {
|
|
|
641
641
|
aria-expanded=${ifDefined(this.sonicAriaExpanded)}
|
|
642
642
|
aria-label=${ifDefined(this.ariaLabel)}
|
|
643
643
|
aria-labelledby=${ifDefined(this.ariaLabelledby)}
|
|
644
|
+
?disabled=${this.disabled}
|
|
644
645
|
@click=${this.handleChange}
|
|
645
646
|
@pointerdown=${this.handleRepeatStart}
|
|
646
647
|
>
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {html, LitElement
|
|
2
|
-
import {customElement, property} from "lit/decorators.js";
|
|
3
|
-
import {Modal} from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
4
|
-
import {ifDefined} from "lit/directives/if-defined.js";
|
|
1
|
+
import { html, LitElement } from "lit";
|
|
2
|
+
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import { Modal } from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
5
|
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
6
6
|
const tagName = "sonic-modal-close";
|
|
7
7
|
|
|
8
8
|
@customElement(tagName)
|
|
9
9
|
export class ModalClose extends LitElement {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
right: 0.5rem;
|
|
19
|
-
transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
|
|
20
|
-
z-index: 20;
|
|
21
|
-
}
|
|
22
|
-
`,
|
|
23
|
-
];
|
|
10
|
+
@property() translation: Record<string, string> = {
|
|
11
|
+
fr: "Fermer la fenêtre",
|
|
12
|
+
en: "Close window",
|
|
13
|
+
de: "Fenster schließen",
|
|
14
|
+
nl: "Venster sluiten",
|
|
15
|
+
es: "Cerrar",
|
|
16
|
+
};
|
|
17
|
+
|
|
24
18
|
@property() reset?: string;
|
|
25
19
|
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback();
|
|
22
|
+
this.lang = document.documentElement.lang?.split("-")[0] ?? "fr";
|
|
23
|
+
}
|
|
26
24
|
render() {
|
|
27
|
-
return html`<sonic-button
|
|
25
|
+
return html`<sonic-button
|
|
26
|
+
aria-label=${this.translation[this.lang]}
|
|
27
|
+
reset=${ifDefined(this.reset)}
|
|
28
|
+
shape="circle"
|
|
29
|
+
@click=${this.handleClick}
|
|
28
30
|
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
29
31
|
></sonic-button>`;
|
|
30
32
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
Simple modal
|
|
7
7
|
</sonic-button>
|
|
8
8
|
<sonic-modal id="modalExample">
|
|
9
|
-
<sonic-modal-close></sonic-modal-close>
|
|
10
9
|
<sonic-modal-title
|
|
11
10
|
>Lorem ipsum dolor sit amet <sonic-badge type="danger" size="sm">+33</sonic-badge></sonic-modal-title
|
|
12
11
|
>
|
|
@@ -31,7 +30,6 @@
|
|
|
31
30
|
<template>
|
|
32
31
|
<sonic-button onclick="document.getElementById('modalText').show()"> Long text </sonic-button>
|
|
33
32
|
<sonic-modal align="left" id="modalText">
|
|
34
|
-
<sonic-modal-close></sonic-modal-close>
|
|
35
33
|
<sonic-modal-title>Infos et tarifs </sonic-modal-title>
|
|
36
34
|
<sonic-modal-content>
|
|
37
35
|
<div class="prose">
|
|
@@ -97,7 +95,6 @@
|
|
|
97
95
|
<template>
|
|
98
96
|
<sonic-button onclick="document.getElementById('CustomWidth').show()"> Custom width </sonic-button>
|
|
99
97
|
<sonic-modal maxHeight="50vh" maxWidth="90vw" width="100%" height="100%" id="CustomWidth">
|
|
100
|
-
<sonic-modal-close></sonic-modal-close>
|
|
101
98
|
<sonic-image
|
|
102
99
|
cover
|
|
103
100
|
objectPosition="center 20%"
|
|
@@ -113,7 +110,6 @@
|
|
|
113
110
|
<template>
|
|
114
111
|
<sonic-button onclick="document.getElementById('Fullscreen').show()"> Fullscreen </sonic-button>
|
|
115
112
|
<sonic-modal fullscreen id="Fullscreen">
|
|
116
|
-
<sonic-modal-close></sonic-modal-close>
|
|
117
113
|
<sonic-image
|
|
118
114
|
cover
|
|
119
115
|
src="https://thegoodlife.fr/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|