wcs-core 2.6.0 → 2.10.0
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/CHANGELOG.md +115 -7
- package/README.md +18 -0
- package/dist/cjs/{helpers-d9aaa8c4.js → helpers-6abce594.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/popper-5777994b.js +1732 -0
- package/dist/cjs/wcs-button.cjs.entry.js +1 -1
- package/dist/cjs/wcs-checkbox.cjs.entry.js +6 -2
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js +19 -0
- package/dist/cjs/wcs-dropdown.cjs.entry.js +43 -10
- package/dist/cjs/wcs-error_2.cjs.entry.js +7 -10
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +3 -1730
- package/dist/cjs/wcs-grid-column.cjs.entry.js +6 -2
- package/dist/cjs/wcs-grid.cjs.entry.js +28 -5
- package/dist/cjs/wcs-input.cjs.entry.js +3 -3
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +8 -3
- package/dist/cjs/wcs-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/wcs-radio.cjs.entry.js +2 -2
- package/dist/cjs/wcs-select_2.cjs.entry.js +1 -1
- package/dist/cjs/wcs-switch.cjs.entry.js +10 -2
- package/dist/cjs/wcs-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1605 -99
- package/dist/cjs/wcs.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/badge/badge-interface.js +1 -0
- package/dist/collection/components/badge/badge.js +14 -4
- package/dist/collection/components/card/card-interface.js +1 -0
- package/dist/collection/components/card/card.js +7 -2
- package/dist/collection/components/checkbox/checkbox.css +18 -7
- package/dist/collection/components/checkbox/checkbox.js +24 -2
- package/dist/collection/components/dropdown/dropdown-interface.js +1 -0
- package/dist/collection/components/dropdown/dropdown.css +46 -38
- package/dist/collection/components/dropdown/dropdown.js +90 -29
- package/dist/collection/components/dropdown-divider/dropdown-divider.css +7 -0
- package/dist/collection/components/dropdown-divider/dropdown-divider.js +14 -0
- package/dist/collection/components/dropdown-header/dropdown-header.css +8 -0
- package/dist/collection/components/dropdown-header/dropdown-header.js +15 -0
- package/dist/collection/components/editable-field/editable-field.js +7 -2
- package/dist/collection/components/form-field/form-field.css +1 -2
- package/dist/collection/components/form-field/form-field.js +6 -26
- package/dist/collection/components/grid/grid.js +28 -5
- package/dist/collection/components/grid-column/grid-column.js +9 -3
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +7 -2
- package/dist/collection/components/input/input.css +48 -0
- package/dist/collection/components/input/input.js +38 -2
- package/dist/collection/components/mat-icon/mat-icon.css +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js +7 -2
- package/dist/collection/components/modal/modal-interface.js +1 -0
- package/dist/collection/components/modal/modal.css +26 -7
- package/dist/collection/components/modal/modal.js +35 -7
- package/dist/collection/components/nav-item/nav-item.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +4 -4
- package/dist/collection/components/radio/radio.component.js +9 -4
- package/dist/collection/components/radio/radio.css +44 -19
- package/dist/collection/components/radio-group/radio-group.css +5 -1
- package/dist/collection/components/radio-group/radio-group.js +10 -5
- package/dist/collection/components/spinner/spinner-interface.js +1 -0
- package/dist/collection/components/spinner/spinner.js +8 -3
- package/dist/collection/components/switch/switch.css +53 -16
- package/dist/collection/components/switch/switch.js +55 -6
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/textarea/textarea.css +4 -0
- package/dist/collection/components/tooltip/tooltip.css +3 -0
- package/dist/collection/components/tooltip/tooltip.js +308 -90
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/esm/{helpers-50436c51.js → helpers-e2993152.js} +5 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/popper-5f42e560.js +1729 -0
- package/dist/esm/wcs-button.entry.js +1 -1
- package/dist/esm/wcs-checkbox.entry.js +6 -2
- package/dist/esm/wcs-dropdown-divider.entry.js +15 -0
- package/dist/esm/wcs-dropdown-header.entry.js +15 -0
- package/dist/esm/wcs-dropdown.entry.js +43 -10
- package/dist/esm/wcs-error_2.entry.js +7 -10
- package/dist/esm/wcs-galactic-menu.entry.js +2 -1729
- package/dist/esm/wcs-grid-column.entry.js +6 -2
- package/dist/esm/wcs-grid.entry.js +28 -5
- package/dist/esm/wcs-input.entry.js +3 -3
- package/dist/esm/wcs-mat-icon.entry.js +1 -1
- package/dist/esm/wcs-modal.entry.js +8 -3
- package/dist/esm/wcs-radio-group.entry.js +3 -3
- package/dist/esm/wcs-radio.entry.js +2 -2
- package/dist/esm/wcs-select_2.entry.js +1 -1
- package/dist/esm/wcs-switch.entry.js +10 -2
- package/dist/esm/wcs-textarea.entry.js +2 -2
- package/dist/esm/wcs-tooltip.entry.js +1605 -99
- package/dist/esm/wcs.js +2 -2
- package/dist/types/components/badge/badge-interface.d.ts +2 -0
- package/dist/types/components/badge/badge.d.ts +3 -2
- package/dist/types/components/card/card-interface.d.ts +1 -0
- package/dist/types/components/card/card.d.ts +2 -1
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/dropdown/dropdown-interface.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +13 -16
- package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
- package/dist/types/components/dropdown-header/dropdown-header.d.ts +3 -0
- package/dist/types/components/editable-field/editable-field-interface.d.ts +1 -0
- package/dist/types/components/editable-field/editable-field.d.ts +2 -2
- package/dist/types/components/form-field/form-field.d.ts +0 -4
- package/dist/types/components/grid/grid.d.ts +11 -0
- package/dist/types/components/grid-column/grid-column.d.ts +2 -1
- package/dist/types/components/horizontal-stepper/horizontal-stepper-interface.d.ts +1 -0
- package/dist/types/components/horizontal-stepper/horizontal-stepper.d.ts +2 -2
- package/dist/types/components/input/input.d.ts +8 -0
- package/dist/types/components/mat-icon/mat-icon-interface.d.ts +1 -0
- package/dist/types/components/mat-icon/mat-icon.d.ts +2 -2
- package/dist/types/components/modal/modal-interface.d.ts +1 -0
- package/dist/types/components/modal/modal.d.ts +7 -1
- package/dist/types/components/radio/radio.component.d.ts +2 -1
- package/dist/types/components/radio-group/radio-group-interface.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.d.ts +2 -2
- package/dist/types/components/spinner/spinner-interface.d.ts +1 -0
- package/dist/types/components/spinner/spinner.d.ts +2 -1
- package/dist/types/components/switch/switch-interface.d.ts +1 -0
- package/dist/types/components/switch/switch.d.ts +10 -2
- package/dist/types/components/tooltip/tooltip.d.ts +70 -6
- package/dist/types/components.d.ts +210 -41
- package/dist/types/interfaces.d.ts +22 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/wcs/{p-64523291.entry.js → p-22813c8e.entry.js} +1 -1
- package/dist/wcs/{p-356a8e3b.entry.js → p-384068f7.entry.js} +1 -1
- package/dist/wcs/p-41037455.entry.js +1 -0
- package/dist/wcs/p-4e9e226d.entry.js +1 -0
- package/dist/wcs/p-7206e492.entry.js +1 -0
- package/dist/wcs/p-7c26f650.entry.js +1 -0
- package/dist/wcs/p-8c8740e3.entry.js +1 -0
- package/dist/wcs/p-9619f77a.entry.js +1 -0
- package/dist/wcs/p-a92d369e.entry.js +1 -0
- package/dist/wcs/p-a978c1e3.entry.js +1 -0
- package/dist/wcs/p-b5ffbea8.entry.js +1 -0
- package/dist/wcs/p-bbf1ef42.entry.js +1 -0
- package/dist/wcs/p-bcf381a2.entry.js +1 -0
- package/dist/wcs/{p-3d10b02a.entry.js → p-c7d6d3e1.entry.js} +1 -1
- package/dist/wcs/p-cf4d7a83.js +1 -0
- package/dist/wcs/p-d3c9a644.js +1 -0
- package/dist/wcs/p-ecbe5165.entry.js +6 -0
- package/dist/wcs/p-f430a227.entry.js +1 -0
- package/dist/wcs/p-f96bb0bf.entry.js +1 -0
- package/dist/wcs/{p-4338f140.entry.js → p-ff6d0dfd.entry.js} +1 -1
- package/dist/wcs/wcs.css +1 -1
- package/dist/wcs/wcs.esm.js +1 -1
- package/package.json +5 -4
- package/dist/types/interface.d.ts +0 -3
- package/dist/wcs/p-0fbe574e.entry.js +0 -1
- package/dist/wcs/p-15008e35.entry.js +0 -1
- package/dist/wcs/p-17c6db7f.entry.js +0 -1
- package/dist/wcs/p-62f7ab6d.entry.js +0 -1
- package/dist/wcs/p-83f1ad32.js +0 -1
- package/dist/wcs/p-8f0f9868.entry.js +0 -1
- package/dist/wcs/p-a5a1b27c.entry.js +0 -1
- package/dist/wcs/p-af1a5e52.entry.js +0 -1
- package/dist/wcs/p-bef44630.entry.js +0 -1
- package/dist/wcs/p-d59b4495.entry.js +0 -1
- package/dist/wcs/p-dd300dea.entry.js +0 -1
- package/dist/wcs/p-e486647c.entry.js +0 -1
- package/dist/wcs/p-ed6e8541.entry.js +0 -1
|
@@ -10,9 +10,9 @@ export class RadioGroup {
|
|
|
10
10
|
if (this.value) {
|
|
11
11
|
this.updateOptionsState(this.value, true);
|
|
12
12
|
}
|
|
13
|
-
if (this.mode === 'option') {
|
|
13
|
+
if (this.mode === 'option' || this.mode === 'horizontal') {
|
|
14
14
|
for (const option of this.options) {
|
|
15
|
-
option.mode =
|
|
15
|
+
option.mode = this.mode;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -94,9 +94,14 @@ export class RadioGroup {
|
|
|
94
94
|
"type": "string",
|
|
95
95
|
"mutable": false,
|
|
96
96
|
"complexType": {
|
|
97
|
-
"original": "
|
|
98
|
-
"resolved": "\"option\" | \"radio\"",
|
|
99
|
-
"references": {
|
|
97
|
+
"original": "RadioGroupMode",
|
|
98
|
+
"resolved": "\"horizontal\" | \"option\" | \"radio\"",
|
|
99
|
+
"references": {
|
|
100
|
+
"RadioGroupMode": {
|
|
101
|
+
"location": "import",
|
|
102
|
+
"path": "./radio-group-interface"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
100
105
|
},
|
|
101
106
|
"required": false,
|
|
102
107
|
"optional": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,11 +18,16 @@ export class Spinner {
|
|
|
18
18
|
static get properties() { return {
|
|
19
19
|
"mode": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"mutable":
|
|
21
|
+
"mutable": false,
|
|
22
22
|
"complexType": {
|
|
23
|
-
"original": "
|
|
23
|
+
"original": "WcsSpinnerMode",
|
|
24
24
|
"resolved": "\"border\" | \"growing\"",
|
|
25
|
-
"references": {
|
|
25
|
+
"references": {
|
|
26
|
+
"WcsSpinnerMode": {
|
|
27
|
+
"location": "import",
|
|
28
|
+
"path": "./spinner-interface"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
26
31
|
},
|
|
27
32
|
"required": false,
|
|
28
33
|
"optional": false,
|
|
@@ -3,40 +3,54 @@
|
|
|
3
3
|
--wcs-switch-background-color-final: var(--wcs-primary);
|
|
4
4
|
--wcs-switch-bullet-color-initial: var(--wcs-switch-background-color-final);
|
|
5
5
|
--wcs-switch-bullet-color-final: var(--wcs-switch-background-color-initial);
|
|
6
|
+
--wcs-switch-text-color: var(--wcs-text-medium);
|
|
6
7
|
display: flex;
|
|
7
8
|
}
|
|
8
9
|
|
|
10
|
+
:host([disabled]) {
|
|
11
|
+
--wcs-switch-text-color: var(--wcs-text-disabled);
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
/* Customize the label (the wcs-container) */
|
|
10
15
|
.wcs-container {
|
|
11
16
|
position: relative;
|
|
12
|
-
display:
|
|
13
|
-
width: 3rem;
|
|
14
|
-
height: 1.5rem;
|
|
17
|
+
display: flex;
|
|
15
18
|
margin-bottom: 0;
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
/* Let the user choose the alignment of the checkbox with the label text */
|
|
22
|
+
:host([label-alignment=top]) .wcs-container {
|
|
23
|
+
align-items: start;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([label-alignment=center]) .wcs-container {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([label-alignment=bottom]) .wcs-container {
|
|
31
|
+
align-items: flex-end;
|
|
32
|
+
}
|
|
33
|
+
|
|
18
34
|
/* Hide the browser's default switch */
|
|
19
35
|
.wcs-container input {
|
|
20
36
|
position: absolute;
|
|
21
37
|
opacity: 0;
|
|
22
|
-
cursor: pointer;
|
|
23
38
|
height: 0;
|
|
24
39
|
width: 0;
|
|
25
40
|
}
|
|
26
41
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
height:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border: 0;
|
|
42
|
+
.text {
|
|
43
|
+
color: var(--wcs-switch-text-color);
|
|
44
|
+
margin-left: 6px;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
line-height: 1.375;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.wcs-container:not([aria-disabled]) input:checked ~ .text {
|
|
50
|
+
--wcs-switch-text-color: var(--wcs-primary);
|
|
37
51
|
}
|
|
38
52
|
|
|
39
|
-
.wcs-checkmark::before
|
|
53
|
+
.wcs-checkmark::before {
|
|
40
54
|
position: absolute;
|
|
41
55
|
transition: all 0.15s ease-out;
|
|
42
56
|
}
|
|
@@ -51,16 +65,39 @@
|
|
|
51
65
|
background-color: var(--wcs-switch-bullet-color-initial);
|
|
52
66
|
}
|
|
53
67
|
|
|
68
|
+
:host([disabled]:not([checked])) .wcs-checkmark::before {
|
|
69
|
+
background-color: var(--wcs-text-disabled);
|
|
70
|
+
}
|
|
71
|
+
:host([disabled]:not([checked])) .wcs-checkmark {
|
|
72
|
+
background-color: var(--wcs-light);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([disabled][checked]) .wcs-checkmark::before {
|
|
76
|
+
background-color: var(--wcs-white);
|
|
77
|
+
}
|
|
78
|
+
:host([disabled][checked]) .wcs-checkmark {
|
|
79
|
+
background-color: var(--wcs-text-disabled);
|
|
80
|
+
}
|
|
81
|
+
|
|
54
82
|
.wcs-checkmark {
|
|
55
83
|
top: 0;
|
|
56
84
|
right: 0;
|
|
57
85
|
bottom: 0;
|
|
58
86
|
left: 0;
|
|
59
|
-
|
|
87
|
+
width: 3rem;
|
|
88
|
+
height: 1.5rem;
|
|
60
89
|
border-radius: 0.75rem;
|
|
61
90
|
background-color: var(--wcs-switch-background-color-initial);
|
|
62
91
|
}
|
|
63
92
|
|
|
93
|
+
.wcs-container:not([aria-disabled]) {
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.wcs-container:hover:not([aria-disabled]) {
|
|
98
|
+
--wcs-switch-text-color: var(--wcs-primary);
|
|
99
|
+
}
|
|
100
|
+
|
|
64
101
|
/* When the switch is checked, change the bullet to grey */
|
|
65
102
|
input:not([disabled]):checked + .wcs-checkmark::before,
|
|
66
103
|
.wcs-container:hover input:not([disabled]) + .wcs-checkmark::before,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, Element, Event, h, Host, Prop } from '@stencil/core';
|
|
2
2
|
export class Switch {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.switchId = `wcs-switch-${switchIds++}`;
|
|
@@ -7,6 +7,14 @@ export class Switch {
|
|
|
7
7
|
* If `true`, the switch is selected.
|
|
8
8
|
*/
|
|
9
9
|
this.checked = false;
|
|
10
|
+
/**
|
|
11
|
+
* Specifie the alignment of the switch with the label content
|
|
12
|
+
*/
|
|
13
|
+
this.labelAlignment = 'center';
|
|
14
|
+
/**
|
|
15
|
+
* Specify wether the switch is disabled or not.
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
10
18
|
}
|
|
11
19
|
toggleChange(_event) {
|
|
12
20
|
this.checked = !this.checked;
|
|
@@ -16,11 +24,11 @@ export class Switch {
|
|
|
16
24
|
}
|
|
17
25
|
render() {
|
|
18
26
|
return (h(Host, null,
|
|
19
|
-
h("label", { htmlFor: this.name, class: "wcs-container" },
|
|
27
|
+
h("label", { htmlFor: this.name, class: "wcs-container", "aria-disabled": this.disabled },
|
|
28
|
+
h("input", { onChange: (evt) => this.toggleChange(evt), checked: this.checked, class: "wcs-switch", type: "checkbox", name: this.name, disabled: this.disabled, id: this.name }),
|
|
29
|
+
h("span", { class: "wcs-checkmark" }),
|
|
20
30
|
h("span", { class: "text" },
|
|
21
|
-
h("slot", null))
|
|
22
|
-
h("input", { onChange: (evt) => this.toggleChange(evt), checked: this.checked, class: "wcs-switch", type: "checkbox", name: this.name, id: this.name }),
|
|
23
|
-
h("span", { class: "wcs-checkmark" }))));
|
|
31
|
+
h("slot", null)))));
|
|
24
32
|
}
|
|
25
33
|
static get is() { return "wcs-switch"; }
|
|
26
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +59,7 @@ export class Switch {
|
|
|
51
59
|
},
|
|
52
60
|
"checked": {
|
|
53
61
|
"type": "boolean",
|
|
54
|
-
"mutable":
|
|
62
|
+
"mutable": false,
|
|
55
63
|
"complexType": {
|
|
56
64
|
"original": "boolean",
|
|
57
65
|
"resolved": "boolean",
|
|
@@ -64,6 +72,47 @@ export class Switch {
|
|
|
64
72
|
"text": "If `true`, the switch is selected."
|
|
65
73
|
},
|
|
66
74
|
"attribute": "checked",
|
|
75
|
+
"reflect": true,
|
|
76
|
+
"defaultValue": "false"
|
|
77
|
+
},
|
|
78
|
+
"labelAlignment": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "SwitchLabelAlignment",
|
|
83
|
+
"resolved": "\"bottom\" | \"center\" | \"top\"",
|
|
84
|
+
"references": {
|
|
85
|
+
"SwitchLabelAlignment": {
|
|
86
|
+
"location": "import",
|
|
87
|
+
"path": "./switch-interface"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Specifie the alignment of the switch with the label content"
|
|
96
|
+
},
|
|
97
|
+
"attribute": "label-alignment",
|
|
98
|
+
"reflect": true,
|
|
99
|
+
"defaultValue": "'center'"
|
|
100
|
+
},
|
|
101
|
+
"disabled": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "boolean",
|
|
106
|
+
"resolved": "boolean",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": "Specify wether the switch is disabled or not."
|
|
114
|
+
},
|
|
115
|
+
"attribute": "disabled",
|
|
67
116
|
"reflect": false,
|
|
68
117
|
"defaultValue": "false"
|
|
69
118
|
}
|