@supersoniks/concorde 1.1.24 → 1.1.26
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/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 +3 -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/_css/scroll.d.ts +1 -0
- package/core/components/ui/_css/scroll.js +22 -0
- package/core/components/ui/_css/types.d.ts +2 -0
- package/core/components/ui/_css/types.js +60 -0
- package/core/components/ui/alert/alert.js +12 -12
- package/core/components/ui/badge/badge.js +3 -2
- package/core/components/ui/button/button.d.ts +4 -9
- package/core/components/ui/button/button.js +16 -13
- package/core/components/ui/card/card-footer.d.ts +0 -1
- package/core/components/ui/card/card-footer.js +14 -10
- 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.d.ts +0 -1
- package/core/components/ui/card/card-main.js +14 -10
- 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 +23 -3
- package/core/components/ui/form/css/form-control.js +36 -33
- package/core/components/ui/form/fieldset/fieldset.d.ts +1 -1
- package/core/components/ui/form/fieldset/fieldset.js +5 -7
- package/core/components/ui/form/fieldset/legend.d.ts +5 -4
- package/core/components/ui/form/fieldset/legend.js +24 -20
- 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 +6 -4
- package/core/components/ui/form/textarea/textarea.js +10 -2
- 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 +11 -24
- 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 +11 -2
- package/core/components/ui/table/table-tbody.js +8 -2
- package/core/components/ui/table/table-td.d.ts +4 -2
- package/core/components/ui/table/table-td.js +30 -13
- package/core/components/ui/table/table-tfoot.js +7 -1
- package/core/components/ui/table/table-th.d.ts +4 -1
- package/core/components/ui/table/table-th.js +41 -13
- package/core/components/ui/table/table-thead.js +8 -2
- package/core/components/ui/table/table-tr.js +9 -1
- package/core/components/ui/table/table.d.ts +2 -0
- package/core/components/ui/table/table.js +38 -3
- package/core/components/ui/tabs/tabs.js +3 -4
- package/core/components/ui/taxonomy/taxonomy.js +2 -1
- package/core/components/ui/theme/theme-collection/core-variables.js +12 -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 +51 -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/Fetcher.d.ts +3 -1
- package/core/mixins/Fetcher.js +3 -1
- package/core/mixins/FormElement.js +4 -0
- package/core/utils/api.d.ts +2 -2
- package/core/utils/api.js +7 -7
- package/package.json +7 -3
- package/core/components/ui/form/form-layout/form-actions.d.ts +0 -6
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
export declare class TableTh extends LitElement {
|
|
3
3
|
static styles: import("lit").CSSResult[];
|
|
4
|
-
|
|
4
|
+
colSpan?: number;
|
|
5
|
+
rowSpan?: number;
|
|
6
|
+
align?: string;
|
|
7
|
+
minWidth?: string;
|
|
5
8
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
9
|
}
|
|
@@ -6,38 +6,66 @@ 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
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
9
10
|
import { styleMap } from "lit/directives/style-map.js";
|
|
11
|
+
import { typesColor } from "@supersoniks/concorde/core/components/ui/_css/types";
|
|
12
|
+
const tagName = "sonic-th";
|
|
10
13
|
let TableTh = class TableTh extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.align = "left";
|
|
14
|
-
}
|
|
15
14
|
render() {
|
|
16
15
|
const styles = {
|
|
17
16
|
textAlign: this.align,
|
|
17
|
+
minWidth: this.minWidth,
|
|
18
18
|
};
|
|
19
|
-
return html `<th
|
|
20
|
-
|
|
19
|
+
return html `<th
|
|
20
|
+
part="th"
|
|
21
|
+
style=${styleMap(styles)}
|
|
22
|
+
colspan=${ifDefined(this.colSpan)}
|
|
23
|
+
rowspan=${ifDefined(this.rowSpan)}
|
|
24
|
+
>
|
|
25
|
+
<slot></slot>
|
|
26
|
+
</th> `;
|
|
21
27
|
}
|
|
22
28
|
};
|
|
23
29
|
TableTh.styles = [
|
|
30
|
+
typesColor,
|
|
24
31
|
css `
|
|
25
32
|
:host {
|
|
26
33
|
display: contents;
|
|
27
|
-
--sc-
|
|
34
|
+
background:var(--sc-table-bg);
|
|
35
|
+
position:sticky;
|
|
36
|
+
top:0;
|
|
37
|
+
z-index:20;
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
th {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
all: inherit;
|
|
42
|
+
display: table-cell;
|
|
43
|
+
border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);
|
|
44
|
+
text-transform: var(--sc-table-th-tt);
|
|
45
|
+
font-weight: var(--sc-table-th-fw);
|
|
46
|
+
font-size: var(--sc-table-th-fs);
|
|
47
|
+
padding: var(--sc-table-th-py) var(--sc-table-th-px);
|
|
34
48
|
}
|
|
35
|
-
|
|
49
|
+
`,
|
|
36
50
|
];
|
|
37
51
|
__decorate([
|
|
38
|
-
property({ type:
|
|
52
|
+
property({ type: Number })
|
|
53
|
+
], TableTh.prototype, "colSpan", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: Number })
|
|
56
|
+
], TableTh.prototype, "rowSpan", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
property({ type: String })
|
|
39
59
|
], TableTh.prototype, "align", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
property({ type: String })
|
|
62
|
+
], TableTh.prototype, "minWidth", void 0);
|
|
40
63
|
TableTh = __decorate([
|
|
41
|
-
customElement(
|
|
64
|
+
customElement(tagName)
|
|
42
65
|
], TableTh);
|
|
43
66
|
export { TableTh };
|
|
67
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
68
|
+
try {
|
|
69
|
+
customElements.define(tagName, TableTh);
|
|
70
|
+
}
|
|
71
|
+
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-thead";
|
|
9
10
|
let TableThead = class TableThead extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `<slot></slot>`;
|
|
@@ -14,11 +15,16 @@ let TableThead = class TableThead extends LitElement {
|
|
|
14
15
|
TableThead.styles = [
|
|
15
16
|
css `
|
|
16
17
|
:host {
|
|
17
|
-
display: table-
|
|
18
|
+
display: table-header-group;
|
|
18
19
|
}
|
|
19
20
|
`
|
|
20
21
|
];
|
|
21
22
|
TableThead = __decorate([
|
|
22
|
-
customElement(
|
|
23
|
+
customElement(tagName)
|
|
23
24
|
], TableThead);
|
|
24
25
|
export { TableThead };
|
|
26
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
27
|
+
try {
|
|
28
|
+
customElements.define(tagName, TableThead);
|
|
29
|
+
}
|
|
30
|
+
catch (e) { }
|
|
@@ -6,12 +6,15 @@ 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
|
+
import { typesColor } from "@supersoniks/concorde/core/components/ui/_css/types";
|
|
10
|
+
const tagName = "sonic-tr";
|
|
9
11
|
let TableTr = class TableTr extends LitElement {
|
|
10
12
|
render() {
|
|
11
13
|
return html `<slot></slot>`;
|
|
12
14
|
}
|
|
13
15
|
};
|
|
14
16
|
TableTr.styles = [
|
|
17
|
+
typesColor,
|
|
15
18
|
css `
|
|
16
19
|
:host {
|
|
17
20
|
display: table-row;
|
|
@@ -19,6 +22,11 @@ TableTr.styles = [
|
|
|
19
22
|
`
|
|
20
23
|
];
|
|
21
24
|
TableTr = __decorate([
|
|
22
|
-
customElement(
|
|
25
|
+
customElement(tagName)
|
|
23
26
|
], TableTr);
|
|
24
27
|
export { TableTr };
|
|
28
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
29
|
+
try {
|
|
30
|
+
customElements.define(tagName, TableTr);
|
|
31
|
+
}
|
|
32
|
+
catch (e) { }
|
|
@@ -6,6 +6,8 @@ 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
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
10
|
+
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
9
11
|
import "./table-tr";
|
|
10
12
|
import "./table-th";
|
|
11
13
|
import "./table-td";
|
|
@@ -13,17 +15,23 @@ import "./table-thead";
|
|
|
13
15
|
import "./table-tbody";
|
|
14
16
|
import "./table-tfoot";
|
|
15
17
|
import "./table-caption";
|
|
18
|
+
const tagName = "sonic-table";
|
|
16
19
|
let Table = class Table extends LitElement {
|
|
17
20
|
constructor() {
|
|
18
21
|
super(...arguments);
|
|
19
22
|
this.size = "md";
|
|
20
23
|
this.striped = false;
|
|
21
24
|
this.sticky = false;
|
|
25
|
+
this.bordered = false;
|
|
22
26
|
this.hover = false;
|
|
23
27
|
}
|
|
24
28
|
render() {
|
|
29
|
+
const containerStyles = {
|
|
30
|
+
maxHeight: this.maxHeight,
|
|
31
|
+
};
|
|
25
32
|
return html `
|
|
26
|
-
|
|
33
|
+
|
|
34
|
+
<div class="table-container custom-scroll" style=${styleMap(containerStyles)} >
|
|
27
35
|
<div class="table" ?striped=${this.striped} ?hover=${this.hover} ?sticky=${this.sticky}>
|
|
28
36
|
<slot></slot>
|
|
29
37
|
</div>
|
|
@@ -32,12 +40,24 @@ let Table = class Table extends LitElement {
|
|
|
32
40
|
}
|
|
33
41
|
};
|
|
34
42
|
Table.styles = [
|
|
43
|
+
customScroll,
|
|
35
44
|
css `
|
|
36
45
|
:host {
|
|
37
46
|
--sc-table-fw: var(--sc-font-weight-base);
|
|
38
47
|
--sc-table-fst: var(--sc-font-style-base);
|
|
39
48
|
--sc-table-fs: 1rem;
|
|
49
|
+
--sc-table-border-color: var(--sc-base-200);
|
|
50
|
+
--sc-table-caption-color: var(--sc-base-400);
|
|
51
|
+
--sc-table-bg: var(--sc-base);
|
|
52
|
+
--sc-table-th-fs: .85em;
|
|
40
53
|
--sc-table-th-fw: bold;
|
|
54
|
+
--sc-table-th-tt: uppercase;
|
|
55
|
+
--sc-table-th-px: var(--sc-table-td-px);
|
|
56
|
+
--sc-table-th-py: calc(1.8 * var(--sc-table-td-py) );
|
|
57
|
+
--sc-table-td-px: .5em;
|
|
58
|
+
--sc-table-td-py: .5em;
|
|
59
|
+
|
|
60
|
+
display:block;
|
|
41
61
|
}
|
|
42
62
|
|
|
43
63
|
.table-container {
|
|
@@ -49,9 +69,10 @@ Table.styles = [
|
|
|
49
69
|
width: 100%;
|
|
50
70
|
font-size: var(--sc-table-fs);
|
|
51
71
|
display: table;
|
|
72
|
+
box-sizing:border-box;
|
|
52
73
|
}
|
|
53
74
|
|
|
54
|
-
/*
|
|
75
|
+
/*SIZES*/
|
|
55
76
|
:host([size="2xs"]) {
|
|
56
77
|
--sc-table-fs: 0.6rem;
|
|
57
78
|
}
|
|
@@ -67,6 +88,9 @@ Table.styles = [
|
|
|
67
88
|
:host([size="xl"]) {
|
|
68
89
|
--sc-table-fs: 1.5rem;
|
|
69
90
|
}
|
|
91
|
+
:host([bordered]) .table-container {
|
|
92
|
+
border:var(--sc-border-width) solid var(--sc-table-border-color) !important;
|
|
93
|
+
}
|
|
70
94
|
|
|
71
95
|
`,
|
|
72
96
|
];
|
|
@@ -79,10 +103,21 @@ __decorate([
|
|
|
79
103
|
__decorate([
|
|
80
104
|
property({ type: Boolean, reflect: true })
|
|
81
105
|
], Table.prototype, "sticky", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: Boolean, reflect: true })
|
|
108
|
+
], Table.prototype, "bordered", void 0);
|
|
82
109
|
__decorate([
|
|
83
110
|
property({ type: Boolean, reflect: true })
|
|
84
111
|
], Table.prototype, "hover", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: String })
|
|
114
|
+
], Table.prototype, "maxHeight", void 0);
|
|
85
115
|
Table = __decorate([
|
|
86
|
-
customElement(
|
|
116
|
+
customElement(tagName)
|
|
87
117
|
], Table);
|
|
88
118
|
export { Table };
|
|
119
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
120
|
+
try {
|
|
121
|
+
customElements.define(tagName, Table);
|
|
122
|
+
}
|
|
123
|
+
catch (e) { }
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property, query } from "lit/decorators.js";
|
|
9
9
|
import { ResizeController } from "@lit-labs/observers/resize_controller.js";
|
|
10
|
-
import { tailwind } from "../theme/theme";
|
|
10
|
+
// import { tailwind } from "../theme/theme";
|
|
11
11
|
let Tabs = class Tabs extends LitElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -64,15 +64,14 @@ let Tabs = class Tabs extends LitElement {
|
|
|
64
64
|
><slot></slot>
|
|
65
65
|
<sonic-pop class="flex" >
|
|
66
66
|
<sonic-menu-item shape="square">
|
|
67
|
-
<sonic-icon
|
|
67
|
+
<sonic-icon class="my-auto" size="xl" name="more-vert"></sonic-icon>
|
|
68
68
|
</sonic-menu-item>
|
|
69
69
|
<sonic-menu slot="content"></sonic-menu>
|
|
70
|
-
|
|
70
|
+
</sonic-pop>
|
|
71
71
|
</menu>`;
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
Tabs.styles = [
|
|
75
|
-
tailwind,
|
|
76
75
|
css `
|
|
77
76
|
:host {
|
|
78
77
|
display: block;
|
|
@@ -10,6 +10,7 @@ import { repeat } from "lit/directives/repeat.js";
|
|
|
10
10
|
import "../icon/icon";
|
|
11
11
|
import "../badge/badge";
|
|
12
12
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
13
|
+
const tagName = "sonic-taxonomy";
|
|
13
14
|
/**
|
|
14
15
|
* Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
|
|
15
16
|
*/
|
|
@@ -103,7 +104,7 @@ __decorate([
|
|
|
103
104
|
property({ type: String, reflect: true })
|
|
104
105
|
], Taxonomy.prototype, "size", void 0);
|
|
105
106
|
Taxonomy = __decorate([
|
|
106
|
-
customElement(
|
|
107
|
+
customElement(tagName)
|
|
107
108
|
], Taxonomy);
|
|
108
109
|
export { Taxonomy };
|
|
109
110
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export const coreVariables = css `
|
|
3
3
|
:host {
|
|
4
|
-
/* --sc-rfs: 16px; */
|
|
5
|
-
|
|
6
4
|
/* polices*/
|
|
7
5
|
--sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
8
6
|
"Helvetica Neue", Arial, sans-serif;
|
|
@@ -10,7 +8,7 @@ export const coreVariables = css `
|
|
|
10
8
|
--sc-font-style-base: normal;
|
|
11
9
|
|
|
12
10
|
--sc-headings-font-family: var(--sc-font-family-base);
|
|
13
|
-
--sc-headings-font-style: var(--sc-font-
|
|
11
|
+
--sc-headings-font-style: var(--sc-font-style-base);
|
|
14
12
|
--sc-headings-line-height: 1.1;
|
|
15
13
|
--sc-headings-font-weight: 700;
|
|
16
14
|
--sc-headings-text-transform: none;
|
|
@@ -18,18 +16,17 @@ export const coreVariables = css `
|
|
|
18
16
|
/* Button*/
|
|
19
17
|
--sc-btn-font-weight: var(--sc-font-weight-base);
|
|
20
18
|
--sc-btn-font-family: var(--sc-font-family-base);
|
|
21
|
-
--sc-btn-font-style: var(--sc-font-
|
|
19
|
+
--sc-btn-font-style: var(--sc-font-style-base);
|
|
22
20
|
|
|
23
21
|
/* ROUNDED*/
|
|
24
|
-
--sc-btn-rounded: 0.38em;
|
|
25
|
-
--sc-input-rounded: 0.38em;
|
|
26
|
-
|
|
27
22
|
--sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
|
|
28
23
|
--sc-rounded: 0.35rem;
|
|
29
24
|
--sc-rounded-md: calc(var(--sc-rounded) * 1.8);
|
|
30
25
|
--sc-rounded-lg: calc(var(--sc-rounded) * 3.5);
|
|
31
26
|
--sc-rounded-xl: calc(var(--sc-rounded) * 7);
|
|
32
27
|
|
|
28
|
+
--sc-btn-rounded: calc(var(--sc-rounded) * 1.2);
|
|
29
|
+
|
|
33
30
|
/* Placeholder */
|
|
34
31
|
--sc-placeholder-bg: rgba(17, 24, 39, 0.05);
|
|
35
32
|
|
|
@@ -41,10 +38,17 @@ export const coreVariables = css `
|
|
|
41
38
|
--sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
42
39
|
|
|
43
40
|
/* formulaires*/
|
|
44
|
-
--sc-
|
|
41
|
+
--sc-border-width: max(1px, 0.085rem);
|
|
42
|
+
--sc-form-border-width: var(--sc-border-width);
|
|
43
|
+
--sc-input-bg: var(--sc-base-100);
|
|
44
|
+
--sc-input-border-color: var(--sc-input-bg);
|
|
45
|
+
--sc-input-rounded: calc(var(--sc-rounded) * 1.2);
|
|
45
46
|
|
|
46
47
|
/*Couleurs -- textes sur images*/
|
|
47
48
|
--sc-contrast-content: #fff;
|
|
48
49
|
--sc-contrast: #0f172a;
|
|
50
|
+
|
|
51
|
+
/*Scrollbar*/
|
|
52
|
+
--sc-scrollbar-bg : var(--sc-base-400);
|
|
49
53
|
}
|
|
50
54
|
`;
|
|
@@ -24,10 +24,6 @@ const darkCss = css `
|
|
|
24
24
|
--sc-base-800: var(--sc-dark-base-800, #d9dce0);
|
|
25
25
|
--sc-base-900: var(--sc-dark-base-900, #e5e7eb);
|
|
26
26
|
--sc-base-content: var(--sc-dark-base-content, #e5e7eb);
|
|
27
|
-
|
|
28
|
-
--sc-input-border-color: var(--sc-dark-input-border-color, var(--sc-base-100));
|
|
29
|
-
--sc-input-bg: var(--sc-dark-input-bg, var(--sc-base-100));
|
|
30
|
-
--sc-input-color: var(--sc-dark-input-color, var(--sc-base-content));
|
|
31
27
|
`;
|
|
32
28
|
export const dark = css `
|
|
33
29
|
:host([theme="dark"]) {
|
|
@@ -5,15 +5,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var Theme_1;
|
|
8
|
-
import { html, LitElement, css
|
|
8
|
+
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import { coreVariables } from "./theme-collection/core-variables";
|
|
11
11
|
import { light } from "./theme-collection/light";
|
|
12
12
|
import { dark } from "./theme-collection/dark";
|
|
13
|
-
|
|
14
|
-
export const tailwind = css `
|
|
15
|
-
${unsafeCSS(tailwindImport)}
|
|
16
|
-
`;
|
|
13
|
+
const tagName = "sonic-theme";
|
|
17
14
|
let Theme = Theme_1 = class Theme extends LitElement {
|
|
18
15
|
constructor() {
|
|
19
16
|
super(...arguments);
|
|
@@ -100,6 +97,6 @@ __decorate([
|
|
|
100
97
|
property({ type: String, reflect: true })
|
|
101
98
|
], Theme.prototype, "theme", void 0);
|
|
102
99
|
Theme = Theme_1 = __decorate([
|
|
103
|
-
customElement(
|
|
100
|
+
customElement(tagName)
|
|
104
101
|
], Theme);
|
|
105
102
|
export { Theme };
|
|
@@ -8,6 +8,7 @@ import { LitElement, nothing } from "lit";
|
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
10
|
import { SonicToast } from "./toast";
|
|
11
|
+
const tagName = "sonic-toast-message-subscriber";
|
|
11
12
|
//Superbe mix de multples versions d'api.
|
|
12
13
|
let MessageSubscriber = class MessageSubscriber extends Subscriber(LitElement) {
|
|
13
14
|
constructor() {
|
|
@@ -80,6 +81,6 @@ __decorate([
|
|
|
80
81
|
property()
|
|
81
82
|
], MessageSubscriber.prototype, "data", null);
|
|
82
83
|
MessageSubscriber = __decorate([
|
|
83
|
-
customElement(
|
|
84
|
+
customElement(tagName)
|
|
84
85
|
], MessageSubscriber);
|
|
85
86
|
export { MessageSubscriber };
|
|
@@ -8,12 +8,14 @@ import { html, LitElement, css, nothing } from "lit";
|
|
|
8
8
|
import { customElement, property, state } from "lit/decorators.js";
|
|
9
9
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
10
10
|
import "./types";
|
|
11
|
+
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
11
12
|
const icon = {
|
|
12
13
|
warning: "warning-circled-outline",
|
|
13
14
|
success: "check-circled-outline",
|
|
14
15
|
error: "warning-circled-outline",
|
|
15
16
|
info: "info-empty",
|
|
16
17
|
};
|
|
18
|
+
const tagName = "sonic-toast-item";
|
|
17
19
|
let SonicToastItem = class SonicToastItem extends LitElement {
|
|
18
20
|
constructor() {
|
|
19
21
|
super(...arguments);
|
|
@@ -22,6 +24,7 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
22
24
|
this.status = "";
|
|
23
25
|
this.ghost = false;
|
|
24
26
|
this.preserve = false;
|
|
27
|
+
this.maxHeight = '10rem';
|
|
25
28
|
this.visible = true;
|
|
26
29
|
}
|
|
27
30
|
render() {
|
|
@@ -30,22 +33,25 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
30
33
|
}
|
|
31
34
|
return html `<div
|
|
32
35
|
class="sonic-toast ${this.status} ${this.ghost ? "ghost" : ""}"
|
|
33
|
-
|
|
34
36
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</button>
|
|
37
|
+
|
|
38
|
+
<button aria-label="Close" class="sonic-toast-close" @click=${() => this.hide()}>
|
|
39
|
+
<sonic-icon name="cancel" size="lg"></sonic-icon>
|
|
40
|
+
</button>
|
|
41
|
+
<div class="sonic-toast-content custom-scroll" style="max-height: ${this.maxHeight} ;">
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
${this.status &&
|
|
44
|
+
html `<sonic-icon name=${icon[this.status]} class="sonic-toast-icon" size="2xl"></sonic-icon>`}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
<div class="sonic-toast-text">
|
|
48
|
+
${this.title ? html `<div class="sonic-toast-title">${this.title}</div>` : ""}
|
|
49
|
+
${this.text ? unsafeHTML(this.text) : ""}
|
|
50
|
+
<slot></slot>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
${!this.preserve ? this.autoHide() : ""}
|
|
54
|
+
</div>
|
|
49
55
|
</div>`;
|
|
50
56
|
}
|
|
51
57
|
hide() {
|
|
@@ -64,6 +70,7 @@ let SonicToastItem = class SonicToastItem extends LitElement {
|
|
|
64
70
|
}
|
|
65
71
|
};
|
|
66
72
|
SonicToastItem.styles = [
|
|
73
|
+
customScroll,
|
|
67
74
|
css `
|
|
68
75
|
* {
|
|
69
76
|
box-sizing: border-box;
|
|
@@ -71,6 +78,7 @@ SonicToastItem.styles = [
|
|
|
71
78
|
:host {
|
|
72
79
|
display: block;
|
|
73
80
|
pointer-events: auto;
|
|
81
|
+
position: relative;
|
|
74
82
|
--sc-toast-status-color: transparent;
|
|
75
83
|
--sc-toast-color: var(--sc-base-content);
|
|
76
84
|
--sc-toast-bg: var(--sc-base);
|
|
@@ -78,13 +86,6 @@ SonicToastItem.styles = [
|
|
|
78
86
|
--sc-toast-shadow: var(--sc-shadow-lg);
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
.sonic-toast-area {
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
width: calc(100% - 2.5rem);
|
|
84
|
-
max-width: 64ch;
|
|
85
|
-
gap: 1rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
89
|
.fixed-area {
|
|
89
90
|
position: fixed;
|
|
90
91
|
bottom: 1.25rem;
|
|
@@ -97,22 +98,27 @@ SonicToastItem.styles = [
|
|
|
97
98
|
.sonic-toast {
|
|
98
99
|
position: relative;
|
|
99
100
|
pointer-events: auto;
|
|
100
|
-
|
|
101
|
+
overflow:hidden;
|
|
102
|
+
line-height: 1.25;
|
|
101
103
|
color: var(--sc-toast-color);
|
|
102
104
|
box-shadow: var(--sc-toast-shadow);
|
|
103
105
|
border-radius: var(--sc-toast-rounded);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
background: var(--sc-toast-bg);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.sonic-toast-content {
|
|
110
|
+
padding: 1em 2rem 1em 1em;
|
|
106
111
|
display: flex;
|
|
107
112
|
gap: 0.5rem;
|
|
108
|
-
max-height: 10rem;
|
|
109
113
|
overflow: auto;
|
|
110
|
-
|
|
114
|
+
position:relative;
|
|
115
|
+
}
|
|
111
116
|
|
|
112
117
|
.sonic-toast-text {
|
|
113
118
|
align-self: center;
|
|
114
119
|
margin-top: auto;
|
|
115
120
|
margin-bottom: auto;
|
|
121
|
+
max-width:70ch;
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
::slotted(a),
|
|
@@ -126,6 +132,7 @@ SonicToastItem.styles = [
|
|
|
126
132
|
.sonic-toast-close {
|
|
127
133
|
all: unset;
|
|
128
134
|
position: absolute;
|
|
135
|
+
z-index:4;
|
|
129
136
|
pointer-events: initial;
|
|
130
137
|
right: 0.5em;
|
|
131
138
|
top: 0.5em;
|
|
@@ -186,11 +193,10 @@ SonicToastItem.styles = [
|
|
|
186
193
|
.error,
|
|
187
194
|
.info,
|
|
188
195
|
.warning {
|
|
189
|
-
border-top: 3px solid var(--sc-toast-status-color,
|
|
196
|
+
border-top: 3px solid var(--sc-toast-status-color, currentColor);
|
|
190
197
|
}
|
|
191
198
|
|
|
192
199
|
.sonic-toast:before {
|
|
193
|
-
background-color: var(--sc-toast-status-color);
|
|
194
200
|
content: "";
|
|
195
201
|
display: block;
|
|
196
202
|
position: absolute;
|
|
@@ -201,22 +207,33 @@ SonicToastItem.styles = [
|
|
|
201
207
|
opacity: 0.05;
|
|
202
208
|
pointer-events: none;
|
|
203
209
|
transition: 0.2s;
|
|
204
|
-
border-radius: var(--sc-toast-
|
|
210
|
+
border-radius: var(--sc-toast-rounded);
|
|
211
|
+
background-color: var(--sc-toast-status-color);
|
|
205
212
|
}
|
|
213
|
+
|
|
206
214
|
.sonic-toast:hover:before {
|
|
207
215
|
opacity: 0.025;
|
|
208
216
|
}
|
|
217
|
+
|
|
209
218
|
.info .sonic-toast-icon,
|
|
210
219
|
.error .sonic-toast-icon,
|
|
211
220
|
.success .sonic-toast-icon,
|
|
212
221
|
.warning .sonic-toast-icon {
|
|
213
|
-
color: var(--sc-toast-status-color,
|
|
222
|
+
color: var(--sc-toast-status-color, currentColor);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.sonic-toast-icon {
|
|
226
|
+
position:sticky;
|
|
227
|
+
top:0;
|
|
214
228
|
}
|
|
215
229
|
|
|
216
230
|
.ghost {
|
|
217
231
|
opacity: 0.85;
|
|
218
232
|
pointer-events: none;
|
|
219
233
|
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
220
237
|
`,
|
|
221
238
|
];
|
|
222
239
|
__decorate([
|
|
@@ -234,10 +251,13 @@ __decorate([
|
|
|
234
251
|
__decorate([
|
|
235
252
|
property({ type: Boolean })
|
|
236
253
|
], SonicToastItem.prototype, "preserve", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
property({ type: String })
|
|
256
|
+
], SonicToastItem.prototype, "maxHeight", void 0);
|
|
237
257
|
__decorate([
|
|
238
258
|
state()
|
|
239
259
|
], SonicToastItem.prototype, "visible", void 0);
|
|
240
260
|
SonicToastItem = __decorate([
|
|
241
|
-
customElement(
|
|
261
|
+
customElement(tagName)
|
|
242
262
|
], SonicToastItem);
|
|
243
263
|
export { SonicToastItem };
|