@supersoniks/concorde 1.1.28 → 1.1.30
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 +21 -22
- package/concorde-core.es.js +22 -23
- package/core/components/functional/subscriber/subscriber.d.ts +2 -1
- package/core/components/functional/subscriber/subscriber.js +8 -0
- package/core/components/ui/_css/size.d.ts +1 -0
- package/core/components/ui/_css/size.js +26 -0
- package/core/components/ui/_css/type.d.ts +2 -0
- package/core/components/ui/_css/{types.js → type.js} +1 -1
- package/core/components/ui/alert/alert.d.ts +1 -1
- package/core/components/ui/alert/alert.js +6 -15
- package/core/components/ui/badge/badge.d.ts +1 -1
- package/core/components/ui/badge/badge.js +7 -6
- package/core/components/ui/button/button.d.ts +11 -6
- package/core/components/ui/button/button.js +32 -35
- package/core/components/ui/card/card-header.js +1 -1
- package/core/components/ui/divider/divider.d.ts +1 -1
- package/core/components/ui/divider/divider.js +7 -3
- package/core/components/ui/form/checkbox/checkbox.d.ts +11 -9
- package/core/components/ui/form/checkbox/checkbox.js +10 -6
- package/core/components/ui/form/css/form-control.js +56 -31
- package/core/components/ui/form/input/input.d.ts +23 -19
- package/core/components/ui/form/input/input.js +35 -33
- package/core/components/ui/form/radio/radio.js +1 -2
- package/core/components/ui/form/select/select.d.ts +9 -9
- package/core/components/ui/form/select/select.js +8 -14
- package/core/components/ui/form/textarea/textarea.d.ts +18 -17
- package/core/components/ui/form/textarea/textarea.js +12 -23
- package/core/components/ui/icon/icon.js +4 -0
- package/core/components/ui/image/image.d.ts +0 -1
- package/core/components/ui/image/image.js +0 -23
- package/core/components/ui/pop/pop.d.ts +1 -0
- package/core/components/ui/pop/pop.js +8 -0
- package/core/components/ui/progress/progress.d.ts +1 -0
- package/core/components/ui/progress/progress.js +13 -20
- package/core/components/ui/table/table-td.d.ts +1 -0
- package/core/components/ui/table/table-td.js +6 -2
- package/core/components/ui/table/table-th.js +2 -2
- package/core/components/ui/table/table-tr.js +3 -2
- package/core/components/ui/table/table.d.ts +1 -1
- package/core/components/ui/table/table.js +3 -20
- 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 +19 -8
- package/core/components/ui/theme/theme.d.ts +8 -1
- package/core/components/ui/theme/theme.js +42 -1
- package/core/components/ui/toast/toast-item.js +1 -1
- package/core/mixins/FormCheckable.d.ts +3 -2
- package/core/mixins/FormCheckable.js +5 -2
- package/core/mixins/FormElement.d.ts +3 -2
- package/core/mixins/FormElement.js +8 -4
- package/core/mixins/FormInput.d.ts +6 -5
- package/core/mixins/FormInput.js +1 -3
- package/mixins.d.ts +8 -6
- package/package.json +5 -3
- package/core/components/ui/_css/types.d.ts +0 -2
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export const formControl = css `
|
|
3
|
+
|
|
3
4
|
* {
|
|
4
5
|
box-sizing: border-box;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
:host {
|
|
8
|
-
--sc-input-height: var(--sc-form-height
|
|
9
|
-
--sc-input-border-width: var(--sc-form-border-width
|
|
10
|
-
--sc-input-color: var(--sc-base-content
|
|
9
|
+
--sc-input-height: var(--sc-form-height);
|
|
10
|
+
--sc-input-border-width: var(--sc-form-border-width);
|
|
11
|
+
--sc-input-color: var(--sc-base-content);
|
|
11
12
|
|
|
12
|
-
--sc-item-rounded-tr: var(--sc-input-rounded
|
|
13
|
-
--sc-item-rounded-tl: var(--sc-input-rounded
|
|
14
|
-
--sc-item-rounded-bl: var(--sc-input-rounded
|
|
15
|
-
--sc-item-rounded-br: var(--sc-input-rounded
|
|
13
|
+
--sc-item-rounded-tr: var(--sc-input-rounded);
|
|
14
|
+
--sc-item-rounded-tl: var(--sc-input-rounded);
|
|
15
|
+
--sc-item-rounded-bl: var(--sc-input-rounded);
|
|
16
|
+
--sc-item-rounded-br: var(--sc-input-rounded);
|
|
16
17
|
|
|
18
|
+
--sc-input-fs: var(--sc-fs, 1rem) ;
|
|
17
19
|
--sc-input-ff: inherit;
|
|
18
20
|
--sc-input-py: 0.6em;
|
|
19
21
|
--sc-input-px: 1.15em;
|
|
@@ -25,8 +27,9 @@ export const formControl = css `
|
|
|
25
27
|
--sc-input-suffix-color: var(--sc-input-color);
|
|
26
28
|
--sc-input-suffix-bg: var(--sc-input-bg);
|
|
27
29
|
--sc-input-suffix-border-color: var(--sc-input-border-color);
|
|
28
|
-
|
|
29
|
-
--sc-label-
|
|
30
|
+
|
|
31
|
+
--sc-label-fs: var(--sc-fs, 1rem);
|
|
32
|
+
--sc-label-fw: var(--sc-label-font-weight);
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
.form-element {
|
|
@@ -112,7 +115,8 @@ export const formControl = css `
|
|
|
112
115
|
display: flex;
|
|
113
116
|
flex-wrap: wrap;
|
|
114
117
|
align-items: center;
|
|
115
|
-
gap: 0.
|
|
118
|
+
gap: 0.35em;
|
|
119
|
+
min-height: var(--sc-form-height);
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
/*Disabled */
|
|
@@ -120,27 +124,10 @@ export const formControl = css `
|
|
|
120
124
|
cursor: not-allowed;
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
/*SIZE*/
|
|
124
|
-
:host {
|
|
125
|
-
--sc-input-fs: 1rem;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
:host([size="xs"]) {
|
|
129
|
-
--sc-input-fs: 0.75rem;
|
|
130
|
-
}
|
|
131
|
-
:host([size="sm"]) {
|
|
132
|
-
--sc-input-fs: 0.85rem;
|
|
133
|
-
}
|
|
134
|
-
:host([size="lg"]) {
|
|
135
|
-
--sc-input-fs: 1.2rem;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
127
|
:host([variant="ghost"]) .form-element {
|
|
139
128
|
--sc-input-bg: transparent;
|
|
140
129
|
}
|
|
141
130
|
|
|
142
|
-
|
|
143
|
-
|
|
144
131
|
/*Disbaled*/
|
|
145
132
|
:host([disabled]) .form-element {
|
|
146
133
|
pointer-events: none;
|
|
@@ -202,23 +189,61 @@ export const formControl = css `
|
|
|
202
189
|
display:none;
|
|
203
190
|
}
|
|
204
191
|
|
|
205
|
-
:host([touched]) :not(:focus):invalid {
|
|
192
|
+
:host([touched][required]) :not(:focus):invalid {
|
|
206
193
|
--sc-input-border-color: var(--sc-danger);
|
|
207
194
|
--sc-input-color: var(--sc-danger);
|
|
208
195
|
}
|
|
209
196
|
|
|
210
|
-
:host([touched]) :not(:focus):invalid + .select-chevron{
|
|
197
|
+
:host([touched][required]) :not(:focus):invalid + .select-chevron{
|
|
211
198
|
--sc-input-color: var(--sc-danger);
|
|
212
199
|
}
|
|
213
200
|
|
|
214
201
|
/*VALID*/
|
|
215
|
-
:host([touched]) :not([value=""]):not(:focus):valid {
|
|
202
|
+
:host([touched][required]) :not([value=""]):not(:focus):valid {
|
|
216
203
|
--sc-input-border-color: var(--sc-success);
|
|
217
204
|
--sc-input-color: var(--sc-success);
|
|
218
205
|
}
|
|
219
206
|
|
|
220
|
-
:host([touched]) :not(:focus):valid + .select-chevron{
|
|
207
|
+
:host([touched][required]) :not(:focus):valid + .select-chevron{
|
|
221
208
|
--sc-input-color: var(--sc-success);
|
|
222
209
|
}
|
|
223
210
|
|
|
211
|
+
/*Input COLOR*/
|
|
212
|
+
:host([type="color"]) .form-element {
|
|
213
|
+
padding: 0;
|
|
214
|
+
border: 0;
|
|
215
|
+
min-width: var(--sc-input-height);
|
|
216
|
+
}
|
|
217
|
+
input[type="color"]::-webkit-color-swatch-wrapper {
|
|
218
|
+
padding: 0;
|
|
219
|
+
}
|
|
220
|
+
input[type="color"]::-webkit-color-swatch {
|
|
221
|
+
border: none;
|
|
222
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br)
|
|
223
|
+
var(--sc-item-rounded-bl);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/*Input Image*/
|
|
227
|
+
:host([type="image"]) .form-element {
|
|
228
|
+
padding: 0;
|
|
229
|
+
border:none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/*Input reset & image*/
|
|
233
|
+
input[type="reset"],
|
|
234
|
+
input[type="submit"] {
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/*Input search*/
|
|
239
|
+
input[type="search"]::-webkit-search-cancel-button {
|
|
240
|
+
appearance:none;
|
|
241
|
+
cursor:pointer;
|
|
242
|
+
height: .65em;
|
|
243
|
+
width: .65em;
|
|
244
|
+
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);
|
|
245
|
+
background-size: contain;
|
|
246
|
+
background-repeat: no-repeat;
|
|
247
|
+
}
|
|
248
|
+
|
|
224
249
|
`;
|
|
@@ -3,16 +3,17 @@ declare const Input_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
5
5
|
type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
|
|
6
|
-
tabindex
|
|
7
|
-
autocomplete
|
|
6
|
+
tabindex?: number | undefined;
|
|
7
|
+
autocomplete?: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
|
|
8
8
|
getFormPublisher(): any;
|
|
9
9
|
updateDataValue(): void;
|
|
10
10
|
handleChange(e?: any): void;
|
|
11
|
+
handleBlur(e?: any): void;
|
|
11
12
|
getValueForFormPublisher(): any;
|
|
12
|
-
error:
|
|
13
|
+
error: boolean;
|
|
13
14
|
autofocus: boolean;
|
|
15
|
+
required: boolean;
|
|
14
16
|
disabled: true | null;
|
|
15
|
-
required: true | null;
|
|
16
17
|
formDataProvider: string;
|
|
17
18
|
_value: any;
|
|
18
19
|
value: any;
|
|
@@ -47,29 +48,32 @@ export declare class Input extends Input_base {
|
|
|
47
48
|
/**
|
|
48
49
|
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
49
50
|
*/
|
|
50
|
-
size
|
|
51
|
-
list
|
|
52
|
-
placeholder
|
|
51
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
52
|
+
list?: string;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
pattern?: string;
|
|
55
|
+
min?: string;
|
|
56
|
+
max?: string;
|
|
53
57
|
readonly: boolean;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
label: string;
|
|
61
|
-
description: string;
|
|
58
|
+
step?: number;
|
|
59
|
+
minlength?: number;
|
|
60
|
+
maxlength?: number;
|
|
61
|
+
src?: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
description?: string;
|
|
62
64
|
inlineContent: boolean;
|
|
63
65
|
slotLabelNodes: Array<Node>;
|
|
64
66
|
slotDescriptionNodes: Array<Node>;
|
|
65
67
|
slotSuffixNodes: Array<Node>;
|
|
66
68
|
slotPrefixNodes: Array<Node>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
input: HTMLInputElement;
|
|
70
|
+
hasDescription: boolean;
|
|
71
|
+
hasLabel: boolean;
|
|
72
|
+
hasSuffix: boolean;
|
|
73
|
+
hasPrefix: boolean;
|
|
71
74
|
updated(): void;
|
|
72
75
|
onSlotChange(): void;
|
|
76
|
+
inlineContentFocus(): void;
|
|
73
77
|
render(): import("lit-html").TemplateResult<1>;
|
|
74
78
|
}
|
|
75
79
|
export {};
|
|
@@ -6,12 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement } from "lit";
|
|
8
8
|
import { customElement, property, queryAssignedNodes, state } from "lit/decorators.js";
|
|
9
|
+
import { query } from 'lit/decorators/query.js';
|
|
9
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
11
|
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
12
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
13
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
14
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
14
15
|
import { classMap } from "lit/directives/class-map.js";
|
|
16
|
+
import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
15
17
|
/**
|
|
16
18
|
* ### Le composent sonic-input étend les mixins FormInput, FormElement et Subscriber
|
|
17
19
|
* **FormElement :**
|
|
@@ -26,25 +28,7 @@ const tagName = "sonic-input";
|
|
|
26
28
|
let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
27
29
|
constructor() {
|
|
28
30
|
super(...arguments);
|
|
29
|
-
/**
|
|
30
|
-
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
31
|
-
*/
|
|
32
|
-
this.size = "";
|
|
33
|
-
this.list = null;
|
|
34
|
-
this.placeholder = "";
|
|
35
31
|
this.readonly = false;
|
|
36
|
-
this.pattern = null;
|
|
37
|
-
this.min = null;
|
|
38
|
-
this.max = null;
|
|
39
|
-
this.step = null;
|
|
40
|
-
this.minlength = null;
|
|
41
|
-
this.maxlength = null;
|
|
42
|
-
/*
|
|
43
|
-
* TODO
|
|
44
|
-
* Mutualiser avec le composant select
|
|
45
|
-
*/
|
|
46
|
-
this.label = "";
|
|
47
|
-
this.description = "";
|
|
48
32
|
this.inlineContent = false;
|
|
49
33
|
this.hasDescription = false;
|
|
50
34
|
this.hasLabel = false;
|
|
@@ -61,6 +45,13 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
61
45
|
onSlotChange() {
|
|
62
46
|
this.requestUpdate();
|
|
63
47
|
}
|
|
48
|
+
inlineContentFocus() {
|
|
49
|
+
var _a;
|
|
50
|
+
if (!this.inlineContent)
|
|
51
|
+
return;
|
|
52
|
+
console.log('oypouaze');
|
|
53
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
54
|
+
}
|
|
64
55
|
render() {
|
|
65
56
|
const slotClasses = {
|
|
66
57
|
"has-prefix": this.hasPrefix,
|
|
@@ -71,31 +62,33 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
71
62
|
>${this.label ? this.label : ""}<slot name="label" @slotchange=${this.onSlotChange}></slot
|
|
72
63
|
></label>
|
|
73
64
|
|
|
74
|
-
<div class="form-control ${classMap(slotClasses)}">
|
|
65
|
+
<div @click=${this.inlineContentFocus} class="form-control ${classMap(slotClasses)}">
|
|
75
66
|
<div class=" ${this.inlineContent ? "form-element form-element-wrapper" : "contents"}">
|
|
76
67
|
<slot name="prefix" @slotchange=${this.onSlotChange}></slot>
|
|
77
68
|
<input
|
|
78
69
|
id="form-element"
|
|
79
70
|
part="input"
|
|
80
71
|
class="form-element input"
|
|
81
|
-
type=${this.type}
|
|
82
72
|
@input=${this.handleChange}
|
|
83
|
-
|
|
73
|
+
@blur=${this.handleBlur}
|
|
74
|
+
type=${this.type}
|
|
75
|
+
disabled=${ifDefined(this.disabled)}
|
|
84
76
|
?readonly=${this.readonly}
|
|
77
|
+
?autofocus=${this.autofocus}
|
|
85
78
|
list=${ifDefined(this.list)}
|
|
86
|
-
autofocus=${ifDefined(this.autofocus)}
|
|
87
|
-
required=${ifDefined(this.required)}
|
|
88
79
|
tabindex=${ifDefined(this.tabindex)}
|
|
89
80
|
pattern=${ifDefined(this.pattern)}
|
|
90
81
|
min=${ifDefined(this.min)}
|
|
91
82
|
max=${ifDefined(this.max)}
|
|
92
83
|
step=${ifDefined(this.step)}
|
|
84
|
+
src=${ifDefined(this.src)}
|
|
93
85
|
minlength=${ifDefined(this.minlength)}
|
|
94
86
|
maxlength=${ifDefined(this.maxlength)}
|
|
95
|
-
placeholder
|
|
87
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
88
|
+
required=${ifDefined(this.required)}
|
|
89
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
96
90
|
.name=${this.name}
|
|
97
91
|
.value=${this.value}
|
|
98
|
-
autocomplete=${ifDefined(this.autocomplete)}
|
|
99
92
|
/>
|
|
100
93
|
<slot name="suffix" @slotchange=${this.onSlotChange}></slot>
|
|
101
94
|
</div>
|
|
@@ -106,9 +99,12 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
106
99
|
`;
|
|
107
100
|
}
|
|
108
101
|
};
|
|
109
|
-
Input.styles = [
|
|
102
|
+
Input.styles = [
|
|
103
|
+
fontSize,
|
|
104
|
+
formControl
|
|
105
|
+
];
|
|
110
106
|
__decorate([
|
|
111
|
-
property({ type: String })
|
|
107
|
+
property({ type: String, reflect: true })
|
|
112
108
|
], Input.prototype, "size", void 0);
|
|
113
109
|
__decorate([
|
|
114
110
|
property({ type: String })
|
|
@@ -116,9 +112,6 @@ __decorate([
|
|
|
116
112
|
__decorate([
|
|
117
113
|
property({ type: String })
|
|
118
114
|
], Input.prototype, "placeholder", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
property({ type: Boolean })
|
|
121
|
-
], Input.prototype, "readonly", void 0);
|
|
122
115
|
__decorate([
|
|
123
116
|
property({ type: String })
|
|
124
117
|
], Input.prototype, "pattern", void 0);
|
|
@@ -129,14 +122,20 @@ __decorate([
|
|
|
129
122
|
property({ type: String })
|
|
130
123
|
], Input.prototype, "max", void 0);
|
|
131
124
|
__decorate([
|
|
132
|
-
property({ type:
|
|
125
|
+
property({ type: Boolean })
|
|
126
|
+
], Input.prototype, "readonly", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: Number })
|
|
133
129
|
], Input.prototype, "step", void 0);
|
|
134
130
|
__decorate([
|
|
135
|
-
property({ type:
|
|
131
|
+
property({ type: Number })
|
|
136
132
|
], Input.prototype, "minlength", void 0);
|
|
137
133
|
__decorate([
|
|
138
|
-
property({ type:
|
|
134
|
+
property({ type: Number })
|
|
139
135
|
], Input.prototype, "maxlength", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
property({ type: String })
|
|
138
|
+
], Input.prototype, "src", void 0);
|
|
140
139
|
__decorate([
|
|
141
140
|
property({ type: String })
|
|
142
141
|
], Input.prototype, "label", void 0);
|
|
@@ -158,6 +157,9 @@ __decorate([
|
|
|
158
157
|
__decorate([
|
|
159
158
|
queryAssignedNodes({ slot: "prefix" })
|
|
160
159
|
], Input.prototype, "slotPrefixNodes", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
query('input')
|
|
162
|
+
], Input.prototype, "input", void 0);
|
|
161
163
|
__decorate([
|
|
162
164
|
state()
|
|
163
165
|
], Input.prototype, "hasDescription", void 0);
|
|
@@ -17,9 +17,9 @@ const tagName = "sonic-radio";
|
|
|
17
17
|
let Radio = class Radio extends Checkbox {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
20
|
+
this.radio = true;
|
|
20
21
|
}
|
|
21
22
|
connectedCallback() {
|
|
22
|
-
this.radio = true;
|
|
23
23
|
// this.iconName = "circle-small";
|
|
24
24
|
// this.iconPrefix = "solid";
|
|
25
25
|
super.connectedCallback();
|
|
@@ -32,7 +32,6 @@ Radio.styles = [
|
|
|
32
32
|
:host input {
|
|
33
33
|
border-radius: 50%;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
35
|
:host sonic-icon {
|
|
37
36
|
border-radius: 50%;
|
|
38
37
|
overflow: hidden;
|
|
@@ -5,9 +5,9 @@ export declare class Select extends Select_base {
|
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
valueKey: string;
|
|
7
7
|
wordingKey: string;
|
|
8
|
-
multiple:
|
|
9
|
-
size
|
|
10
|
-
selectSize
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
10
|
+
selectSize?: number;
|
|
11
11
|
private _options;
|
|
12
12
|
set options(value: Array<any>);
|
|
13
13
|
get options(): Array<any>;
|
|
@@ -15,16 +15,16 @@ export declare class Select extends Select_base {
|
|
|
15
15
|
get value(): string;
|
|
16
16
|
set value(value: string);
|
|
17
17
|
connectedCallback(): void;
|
|
18
|
-
label
|
|
19
|
-
description
|
|
18
|
+
label?: string;
|
|
19
|
+
description?: string;
|
|
20
20
|
slotLabelNodes: Array<Node>;
|
|
21
21
|
slotDescriptionNodes: Array<Node>;
|
|
22
22
|
slotSuffixNodes: Array<Node>;
|
|
23
23
|
slotPrefixNodes: Array<Node>;
|
|
24
|
-
hasDescription:
|
|
25
|
-
hasLabel:
|
|
26
|
-
hasSuffix:
|
|
27
|
-
hasPrefix:
|
|
24
|
+
hasDescription: boolean;
|
|
25
|
+
hasLabel: boolean;
|
|
26
|
+
hasSuffix: boolean;
|
|
27
|
+
hasPrefix: boolean;
|
|
28
28
|
updated(): void;
|
|
29
29
|
onSlotChange(): void;
|
|
30
30
|
validateFormElement(): void;
|
|
@@ -27,17 +27,9 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
27
27
|
super(...arguments);
|
|
28
28
|
this.valueKey = "value";
|
|
29
29
|
this.wordingKey = "wording";
|
|
30
|
-
this.multiple =
|
|
31
|
-
this.size = "";
|
|
32
|
-
this.selectSize = null;
|
|
30
|
+
this.multiple = false;
|
|
33
31
|
this._options = [];
|
|
34
32
|
this._value = "";
|
|
35
|
-
/*
|
|
36
|
-
* TODO
|
|
37
|
-
* Mutualiser avec le composant select
|
|
38
|
-
*/
|
|
39
|
-
this.label = "";
|
|
40
|
-
this.description = "";
|
|
41
33
|
this.hasDescription = false;
|
|
42
34
|
this.hasLabel = false;
|
|
43
35
|
this.hasSuffix = false;
|
|
@@ -117,10 +109,12 @@ let Select = class Select extends FormElement(Subscriber(LitElement)) {
|
|
|
117
109
|
<div class="form-select-wrapper">
|
|
118
110
|
<select
|
|
119
111
|
@change=${this.handleChange}
|
|
120
|
-
|
|
112
|
+
@blur=${this.handleBlur}
|
|
113
|
+
disabled=${ifDefined(this.disabled)}
|
|
114
|
+
?required=${this.required}
|
|
115
|
+
?multiple=${this.multiple}
|
|
121
116
|
size=${ifDefined(this.selectSize)}
|
|
122
|
-
autofocus=${
|
|
123
|
-
required=${ifDefined(this.required)}
|
|
117
|
+
?autofocus=${this.autofocus}
|
|
124
118
|
.value="${this.value}"
|
|
125
119
|
class="form-element"
|
|
126
120
|
>
|
|
@@ -182,10 +176,10 @@ __decorate([
|
|
|
182
176
|
property({ type: Boolean })
|
|
183
177
|
], Select.prototype, "multiple", void 0);
|
|
184
178
|
__decorate([
|
|
185
|
-
property({ type: String })
|
|
179
|
+
property({ type: String, reflect: true })
|
|
186
180
|
], Select.prototype, "size", void 0);
|
|
187
181
|
__decorate([
|
|
188
|
-
property({ type:
|
|
182
|
+
property({ type: Number })
|
|
189
183
|
], Select.prototype, "selectSize", void 0);
|
|
190
184
|
__decorate([
|
|
191
185
|
property({ type: Array })
|
|
@@ -3,16 +3,17 @@ declare const Textarea_base: {
|
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
5
5
|
type: "number" | "search" | "file" | "button" | "password" | "url" | "color" | "hidden" | "time" | "image" | "text" | "reset" | "submit" | "month" | "week" | "checkbox" | "radio" | "range" | "tel" | "email" | "date" | "datetime-local";
|
|
6
|
-
tabindex
|
|
7
|
-
autocomplete
|
|
6
|
+
tabindex?: number | undefined;
|
|
7
|
+
autocomplete?: "url" | "name" | "language" | "on" | "tel" | "email" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo" | undefined;
|
|
8
8
|
getFormPublisher(): any;
|
|
9
9
|
updateDataValue(): void;
|
|
10
10
|
handleChange(e?: any): void;
|
|
11
|
+
handleBlur(e?: any): void;
|
|
11
12
|
getValueForFormPublisher(): any;
|
|
12
|
-
error:
|
|
13
|
+
error: boolean;
|
|
13
14
|
autofocus: boolean;
|
|
15
|
+
required: boolean;
|
|
14
16
|
disabled: true | null;
|
|
15
|
-
required: true | null;
|
|
16
17
|
formDataProvider: string;
|
|
17
18
|
_value: any;
|
|
18
19
|
value: any;
|
|
@@ -45,23 +46,23 @@ declare const Textarea_base: {
|
|
|
45
46
|
export declare class Textarea extends Textarea_base {
|
|
46
47
|
static styles: import("lit").CSSResult[];
|
|
47
48
|
size: "" | "xs" | "sm" | "lg";
|
|
48
|
-
rows
|
|
49
|
-
cols
|
|
50
|
-
maxlength
|
|
51
|
-
minlength
|
|
52
|
-
wrap
|
|
53
|
-
readonly: boolean
|
|
54
|
-
placeholder
|
|
55
|
-
label
|
|
56
|
-
description
|
|
49
|
+
rows?: number;
|
|
50
|
+
cols?: number;
|
|
51
|
+
maxlength?: number;
|
|
52
|
+
minlength?: number;
|
|
53
|
+
wrap?: "hard" | "soft";
|
|
54
|
+
readonly: boolean;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
description?: string;
|
|
57
58
|
slotLabelNodes: Array<Node>;
|
|
58
59
|
slotDescriptionNodes: Array<Node>;
|
|
59
60
|
slotSuffixNodes: Array<Node>;
|
|
60
61
|
slotPrefixNodes: Array<Node>;
|
|
61
|
-
hasDescription:
|
|
62
|
-
hasLabel:
|
|
63
|
-
hasSuffix:
|
|
64
|
-
hasPrefix:
|
|
62
|
+
hasDescription: boolean;
|
|
63
|
+
hasLabel: boolean;
|
|
64
|
+
hasSuffix: boolean;
|
|
65
|
+
hasPrefix: boolean;
|
|
65
66
|
slotClasses: {};
|
|
66
67
|
updated(): void;
|
|
67
68
|
onSlotChange(): void;
|
|
@@ -20,19 +20,7 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
20
20
|
// type: "" | "primary" | "warning" | "danger" | "success" | "info" = "";
|
|
21
21
|
// @property({ type: String }) variant: "" | "ghost" | "outline" = "";
|
|
22
22
|
this.size = "";
|
|
23
|
-
this.
|
|
24
|
-
this.cols = "";
|
|
25
|
-
this.maxlength = "";
|
|
26
|
-
this.minlength = "";
|
|
27
|
-
this.wrap = null;
|
|
28
|
-
this.readonly = null;
|
|
29
|
-
this.placeholder = "";
|
|
30
|
-
/*
|
|
31
|
-
* TODO
|
|
32
|
-
* Mutualiser avec le composant select
|
|
33
|
-
*/
|
|
34
|
-
this.label = "";
|
|
35
|
-
this.description = "";
|
|
23
|
+
this.readonly = false;
|
|
36
24
|
this.hasDescription = false;
|
|
37
25
|
this.hasLabel = false;
|
|
38
26
|
this.hasSuffix = false;
|
|
@@ -67,21 +55,22 @@ let Textarea = class Textarea extends FormInput(FormElement(Subscriber(LitElemen
|
|
|
67
55
|
<div class="form-control">
|
|
68
56
|
<textarea
|
|
69
57
|
@input=${this.handleChange}
|
|
70
|
-
|
|
58
|
+
@blur=${this.handleBlur}
|
|
59
|
+
disabled=${ifDefined(this.disabled)}
|
|
71
60
|
?required=${this.required}
|
|
72
|
-
|
|
73
|
-
autofocus=${ifDefined(this.autofocus)}
|
|
61
|
+
?autofocus=${this.autofocus}
|
|
74
62
|
rows=${ifDefined(this.rows)}
|
|
75
63
|
cols=${ifDefined(this.cols)}
|
|
76
64
|
maxlength=${ifDefined(this.maxlength)}
|
|
77
65
|
minlength=${ifDefined(this.minlength)}
|
|
78
66
|
?readonly=${this.readonly}
|
|
79
67
|
spellcheck=${ifDefined(this.spellcheck)}
|
|
68
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
69
|
+
tabindex=${ifDefined(this.tabindex)}
|
|
80
70
|
wrap=${ifDefined(this.wrap)}
|
|
81
|
-
class="form-element textarea custom-scroll"
|
|
82
71
|
placeholder="${this.placeholder}"
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
class="form-element textarea custom-scroll"
|
|
73
|
+
>${this.value}</textarea
|
|
85
74
|
>
|
|
86
75
|
</div>
|
|
87
76
|
|
|
@@ -104,16 +93,16 @@ __decorate([
|
|
|
104
93
|
property({ type: String })
|
|
105
94
|
], Textarea.prototype, "size", void 0);
|
|
106
95
|
__decorate([
|
|
107
|
-
property({ type:
|
|
96
|
+
property({ type: Number })
|
|
108
97
|
], Textarea.prototype, "rows", void 0);
|
|
109
98
|
__decorate([
|
|
110
|
-
property({ type:
|
|
99
|
+
property({ type: Number })
|
|
111
100
|
], Textarea.prototype, "cols", void 0);
|
|
112
101
|
__decorate([
|
|
113
|
-
property({ type:
|
|
102
|
+
property({ type: Number })
|
|
114
103
|
], Textarea.prototype, "maxlength", void 0);
|
|
115
104
|
__decorate([
|
|
116
|
-
property({ type:
|
|
105
|
+
property({ type: Number })
|
|
117
106
|
], Textarea.prototype, "minlength", void 0);
|
|
118
107
|
__decorate([
|
|
119
108
|
property({ type: String })
|
|
@@ -18,7 +18,6 @@ let Image = class Image extends LitElement {
|
|
|
18
18
|
this.ratio = "auto";
|
|
19
19
|
this.objectPosition = "center center";
|
|
20
20
|
this.imageRendering = "auto";
|
|
21
|
-
this.shadow = "none";
|
|
22
21
|
this.cover = false;
|
|
23
22
|
}
|
|
24
23
|
render() {
|
|
@@ -83,25 +82,6 @@ Image.styles = [
|
|
|
83
82
|
--sc-img-radius: 0 !important;
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
/*OMBRE*/
|
|
87
|
-
:host([shadow]) > div,
|
|
88
|
-
:host([shadow="md"]) > div,
|
|
89
|
-
:host([shadow="true"]) > div {
|
|
90
|
-
box-shadow: var(--sc-shadow);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
:host([shadow="sm"]) > div {
|
|
94
|
-
box-shadow: var(--sc-shadow-sm);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:host([shadow="none"]) > div {
|
|
98
|
-
box-shadow: none;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:host([shadow="lg"]) > div {
|
|
102
|
-
box-shadow: var(--sc-shadow-lg);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
85
|
:host([cover]),
|
|
106
86
|
:host([cover]) > div,
|
|
107
87
|
:host([cover]) img {
|
|
@@ -136,9 +116,6 @@ __decorate([
|
|
|
136
116
|
__decorate([
|
|
137
117
|
property({ type: String })
|
|
138
118
|
], Image.prototype, "imageRendering", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
property({ type: String, reflect: true })
|
|
141
|
-
], Image.prototype, "shadow", void 0);
|
|
142
119
|
__decorate([
|
|
143
120
|
property({ type: Boolean, reflect: true })
|
|
144
121
|
], Image.prototype, "cover", void 0);
|