@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
|
@@ -9,21 +9,19 @@ import { customElement } from "lit/decorators.js";
|
|
|
9
9
|
const tagName = "sonic-tfoot";
|
|
10
10
|
let TableTfoot = class TableTfoot extends LitElement {
|
|
11
11
|
render() {
|
|
12
|
-
return html `<tfoot
|
|
12
|
+
return html `<tfoot>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</tfoot>`;
|
|
13
15
|
}
|
|
14
16
|
};
|
|
15
17
|
TableTfoot.styles = [
|
|
16
18
|
css `
|
|
17
19
|
:host {
|
|
18
20
|
display: contents;
|
|
19
|
-
}
|
|
21
|
+
}
|
|
22
|
+
`,
|
|
20
23
|
];
|
|
21
24
|
TableTfoot = __decorate([
|
|
22
25
|
customElement(tagName)
|
|
23
26
|
], TableTfoot);
|
|
24
27
|
export { TableTfoot };
|
|
25
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
26
|
-
try {
|
|
27
|
-
customElements.define(tagName, TableTfoot);
|
|
28
|
-
}
|
|
29
|
-
catch (e) { }
|
|
@@ -15,6 +15,8 @@ let TableTh = class TableTh extends LitElement {
|
|
|
15
15
|
const styles = {
|
|
16
16
|
textAlign: this.align,
|
|
17
17
|
minWidth: this.minWidth,
|
|
18
|
+
maxWidth: this.maxWidth,
|
|
19
|
+
width: this.width,
|
|
18
20
|
};
|
|
19
21
|
return html `<th
|
|
20
22
|
part="th"
|
|
@@ -31,10 +33,10 @@ TableTh.styles = [
|
|
|
31
33
|
css `
|
|
32
34
|
:host {
|
|
33
35
|
display: contents;
|
|
34
|
-
background:var(--sc-table-bg);
|
|
35
|
-
position:sticky;
|
|
36
|
-
top:0;
|
|
37
|
-
z-index:20;
|
|
36
|
+
background: var(--sc-table-bg);
|
|
37
|
+
position: sticky;
|
|
38
|
+
top: 0;
|
|
39
|
+
z-index: 20;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
th {
|
|
@@ -60,12 +62,13 @@ __decorate([
|
|
|
60
62
|
__decorate([
|
|
61
63
|
property({ type: String })
|
|
62
64
|
], TableTh.prototype, "minWidth", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
property({ type: String })
|
|
67
|
+
], TableTh.prototype, "maxWidth", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
property({ type: String })
|
|
70
|
+
], TableTh.prototype, "width", void 0);
|
|
63
71
|
TableTh = __decorate([
|
|
64
72
|
customElement(tagName)
|
|
65
73
|
], TableTh);
|
|
66
74
|
export { TableTh };
|
|
67
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
68
|
-
try {
|
|
69
|
-
customElements.define(tagName, TableTh);
|
|
70
|
-
}
|
|
71
|
-
catch (e) { }
|
|
File without changes
|
|
@@ -17,14 +17,9 @@ TableThead.styles = [
|
|
|
17
17
|
:host {
|
|
18
18
|
display: table-header-group;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
`,
|
|
21
21
|
];
|
|
22
22
|
TableThead = __decorate([
|
|
23
23
|
customElement(tagName)
|
|
24
24
|
], TableThead);
|
|
25
25
|
export { TableThead };
|
|
26
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
27
|
-
try {
|
|
28
|
-
customElements.define(tagName, TableThead);
|
|
29
|
-
}
|
|
30
|
-
catch (e) { }
|
|
File without changes
|
|
@@ -20,14 +20,12 @@ TableTr.styles = [
|
|
|
20
20
|
display: table-row;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
:host([odd]) {
|
|
24
|
+
background: var(--sc-table-accent-bg);
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
24
27
|
];
|
|
25
28
|
TableTr = __decorate([
|
|
26
29
|
customElement(tagName)
|
|
27
30
|
], TableTr);
|
|
28
31
|
export { TableTr };
|
|
29
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
30
|
-
try {
|
|
31
|
-
customElements.define(tagName, TableTr);
|
|
32
|
-
}
|
|
33
|
-
catch (e) { }
|
|
@@ -9,10 +9,7 @@ import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
|
9
9
|
export declare class Table extends LitElement {
|
|
10
10
|
static styles: import("lit").CSSResult[];
|
|
11
11
|
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
12
|
-
striped: boolean;
|
|
13
|
-
sticky: boolean;
|
|
14
12
|
bordered: boolean;
|
|
15
|
-
hover: boolean;
|
|
16
13
|
maxHeight?: string;
|
|
17
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
15
|
}
|
|
@@ -20,19 +20,15 @@ const tagName = "sonic-table";
|
|
|
20
20
|
let Table = class Table extends LitElement {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
|
-
this.striped = false;
|
|
24
|
-
this.sticky = false;
|
|
25
23
|
this.bordered = false;
|
|
26
|
-
this.hover = false;
|
|
27
24
|
}
|
|
28
25
|
render() {
|
|
29
26
|
const containerStyles = {
|
|
30
27
|
maxHeight: this.maxHeight,
|
|
31
28
|
};
|
|
32
29
|
return html `
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<div class="table" ?striped=${this.striped} ?hover=${this.hover} ?sticky=${this.sticky}>
|
|
30
|
+
<div class="table-container custom-scroll" style=${styleMap(containerStyles)}>
|
|
31
|
+
<div class="table">
|
|
36
32
|
<slot></slot>
|
|
37
33
|
</div>
|
|
38
34
|
</div>
|
|
@@ -47,51 +43,43 @@ Table.styles = [
|
|
|
47
43
|
--sc-table-fw: var(--sc-font-weight-base);
|
|
48
44
|
--sc-table-fst: var(--sc-font-style-base);
|
|
49
45
|
--sc-table-fs: 1rem;
|
|
50
|
-
--sc-table-border-color: var(--sc-
|
|
51
|
-
--sc-table-caption-color: var(--sc-base-
|
|
46
|
+
--sc-table-border-color: var(--sc-border-color);
|
|
47
|
+
--sc-table-caption-color: var(--sc-base-500);
|
|
52
48
|
--sc-table-bg: var(--sc-base);
|
|
53
|
-
--sc-table-
|
|
49
|
+
--sc-table-accent-bg: var(--sc-base-50);
|
|
50
|
+
--sc-table-hover-bg: var(--sc-base-100);
|
|
51
|
+
--sc-table-th-fs: 0.85em;
|
|
54
52
|
--sc-table-th-fw: bold;
|
|
55
53
|
--sc-table-th-tt: uppercase;
|
|
56
54
|
--sc-table-th-px: var(--sc-table-td-px);
|
|
57
|
-
--sc-table-th-py: calc(1.8 * var(--sc-table-td-py)
|
|
58
|
-
--sc-table-td-px: .5em;
|
|
59
|
-
--sc-table-td-py: .5em;
|
|
60
|
-
display:block;
|
|
55
|
+
--sc-table-th-py: calc(1.8 * var(--sc-table-td-py));
|
|
56
|
+
--sc-table-td-px: 0.5em;
|
|
57
|
+
--sc-table-td-py: 0.5em;
|
|
58
|
+
display: block;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
:host([maxHeight]) .table-container {
|
|
64
62
|
overflow-x: auto;
|
|
65
63
|
-webkit-overflow-scrolling: touch;
|
|
66
64
|
}
|
|
67
|
-
|
|
65
|
+
|
|
68
66
|
.table {
|
|
69
67
|
width: 100%;
|
|
70
68
|
display: table;
|
|
71
|
-
box-sizing:border-box;
|
|
69
|
+
box-sizing: border-box;
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
:host([bordered]) .table-container {
|
|
75
|
-
border:var(--sc-border-width) solid var(--sc-table-border-color) !important;
|
|
73
|
+
border: var(--sc-border-width) solid var(--sc-table-border-color) !important;
|
|
76
74
|
}
|
|
77
|
-
|
|
78
75
|
`,
|
|
79
76
|
];
|
|
80
77
|
__decorate([
|
|
81
78
|
property({ type: String, reflect: true })
|
|
82
79
|
], Table.prototype, "size", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
property({ type: Boolean, reflect: true })
|
|
85
|
-
], Table.prototype, "striped", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ type: Boolean, reflect: true })
|
|
88
|
-
], Table.prototype, "sticky", void 0);
|
|
89
80
|
__decorate([
|
|
90
81
|
property({ type: Boolean, reflect: true })
|
|
91
82
|
], Table.prototype, "bordered", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property({ type: Boolean, reflect: true })
|
|
94
|
-
], Table.prototype, "hover", void 0);
|
|
95
83
|
__decorate([
|
|
96
84
|
property({ type: String })
|
|
97
85
|
], Table.prototype, "maxHeight", void 0);
|
|
@@ -99,8 +87,3 @@ Table = __decorate([
|
|
|
99
87
|
customElement(tagName)
|
|
100
88
|
], Table);
|
|
101
89
|
export { Table };
|
|
102
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
103
|
-
try {
|
|
104
|
-
customElements.define(tagName, Table);
|
|
105
|
-
}
|
|
106
|
-
catch (e) { }
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
3
|
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
4
|
+
import { IconConf } from "../icon/icons";
|
|
5
|
+
declare type TaxonomyConf = Record<string, boolean | string>;
|
|
4
6
|
/**
|
|
5
7
|
* Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
|
|
6
8
|
*/
|
|
@@ -9,12 +11,12 @@ export declare class Taxonomy extends LitElement {
|
|
|
9
11
|
/**
|
|
10
12
|
* Identifiant d'icone passé en interne au composant *sonic-icon*
|
|
11
13
|
*/
|
|
12
|
-
icon:
|
|
14
|
+
icon: IconConf;
|
|
13
15
|
/**
|
|
14
16
|
* Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
|
|
15
17
|
* Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
|
|
16
18
|
*/
|
|
17
|
-
taxonomy:
|
|
19
|
+
taxonomy: TaxonomyConf[];
|
|
18
20
|
/**
|
|
19
21
|
* Chaque terme sera séparé par la valeur contenue dans cette propriété
|
|
20
22
|
*/
|
|
@@ -32,10 +34,11 @@ export declare class Taxonomy extends LitElement {
|
|
|
32
34
|
* * gost : composant super léger visuellement
|
|
33
35
|
* * outline : composant légé avec une bordure
|
|
34
36
|
*/
|
|
35
|
-
variant: "default" | "outline";
|
|
37
|
+
variant: "default" | "outline" | "ghost";
|
|
36
38
|
/**
|
|
37
39
|
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
38
40
|
*/
|
|
39
41
|
size: "md" | "xs" | "sm" | "lg";
|
|
40
42
|
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
41
43
|
}
|
|
44
|
+
export {};
|
|
@@ -21,7 +21,7 @@ let Taxonomy = class Taxonomy extends LitElement {
|
|
|
21
21
|
/**
|
|
22
22
|
* Identifiant d'icone passé en interne au composant *sonic-icon*
|
|
23
23
|
*/
|
|
24
|
-
this.icon = {};
|
|
24
|
+
this.icon = { name: "" };
|
|
25
25
|
/**
|
|
26
26
|
* Tableau d'objets de la forme :{*key*_name:*"Une taxonomie"*} ou *key* correspond à la valeur fournie à la propriété *key*.
|
|
27
27
|
* Dans ce cas *"une taxonomie"* sera un des termes affiches dans le composant.
|
|
@@ -51,7 +51,7 @@ let Taxonomy = class Taxonomy extends LitElement {
|
|
|
51
51
|
this.size = "md";
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
if (!this.taxonomy)
|
|
54
|
+
if (!Array.isArray(this.taxonomy))
|
|
55
55
|
return nothing;
|
|
56
56
|
let key = this.key + "_display";
|
|
57
57
|
let taxo = this.taxonomy.filter((elt) => elt != null && (elt[key] === true || elt[key] == "1" || !elt.hasOwnProperty(key)));
|
|
@@ -62,10 +62,15 @@ let Taxonomy = class Taxonomy extends LitElement {
|
|
|
62
62
|
this.style.removeProperty("display");
|
|
63
63
|
return html `
|
|
64
64
|
<sonic-badge type=${this.type} variant=${this.variant} size=${this.size}>
|
|
65
|
-
<sonic-icon
|
|
65
|
+
<sonic-icon
|
|
66
|
+
slot="prefix"
|
|
67
|
+
library=${ifDefined(this.icon.library)}
|
|
68
|
+
prefix=${ifDefined(this.icon.prefix)}
|
|
69
|
+
name=${ifDefined(this.icon.name)}
|
|
70
|
+
></sonic-icon>
|
|
66
71
|
<span class="taxonomy-list">
|
|
67
72
|
${repeat(taxo, (item) => item[this.key + "_id"], (item) => {
|
|
68
|
-
return html `<span> ${item[this.key + "_name"]}</span
|
|
73
|
+
return html `<span> ${item[this.key + "_name"] || item["name"]}</span
|
|
69
74
|
><span class="sonic-taxonomy-separator">${unsafeHTML(this.separator)}</span>`;
|
|
70
75
|
})}
|
|
71
76
|
</span>
|
|
@@ -108,8 +113,3 @@ Taxonomy = __decorate([
|
|
|
108
113
|
customElement(tagName)
|
|
109
114
|
], Taxonomy);
|
|
110
115
|
export { Taxonomy };
|
|
111
|
-
//Ajout pour la creation du cem notamment pour Storybook
|
|
112
|
-
try {
|
|
113
|
-
customElements.define("sonic-taxonomy", Taxonomy);
|
|
114
|
-
}
|
|
115
|
-
catch (e) { }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ import { css } from "lit";
|
|
|
2
2
|
export const coreVariables = css `
|
|
3
3
|
:host {
|
|
4
4
|
/* polices*/
|
|
5
|
-
--sc-font-family-base: "Inter var", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
5
|
+
--sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
6
6
|
"Helvetica Neue", Arial, sans-serif;
|
|
7
7
|
--sc-font-weight-base: 400;
|
|
8
8
|
--sc-font-style-base: normal;
|
|
@@ -22,14 +22,14 @@ export const coreVariables = css `
|
|
|
22
22
|
--sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
|
|
23
23
|
--sc-rounded: 0.375rem;
|
|
24
24
|
--sc-rounded-md: calc(var(--sc-rounded) * 1.8);
|
|
25
|
-
--sc-rounded-lg: calc(var(--sc-rounded) * 3
|
|
25
|
+
--sc-rounded-lg: calc(var(--sc-rounded) * 3);
|
|
26
26
|
--sc-rounded-xl: calc(var(--sc-rounded) * 7);
|
|
27
|
-
--sc-rounded-size-intensity: calc((1em - 1rem) * .4);
|
|
27
|
+
--sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
|
|
28
28
|
|
|
29
29
|
/* 4 for rounded full*/
|
|
30
|
-
--sc-btn-rounded-intensity
|
|
30
|
+
--sc-btn-rounded-intensity: 1.4;
|
|
31
31
|
--sc-btn-font-weight: 500;
|
|
32
|
-
--sc-btn-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity)
|
|
32
|
+
--sc-btn-rounded: calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity));
|
|
33
33
|
|
|
34
34
|
/* Placeholder */
|
|
35
35
|
--sc-placeholder-bg: rgba(17, 24, 39, 0.05);
|
|
@@ -37,18 +37,21 @@ export const coreVariables = css `
|
|
|
37
37
|
/* OMBRES */
|
|
38
38
|
--sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
39
39
|
--sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
40
|
-
--sc-shadow-lg: 0 10px 15px
|
|
40
|
+
--sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
41
41
|
--sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
42
42
|
--sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
43
43
|
|
|
44
44
|
/* Forms */
|
|
45
45
|
--sc-border-width: max(1px, 0.12rem);
|
|
46
|
-
--sc-
|
|
46
|
+
--sc-border-color: var(--sc-base-200);
|
|
47
|
+
--sc-form-height: 2.5em;
|
|
47
48
|
--sc-form-border-width: var(--sc-border-width);
|
|
48
49
|
--sc-input-bg: var(--sc-base-100);
|
|
49
50
|
--sc-input-border-color: var(--sc-input-bg);
|
|
50
|
-
--sc-input-rounded-intensity
|
|
51
|
-
--sc-input-rounded: calc(
|
|
51
|
+
--sc-input-rounded-intensity: 1.4;
|
|
52
|
+
--sc-input-rounded: calc(
|
|
53
|
+
(var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity)
|
|
54
|
+
);
|
|
52
55
|
--sc-label-font-weight: 500;
|
|
53
56
|
|
|
54
57
|
/* Contrast -- ex : Text on images */
|
|
@@ -56,10 +59,9 @@ export const coreVariables = css `
|
|
|
56
59
|
--sc-contrast: #11151f;
|
|
57
60
|
|
|
58
61
|
/*Scrollbar*/
|
|
59
|
-
--sc-scrollbar-bg
|
|
62
|
+
--sc-scrollbar-bg: var(--sc-base-400);
|
|
60
63
|
|
|
61
64
|
/*Body*/
|
|
62
65
|
--sc-body-bg: var(--sc-base);
|
|
63
|
-
|
|
64
66
|
}
|
|
65
67
|
`;
|
|
File without changes
|
|
@@ -14,7 +14,7 @@ const darkCss = css `
|
|
|
14
14
|
|
|
15
15
|
--sc-base: var(--sc-dark-base, #1d2634);
|
|
16
16
|
--sc-base-50: var(--sc-dark-base-50, #1f2937);
|
|
17
|
-
--sc-base-100: var(--sc-dark-base-100, #
|
|
17
|
+
--sc-base-100: var(--sc-dark-base-100, #252c36);
|
|
18
18
|
--sc-base-200: var(--sc-dark-base-200, #2c3543);
|
|
19
19
|
--sc-base-300: var(--sc-dark-base-300, #38414e);
|
|
20
20
|
--sc-base-400: var(--sc-dark-base-400, #515964);
|
|
File without changes
|
|
File without changes
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
export declare const tailwind: import("lit").CSSResult;
|
|
3
2
|
export declare class Theme extends LitElement {
|
|
4
3
|
static styles: import("lit").CSSResult[];
|
|
5
4
|
theme: string;
|
|
6
5
|
background: boolean;
|
|
7
6
|
color: boolean;
|
|
8
7
|
font: boolean;
|
|
9
|
-
contrastDarkMode: boolean;
|
|
10
8
|
connectedCallback(): void;
|
|
11
|
-
updated(): void;
|
|
12
9
|
postCSSVars(): void;
|
|
13
|
-
receiveMessage(event:
|
|
10
|
+
receiveMessage(event: MessageEvent): void;
|
|
14
11
|
getCssVariables(): Record<string, string>;
|
|
15
|
-
contrast(color: string, percent: number): string;
|
|
16
|
-
contrastBg(): void;
|
|
17
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
13
|
}
|
|
@@ -5,15 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var Theme_1;
|
|
8
|
-
import { html, LitElement, css
|
|
8
|
+
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
10
|
import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
|
|
11
11
|
import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
|
|
12
12
|
import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
|
|
13
|
-
import tailwindImport from "./css/tailwind.css?inline";
|
|
14
|
-
export const tailwind = css `
|
|
15
|
-
${unsafeCSS(tailwindImport)}
|
|
16
|
-
`;
|
|
17
13
|
const tagName = "sonic-theme";
|
|
18
14
|
let Theme = Theme_1 = class Theme extends LitElement {
|
|
19
15
|
constructor() {
|
|
@@ -22,16 +18,12 @@ let Theme = Theme_1 = class Theme extends LitElement {
|
|
|
22
18
|
this.background = false;
|
|
23
19
|
this.color = false;
|
|
24
20
|
this.font = false;
|
|
25
|
-
this.contrastDarkMode = false;
|
|
26
21
|
}
|
|
27
22
|
connectedCallback() {
|
|
28
23
|
super.connectedCallback();
|
|
29
24
|
window.addEventListener("message", (e) => this.receiveMessage(e), false);
|
|
30
25
|
this.postCSSVars();
|
|
31
26
|
}
|
|
32
|
-
updated() {
|
|
33
|
-
this.contrastBg();
|
|
34
|
-
}
|
|
35
27
|
postCSSVars() {
|
|
36
28
|
const stylesheets = document.styleSheets;
|
|
37
29
|
const ssLength = stylesheets.length;
|
|
@@ -61,11 +53,14 @@ let Theme = Theme_1 = class Theme extends LitElement {
|
|
|
61
53
|
let stylesheets = [...Theme_1.styles.map((s) => s.styleSheet), ...Array.from(document.styleSheets)];
|
|
62
54
|
for (let stylesheet of stylesheets) {
|
|
63
55
|
try {
|
|
64
|
-
|
|
56
|
+
if (!stylesheet)
|
|
57
|
+
continue;
|
|
58
|
+
let rules = stylesheet.cssRules;
|
|
65
59
|
for (let rule of rules) {
|
|
66
|
-
if (!rule
|
|
60
|
+
if (!("style" in rule))
|
|
67
61
|
continue;
|
|
68
|
-
|
|
62
|
+
let style = rule.style;
|
|
63
|
+
for (let name of style) {
|
|
69
64
|
if (names.includes(name) || name.indexOf("--sc") !== 0)
|
|
70
65
|
continue;
|
|
71
66
|
names.push(name);
|
|
@@ -79,24 +74,6 @@ let Theme = Theme_1 = class Theme extends LitElement {
|
|
|
79
74
|
names.forEach((name) => (result[name] = style.getPropertyValue(name)));
|
|
80
75
|
return result;
|
|
81
76
|
}
|
|
82
|
-
// function to darken a color based on an hexa value
|
|
83
|
-
contrast(color, percent) {
|
|
84
|
-
let num = parseInt(color.replace("#", ""), 16), amt = Math.round(2.55 * percent), R = (num >> 16) + amt, B = ((num >> 8) & 0x00ff) + amt, G = (num & 0x0000ff) + amt;
|
|
85
|
-
return ("#" +
|
|
86
|
-
(0x1000000 +
|
|
87
|
-
(R < 255 ? (R < 1 ? 0 : R) : 255) * 0x10000 +
|
|
88
|
-
(B < 255 ? (B < 1 ? 0 : B) : 255) * 0x100 +
|
|
89
|
-
(G < 255 ? (G < 1 ? 0 : G) : 255))
|
|
90
|
-
.toString(16)
|
|
91
|
-
.slice(1));
|
|
92
|
-
}
|
|
93
|
-
// get de computed value of --sc-base and darken it
|
|
94
|
-
contrastBg() {
|
|
95
|
-
if (this.theme === "dark" && this.contrastDarkMode && this.background) {
|
|
96
|
-
let baseColor = window.getComputedStyle(this).getPropertyValue("--sc-base");
|
|
97
|
-
this.style.setProperty("--sc-body-bg", this.contrast(baseColor, -2.5));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
77
|
render() {
|
|
101
78
|
return html `<slot></slot>`;
|
|
102
79
|
}
|
|
@@ -111,9 +88,6 @@ Theme.styles = [
|
|
|
111
88
|
background: var(--sc-body-bg) !important;
|
|
112
89
|
min-height: 100vh;
|
|
113
90
|
}
|
|
114
|
-
:host([contrastDarkMode]) {
|
|
115
|
-
transition: background-color 2.5s ease;
|
|
116
|
-
}
|
|
117
91
|
|
|
118
92
|
:host([color]) {
|
|
119
93
|
color: var(--sc-base-content);
|
|
@@ -138,9 +112,6 @@ __decorate([
|
|
|
138
112
|
__decorate([
|
|
139
113
|
property({ type: Boolean, reflect: true })
|
|
140
114
|
], Theme.prototype, "font", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
property({ type: Boolean, reflect: true })
|
|
143
|
-
], Theme.prototype, "contrastDarkMode", void 0);
|
|
144
115
|
Theme = Theme_1 = __decorate([
|
|
145
116
|
customElement(tagName)
|
|
146
117
|
], Theme);
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
|
|
2
|
+
import { ToastStatus } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
3
|
+
declare type Message = {
|
|
4
|
+
type: string;
|
|
5
|
+
content: string;
|
|
6
|
+
status: ToastStatus;
|
|
7
|
+
};
|
|
8
|
+
declare const MessageSubscriber_base: (new (...args: any[]) => import("@supersoniks/concorde/core/mixins/Subscriber").SubscriberInterface<any>) & typeof LitElement;
|
|
3
9
|
export declare class MessageSubscriber extends MessageSubscriber_base {
|
|
4
|
-
_messages: Array<
|
|
10
|
+
_messages: Array<Message>;
|
|
5
11
|
success: boolean | null;
|
|
6
12
|
status: boolean | null;
|
|
7
|
-
get messages():
|
|
8
|
-
set messages(value:
|
|
13
|
+
get messages(): Message[];
|
|
14
|
+
set messages(value: Message[]);
|
|
9
15
|
_message: string;
|
|
10
16
|
get message(): string;
|
|
11
17
|
set message(value: string);
|
|
12
|
-
_data:
|
|
13
|
-
get data(): string |
|
|
14
|
-
set data(value: string |
|
|
18
|
+
_data: Object | string;
|
|
19
|
+
get data(): string | Object;
|
|
20
|
+
set data(value: string | Object);
|
|
15
21
|
render(): symbol;
|
|
16
22
|
}
|
|
17
23
|
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -16,5 +16,6 @@ export declare class SonicToast extends LitElement {
|
|
|
16
16
|
ghost: boolean | undefined;
|
|
17
17
|
dismissForever: boolean | undefined;
|
|
18
18
|
} | null;
|
|
19
|
-
removeItem(
|
|
19
|
+
static removeItem(toastToRemove?: Toast): void;
|
|
20
|
+
removeItem(toastToRemove?: Toast): void;
|
|
20
21
|
}
|