@supersoniks/concorde 1.1.41 → 1.1.43
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/components.d.ts +0 -0
- package/components.js +2 -3
- package/concorde-core.bundle.js +37 -42
- package/concorde-core.es.js +5702 -4823
- package/core/_types/types.d.ts +26 -0
- package/core/_types/types.js +1 -0
- package/core/components/functional/date/date.d.ts +13 -5
- package/core/components/functional/date/date.js +48 -29
- package/core/components/functional/example/example.d.ts +1 -1
- package/core/components/functional/example/example.js +1 -1
- package/core/components/functional/fetch/fetch.d.ts +40 -3
- package/core/components/functional/fetch/fetch.js +2 -6
- package/core/components/functional/functional.d.ts +2 -0
- package/core/components/functional/functional.js +2 -0
- package/core/components/functional/if/if.d.ts +3 -0
- package/core/components/functional/if/if.js +6 -12
- package/core/components/functional/if/if.test.d.ts +1 -0
- package/core/components/functional/if/if.test.js +44 -0
- package/core/components/functional/list/list.d.ts +32 -8
- package/core/components/functional/list/list.js +33 -40
- package/core/components/functional/mix/mix.d.ts +22 -0
- package/core/components/functional/mix/mix.js +99 -0
- package/core/components/functional/queue/queue.d.ts +16 -3
- package/core/components/functional/queue/queue.js +71 -15
- package/core/components/functional/router/redirect.d.ts +10 -1
- package/core/components/functional/router/redirect.js +5 -6
- package/core/components/functional/router/router.d.ts +15 -1
- package/core/components/functional/router/router.js +1 -6
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -1
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +24 -12
- package/core/components/functional/sdui/default-library.json +108 -0
- package/core/components/functional/sdui/sdui-utils.d.ts +5 -0
- package/core/components/functional/sdui/sdui-utils.js +63 -0
- package/core/components/functional/sdui/sdui.d.ts +20 -9
- package/core/components/functional/sdui/sdui.js +64 -24
- package/core/components/functional/sdui/types.d.ts +4 -2
- package/core/components/functional/sdui/types.js +0 -0
- package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -0
- package/core/components/functional/sonic-scope/sonic-scope.js +0 -0
- package/core/components/functional/states/states.d.ts +19 -3
- package/core/components/functional/states/states.js +7 -12
- package/core/components/functional/submit/submit.d.ts +16 -1
- package/core/components/functional/submit/submit.js +87 -17
- package/core/components/functional/subscriber/subscriber.d.ts +4 -1
- package/core/components/functional/subscriber/subscriber.js +1 -6
- package/core/components/functional/value/value.d.ts +7 -0
- package/core/components/functional/value/value.js +26 -0
- package/core/components/ui/_css/scroll.d.ts +0 -0
- package/core/components/ui/_css/scroll.js +6 -7
- package/core/components/ui/_css/size.d.ts +1 -0
- package/core/components/ui/_css/size.js +3 -1
- package/core/components/ui/_css/type.d.ts +0 -0
- package/core/components/ui/_css/type.js +0 -0
- package/core/components/ui/alert/alert.d.ts +2 -2
- package/core/components/ui/alert/alert.js +11 -16
- package/core/components/ui/badge/badge.d.ts +3 -1
- package/core/components/ui/badge/badge.js +36 -22
- package/core/components/ui/button/button.d.ts +23 -20
- package/core/components/ui/button/button.js +59 -42
- package/core/components/ui/captcha/captcha.d.ts +14 -2
- package/core/components/ui/captcha/captcha.js +17 -12
- package/core/components/ui/card/card-footer.d.ts +0 -0
- package/core/components/ui/card/card-footer.js +1 -8
- package/core/components/ui/card/card-header-descripton.d.ts +0 -0
- package/core/components/ui/card/card-header-descripton.js +3 -9
- package/core/components/ui/card/card-header.d.ts +0 -0
- package/core/components/ui/card/card-header.js +1 -6
- package/core/components/ui/card/card-main.d.ts +0 -0
- package/core/components/ui/card/card-main.js +0 -5
- package/core/components/ui/card/card.d.ts +1 -1
- package/core/components/ui/card/card.js +28 -12
- package/core/components/ui/divider/divider.d.ts +2 -0
- package/core/components/ui/divider/divider.js +44 -17
- package/core/components/ui/form/checkbox/checkbox.d.ts +53 -16
- package/core/components/ui/form/checkbox/checkbox.js +54 -29
- package/core/components/ui/form/css/form-control.d.ts +2 -0
- package/core/components/ui/form/css/form-control.js +145 -67
- package/core/components/ui/form/fieldset/fieldset.d.ts +8 -1
- package/core/components/ui/form/fieldset/fieldset.js +45 -8
- package/core/components/ui/form/fieldset/legend-description.d.ts +0 -0
- package/core/components/ui/form/fieldset/legend-description.js +0 -5
- package/core/components/ui/form/fieldset/legend.d.ts +0 -0
- package/core/components/ui/form/fieldset/legend.js +4 -7
- package/core/components/ui/form/form-actions/form-actions.d.ts +2 -0
- package/core/components/ui/form/form-actions/form-actions.js +26 -11
- package/core/components/ui/form/form-layout/form-layout.d.ts +5 -2
- package/core/components/ui/form/form-layout/form-layout.js +31 -9
- package/core/components/ui/form/input/input.d.ts +15 -18
- package/core/components/ui/form/input/input.js +89 -54
- package/core/components/ui/form/input/password-helper.d.ts +7 -1
- package/core/components/ui/form/input/password-helper.js +33 -10
- package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
- package/core/components/ui/form/input/same-value-helper.js +1 -0
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +34 -0
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +133 -0
- package/core/components/ui/form/radio/radio.d.ts +6 -0
- package/core/components/ui/form/radio/radio.js +7 -12
- package/core/components/ui/form/select/select.d.ts +23 -7
- package/core/components/ui/form/select/select.js +71 -40
- package/core/components/ui/form/textarea/textarea.d.ts +13 -13
- package/core/components/ui/form/textarea/textarea.js +31 -38
- package/core/components/ui/group/group.d.ts +11 -1
- package/core/components/ui/group/group.js +79 -17
- package/core/components/ui/icon/icon.d.ts +10 -3
- package/core/components/ui/icon/icon.js +16 -15
- package/core/components/ui/icon/icons.d.ts +0 -0
- package/core/components/ui/icon/icons.js +11 -8
- package/core/components/ui/icon/icons.json +1 -1
- package/core/components/ui/image/image.d.ts +0 -0
- package/core/components/ui/image/image.js +0 -5
- package/core/components/ui/link/link.d.ts +1 -1
- package/core/components/ui/link/link.js +2 -6
- package/core/components/ui/loader/loader.d.ts +0 -0
- package/core/components/ui/loader/loader.js +2 -8
- package/core/components/ui/loader/styles/fixed.d.ts +0 -0
- package/core/components/ui/loader/styles/fixed.js +0 -0
- package/core/components/ui/loader/styles/inline.d.ts +0 -0
- package/core/components/ui/loader/styles/inline.js +0 -0
- package/core/components/ui/menu/menu-item.d.ts +0 -0
- package/core/components/ui/menu/menu-item.js +4 -9
- package/core/components/ui/menu/menu.d.ts +9 -1
- package/core/components/ui/menu/menu.js +183 -27
- package/core/components/ui/modal/modal-actions.d.ts +0 -0
- package/core/components/ui/modal/modal-actions.js +1 -6
- package/core/components/ui/modal/modal-close.d.ts +1 -0
- package/core/components/ui/modal/modal-close.js +14 -10
- package/core/components/ui/modal/modal-content.d.ts +0 -0
- package/core/components/ui/modal/modal-content.js +0 -5
- package/core/components/ui/modal/modal-subtitle.d.ts +0 -0
- package/core/components/ui/modal/modal-subtitle.js +2 -6
- package/core/components/ui/modal/modal-title.d.ts +0 -0
- package/core/components/ui/modal/modal-title.js +0 -5
- package/core/components/ui/modal/modal.d.ts +7 -7
- package/core/components/ui/modal/modal.js +36 -36
- package/core/components/ui/pop/pop.d.ts +2 -1
- package/core/components/ui/pop/pop.js +11 -10
- package/core/components/ui/progress/progress.d.ts +0 -0
- package/core/components/ui/progress/progress.js +34 -32
- package/core/components/ui/table/table-caption.d.ts +0 -0
- package/core/components/ui/table/table-caption.js +5 -10
- package/core/components/ui/table/table-tbody.d.ts +0 -0
- package/core/components/ui/table/table-tbody.js +10 -14
- package/core/components/ui/table/table-td.d.ts +2 -0
- package/core/components/ui/table/table-td.js +8 -5
- package/core/components/ui/table/table-tfoot.d.ts +0 -0
- package/core/components/ui/table/table-tfoot.js +5 -7
- package/core/components/ui/table/table-th.d.ts +2 -0
- package/core/components/ui/table/table-th.js +12 -9
- package/core/components/ui/table/table-thead.d.ts +0 -0
- package/core/components/ui/table/table-thead.js +1 -6
- package/core/components/ui/table/table-tr.d.ts +0 -0
- package/core/components/ui/table/table-tr.js +4 -6
- package/core/components/ui/table/table.d.ts +0 -3
- package/core/components/ui/table/table.js +14 -31
- package/core/components/ui/taxonomy/taxonomy.d.ts +6 -3
- package/core/components/ui/taxonomy/taxonomy.js +9 -9
- 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.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/core-variables.js +13 -11
- package/core/components/ui/theme/theme-collection/dark.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/dark.js +1 -1
- package/core/components/ui/theme/theme-collection/light.d.ts +0 -0
- package/core/components/ui/theme/theme-collection/light.js +0 -0
- package/core/components/ui/theme/theme.d.ts +1 -6
- package/core/components/ui/theme/theme.js +7 -36
- package/core/components/ui/toast/message-subscriber.d.ts +13 -7
- package/core/components/ui/toast/message-subscriber.js +0 -0
- package/core/components/ui/toast/toast-item.d.ts +0 -0
- package/core/components/ui/toast/toast-item.js +1 -1
- package/core/components/ui/toast/toast.d.ts +2 -1
- package/core/components/ui/toast/toast.js +29 -14
- package/core/components/ui/toast/types.d.ts +0 -0
- package/core/components/ui/toast/types.js +0 -0
- package/core/components/ui/tooltip/tooltip.d.ts +1 -0
- package/core/components/ui/tooltip/tooltip.js +35 -14
- package/core/components/ui/ui.d.ts +1 -0
- package/core/components/ui/ui.js +1 -3
- package/core/core.d.ts +0 -0
- package/core/core.js +5 -6
- package/core/mixins/Fetcher.d.ts +19 -10
- package/core/mixins/Fetcher.js +26 -10
- package/core/mixins/FormCheckable.d.ts +17 -8
- package/core/mixins/FormCheckable.js +177 -22
- package/core/mixins/FormElement.d.ts +12 -7
- package/core/mixins/FormElement.js +42 -26
- package/core/mixins/FormInput.d.ts +8 -4
- package/core/mixins/FormInput.js +4 -3
- package/core/mixins/Subscriber.d.ts +7 -5
- package/core/mixins/Subscriber.js +34 -32
- package/core/mixins/TemplatesContainer.d.ts +0 -0
- package/core/mixins/TemplatesContainer.js +0 -0
- package/core/mixins/mixins.d.ts +0 -0
- package/core/mixins/mixins.js +0 -0
- package/core/utils/Arrays.d.ts +15 -15
- package/core/utils/Arrays.js +0 -0
- package/core/utils/DataBindObserver.d.ts +16 -9
- package/core/utils/DataBindObserver.js +23 -28
- package/core/utils/Electron.d.ts +5 -1
- package/core/utils/Electron.js +4 -2
- package/core/utils/Format.d.ts +0 -0
- package/core/utils/Format.js +0 -0
- package/core/utils/HTML.d.ts +9 -2
- package/core/utils/HTML.js +22 -3
- package/core/utils/LocationHandler.d.ts +6 -5
- package/core/utils/LocationHandler.js +19 -8
- package/core/utils/Objects.d.ts +7 -4
- package/core/utils/Objects.js +28 -6
- package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +40 -31
- package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +54 -28
- package/core/utils/Utils.d.ts +3 -0
- package/core/utils/Utils.js +18 -0
- package/core/utils/api.d.ts +39 -7
- package/core/utils/api.js +45 -32
- package/img/concorde-logo.svg +1 -0
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +36 -18
- package/mixins.js +3 -4
- package/package.json +47 -10
- package/svg/regular/plane.svg +1 -0
- package/svg/solid/plane.svg +1 -0
- package/test-utils/TestUtils.d.ts +4 -0
- package/test-utils/TestUtils.js +12 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -5
- package/core/components/functional/configuration/configuration.d.ts +0 -5
- package/core/components/functional/configuration/configuration.js +0 -22
- package/core/components/ui/tabs/tab.d.ts +0 -6
- package/core/components/ui/tabs/tab.js +0 -46
- package/core/components/ui/tabs/tabs.d.ts +0 -15
- package/core/components/ui/tabs/tabs.js +0 -129
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
2
|
declare const Input_base: {
|
|
3
3
|
new (...args: any[]): {
|
|
4
4
|
validateFormElement(): void;
|
|
@@ -13,26 +13,20 @@ declare const Input_base: {
|
|
|
13
13
|
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;
|
|
14
14
|
getFormPublisher(): any;
|
|
15
15
|
updateDataValue(): void;
|
|
16
|
-
handleChange(e?:
|
|
17
|
-
handleBlur(e?:
|
|
16
|
+
handleChange(e?: Event | undefined): void;
|
|
17
|
+
handleBlur(e?: Event | undefined): void;
|
|
18
18
|
getValueForFormPublisher(): any;
|
|
19
|
+
focus?: (() => void) | undefined;
|
|
20
|
+
shadowRoot?: ShadowRoot | undefined;
|
|
19
21
|
error: boolean;
|
|
20
22
|
autofocus: boolean;
|
|
21
23
|
required: boolean;
|
|
22
24
|
disabled: true | null;
|
|
23
25
|
formDataProvider: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* **FormElement :**
|
|
29
|
-
* * 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é.
|
|
30
|
-
* * Par défault lorsque l'on édite l'input, la valeur est également mise à jour via le même dataprovider
|
|
31
|
-
* * On peut cependant décider de mettre à jour la donnée à une autre adresse en renseigne l'attribut *formDataProvider*.
|
|
32
|
-
* * 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.
|
|
33
|
-
* **FormInput :**
|
|
34
|
-
* Uniquement des propriétés classiques d'un input HTML.
|
|
35
|
-
*/
|
|
26
|
+
ariaLabelledby?: string | undefined;
|
|
27
|
+
ariaLabel?: string | undefined;
|
|
28
|
+
_value: string | null;
|
|
29
|
+
value: string | null;
|
|
36
30
|
_name: string;
|
|
37
31
|
name: string;
|
|
38
32
|
props: any;
|
|
@@ -60,7 +54,7 @@ declare const Input_base: {
|
|
|
60
54
|
hasAttribute(attributeName: String): boolean;
|
|
61
55
|
disconnectedCallback(): void;
|
|
62
56
|
};
|
|
63
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
57
|
+
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<any>) & typeof LitElement;
|
|
64
58
|
export declare class Input extends Input_base {
|
|
65
59
|
static styles: import("lit").CSSResult[];
|
|
66
60
|
/**
|
|
@@ -78,6 +72,7 @@ export declare class Input extends Input_base {
|
|
|
78
72
|
maxlength?: number;
|
|
79
73
|
src?: string;
|
|
80
74
|
inlineContent: boolean;
|
|
75
|
+
disableInlineContentFocus: boolean;
|
|
81
76
|
slotLabelNodes: Array<Node>;
|
|
82
77
|
slotDescriptionNodes: Array<Node>;
|
|
83
78
|
slotSuffixNodes: Array<Node>;
|
|
@@ -87,13 +82,15 @@ export declare class Input extends Input_base {
|
|
|
87
82
|
hasLabel: boolean;
|
|
88
83
|
hasSuffix: boolean;
|
|
89
84
|
hasPrefix: boolean;
|
|
90
|
-
updated(): void;
|
|
91
85
|
sameValueAsHandle?: (v: string) => void;
|
|
92
86
|
sameValueAsName?: string;
|
|
93
87
|
connectedCallback(): void;
|
|
94
88
|
disconnectedCallback(): void;
|
|
95
|
-
|
|
89
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
90
|
+
hasSlotOrProps(): void;
|
|
96
91
|
inlineContentFocus(): void;
|
|
92
|
+
changeTimeoutId?: ReturnType<typeof setTimeout>;
|
|
93
|
+
handleChange(e?: Event): void;
|
|
97
94
|
render(): import("lit-html").TemplateResult<1>;
|
|
98
95
|
}
|
|
99
96
|
export {};
|
|
@@ -4,11 +4,11 @@ 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, property, queryAssignedNodes, state } from "lit/decorators.js";
|
|
9
9
|
import { query } from "lit/decorators/query.js";
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
|
-
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
|
+
import { formControl, label, description } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
12
12
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
13
13
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
14
14
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
@@ -31,93 +31,130 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
31
31
|
super(...arguments);
|
|
32
32
|
this.readonly = false;
|
|
33
33
|
this.inlineContent = false;
|
|
34
|
+
this.disableInlineContentFocus = false;
|
|
34
35
|
this.hasDescription = false;
|
|
35
36
|
this.hasLabel = false;
|
|
36
37
|
this.hasSuffix = false;
|
|
37
38
|
this.hasPrefix = false;
|
|
38
39
|
}
|
|
39
|
-
updated() {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
41
|
-
this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
|
|
42
|
-
this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
|
|
43
|
-
this.hasSuffix = ((_c = this.slotSuffixNodes) === null || _c === void 0 ? void 0 : _c.length) ? true : false;
|
|
44
|
-
this.hasPrefix = ((_d = this.slotPrefixNodes) === null || _d === void 0 ? void 0 : _d.length) ? true : false;
|
|
45
|
-
}
|
|
46
40
|
connectedCallback() {
|
|
47
41
|
super.connectedCallback();
|
|
42
|
+
this.hasSlotOrProps();
|
|
48
43
|
if (this.hasAttribute("sameValueAs")) {
|
|
49
44
|
this.sameValueAsName = this.getAttribute("sameValueAs");
|
|
50
45
|
this.sameValueAsHandle = (v) => (this.pattern = v);
|
|
51
|
-
this.getFormPublisher()
|
|
46
|
+
let formPublisher = this.getFormPublisher();
|
|
47
|
+
if (!formPublisher)
|
|
48
|
+
return;
|
|
49
|
+
formPublisher[this.sameValueAsName].onAssign(this.sameValueAsHandle);
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
disconnectedCallback() {
|
|
55
53
|
super.disconnectedCallback();
|
|
56
54
|
if (this.hasAttribute("sameValueAs") && this.sameValueAsName) {
|
|
57
|
-
this.getFormPublisher()
|
|
55
|
+
let formPublisher = this.getFormPublisher();
|
|
56
|
+
if (!formPublisher)
|
|
57
|
+
return;
|
|
58
|
+
formPublisher[this.sameValueAsName].offAssign(this.sameValueAsHandle);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
-
this.
|
|
61
|
+
willUpdate(changedProperties) {
|
|
62
|
+
this.hasSlotOrProps();
|
|
63
|
+
super.willUpdate(changedProperties);
|
|
64
|
+
}
|
|
65
|
+
hasSlotOrProps() {
|
|
66
|
+
var _a, _b, _c, _d;
|
|
67
|
+
this.hasLabel = this.label || ((_a = this.slotLabelNodes) === null || _a === void 0 ? void 0 : _a.length) ? true : false;
|
|
68
|
+
this.hasDescription = this.description || ((_b = this.slotDescriptionNodes) === null || _b === void 0 ? void 0 : _b.length) ? true : false;
|
|
69
|
+
this.hasSuffix = ((_c = this.slotSuffixNodes) === null || _c === void 0 ? void 0 : _c.length) ? true : false;
|
|
70
|
+
this.hasPrefix = ((_d = this.slotPrefixNodes) === null || _d === void 0 ? void 0 : _d.length) ? true : false;
|
|
62
71
|
}
|
|
63
72
|
inlineContentFocus() {
|
|
64
73
|
var _a;
|
|
65
|
-
if (!this.inlineContent)
|
|
74
|
+
if (!this.inlineContent || this.disableInlineContentFocus)
|
|
66
75
|
return;
|
|
67
76
|
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
68
77
|
}
|
|
78
|
+
handleChange(e) {
|
|
79
|
+
if (!this.hasAttribute("inputDelayMs")) {
|
|
80
|
+
super.handleChange(e);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this.changeTimeoutId)
|
|
84
|
+
clearTimeout(this.changeTimeoutId);
|
|
85
|
+
this.changeTimeoutId = setTimeout(() => super.handleChange(e), parseInt(this.getAttribute("inputDelayMs")));
|
|
86
|
+
}
|
|
69
87
|
render() {
|
|
70
88
|
const slotClasses = {
|
|
71
89
|
"has-prefix": this.hasPrefix,
|
|
72
90
|
"has-suffix": this.hasSuffix,
|
|
73
91
|
};
|
|
74
|
-
let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
|
|
92
|
+
//let labelStarSuffix = this.label && this.required && this.label.indexOf("*") == -1 ? " *" : "";
|
|
75
93
|
return html `
|
|
76
94
|
<label for="form-element" class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
77
|
-
>${this.label ? unsafeHTML(this.label
|
|
95
|
+
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
78
96
|
name="label"
|
|
79
|
-
@slotchange=${this.
|
|
97
|
+
@slotchange=${this.hasSlotOrProps}
|
|
80
98
|
></slot
|
|
81
99
|
></label>
|
|
82
100
|
|
|
83
101
|
<div @click=${this.inlineContentFocus} class="form-control ${classMap(slotClasses)}">
|
|
84
|
-
<div class="
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
<div class="${this.inlineContent ? "form-element form-element-wrapper" : "contents"}">
|
|
103
|
+
<slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
104
|
+
<input
|
|
105
|
+
id="form-element"
|
|
106
|
+
part="input"
|
|
107
|
+
class="form-element input"
|
|
108
|
+
@input=${this.handleChange}
|
|
109
|
+
@blur=${this.handleBlur}
|
|
110
|
+
type=${this.type}
|
|
111
|
+
disabled=${ifDefined(this.disabled)}
|
|
112
|
+
?readonly=${this.readonly}
|
|
113
|
+
?autofocus=${this.autofocus}
|
|
114
|
+
list=${ifDefined(this.list)}
|
|
115
|
+
tabindex=${ifDefined(this.tabindex)}
|
|
116
|
+
pattern=${ifDefined(this.pattern)}
|
|
117
|
+
min=${ifDefined(this.min)}
|
|
118
|
+
max=${ifDefined(this.max)}
|
|
119
|
+
step=${ifDefined(this.step)}
|
|
120
|
+
src=${ifDefined(this.src)}
|
|
121
|
+
minlength=${ifDefined(this.minlength)}
|
|
122
|
+
maxlength=${ifDefined(this.maxlength)}
|
|
123
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
124
|
+
required=${ifDefined(this.required)}
|
|
125
|
+
autocomplete=${ifDefined(this.autocomplete)}
|
|
126
|
+
aria-label=${ifDefined(this.ariaLabel)}
|
|
127
|
+
aria-labelledby=${ifDefined(this.ariaLabelledby)}
|
|
128
|
+
.name=${this.name}
|
|
129
|
+
.value=${this.value}
|
|
130
|
+
/>
|
|
131
|
+
<slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
132
|
+
</div>
|
|
112
133
|
</div>
|
|
134
|
+
<slot
|
|
135
|
+
name="description"
|
|
136
|
+
@slotchange=${this.hasSlotOrProps}
|
|
137
|
+
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
138
|
+
>
|
|
139
|
+
${this.description ? html `${unsafeHTML(this.description)}` : ""}
|
|
140
|
+
</slot>
|
|
141
|
+
<slot name="list"></slot>
|
|
113
142
|
</div>
|
|
114
|
-
<slot name="description" class="${this.hasDescription ? "form-description" : "hidden"}">
|
|
115
|
-
${this.description ? html `${unsafeHTML(this.description)}` : ""}
|
|
116
|
-
</slot>
|
|
117
143
|
`;
|
|
118
144
|
}
|
|
119
145
|
};
|
|
120
|
-
Input.styles = [
|
|
146
|
+
Input.styles = [
|
|
147
|
+
fontSize,
|
|
148
|
+
formControl,
|
|
149
|
+
label,
|
|
150
|
+
description,
|
|
151
|
+
css `
|
|
152
|
+
:host([type="hidden"]) {
|
|
153
|
+
appearance: none !important;
|
|
154
|
+
display: none !important;
|
|
155
|
+
}
|
|
156
|
+
`,
|
|
157
|
+
];
|
|
121
158
|
__decorate([
|
|
122
159
|
property({ type: String, reflect: true })
|
|
123
160
|
], Input.prototype, "size", void 0);
|
|
@@ -154,6 +191,9 @@ __decorate([
|
|
|
154
191
|
__decorate([
|
|
155
192
|
property({ type: Boolean, reflect: true })
|
|
156
193
|
], Input.prototype, "inlineContent", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
property({ type: Boolean })
|
|
196
|
+
], Input.prototype, "disableInlineContentFocus", void 0);
|
|
157
197
|
__decorate([
|
|
158
198
|
queryAssignedNodes({ slot: "label" })
|
|
159
199
|
], Input.prototype, "slotLabelNodes", void 0);
|
|
@@ -185,8 +225,3 @@ Input = __decorate([
|
|
|
185
225
|
customElement(tagName)
|
|
186
226
|
], Input);
|
|
187
227
|
export { Input };
|
|
188
|
-
//Ajout pour Storybook
|
|
189
|
-
try {
|
|
190
|
-
customElements.define(tagName, Input);
|
|
191
|
-
}
|
|
192
|
-
catch (e) { }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
3
|
+
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<any>) & typeof LitElement;
|
|
4
4
|
export declare class SonicComponent extends SonicComponent_base {
|
|
5
5
|
name?: string;
|
|
6
6
|
minChars: number;
|
|
@@ -10,6 +10,12 @@ export declare class SonicComponent extends SonicComponent_base {
|
|
|
10
10
|
hasMajuscule: boolean;
|
|
11
11
|
hasNumber: boolean;
|
|
12
12
|
hasSpecialChar: boolean;
|
|
13
|
+
wording_password_helper_decription: string;
|
|
14
|
+
wording_password_helper_min_length: string;
|
|
15
|
+
wording_password_helper_lower_case: string;
|
|
16
|
+
wording_password_helper_upper_case: string;
|
|
17
|
+
wording_password_helper_number: string;
|
|
18
|
+
wording_password_helper_special_char: string;
|
|
13
19
|
checkValue?: (v: string) => void;
|
|
14
20
|
connectedCallback(): void;
|
|
15
21
|
disconnectedCallback(): void;
|
|
@@ -10,7 +10,6 @@ import { Subscriber } from "@supersoniks/concorde/mixins";
|
|
|
10
10
|
import { PublisherManager } from "@supersoniks/concorde/utils";
|
|
11
11
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
12
12
|
const tagName = "sonic-password-helper"; // For Astro.build
|
|
13
|
-
console.log("HEY");
|
|
14
13
|
let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
15
14
|
constructor() {
|
|
16
15
|
super(...arguments);
|
|
@@ -21,6 +20,12 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
21
20
|
this.hasMajuscule = false;
|
|
22
21
|
this.hasNumber = false;
|
|
23
22
|
this.hasSpecialChar = false;
|
|
23
|
+
this.wording_password_helper_decription = "Le mot de passe doit contenir au moins :";
|
|
24
|
+
this.wording_password_helper_min_length = "8 caractères";
|
|
25
|
+
this.wording_password_helper_lower_case = "1 minuscule";
|
|
26
|
+
this.wording_password_helper_upper_case = "1 majuscule";
|
|
27
|
+
this.wording_password_helper_number = "1 chiffre";
|
|
28
|
+
this.wording_password_helper_special_char = "1 caractère spécial";
|
|
24
29
|
}
|
|
25
30
|
connectedCallback() {
|
|
26
31
|
super.connectedCallback();
|
|
@@ -46,23 +51,23 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
46
51
|
if (this.checkValue && this.name) {
|
|
47
52
|
PublisherManager.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue);
|
|
48
53
|
}
|
|
54
|
+
super.disconnectedCallback();
|
|
49
55
|
}
|
|
50
56
|
getIcon(test) {
|
|
51
57
|
return test
|
|
52
|
-
? html `<sonic-icon library="heroicons"
|
|
53
|
-
: html `<sonic-icon library="heroicons"
|
|
58
|
+
? html `<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`
|
|
59
|
+
: html `<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`;
|
|
54
60
|
}
|
|
55
|
-
//TODO Multilangue
|
|
56
61
|
render() {
|
|
57
62
|
if (this.hasNoChar)
|
|
58
63
|
return nothing;
|
|
59
64
|
return html `
|
|
60
|
-
<div
|
|
61
|
-
<div>${this.getIcon(this.hasEnoughChars)}
|
|
62
|
-
<div>${this.getIcon(this.hasMinuscule)}
|
|
63
|
-
<div>${this.getIcon(this.hasMajuscule)}
|
|
64
|
-
<div>${this.getIcon(this.hasNumber)}
|
|
65
|
-
<div>${this.getIcon(this.hasSpecialChar)}
|
|
65
|
+
<div>${this.wording_password_helper_decription}</div>
|
|
66
|
+
<div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div>
|
|
67
|
+
<div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div>
|
|
68
|
+
<div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div>
|
|
69
|
+
<div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div>
|
|
70
|
+
<div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>
|
|
66
71
|
`;
|
|
67
72
|
}
|
|
68
73
|
};
|
|
@@ -90,6 +95,24 @@ __decorate([
|
|
|
90
95
|
__decorate([
|
|
91
96
|
state()
|
|
92
97
|
], SonicComponent.prototype, "hasSpecialChar", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
property()
|
|
100
|
+
], SonicComponent.prototype, "wording_password_helper_decription", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
property()
|
|
103
|
+
], SonicComponent.prototype, "wording_password_helper_min_length", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
property()
|
|
106
|
+
], SonicComponent.prototype, "wording_password_helper_lower_case", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
property()
|
|
109
|
+
], SonicComponent.prototype, "wording_password_helper_upper_case", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property()
|
|
112
|
+
], SonicComponent.prototype, "wording_password_helper_number", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property()
|
|
115
|
+
], SonicComponent.prototype, "wording_password_helper_special_char", void 0);
|
|
93
116
|
SonicComponent = __decorate([
|
|
94
117
|
customElement(tagName)
|
|
95
118
|
], SonicComponent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
3
|
+
declare const SonicComponent_base: (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<any>) & typeof LitElement;
|
|
4
4
|
export declare class SonicComponent extends SonicComponent_base {
|
|
5
5
|
name?: string;
|
|
6
6
|
sameValueAs?: string;
|
|
@@ -42,6 +42,7 @@ let SonicComponent = class SonicComponent extends Subscriber(LitElement) {
|
|
|
42
42
|
formDataProvider[this.name].offAssign(this.checkValue);
|
|
43
43
|
formDataProvider[this.sameValueAs].offAssign(this.checkValue);
|
|
44
44
|
}
|
|
45
|
+
super.disconnectedCallback();
|
|
45
46
|
}
|
|
46
47
|
//TODO Multilangue
|
|
47
48
|
render() {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/form/input/input";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/pop/pop";
|
|
4
|
+
import "@supersoniks/concorde/core/components/functional/queue/queue";
|
|
5
|
+
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
6
|
+
declare const InputAutocomplete_base: (new (...args: any[]) => import("../../../../mixins/TemplatesContainer").TemplatesContainerInterface) & (new (...args: any[]) => import("../../../../mixins/Subscriber").SubscriberInterface<any>) & typeof LitElement;
|
|
7
|
+
/**
|
|
8
|
+
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
9
|
+
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
10
|
+
* La valeur de cet input est ensuite retransmit au premier via un dataProvider.
|
|
11
|
+
*/
|
|
12
|
+
export declare class InputAutocomplete extends InputAutocomplete_base {
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
_name: string;
|
|
15
|
+
get name(): string;
|
|
16
|
+
set name(value: string);
|
|
17
|
+
forceAutoFill: boolean;
|
|
18
|
+
_description?: string;
|
|
19
|
+
get description(): string | undefined;
|
|
20
|
+
set description(value: string | undefined);
|
|
21
|
+
_label?: string;
|
|
22
|
+
get label(): string | undefined;
|
|
23
|
+
set label(value: string | undefined);
|
|
24
|
+
placeholder: string;
|
|
25
|
+
filteredFields: string;
|
|
26
|
+
readonly: boolean | null;
|
|
27
|
+
dataProviderExpression: string;
|
|
28
|
+
key: string;
|
|
29
|
+
value: string;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
formDataProvider: string;
|
|
32
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
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 { Subscriber, TemplatesContainer } from "@supersoniks/concorde/mixins";
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/form/input/input";
|
|
11
|
+
import "@supersoniks/concorde/core/components/ui/pop/pop";
|
|
12
|
+
import "@supersoniks/concorde/core/components/functional/queue/queue";
|
|
13
|
+
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
14
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
15
|
+
/**
|
|
16
|
+
* Input avec autocomplete. Propose des valeurs à partir d'un sonic-queue.
|
|
17
|
+
* L'input permet de filtrer les choix de valeurs dans le sonic-pop.
|
|
18
|
+
* La valeur de cet input est ensuite retransmit au premier via un dataProvider.
|
|
19
|
+
*/
|
|
20
|
+
let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(Subscriber(LitElement)) {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
// Filtering input
|
|
24
|
+
this._name = "";
|
|
25
|
+
this.forceAutoFill = false;
|
|
26
|
+
this.placeholder = "";
|
|
27
|
+
this.filteredFields = "";
|
|
28
|
+
this.readonly = null;
|
|
29
|
+
this.dataProviderExpression = "";
|
|
30
|
+
this.key = "";
|
|
31
|
+
this.value = "";
|
|
32
|
+
this.formDataProvider = "";
|
|
33
|
+
}
|
|
34
|
+
get name() {
|
|
35
|
+
return this._name;
|
|
36
|
+
}
|
|
37
|
+
set name(value) {
|
|
38
|
+
if (this.hasAttribute("name") && !this.forceAutoFill)
|
|
39
|
+
value = this.getAttribute("name");
|
|
40
|
+
this._name = value;
|
|
41
|
+
this.requestUpdate();
|
|
42
|
+
}
|
|
43
|
+
get description() {
|
|
44
|
+
return this._description;
|
|
45
|
+
}
|
|
46
|
+
set description(value) {
|
|
47
|
+
if (this.hasAttribute("description") && !this.forceAutoFill)
|
|
48
|
+
value = this.getAttribute("description");
|
|
49
|
+
this._description = value;
|
|
50
|
+
this.requestUpdate();
|
|
51
|
+
}
|
|
52
|
+
get label() {
|
|
53
|
+
return this._label;
|
|
54
|
+
}
|
|
55
|
+
set label(value) {
|
|
56
|
+
if (this.hasAttribute("label") && !this.forceAutoFill)
|
|
57
|
+
value = this.getAttribute("label");
|
|
58
|
+
this._label = value;
|
|
59
|
+
this.requestUpdate();
|
|
60
|
+
}
|
|
61
|
+
connectedCallback() {
|
|
62
|
+
this.formDataProvider = this.getAncestorAttributeValue("formDataProvider");
|
|
63
|
+
super.connectedCallback();
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return html `
|
|
67
|
+
<sonic-pop toggle="false" style="display:block;">
|
|
68
|
+
<sonic-input
|
|
69
|
+
type="search"
|
|
70
|
+
data-keyboard-nav="nav-autocomplete"
|
|
71
|
+
label="${ifDefined(this.label)}"
|
|
72
|
+
description="${ifDefined(this.description)}"
|
|
73
|
+
name="${ifDefined(this.name)}"
|
|
74
|
+
value="${ifDefined(this.value)}"
|
|
75
|
+
autocomplete="off"
|
|
76
|
+
clearable
|
|
77
|
+
></sonic-input>
|
|
78
|
+
<sonic-menu slot="content">
|
|
79
|
+
<sonic-queue
|
|
80
|
+
filteredFields=${this.filteredFields}
|
|
81
|
+
dataProviderExpression="${this.dataProviderExpression}"
|
|
82
|
+
dataFilterProvider="${this.formDataProvider}"
|
|
83
|
+
key="${this.key}"
|
|
84
|
+
.templates=${this.templateList}
|
|
85
|
+
displayContents
|
|
86
|
+
>
|
|
87
|
+
</sonic-queue>
|
|
88
|
+
</sonic-menu>
|
|
89
|
+
</sonic-pop>
|
|
90
|
+
`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
InputAutocomplete.styles = [
|
|
94
|
+
css `
|
|
95
|
+
:host {
|
|
96
|
+
display: block;
|
|
97
|
+
}
|
|
98
|
+
`,
|
|
99
|
+
];
|
|
100
|
+
__decorate([
|
|
101
|
+
property()
|
|
102
|
+
], InputAutocomplete.prototype, "name", null);
|
|
103
|
+
__decorate([
|
|
104
|
+
property()
|
|
105
|
+
], InputAutocomplete.prototype, "forceAutoFill", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property()
|
|
108
|
+
], InputAutocomplete.prototype, "description", null);
|
|
109
|
+
__decorate([
|
|
110
|
+
property()
|
|
111
|
+
], InputAutocomplete.prototype, "label", null);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: String })
|
|
114
|
+
], InputAutocomplete.prototype, "placeholder", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property()
|
|
117
|
+
], InputAutocomplete.prototype, "filteredFields", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: Boolean })
|
|
120
|
+
], InputAutocomplete.prototype, "readonly", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ type: String })
|
|
123
|
+
], InputAutocomplete.prototype, "dataProviderExpression", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: String })
|
|
126
|
+
], InputAutocomplete.prototype, "key", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: String })
|
|
129
|
+
], InputAutocomplete.prototype, "value", void 0);
|
|
130
|
+
InputAutocomplete = __decorate([
|
|
131
|
+
customElement("sonic-input-autocomplete")
|
|
132
|
+
], InputAutocomplete);
|
|
133
|
+
export { InputAutocomplete };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/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
|
+
*/
|
|
2
8
|
export declare class Radio extends Checkbox {
|
|
3
9
|
static styles: (import("lit").CSSResult | import("lit").CSSResultGroup[])[];
|
|
4
10
|
constructor();
|
|
@@ -7,13 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
9
|
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/checkbox/checkbox";
|
|
10
|
+
const tagName = "sonic-radio";
|
|
10
11
|
/**
|
|
11
12
|
* ### Le composant sonic-radio étend sonic-checkbox en assignant sa propriété radio à true.
|
|
12
13
|
*
|
|
13
14
|
* * Le type d'input html utilisé passe également de checkbox à radio.
|
|
14
15
|
* * Le comportement est donc similaire à un bouton radio classique mais avec les fonctionnalités de sonic-checkbox (ie : Subscriber / FormElement / FormCheckable).
|
|
15
16
|
*/
|
|
16
|
-
const tagName = "sonic-radio";
|
|
17
17
|
let Radio = class Radio extends Checkbox {
|
|
18
18
|
constructor() {
|
|
19
19
|
super();
|
|
@@ -35,12 +35,12 @@ Radio.styles = [
|
|
|
35
35
|
:host sonic-icon {
|
|
36
36
|
border-radius: 50%;
|
|
37
37
|
overflow: hidden;
|
|
38
|
-
background-color:var(--sc-primary-content);
|
|
39
|
-
line-height:0;
|
|
40
|
-
display:block;
|
|
41
|
-
font-size:
|
|
42
|
-
height:
|
|
43
|
-
width:
|
|
38
|
+
background-color: var(--sc-primary-content);
|
|
39
|
+
line-height: 0;
|
|
40
|
+
display: block;
|
|
41
|
+
font-size: 1em;
|
|
42
|
+
height: 0.6em;
|
|
43
|
+
width: 0.6em;
|
|
44
44
|
}
|
|
45
45
|
`,
|
|
46
46
|
];
|
|
@@ -48,8 +48,3 @@ Radio = __decorate([
|
|
|
48
48
|
customElement(tagName)
|
|
49
49
|
], Radio);
|
|
50
50
|
export { Radio };
|
|
51
|
-
//Ajout pour Storybook
|
|
52
|
-
try {
|
|
53
|
-
customElements.define(tagName, Radio);
|
|
54
|
-
}
|
|
55
|
-
catch (e) { }
|