@supersoniks/concorde 1.1.24 → 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 +3 -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 +0 -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/package.json +3 -3
- package/core/components/ui/form/form-layout/form-actions.d.ts +0 -6
|
@@ -14,6 +14,7 @@ const icon = {
|
|
|
14
14
|
error: "warning-circled-outline",
|
|
15
15
|
info: "info-empty",
|
|
16
16
|
};
|
|
17
|
+
const tagName = "sonic-toast-item";
|
|
17
18
|
let SonicToastItem = class SonicToastItem extends LitElement {
|
|
18
19
|
constructor() {
|
|
19
20
|
super(...arguments);
|
|
@@ -22,6 +23,7 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
22
23
|
this.status = "";
|
|
23
24
|
this.ghost = false;
|
|
24
25
|
this.preserve = false;
|
|
26
|
+
this.maxHeight = '10rem';
|
|
25
27
|
this.visible = true;
|
|
26
28
|
}
|
|
27
29
|
render() {
|
|
@@ -30,22 +32,25 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
30
32
|
}
|
|
31
33
|
return html `<div
|
|
32
34
|
class="sonic-toast ${this.status} ${this.ghost ? "ghost" : ""}"
|
|
33
|
-
|
|
34
35
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</button>
|
|
36
|
+
|
|
37
|
+
<button aria-label="Close" class="sonic-toast-close" @click=${() => this.hide()}>
|
|
38
|
+
<sonic-icon name="cancel" size="lg"></sonic-icon>
|
|
39
|
+
</button>
|
|
40
|
+
<div class="sonic-toast-content custom-scroll" style="max-height: ${this.maxHeight} ;">
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
${this.status &&
|
|
43
|
+
html `<sonic-icon name=${icon[this.status]} class="sonic-toast-icon" size="2xl"></sonic-icon>`}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class="sonic-toast-text">
|
|
47
|
+
${this.title ? html `<div class="sonic-toast-title">${this.title}</div>` : ""}
|
|
48
|
+
${this.text ? unsafeHTML(this.text) : ""}
|
|
49
|
+
<slot></slot>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
${!this.preserve ? this.autoHide() : ""}
|
|
53
|
+
</div>
|
|
49
54
|
</div>`;
|
|
50
55
|
}
|
|
51
56
|
hide() {
|
|
@@ -71,6 +76,7 @@ SonicToastItem.styles = [
|
|
|
71
76
|
:host {
|
|
72
77
|
display: block;
|
|
73
78
|
pointer-events: auto;
|
|
79
|
+
position: relative;
|
|
74
80
|
--sc-toast-status-color: transparent;
|
|
75
81
|
--sc-toast-color: var(--sc-base-content);
|
|
76
82
|
--sc-toast-bg: var(--sc-base);
|
|
@@ -78,13 +84,6 @@ SonicToastItem.styles = [
|
|
|
78
84
|
--sc-toast-shadow: var(--sc-shadow-lg);
|
|
79
85
|
}
|
|
80
86
|
|
|
81
|
-
.sonic-toast-area {
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
width: calc(100% - 2.5rem);
|
|
84
|
-
max-width: 64ch;
|
|
85
|
-
gap: 1rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
87
|
.fixed-area {
|
|
89
88
|
position: fixed;
|
|
90
89
|
bottom: 1.25rem;
|
|
@@ -97,22 +96,27 @@ SonicToastItem.styles = [
|
|
|
97
96
|
.sonic-toast {
|
|
98
97
|
position: relative;
|
|
99
98
|
pointer-events: auto;
|
|
100
|
-
|
|
99
|
+
overflow:hidden;
|
|
100
|
+
line-height: 1.25;
|
|
101
101
|
color: var(--sc-toast-color);
|
|
102
102
|
box-shadow: var(--sc-toast-shadow);
|
|
103
103
|
border-radius: var(--sc-toast-rounded);
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
background: var(--sc-toast-bg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.sonic-toast-content {
|
|
108
|
+
padding: 1em 2rem 1em 1em;
|
|
106
109
|
display: flex;
|
|
107
110
|
gap: 0.5rem;
|
|
108
|
-
max-height: 10rem;
|
|
109
111
|
overflow: auto;
|
|
110
|
-
|
|
112
|
+
position:relative;
|
|
113
|
+
}
|
|
111
114
|
|
|
112
115
|
.sonic-toast-text {
|
|
113
116
|
align-self: center;
|
|
114
117
|
margin-top: auto;
|
|
115
118
|
margin-bottom: auto;
|
|
119
|
+
max-width:70ch;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
::slotted(a),
|
|
@@ -126,6 +130,7 @@ SonicToastItem.styles = [
|
|
|
126
130
|
.sonic-toast-close {
|
|
127
131
|
all: unset;
|
|
128
132
|
position: absolute;
|
|
133
|
+
z-index:4;
|
|
129
134
|
pointer-events: initial;
|
|
130
135
|
right: 0.5em;
|
|
131
136
|
top: 0.5em;
|
|
@@ -186,11 +191,10 @@ SonicToastItem.styles = [
|
|
|
186
191
|
.error,
|
|
187
192
|
.info,
|
|
188
193
|
.warning {
|
|
189
|
-
border-top: 3px solid var(--sc-toast-status-color,
|
|
194
|
+
border-top: 3px solid var(--sc-toast-status-color, currentColor);
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
.sonic-toast:before {
|
|
193
|
-
background-color: var(--sc-toast-status-color);
|
|
194
198
|
content: "";
|
|
195
199
|
display: block;
|
|
196
200
|
position: absolute;
|
|
@@ -201,22 +205,45 @@ SonicToastItem.styles = [
|
|
|
201
205
|
opacity: 0.05;
|
|
202
206
|
pointer-events: none;
|
|
203
207
|
transition: 0.2s;
|
|
204
|
-
border-radius: var(--sc-toast-
|
|
208
|
+
border-radius: var(--sc-toast-rounded);
|
|
209
|
+
background-color: var(--sc-toast-status-color);
|
|
205
210
|
}
|
|
211
|
+
|
|
206
212
|
.sonic-toast:hover:before {
|
|
207
213
|
opacity: 0.025;
|
|
208
214
|
}
|
|
215
|
+
|
|
209
216
|
.info .sonic-toast-icon,
|
|
210
217
|
.error .sonic-toast-icon,
|
|
211
218
|
.success .sonic-toast-icon,
|
|
212
219
|
.warning .sonic-toast-icon {
|
|
213
|
-
color: var(--sc-toast-status-color,
|
|
220
|
+
color: var(--sc-toast-status-color, currentColor);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.sonic-toast-icon {
|
|
224
|
+
position:sticky;
|
|
225
|
+
top:0;
|
|
214
226
|
}
|
|
215
227
|
|
|
216
228
|
.ghost {
|
|
217
229
|
opacity: 0.85;
|
|
218
230
|
pointer-events: none;
|
|
219
231
|
}
|
|
232
|
+
|
|
233
|
+
/*TODO :: mutualiser le scroll */
|
|
234
|
+
.custom-scroll::-webkit-scrollbar {
|
|
235
|
+
width: 0.8rem;
|
|
236
|
+
border: solid 3px transparent;
|
|
237
|
+
border-radius: var(--sc-rounded);
|
|
238
|
+
background:transparent;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.custom-scroll::-webkit-scrollbar-thumb {
|
|
242
|
+
box-shadow: inset 0 0 2rem 2rem var(--sc-base-500);
|
|
243
|
+
border-radius: var(--sc-rounded);
|
|
244
|
+
border: solid 3px transparent;
|
|
245
|
+
}
|
|
246
|
+
|
|
220
247
|
`,
|
|
221
248
|
];
|
|
222
249
|
__decorate([
|
|
@@ -234,10 +261,13 @@ __decorate([
|
|
|
234
261
|
__decorate([
|
|
235
262
|
property({ type: Boolean })
|
|
236
263
|
], SonicToastItem.prototype, "preserve", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
property({ type: String })
|
|
266
|
+
], SonicToastItem.prototype, "maxHeight", void 0);
|
|
237
267
|
__decorate([
|
|
238
268
|
state()
|
|
239
269
|
], SonicToastItem.prototype, "visible", void 0);
|
|
240
270
|
SonicToastItem = __decorate([
|
|
241
|
-
customElement(
|
|
271
|
+
customElement(tagName)
|
|
242
272
|
], SonicToastItem);
|
|
243
273
|
export { SonicToastItem };
|
|
@@ -13,6 +13,7 @@ import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
|
13
13
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
14
14
|
import { styleMap } from "lit/directives/style-map.js";
|
|
15
15
|
import "./toast-item";
|
|
16
|
+
const tagName = "sonic-toast";
|
|
16
17
|
let SonicToast = class SonicToast extends LitElement {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -22,22 +23,22 @@ let SonicToast = class SonicToast extends LitElement {
|
|
|
22
23
|
return this;
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
26
|
+
const isIframe = !(window.parent == window);
|
|
25
27
|
let styles = {
|
|
26
28
|
pointerEvents: "none",
|
|
27
|
-
width: "calc(100% - 2.5rem)",
|
|
28
|
-
maxWidth: "64ch",
|
|
29
29
|
gap: "1rem",
|
|
30
30
|
display: "flex",
|
|
31
|
+
margin: "1rem"
|
|
31
32
|
};
|
|
32
|
-
if (
|
|
33
|
-
styles = Object.assign(Object.assign({}, styles), { position: "fixed", bottom: "1.25rem", right: "1.25rem", zIndex: "999", flexDirection: "column-reverse" });
|
|
33
|
+
if (!isIframe) {
|
|
34
|
+
styles = Object.assign(Object.assign({}, styles), { margin: "0", width: "calc(100% - 2.5rem)", position: "fixed", bottom: "1.25rem", right: "1.25rem", zIndex: "999", maxWidth: "64ch", flexDirection: "column-reverse" });
|
|
34
35
|
}
|
|
35
36
|
// ${window.parent == window ? "fixed-area" : ""}
|
|
36
37
|
if (!this.toasts)
|
|
37
38
|
return nothing;
|
|
38
39
|
return html `<div aria-live="polite" style=${styleMap(styles)}>
|
|
39
40
|
${repeat(this.toasts, (item) => item.id, (item) => html `
|
|
40
|
-
<sonic-toast-item status=${item.status} ?ghost=${item.ghost} ?preserve=${item.preserve} id=${item.id}
|
|
41
|
+
<sonic-toast-item maxHeight=${isIframe ? 'none' : '10rem'} status=${item.status} ?ghost=${item.ghost} ?preserve=${item.preserve} id=${item.id}
|
|
41
42
|
@hide=${() => this.removeItem(item)}
|
|
42
43
|
${animate({
|
|
43
44
|
keyframeOptions: {
|
|
@@ -108,7 +109,7 @@ __decorate([
|
|
|
108
109
|
property({ type: Array })
|
|
109
110
|
], SonicToast.prototype, "toasts", void 0);
|
|
110
111
|
SonicToast = __decorate([
|
|
111
|
-
customElement(
|
|
112
|
+
customElement(tagName)
|
|
112
113
|
], SonicToast);
|
|
113
114
|
export { SonicToast };
|
|
114
115
|
if (typeof window !== "undefined") {
|
|
@@ -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, property } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-tooltip";
|
|
9
10
|
let Tooltip = class Tooltip extends LitElement {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -63,6 +64,11 @@ __decorate([
|
|
|
63
64
|
property({ type: Boolean })
|
|
64
65
|
], Tooltip.prototype, "disabled", void 0);
|
|
65
66
|
Tooltip = __decorate([
|
|
66
|
-
customElement(
|
|
67
|
+
customElement(tagName)
|
|
67
68
|
], Tooltip);
|
|
68
69
|
export { Tooltip };
|
|
70
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
71
|
+
try {
|
|
72
|
+
customElements.define(tagName, Tooltip);
|
|
73
|
+
}
|
|
74
|
+
catch (e) { }
|
|
@@ -11,6 +11,7 @@ import "./form/textarea/textarea";
|
|
|
11
11
|
import "./form/fieldset/fieldset";
|
|
12
12
|
import "./form/fieldset/legend";
|
|
13
13
|
import "./form/form-layout/form-layout";
|
|
14
|
+
import "./form/form-actions/form-actions";
|
|
14
15
|
import "./group/group";
|
|
15
16
|
import "./icon/icon";
|
|
16
17
|
import "./image/image";
|
package/core/components/ui/ui.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersoniks/concorde",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"customElements": "custom-elements.json",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"./ui/form/fieldset/legend-description": "./core/components/ui/form/fieldset/legend-description",
|
|
83
83
|
"./core/components/ui/form/fieldset/legend": "./core/components/ui/form/fieldset/legend",
|
|
84
84
|
"./ui/form/fieldset/legend": "./core/components/ui/form/fieldset/legend",
|
|
85
|
-
"./core/components/ui/form/form-
|
|
86
|
-
"./ui/form/form-
|
|
85
|
+
"./core/components/ui/form/form-actions/form-actions": "./core/components/ui/form/form-actions/form-actions",
|
|
86
|
+
"./ui/form/form-actions": "./core/components/ui/form/form-actions/form-actions",
|
|
87
87
|
"./core/components/ui/form/form-layout/form-layout": "./core/components/ui/form/form-layout/form-layout",
|
|
88
88
|
"./ui/form/form-layout": "./core/components/ui/form/form-layout/form-layout",
|
|
89
89
|
"./core/components/ui/form/input/input": "./core/components/ui/form/input/input",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
declare const FormActions_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
3
|
-
export declare class FormActions extends FormActions_base {
|
|
4
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
5
|
-
}
|
|
6
|
-
export {};
|