@supersoniks/concorde 1.1.23 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/cli.js +0 -0
- package/concorde-core.bundle.js +25 -31
- package/concorde-core.es.js +25 -31
- package/core/components/functional/configuration/configuration.js +2 -1
- package/core/components/functional/date/date.js +2 -1
- package/core/components/functional/example/example.js +2 -1
- package/core/components/functional/fetch/fetch.d.ts +0 -31
- package/core/components/functional/fetch/fetch.js +3 -2
- package/core/components/functional/if/if.d.ts +0 -3
- package/core/components/functional/if/if.js +3 -2
- package/core/components/functional/list/list.d.ts +0 -17
- package/core/components/functional/list/list.js +4 -3
- package/core/components/functional/queue/queue.d.ts +1 -8
- package/core/components/functional/queue/queue.js +10 -2
- package/core/components/functional/router/redirect.d.ts +0 -9
- package/core/components/functional/router/redirect.js +3 -2
- package/core/components/functional/router/router.d.ts +0 -14
- package/core/components/functional/router/router.js +3 -2
- package/core/components/functional/sonic-scope/sonic-scope.js +2 -1
- package/core/components/functional/states/states.d.ts +0 -15
- package/core/components/functional/states/states.js +3 -2
- package/core/components/functional/submit/submit.d.ts +0 -11
- package/core/components/functional/submit/submit.js +3 -2
- package/core/components/functional/subscriber/subscriber.d.ts +0 -3
- package/core/components/functional/subscriber/subscriber.js +3 -2
- package/core/components/ui/alert/alert.js +11 -11
- package/core/components/ui/badge/badge.js +3 -2
- package/core/components/ui/button/button.d.ts +4 -8
- package/core/components/ui/button/button.js +16 -9
- package/core/components/ui/card/card-footer.js +7 -1
- package/core/components/ui/card/card-header-descripton.js +6 -1
- package/core/components/ui/card/card-header.js +7 -1
- package/core/components/ui/card/card-main.js +7 -1
- package/core/components/ui/card/card.js +7 -1
- package/core/components/ui/divider/divider.js +2 -1
- package/core/components/ui/form/checkbox/checkbox.d.ts +1 -20
- package/core/components/ui/form/checkbox/checkbox.js +4 -3
- package/core/components/ui/form/fieldset/fieldset.js +5 -3
- package/core/components/ui/form/fieldset/legend.d.ts +3 -2
- package/core/components/ui/form/fieldset/legend.js +24 -15
- package/core/components/ui/form/form-actions/form-actions.d.ts +5 -0
- package/core/components/ui/form/{form-layout → form-actions}/form-actions.js +13 -5
- package/core/components/ui/form/form-layout/form-layout.js +3 -2
- package/core/components/ui/form/input/input.d.ts +3 -10
- package/core/components/ui/form/input/input.js +3 -2
- package/core/components/ui/form/radio/radio.d.ts +0 -6
- package/core/components/ui/form/radio/radio.js +3 -2
- package/core/components/ui/form/select/select.d.ts +0 -7
- package/core/components/ui/form/select/select.js +4 -3
- package/core/components/ui/form/textarea/textarea.js +7 -1
- package/core/components/ui/group/group.js +3 -2
- package/core/components/ui/icon/icon.d.ts +0 -4
- package/core/components/ui/icon/icon.js +9 -5
- package/core/components/ui/icon/icons.js +43 -17
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/image/image.js +3 -2
- package/core/components/ui/link/link.js +6 -1
- package/core/components/ui/loader/loader.js +3 -2
- package/core/components/ui/menu/menu-item.js +5 -4
- package/core/components/ui/menu/menu.d.ts +2 -1
- package/core/components/ui/menu/menu.js +18 -13
- package/core/components/ui/modal/modal-actions.js +3 -2
- package/core/components/ui/modal/modal-close.js +4 -3
- package/core/components/ui/modal/modal-content.js +3 -2
- package/core/components/ui/modal/modal-subtitle.js +3 -2
- package/core/components/ui/modal/modal-title.js +3 -2
- package/core/components/ui/modal/modal.js +5 -4
- package/core/components/ui/pop/pop.js +3 -2
- package/core/components/ui/progress/progress.js +29 -7
- package/core/components/ui/table/table-caption.js +20 -2
- package/core/components/ui/table/table-tbody.js +8 -2
- package/core/components/ui/table/table-td.d.ts +3 -2
- package/core/components/ui/table/table-td.js +19 -11
- package/core/components/ui/table/table-tfoot.js +7 -1
- package/core/components/ui/table/table-th.d.ts +3 -1
- package/core/components/ui/table/table-th.js +27 -13
- package/core/components/ui/table/table-thead.js +8 -2
- package/core/components/ui/table/table-tr.js +7 -1
- package/core/components/ui/table/table.js +15 -2
- package/core/components/ui/tabs/tabs.js +2 -3
- package/core/components/ui/taxonomy/taxonomy.js +2 -1
- package/core/components/ui/theme/css/tailwind.css +0 -0
- package/core/components/ui/theme/css/tailwind.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +9 -8
- package/core/components/ui/theme/theme-collection/dark.js +0 -4
- package/core/components/ui/theme/theme-collection/light.js +0 -1
- package/core/components/ui/theme/theme.d.ts +0 -1
- package/core/components/ui/theme/theme.js +3 -6
- package/core/components/ui/toast/message-subscriber.js +2 -1
- package/core/components/ui/toast/toast-item.d.ts +1 -0
- package/core/components/ui/toast/toast-item.js +61 -31
- package/core/components/ui/toast/toast.js +7 -6
- package/core/components/ui/tooltip/tooltip.js +7 -1
- package/core/components/ui/ui.d.ts +1 -0
- package/core/components/ui/ui.js +1 -0
- package/core/mixins/FormCheckable.d.ts +1 -0
- package/core/mixins/FormCheckable.js +12 -0
- package/mixins.d.ts +1 -0
- package/package.json +3 -3
- package/core/components/ui/form/form-layout/form-actions.d.ts +0 -6
|
@@ -12,6 +12,7 @@ import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
|
12
12
|
import FormCheckable from "@supersoniks/concorde/core/mixins/FormCheckable";
|
|
13
13
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
14
14
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
15
|
+
const tagName = 'sonic-button';
|
|
15
16
|
/**
|
|
16
17
|
* Un bouton simple avec deux slots, un nommé préfix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
|
|
17
18
|
* * L'objet et ses slot sont en display flex avec direction / alignement et justifications configurables
|
|
@@ -46,7 +47,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
46
47
|
/**
|
|
47
48
|
* Propriété align-items de *flex* appliquée à l'élément contenant les *slots*
|
|
48
49
|
*/
|
|
49
|
-
this.
|
|
50
|
+
this.alignItems = "center";
|
|
50
51
|
/**
|
|
51
52
|
* Propriété justify-content de *flex* appliquée à l'élément contenant les *slots*
|
|
52
53
|
*/
|
|
@@ -54,7 +55,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
54
55
|
/**
|
|
55
56
|
* Propriété text-align du bouton
|
|
56
57
|
*/
|
|
57
|
-
this.
|
|
58
|
+
this.align = "center";
|
|
58
59
|
/**
|
|
59
60
|
* Propriété min-width du bouton
|
|
60
61
|
*/
|
|
@@ -142,9 +143,9 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
142
143
|
render() {
|
|
143
144
|
const btnStyles = {
|
|
144
145
|
flexDirection: this.direction,
|
|
145
|
-
alignItems: this.
|
|
146
|
+
alignItems: this.alignItems,
|
|
146
147
|
justifyContent: this.justify,
|
|
147
|
-
textAlign: this.
|
|
148
|
+
textAlign: this.align,
|
|
148
149
|
minWidth: this.minWidth,
|
|
149
150
|
};
|
|
150
151
|
const btn = html `
|
|
@@ -152,7 +153,7 @@ let Button = class Button extends FormCheckable(FormElement(Subscriber(LitElemen
|
|
|
152
153
|
<slot @slotchange=${this.onSlotChange} part="prefix" name="prefix"></slot>
|
|
153
154
|
<slot part="main" class="main-slot"></slot>
|
|
154
155
|
<slot @slotchange=${this.onSlotChange} part="suffix" name="suffix"></slot>
|
|
155
|
-
${this.loading == true ? html `<sonic-icon
|
|
156
|
+
${this.loading == true ? html `<sonic-icon name="loader" class="loader"></sonic-icon>` : ""}
|
|
156
157
|
</button>
|
|
157
158
|
`;
|
|
158
159
|
return this.href
|
|
@@ -363,6 +364,8 @@ Button.styles = [
|
|
|
363
364
|
/*OUTLINE*/
|
|
364
365
|
:host([variant="link"]) {
|
|
365
366
|
vertical-align: baseline;
|
|
367
|
+
margin-left:.25em;
|
|
368
|
+
margin-right:.25em;
|
|
366
369
|
}
|
|
367
370
|
|
|
368
371
|
:host([variant="link"]) button {
|
|
@@ -436,6 +439,10 @@ Button.styles = [
|
|
|
436
439
|
justify-content: center;*/
|
|
437
440
|
}
|
|
438
441
|
|
|
442
|
+
:host([minWidth]) .main-slot {
|
|
443
|
+
flex-grow:0;
|
|
444
|
+
}
|
|
445
|
+
|
|
439
446
|
slot[name="suffix"],
|
|
440
447
|
slot[name="prefix"] {
|
|
441
448
|
flex-shrink: 0;
|
|
@@ -517,13 +524,13 @@ __decorate([
|
|
|
517
524
|
], Button.prototype, "direction", void 0);
|
|
518
525
|
__decorate([
|
|
519
526
|
property({ type: String, reflect: true })
|
|
520
|
-
], Button.prototype, "
|
|
527
|
+
], Button.prototype, "alignItems", void 0);
|
|
521
528
|
__decorate([
|
|
522
529
|
property({ type: String })
|
|
523
530
|
], Button.prototype, "justify", void 0);
|
|
524
531
|
__decorate([
|
|
525
532
|
property({ type: String, reflect: true })
|
|
526
|
-
], Button.prototype, "
|
|
533
|
+
], Button.prototype, "align", void 0);
|
|
527
534
|
__decorate([
|
|
528
535
|
property({ type: String })
|
|
529
536
|
], Button.prototype, "minWidth", void 0);
|
|
@@ -561,12 +568,12 @@ __decorate([
|
|
|
561
568
|
property({ type: Boolean, reflect: true })
|
|
562
569
|
], Button.prototype, "active", void 0);
|
|
563
570
|
Button = __decorate([
|
|
564
|
-
customElement(
|
|
571
|
+
customElement(tagName)
|
|
565
572
|
], Button);
|
|
566
573
|
export { Button };
|
|
567
574
|
//Ajout pour Storybook
|
|
568
575
|
try {
|
|
569
|
-
customElements.define(
|
|
576
|
+
customElements.define(tagName, Button);
|
|
570
577
|
}
|
|
571
578
|
catch (e) { }
|
|
572
579
|
export const SonicButton = Button;
|
|
@@ -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-card-footer";
|
|
9
10
|
let CardFooter = class CardFooter extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `
|
|
@@ -22,6 +23,11 @@ CardFooter.styles = [
|
|
|
22
23
|
`
|
|
23
24
|
];
|
|
24
25
|
CardFooter = __decorate([
|
|
25
|
-
customElement(
|
|
26
|
+
customElement(tagName)
|
|
26
27
|
], CardFooter);
|
|
27
28
|
export { CardFooter };
|
|
29
|
+
//Ajout pour Storybook
|
|
30
|
+
try {
|
|
31
|
+
customElements.define(tagName, CardFooter);
|
|
32
|
+
}
|
|
33
|
+
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-card-header-description";
|
|
9
10
|
let CardHeaderDescription = class CardHeaderDescription extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `
|
|
@@ -28,6 +29,10 @@ CardHeaderDescription.styles = [
|
|
|
28
29
|
`
|
|
29
30
|
];
|
|
30
31
|
CardHeaderDescription = __decorate([
|
|
31
|
-
customElement(
|
|
32
|
+
customElement(tagName)
|
|
32
33
|
], CardHeaderDescription);
|
|
33
34
|
export { CardHeaderDescription };
|
|
35
|
+
try {
|
|
36
|
+
customElements.define(tagName, CardHeaderDescription);
|
|
37
|
+
}
|
|
38
|
+
catch (e) { }
|
|
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import '@supersoniks/concorde/core/components/ui/card/card-header-descripton';
|
|
10
|
+
const tagName = "sonic-card-header";
|
|
10
11
|
let CardHeader = class CardHeader extends LitElement {
|
|
11
12
|
render() {
|
|
12
13
|
return html `
|
|
@@ -62,6 +63,11 @@ __decorate([
|
|
|
62
63
|
property()
|
|
63
64
|
], CardHeader.prototype, "description", void 0);
|
|
64
65
|
CardHeader = __decorate([
|
|
65
|
-
customElement(
|
|
66
|
+
customElement(tagName)
|
|
66
67
|
], CardHeader);
|
|
67
68
|
export { CardHeader };
|
|
69
|
+
//Ajout pour Storybook
|
|
70
|
+
try {
|
|
71
|
+
customElements.define(tagName, CardHeader);
|
|
72
|
+
}
|
|
73
|
+
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-card-main";
|
|
9
10
|
let CardMain = class CardMain extends LitElement {
|
|
10
11
|
render() {
|
|
11
12
|
return html `
|
|
@@ -24,6 +25,11 @@ CardMain.styles = [
|
|
|
24
25
|
`
|
|
25
26
|
];
|
|
26
27
|
CardMain = __decorate([
|
|
27
|
-
customElement(
|
|
28
|
+
customElement(tagName)
|
|
28
29
|
], CardMain);
|
|
29
30
|
export { CardMain };
|
|
31
|
+
//Ajout pour Storybook
|
|
32
|
+
try {
|
|
33
|
+
customElements.define(tagName, CardMain);
|
|
34
|
+
}
|
|
35
|
+
catch (e) { }
|
|
@@ -9,6 +9,7 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
9
9
|
import "@supersoniks/concorde/core/components/ui/card/card-header";
|
|
10
10
|
import "@supersoniks/concorde/core/components/ui/card/card-main";
|
|
11
11
|
import "@supersoniks/concorde/core/components/ui/card/card-footer";
|
|
12
|
+
const tagName = "sonic-card";
|
|
12
13
|
let Card = class Card extends LitElement {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -85,6 +86,11 @@ __decorate([
|
|
|
85
86
|
property({ type: String, reflect: true })
|
|
86
87
|
], Card.prototype, "type", void 0);
|
|
87
88
|
Card = __decorate([
|
|
88
|
-
customElement(
|
|
89
|
+
customElement(tagName)
|
|
89
90
|
], Card);
|
|
90
91
|
export { Card };
|
|
92
|
+
//Ajout pour Storybook
|
|
93
|
+
try {
|
|
94
|
+
customElements.define(tagName, Card);
|
|
95
|
+
}
|
|
96
|
+
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, property, queryAssignedNodes, query } from "lit/decorators.js";
|
|
9
|
+
const tagName = "sonic-divider";
|
|
9
10
|
let Divider = class Divider extends LitElement {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
@@ -139,6 +140,6 @@ Divider = __decorate([
|
|
|
139
140
|
], Divider);
|
|
140
141
|
export { Divider };
|
|
141
142
|
try {
|
|
142
|
-
customElements.define(
|
|
143
|
+
customElements.define(tagName, Divider);
|
|
143
144
|
}
|
|
144
145
|
catch (e) { }
|
|
@@ -10,6 +10,7 @@ declare const Checkbox_base: {
|
|
|
10
10
|
radio: true | null;
|
|
11
11
|
_checked: true | null;
|
|
12
12
|
checked: true | null;
|
|
13
|
+
validateFormElement(): void;
|
|
13
14
|
setCheckedValue(checked: true | null): void;
|
|
14
15
|
handleChange(): void;
|
|
15
16
|
getValueForFormPublisher(): any;
|
|
@@ -87,26 +88,6 @@ declare const Checkbox_base: {
|
|
|
87
88
|
disconnectedCallback(): void;
|
|
88
89
|
};
|
|
89
90
|
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
90
|
-
/**
|
|
91
|
-
* ### Le composent sonic-checkbox étend les mixins FormCheckable, FormInput, FormElement et Subscriber
|
|
92
|
-
* **FormElement :**
|
|
93
|
-
* * La propriété value est remplie automatiquement a l'aide de l'attribut name renseigné, ceci en prenant la valeur de la propriété du même nom dans les données du dataprovider associé.
|
|
94
|
-
* * Par défault lorsque modifie l'input, la valeur est également mise à jour via le même dataprovider
|
|
95
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
96
|
-
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
97
|
-
* * **FormInput **
|
|
98
|
-
* Uniquement des propriétés classiques d'un input HTML. La prise en compte est ici partielle, par exemple les propriétés *placeholder*, *readonly*, *pattern*, *min* et *max* n'ont pas de sens pour un checkbox.
|
|
99
|
-
* **FormCheckable :**
|
|
100
|
-
* * La propriété checked mise à true si la valeur de la propriété du même nom dans les données du dataprovider associé contient un propriété checked.
|
|
101
|
-
* **Comportements :**
|
|
102
|
-
* * multiple (par défaut):
|
|
103
|
-
* - on peut cocher plusieurs checkbox ayant le même *name*.
|
|
104
|
-
* - la valeur enregistrée dans la propriété nommé du même nom dans formDataProvider est un tableau avec les *value* des cases cochées ayant le même *name*.
|
|
105
|
-
* * unique (Ajouter l'attribute unique au composant a l'intégration):
|
|
106
|
-
* - on ne peut cocher qu'une seule checkbox ayant le même *name*.
|
|
107
|
-
* * radio (Ajouter l'attribute radio au composant a l'intégration):
|
|
108
|
-
* Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
|
|
109
|
-
*/
|
|
110
91
|
export declare class Checkbox extends Checkbox_base {
|
|
111
92
|
static styles: CSSResultGroup[];
|
|
112
93
|
iconName: string;
|
|
@@ -32,6 +32,7 @@ import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
|
32
32
|
* * radio (Ajouter l'attribute radio au composant a l'intégration):
|
|
33
33
|
* Comme unique, mais on ne peut pas décocher la case sauf en en cochant une autre, comme un bouton radio.
|
|
34
34
|
*/
|
|
35
|
+
const tagName = "sonic-checkbox";
|
|
35
36
|
let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscriber(LitElement)))) {
|
|
36
37
|
constructor() {
|
|
37
38
|
super(...arguments);
|
|
@@ -63,7 +64,7 @@ let Checkbox = class Checkbox extends FormCheckable(FormInput(FormElement(Subscr
|
|
|
63
64
|
autofocus=${ifDefined(this.autofocus)}
|
|
64
65
|
|
|
65
66
|
/>
|
|
66
|
-
<sonic-icon
|
|
67
|
+
<sonic-icon
|
|
67
68
|
name="${this.iconName}" class="sc-input-icon"></sonic-icon>
|
|
68
69
|
</span>
|
|
69
70
|
<div class="checkbox-text">
|
|
@@ -192,11 +193,11 @@ __decorate([
|
|
|
192
193
|
property({ type: Boolean })
|
|
193
194
|
], Checkbox.prototype, "hasDescription", void 0);
|
|
194
195
|
Checkbox = __decorate([
|
|
195
|
-
customElement(
|
|
196
|
+
customElement(tagName)
|
|
196
197
|
], Checkbox);
|
|
197
198
|
export { Checkbox };
|
|
198
199
|
//Ajout pour Storybook
|
|
199
200
|
try {
|
|
200
|
-
customElements.define(
|
|
201
|
+
customElements.define(tagName, Checkbox);
|
|
201
202
|
}
|
|
202
203
|
catch (e) { }
|
|
@@ -8,6 +8,7 @@ import { html, LitElement, css } from "lit";
|
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
10
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
11
|
+
const tagName = "sonic-fieldset";
|
|
11
12
|
let Fieldset = class Fieldset extends Subscriber(LitElement) {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -31,7 +32,7 @@ Fieldset.styles = [
|
|
|
31
32
|
css `
|
|
32
33
|
:host {
|
|
33
34
|
--sc-fieldset-mt: 0;
|
|
34
|
-
--sc-fieldset-mb:
|
|
35
|
+
--sc-fieldset-mb: 1rem;
|
|
35
36
|
--sc-fieldset-border-color: var(--sc-base-200);
|
|
36
37
|
--sc-fieldset-border-width: var(--sc-form-border-width);
|
|
37
38
|
|
|
@@ -47,6 +48,7 @@ Fieldset.styles = [
|
|
|
47
48
|
all: unset;
|
|
48
49
|
display: contents;
|
|
49
50
|
}
|
|
51
|
+
|
|
50
52
|
::slotted(sonic-legend) {
|
|
51
53
|
margin-bottom: 1.5rem;
|
|
52
54
|
display: block;
|
|
@@ -60,11 +62,11 @@ __decorate([
|
|
|
60
62
|
property({ type: String })
|
|
61
63
|
], Fieldset.prototype, "form", void 0);
|
|
62
64
|
Fieldset = __decorate([
|
|
63
|
-
customElement(
|
|
65
|
+
customElement(tagName)
|
|
64
66
|
], Fieldset);
|
|
65
67
|
export { Fieldset };
|
|
66
68
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
67
69
|
try {
|
|
68
|
-
customElements.define(
|
|
70
|
+
customElements.define(tagName, Fieldset);
|
|
69
71
|
}
|
|
70
72
|
catch (e) { }
|
|
@@ -4,7 +4,8 @@ export declare class Legend extends LitElement {
|
|
|
4
4
|
static styles: import("lit").CSSResult[];
|
|
5
5
|
description: string;
|
|
6
6
|
label: string;
|
|
7
|
-
iconName
|
|
8
|
-
iconPrefix
|
|
7
|
+
iconName?: string;
|
|
8
|
+
iconPrefix?: string;
|
|
9
|
+
iconLibray?: string;
|
|
9
10
|
render(): import("lit-html").TemplateResult<1>;
|
|
10
11
|
}
|
|
@@ -7,33 +7,39 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import "@supersoniks/concorde/core/components/ui/form/fieldset/legend-description";
|
|
10
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
+
const tagName = "sonic-legend";
|
|
10
12
|
let Legend = class Legend extends LitElement {
|
|
11
13
|
constructor() {
|
|
12
14
|
super(...arguments);
|
|
13
15
|
this.description = "";
|
|
14
16
|
this.label = "";
|
|
15
|
-
this.iconName = "";
|
|
16
|
-
this.iconPrefix = "";
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
return html `<legend part="legend">
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
${this.iconName
|
|
21
|
+
? html `<div class="icon">
|
|
22
|
+
<sonic-icon
|
|
23
|
+
name=${this.iconName}
|
|
24
|
+
prefix=${ifDefined(this.iconPrefix)}
|
|
25
|
+
library=${ifDefined(this.iconLibray)}></sonic-icon>
|
|
26
|
+
</div>`
|
|
27
|
+
: ""}
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
<div class="legend-content">
|
|
30
|
+
${this.label}
|
|
31
|
+
${this.description ? html `<sonic-legend-description>${this.description}</sonic-legend-description>` : ""}
|
|
32
|
+
<slot></slot>
|
|
33
|
+
</div>
|
|
34
|
+
<slot name="suffix"></slot>
|
|
35
|
+
</legend>`;
|
|
30
36
|
}
|
|
31
37
|
};
|
|
32
38
|
Legend.styles = [
|
|
33
39
|
css `
|
|
34
40
|
:host {
|
|
35
|
-
--sc-legend-font-size: 1.
|
|
36
|
-
--sc-legend-font-weight: var(--sc-
|
|
41
|
+
--sc-legend-font-size: 1.75rem;
|
|
42
|
+
--sc-legend-font-weight: var(--sc-font-weight-base);
|
|
37
43
|
--sc-legend-font-style: var(--sc-headings-font-style);
|
|
38
44
|
--sc-legend-family: var(--sc-headings-font-family);
|
|
39
45
|
--sc-legend-line-height: var(--sc-headings-line-height);
|
|
@@ -77,12 +83,15 @@ __decorate([
|
|
|
77
83
|
__decorate([
|
|
78
84
|
property({ type: String })
|
|
79
85
|
], Legend.prototype, "iconPrefix", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
property({ type: String })
|
|
88
|
+
], Legend.prototype, "iconLibray", void 0);
|
|
80
89
|
Legend = __decorate([
|
|
81
|
-
customElement(
|
|
90
|
+
customElement(tagName)
|
|
82
91
|
], Legend);
|
|
83
92
|
export { Legend };
|
|
84
93
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
85
94
|
try {
|
|
86
|
-
customElements.define(
|
|
95
|
+
customElements.define(tagName, Legend);
|
|
87
96
|
}
|
|
88
97
|
catch (e) { }
|
|
@@ -4,20 +4,28 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, LitElement } from "lit";
|
|
7
|
+
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
|
|
10
|
-
let FormActions = class FormActions extends
|
|
9
|
+
const tagName = "sonic-form-actions";
|
|
10
|
+
let FormActions = class FormActions extends LitElement {
|
|
11
11
|
render() {
|
|
12
12
|
return html `<slot></slot>`;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
+
FormActions.styles = [
|
|
16
|
+
css `
|
|
17
|
+
:host{
|
|
18
|
+
display:flex;
|
|
19
|
+
gap:.3rem;
|
|
20
|
+
}
|
|
21
|
+
`
|
|
22
|
+
];
|
|
15
23
|
FormActions = __decorate([
|
|
16
|
-
customElement(
|
|
24
|
+
customElement(tagName)
|
|
17
25
|
], FormActions);
|
|
18
26
|
export { FormActions };
|
|
19
27
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
20
28
|
try {
|
|
21
|
-
customElements.define(
|
|
29
|
+
customElements.define(tagName, FormActions);
|
|
22
30
|
}
|
|
23
31
|
catch (e) { }
|
|
@@ -8,6 +8,7 @@ import { html, LitElement, css } from "lit";
|
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
9
|
import { ResizeController } from "@lit-labs/observers/resize_controller.js";
|
|
10
10
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
11
|
+
const tagName = "sonic-form-layout";
|
|
11
12
|
let FormLayout = class FormLayout extends Subscriber(LitElement) {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
@@ -48,11 +49,11 @@ FormLayout.styles = [
|
|
|
48
49
|
`,
|
|
49
50
|
];
|
|
50
51
|
FormLayout = __decorate([
|
|
51
|
-
customElement(
|
|
52
|
+
customElement(tagName)
|
|
52
53
|
], FormLayout);
|
|
53
54
|
export { FormLayout };
|
|
54
55
|
//Ajout pour la creation du cem notamment pour Storybook
|
|
55
56
|
try {
|
|
56
|
-
customElements.define(
|
|
57
|
+
customElements.define(tagName, FormLayout);
|
|
57
58
|
}
|
|
58
59
|
catch (e) { }
|
|
@@ -35,6 +35,9 @@ declare const Input_base: {
|
|
|
35
35
|
removeAttribute(name: string): void;
|
|
36
36
|
initPublisher(): void;
|
|
37
37
|
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
38
|
+
/**
|
|
39
|
+
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
40
|
+
*/
|
|
38
41
|
connectedCallback(): void;
|
|
39
42
|
requestUpdate(): void;
|
|
40
43
|
getAttribute(name: string): string;
|
|
@@ -42,16 +45,6 @@ declare const Input_base: {
|
|
|
42
45
|
disconnectedCallback(): void;
|
|
43
46
|
};
|
|
44
47
|
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
45
|
-
/**
|
|
46
|
-
* ### Le composent sonic-input étend les mixins FormInput, FormElement et Subscriber
|
|
47
|
-
* **FormElement :**
|
|
48
|
-
* * La propriété value est remplie automatiquement a l'aide de l'attribut name renseigné, ceci en prenant la valeur de la propriété du même nom dans les données du dataprovider associé.
|
|
49
|
-
* * Par défault lorsque l'on édite l'input, la valeur est également mise à jour via le même dataprovider
|
|
50
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
51
|
-
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
52
|
-
* **FormInput :**
|
|
53
|
-
* Uniquement des propriétés classiques d'un input HTML.
|
|
54
|
-
*/
|
|
55
48
|
export declare class Input extends Input_base {
|
|
56
49
|
static styles: import("lit").CSSResult[];
|
|
57
50
|
/**
|
|
@@ -22,6 +22,7 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
22
22
|
* **FormInput :**
|
|
23
23
|
* Uniquement des propriétés classiques d'un input HTML.
|
|
24
24
|
*/
|
|
25
|
+
const tagName = "sonic-input";
|
|
25
26
|
let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
26
27
|
constructor() {
|
|
27
28
|
super(...arguments);
|
|
@@ -170,11 +171,11 @@ __decorate([
|
|
|
170
171
|
state()
|
|
171
172
|
], Input.prototype, "hasPrefix", void 0);
|
|
172
173
|
Input = __decorate([
|
|
173
|
-
customElement(
|
|
174
|
+
customElement(tagName)
|
|
174
175
|
], Input);
|
|
175
176
|
export { Input };
|
|
176
177
|
//Ajout pour Storybook
|
|
177
178
|
try {
|
|
178
|
-
customElements.define(
|
|
179
|
+
customElements.define(tagName, Input);
|
|
179
180
|
}
|
|
180
181
|
catch (e) { }
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { Checkbox } from "../checkbox/checkbox";
|
|
2
|
-
/**
|
|
3
|
-
* ### Le composant sonic-radio étend sonic-checkbox en assignant sa propriété radio à true.
|
|
4
|
-
*
|
|
5
|
-
* * Le type d'input html utilisé passe également de checkbox à radio.
|
|
6
|
-
* * Le comportement est donc similaire à un bouton radio classique mais avec les fonctionnalités de sonic-checkbox (ie : Subscriber / FormElement / FormCheckable).
|
|
7
|
-
*/
|
|
8
2
|
export declare class Radio extends Checkbox {
|
|
9
3
|
static styles: (import("lit").CSSResult | import("lit").CSSResultGroup[])[];
|
|
10
4
|
constructor();
|
|
@@ -13,6 +13,7 @@ import { Checkbox } from "../checkbox/checkbox";
|
|
|
13
13
|
* * Le type d'input html utilisé passe également de checkbox à radio.
|
|
14
14
|
* * Le comportement est donc similaire à un bouton radio classique mais avec les fonctionnalités de sonic-checkbox (ie : Subscriber / FormElement / FormCheckable).
|
|
15
15
|
*/
|
|
16
|
+
const tagName = "sonic-radio";
|
|
16
17
|
let Radio = class Radio extends Checkbox {
|
|
17
18
|
constructor() {
|
|
18
19
|
super();
|
|
@@ -45,11 +46,11 @@ Radio.styles = [
|
|
|
45
46
|
`,
|
|
46
47
|
];
|
|
47
48
|
Radio = __decorate([
|
|
48
|
-
customElement(
|
|
49
|
+
customElement(tagName)
|
|
49
50
|
], Radio);
|
|
50
51
|
export { Radio };
|
|
51
52
|
//Ajout pour Storybook
|
|
52
53
|
try {
|
|
53
|
-
customElements.define(
|
|
54
|
+
customElements.define(tagName, Radio);
|
|
54
55
|
}
|
|
55
56
|
catch (e) { }
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
3
|
declare const Select_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
4
|
-
/**
|
|
5
|
-
* #### FormElement :
|
|
6
|
-
* * La propriété value est remplie automatiquement a l'aide de l'attribut name renseigné, ceci en prenant la valeur de la propriété du même nom dans les données du dataprovider associé.
|
|
7
|
-
* * Par défault lorsque l'on édite l'input, la valeur est également mise à jour via le même dataprovider
|
|
8
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
9
|
-
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
10
|
-
*/
|
|
11
4
|
export declare class Select extends Select_base {
|
|
12
5
|
static styles: import("lit").CSSResult[];
|
|
13
6
|
valueKey: string;
|
|
@@ -21,6 +21,7 @@ import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
|
21
21
|
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
22
22
|
* * Par conséquent on peut par exemple le lier à un composant *queue* (via sa propriété *dataFilterProvider*) de manière à appeller en auto une api avec des filtres.
|
|
23
23
|
*/
|
|
24
|
+
const tagName = "sonic-select";
|
|
24
25
|
let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
25
26
|
constructor() {
|
|
26
27
|
super(...arguments);
|
|
@@ -131,7 +132,7 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
131
132
|
})}
|
|
132
133
|
<slot></slot>
|
|
133
134
|
</select>
|
|
134
|
-
<sonic-icon
|
|
135
|
+
<sonic-icon name="nav-arrow-down" size="${this.size}"></sonic-icon>
|
|
135
136
|
</div>
|
|
136
137
|
<slot name="suffix" @slotchange=${this.onSlotChange}></slot>
|
|
137
138
|
</div>
|
|
@@ -222,11 +223,11 @@ __decorate([
|
|
|
222
223
|
state()
|
|
223
224
|
], Select.prototype, "hasPrefix", void 0);
|
|
224
225
|
Select = __decorate([
|
|
225
|
-
customElement(
|
|
226
|
+
customElement(tagName)
|
|
226
227
|
], Select);
|
|
227
228
|
export { Select };
|
|
228
229
|
//Ajout pour Storybook
|
|
229
230
|
try {
|
|
230
|
-
customElements.define(
|
|
231
|
+
customElements.define(tagName, Select);
|
|
231
232
|
}
|
|
232
233
|
catch (e) { }
|
|
@@ -11,6 +11,7 @@ import { formControl } from "../css/form-control";
|
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
12
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
13
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
14
|
+
const tagName = "sonic-textarea";
|
|
14
15
|
let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
@@ -155,6 +156,11 @@ __decorate([
|
|
|
155
156
|
property()
|
|
156
157
|
], Textarea.prototype, "slotClasses", void 0);
|
|
157
158
|
Textarea = __decorate([
|
|
158
|
-
customElement(
|
|
159
|
+
customElement(tagName)
|
|
159
160
|
], Textarea);
|
|
160
161
|
export { Textarea };
|
|
162
|
+
//Ajout pour Storybook
|
|
163
|
+
try {
|
|
164
|
+
customElements.define(tagName, Textarea);
|
|
165
|
+
}
|
|
166
|
+
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-group";
|
|
9
10
|
let Group = class Group extends LitElement {
|
|
10
11
|
updated() {
|
|
11
12
|
const children = this.querySelectorAll("sonic-input, sonic-button");
|
|
@@ -48,10 +49,10 @@ Group.styles = [
|
|
|
48
49
|
`,
|
|
49
50
|
];
|
|
50
51
|
Group = __decorate([
|
|
51
|
-
customElement(
|
|
52
|
+
customElement(tagName)
|
|
52
53
|
], Group);
|
|
53
54
|
export { Group };
|
|
54
55
|
try {
|
|
55
|
-
customElements.define(
|
|
56
|
+
customElements.define(tagName, Group);
|
|
56
57
|
}
|
|
57
58
|
catch (e) { }
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
|
|
4
|
-
* les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
|
|
5
|
-
*/
|
|
6
2
|
export declare class Icon extends LitElement {
|
|
7
3
|
static styles: import("lit").CSSResult;
|
|
8
4
|
updateIcon(): Promise<void>;
|