wcs-core 2.9.0 → 2.12.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popper-5777994b.js → popper-8cf375ec.js} +130 -71
- package/dist/cjs/wcs-accordion-content.cjs.entry.js +19 -0
- package/dist/cjs/wcs-accordion-header.cjs.entry.js +16 -0
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js +31 -0
- package/dist/cjs/wcs-accordion.cjs.entry.js +36 -0
- package/dist/cjs/wcs-button.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +1 -1
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav.cjs.entry.js +24 -2
- package/dist/cjs/wcs-dropdown.cjs.entry.js +4 -2
- package/dist/cjs/wcs-error_2.cjs.entry.js +6 -9
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +13 -10
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +6 -2
- package/dist/cjs/wcs-select_2.cjs.entry.js +2790 -2577
- package/dist/cjs/wcs-tooltip.cjs.entry.js +11 -4
- package/dist/cjs/wcs.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/accordion/accordion.js +38 -0
- package/dist/collection/components/accordion-content/accordion-content.css +4 -0
- package/dist/collection/components/accordion-content/accordion-content.js +15 -0
- package/dist/collection/components/accordion-header/accordion-header.js +9 -0
- package/dist/collection/components/accordion-panel/accordion-panel.css +35 -0
- package/dist/collection/components/accordion-panel/accordion-panel.js +89 -0
- package/dist/collection/components/button/button.css +12 -4
- package/dist/collection/components/com-nav/com-nav.css +68 -10
- package/dist/collection/components/com-nav/com-nav.js +34 -5
- package/dist/collection/components/com-nav-category/com-nav-category.css +70 -45
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +123 -72
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +3 -1
- package/dist/collection/components/form-field/form-field.js +6 -9
- package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +14 -11
- package/dist/collection/components/input/input.js +1 -1
- package/dist/collection/components/mat-icon/mat-icon.css +3 -1
- package/dist/collection/components/modal/modal.css +16 -29
- package/dist/collection/components/modal/modal.js +25 -4
- package/dist/collection/components/select/select.js +2 -0
- package/dist/collection/components/tooltip/tooltip.js +28 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popper-5f42e560.js → popper-548df79b.js} +130 -71
- package/dist/esm/wcs-accordion-content.entry.js +15 -0
- package/dist/esm/wcs-accordion-header.entry.js +12 -0
- package/dist/esm/wcs-accordion-panel.entry.js +27 -0
- package/dist/esm/wcs-accordion.entry.js +32 -0
- package/dist/esm/wcs-button.entry.js +1 -1
- package/dist/esm/wcs-com-nav-category.entry.js +1 -1
- package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
- package/dist/esm/wcs-com-nav.entry.js +25 -3
- package/dist/esm/wcs-dropdown.entry.js +4 -2
- package/dist/esm/wcs-error_2.entry.js +6 -9
- package/dist/esm/wcs-galactic-menu.entry.js +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +13 -10
- package/dist/esm/wcs-mat-icon.entry.js +1 -1
- package/dist/esm/wcs-modal.entry.js +6 -2
- package/dist/esm/wcs-select_2.entry.js +2790 -2577
- package/dist/esm/wcs-tooltip.entry.js +11 -4
- package/dist/esm/wcs.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +12 -0
- package/dist/types/components/accordion-content/accordion-content.d.ts +3 -0
- package/dist/types/components/accordion-header/accordion-header.d.ts +3 -0
- package/dist/types/components/accordion-panel/accordion-panel.d.ts +8 -0
- package/dist/types/components/com-nav/com-nav.d.ts +7 -0
- package/dist/types/components/input/input-interface.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +4 -0
- package/dist/types/components/tooltip/tooltip.d.ts +12 -0
- package/dist/types/components.d.ts +72 -0
- package/dist/wcs/p-055c20de.entry.js +1 -0
- package/dist/wcs/p-0bb5f03a.entry.js +1 -0
- package/dist/wcs/p-19e6600c.entry.js +15 -0
- package/dist/wcs/p-2507b398.entry.js +1 -0
- package/dist/wcs/p-4f15e5f6.entry.js +1 -0
- package/dist/wcs/{p-ecbe5165.entry.js → p-600d4d99.entry.js} +2 -2
- package/dist/wcs/{p-22813c8e.entry.js → p-66e74651.entry.js} +1 -1
- package/dist/wcs/p-706d195a.entry.js +1 -0
- package/dist/wcs/{p-4e9e226d.entry.js → p-b69840d6.entry.js} +1 -1
- package/dist/wcs/p-bcf381a2.entry.js +1 -0
- package/dist/wcs/p-c295cfca.entry.js +1 -0
- package/dist/wcs/p-cf77e1d9.entry.js +1 -0
- package/dist/wcs/p-d45c7c63.entry.js +1 -0
- package/dist/wcs/p-df5baf36.entry.js +1 -0
- package/dist/wcs/p-e4fdcd1f.js +1 -0
- package/dist/wcs/{p-ff6d0dfd.entry.js → p-f00ef24c.entry.js} +1 -1
- package/dist/wcs/p-f43213f5.entry.js +1 -0
- package/dist/wcs/wcs.esm.js +1 -1
- package/package.json +9 -5
- package/CHANGELOG.md +0 -269
- package/dist/wcs/p-08a7e84d.entry.js +0 -1
- package/dist/wcs/p-1f5aed36.entry.js +0 -1
- package/dist/wcs/p-7c26f650.entry.js +0 -1
- package/dist/wcs/p-8864a491.entry.js +0 -1
- package/dist/wcs/p-94a31f64.entry.js +0 -1
- package/dist/wcs/p-b5ffbea8.entry.js +0 -1
- package/dist/wcs/p-c7d6d3e1.entry.js +0 -15
- package/dist/wcs/p-d3c9a644.js +0 -1
- package/dist/wcs/p-db68379f.entry.js +0 -1
|
@@ -1,69 +1,34 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
-
|
|
3
|
+
padding-bottom: var(--wcs-padding);
|
|
4
4
|
}
|
|
5
5
|
:host .menu-button {
|
|
6
|
-
display:
|
|
7
|
-
align-items: center;
|
|
8
|
-
height: 100%;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
user-select: none;
|
|
11
|
-
}
|
|
12
|
-
:host .label {
|
|
13
|
-
font-size: 16px;
|
|
14
|
-
cursor: pointer;
|
|
6
|
+
display: block;
|
|
15
7
|
font-weight: 500;
|
|
16
|
-
|
|
17
|
-
text-decoration: none;
|
|
8
|
+
padding-left: calc(3 * var(--wcs-base-margin));
|
|
18
9
|
}
|
|
19
10
|
:host .arrow-icon {
|
|
20
|
-
display:
|
|
21
|
-
font-family: icons;
|
|
22
|
-
font-size: 0.6rem;
|
|
23
|
-
line-height: 1;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
}
|
|
26
|
-
:host .arrow-icon:not([data-open]) {
|
|
27
|
-
transform: rotate(90deg);
|
|
28
|
-
}
|
|
29
|
-
:host .arrow-icon[data-open] {
|
|
30
|
-
transform: rotate(-90deg);
|
|
11
|
+
display: none;
|
|
31
12
|
}
|
|
32
13
|
:host .arrow-container {
|
|
33
|
-
margin-left: var(--wcs-base-margin);
|
|
34
|
-
}
|
|
35
|
-
:host .drawer {
|
|
36
14
|
display: none;
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 75px;
|
|
39
|
-
z-index: 8888;
|
|
40
|
-
left: 0;
|
|
41
|
-
width: 100%;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
padding: 50px;
|
|
44
|
-
background-color: var(--wcs-primary);
|
|
45
|
-
color: var(--wcs-white);
|
|
46
|
-
}
|
|
47
|
-
:host .drawer-content {
|
|
48
|
-
display: flex;
|
|
49
|
-
justify-content: space-between;
|
|
50
|
-
max-width: 62.5%;
|
|
51
|
-
flex: 1;
|
|
52
15
|
}
|
|
53
|
-
:host .
|
|
54
|
-
|
|
16
|
+
:host .label {
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
cursor: unset;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
color: var(--wcs-gray);
|
|
22
|
+
text-decoration: none;
|
|
55
23
|
}
|
|
56
|
-
:host .drawer
|
|
57
|
-
|
|
24
|
+
:host .drawer {
|
|
25
|
+
display: contents;
|
|
58
26
|
}
|
|
59
|
-
:host .
|
|
60
|
-
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
align-items: flex-end;
|
|
27
|
+
:host .drawer-container {
|
|
28
|
+
display: contents;
|
|
64
29
|
}
|
|
65
|
-
:host .
|
|
66
|
-
|
|
30
|
+
:host .drawer-description {
|
|
31
|
+
display: none;
|
|
67
32
|
}
|
|
68
33
|
:host .menu-items ::slotted(a):after {
|
|
69
34
|
font-family: icons;
|
|
@@ -78,26 +43,112 @@
|
|
|
78
43
|
cursor: pointer;
|
|
79
44
|
text-decoration: none;
|
|
80
45
|
font-size: 16px;
|
|
81
|
-
color: var(--wcs-
|
|
82
|
-
}
|
|
83
|
-
:host .drawer-container {
|
|
84
|
-
display: flex;
|
|
85
|
-
max-width: var(--wcs-com-content-max-width);
|
|
86
|
-
margin: 0 auto;
|
|
87
|
-
}
|
|
88
|
-
:host .drawer-container h3 {
|
|
89
|
-
margin: 0 0 24px 0;
|
|
90
|
-
font-size: 1.5rem;
|
|
91
|
-
line-height: 1.25;
|
|
92
|
-
font-weight: 400;
|
|
93
|
-
}
|
|
94
|
-
:host .drawer-container p {
|
|
95
|
-
margin-top: 0;
|
|
96
|
-
margin-bottom: 1rem;
|
|
46
|
+
color: var(--wcs-gray);
|
|
97
47
|
font-weight: 500;
|
|
98
|
-
font-size: 1rem;
|
|
99
|
-
line-height: 1.375;
|
|
100
|
-
}
|
|
101
|
-
:host .drawer[data-open] {
|
|
102
48
|
display: block;
|
|
49
|
+
padding-top: calc(1.5 * var(--wcs-base-margin));
|
|
50
|
+
padding-bottom: calc(1.5 * var(--wcs-base-margin));
|
|
51
|
+
padding-left: calc(6 * var(--wcs-base-margin));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media screen and (min-width: 576px) {
|
|
55
|
+
:host {
|
|
56
|
+
height: 100%;
|
|
57
|
+
padding-bottom: unset;
|
|
58
|
+
}
|
|
59
|
+
:host .menu-button {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
height: 100%;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
user-select: none;
|
|
65
|
+
font-weight: unset;
|
|
66
|
+
padding-left: unset;
|
|
67
|
+
}
|
|
68
|
+
:host .label {
|
|
69
|
+
text-transform: unset;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
:host .arrow-icon {
|
|
73
|
+
display: inline-block;
|
|
74
|
+
font-family: icons;
|
|
75
|
+
font-size: 0.6rem;
|
|
76
|
+
line-height: 1;
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
}
|
|
79
|
+
:host .arrow-container {
|
|
80
|
+
display: unset;
|
|
81
|
+
margin-left: var(--wcs-base-margin);
|
|
82
|
+
}
|
|
83
|
+
:host .arrow-icon:not([data-open]) {
|
|
84
|
+
transform: rotate(90deg);
|
|
85
|
+
}
|
|
86
|
+
:host .arrow-icon[data-open] {
|
|
87
|
+
transform: rotate(-90deg);
|
|
88
|
+
}
|
|
89
|
+
:host .drawer {
|
|
90
|
+
display: none;
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 75px;
|
|
93
|
+
z-index: 8888;
|
|
94
|
+
left: 0;
|
|
95
|
+
width: 100%;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
padding: 50px;
|
|
98
|
+
background-color: var(--wcs-primary);
|
|
99
|
+
color: var(--wcs-white);
|
|
100
|
+
}
|
|
101
|
+
:host .drawer-content {
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: space-between;
|
|
104
|
+
max-width: 62.5%;
|
|
105
|
+
flex: 1;
|
|
106
|
+
}
|
|
107
|
+
:host .drawer-content div:first-child {
|
|
108
|
+
flex: 0.8;
|
|
109
|
+
}
|
|
110
|
+
:host .drawer-content div {
|
|
111
|
+
max-width: 260px;
|
|
112
|
+
}
|
|
113
|
+
:host .menu-items {
|
|
114
|
+
padding: 0 80px 0 50px;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
align-items: flex-end;
|
|
118
|
+
}
|
|
119
|
+
:host .menu-items ::slotted(*:not(:first-child)) {
|
|
120
|
+
margin-top: 24px;
|
|
121
|
+
}
|
|
122
|
+
:host .menu-items ::slotted(a) {
|
|
123
|
+
color: var(--wcs-white);
|
|
124
|
+
font-weight: 400;
|
|
125
|
+
display: unset;
|
|
126
|
+
padding-top: unset;
|
|
127
|
+
padding-bottom: unset;
|
|
128
|
+
padding-left: unset;
|
|
129
|
+
}
|
|
130
|
+
:host .drawer-container {
|
|
131
|
+
display: flex;
|
|
132
|
+
max-width: var(--wcs-com-content-max-width);
|
|
133
|
+
margin: 0 auto;
|
|
134
|
+
}
|
|
135
|
+
:host .drawer-container h3 {
|
|
136
|
+
margin: 0 0 24px 0;
|
|
137
|
+
font-size: 1.5rem;
|
|
138
|
+
line-height: 1.25;
|
|
139
|
+
font-weight: 400;
|
|
140
|
+
}
|
|
141
|
+
:host .drawer-container p {
|
|
142
|
+
margin-top: 0;
|
|
143
|
+
margin-bottom: 1rem;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
font-size: 1rem;
|
|
146
|
+
line-height: 1.375;
|
|
147
|
+
}
|
|
148
|
+
:host .drawer[data-open] {
|
|
149
|
+
display: block;
|
|
150
|
+
}
|
|
151
|
+
:host .drawer-description {
|
|
152
|
+
display: block;
|
|
153
|
+
}
|
|
103
154
|
}
|
|
@@ -59,7 +59,7 @@ export class ComNavSubmenu {
|
|
|
59
59
|
h("div", { class: "drawer", "data-open": this.menuOpen },
|
|
60
60
|
h("div", { class: "drawer-container" },
|
|
61
61
|
h("div", { class: "drawer-content" },
|
|
62
|
-
h("div",
|
|
62
|
+
h("div", { class: "drawer-description" },
|
|
63
63
|
h("h3", null, this.panelTitle),
|
|
64
64
|
h("p", null, this.panelDescription)),
|
|
65
65
|
h("div", { class: "menu-items", onClick: (evt) => this.handleMenuItemsClick(evt) },
|
|
@@ -35,7 +35,9 @@ export class Dropdown {
|
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
|
-
this.
|
|
38
|
+
if (!this.noArrow) {
|
|
39
|
+
this.el.shadowRoot.querySelector('.arrow').style.fill = this.buttonTextColor;
|
|
40
|
+
}
|
|
39
41
|
this.fixForFirefoxBelow63();
|
|
40
42
|
}
|
|
41
43
|
fixForFirefoxBelow63() {
|
|
@@ -65,22 +65,19 @@ export class FormField {
|
|
|
65
65
|
this.updateLabelRequiredFlag(isRequired, label);
|
|
66
66
|
}
|
|
67
67
|
initSpiedElement() {
|
|
68
|
-
var _a;
|
|
68
|
+
var _a, _b;
|
|
69
69
|
const SUPPORTED_COMPONENTS = ['wcs-input', 'wcs-select', 'wcs-textarea', 'wcs-radio-group', 'wcs-switch', 'wcs-checkbox'];
|
|
70
|
-
this.spiedElement = (_a = this.el.shadowRoot.querySelector('slot:not([name])')) === null || _a === void 0 ? void 0 : _a.assignedElements()[0];
|
|
70
|
+
this.spiedElement = (_a = this.el.shadowRoot.querySelector('slot:not([name])')) === null || _a === void 0 ? void 0 : _a.assignedElements().filter(n => [...SUPPORTED_COMPONENTS, 'SLOT'].map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0];
|
|
71
71
|
// If the component is used in another web component
|
|
72
|
-
if (this.spiedElement.tagName === 'SLOT') {
|
|
72
|
+
if (((_b = this.spiedElement) === null || _b === void 0 ? void 0 : _b.tagName) === 'SLOT') {
|
|
73
73
|
this.spiedElement = (this.spiedElement
|
|
74
74
|
.assignedElements()
|
|
75
75
|
.filter(n => SUPPORTED_COMPONENTS.map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0]);
|
|
76
76
|
}
|
|
77
|
-
if (!this.spiedElement)
|
|
78
|
-
throw new Error('You must provide a slotted element in form field');
|
|
79
|
-
if (SUPPORTED_COMPONENTS
|
|
80
|
-
.map(x => x.toUpperCase())
|
|
81
|
-
.indexOf(this.spiedElement.tagName) === -1) {
|
|
77
|
+
if (!this.spiedElement) {
|
|
82
78
|
// tslint:disable-next-line:no-console
|
|
83
|
-
console.warn('
|
|
79
|
+
console.warn('Form-field component support only ' + SUPPORTED_COMPONENTS.toString() + '. Some features may not work with the provided component.');
|
|
80
|
+
return;
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
83
|
updateLabelRequiredFlag(isRequired, label) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
|
|
2
2
|
import { HorizontalStep } from './horizontal-step';
|
|
3
3
|
export class HorizontalStepper {
|
|
4
4
|
constructor() {
|
|
@@ -20,16 +20,19 @@ export class HorizontalStepper {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
onCurrentStepChange(newValue, oldValue) {
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
//Check if the function is called before the component has finished its initialization in which case we do nothing
|
|
24
|
+
if (this.internalCurrentStep !== undefined) {
|
|
25
|
+
const stepInterval = Math.abs(oldValue - newValue);
|
|
26
|
+
this.el.style.setProperty('--wcs-progress-bar-animation-duration', 375 / stepInterval + 'ms');
|
|
27
|
+
if (newValue !== oldValue) {
|
|
28
|
+
for (let i = 0; i < stepInterval; i++) {
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
this.internalCurrentStep -= (oldValue - newValue) > 0 ? 1 : -1;
|
|
31
|
+
if (i === stepInterval - 1) {
|
|
32
|
+
this.el.style.removeProperty('--wcs-progress-bar-animation-duration');
|
|
33
|
+
}
|
|
34
|
+
}, (i * (375 / stepInterval)));
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
}
|
|
@@ -739,7 +739,7 @@ export class Input {
|
|
|
739
739
|
"mutable": false,
|
|
740
740
|
"complexType": {
|
|
741
741
|
"original": "TextFieldTypes",
|
|
742
|
-
"resolved": "\"date\" | \"datetime-local\" | \"email\" | \"month\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" | \"week\"",
|
|
742
|
+
"resolved": "\"date\" | \"datetime-local\" | \"email\" | \"file\" | \"month\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"time\" | \"url\" | \"week\"",
|
|
743
743
|
"references": {
|
|
744
744
|
"TextFieldTypes": {
|
|
745
745
|
"location": "import",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
wcs-modal {
|
|
2
|
-
--saas-fix-modal: rgba(var(--wcs-black), 0.5);
|
|
3
2
|
z-index: 999;
|
|
4
3
|
position: fixed;
|
|
5
4
|
top: 0;
|
|
@@ -7,56 +6,42 @@ wcs-modal {
|
|
|
7
6
|
left: 0;
|
|
8
7
|
right: 0;
|
|
9
8
|
display: none;
|
|
9
|
+
background: rgba(0, 0, 0, 0.4);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
wcs-modal[show] {
|
|
13
|
-
display:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
display: flex;
|
|
14
|
+
height: 100vh;
|
|
15
|
+
width: 100vw;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
Backdrop
|
|
22
22
|
*/
|
|
23
|
-
wcs-modal[without-backdrop]
|
|
24
|
-
|
|
23
|
+
wcs-modal[without-backdrop] {
|
|
24
|
+
background-color: unset;
|
|
25
25
|
}
|
|
26
26
|
wcs-modal[without-backdrop] .wcs-modal-container {
|
|
27
27
|
border: solid 1px var(--wcs-text-light);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.wcs-modal-backdrop {
|
|
31
|
-
display: block;
|
|
32
|
-
position: fixed;
|
|
33
|
-
top: 0;
|
|
34
|
-
left: 0;
|
|
35
|
-
bottom: 0;
|
|
36
|
-
right: 0;
|
|
37
|
-
opacity: 0.4;
|
|
38
|
-
background-color: var(--wcs-black);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
30
|
/**
|
|
42
31
|
Modal window
|
|
43
32
|
*/
|
|
44
33
|
.wcs-modal-container {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
max-height: var(--wcs-modal-max-height, 80%);
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
display: grid;
|
|
37
|
+
grid-template-columns: 100%;
|
|
38
|
+
grid-template-rows: auto 1fr auto;
|
|
48
39
|
box-sizing: border-box;
|
|
49
|
-
max-width: 100%;
|
|
50
|
-
/* bring your own prefixes */
|
|
51
|
-
transform: translate(-50%, -50%);
|
|
52
40
|
pointer-events: auto;
|
|
53
|
-
background-color: #fff;
|
|
54
41
|
background-clip: padding-box;
|
|
55
42
|
border: 0 solid rgba(0, 0, 0, 0.2);
|
|
56
43
|
border-radius: 0.4375rem;
|
|
57
|
-
outline: 0;
|
|
58
44
|
z-index: 20000;
|
|
59
|
-
display: block;
|
|
60
45
|
padding: 1.375rem 1.875rem 1.875rem 1.875rem;
|
|
61
46
|
}
|
|
62
47
|
|
|
@@ -91,9 +76,11 @@ Modal window
|
|
|
91
76
|
.wcs-modal-content {
|
|
92
77
|
font-weight: 400;
|
|
93
78
|
font-size: 16px;
|
|
79
|
+
overflow-y: auto;
|
|
94
80
|
}
|
|
95
81
|
|
|
96
82
|
.wcs-modal-actions {
|
|
97
83
|
margin-top: 20px;
|
|
98
|
-
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: flex-end;
|
|
99
86
|
}
|
|
@@ -19,20 +19,23 @@ export class Modal {
|
|
|
19
19
|
* size best suited for the content and screen size displaying the modal. Remember to test responsiveness.
|
|
20
20
|
*/
|
|
21
21
|
this.size = 'm';
|
|
22
|
+
/**
|
|
23
|
+
* Specifies whether the component should hide the actions slot or not
|
|
24
|
+
*/
|
|
25
|
+
this.hideActions = false;
|
|
22
26
|
}
|
|
23
27
|
render() {
|
|
24
28
|
return (h(Host, null,
|
|
25
|
-
h("div", { class: "wcs-modal-backdrop" }),
|
|
26
29
|
h("div", { class: "wcs-modal-container", "data-size": this.size },
|
|
27
30
|
h("div", { class: "wcs-modal-header" },
|
|
28
31
|
h("h5", null,
|
|
29
32
|
h("slot", { name: "header" })),
|
|
30
33
|
this.showCloseButton && (h("wcs-button", { shape: "round", mode: "clear", class: "wcs-dark", onClick: ($event) => this.onCloseButtonClick($event) },
|
|
31
|
-
h("
|
|
34
|
+
h("wcs-mat-icon", { icon: "close" })))),
|
|
32
35
|
h("div", { class: "wcs-modal-content" },
|
|
33
36
|
h("slot", null)),
|
|
34
|
-
h("div", { class: "wcs-modal-actions" },
|
|
35
|
-
h("slot", { name: "actions" })))));
|
|
37
|
+
!this.hideActions && (h("div", { class: "wcs-modal-actions" },
|
|
38
|
+
h("slot", { name: "actions" }))))));
|
|
36
39
|
}
|
|
37
40
|
onKeyDown(event) {
|
|
38
41
|
if (this.showCloseButton && event.key === 'Escape') {
|
|
@@ -130,6 +133,24 @@ export class Modal {
|
|
|
130
133
|
"attribute": "size",
|
|
131
134
|
"reflect": false,
|
|
132
135
|
"defaultValue": "'m'"
|
|
136
|
+
},
|
|
137
|
+
"hideActions": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "boolean",
|
|
142
|
+
"resolved": "boolean",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": "Specifies whether the component should hide the actions slot or not"
|
|
150
|
+
},
|
|
151
|
+
"attribute": "hide-actions",
|
|
152
|
+
"reflect": true,
|
|
153
|
+
"defaultValue": "false"
|
|
133
154
|
}
|
|
134
155
|
}; }
|
|
135
156
|
static get events() { return [{
|
|
@@ -119,6 +119,8 @@ export class Select {
|
|
|
119
119
|
this.optionsEl = this.el.shadowRoot.querySelector('.wcs-select-options');
|
|
120
120
|
this.controlEl = this.el.shadowRoot.querySelector('.wcs-select-control');
|
|
121
121
|
const stateMachine = Machine(SELECT_MACHINE_CONFIG, this.initMachineOptions());
|
|
122
|
+
// FIXME: type checking failed...
|
|
123
|
+
// @ts-ignore
|
|
122
124
|
this.stateService = interpret(stateMachine);
|
|
123
125
|
if (this.multiple) {
|
|
124
126
|
this.values = [];
|
|
@@ -64,7 +64,7 @@ export class Tooltip {
|
|
|
64
64
|
this.tippyInstance = tippy(document.getElementById(this.for), {
|
|
65
65
|
theme: this.theme,
|
|
66
66
|
allowHTML: true,
|
|
67
|
-
content: this.
|
|
67
|
+
content: this.getTooltipContentFromPropAndSlot(),
|
|
68
68
|
maxWidth: this.maxWidth,
|
|
69
69
|
placement: this.position,
|
|
70
70
|
delay: this.delay,
|
|
@@ -73,6 +73,12 @@ export class Tooltip {
|
|
|
73
73
|
trigger: this.trigger
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
+
getTooltipContentFromPropAndSlot() {
|
|
77
|
+
if (this.content) {
|
|
78
|
+
return this.content + this.el.innerHTML;
|
|
79
|
+
}
|
|
80
|
+
return this.el.innerHTML;
|
|
81
|
+
}
|
|
76
82
|
updateProps() {
|
|
77
83
|
this.tippyInstance.setProps({
|
|
78
84
|
interactive: this.interactive,
|
|
@@ -86,7 +92,7 @@ export class Tooltip {
|
|
|
86
92
|
}
|
|
87
93
|
updateTippyContent() {
|
|
88
94
|
this.tippyInstance.setProps({
|
|
89
|
-
content: this.
|
|
95
|
+
content: this.getTooltipContentFromPropAndSlot()
|
|
90
96
|
});
|
|
91
97
|
}
|
|
92
98
|
/**
|
|
@@ -279,6 +285,23 @@ export class Tooltip {
|
|
|
279
285
|
"attribute": "theme",
|
|
280
286
|
"reflect": false,
|
|
281
287
|
"defaultValue": "'wcs'"
|
|
288
|
+
},
|
|
289
|
+
"content": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"mutable": false,
|
|
292
|
+
"complexType": {
|
|
293
|
+
"original": "string",
|
|
294
|
+
"resolved": "string",
|
|
295
|
+
"references": {}
|
|
296
|
+
},
|
|
297
|
+
"required": false,
|
|
298
|
+
"optional": false,
|
|
299
|
+
"docs": {
|
|
300
|
+
"tags": [],
|
|
301
|
+
"text": "You can use this property instead of the slot API to affect content in the tooltip.\n\nThis makes it easier to manage the update if the tooltip contains elements that are not mutated when their\ncontent changes. Indeed, if the slot is used, the tooltip is updated only if the structure of the slotted DOM\nchanges (the DOM must be mutated).\n\nThe two APIs are not mutually exclusive, if both are filled in (the prop + the slot) the rendering will first\ndisplay the content of this property and then the slotted elements."
|
|
302
|
+
},
|
|
303
|
+
"attribute": "content",
|
|
304
|
+
"reflect": false
|
|
282
305
|
}
|
|
283
306
|
}; }
|
|
284
307
|
static get methods() { return {
|
|
@@ -369,5 +392,8 @@ export class Tooltip {
|
|
|
369
392
|
}, {
|
|
370
393
|
"propName": "trigger",
|
|
371
394
|
"methodName": "updateProps"
|
|
395
|
+
}, {
|
|
396
|
+
"propName": "content",
|
|
397
|
+
"methodName": "updateTippyContent"
|
|
372
398
|
}]; }
|
|
373
399
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["wcs-editable-field",[[1,"wcs-editable-field",{"type":[1],"label":[1],"readonly":[4],"value":[1032],"validateFn":[16],"formatFn":[16],"errorMsg":[1,"error-msg"],"currentState":[32],"isError":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-grid",[[1,"wcs-grid",{"serverMode":[4,"server-mode"],"data":[16],"loading":[4],"selectionConfig":[1,"selection-config"],"selectedItems":[8,"selected-items"],"wcsGridPaginationId":[1,"wcs-grid-pagination-id"],"rowIdPath":[1,"row-id-path"],"columns":[32],"paginationEl":[32],"rows":[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["wcs-grid-pagination",[[1,"wcs-grid-pagination",{"availablePageSizes":[16],"currentPage":[2,"current-page"],"pageSize":[2,"page-size"],"itemsCount":[2,"items-count"],"pageCount":[2,"page-count"]}]]],["wcs-horizontal-stepper",[[1,"wcs-horizontal-stepper",{"currentStep":[1026,"current-step"],"steps":[16],"mode":[1],"checkOnComplete":[4,"check-on-complete"],"buttonMode":[32],"internalCurrentStep":[32],"previous":[64],"next":[64]}]]],["wcs-dropdown",[[1,"wcs-dropdown",{"noArrow":[4,"no-arrow"],"mode":[1],"shape":[1],"disabled":[4],"placement":[1],"expanded":[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"]]]]],["wcs-galactic-menu",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input",[[1,"wcs-input",{"fireFocusEvents":[4,"fire-focus-events"],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"prefixLabel":[1,"prefix-label"],"suffixLabel":[1,"suffix-label"],"disabled":[4],"enterkeyhint":[1],"icon":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-
|
|
13
|
+
return bootstrapLazy([["wcs-editable-field",[[1,"wcs-editable-field",{"type":[1],"label":[1],"readonly":[4],"value":[1032],"validateFn":[16],"formatFn":[16],"errorMsg":[1,"error-msg"],"currentState":[32],"isError":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-grid",[[1,"wcs-grid",{"serverMode":[4,"server-mode"],"data":[16],"loading":[4],"selectionConfig":[1,"selection-config"],"selectedItems":[8,"selected-items"],"wcsGridPaginationId":[1,"wcs-grid-pagination-id"],"rowIdPath":[1,"row-id-path"],"columns":[32],"paginationEl":[32],"rows":[32]},[[0,"wcsHiddenChange","onHiddenColumnChange"],[0,"wcsSortChange","sortChangeEventHandler"],[0,"wcsGridPaginationChange","paginationChangeEventHandler"],[8,"wcsGridPaginationChange","paginationChangeEventHandlerOutside"]]]]],["wcs-grid-pagination",[[1,"wcs-grid-pagination",{"availablePageSizes":[16],"currentPage":[2,"current-page"],"pageSize":[2,"page-size"],"itemsCount":[2,"items-count"],"pageCount":[2,"page-count"]}]]],["wcs-horizontal-stepper",[[1,"wcs-horizontal-stepper",{"currentStep":[1026,"current-step"],"steps":[16],"mode":[1],"checkOnComplete":[4,"check-on-complete"],"buttonMode":[32],"internalCurrentStep":[32],"previous":[64],"next":[64]}]]],["wcs-modal",[[4,"wcs-modal",{"withoutBackdrop":[516,"without-backdrop"],"show":[516],"showCloseButton":[516,"show-close-button"],"size":[1],"hideActions":[516,"hide-actions"]},[[4,"keydown","onKeyDown"]]]]],["wcs-dropdown",[[1,"wcs-dropdown",{"noArrow":[4,"no-arrow"],"mode":[1],"shape":[1],"disabled":[4],"placement":[1],"expanded":[32]},[[8,"click","onWindowClickEvent"],[0,"wcsDropdownItemClick","dropdownItemClick"]]]]],["wcs-galactic-menu",[[1,"wcs-galactic-menu",{"text":[1],"showPopoverMenu":[32]},[[8,"click","onWindowClickEvent"]]]]],["wcs-input",[[1,"wcs-input",{"fireFocusEvents":[4,"fire-focus-events"],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"prefixLabel":[1,"prefix-label"],"suffixLabel":[1,"suffix-label"],"disabled":[4],"enterkeyhint":[1],"icon":[1],"inputmode":[1],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-textarea",[[1,"wcs-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"icon":[1],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"state":[513],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[4,"auto-grow"],"value":[1025],"hasFocus":[32],"fitContent":[64],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["wcs-accordion",[[1,"wcs-accordion",null,[[0,"wcsOpenChange","wcsOpenChangeHandler"]]]]],["wcs-accordion-content",[[1,"wcs-accordion-content"]]],["wcs-accordion-header",[[1,"wcs-accordion-header"]]],["wcs-accordion-panel",[[1,"wcs-accordion-panel",{"open":[1540],"close":[64]}]]],["wcs-action-bar",[[1,"wcs-action-bar",{"gutter":[4],"hasTabs":[32]}]]],["wcs-app",[[1,"wcs-app"]]],["wcs-badge",[[1,"wcs-badge",{"shape":[1],"color":[1]}]]],["wcs-card",[[1,"wcs-card",{"mode":[1537]}]]],["wcs-card-body",[[1,"wcs-card-body"]]],["wcs-com-nav",[[1,"wcs-com-nav",{"appName":[1,"app-name"],"mobileMenuOpen":[32],"currentActiveSizing":[32]}]]],["wcs-com-nav-category",[[1,"wcs-com-nav-category",{"label":[1],"categoryOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsCategoryOpened","onSubmenuOpened"]]]]],["wcs-com-nav-submenu",[[1,"wcs-com-nav-submenu",{"label":[1],"panelTitle":[1,"panel-title"],"panelDescription":[1,"panel-description"],"menuOpen":[32],"close":[64],"open":[64]},[[8,"click","onWindowClickEvent"],[8,"wcsSubmenuOpened","onSubmenuOpened"],[0,"wcsCategoryItemClicked","wcsCategoryItemClickedHandler"]]]]],["wcs-divider",[[1,"wcs-divider"]]],["wcs-dropdown-divider",[[1,"wcs-dropdown-divider"]]],["wcs-dropdown-header",[[1,"wcs-dropdown-header"]]],["wcs-dropdown-item",[[4,"wcs-dropdown-item",null,[[1,"mousedown","onMouseDown"]]]]],["wcs-field",[[1,"wcs-field"]]],["wcs-field-content",[[1,"wcs-field-content"]]],["wcs-field-label",[[1,"wcs-field-label"]]],["wcs-footer",[[1,"wcs-footer"]]],["wcs-galactic",[[1,"wcs-galactic",{"text":[1],"show":[32]}]]],["wcs-grid-column",[[1,"wcs-grid-column",{"path":[1],"name":[1],"sort":[4],"sortFn":[16],"formatter":[16],"sortOrder":[1025,"sort-order"],"width":[1],"customCells":[4,"custom-cells"],"hidden":[4]}]]],["wcs-grid-custom-cell",[[1,"wcs-grid-custom-cell",{"columnId":[1,"column-id"],"rowId":[8,"row-id"]}]]],["wcs-header",[[1,"wcs-header"]]],["wcs-hint",[[1,"wcs-hint",{"small":[1540]}]]],["wcs-icon",[[0,"wcs-icon",{"icon":[1],"size":[1]}]]],["wcs-label",[[1,"wcs-label",{"required":[516]}]]],["wcs-list-item",[[1,"wcs-list-item",{"activated":[1028]}]]],["wcs-list-item-properties",[[1,"wcs-list-item-properties"]]],["wcs-list-item-property",[[1,"wcs-list-item-property"]]],["wcs-nav",[[1,"wcs-nav"]]],["wcs-nav-item",[[4,"wcs-nav-item",{"text":[513],"href":[513]}]]],["wcs-progress-radial",[[1,"wcs-progress-radial",{"size":[2],"showLabel":[4,"show-label"],"value":[2]}]]],["wcs-radio-group",[[1,"wcs-radio-group",{"value":[8],"name":[520],"mode":[513]},[[0,"wcsRadioClick","selectedOptionChanged"]]]]],["wcs-switch",[[1,"wcs-switch",{"name":[1],"checked":[516],"labelAlignment":[513,"label-alignment"],"disabled":[4]}]]],["wcs-tab",[[1,"wcs-tab",{"header":[513],"itemKey":[8,"item-key"]}]]],["wcs-tabs",[[1,"wcs-tabs",{"align":[513],"selectedIndex":[2,"selected-index"],"selectedKey":[8,"selected-key"],"headersOnly":[4,"headers-only"],"gutter":[4],"headers":[32],"currentActiveTabIndex":[32]},[[0,"tabLoaded","onTabLoaded"]]]]],["wcs-tooltip",[[1,"wcs-tooltip",{"for":[1],"position":[513],"interactive":[4],"maxWidth":[8,"max-width"],"delay":[2],"duration":[2],"trigger":[1],"theme":[1],"content":[1],"hide":[64],"show":[64],"disable":[64],"enable":[64]}]]],["wcs-progress-bar",[[1,"wcs-progress-bar",{"small":[4],"showLabel":[4,"show-label"],"value":[2]}]]],["wcs-radio",[[1,"wcs-radio",{"mode":[513],"value":[1544],"label":[1537],"checked":[1540],"disabled":[1028]}]]],["wcs-select_2",[[4,"wcs-select-option",{"disabled":[1540],"selected":[1540],"value":[8],"chipColor":[1,"chip-color"],"chipBackgroundColor":[1,"chip-background-color"],"multiple":[1540]},[[1,"mousedown","onMouseDown"]]],[1,"wcs-select",{"value":[1032],"placeholder":[1537],"disabled":[1028],"multiple":[516],"chips":[516],"name":[1],"compareWith":[16],"expanded":[32],"hasLoaded":[32],"displayText":[32],"focused":[32],"overlayDirection":[32],"open":[64],"close":[64]},[[1,"mousedown","onMouseDown"],[8,"click","onWindowClickEvent"],[0,"wcsSelectOptionClick","selectedOptionChanged"]]]]],["wcs-error_2",[[1,"wcs-error"],[1,"wcs-form-field",{"isError":[1540,"is-error"],"hasPrefix":[32],"hasSuffix":[32],"spiedElement":[32]}]]],["wcs-spinner",[[1,"wcs-spinner",{"mode":[513]}]]],["wcs-button",[[1,"wcs-button",{"type":[1025],"href":[1],"disabled":[516],"ripple":[4],"shape":[513],"mode":[513]},[[0,"click","onClick"]]]]],["wcs-checkbox",[[1,"wcs-checkbox",{"name":[1],"indeterminate":[1540],"checked":[1540],"labelAlignment":[1537,"label-alignment"],"disabled":[4]}]]],["wcs-mat-icon",[[1,"wcs-mat-icon",{"icon":[1],"size":[1],"family":[1],"familyFile":[32],"familyClass":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|