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
|
@@ -77,22 +77,19 @@ let FormField = class {
|
|
|
77
77
|
this.updateLabelRequiredFlag(isRequired, label);
|
|
78
78
|
}
|
|
79
79
|
initSpiedElement() {
|
|
80
|
-
var _a;
|
|
80
|
+
var _a, _b;
|
|
81
81
|
const SUPPORTED_COMPONENTS = ['wcs-input', 'wcs-select', 'wcs-textarea', 'wcs-radio-group', 'wcs-switch', 'wcs-checkbox'];
|
|
82
|
-
this.spiedElement = (_a = this.el.shadowRoot.querySelector('slot:not([name])')) === null || _a === void 0 ? void 0 : _a.assignedElements()[0];
|
|
82
|
+
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];
|
|
83
83
|
// If the component is used in another web component
|
|
84
|
-
if (this.spiedElement.tagName === 'SLOT') {
|
|
84
|
+
if (((_b = this.spiedElement) === null || _b === void 0 ? void 0 : _b.tagName) === 'SLOT') {
|
|
85
85
|
this.spiedElement = (this.spiedElement
|
|
86
86
|
.assignedElements()
|
|
87
87
|
.filter(n => SUPPORTED_COMPONENTS.map(x => x.toUpperCase()).indexOf(n.nodeName) !== -1)[0]);
|
|
88
88
|
}
|
|
89
|
-
if (!this.spiedElement)
|
|
90
|
-
throw new Error('You must provide a slotted element in form field');
|
|
91
|
-
if (SUPPORTED_COMPONENTS
|
|
92
|
-
.map(x => x.toUpperCase())
|
|
93
|
-
.indexOf(this.spiedElement.tagName) === -1) {
|
|
89
|
+
if (!this.spiedElement) {
|
|
94
90
|
// tslint:disable-next-line:no-console
|
|
95
|
-
console.warn('
|
|
91
|
+
console.warn('Form-field component support only ' + SUPPORTED_COMPONENTS.toString() + '. Some features may not work with the provided component.');
|
|
92
|
+
return;
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
updateLabelRequiredFlag(isRequired, label) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-b982604a.js';
|
|
2
2
|
import { a as clickInsideElement } from './helpers-e2993152.js';
|
|
3
|
-
import { c as createPopper } from './popper-
|
|
3
|
+
import { c as createPopper } from './popper-548df79b.js';
|
|
4
4
|
|
|
5
5
|
const galacticMenuCss = "#menu{background-color:var(--wcs-gray);color:white;display:none;padding:var(--wcs-padding)}#menu[data-show]{display:block;z-index:9999}#menu[data-popper-placement^=top]>#arrow{bottom:-4px}#menu[data-popper-placement^=bottom]>#arrow{top:-4px}#menu[data-popper-placement^=left]>#arrow{right:-4px}#menu[data-popper-placement^=right]>#arrow{left:-4px}:host{display:flex;align-items:center;height:32px;padding-left:var(--wcs-padding);background-color:var(--wcs-gray-light)}#toggle-menu-icon{cursor:pointer;padding:0 var(--wcs-padding);user-select:none}#arrow,#arrow::before{position:absolute;width:8px;height:8px;background:inherit}#arrow{visibility:hidden}#arrow::before{visibility:visible;content:\"\";transform:rotate(45deg)}";
|
|
6
6
|
|
|
@@ -41,16 +41,19 @@ let HorizontalStepper = class {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
onCurrentStepChange(newValue, oldValue) {
|
|
44
|
-
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
//Check if the function is called before the component has finished its initialization in which case we do nothing
|
|
45
|
+
if (this.internalCurrentStep !== undefined) {
|
|
46
|
+
const stepInterval = Math.abs(oldValue - newValue);
|
|
47
|
+
this.el.style.setProperty('--wcs-progress-bar-animation-duration', 375 / stepInterval + 'ms');
|
|
48
|
+
if (newValue !== oldValue) {
|
|
49
|
+
for (let i = 0; i < stepInterval; i++) {
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
this.internalCurrentStep -= (oldValue - newValue) > 0 ? 1 : -1;
|
|
52
|
+
if (i === stepInterval - 1) {
|
|
53
|
+
this.el.style.removeProperty('--wcs-progress-bar-animation-duration');
|
|
54
|
+
}
|
|
55
|
+
}, (i * (375 / stepInterval)));
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-b982604a.js';
|
|
2
2
|
|
|
3
|
-
const matIconCss = ":host{display:
|
|
3
|
+
const matIconCss = ":host{display:flex;flex-direction:column;justify-content:center}:host .size-s{font-size:18px}:host .size-m{font-size:24px}:host .size-l{font-size:36px}:host .size-xl{font-size:48px}";
|
|
4
4
|
|
|
5
5
|
let MatIcon = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-b982604a.js';
|
|
2
2
|
|
|
3
|
-
const modalCss = "wcs-modal{
|
|
3
|
+
const modalCss = "wcs-modal{z-index:999;position:fixed;top:0;bottom:0;left:0;right:0;display:none;background:rgba(0, 0, 0, 0.4)}wcs-modal[show]{display:flex;height:100vh;width:100vw;align-items:center;justify-content:center}wcs-modal[without-backdrop]{background-color:unset}wcs-modal[without-backdrop] .wcs-modal-container{border:solid 1px var(--wcs-text-light)}.wcs-modal-container{max-height:var(--wcs-modal-max-height, 80%);background-color:#fff;display:grid;grid-template-columns:100%;grid-template-rows:auto 1fr auto;box-sizing:border-box;pointer-events:auto;background-clip:padding-box;border:0 solid rgba(0, 0, 0, 0.2);border-radius:0.4375rem;z-index:20000;padding:1.375rem 1.875rem 1.875rem 1.875rem}.wcs-modal-container[data-size=s]{width:288px}.wcs-modal-container[data-size=m]{width:480px}.wcs-modal-container[data-size=l]{width:864px}.wcs-modal-container[data-size=xl]{width:1200px}.wcs-modal-header{margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.wcs-modal-header h5{font-size:24px;font-weight:400;margin:0}.wcs-modal-content{font-weight:400;font-size:16px;overflow-y:auto}.wcs-modal-actions{margin-top:20px;display:flex;justify-content:flex-end}";
|
|
4
4
|
|
|
5
5
|
let Modal = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -24,9 +24,13 @@ let Modal = class {
|
|
|
24
24
|
* size best suited for the content and screen size displaying the modal. Remember to test responsiveness.
|
|
25
25
|
*/
|
|
26
26
|
this.size = 'm';
|
|
27
|
+
/**
|
|
28
|
+
* Specifies whether the component should hide the actions slot or not
|
|
29
|
+
*/
|
|
30
|
+
this.hideActions = false;
|
|
27
31
|
}
|
|
28
32
|
render() {
|
|
29
|
-
return (h(Host, null, h("div", { class: "wcs-modal-
|
|
33
|
+
return (h(Host, null, h("div", { class: "wcs-modal-container", "data-size": this.size }, h("div", { class: "wcs-modal-header" }, h("h5", null, h("slot", { name: "header" })), this.showCloseButton && (h("wcs-button", { shape: "round", mode: "clear", class: "wcs-dark", onClick: ($event) => this.onCloseButtonClick($event) }, h("wcs-mat-icon", { icon: "close" })))), h("div", { class: "wcs-modal-content" }, h("slot", null)), !this.hideActions && (h("div", { class: "wcs-modal-actions" }, h("slot", { name: "actions" }))))));
|
|
30
34
|
}
|
|
31
35
|
onKeyDown(event) {
|
|
32
36
|
if (this.showCloseButton && event.key === 'Escape') {
|