@supersoniks/concorde 1.1.23 → 1.1.25
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/README.md +0 -0
- package/cli.js +0 -0
- package/concorde-core.bundle.js +25 -31
- package/concorde-core.es.js +25 -31
- package/core/components/functional/configuration/configuration.js +2 -1
- package/core/components/functional/date/date.js +2 -1
- package/core/components/functional/example/example.js +2 -1
- package/core/components/functional/fetch/fetch.d.ts +0 -31
- package/core/components/functional/fetch/fetch.js +3 -2
- package/core/components/functional/if/if.d.ts +0 -3
- package/core/components/functional/if/if.js +3 -2
- package/core/components/functional/list/list.d.ts +0 -17
- package/core/components/functional/list/list.js +4 -3
- package/core/components/functional/queue/queue.d.ts +1 -8
- package/core/components/functional/queue/queue.js +10 -2
- package/core/components/functional/router/redirect.d.ts +0 -9
- package/core/components/functional/router/redirect.js +3 -2
- package/core/components/functional/router/router.d.ts +0 -14
- package/core/components/functional/router/router.js +3 -2
- package/core/components/functional/sonic-scope/sonic-scope.js +2 -1
- package/core/components/functional/states/states.d.ts +0 -15
- package/core/components/functional/states/states.js +3 -2
- package/core/components/functional/submit/submit.d.ts +0 -11
- package/core/components/functional/submit/submit.js +3 -2
- package/core/components/functional/subscriber/subscriber.d.ts +0 -3
- package/core/components/functional/subscriber/subscriber.js +3 -2
- package/core/components/ui/alert/alert.js +11 -11
- package/core/components/ui/badge/badge.js +3 -2
- package/core/components/ui/button/button.d.ts +4 -8
- package/core/components/ui/button/button.js +16 -9
- package/core/components/ui/card/card-footer.js +7 -1
- package/core/components/ui/card/card-header-descripton.js +6 -1
- package/core/components/ui/card/card-header.js +7 -1
- package/core/components/ui/card/card-main.js +7 -1
- package/core/components/ui/card/card.js +7 -1
- package/core/components/ui/divider/divider.js +2 -1
- package/core/components/ui/form/checkbox/checkbox.d.ts +1 -20
- package/core/components/ui/form/checkbox/checkbox.js +4 -3
- package/core/components/ui/form/fieldset/fieldset.js +5 -3
- package/core/components/ui/form/fieldset/legend.d.ts +3 -2
- package/core/components/ui/form/fieldset/legend.js +24 -15
- package/core/components/ui/form/form-actions/form-actions.d.ts +5 -0
- package/core/components/ui/form/{form-layout → form-actions}/form-actions.js +13 -5
- package/core/components/ui/form/form-layout/form-layout.js +3 -2
- package/core/components/ui/form/input/input.d.ts +3 -10
- package/core/components/ui/form/input/input.js +3 -2
- package/core/components/ui/form/radio/radio.d.ts +0 -6
- package/core/components/ui/form/radio/radio.js +3 -2
- package/core/components/ui/form/select/select.d.ts +0 -7
- package/core/components/ui/form/select/select.js +4 -3
- package/core/components/ui/form/textarea/textarea.js +7 -1
- package/core/components/ui/group/group.js +3 -2
- package/core/components/ui/icon/icon.d.ts +0 -4
- package/core/components/ui/icon/icon.js +9 -5
- package/core/components/ui/icon/icons.js +43 -17
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/image/image.js +3 -2
- package/core/components/ui/link/link.js +6 -1
- package/core/components/ui/loader/loader.js +3 -2
- package/core/components/ui/menu/menu-item.js +5 -4
- package/core/components/ui/menu/menu.d.ts +2 -1
- package/core/components/ui/menu/menu.js +18 -13
- package/core/components/ui/modal/modal-actions.js +3 -2
- package/core/components/ui/modal/modal-close.js +4 -3
- package/core/components/ui/modal/modal-content.js +3 -2
- package/core/components/ui/modal/modal-subtitle.js +3 -2
- package/core/components/ui/modal/modal-title.js +3 -2
- package/core/components/ui/modal/modal.js +5 -4
- package/core/components/ui/pop/pop.js +3 -2
- package/core/components/ui/progress/progress.js +29 -7
- package/core/components/ui/table/table-caption.js +20 -2
- package/core/components/ui/table/table-tbody.js +8 -2
- package/core/components/ui/table/table-td.d.ts +3 -2
- package/core/components/ui/table/table-td.js +19 -11
- package/core/components/ui/table/table-tfoot.js +7 -1
- package/core/components/ui/table/table-th.d.ts +3 -1
- package/core/components/ui/table/table-th.js +27 -13
- package/core/components/ui/table/table-thead.js +8 -2
- package/core/components/ui/table/table-tr.js +7 -1
- package/core/components/ui/table/table.js +15 -2
- package/core/components/ui/tabs/tabs.js +2 -3
- package/core/components/ui/taxonomy/taxonomy.js +2 -1
- package/core/components/ui/theme/css/tailwind.css +0 -0
- package/core/components/ui/theme/css/tailwind.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +9 -8
- package/core/components/ui/theme/theme-collection/dark.js +0 -4
- package/core/components/ui/theme/theme-collection/light.js +0 -1
- package/core/components/ui/theme/theme.d.ts +0 -1
- package/core/components/ui/theme/theme.js +3 -6
- package/core/components/ui/toast/message-subscriber.js +2 -1
- package/core/components/ui/toast/toast-item.d.ts +1 -0
- package/core/components/ui/toast/toast-item.js +61 -31
- package/core/components/ui/toast/toast.js +7 -6
- package/core/components/ui/tooltip/tooltip.js +7 -1
- package/core/components/ui/ui.d.ts +1 -0
- package/core/components/ui/ui.js +1 -0
- package/core/mixins/FormCheckable.d.ts +1 -0
- package/core/mixins/FormCheckable.js +12 -0
- package/mixins.d.ts +1 -0
- package/package.json +3 -3
- package/core/components/ui/form/form-layout/form-actions.d.ts +0 -6
|
@@ -14,14 +14,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
import { LitElement, css, nothing } from "lit";
|
|
17
|
-
import { property } from "lit/decorators.js";
|
|
17
|
+
import { customElement, property } from "lit/decorators.js";
|
|
18
18
|
import Icons from "./icons";
|
|
19
19
|
/**
|
|
20
20
|
* Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
|
|
21
21
|
* les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const tagName = "sonic-icon";
|
|
24
|
+
let Icon = class Icon extends LitElement {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
this.iconText = "";
|
|
@@ -75,7 +75,7 @@ export class Icon extends LitElement {
|
|
|
75
75
|
this.style.removeProperty("display");
|
|
76
76
|
return this.iconText;
|
|
77
77
|
}
|
|
78
|
-
}
|
|
78
|
+
};
|
|
79
79
|
Icon.styles = css `
|
|
80
80
|
:host {
|
|
81
81
|
line-height: 0;
|
|
@@ -129,8 +129,12 @@ __decorate([
|
|
|
129
129
|
__decorate([
|
|
130
130
|
property({ type: String })
|
|
131
131
|
], Icon.prototype, "library", null);
|
|
132
|
+
Icon = __decorate([
|
|
133
|
+
customElement(tagName)
|
|
134
|
+
], Icon);
|
|
135
|
+
export { Icon };
|
|
132
136
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
133
137
|
try {
|
|
134
|
-
customElements.define(
|
|
138
|
+
customElements.define(tagName, Icon);
|
|
135
139
|
}
|
|
136
140
|
catch (e) { }
|
|
@@ -21,12 +21,35 @@ const loadingGetPromises = new Map();
|
|
|
21
21
|
* la propriété library de sonic-icon correspond à une clef de librairies.
|
|
22
22
|
*/
|
|
23
23
|
const libraries = {
|
|
24
|
-
heroicons:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
heroicons: {
|
|
25
|
+
url: "https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",
|
|
26
|
+
defaultPrefix: "outline",
|
|
27
|
+
},
|
|
28
|
+
iconoir: {
|
|
29
|
+
url: "https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg",
|
|
30
|
+
},
|
|
31
|
+
feathers: {
|
|
32
|
+
url: "https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg",
|
|
33
|
+
},
|
|
34
|
+
material: {
|
|
35
|
+
url: "https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",
|
|
36
|
+
defaultPrefix: "regular",
|
|
37
|
+
},
|
|
38
|
+
fontAwesome: {
|
|
39
|
+
url: "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",
|
|
40
|
+
defaultPrefix: "regular",
|
|
41
|
+
},
|
|
29
42
|
};
|
|
43
|
+
let hasEnabledCustomLibrary = false;
|
|
44
|
+
function enableCustomLibrary() {
|
|
45
|
+
var _b, _c;
|
|
46
|
+
if (hasEnabledCustomLibrary)
|
|
47
|
+
return;
|
|
48
|
+
hasEnabledCustomLibrary = true;
|
|
49
|
+
libraries.custom = {};
|
|
50
|
+
libraries.custom.url = (_b = document.querySelector("[customIconLibraryPath]")) === null || _b === void 0 ? void 0 : _b.getAttribute("customIconLibraryPath");
|
|
51
|
+
libraries.custom.defaultPrefix = (_c = document.querySelector("[customIconDefaultPrefix]")) === null || _c === void 0 ? void 0 : _c.getAttribute("customIconDefaultPrefix");
|
|
52
|
+
}
|
|
30
53
|
export default class Icons {
|
|
31
54
|
static registerIcons(newIcons) {
|
|
32
55
|
const record = icons;
|
|
@@ -43,29 +66,32 @@ export default class Icons {
|
|
|
43
66
|
_a = Icons;
|
|
44
67
|
Icons.fontAwesomeNext = {
|
|
45
68
|
get: (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
|
-
var _b;
|
|
47
|
-
let prefix = ((_b = params.prefix) === null || _b === void 0 ? void 0 : _b.replace("far", "regular").replace("fas", "solid")) || "regular";
|
|
48
69
|
let library = params.library;
|
|
49
70
|
let name = params.name || "";
|
|
50
71
|
const iconsAsRecord = icons;
|
|
51
72
|
/**
|
|
52
73
|
* SVGS en ligne
|
|
53
74
|
*/
|
|
75
|
+
if (library == "custom") {
|
|
76
|
+
enableCustomLibrary();
|
|
77
|
+
}
|
|
54
78
|
if (library && libraries[library]) {
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
79
|
+
let libraryItem = libraries[library];
|
|
80
|
+
let prefix = params.prefix || libraryItem.defaultPrefix;
|
|
81
|
+
let libIcons = iconsAsRecord[library] || {};
|
|
82
|
+
let libIconsKey = prefix + "-" + name;
|
|
83
|
+
// if(!libIcons )libIcons = iconsAsRecord[library] = {};
|
|
58
84
|
/**
|
|
59
85
|
* Si l'icone a déjà été chargée on ne la recharge pas
|
|
60
86
|
*/
|
|
61
|
-
if (libIcons[
|
|
62
|
-
return unsafeHTML(libIcons[
|
|
63
|
-
let url =
|
|
87
|
+
if (libIcons[libIconsKey])
|
|
88
|
+
return unsafeHTML(libIcons[libIconsKey]);
|
|
89
|
+
let url = libraryItem.url.replace("$prefix", prefix).replace("$name", name);
|
|
64
90
|
/**
|
|
65
91
|
* on utilise une promise mutualisée pour ne pas faire plusieurs appels concurents d'une même icone
|
|
66
92
|
*/
|
|
67
|
-
if (libIcons[
|
|
68
|
-
return unsafeHTML(libIcons[
|
|
93
|
+
if (libIcons[libIconsKey])
|
|
94
|
+
return unsafeHTML(libIcons[libIconsKey]);
|
|
69
95
|
if (!loadingGetPromises.has(url)) {
|
|
70
96
|
let promise = new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
97
|
let result = yield fetch(url);
|
|
@@ -84,13 +110,13 @@ Icons.fontAwesomeNext = {
|
|
|
84
110
|
*/
|
|
85
111
|
let result = yield loadingGetPromises.get(url);
|
|
86
112
|
loadingGetPromises.delete(url);
|
|
87
|
-
libIcons[
|
|
113
|
+
libIcons[libIconsKey] = result;
|
|
88
114
|
return unsafeHTML(result);
|
|
89
115
|
}
|
|
90
116
|
/**
|
|
91
117
|
* svgs "locaux"
|
|
92
118
|
*/
|
|
93
|
-
return unsafeHTML(iconsAsRecord[
|
|
119
|
+
return unsafeHTML(iconsAsRecord["core"][params.name] || "");
|
|
94
120
|
}),
|
|
95
121
|
};
|
|
96
122
|
Icons.default = Icons.fontAwesomeNext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{
|
|
1
|
+
{}
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { styleMap } from "lit/directives/style-map.js";
|
|
10
|
+
const tagName = "sonic-image";
|
|
10
11
|
let Image = class Image extends LitElement {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
@@ -142,11 +143,11 @@ __decorate([
|
|
|
142
143
|
property({ type: Boolean, reflect: true })
|
|
143
144
|
], Image.prototype, "cover", void 0);
|
|
144
145
|
Image = __decorate([
|
|
145
|
-
customElement(
|
|
146
|
+
customElement(tagName)
|
|
146
147
|
], Image);
|
|
147
148
|
export { Image };
|
|
148
149
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
149
150
|
try {
|
|
150
|
-
customElements.define(
|
|
151
|
+
customElements.define(tagName, Image);
|
|
151
152
|
}
|
|
152
153
|
catch (e) { }
|
|
@@ -9,6 +9,7 @@ import { html, LitElement, css } from "lit";
|
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
11
|
import Electron from "@supersoniks/concorde/core/utils/Electron";
|
|
12
|
+
const tagName = "sonic-link";
|
|
12
13
|
let Link = class Link extends LitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -89,6 +90,10 @@ __decorate([
|
|
|
89
90
|
property({ type: Boolean })
|
|
90
91
|
], Link.prototype, "pushState", void 0);
|
|
91
92
|
Link = __decorate([
|
|
92
|
-
customElement(
|
|
93
|
+
customElement(tagName)
|
|
93
94
|
], Link);
|
|
94
95
|
export { Link };
|
|
96
|
+
try {
|
|
97
|
+
customElements.define(tagName, Link);
|
|
98
|
+
}
|
|
99
|
+
catch (e) { }
|
|
@@ -9,6 +9,7 @@ import { html, LitElement, css } from "lit";
|
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import { inline } from "./styles/inline";
|
|
11
11
|
import { fixed } from "./styles/fixed";
|
|
12
|
+
const tagName = "sonic-loader";
|
|
12
13
|
let Loader = Loader_1 = class Loader extends LitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -84,11 +85,11 @@ __decorate([
|
|
|
84
85
|
property({ type: String })
|
|
85
86
|
], Loader.prototype, "mode", void 0);
|
|
86
87
|
Loader = Loader_1 = __decorate([
|
|
87
|
-
customElement(
|
|
88
|
+
customElement(tagName)
|
|
88
89
|
], Loader);
|
|
89
90
|
export { Loader };
|
|
90
91
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
91
92
|
try {
|
|
92
|
-
customElements.define(
|
|
93
|
+
customElements.define(tagName, Loader);
|
|
93
94
|
}
|
|
94
95
|
catch (e) { }
|
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from "lit/decorators.js";
|
|
8
8
|
import { Button } from "../button/button";
|
|
9
|
+
const tagName = "sonic-menu-item";
|
|
9
10
|
let MenuItem = class MenuItem extends Button {
|
|
10
11
|
constructor() {
|
|
11
12
|
super();
|
|
@@ -20,18 +21,18 @@ let MenuItem = class MenuItem extends Button {
|
|
|
20
21
|
if (!this.hasAttribute('shape')) {
|
|
21
22
|
this.shape = "block";
|
|
22
23
|
}
|
|
23
|
-
if (!this.hasAttribute('
|
|
24
|
-
this.
|
|
24
|
+
if (!this.hasAttribute('align')) {
|
|
25
|
+
this.align = "left";
|
|
25
26
|
}
|
|
26
27
|
super.connectedCallback();
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
MenuItem = __decorate([
|
|
30
|
-
customElement(
|
|
31
|
+
customElement(tagName)
|
|
31
32
|
], MenuItem);
|
|
32
33
|
export { MenuItem };
|
|
33
34
|
//Ajout pour Storybook
|
|
34
35
|
try {
|
|
35
|
-
customElements.define(
|
|
36
|
+
customElements.define(tagName, MenuItem);
|
|
36
37
|
}
|
|
37
38
|
catch (e) { }
|
|
@@ -11,11 +11,12 @@ export declare class MenuItems extends LitElement {
|
|
|
11
11
|
* Direction
|
|
12
12
|
*/
|
|
13
13
|
direction: "row" | "column";
|
|
14
|
+
gap: string;
|
|
14
15
|
align: "center" | "left" | "right";
|
|
15
16
|
/**
|
|
16
17
|
* Ombre
|
|
17
18
|
*/
|
|
18
|
-
shadow: "" | "
|
|
19
|
+
shadow: "" | "sm" | "md" | 'lg' | "xl" | "none" | null;
|
|
19
20
|
moreShape: "square" | "circle";
|
|
20
21
|
/**
|
|
21
22
|
* Propriété min-width du bouton
|
|
@@ -8,6 +8,7 @@ import { html, LitElement, css } from "lit";
|
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
9
|
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
10
10
|
import "./menu-item";
|
|
11
|
+
const tagName = "sonic-menu";
|
|
11
12
|
let MenuItems = class MenuItems extends LitElement {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -20,11 +21,12 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
20
21
|
* Direction
|
|
21
22
|
*/
|
|
22
23
|
this.direction = "column";
|
|
24
|
+
this.gap = "var(--sc-menu-gap)";
|
|
23
25
|
this.align = "left";
|
|
24
26
|
/**
|
|
25
27
|
* Ombre
|
|
26
28
|
*/
|
|
27
|
-
this.shadow =
|
|
29
|
+
this.shadow = null;
|
|
28
30
|
this.moreShape = "circle";
|
|
29
31
|
/**
|
|
30
32
|
* Propriété min-width du bouton
|
|
@@ -58,7 +60,7 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
58
60
|
elt.setAttribute("size", this.size);
|
|
59
61
|
}
|
|
60
62
|
if (this.align) {
|
|
61
|
-
elt.setAttribute("
|
|
63
|
+
elt.setAttribute("align", this.align);
|
|
62
64
|
}
|
|
63
65
|
if (this.direction == "row") {
|
|
64
66
|
if (elt.getAttribute('shape') == "block") {
|
|
@@ -71,6 +73,7 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
71
73
|
const menuStyles = {
|
|
72
74
|
minWidth: this.minWidth,
|
|
73
75
|
flexDirection: this.direction,
|
|
76
|
+
gap: this.gap
|
|
74
77
|
};
|
|
75
78
|
const isMenuRow = this.direction == "row";
|
|
76
79
|
const popStyles = {
|
|
@@ -85,8 +88,8 @@ let MenuItems = class MenuItems extends LitElement {
|
|
|
85
88
|
return html `<menu part="menu" class="shadowable" style=${styleMap(menuStyles)}>
|
|
86
89
|
<slot @slotchange=${this.mainSlotChange}></slot>
|
|
87
90
|
<sonic-pop style=${styleMap(popStyles)} class=${!this.hasMoreElements ? 'hidden' : ''}>
|
|
88
|
-
<sonic-menu-item style=${styleMap(popBtnStyles)} class="more-btn" shape=${this.moreShape}
|
|
89
|
-
<sonic-icon
|
|
91
|
+
<sonic-menu-item style=${styleMap(popBtnStyles)} class="more-btn" shape=${this.moreShape} align="center" >
|
|
92
|
+
<sonic-icon size="xl" name=${isMenuRow ? "more-vert" : "more-horiz"} ></sonic-icon>
|
|
90
93
|
</sonic-menu-item>
|
|
91
94
|
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
92
95
|
</sonic-pop>
|
|
@@ -97,6 +100,7 @@ MenuItems.styles = [
|
|
|
97
100
|
css `
|
|
98
101
|
:host {
|
|
99
102
|
display: block;
|
|
103
|
+
--sc-menu-gap:.15rem;
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
:host > menu {
|
|
@@ -104,7 +108,6 @@ MenuItems.styles = [
|
|
|
104
108
|
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
105
109
|
margin: 0;
|
|
106
110
|
padding: 0.35em;
|
|
107
|
-
gap: 0.15rem;
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
.hidden {
|
|
@@ -113,23 +116,22 @@ MenuItems.styles = [
|
|
|
113
116
|
|
|
114
117
|
/*OMBRE*/
|
|
115
118
|
:host([shadow]) .shadowable,
|
|
116
|
-
:host([shadow="md"])
|
|
117
|
-
:host([shadow="true"])
|
|
119
|
+
:host([shadow="md"]) .shadowable,
|
|
120
|
+
:host([shadow="true"]) .shadowable {
|
|
118
121
|
box-shadow: var(--sc-shadow);
|
|
119
122
|
}
|
|
120
123
|
|
|
121
|
-
:host([shadow="sm"])
|
|
124
|
+
:host([shadow="sm"]) .shadowable {
|
|
122
125
|
box-shadow: var(--sc-shadow-sm);
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
:host([shadow="lg"])
|
|
128
|
+
:host([shadow="lg"]) .shadowable {
|
|
126
129
|
box-shadow: var(--sc-shadow-lg);
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
:host([shadow="none"])
|
|
132
|
+
:host([shadow="none"]) .shadowable {
|
|
130
133
|
box-shadow: none;
|
|
131
134
|
}
|
|
132
|
-
|
|
133
135
|
|
|
134
136
|
`,
|
|
135
137
|
];
|
|
@@ -139,6 +141,9 @@ __decorate([
|
|
|
139
141
|
__decorate([
|
|
140
142
|
property({ type: String, reflect: true })
|
|
141
143
|
], MenuItems.prototype, "direction", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: String })
|
|
146
|
+
], MenuItems.prototype, "gap", void 0);
|
|
142
147
|
__decorate([
|
|
143
148
|
property({ type: String, reflect: true })
|
|
144
149
|
], MenuItems.prototype, "align", void 0);
|
|
@@ -161,11 +166,11 @@ __decorate([
|
|
|
161
166
|
state()
|
|
162
167
|
], MenuItems.prototype, "hasMoreElements", void 0);
|
|
163
168
|
MenuItems = __decorate([
|
|
164
|
-
customElement(
|
|
169
|
+
customElement(tagName)
|
|
165
170
|
], MenuItems);
|
|
166
171
|
export { MenuItems };
|
|
167
172
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
168
173
|
try {
|
|
169
|
-
customElements.define(
|
|
174
|
+
customElements.define(tagName, MenuItems);
|
|
170
175
|
}
|
|
171
176
|
catch (e) { }
|
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, queryAssignedElements } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-modal-actions";
|
|
9
10
|
let ModalActions = class ModalActions extends LitElement {
|
|
10
11
|
firstUpdated() {
|
|
11
12
|
var _a;
|
|
@@ -36,11 +37,11 @@ __decorate([
|
|
|
36
37
|
queryAssignedElements({ selector: "sonic-button" })
|
|
37
38
|
], ModalActions.prototype, "buttons", void 0);
|
|
38
39
|
ModalActions = __decorate([
|
|
39
|
-
customElement(
|
|
40
|
+
customElement(tagName)
|
|
40
41
|
], ModalActions);
|
|
41
42
|
export { ModalActions };
|
|
42
43
|
//Ajout pour Storybook
|
|
43
44
|
try {
|
|
44
|
-
customElements.define(
|
|
45
|
+
customElements.define(tagName, ModalActions);
|
|
45
46
|
}
|
|
46
47
|
catch (e) { }
|
|
@@ -6,10 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-modal-close";
|
|
9
10
|
let ModalClose = class ModalClose extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `<sonic-button shape="circle" variant="ghost" @click=${this.handleClick}
|
|
12
|
-
><sonic-icon
|
|
13
|
+
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
13
14
|
></sonic-button>`;
|
|
14
15
|
}
|
|
15
16
|
handleClick() {
|
|
@@ -28,11 +29,11 @@ ModalClose.styles = [
|
|
|
28
29
|
`,
|
|
29
30
|
];
|
|
30
31
|
ModalClose = __decorate([
|
|
31
|
-
customElement(
|
|
32
|
+
customElement(tagName)
|
|
32
33
|
], ModalClose);
|
|
33
34
|
export { ModalClose };
|
|
34
35
|
//Ajout pour Storybook
|
|
35
36
|
try {
|
|
36
|
-
customElements.define(
|
|
37
|
+
customElements.define(tagName, ModalClose);
|
|
37
38
|
}
|
|
38
39
|
catch (e) { }
|
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-modal-content";
|
|
9
10
|
let ModalContent = class ModalContent extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `<slot></slot>`;
|
|
@@ -19,11 +20,11 @@ ModalContent.styles = [
|
|
|
19
20
|
`,
|
|
20
21
|
];
|
|
21
22
|
ModalContent = __decorate([
|
|
22
|
-
customElement(
|
|
23
|
+
customElement(tagName)
|
|
23
24
|
], ModalContent);
|
|
24
25
|
export { ModalContent };
|
|
25
26
|
//Ajout pour Storybook
|
|
26
27
|
try {
|
|
27
|
-
customElements.define(
|
|
28
|
+
customElements.define(tagName, ModalContent);
|
|
28
29
|
}
|
|
29
30
|
catch (e) { }
|
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-modal-subtitle";
|
|
9
10
|
let ModalSubTitle = class ModalSubTitle extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `<slot></slot>`;
|
|
@@ -23,11 +24,11 @@ ModalSubTitle.styles = [
|
|
|
23
24
|
`,
|
|
24
25
|
];
|
|
25
26
|
ModalSubTitle = __decorate([
|
|
26
|
-
customElement(
|
|
27
|
+
customElement(tagName)
|
|
27
28
|
], ModalSubTitle);
|
|
28
29
|
export { ModalSubTitle };
|
|
29
30
|
//Ajout pour Storybook
|
|
30
31
|
try {
|
|
31
|
-
customElements.define(
|
|
32
|
+
customElements.define(tagName, ModalSubTitle);
|
|
32
33
|
}
|
|
33
34
|
catch (e) { }
|
|
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-modal-title";
|
|
9
10
|
let ModalTitle = class ModalTitle extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `<slot></slot>`;
|
|
@@ -23,11 +24,11 @@ ModalTitle.styles = [
|
|
|
23
24
|
`,
|
|
24
25
|
];
|
|
25
26
|
ModalTitle = __decorate([
|
|
26
|
-
customElement(
|
|
27
|
+
customElement(tagName)
|
|
27
28
|
], ModalTitle);
|
|
28
29
|
export { ModalTitle };
|
|
29
30
|
//Ajout pour Storybook
|
|
30
31
|
try {
|
|
31
|
-
customElements.define(
|
|
32
|
+
customElements.define(tagName, ModalTitle);
|
|
32
33
|
}
|
|
33
34
|
catch (e) { }
|
|
@@ -14,6 +14,7 @@ import "./modal-title";
|
|
|
14
14
|
import "./modal-subtitle";
|
|
15
15
|
import "./modal-content";
|
|
16
16
|
import "./modal-close";
|
|
17
|
+
const tagName = "sonic-modal";
|
|
17
18
|
let Modal = class Modal extends Subscriber(LitElement) {
|
|
18
19
|
constructor() {
|
|
19
20
|
super(...arguments);
|
|
@@ -29,7 +30,7 @@ let Modal = class Modal extends Subscriber(LitElement) {
|
|
|
29
30
|
this.visible = false;
|
|
30
31
|
}
|
|
31
32
|
static create(options) {
|
|
32
|
-
const modal = document.createElement(
|
|
33
|
+
const modal = document.createElement(tagName);
|
|
33
34
|
modal.innerHTML =
|
|
34
35
|
`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${options.content}</sonic-modal-content>` || "";
|
|
35
36
|
let container = document.querySelector("sonic-theme") || document.body;
|
|
@@ -126,7 +127,7 @@ let Modal = class Modal extends Subscriber(LitElement) {
|
|
|
126
127
|
}
|
|
127
128
|
handleEscape(e) {
|
|
128
129
|
if (e.key === "Escape") {
|
|
129
|
-
const modals = [...document.querySelectorAll(
|
|
130
|
+
const modals = [...document.querySelectorAll(tagName)];
|
|
130
131
|
modals.forEach((item) => {
|
|
131
132
|
if (this.hideOnEscape == true) {
|
|
132
133
|
item.hide();
|
|
@@ -312,7 +313,7 @@ __decorate([
|
|
|
312
313
|
queryAssignedElements({ selector: "sonic-modal-close" })
|
|
313
314
|
], Modal.prototype, "closeBtn", void 0);
|
|
314
315
|
Modal = __decorate([
|
|
315
|
-
customElement(
|
|
316
|
+
customElement(tagName)
|
|
316
317
|
], Modal);
|
|
317
318
|
export { Modal };
|
|
318
319
|
if (typeof window !== "undefined") {
|
|
@@ -320,6 +321,6 @@ if (typeof window !== "undefined") {
|
|
|
320
321
|
win.SonicModal = Modal;
|
|
321
322
|
}
|
|
322
323
|
try {
|
|
323
|
-
customElements.define(
|
|
324
|
+
customElements.define(tagName, Modal);
|
|
324
325
|
}
|
|
325
326
|
catch (e) { }
|
|
@@ -8,6 +8,7 @@ var Pop_1;
|
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, query, state, property } from "lit/decorators.js";
|
|
10
10
|
import HTML from "@supersoniks/concorde/core/utils/HTML";
|
|
11
|
+
const tagName = "sonic-pop";
|
|
11
12
|
let Pop = Pop_1 = class Pop extends LitElement {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -216,11 +217,11 @@ __decorate([
|
|
|
216
217
|
property({ type: String })
|
|
217
218
|
], Pop.prototype, "placement", void 0);
|
|
218
219
|
Pop = Pop_1 = __decorate([
|
|
219
|
-
customElement(
|
|
220
|
+
customElement(tagName)
|
|
220
221
|
], Pop);
|
|
221
222
|
export { Pop };
|
|
222
223
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
223
224
|
try {
|
|
224
|
-
customElements.define(
|
|
225
|
+
customElements.define(tagName, Pop);
|
|
225
226
|
}
|
|
226
227
|
catch (e) { }
|