@supersoniks/concorde 1.0.5 → 1.0.8
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 +16 -8
- package/cli.js +69 -0
- package/core/components/functional/date/date.d.ts +34 -0
- package/core/components/functional/date/date.js +187 -0
- package/core/components/functional/example/example.d.ts +7 -0
- package/core/components/functional/example/example.js +25 -0
- package/core/components/functional/fetch/fetch.d.ts +49 -0
- package/core/components/functional/fetch/fetch.js +38 -0
- package/core/components/functional/functional.d.ts +11 -0
- package/core/components/functional/functional.js +11 -0
- package/core/components/functional/if/if.d.ts +12 -0
- package/core/components/functional/if/if.js +43 -0
- package/core/components/functional/list/list.d.ts +67 -0
- package/core/components/functional/list/list.js +132 -0
- package/core/components/functional/queue/queue.d.ts +42 -0
- package/core/components/functional/queue/queue.js +184 -0
- package/core/components/functional/router/redirect.d.ts +18 -0
- package/core/components/functional/router/redirect.js +57 -0
- package/core/components/functional/router/router.d.ts +26 -0
- package/core/components/functional/router/router.js +104 -0
- package/core/components/functional/states/states.d.ts +28 -0
- package/core/components/functional/states/states.js +139 -0
- package/core/components/functional/submit/submit.d.ts +24 -0
- package/core/components/functional/submit/submit.js +108 -0
- package/{types/core/components → core/components/functional/subscriber}/subscriber.d.ts +5 -1
- package/core/components/functional/subscriber/subscriber.js +30 -0
- package/core/components/ui/alert/alert.d.ts +20 -0
- package/core/components/ui/alert/alert.js +150 -0
- package/core/components/ui/badge/badge.d.ts +24 -0
- package/core/components/ui/badge/badge.js +177 -0
- package/core/components/ui/button/button.d.ts +125 -0
- package/core/components/ui/button/button.js +558 -0
- package/core/components/ui/divider/divider.d.ts +11 -0
- package/core/components/ui/divider/divider.js +144 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +120 -0
- package/core/components/ui/form/checkbox/checkbox.js +203 -0
- package/core/components/ui/form/css/form-control.d.ts +1 -0
- package/core/components/ui/form/css/form-control.js +219 -0
- package/core/components/ui/form/fieldset/fieldset.d.ts +15 -0
- package/core/components/ui/form/fieldset/fieldset.js +70 -0
- package/core/components/ui/form/fieldset/legend.d.ts +11 -0
- package/core/components/ui/form/fieldset/legend.js +92 -0
- package/core/components/ui/form/form-layout/form-actions.d.ts +6 -0
- package/core/components/ui/form/form-layout/form-actions.js +23 -0
- package/core/components/ui/form/form-layout/form-layout.d.ts +9 -0
- package/core/components/ui/form/form-layout/form-layout.js +58 -0
- package/core/components/ui/form/input/input.d.ts +84 -0
- package/core/components/ui/form/input/input.js +180 -0
- package/core/components/ui/form/radio/radio.d.ts +12 -0
- package/core/components/ui/form/radio/radio.js +55 -0
- package/core/components/ui/form/select/select.d.ts +39 -0
- package/core/components/ui/form/select/select.js +220 -0
- package/core/components/ui/form/textarea/textarea.d.ts +69 -0
- package/core/components/ui/form/textarea/textarea.js +150 -0
- package/core/components/ui/group/group.d.ts +6 -0
- package/core/components/ui/group/group.js +57 -0
- package/core/components/ui/icon/icon.d.ts +17 -0
- package/core/components/ui/icon/icon.js +93 -0
- package/core/components/ui/icon/icons.d.ts +13 -0
- package/core/components/ui/icon/icons.js +25 -0
- package/core/components/ui/icon/icons.json +1 -0
- package/core/components/ui/image/image.d.ts +14 -0
- package/core/components/ui/image/image.js +152 -0
- package/core/components/ui/link/link.d.ts +16 -0
- package/core/components/ui/link/link.js +70 -0
- package/core/components/ui/loader/loader.d.ts +20 -0
- package/core/components/ui/loader/loader.js +94 -0
- package/{types → core}/components/ui/loader/styles/fixed.d.ts +0 -0
- package/core/components/ui/loader/styles/fixed.js +57 -0
- package/{types → core}/components/ui/loader/styles/inline.d.ts +0 -0
- package/core/components/ui/loader/styles/inline.js +71 -0
- package/core/components/ui/menu/menu-item.d.ts +5 -0
- package/core/components/ui/menu/menu-item.js +37 -0
- package/core/components/ui/menu/menu.d.ts +26 -0
- package/core/components/ui/menu/menu.js +125 -0
- package/core/components/ui/modal/modal-actions.d.ts +7 -0
- package/core/components/ui/modal/modal-actions.js +46 -0
- package/core/components/ui/modal/modal-close.d.ts +6 -0
- package/core/components/ui/modal/modal-close.js +38 -0
- package/core/components/ui/modal/modal-content.d.ts +5 -0
- package/core/components/ui/modal/modal-content.js +29 -0
- package/core/components/ui/modal/modal-subtitle.d.ts +5 -0
- package/core/components/ui/modal/modal-subtitle.js +33 -0
- package/core/components/ui/modal/modal-title.d.ts +5 -0
- package/core/components/ui/modal/modal-title.js +33 -0
- package/core/components/ui/modal/modal.d.ts +36 -0
- package/core/components/ui/modal/modal.js +325 -0
- package/core/components/ui/pop/pop.d.ts +28 -0
- package/core/components/ui/pop/pop.js +223 -0
- package/core/components/ui/tabs/tab.d.ts +6 -0
- package/core/components/ui/tabs/tab.js +46 -0
- package/core/components/ui/tabs/tabs.d.ts +14 -0
- package/core/components/ui/tabs/tabs.js +127 -0
- package/core/components/ui/taxonomy/taxonomy.d.ts +41 -0
- package/core/components/ui/taxonomy/taxonomy.js +113 -0
- package/core/components/ui/theme/css/tailwind.css +3 -0
- package/core/components/ui/theme/css/tailwind.d.ts +2 -0
- package/core/components/ui/theme/theme-collection/core-variables.d.ts +1 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +50 -0
- package/{types/components → core/components/ui}/theme/theme-collection/dark.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/dark.js +41 -0
- package/{types/components → core/components/ui}/theme/theme-collection/light.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/light.js +35 -0
- package/core/components/ui/theme/theme.d.ts +11 -0
- package/core/components/ui/theme/theme.js +105 -0
- package/core/components/ui/toast/message-subscriber.d.ts +17 -0
- package/core/components/ui/toast/message-subscriber.js +85 -0
- package/{types → core}/components/ui/toast/toast.d.ts +10 -8
- package/core/components/ui/toast/toast.js +260 -0
- package/core/components/ui/tooltip/tooltip.d.ts +7 -0
- package/core/components/ui/tooltip/tooltip.js +68 -0
- package/core/components/ui/ui.d.ts +27 -0
- package/core/components/ui/ui.js +34 -0
- package/core/core.d.ts +3 -0
- package/core/core.js +7 -0
- package/core/mixins/Fetcher.d.ts +69 -0
- package/core/mixins/Fetcher.js +147 -0
- package/core/mixins/FormCheckable.d.ts +72 -0
- package/core/mixins/FormCheckable.js +144 -0
- package/core/mixins/FormElement.d.ts +21 -0
- package/core/mixins/FormElement.js +229 -0
- package/core/mixins/FormInput.d.ts +49 -0
- package/core/mixins/FormInput.js +33 -0
- package/core/mixins/Subscriber.d.ts +30 -0
- package/core/mixins/Subscriber.js +379 -0
- package/core/mixins/TemplatesContainer.d.ts +12 -0
- package/core/mixins/TemplatesContainer.js +60 -0
- package/core/mixins/mixins.d.ts +6 -0
- package/core/mixins/mixins.js +6 -0
- package/core/utils/Arrays.d.ts +97 -0
- package/core/utils/Arrays.js +136 -0
- package/core/utils/DataBindObserver.d.ts +74 -0
- package/core/utils/DataBindObserver.js +252 -0
- package/core/utils/Format.d.ts +11 -0
- package/core/utils/Format.js +22 -0
- package/core/utils/HTML.d.ts +13 -0
- package/core/utils/HTML.js +26 -0
- package/core/utils/LocationHandler.d.ts +44 -0
- package/core/utils/LocationHandler.js +96 -0
- package/core/utils/Objects.d.ts +23 -0
- package/core/utils/Objects.js +63 -0
- package/core/utils/PublisherProxy.d.mts +110 -0
- package/core/utils/PublisherProxy.mjs +365 -0
- package/core/utils/api.d.ts +66 -0
- package/core/utils/api.js +145 -0
- package/package.json +179 -21
- package/LICENSE +0 -43
- package/dist/concorde.bundle.js +0 -3620
- package/types/components/event/event-card/event-card.d.ts +0 -10
- package/types/components/event/event-title/event-title.d.ts +0 -7
- package/types/components/event/event.d.ts +0 -8
- package/types/components/giftcards/giftcard/giftcard.d.ts +0 -15
- package/types/components/illustration/illustration.d.ts +0 -16
- package/types/components/product/prices-form/price-button/price-button.d.ts +0 -25
- package/types/components/product/prices-form/prices-form.d.ts +0 -23
- package/types/components/theme/theme-collection/bootstrap5.d.ts +0 -1
- package/types/components/theme/theme-collection/dracula.d.ts +0 -1
- package/types/components/theme/theme.d.ts +0 -8
- package/types/components/ui/button/button.d.ts +0 -13
- package/types/components/ui/loader/loader.d.ts +0 -15
- package/types/components/ui/modal/modal.d.ts +0 -17
- package/types/components/ui/tooltip/tooltip.d.ts +0 -9
- package/types/core/components/fetch.d.ts +0 -6
- package/types/core/components/list.d.ts +0 -9
- package/types/core/components/queue.d.ts +0 -15
- package/types/core/components/taxonomy.d.ts +0 -13
- package/types/core/components/text-formatted.d.ts +0 -15
- package/types/core/components/text.d.ts +0 -9
- package/types/core/core.d.ts +0 -7
- package/types/core/mixins/Fetcher.d.ts +0 -9
- package/types/core/mixins/Subscriber.d.ts +0 -13
- package/types/core/utils/api.d.ts +0 -16
- package/types/index.d.ts +0 -12
- package/types/styles/button/button.d.ts +0 -1
- package/types/styles/prose/prose.d.ts +0 -2
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
9
|
+
import { customElement, property, queryAssignedElements, queryAssignedNodes } from "lit/decorators.js";
|
|
10
|
+
let MenuItems = class MenuItems extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* Taille du composant, peut avoir un effet sur ses composants enfants
|
|
15
|
+
* tels que les dividers / boutons,... qui n'auraient pas d'attribut size précisés.
|
|
16
|
+
*/
|
|
17
|
+
this.size = "";
|
|
18
|
+
/**
|
|
19
|
+
* Direction // todo
|
|
20
|
+
*/
|
|
21
|
+
this.direction = "column";
|
|
22
|
+
/**
|
|
23
|
+
* Ombre
|
|
24
|
+
*/
|
|
25
|
+
this.shadow = "none";
|
|
26
|
+
/**
|
|
27
|
+
* Propriété min-width du bouton
|
|
28
|
+
*/
|
|
29
|
+
this.minWidth = "0";
|
|
30
|
+
}
|
|
31
|
+
// connectedCallback(): void {
|
|
32
|
+
// super.connectedCallback();
|
|
33
|
+
// }
|
|
34
|
+
updated(_changedProperties) {
|
|
35
|
+
super.updated(_changedProperties);
|
|
36
|
+
this._setChildrenSize();
|
|
37
|
+
}
|
|
38
|
+
_setChildrenSize() {
|
|
39
|
+
if (this.size) {
|
|
40
|
+
const children = this.querySelectorAll("sonic-button, sonic-menu-item");
|
|
41
|
+
children.forEach((elt) => {
|
|
42
|
+
if (!elt.hasAttribute("size")) {
|
|
43
|
+
elt.setAttribute("size", this.size);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const children = this.querySelectorAll("sonic-divider");
|
|
48
|
+
children.forEach((elt) => {
|
|
49
|
+
if (!elt.hasAttribute("size")) {
|
|
50
|
+
elt.setAttribute("size", "xs");
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
// const isSmall = ["sm", "xs"].some((value) => {
|
|
54
|
+
// return value === this.size;
|
|
55
|
+
// });
|
|
56
|
+
// console.log(isSmall);
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
const menuStyles = {
|
|
60
|
+
minWidth: this.minWidth,
|
|
61
|
+
};
|
|
62
|
+
return html `<menu part="menu" style=${styleMap(menuStyles)}> <slot></slot></menu>`;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
MenuItems.styles = [
|
|
66
|
+
css `
|
|
67
|
+
:host {
|
|
68
|
+
display: block;
|
|
69
|
+
}
|
|
70
|
+
:host > menu {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
|
|
74
|
+
margin: 0;
|
|
75
|
+
padding: 0.35em;
|
|
76
|
+
gap: 0.15rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*OMBRE*/
|
|
80
|
+
:host([shadow]) > :not(slot),
|
|
81
|
+
:host([shadow="md"]) > :not(slot),
|
|
82
|
+
:host([shadow="true"]) > :not(slot) {
|
|
83
|
+
box-shadow: var(--sc-shadow);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([shadow="sm"]) > :not(slot) {
|
|
87
|
+
box-shadow: var(--sc-shadow-sm);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([shadow="none"]) > :not(slot) {
|
|
91
|
+
box-shadow: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([shadow="lg"]) > :not(slot) {
|
|
95
|
+
box-shadow: var(--sc-shadow-lg);
|
|
96
|
+
}
|
|
97
|
+
`,
|
|
98
|
+
];
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: String, reflect: true })
|
|
101
|
+
], MenuItems.prototype, "size", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ type: String, reflect: true })
|
|
104
|
+
], MenuItems.prototype, "direction", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
property({ type: String, reflect: true })
|
|
107
|
+
], MenuItems.prototype, "shadow", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
property({ type: String })
|
|
110
|
+
], MenuItems.prototype, "minWidth", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
queryAssignedElements({ slot: "main", selector: "*" })
|
|
113
|
+
], MenuItems.prototype, "menuChildren", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
queryAssignedNodes({ slot: "main", flatten: true })
|
|
116
|
+
], MenuItems.prototype, "menuNodes", void 0);
|
|
117
|
+
MenuItems = __decorate([
|
|
118
|
+
customElement("sonic-menu")
|
|
119
|
+
], MenuItems);
|
|
120
|
+
export { MenuItems };
|
|
121
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
122
|
+
try {
|
|
123
|
+
customElements.define("sonic-menu", MenuItems);
|
|
124
|
+
}
|
|
125
|
+
catch (e) { }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement, queryAssignedElements } from "lit/decorators.js";
|
|
9
|
+
let ModalActions = class ModalActions extends LitElement {
|
|
10
|
+
firstUpdated() {
|
|
11
|
+
var _a;
|
|
12
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn) => {
|
|
13
|
+
btn.addEventListener("click", () => {
|
|
14
|
+
if (btn.getAttribute("hideModal") != "false") {
|
|
15
|
+
const parentModal = this.closest("sonic-modal");
|
|
16
|
+
parentModal === null || parentModal === void 0 ? void 0 : parentModal.hide();
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return html `<slot></slot>`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
ModalActions.styles = [
|
|
26
|
+
css `
|
|
27
|
+
:host {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 0.5rem;
|
|
30
|
+
margin-top: auto;
|
|
31
|
+
padding-top: 1rem;
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
];
|
|
35
|
+
__decorate([
|
|
36
|
+
queryAssignedElements({ selector: "sonic-button" })
|
|
37
|
+
], ModalActions.prototype, "buttons", void 0);
|
|
38
|
+
ModalActions = __decorate([
|
|
39
|
+
customElement("sonic-modal-actions")
|
|
40
|
+
], ModalActions);
|
|
41
|
+
export { ModalActions };
|
|
42
|
+
//Ajout pour Storybook
|
|
43
|
+
try {
|
|
44
|
+
customElements.define("sonic-modal-actions", ModalActions);
|
|
45
|
+
}
|
|
46
|
+
catch (e) { }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let ModalClose = class ModalClose extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<sonic-button shape="circle" variant="ghost" @click=${this.handleClick}
|
|
12
|
+
><sonic-icon prefix="iconoir" name="cancel" size="lg"></sonic-icon
|
|
13
|
+
></sonic-button>`;
|
|
14
|
+
}
|
|
15
|
+
handleClick() {
|
|
16
|
+
const parentModal = this.closest("sonic-modal");
|
|
17
|
+
parentModal.hide();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
ModalClose.styles = [
|
|
21
|
+
css `
|
|
22
|
+
:host {
|
|
23
|
+
position: absolute;
|
|
24
|
+
right: 0.6rem;
|
|
25
|
+
top: 0.6rem;
|
|
26
|
+
z-index: 20;
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
];
|
|
30
|
+
ModalClose = __decorate([
|
|
31
|
+
customElement("sonic-modal-close")
|
|
32
|
+
], ModalClose);
|
|
33
|
+
export { ModalClose };
|
|
34
|
+
//Ajout pour Storybook
|
|
35
|
+
try {
|
|
36
|
+
customElements.define("sonic-modal-close", ModalClose);
|
|
37
|
+
}
|
|
38
|
+
catch (e) { }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let ModalContent = class ModalContent extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
ModalContent.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
`,
|
|
20
|
+
];
|
|
21
|
+
ModalContent = __decorate([
|
|
22
|
+
customElement("sonic-modal-content")
|
|
23
|
+
], ModalContent);
|
|
24
|
+
export { ModalContent };
|
|
25
|
+
//Ajout pour Storybook
|
|
26
|
+
try {
|
|
27
|
+
customElements.define("sonic-modal-content", ModalContent);
|
|
28
|
+
}
|
|
29
|
+
catch (e) { }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let ModalSubTitle = class ModalSubTitle extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
ModalSubTitle.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
font-size: 1.1rem;
|
|
18
|
+
display: block;
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
line-height: var(--sc-headings-line-height);
|
|
21
|
+
font-family: var(--sc-headings-font-family);
|
|
22
|
+
}
|
|
23
|
+
`,
|
|
24
|
+
];
|
|
25
|
+
ModalSubTitle = __decorate([
|
|
26
|
+
customElement("sonic-modal-subtitle")
|
|
27
|
+
], ModalSubTitle);
|
|
28
|
+
export { ModalSubTitle };
|
|
29
|
+
//Ajout pour Storybook
|
|
30
|
+
try {
|
|
31
|
+
customElements.define("sonic-modal-subtitle", ModalSubTitle);
|
|
32
|
+
}
|
|
33
|
+
catch (e) { }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
let ModalTitle = class ModalTitle extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
ModalTitle.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
font-size: 1.5rem;
|
|
19
|
+
display: block;
|
|
20
|
+
line-height: var(--sc-headings-line-height);
|
|
21
|
+
font-family: var(--sc-headings-font-family);
|
|
22
|
+
}
|
|
23
|
+
`,
|
|
24
|
+
];
|
|
25
|
+
ModalTitle = __decorate([
|
|
26
|
+
customElement("sonic-modal-title")
|
|
27
|
+
], ModalTitle);
|
|
28
|
+
export { ModalTitle };
|
|
29
|
+
//Ajout pour Storybook
|
|
30
|
+
try {
|
|
31
|
+
customElements.define("sonic-modal-title", ModalTitle);
|
|
32
|
+
}
|
|
33
|
+
catch (e) { }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LitElement, nothing } from "lit";
|
|
2
|
+
import "./modal-actions";
|
|
3
|
+
import "./modal-title";
|
|
4
|
+
import "./modal-subtitle";
|
|
5
|
+
import "./modal-content";
|
|
6
|
+
import "./modal-close";
|
|
7
|
+
declare type ModalCreateOptions = {
|
|
8
|
+
content?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Modal_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
11
|
+
export declare class Modal extends Modal_base {
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
hideOnOverlayClick: boolean;
|
|
14
|
+
hideOnEscape: boolean;
|
|
15
|
+
align: "center" | "right" | "left";
|
|
16
|
+
padding: string;
|
|
17
|
+
maxWidth: string;
|
|
18
|
+
maxHeight: string;
|
|
19
|
+
width: string;
|
|
20
|
+
height: string;
|
|
21
|
+
fullScreen: boolean;
|
|
22
|
+
visible: boolean;
|
|
23
|
+
modalWrapper: HTMLDivElement;
|
|
24
|
+
modalElement: HTMLDivElement;
|
|
25
|
+
closeBtn: Array<HTMLElement>;
|
|
26
|
+
static create(options: ModalCreateOptions): Modal;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
updated(): void;
|
|
29
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
30
|
+
show(): void;
|
|
31
|
+
hide(): void;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
handleEscape(e: KeyboardEvent): void;
|
|
34
|
+
handleFullsceen(): void;
|
|
35
|
+
}
|
|
36
|
+
export {};
|