@supersoniks/concorde 1.1.9 → 1.1.12
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/core/components/functional/configuration/configuration.d.ts +5 -0
- package/core/components/functional/configuration/configuration.js +21 -0
- package/core/components/functional/date/date.js +3 -2
- package/core/components/functional/fetch/fetch.d.ts +32 -11
- package/core/components/functional/fetch/fetch.js +28 -12
- package/core/components/functional/functional.d.ts +1 -0
- package/core/components/functional/functional.js +1 -0
- package/core/components/functional/list/list.d.ts +15 -7
- package/core/components/functional/list/list.js +50 -20
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +5 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +20 -0
- package/core/components/functional/states/states.js +0 -2
- package/core/components/functional/submit/submit.d.ts +2 -0
- package/core/components/functional/submit/submit.js +23 -8
- package/core/components/ui/alert/alert.js +4 -5
- package/core/components/ui/badge/badge.js +0 -1
- package/core/components/ui/button/button.d.ts +11 -3
- package/core/components/ui/button/button.js +20 -17
- package/core/components/ui/card/card-footer.d.ts +5 -0
- package/core/components/ui/card/card-footer.js +27 -0
- package/core/components/ui/card/card-header-descripton.d.ts +5 -0
- package/core/components/ui/card/card-header-descripton.js +33 -0
- package/core/components/ui/card/card-header.d.ts +8 -0
- package/core/components/ui/card/card-header.js +67 -0
- package/core/components/ui/card/card-main.d.ts +5 -0
- package/core/components/ui/card/card-main.js +29 -0
- package/core/components/ui/card/card.d.ts +12 -0
- package/core/components/ui/card/card.js +90 -0
- package/core/components/ui/form/checkbox/checkbox.d.ts +4 -4
- package/core/components/ui/form/checkbox/checkbox.js +3 -4
- package/core/components/ui/form/css/form-control.js +2 -0
- package/core/components/ui/form/fieldset/fieldset.js +1 -1
- package/core/components/ui/form/fieldset/legend-description.d.ts +5 -0
- package/core/components/ui/form/fieldset/legend-description.js +35 -0
- package/core/components/ui/form/fieldset/legend.d.ts +4 -5
- package/core/components/ui/form/fieldset/legend.js +21 -25
- package/core/components/ui/form/input/input.d.ts +3 -3
- package/core/components/ui/form/input/input.js +3 -3
- package/core/components/ui/form/textarea/textarea.d.ts +2 -2
- package/core/components/ui/form/textarea/textarea.js +2 -2
- package/core/components/ui/icon/icon.d.ts +16 -4
- package/core/components/ui/icon/icon.js +52 -6
- package/core/components/ui/icon/icons.d.ts +3 -2
- package/core/components/ui/icon/icons.js +78 -7
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/link/link.d.ts +10 -1
- package/core/components/ui/link/link.js +21 -2
- package/core/components/ui/menu/menu.d.ts +11 -5
- package/core/components/ui/menu/menu.js +81 -35
- package/core/components/ui/pop/pop.js +5 -2
- package/core/components/ui/progress/progress.d.ts +9 -0
- package/core/components/ui/progress/progress.js +138 -0
- package/core/components/ui/table/table-caption.d.ts +5 -0
- package/core/components/ui/table/table-caption.js +24 -0
- package/core/components/ui/table/table-tbody.d.ts +5 -0
- package/core/components/ui/table/table-tbody.js +37 -0
- package/core/components/ui/table/table-td.d.ts +7 -0
- package/core/components/ui/table/table-td.js +45 -0
- package/core/components/ui/table/table-tfoot.d.ts +5 -0
- package/core/components/ui/table/table-tfoot.js +23 -0
- package/core/components/ui/table/table-th.d.ts +6 -0
- package/core/components/ui/table/table-th.js +43 -0
- package/core/components/ui/table/table-thead.d.ts +5 -0
- package/core/components/ui/table/table-thead.js +24 -0
- package/core/components/ui/table/table-tr.d.ts +5 -0
- package/core/components/ui/table/table-tr.js +24 -0
- package/core/components/ui/table/table.d.ts +16 -0
- package/core/components/ui/table/table.js +88 -0
- package/core/components/ui/tabs/tabs.d.ts +1 -0
- package/core/components/ui/tabs/tabs.js +7 -3
- package/core/components/ui/theme/theme-collection/core-variables.js +1 -1
- package/core/components/ui/theme/theme-collection/dark.js +3 -2
- package/core/components/ui/theme/theme-collection/light.js +1 -0
- package/core/components/ui/tooltip/tooltip.d.ts +1 -1
- package/core/components/ui/tooltip/tooltip.js +4 -4
- package/core/components/ui/ui.d.ts +3 -3
- package/core/components/ui/ui.js +5 -3
- package/core/mixins/Fetcher.d.ts +11 -9
- package/core/mixins/Fetcher.js +22 -4
- package/core/mixins/FormCheckable.d.ts +2 -2
- package/core/mixins/FormInput.d.ts +2 -2
- package/core/mixins/Subscriber.d.ts +2 -2
- package/core/mixins/Subscriber.js +0 -15
- package/core/utils/Electron.d.ts +3 -0
- package/core/utils/Electron.js +8 -0
- package/core/utils/LocationHandler.d.ts +2 -1
- package/core/utils/LocationHandler.js +25 -2
- package/core/utils/Objects.d.ts +2 -1
- package/core/utils/Objects.js +8 -2
- package/core/utils/PublisherProxy.mjs +42 -12
- package/core/utils/api.js +1 -1
- package/package.json +40 -1
|
@@ -59,6 +59,13 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
59
59
|
* Propriété min-width du bouton
|
|
60
60
|
*/
|
|
61
61
|
this.minWidth = "0";
|
|
62
|
+
/**
|
|
63
|
+
* mode d'activation du bouton :
|
|
64
|
+
* - strict : l'url courante match exactement avec le href du bouton
|
|
65
|
+
* - partial : l'url courante match à gauche avec le href du bouton
|
|
66
|
+
* - disabled : aucune activation / désactivation
|
|
67
|
+
*/
|
|
68
|
+
this.autoActive = "partial";
|
|
62
69
|
/**
|
|
63
70
|
* Laisse apparaitre un loader en remplacement du contenu du bouton.
|
|
64
71
|
* Désactive également le clic sur le bouton
|
|
@@ -74,6 +81,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
74
81
|
* L'url
|
|
75
82
|
*/
|
|
76
83
|
this._href = "";
|
|
84
|
+
this.goBack = null;
|
|
77
85
|
/**
|
|
78
86
|
* Si présent on passe en mode pushstate
|
|
79
87
|
*/
|
|
@@ -94,13 +102,13 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
94
102
|
get href() {
|
|
95
103
|
return this._href;
|
|
96
104
|
}
|
|
97
|
-
|
|
105
|
+
handleNavigation(e) {
|
|
98
106
|
e.preventDefault();
|
|
99
107
|
LocationHandler.changeFromComponent(this);
|
|
100
108
|
}
|
|
101
109
|
handleChange(e) {
|
|
102
110
|
super.handleChange(e);
|
|
103
|
-
if (this.pushState) {
|
|
111
|
+
if (this.pushState || this.goBack !== null) {
|
|
104
112
|
e.preventDefault();
|
|
105
113
|
e.stopPropagation();
|
|
106
114
|
LocationHandler.changeFromComponent(this);
|
|
@@ -109,18 +117,6 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
109
117
|
connectedCallback() {
|
|
110
118
|
super.connectedCallback();
|
|
111
119
|
}
|
|
112
|
-
// _checked: true | null = null;
|
|
113
|
-
// @property() get checked(): true | null {
|
|
114
|
-
// return this._checked;
|
|
115
|
-
// }
|
|
116
|
-
// set checked(checked: true | null) {
|
|
117
|
-
// if (this.name) {
|
|
118
|
-
// if (checked == this._checked) return;
|
|
119
|
-
// super.setCheckedValue(checked);
|
|
120
|
-
// if (this._checked) this.setAttribute("active", "true");
|
|
121
|
-
// else this.removeAttribute("active");
|
|
122
|
-
// }
|
|
123
|
-
// }
|
|
124
120
|
setCheckedValue(checked) {
|
|
125
121
|
if (this.name) {
|
|
126
122
|
if (checked == this._checked)
|
|
@@ -160,7 +156,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
160
156
|
</button>
|
|
161
157
|
`;
|
|
162
158
|
return this.href
|
|
163
|
-
? html `<a href="${this.href}" target=${ifDefined(this.target)} @click=${this.pushState ? this.
|
|
159
|
+
? html `<a href="${this.href}" target=${ifDefined(this.target)} @click=${this.pushState || this.goBack !== null ? this.handleNavigation : null}>${btn}</a>`
|
|
164
160
|
: html `${btn}`;
|
|
165
161
|
}
|
|
166
162
|
onSlotChange() {
|
|
@@ -210,13 +206,13 @@ Button.styles = [
|
|
|
210
206
|
|
|
211
207
|
:host a {
|
|
212
208
|
display: contents;
|
|
209
|
+
color:unset;
|
|
213
210
|
}
|
|
214
211
|
|
|
215
212
|
:host button {
|
|
216
213
|
display: flex;
|
|
217
214
|
flex: 1;
|
|
218
215
|
box-sizing: border-box;
|
|
219
|
-
flex-wrap: wrap;
|
|
220
216
|
align-items: center;
|
|
221
217
|
justify-content: center;
|
|
222
218
|
|
|
@@ -226,7 +222,7 @@ Button.styles = [
|
|
|
226
222
|
|
|
227
223
|
cursor: pointer;
|
|
228
224
|
text-align: center;
|
|
229
|
-
line-height: 1.
|
|
225
|
+
line-height: 1.1;
|
|
230
226
|
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br)
|
|
231
227
|
var(--sc-item-rounded-bl);
|
|
232
228
|
|
|
@@ -404,6 +400,7 @@ Button.styles = [
|
|
|
404
400
|
padding: 0;
|
|
405
401
|
align-items: center;
|
|
406
402
|
justify-content: 0;
|
|
403
|
+
text-align:center !important;
|
|
407
404
|
}
|
|
408
405
|
|
|
409
406
|
:host([shape="block"]),
|
|
@@ -530,6 +527,9 @@ __decorate([
|
|
|
530
527
|
__decorate([
|
|
531
528
|
property({ type: String })
|
|
532
529
|
], Button.prototype, "minWidth", void 0);
|
|
530
|
+
__decorate([
|
|
531
|
+
property({ type: String })
|
|
532
|
+
], Button.prototype, "autoActive", void 0);
|
|
533
533
|
__decorate([
|
|
534
534
|
property({ type: Boolean, reflect: true })
|
|
535
535
|
], Button.prototype, "loading", void 0);
|
|
@@ -551,6 +551,9 @@ __decorate([
|
|
|
551
551
|
__decorate([
|
|
552
552
|
property({ type: String })
|
|
553
553
|
], Button.prototype, "href", null);
|
|
554
|
+
__decorate([
|
|
555
|
+
property({ type: String })
|
|
556
|
+
], Button.prototype, "goBack", void 0);
|
|
554
557
|
__decorate([
|
|
555
558
|
property({ type: Boolean })
|
|
556
559
|
], Button.prototype, "pushState", void 0);
|
|
@@ -0,0 +1,27 @@
|
|
|
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 CardFooter = class CardFooter extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `
|
|
12
|
+
<slot></slot>
|
|
13
|
+
`;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
CardFooter.styles = [
|
|
17
|
+
css `
|
|
18
|
+
:host {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
`
|
|
23
|
+
];
|
|
24
|
+
CardFooter = __decorate([
|
|
25
|
+
customElement("sonic-card-footer")
|
|
26
|
+
], CardFooter);
|
|
27
|
+
export { CardFooter };
|
|
@@ -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 CardHeaderDescription = class CardHeaderDescription extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `
|
|
12
|
+
<div>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
CardHeaderDescription.styles = [
|
|
19
|
+
css `
|
|
20
|
+
|
|
21
|
+
div {
|
|
22
|
+
margin-top: .1em;
|
|
23
|
+
font-family: var(--sc-font-family-base);
|
|
24
|
+
font-size: .7em;
|
|
25
|
+
font-weight: var(--sc-font-style-base);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
`
|
|
29
|
+
];
|
|
30
|
+
CardHeaderDescription = __decorate([
|
|
31
|
+
customElement("sonic-card-header-description")
|
|
32
|
+
], CardHeaderDescription);
|
|
33
|
+
export { CardHeaderDescription };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import './card-header-descripton.ts';
|
|
3
|
+
export declare class CardHeader extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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, property } from "lit/decorators.js";
|
|
9
|
+
import './card-header-descripton.ts';
|
|
10
|
+
let CardHeader = class CardHeader extends LitElement {
|
|
11
|
+
render() {
|
|
12
|
+
return html `
|
|
13
|
+
<div class="header">
|
|
14
|
+
<div class="header-content">
|
|
15
|
+
${this.label}
|
|
16
|
+
${this.description ? html `<sonic-card-header-description>${this.description}</sonic-card-header-description>` : ""}
|
|
17
|
+
<slot></slot>
|
|
18
|
+
</div>
|
|
19
|
+
<slot name="suffix"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
CardHeader.styles = [
|
|
25
|
+
css `
|
|
26
|
+
|
|
27
|
+
:host {
|
|
28
|
+
--sc-card-header-mb: 1rem;
|
|
29
|
+
--sc-card-header-font-size: 1.875rem;
|
|
30
|
+
--sc-card-header-font-weight: var(--sc-headings-font-weight);
|
|
31
|
+
--sc-card-header-font-style: var(--sc-headings-font-style);
|
|
32
|
+
--sc-card-header-family: var(--sc-headings-font-family);
|
|
33
|
+
--sc-card-header-line-height: var(--sc-headings-line-height);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.header {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
gap: .5em 1em;
|
|
40
|
+
margin-bottom: var(--sc-card-header-mb);
|
|
41
|
+
line-height: var(--sc-card-header-line-height);
|
|
42
|
+
font-family: var(--sc-card-header-font-family);
|
|
43
|
+
font-size: var(--sc-card-header-font-size);
|
|
44
|
+
font-style: var(--sc-card-header-font-style);
|
|
45
|
+
font-weight: var(--sc-card-header-font-weight);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.header-content {
|
|
49
|
+
flex-grow: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
slot[name="suffix"] {
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
`
|
|
57
|
+
];
|
|
58
|
+
__decorate([
|
|
59
|
+
property()
|
|
60
|
+
], CardHeader.prototype, "label", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property()
|
|
63
|
+
], CardHeader.prototype, "description", void 0);
|
|
64
|
+
CardHeader = __decorate([
|
|
65
|
+
customElement("sonic-card-header")
|
|
66
|
+
], CardHeader);
|
|
67
|
+
export { CardHeader };
|
|
@@ -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 CardMain = class CardMain extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `
|
|
12
|
+
<div>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
CardMain.styles = [
|
|
19
|
+
css `
|
|
20
|
+
:host {
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
`
|
|
25
|
+
];
|
|
26
|
+
CardMain = __decorate([
|
|
27
|
+
customElement("sonic-card-main")
|
|
28
|
+
], CardMain);
|
|
29
|
+
export { CardMain };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./card-header.ts";
|
|
3
|
+
import "./card-main.ts";
|
|
4
|
+
import "./card-footer.ts";
|
|
5
|
+
export declare class Card extends LitElement {
|
|
6
|
+
static styles: import("lit").CSSResult[];
|
|
7
|
+
/**
|
|
8
|
+
* Le type change surtout la couleur composant
|
|
9
|
+
*/
|
|
10
|
+
type: "default" | "primary" | "warning" | "danger" | "success" | "info" | "neutral" | "invert";
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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, property } from "lit/decorators.js";
|
|
9
|
+
import "./card-header.ts";
|
|
10
|
+
import "./card-main.ts";
|
|
11
|
+
import "./card-footer.ts";
|
|
12
|
+
let Card = class Card extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
/**
|
|
16
|
+
* Le type change surtout la couleur composant
|
|
17
|
+
*/
|
|
18
|
+
this.type = "default";
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html `
|
|
22
|
+
<div part="card" class="card">
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
Card.styles = [
|
|
29
|
+
css `
|
|
30
|
+
:host {
|
|
31
|
+
--sc-card-padding: 1.5rem;
|
|
32
|
+
--sc-card-color: var(--sc-base-content);
|
|
33
|
+
--sc-card-bg: var(--sc-base);
|
|
34
|
+
--sc-card-rounded: var(--sc-rounded-lg);
|
|
35
|
+
--sc-card-shadow: var(--sc-shadow-lg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.card {
|
|
39
|
+
padding: var(--sc-card-padding);
|
|
40
|
+
background-color: var(--sc-card-bg);
|
|
41
|
+
border-radius: var(--sc-card-rounded);
|
|
42
|
+
box-shadow: var(--sc-card-shadow);
|
|
43
|
+
color: var(--sc-card-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/*TYPES*/
|
|
47
|
+
:host([type="primary"]) {
|
|
48
|
+
--sc-card-color: var(--sc-primary-content);
|
|
49
|
+
--sc-badge-bg: var(--sc-primary);
|
|
50
|
+
}
|
|
51
|
+
:host([type="warning"]) {
|
|
52
|
+
--sc-card-color: var(--sc-warning-content);
|
|
53
|
+
--sc-card-bg: var(--sc-warning);
|
|
54
|
+
}
|
|
55
|
+
:host([type="danger"]) {
|
|
56
|
+
--sc-card-color: var(--sc-danger-content);
|
|
57
|
+
--sc-card-bg: var(--sc-danger);
|
|
58
|
+
}
|
|
59
|
+
:host([type="info"]) {
|
|
60
|
+
--sc-card-color: var(--sc-info-content);
|
|
61
|
+
--sc-card-bg: var(--sc-info);
|
|
62
|
+
}
|
|
63
|
+
:host([type="success"]) {
|
|
64
|
+
--sc-card-color: var(--sc-success-content);
|
|
65
|
+
--sc-card-bg: var(--sc-success);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([type="light"]) {
|
|
69
|
+
--sc-card-color: var(--sc-base-content);
|
|
70
|
+
--sc-card-bg: var(--sc-base-100);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([type="neutral"]) {
|
|
74
|
+
--sc-card-color: var(--sc-base);
|
|
75
|
+
--sc-card-bg: var(--sc-base-content);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([type="invert"]) {
|
|
79
|
+
--sc-card-color: var(--sc-base);
|
|
80
|
+
--sc-card-bg: var(--sc-base-900);
|
|
81
|
+
}
|
|
82
|
+
`,
|
|
83
|
+
];
|
|
84
|
+
__decorate([
|
|
85
|
+
property({ type: String, reflect: true })
|
|
86
|
+
], Card.prototype, "type", void 0);
|
|
87
|
+
Card = __decorate([
|
|
88
|
+
customElement("sonic-card")
|
|
89
|
+
], Card);
|
|
90
|
+
export { Card };
|
|
@@ -23,15 +23,15 @@ declare const Checkbox_base: {
|
|
|
23
23
|
required: true | null;
|
|
24
24
|
formDataProvider: string;
|
|
25
25
|
props: any;
|
|
26
|
+
isConnected: boolean;
|
|
26
27
|
getAncestorAttributeValue(attributeName: string): string;
|
|
27
28
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
28
29
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
29
30
|
publisher: any;
|
|
30
|
-
dataProvider:
|
|
31
|
+
dataProvider: string | null;
|
|
31
32
|
noShadowDom: string | null;
|
|
32
33
|
debug: HTMLElement | null;
|
|
33
34
|
defferedDebug: boolean | null;
|
|
34
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
35
35
|
dispatchEvent(event: Event): void;
|
|
36
36
|
setAttribute(name: string, value: string): void;
|
|
37
37
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -63,15 +63,15 @@ declare const Checkbox_base: {
|
|
|
63
63
|
_name: string;
|
|
64
64
|
name: string;
|
|
65
65
|
props: any;
|
|
66
|
+
isConnected: boolean;
|
|
66
67
|
getAncestorAttributeValue(attributeName: string): string;
|
|
67
68
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
68
69
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
69
70
|
publisher: any;
|
|
70
|
-
dataProvider:
|
|
71
|
+
dataProvider: string | null;
|
|
71
72
|
noShadowDom: string | null;
|
|
72
73
|
debug: HTMLElement | null;
|
|
73
74
|
defferedDebug: boolean | null;
|
|
74
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
75
75
|
dispatchEvent(event: Event): void;
|
|
76
76
|
setAttribute(name: string, value: string): void;
|
|
77
77
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -55,9 +55,9 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
55
55
|
<input
|
|
56
56
|
type="${this.type}"
|
|
57
57
|
@change=${this.handleChange}
|
|
58
|
-
disabled
|
|
59
|
-
.
|
|
60
|
-
|
|
58
|
+
.disabled=${ifDefined(this.disabled)}
|
|
59
|
+
.required=${ifDefined(this.required)}
|
|
60
|
+
.checked=${ifDefined(this.checked)}
|
|
61
61
|
.name=${this.name}
|
|
62
62
|
.value=${this.value}
|
|
63
63
|
autofocus=${ifDefined(this.autofocus)}
|
|
@@ -74,7 +74,6 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
74
74
|
<slot>
|
|
75
75
|
</div>
|
|
76
76
|
</label>
|
|
77
|
-
|
|
78
77
|
`;
|
|
79
78
|
}
|
|
80
79
|
};
|
|
@@ -27,6 +27,7 @@ export const formControl = css `
|
|
|
27
27
|
--sc-input-suffix-bg: var(--sc-input-bg);
|
|
28
28
|
--sc-input-suffix-border-color: var(--sc-input-border-color);
|
|
29
29
|
--sc-label-fs: var(--sc-input-fs);
|
|
30
|
+
--sc-label-fw: normal;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
.form-element {
|
|
@@ -55,6 +56,7 @@ export const formControl = css `
|
|
|
55
56
|
|
|
56
57
|
label {
|
|
57
58
|
font-size: var(--sc-label-fs);
|
|
59
|
+
font-weight: var(--sc-label-fw);
|
|
58
60
|
line-height: 1.2;
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -39,7 +39,7 @@ Fieldset.styles = [
|
|
|
39
39
|
margin-bottom: var(--sc-fieldset-mb);
|
|
40
40
|
display: block;
|
|
41
41
|
border: var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color) !important;
|
|
42
|
-
padding: 1.25rem;
|
|
42
|
+
padding: 1.8rem 1.25rem;
|
|
43
43
|
border-radius: var(--sc-rounded-lg);
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -0,0 +1,35 @@
|
|
|
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 LegendDescription = class LegendDescription extends LitElement {
|
|
10
|
+
render() {
|
|
11
|
+
return html `<slot></slot>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
LegendDescription.styles = [
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
color: var(--sc-neutral-500);
|
|
18
|
+
font-size: 1.25rem;
|
|
19
|
+
line-height: 1.2;
|
|
20
|
+
display: block;
|
|
21
|
+
font-weight: var(--sc-font-weight-base);
|
|
22
|
+
font-style: var(--sc-font-style-base);
|
|
23
|
+
margin-top: 0.25em;
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
];
|
|
27
|
+
LegendDescription = __decorate([
|
|
28
|
+
customElement("sonic-legend-description")
|
|
29
|
+
], LegendDescription);
|
|
30
|
+
export { LegendDescription };
|
|
31
|
+
//Ajout pour la creation du cem notamment pour Storybook
|
|
32
|
+
try {
|
|
33
|
+
customElements.define("sonic-legend-description", LegendDescription);
|
|
34
|
+
}
|
|
35
|
+
catch (e) { }
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
|
|
3
|
-
export declare class Legend extends
|
|
2
|
+
import './legend-description.ts';
|
|
3
|
+
export declare class Legend extends LitElement {
|
|
4
4
|
static styles: import("lit").CSSResult[];
|
|
5
|
-
iconName: string;
|
|
6
|
-
iconPrefix: string;
|
|
7
5
|
description: string;
|
|
8
6
|
label: string;
|
|
7
|
+
iconName: string;
|
|
8
|
+
iconPrefix: string;
|
|
9
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
}
|
|
11
|
-
export {};
|
|
@@ -6,23 +6,27 @@ 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
|
|
10
|
-
let Legend = class Legend extends
|
|
9
|
+
import './legend-description.ts';
|
|
10
|
+
let Legend = class Legend extends LitElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
-
this.iconName = "check";
|
|
14
|
-
this.iconPrefix = "";
|
|
15
13
|
this.description = "";
|
|
16
14
|
this.label = "";
|
|
15
|
+
this.iconName = "";
|
|
16
|
+
this.iconPrefix = "";
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
return html `<legend part="legend">
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
|
|
21
|
+
${this.iconName ? html `<div class="icon"><sonic-icon name=${this.iconName} prefix=${this.iconPrefix}></sonic-icon></div>` : ""}
|
|
22
|
+
|
|
23
|
+
<div class="legend-content">
|
|
24
|
+
${this.label}
|
|
25
|
+
${this.description ? html `<sonic-legend-description>${this.description}</sonic-legend-description>` : ""}
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</div>
|
|
28
|
+
<slot name="suffix"></slot>
|
|
29
|
+
</legend>`;
|
|
26
30
|
}
|
|
27
31
|
};
|
|
28
32
|
Legend.styles = [
|
|
@@ -46,24 +50,16 @@ Legend.styles = [
|
|
|
46
50
|
padding: 0;
|
|
47
51
|
display: flex;
|
|
48
52
|
width: 100%;
|
|
49
|
-
align-items:
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
gap: 0.5em;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
slot[name="suffix"]
|
|
57
|
+
slot[name="suffix"] {
|
|
53
58
|
display: block;
|
|
54
59
|
margin-left: auto;
|
|
55
60
|
flex-shrink: 0;
|
|
56
61
|
}
|
|
57
62
|
|
|
58
|
-
.description {
|
|
59
|
-
color: var(--sc-neutral-500);
|
|
60
|
-
font-size: 1.25rem;
|
|
61
|
-
line-height: 1.2;
|
|
62
|
-
display: block;
|
|
63
|
-
font-weight: normal;
|
|
64
|
-
font-style: normal;
|
|
65
|
-
margin-top: 0.25eem;
|
|
66
|
-
}
|
|
67
63
|
.legend-content {
|
|
68
64
|
flex-grow: 1;
|
|
69
65
|
}
|
|
@@ -71,16 +67,16 @@ Legend.styles = [
|
|
|
71
67
|
];
|
|
72
68
|
__decorate([
|
|
73
69
|
property({ type: String })
|
|
74
|
-
], Legend.prototype, "
|
|
70
|
+
], Legend.prototype, "description", void 0);
|
|
75
71
|
__decorate([
|
|
76
72
|
property({ type: String })
|
|
77
|
-
], Legend.prototype, "
|
|
73
|
+
], Legend.prototype, "label", void 0);
|
|
78
74
|
__decorate([
|
|
79
75
|
property({ type: String })
|
|
80
|
-
], Legend.prototype, "
|
|
76
|
+
], Legend.prototype, "iconName", void 0);
|
|
81
77
|
__decorate([
|
|
82
78
|
property({ type: String })
|
|
83
|
-
], Legend.prototype, "
|
|
79
|
+
], Legend.prototype, "iconPrefix", void 0);
|
|
84
80
|
Legend = __decorate([
|
|
85
81
|
customElement("sonic-legend")
|
|
86
82
|
], Legend);
|
|
@@ -18,15 +18,15 @@ declare const Input_base: {
|
|
|
18
18
|
_name: string;
|
|
19
19
|
name: string;
|
|
20
20
|
props: any;
|
|
21
|
+
isConnected: boolean;
|
|
21
22
|
getAncestorAttributeValue(attributeName: string): string;
|
|
22
23
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
23
24
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
24
25
|
publisher: any;
|
|
25
|
-
dataProvider:
|
|
26
|
+
dataProvider: string | null;
|
|
26
27
|
noShadowDom: string | null;
|
|
27
28
|
debug: HTMLElement | null;
|
|
28
29
|
defferedDebug: boolean | null;
|
|
29
|
-
makeShadow(props: Record<string, any>, value: any): any;
|
|
30
30
|
dispatchEvent(event: Event): void;
|
|
31
31
|
setAttribute(name: string, value: string): void;
|
|
32
32
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
@@ -59,7 +59,7 @@ export declare class Input extends Input_base {
|
|
|
59
59
|
size: "" | "xs" | "sm" | "lg";
|
|
60
60
|
list: "" | null;
|
|
61
61
|
placeholder: string;
|
|
62
|
-
readonly: boolean
|
|
62
|
+
readonly: boolean;
|
|
63
63
|
pattern: string | null;
|
|
64
64
|
min: string | null;
|
|
65
65
|
max: string | null;
|