@supersoniks/concorde 1.1.42 → 1.1.44
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/components.js +2 -3
- package/concorde-core.bundle.js +37 -35
- package/concorde-core.es.js +5283 -4453
- package/core/_types/types.d.ts +31 -0
- package/core/_types/types.js +2 -0
- package/core/components/functional/date/date.d.ts +13 -5
- package/core/components/functional/date/date.js +57 -38
- 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 +45 -6
- 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 +44 -12
- package/core/components/functional/list/list.js +54 -49
- package/core/components/functional/mix/mix.d.ts +22 -0
- package/core/components/functional/mix/mix.js +102 -0
- package/core/components/functional/queue/queue.d.ts +27 -5
- package/core/components/functional/queue/queue.js +88 -26
- package/core/components/functional/router/redirect.d.ts +11 -2
- package/core/components/functional/router/redirect.js +7 -12
- package/core/components/functional/router/router.d.ts +15 -1
- package/core/components/functional/router/router.js +11 -16
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +1 -2
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +56 -45
- 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 +21 -13
- package/core/components/functional/sdui/sdui.js +70 -44
- package/core/components/functional/sdui/types.d.ts +10 -8
- package/core/components/functional/states/states.d.ts +20 -4
- package/core/components/functional/states/states.js +15 -20
- package/core/components/functional/submit/submit.d.ts +16 -1
- package/core/components/functional/submit/submit.js +95 -25
- 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.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/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 +28 -23
- package/core/components/ui/button/button.js +60 -43
- package/core/components/ui/captcha/captcha.d.ts +14 -2
- package/core/components/ui/captcha/captcha.js +18 -13
- package/core/components/ui/card/card-footer.js +1 -8
- package/core/components/ui/card/card-header-descripton.js +3 -9
- package/core/components/ui/card/card-header.js +6 -7
- 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 +30 -12
- package/core/components/ui/divider/divider.d.ts +2 -0
- package/core/components/ui/divider/divider.js +43 -16
- package/core/components/ui/form/checkbox/checkbox.d.ts +86 -25
- package/core/components/ui/form/checkbox/checkbox.js +53 -28
- 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.js +0 -5
- package/core/components/ui/form/fieldset/legend.js +3 -6
- 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 +26 -24
- package/core/components/ui/form/input/input.js +87 -52
- package/core/components/ui/form/input/password-helper.d.ts +1 -1
- package/core/components/ui/form/input/password-helper.js +4 -3
- package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
- package/core/components/ui/form/input/same-value-helper.js +3 -2
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +2 -3
- package/core/components/ui/form/input-autocomplete/input-autocomplete.js +2 -6
- 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 +25 -8
- package/core/components/ui/form/select/select.js +72 -41
- package/core/components/ui/form/textarea/textarea.d.ts +21 -19
- package/core/components/ui/form/textarea/textarea.js +29 -36
- 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.js +25 -20
- package/core/components/ui/icon/icons.json +1 -1
- 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 +1 -1
- package/core/components/ui/loader/loader.js +3 -9
- 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 +182 -27
- 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.js +0 -5
- package/core/components/ui/modal/modal-subtitle.js +2 -6
- 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 +37 -37
- package/core/components/ui/pop/pop.d.ts +6 -5
- package/core/components/ui/pop/pop.js +57 -57
- package/core/components/ui/progress/progress.js +34 -32
- package/core/components/ui/table/table-caption.js +5 -10
- 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.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.js +1 -6
- 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/theme/theme-collection/core-variables.js +13 -11
- package/core/components/ui/theme/theme-collection/dark.js +1 -1
- package/core/components/ui/theme/theme.d.ts +1 -6
- package/core/components/ui/theme/theme.js +19 -46
- package/core/components/ui/toast/message-subscriber.d.ts +16 -7
- package/core/components/ui/toast/message-subscriber.js +10 -8
- package/core/components/ui/toast/toast-item.js +1 -1
- package/core/components/ui/toast/toast.d.ts +3 -2
- package/core/components/ui/toast/toast.js +33 -19
- package/core/components/ui/toast/types.d.ts +3 -2
- package/core/components/ui/tooltip/tooltip.d.ts +1 -0
- package/core/components/ui/tooltip/tooltip.js +36 -15
- package/core/components/ui/ui.d.ts +1 -1
- package/core/components/ui/ui.js +1 -4
- package/core/core.js +5 -6
- package/core/mixins/Fetcher.d.ts +20 -13
- package/core/mixins/Fetcher.js +44 -19
- package/core/mixins/FormCheckable.d.ts +25 -13
- package/core/mixins/FormCheckable.js +180 -23
- package/core/mixins/FormElement.d.ts +17 -9
- package/core/mixins/FormElement.js +56 -39
- package/core/mixins/FormInput.d.ts +22 -12
- package/core/mixins/FormInput.js +4 -3
- package/core/mixins/Subscriber.d.ts +12 -8
- package/core/mixins/Subscriber.js +51 -48
- package/core/mixins/TemplatesContainer.d.ts +2 -1
- package/core/mixins/TemplatesContainer.js +2 -2
- package/core/utils/Arrays.d.ts +15 -15
- package/core/utils/Arrays.js +12 -9
- package/core/utils/DataBindObserver.d.ts +18 -11
- package/core/utils/DataBindObserver.js +47 -54
- package/core/utils/Electron.d.ts +5 -1
- package/core/utils/Electron.js +4 -2
- package/core/utils/HTML.d.ts +9 -2
- package/core/utils/HTML.js +24 -5
- package/core/utils/LocationHandler.d.ts +6 -5
- package/core/utils/LocationHandler.js +27 -16
- package/core/utils/Objects.d.ts +7 -4
- package/core/utils/Objects.js +37 -9
- package/core/utils/{PublisherProxy.d.mts → PublisherProxy.d.ts} +49 -34
- package/core/utils/{PublisherProxy.mjs → PublisherProxy.js} +107 -77
- package/core/utils/Utils.d.ts +3 -0
- package/core/utils/Utils.js +18 -0
- package/core/utils/api.d.ts +26 -9
- package/core/utils/api.js +62 -45
- package/img/concorde-logo.svg +1 -0
- package/img/concorde.png +0 -0
- package/img/concorde_def.png +0 -0
- package/mixins.d.ts +53 -29
- package/mixins.js +3 -4
- package/package.json +51 -12
- 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
- package/core/components/ui/taxonomy/taxonomy.d.ts +0 -41
- package/core/components/ui/taxonomy/taxonomy.js +0 -115
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from "lit";
|
|
2
|
-
declare const SonicSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
2
|
+
declare const SonicSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* Voir la partie dédiée dans *MISCALLENOUS*
|
|
5
|
+
*/
|
|
3
6
|
export declare class SonicSubscriber extends SonicSubscriber_base {
|
|
4
7
|
noAutofill: boolean;
|
|
5
8
|
connectedCallback(): void;
|
|
@@ -7,10 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
9
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
|
+
const tagName = "sonic-subscriber";
|
|
10
11
|
/**
|
|
11
12
|
* Voir la partie dédiée dans *MISCALLENOUS*
|
|
12
13
|
*/
|
|
13
|
-
const tagName = "sonic-subscriber";
|
|
14
14
|
let SonicSubscriber = class SonicSubscriber extends Subscriber(LitElement) {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
@@ -36,8 +36,3 @@ SonicSubscriber = __decorate([
|
|
|
36
36
|
customElement(tagName)
|
|
37
37
|
], SonicSubscriber);
|
|
38
38
|
export { SonicSubscriber };
|
|
39
|
-
//Ajout pour Storybook
|
|
40
|
-
try {
|
|
41
|
-
customElements.define(tagName, SonicSubscriber);
|
|
42
|
-
}
|
|
43
|
-
catch (e) { }
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare const SonicValue_base: (new (...args: any[]) => import("../../../mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
3
|
+
export declare class SonicValue extends SonicValue_base {
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { LitElement, html } from "lit";
|
|
8
|
+
import { customElement } from "lit/decorators.js";
|
|
9
|
+
import { Subscriber } from "@supersoniks/concorde/mixins";
|
|
10
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
11
|
+
const tagName = "sonic-value"; // For Astro.build
|
|
12
|
+
let SonicValue = class SonicValue extends Subscriber(LitElement) {
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
this.setAttribute("subDataProvider", this.getAttribute("key"));
|
|
15
|
+
super.connectedCallback();
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
if (typeof this.props !== "string")
|
|
19
|
+
return html `<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
|
|
20
|
+
return html `${unsafeHTML(this.props)}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
SonicValue = __decorate([
|
|
24
|
+
customElement(tagName)
|
|
25
|
+
], SonicValue);
|
|
26
|
+
export { SonicValue };
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
export const customScroll = css `
|
|
3
|
-
|
|
4
3
|
.custom-scroll {
|
|
5
|
-
overflow:auto !important;
|
|
4
|
+
overflow: auto !important;
|
|
5
|
+
overflow-y: overlay !important;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
.custom-scroll::-webkit-scrollbar {
|
|
9
9
|
width: 0.5rem;
|
|
10
10
|
height: 0.5rem;
|
|
11
|
-
border: solid .15rem transparent;
|
|
11
|
+
border: solid 0.15rem transparent;
|
|
12
12
|
border-radius: var(--sc-rounded);
|
|
13
|
-
background:transparent;
|
|
13
|
+
background: transparent;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.custom-scroll::-webkit-scrollbar-thumb {
|
|
17
17
|
box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg);
|
|
18
18
|
border-radius: var(--sc-rounded);
|
|
19
|
-
border: solid .15rem transparent;
|
|
19
|
+
border: solid 0.15rem transparent;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
21
|
`;
|
|
@@ -3,10 +3,12 @@ export const fontSize = css `
|
|
|
3
3
|
/*SIZES*/
|
|
4
4
|
:host {
|
|
5
5
|
--sc-fs: 1rem;
|
|
6
|
+
--sc-lh: 1.2;
|
|
6
7
|
font-size: var(--sc-fs);
|
|
8
|
+
line-height: var(--sc-lh);
|
|
7
9
|
}
|
|
8
10
|
:host([size="2xs"]) {
|
|
9
|
-
--sc-fs: 0.
|
|
11
|
+
--sc-fs: 0.625rem;
|
|
10
12
|
}
|
|
11
13
|
:host([size="xs"]) {
|
|
12
14
|
--sc-fs: 0.75rem;
|
|
@@ -13,8 +13,8 @@ export declare class Alert extends LitElement {
|
|
|
13
13
|
* Peut être renseigné dans le slot pour créer des messages plus complexes
|
|
14
14
|
*/
|
|
15
15
|
text: string;
|
|
16
|
-
size?:
|
|
16
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
17
17
|
background: boolean;
|
|
18
|
-
status:
|
|
18
|
+
status: "default" | "error" | "warning" | "primary" | "info";
|
|
19
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
20
20
|
}
|
|
@@ -26,13 +26,13 @@ let Alert = class Alert extends LitElement {
|
|
|
26
26
|
/**
|
|
27
27
|
* Titre du message d'erreur
|
|
28
28
|
*/
|
|
29
|
-
this.label =
|
|
29
|
+
this.label = "";
|
|
30
30
|
/**
|
|
31
31
|
* Peut être renseigné dans le slot pour créer des messages plus complexes
|
|
32
32
|
*/
|
|
33
|
-
this.text =
|
|
33
|
+
this.text = "";
|
|
34
34
|
this.background = false;
|
|
35
|
-
this.status =
|
|
35
|
+
this.status = "default";
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
return html `<div part="alert" class="alert">
|
|
@@ -48,7 +48,7 @@ Alert.styles = [
|
|
|
48
48
|
fontSize,
|
|
49
49
|
css `
|
|
50
50
|
:host {
|
|
51
|
-
--sc-alert-color:
|
|
51
|
+
--sc-alert-color: var(--sc-base-content);
|
|
52
52
|
--sc-alert-rounded: var(--sc-rounded);
|
|
53
53
|
--sc-alert-fw: var(--sc-font-weight-base);
|
|
54
54
|
--sc-alert-fst: var(--sc-font-style-base);
|
|
@@ -63,7 +63,6 @@ Alert.styles = [
|
|
|
63
63
|
position: relative;
|
|
64
64
|
display: flex;
|
|
65
65
|
gap: 0.4em;
|
|
66
|
-
line-height: 1.2;
|
|
67
66
|
border-radius: var(--sc-alert-rounded);
|
|
68
67
|
}
|
|
69
68
|
|
|
@@ -71,16 +70,16 @@ Alert.styles = [
|
|
|
71
70
|
font-weight: var(--sc-alert-label-fw);
|
|
72
71
|
}
|
|
73
72
|
|
|
74
|
-
:host([status=
|
|
73
|
+
:host([status="warning"]) {
|
|
75
74
|
--sc-alert-color: var(--sc-warning);
|
|
76
75
|
}
|
|
77
|
-
:host([status=
|
|
76
|
+
:host([status="error"]) {
|
|
78
77
|
--sc-alert-color: var(--sc-danger);
|
|
79
78
|
}
|
|
80
|
-
:host([status=
|
|
79
|
+
:host([status="info"]) {
|
|
81
80
|
--sc-alert-color: var(--sc-info);
|
|
82
81
|
}
|
|
83
|
-
:host([status=
|
|
82
|
+
:host([status="success"]) {
|
|
84
83
|
--sc-alert-color: var(--sc-success);
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -91,7 +90,7 @@ Alert.styles = [
|
|
|
91
90
|
}
|
|
92
91
|
:host([background]) .alert:before {
|
|
93
92
|
background-color: currentColor;
|
|
94
|
-
content:
|
|
93
|
+
content: "";
|
|
95
94
|
display: block;
|
|
96
95
|
position: absolute;
|
|
97
96
|
left: 0;
|
|
@@ -112,10 +111,10 @@ Alert.styles = [
|
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
/*Rounded*/
|
|
115
|
-
:host([size=
|
|
114
|
+
:host([size="xs"]) .alert {
|
|
116
115
|
--sc-alert-rounded: var(--sc-rounded-sm);
|
|
117
116
|
}
|
|
118
|
-
:host([size=
|
|
117
|
+
:host([size="sm"]) .alert {
|
|
119
118
|
--sc-alert-rounded: var(--sc-rounded-sm);
|
|
120
119
|
}
|
|
121
120
|
`,
|
|
@@ -139,7 +138,3 @@ Alert = __decorate([
|
|
|
139
138
|
customElement(tagName)
|
|
140
139
|
], Alert);
|
|
141
140
|
export { Alert };
|
|
142
|
-
try {
|
|
143
|
-
customElements.define(tagName, Alert);
|
|
144
|
-
}
|
|
145
|
-
catch (e) { }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
import { Size } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
2
3
|
/**
|
|
3
4
|
* Un badge simple avec deux slots, un nommé prefix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
|
|
4
5
|
* * Le badge est comparable au bouton car il possèdent tous les deux les propriétés *type* (primary...), *variant*(outline, ghost), size(xs...)...
|
|
@@ -19,6 +20,7 @@ export declare class Badge extends LitElement {
|
|
|
19
20
|
/**
|
|
20
21
|
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
21
22
|
*/
|
|
22
|
-
size?:
|
|
23
|
+
size?: Size;
|
|
24
|
+
ellipsis: boolean;
|
|
23
25
|
render(): import("lit-html").TemplateResult<1>;
|
|
24
26
|
}
|
|
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
|
-
|
|
9
|
+
import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
10
|
+
const tagName = "sonic-badge";
|
|
10
11
|
/**
|
|
11
12
|
* Un badge simple avec deux slots, un nommé prefix et un nomé suffix de manière à pouvoir mettre (par exemple) une icone avant ou après le contenu.
|
|
12
13
|
* * Le badge est comparable au bouton car il possèdent tous les deux les propriétés *type* (primary...), *variant*(outline, ghost), size(xs...)...
|
|
@@ -25,6 +26,7 @@ let Badge = class Badge extends LitElement {
|
|
|
25
26
|
* * outline : composant légé avec une bordure
|
|
26
27
|
*/
|
|
27
28
|
this.variant = "default";
|
|
29
|
+
this.ellipsis = false;
|
|
28
30
|
}
|
|
29
31
|
render() {
|
|
30
32
|
return html `
|
|
@@ -35,12 +37,13 @@ let Badge = class Badge extends LitElement {
|
|
|
35
37
|
}
|
|
36
38
|
};
|
|
37
39
|
Badge.styles = [
|
|
40
|
+
fontSize,
|
|
38
41
|
css `
|
|
39
42
|
:host {
|
|
40
43
|
--sc-badge-gap: 0.3em;
|
|
41
|
-
--sc-badge-py: 0.
|
|
44
|
+
--sc-badge-py: 0.17em;
|
|
42
45
|
--sc-badge-px: 0.66em;
|
|
43
|
-
--sc-
|
|
46
|
+
--sc-fs: 1rem;
|
|
44
47
|
|
|
45
48
|
--sc-badge-color: var(--sc-base-content, #1f2937);
|
|
46
49
|
--sc-badge-bg: var(--sc-base-200, #e5e7eb);
|
|
@@ -49,15 +52,15 @@ Badge.styles = [
|
|
|
49
52
|
--sc-badge-border-color: transparent;
|
|
50
53
|
--sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color);
|
|
51
54
|
|
|
52
|
-
--sc-badge-rounded:
|
|
53
|
-
--sc-badge-line-height: 1.15;
|
|
55
|
+
--sc-badge-rounded: 99px;
|
|
54
56
|
--sc-badge-fw: var(--sc-font-weight-base);
|
|
55
57
|
|
|
56
58
|
display: inline-flex;
|
|
57
|
-
align-items:center;
|
|
59
|
+
align-items: center;
|
|
58
60
|
box-sizing: border-box;
|
|
59
|
-
line-height: var(--sc-
|
|
61
|
+
line-height: var(--sc-lh);
|
|
60
62
|
border-radius: var(--sc-badge-rounded);
|
|
63
|
+
|
|
61
64
|
background: var(--sc-badge-bg);
|
|
62
65
|
color: var(--sc-badge-color);
|
|
63
66
|
|
|
@@ -70,6 +73,7 @@ Badge.styles = [
|
|
|
70
73
|
padding-right: var(--sc-badge-px);
|
|
71
74
|
min-height: calc(var(--sc-badge-px) * 2);
|
|
72
75
|
border: var(--sc-badge-border);
|
|
76
|
+
-webkit-print-color-adjust: exact;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
/*TYPES*/
|
|
@@ -100,34 +104,28 @@ Badge.styles = [
|
|
|
100
104
|
|
|
101
105
|
/*SIZE*/
|
|
102
106
|
:host {
|
|
103
|
-
font-size: var(--sc-
|
|
107
|
+
font-size: var(--sc-fs);
|
|
104
108
|
gap: var(--sc-badge-gap);
|
|
105
109
|
}
|
|
106
110
|
|
|
107
|
-
|
|
108
111
|
:host([size="2xs"]) {
|
|
109
|
-
--sc-badge-
|
|
110
|
-
--sc-badge-gap: 0.3em;
|
|
112
|
+
--sc-badge-gap: 0.35em;
|
|
111
113
|
}
|
|
112
114
|
:host([size="xs"]) {
|
|
113
|
-
--sc-badge-fs: 0.68rem;
|
|
114
115
|
--sc-badge-gap: 0.35em;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
:host([size="sm"]) {
|
|
118
|
-
--sc-badge-fs: 0.85rem;
|
|
119
119
|
--sc-badge-gap: 0.35em;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
:host([size="lg"]) {
|
|
123
|
-
--sc-
|
|
124
|
-
--sc-badge-fs: 1.25rem;
|
|
123
|
+
--sc-lh: 1.2;
|
|
125
124
|
--sc-badge-gap: 0.5em;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
127
|
:host([size="xl"]) {
|
|
129
|
-
--sc-
|
|
130
|
-
--sc-badge-fs: 1.5rem;
|
|
128
|
+
--sc-lh: 1.2;
|
|
131
129
|
--sc-badge-gap: 0.5em;
|
|
132
130
|
}
|
|
133
131
|
|
|
@@ -156,6 +154,24 @@ Badge.styles = [
|
|
|
156
154
|
color: var(--sc-badge-color);
|
|
157
155
|
background: transparent;
|
|
158
156
|
}
|
|
157
|
+
|
|
158
|
+
:host([ellipsis]) {
|
|
159
|
+
flex-wrap: nowrap;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
max-width: 100%;
|
|
162
|
+
}
|
|
163
|
+
:host([ellipsis]) slot {
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
display: block;
|
|
166
|
+
text-overflow: ellipsis;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
max-width: 100%;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
slot[name="suffix"],
|
|
172
|
+
slot[name="prefix"] {
|
|
173
|
+
flex-shrink: 0;
|
|
174
|
+
}
|
|
159
175
|
`,
|
|
160
176
|
];
|
|
161
177
|
__decorate([
|
|
@@ -167,12 +183,10 @@ __decorate([
|
|
|
167
183
|
__decorate([
|
|
168
184
|
property({ type: String, reflect: true })
|
|
169
185
|
], Badge.prototype, "size", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
property({ type: Boolean, reflect: true })
|
|
188
|
+
], Badge.prototype, "ellipsis", void 0);
|
|
170
189
|
Badge = __decorate([
|
|
171
190
|
customElement(tagName)
|
|
172
191
|
], Badge);
|
|
173
192
|
export { Badge };
|
|
174
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
175
|
-
try {
|
|
176
|
-
customElements.define(tagName, Badge);
|
|
177
|
-
}
|
|
178
|
-
catch (e) { }
|
|
@@ -6,32 +6,39 @@ declare const Button_base: {
|
|
|
6
6
|
forceAutoFill: boolean;
|
|
7
7
|
unique: true | null;
|
|
8
8
|
radio: true | null;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
unCheckOnDisconnect: boolean;
|
|
10
|
+
_checked: true | "indeterminate" | null;
|
|
11
|
+
checked: true | "indeterminate" | null;
|
|
11
12
|
validateFormElement(): void;
|
|
12
|
-
|
|
13
|
+
checksAll(): boolean;
|
|
14
|
+
setCheckedValue(checked: true | "indeterminate" | null): void;
|
|
13
15
|
handleChange(): void;
|
|
14
16
|
getValueForFormPublisher(): any;
|
|
15
|
-
setFormValueFromPublisher(value:
|
|
16
|
-
|
|
17
|
+
setFormValueFromPublisher(value: string | (string | null)[] | null): void;
|
|
18
|
+
getCheckAllPublisher(): any;
|
|
19
|
+
updateAllChecked: () => void;
|
|
20
|
+
onChecksAllRequest: (value: string) => void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
connectedCallback(): void;
|
|
17
23
|
getFormPublisher(): any;
|
|
18
24
|
updateDataValue(): void;
|
|
19
|
-
handleBlur(e?:
|
|
25
|
+
handleBlur(e?: Event | undefined): void;
|
|
26
|
+
focus?: (() => void) | undefined;
|
|
27
|
+
shadowRoot?: ShadowRoot | undefined;
|
|
20
28
|
error: boolean;
|
|
21
29
|
autofocus: boolean;
|
|
22
30
|
required: boolean;
|
|
23
31
|
disabled: true | null;
|
|
24
32
|
formDataProvider: string;
|
|
33
|
+
ariaLabelledby?: string | undefined;
|
|
34
|
+
ariaLabel?: string | undefined;
|
|
25
35
|
_name: string;
|
|
26
36
|
name: string;
|
|
27
|
-
props:
|
|
28
|
-
propertyMap:
|
|
29
|
-
isConnected: boolean;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* * Le bouton est comparable au badge car il possèdent tous les deux les propriétés *type* (primary...), *variant*(outline, ghost), size(xs...)...
|
|
33
|
-
* * Le bouton possède cependant et notamment une propriété href contrairement à un badge
|
|
34
|
-
*/
|
|
37
|
+
props: import("../../../_types/types").CoreJSType;
|
|
38
|
+
propertyMap: object;
|
|
39
|
+
isConnected: boolean;
|
|
40
|
+
children: HTMLCollection;
|
|
41
|
+
appendChild(node: Node): Node;
|
|
35
42
|
getAncestorAttributeValue(attributeName: string): string;
|
|
36
43
|
hasAncestorAttribute(attributeName: string): boolean;
|
|
37
44
|
querySelectorAll(selector: string): NodeListOf<Element>;
|
|
@@ -46,14 +53,13 @@ declare const Button_base: {
|
|
|
46
53
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
47
54
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
48
55
|
removeAttribute(name: string): void;
|
|
56
|
+
initPublisher(): void;
|
|
49
57
|
getApiConfiguration(): import("../../../utils/api").APIConfiguration;
|
|
50
|
-
connectedCallback(): void;
|
|
51
58
|
requestUpdate(): void;
|
|
52
59
|
getAttribute(name: string): string;
|
|
53
|
-
hasAttribute(attributeName:
|
|
54
|
-
disconnectedCallback(): void;
|
|
60
|
+
hasAttribute(attributeName: string): boolean;
|
|
55
61
|
};
|
|
56
|
-
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface) & typeof LitElement;
|
|
62
|
+
} & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/FormElement").FormElementInterface) & (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<import("../../../_types/types").CoreJSType>) & typeof LitElement;
|
|
57
63
|
/**
|
|
58
64
|
* 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.
|
|
59
65
|
* * L'objet et ses slot sont en display flex avec direction / alignement et justifications configurables
|
|
@@ -101,15 +107,15 @@ export declare class Button extends Button_base {
|
|
|
101
107
|
*/
|
|
102
108
|
minWidth: string;
|
|
103
109
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
* Si un bouton n'a qu'une icone pour contenu, agrandi l'icone pour des raisons d'équilibre
|
|
111
|
+
*/
|
|
106
112
|
icon: boolean;
|
|
107
113
|
/**
|
|
108
114
|
* mode d'activation du bouton :
|
|
109
115
|
* - strict : l'url courante match exactement avec le href du bouton
|
|
110
116
|
* - partial : l'url courante match à gauche avec le href du bouton
|
|
111
117
|
* - disabled : aucune activation / désactivation
|
|
112
|
-
|
|
118
|
+
*/
|
|
113
119
|
autoActive: "strict" | "partial" | "disabled";
|
|
114
120
|
/**
|
|
115
121
|
* Laisse apparaitre un loader en remplacement du contenu du bouton.
|
|
@@ -137,7 +143,7 @@ export declare class Button extends Button_base {
|
|
|
137
143
|
pushState: boolean;
|
|
138
144
|
active: boolean;
|
|
139
145
|
handleNavigation(e: Event): void;
|
|
140
|
-
handleChange(e?:
|
|
146
|
+
handleChange(e?: Event): void;
|
|
141
147
|
connectedCallback(): void;
|
|
142
148
|
setCheckedValue(checked: true | null): void;
|
|
143
149
|
disconnectedCallback(): void;
|
|
@@ -147,5 +153,4 @@ export declare class Button extends Button_base {
|
|
|
147
153
|
render(): import("lit-html").TemplateResult<1>;
|
|
148
154
|
onSlotChange(): void;
|
|
149
155
|
}
|
|
150
|
-
export declare const SonicButton: typeof Button;
|
|
151
156
|
export {};
|