wcs-core 2.5.4 → 2.9.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 +132 -5
- package/README.md +19 -1
- package/dist/cjs/component-fc28ed16.js +1074 -0
- package/dist/cjs/helpers-6abce594.js +86 -0
- package/dist/cjs/{index-e05c3e1f.js → index-3cb9d725.js} +165 -87
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/{esm/wcs-action-bar_47.entry.js → cjs/lodash-776d6f03.js} +12499 -22628
- package/dist/cjs/popper-5777994b.js +1732 -0
- package/dist/cjs/select-arrow-76ccf86d.js +36 -0
- package/dist/cjs/wcs-action-bar.cjs.entry.js +24 -0
- package/dist/cjs/wcs-app.cjs.entry.js +2 -2
- package/dist/cjs/wcs-badge.cjs.entry.js +27 -0
- package/dist/cjs/wcs-button.cjs.entry.js +86 -0
- package/dist/cjs/wcs-card-body.cjs.entry.js +19 -0
- package/dist/cjs/wcs-card.cjs.entry.js +20 -0
- package/dist/cjs/wcs-checkbox.cjs.entry.js +47 -0
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +63 -0
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +69 -0
- package/dist/cjs/wcs-com-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-divider.cjs.entry.js +19 -0
- 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-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-dropdown.cjs.entry.js +90 -0
- package/dist/cjs/wcs-editable-field.cjs.entry.js +225 -0
- package/dist/cjs/wcs-error_2.cjs.entry.js +137 -0
- package/dist/cjs/wcs-field-content.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field-label.cjs.entry.js +16 -0
- package/dist/cjs/wcs-field.cjs.entry.js +19 -0
- package/dist/cjs/wcs-footer.cjs.entry.js +19 -0
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +58 -0
- package/dist/cjs/wcs-galactic.cjs.entry.js +41 -0
- package/dist/cjs/wcs-grid-column.cjs.entry.js +77 -0
- package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +16 -0
- package/dist/cjs/wcs-grid-pagination.cjs.entry.js +4 -4
- package/dist/cjs/wcs-grid.cjs.entry.js +332 -0
- package/dist/cjs/wcs-header.cjs.entry.js +25 -0
- package/dist/cjs/wcs-hint.cjs.entry.js +20 -0
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +114 -0
- package/dist/cjs/wcs-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-input.cjs.entry.js +228 -0
- package/dist/cjs/wcs-label.cjs.entry.js +20 -0
- package/dist/cjs/wcs-list-item-properties.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item-property.cjs.entry.js +19 -0
- package/dist/cjs/wcs-list-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +73 -0
- package/dist/cjs/wcs-modal.cjs.entry.js +50 -0
- package/dist/cjs/wcs-nav-item.cjs.entry.js +23 -0
- package/dist/cjs/wcs-nav.cjs.entry.js +19 -0
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +47 -0
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +30 -0
- package/dist/cjs/wcs-radio-group.cjs.entry.js +65 -0
- package/dist/cjs/wcs-radio.cjs.entry.js +49 -0
- package/dist/cjs/wcs-select_2.cjs.entry.js +4916 -0
- package/dist/cjs/wcs-spinner.cjs.entry.js +21 -0
- package/dist/cjs/wcs-switch.cjs.entry.js +42 -0
- package/dist/cjs/wcs-tab.cjs.entry.js +20 -0
- package/dist/cjs/wcs-tabs.cjs.entry.js +159 -0
- package/dist/cjs/wcs-textarea.cjs.entry.js +224 -0
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1635 -0
- package/dist/cjs/wcs.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/badge/badge-interface.js +1 -0
- package/dist/collection/components/badge/badge.js +14 -4
- package/dist/collection/components/button/button.css +79 -75
- package/dist/collection/components/button/button.js +23 -11
- 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/com-nav/com-nav.css +1 -2
- package/dist/collection/components/com-nav-category/com-nav-category.css +5 -6
- package/dist/collection/components/com-nav-category/com-nav-category.js +31 -1
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +1 -2
- package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +21 -1
- 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/footer/footer.css +1 -1
- package/dist/collection/components/form-field/form-field.css +1 -2
- package/dist/collection/components/form-field/form-field.js +0 -17
- package/dist/collection/components/grid/grid.js +75 -13
- package/dist/collection/components/grid-column/grid-column.css +5 -0
- package/dist/collection/components/grid-column/grid-column.js +70 -4
- package/dist/collection/components/grid-custom-cell/grid-custom-cell.js +45 -0
- package/dist/collection/components/grid-pagination/grid-pagination.js +4 -4
- package/dist/collection/components/header/header.css +1 -1
- 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 +40 -4
- 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/select/select.css +81 -77
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select-option/select-option.css +79 -75
- package/dist/collection/components/select-option/select-option.js +6 -7
- 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 +5 -5
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/textarea/textarea.css +4 -0
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.css +3 -0
- package/dist/collection/components/tooltip/tooltip.js +310 -92
- package/dist/collection/utils/helpers.js +4 -0
- package/dist/esm/component-6b4d470f.js +1072 -0
- package/dist/esm/helpers-e2993152.js +77 -0
- package/dist/esm/{index-c619b1fa.js → index-b982604a.js} +165 -88
- package/dist/esm/loader.js +3 -3
- package/dist/{cjs/wcs-action-bar_47.cjs.entry.js → esm/lodash-d6d9d079.js} +12610 -22791
- package/dist/esm/popper-5f42e560.js +1729 -0
- package/dist/esm/select-arrow-73ac4016.js +34 -0
- package/dist/esm/wcs-action-bar.entry.js +20 -0
- package/dist/esm/wcs-app.entry.js +2 -2
- package/dist/esm/wcs-badge.entry.js +23 -0
- package/dist/esm/wcs-button.entry.js +82 -0
- package/dist/esm/wcs-card-body.entry.js +15 -0
- package/dist/esm/wcs-card.entry.js +16 -0
- package/dist/esm/wcs-checkbox.entry.js +43 -0
- package/dist/esm/wcs-com-nav-category.entry.js +59 -0
- package/dist/esm/wcs-com-nav-submenu.entry.js +65 -0
- package/dist/esm/wcs-com-nav.entry.js +15 -0
- package/dist/esm/wcs-divider.entry.js +15 -0
- 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-item.entry.js +19 -0
- package/dist/esm/wcs-dropdown.entry.js +86 -0
- package/dist/esm/wcs-editable-field.entry.js +221 -0
- package/dist/esm/wcs-error_2.entry.js +132 -0
- package/dist/esm/wcs-field-content.entry.js +12 -0
- package/dist/esm/wcs-field-label.entry.js +12 -0
- package/dist/esm/wcs-field.entry.js +15 -0
- package/dist/esm/wcs-footer.entry.js +15 -0
- package/dist/esm/wcs-galactic-menu.entry.js +54 -0
- package/dist/esm/wcs-galactic.entry.js +37 -0
- package/dist/esm/wcs-grid-column.entry.js +73 -0
- package/dist/esm/wcs-grid-custom-cell.entry.js +12 -0
- package/dist/esm/wcs-grid-pagination.entry.js +4 -4
- package/dist/esm/wcs-grid.entry.js +328 -0
- package/dist/esm/wcs-header.entry.js +21 -0
- package/dist/esm/wcs-hint.entry.js +16 -0
- package/dist/esm/wcs-horizontal-stepper.entry.js +110 -0
- package/dist/esm/wcs-icon.entry.js +2 -2
- package/dist/esm/wcs-input.entry.js +224 -0
- package/dist/esm/wcs-label.entry.js +16 -0
- package/dist/esm/wcs-list-item-properties.entry.js +15 -0
- package/dist/esm/wcs-list-item-property.entry.js +15 -0
- package/dist/esm/wcs-list-item.entry.js +19 -0
- package/dist/esm/wcs-mat-icon.entry.js +69 -0
- package/dist/esm/wcs-modal.entry.js +46 -0
- package/dist/esm/wcs-nav-item.entry.js +19 -0
- package/dist/esm/wcs-nav.entry.js +15 -0
- package/dist/esm/wcs-progress-bar.entry.js +43 -0
- package/dist/esm/wcs-progress-radial.entry.js +26 -0
- package/dist/esm/wcs-radio-group.entry.js +61 -0
- package/dist/esm/wcs-radio.entry.js +45 -0
- package/dist/esm/wcs-select_2.entry.js +4911 -0
- package/dist/esm/wcs-spinner.entry.js +17 -0
- package/dist/esm/wcs-switch.entry.js +38 -0
- package/dist/esm/wcs-tab.entry.js +16 -0
- package/dist/esm/wcs-tabs.entry.js +155 -0
- package/dist/esm/wcs-textarea.entry.js +220 -0
- package/dist/esm/wcs-tooltip.entry.js +1631 -0
- package/dist/esm/wcs.js +3 -3
- 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/button/button.d.ts +7 -3
- 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/com-nav-category/com-nav-category.d.ts +7 -0
- package/dist/types/components/com-nav-submenu/com-nav-submenu.d.ts +7 -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 +18 -0
- package/dist/types/components/grid-column/grid-column.d.ts +6 -1
- package/dist/types/components/grid-custom-cell/grid-custom-cell.d.ts +12 -0
- 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/select-option/select-option.d.ts +2 -0
- 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 +253 -41
- package/dist/types/interfaces.d.ts +22 -0
- package/dist/types/stencil-public-runtime.d.ts +189 -186
- package/dist/types/utils/helpers.d.ts +1 -0
- package/dist/wcs/p-03b2e238.entry.js +1 -0
- package/dist/wcs/p-08a7e84d.entry.js +1 -0
- package/dist/wcs/p-16dfbae8.js +127 -0
- package/dist/wcs/p-1dce7e63.entry.js +1 -0
- package/dist/wcs/p-1f5aed36.entry.js +1 -0
- package/dist/wcs/p-214236db.entry.js +1 -0
- package/dist/wcs/p-22813c8e.entry.js +1 -0
- package/dist/wcs/p-26b5c0a3.entry.js +1 -0
- package/dist/wcs/p-2e6265dc.entry.js +1 -0
- package/dist/wcs/p-384068f7.entry.js +1 -0
- package/dist/wcs/p-41037455.entry.js +1 -0
- package/dist/wcs/p-474d6601.entry.js +1 -0
- package/dist/wcs/p-4e9e226d.entry.js +1 -0
- package/dist/wcs/p-55fdc284.entry.js +1 -0
- package/dist/wcs/p-5b35b232.entry.js +1 -0
- package/dist/wcs/p-600a9cc0.entry.js +1 -0
- package/dist/wcs/p-60b51967.entry.js +1 -0
- package/dist/wcs/p-65c5ccc5.entry.js +1 -0
- package/dist/wcs/p-688fea65.entry.js +1 -0
- package/dist/wcs/p-716d5921.entry.js +1 -0
- package/dist/wcs/p-7206e492.entry.js +1 -0
- package/dist/wcs/p-7219c04b.js +1 -0
- package/dist/wcs/p-7c26f650.entry.js +1 -0
- package/dist/wcs/p-8137f075.entry.js +1 -0
- package/dist/wcs/p-8864a491.entry.js +1 -0
- package/dist/wcs/p-8c8740e3.entry.js +1 -0
- package/dist/wcs/p-91a2de07.entry.js +1 -0
- package/dist/wcs/p-94a31f64.entry.js +1 -0
- package/dist/wcs/p-9619f77a.entry.js +1 -0
- package/dist/wcs/p-979dfd78.entry.js +1 -0
- package/dist/wcs/p-9ba52bc4.entry.js +1 -0
- package/dist/wcs/p-a1ee1551.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-adef7aaf.js +1 -0
- package/dist/wcs/p-b5ffbea8.entry.js +1 -0
- package/dist/wcs/p-b7184d59.entry.js +1 -0
- package/dist/wcs/p-bbf1ef42.entry.js +1 -0
- package/dist/wcs/p-c7d6d3e1.entry.js +15 -0
- package/dist/wcs/p-cf4d7a83.js +1 -0
- package/dist/wcs/p-d3c9a644.js +1 -0
- package/dist/wcs/p-db68379f.entry.js +1 -0
- package/dist/wcs/p-dbbc3f58.entry.js +1 -0
- package/dist/wcs/p-dc817204.entry.js +1 -0
- package/dist/wcs/p-e0163de8.entry.js +1 -0
- package/dist/wcs/p-e4236d32.entry.js +1 -0
- package/dist/wcs/p-e43358e4.entry.js +1 -0
- package/dist/wcs/p-e9ce507c.entry.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-f46e6c3c.js +1 -0
- package/dist/wcs/p-f96bb0bf.entry.js +1 -0
- package/dist/wcs/p-f9944bde.entry.js +1 -0
- package/dist/wcs/p-fa173947.entry.js +1 -0
- package/dist/wcs/p-fb1577b5.entry.js +1 -0
- package/dist/wcs/p-febe9ccc.entry.js +1 -0
- package/dist/wcs/p-ff6d0dfd.entry.js +1 -0
- package/dist/wcs/wcs.css +1 -1
- package/dist/wcs/wcs.esm.js +1 -1
- package/loader/index.d.ts +0 -1
- package/package.json +25 -22
- package/dist/types/interface.d.ts +0 -3
- package/dist/wcs/p-16dca526.entry.js +0 -1
- package/dist/wcs/p-4f228fcb.entry.js +0 -134
- package/dist/wcs/p-66520e5a.entry.js +0 -1
- package/dist/wcs/p-d31287c6.entry.js +0 -1
- package/dist/wcs/p-f73f235b.js +0 -1
- package/schematics/.gitignore +0 -18
- package/schematics/.npmignore +0 -4
- package/schematics/collection.json +0 -9
- package/schematics/src/ng-add/files/fonts/avenir-black.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-book.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-lighter.woff +0 -0
- package/schematics/src/ng-add/files/fonts/avenir-medium.woff +0 -0
- package/schematics/src/ng-add/files/sncf-logo.png +0 -0
- package/schematics/src/ng-add/index.d.ts +0 -3
- package/schematics/src/ng-add/index.js +0 -119
- package/schematics/src/ng-add/index.js.map +0 -1
- package/schematics/src/ng-add/schema.json +0 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const spinnerCss = "@keyframes wcs-spinner-border{to{transform:rotate(360deg)}}@keyframes wcs-spinner-grow{0%{transform:scale(0)}50%{opacity:1}}:host{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border-radius:50%}:host([mode=border]){border:0.25em solid var(--wcs-base);border-right-color:transparent;animation:wcs-spinner-border 0.75s linear infinite}:host([mode=growing]){background-color:var(--wcs-base);opacity:0;animation:wcs-spinner-grow 0.75s linear infinite}";
|
|
8
|
+
|
|
9
|
+
let Spinner = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Indicates the spinner display mode.
|
|
14
|
+
* Accepted values: `border` or `growing`
|
|
15
|
+
*/
|
|
16
|
+
this.mode = 'border';
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
Spinner.style = spinnerCss;
|
|
20
|
+
|
|
21
|
+
exports.wcs_spinner = Spinner;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const switchCss = ":host{--wcs-switch-background-color-initial:var(--wcs-text-light);--wcs-switch-background-color-final:var(--wcs-primary);--wcs-switch-bullet-color-initial:var(--wcs-switch-background-color-final);--wcs-switch-bullet-color-final:var(--wcs-switch-background-color-initial);--wcs-switch-text-color:var(--wcs-text-medium);display:flex}:host([disabled]){--wcs-switch-text-color:var(--wcs-text-disabled)}.wcs-container{position:relative;display:flex;margin-bottom:0}:host([label-alignment=top]) .wcs-container{align-items:start}:host([label-alignment=center]) .wcs-container{align-items:center}:host([label-alignment=bottom]) .wcs-container{align-items:flex-end}.wcs-container input{position:absolute;opacity:0;height:0;width:0}.text{color:var(--wcs-switch-text-color);margin-left:6px;font-weight:500;line-height:1.375}.wcs-container:not([aria-disabled]) input:checked~.text{--wcs-switch-text-color:var(--wcs-primary)}.wcs-checkmark::before{position:absolute;transition:all 0.15s ease-out}.wcs-checkmark::before{bottom:0.3125rem;left:0.3125rem;width:0.875rem;height:0.875rem;content:\"\";border-radius:50%;background-color:var(--wcs-switch-bullet-color-initial)}:host([disabled]:not([checked])) .wcs-checkmark::before{background-color:var(--wcs-text-disabled)}:host([disabled]:not([checked])) .wcs-checkmark{background-color:var(--wcs-light)}:host([disabled][checked]) .wcs-checkmark::before{background-color:var(--wcs-white)}:host([disabled][checked]) .wcs-checkmark{background-color:var(--wcs-text-disabled)}.wcs-checkmark{top:0;right:0;bottom:0;left:0;width:3rem;height:1.5rem;border-radius:0.75rem;background-color:var(--wcs-switch-background-color-initial)}.wcs-container:not([aria-disabled]){cursor:pointer}.wcs-container:hover:not([aria-disabled]){--wcs-switch-text-color:var(--wcs-primary)}input:not([disabled]):checked+.wcs-checkmark::before,.wcs-container:hover input:not([disabled])+.wcs-checkmark::before,.wcs-container:focus input:not([disabled])+.wcs-checkmark::before{background-color:var(--wcs-switch-bullet-color-final)}input:checked+.wcs-checkmark::before{transform:translateX(24px)}input:not([disabled]):checked+.wcs-checkmark,.wcs-container:hover input:not([disabled])+.wcs-checkmark,.wcs-container:focus input:not([disabled])+.wcs-checkmark{background-color:var(--wcs-switch-background-color-final)}";
|
|
8
|
+
|
|
9
|
+
let Switch = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.wcsChange = index.createEvent(this, "wcsChange", 7);
|
|
13
|
+
this.switchId = `wcs-switch-${switchIds++}`;
|
|
14
|
+
this.name = this.switchId;
|
|
15
|
+
/**
|
|
16
|
+
* If `true`, the switch is selected.
|
|
17
|
+
*/
|
|
18
|
+
this.checked = false;
|
|
19
|
+
/**
|
|
20
|
+
* Specifie the alignment of the switch with the label content
|
|
21
|
+
*/
|
|
22
|
+
this.labelAlignment = 'center';
|
|
23
|
+
/**
|
|
24
|
+
* Specify wether the switch is disabled or not.
|
|
25
|
+
*/
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
}
|
|
28
|
+
toggleChange(_event) {
|
|
29
|
+
this.checked = !this.checked;
|
|
30
|
+
this.wcsChange.emit({
|
|
31
|
+
checked: this.checked
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (index.h(index.Host, null, index.h("label", { htmlFor: this.name, class: "wcs-container", "aria-disabled": this.disabled }, index.h("input", { onChange: (evt) => this.toggleChange(evt), checked: this.checked, class: "wcs-switch", type: "checkbox", name: this.name, disabled: this.disabled, id: this.name }), index.h("span", { class: "wcs-checkmark" }), index.h("span", { class: "text" }, index.h("slot", null)))));
|
|
36
|
+
}
|
|
37
|
+
get el() { return index.getElement(this); }
|
|
38
|
+
};
|
|
39
|
+
let switchIds = 0;
|
|
40
|
+
Switch.style = switchCss;
|
|
41
|
+
|
|
42
|
+
exports.wcs_switch = Switch;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
let Tab = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.tabLoaded = index.createEvent(this, "tabLoaded", 7);
|
|
11
|
+
}
|
|
12
|
+
componentDidLoad() {
|
|
13
|
+
this.tabLoaded.emit();
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (index.h(index.Host, { slot: "wcs-tab" }, index.h("slot", null)));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.wcs_tab = Tab;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
|
|
7
|
+
const tabsCss = ":host{--wcs-tabs-padding-bottom:16px}:host([align=start]) .wcs-tabs-headers{justify-content:start}:host([align=end]) .wcs-tabs-headers{justify-content:end}:host([align=center]) .wcs-tabs-headers{justify-content:center}.wcs-tabs-headers{padding-top:4px;overflow-x:auto;display:flex;position:relative}:host([gutter]) .wcs-tabs-headers{border-bottom:var(--wcs-tabs-headers-border-bottom)}.wcs-tab-header{padding:8px 24px 16px 0;display:flex;flex-shrink:0;align-items:center;justify-content:center;cursor:pointer;outline:none}.wcs-tab-header span{text-align:center;color:var(--wcs-text-disabled);font-size:1rem;font-weight:400}.wcs-tab-header:focus span,.wcs-tab-header:hover span{color:var(--wcs-primary)}.active span{font-weight:500;color:var(--wcs-primary);position:relative}.active span::after{position:absolute;bottom:calc(var(--wcs-tabs-padding-bottom) * -1);left:0;width:100%;height:0.3125rem;content:\"\";background-color:#0088ce;border-radius:3px}";
|
|
8
|
+
|
|
9
|
+
let Tabs = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.tabChange = index.createEvent(this, "tabChange", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Tab headers alignment.
|
|
15
|
+
*/
|
|
16
|
+
this.align = 'start';
|
|
17
|
+
/**
|
|
18
|
+
* Current selected tab index.
|
|
19
|
+
* Starts at 0.
|
|
20
|
+
*/
|
|
21
|
+
this.selectedIndex = 0;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to skip rendering the tabpanel with the content of the selected tab. Use this prop if you plan to
|
|
24
|
+
* separately render the tab content.
|
|
25
|
+
*/
|
|
26
|
+
this.headersOnly = false;
|
|
27
|
+
this.headers = [];
|
|
28
|
+
this.currentActiveTabIndex = 0;
|
|
29
|
+
}
|
|
30
|
+
selectedIndexChanged(newValue) {
|
|
31
|
+
this.currentActiveTabIndex = newValue;
|
|
32
|
+
}
|
|
33
|
+
selectedTabkeyChanged(newValue) {
|
|
34
|
+
this.updateCurrentActiveIndexByTabKey(newValue);
|
|
35
|
+
}
|
|
36
|
+
emitActiveTabChange() {
|
|
37
|
+
this.tabChange.emit({
|
|
38
|
+
tabName: this.headers[this.currentActiveTabIndex],
|
|
39
|
+
tabIndex: this.currentActiveTabIndex,
|
|
40
|
+
selectedKey: this.tabs[this.currentActiveTabIndex].itemKey
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
updateCurrentActiveIndexByTabKey(newValue) {
|
|
44
|
+
for (let i = 0; i < this.tabs.length; i++) {
|
|
45
|
+
const tab = this.tabs[i];
|
|
46
|
+
if (tab.itemKey === newValue) {
|
|
47
|
+
this.currentActiveTabIndex = i;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
onTabLoaded() {
|
|
52
|
+
this.refreshHeaders();
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
this.putTabsInCorrectDivIfTheyAreNot();
|
|
56
|
+
this.refreshHeaders();
|
|
57
|
+
if (this.selectedIndex) {
|
|
58
|
+
this.currentActiveTabIndex = this.selectedIndex;
|
|
59
|
+
}
|
|
60
|
+
if (this.selectedKey) {
|
|
61
|
+
this.updateCurrentActiveIndexByTabKey(this.selectedKey);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// XXX: Firefox < 63
|
|
65
|
+
putTabsInCorrectDivIfTheyAreNot() {
|
|
66
|
+
const tabDiv = this.el.shadowRoot.querySelector('.wcs-tabs');
|
|
67
|
+
if (tabDiv.querySelector('slot') === null) {
|
|
68
|
+
Array.from(this.el.querySelectorAll('wcs-tab'))
|
|
69
|
+
.filter(node => node.parentNode !== tabDiv)
|
|
70
|
+
.forEach(tab => {
|
|
71
|
+
if (tab.parentElement.isEqualNode(this.el)) {
|
|
72
|
+
this.el.removeChild(tab);
|
|
73
|
+
tabDiv.appendChild(tab);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
handleKeyDown(ev, tabIndex) {
|
|
79
|
+
const target = ev.target;
|
|
80
|
+
switch (ev.key) {
|
|
81
|
+
case ' ':
|
|
82
|
+
case 'Enter': {
|
|
83
|
+
this.currentActiveTabIndex = tabIndex;
|
|
84
|
+
this.emitActiveTabChange();
|
|
85
|
+
ev.preventDefault();
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case 'ArrowLeft': {
|
|
89
|
+
if (target.previousElementSibling
|
|
90
|
+
&& target.previousElementSibling.classList.contains('wcs-tab-header')) {
|
|
91
|
+
target.previousElementSibling.focus();
|
|
92
|
+
ev.preventDefault();
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case 'ArrowRight': {
|
|
97
|
+
if (target.nextElementSibling
|
|
98
|
+
&& target.nextElementSibling.classList.contains('wcs-tab-header')) {
|
|
99
|
+
target.nextElementSibling.focus();
|
|
100
|
+
ev.preventDefault();
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
refreshHeaders() {
|
|
107
|
+
this.headers = [];
|
|
108
|
+
this.tabs
|
|
109
|
+
.forEach(x => {
|
|
110
|
+
this.headers.push(x.getAttribute('header'));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
get tabs() {
|
|
114
|
+
const tabsEl = this.el.shadowRoot.querySelector('.wcs-tabs');
|
|
115
|
+
// FIXME: problem with this selector being too greedy in ff < 63
|
|
116
|
+
const tabs = this.el.shadowRoot.querySelectorAll('.wcs-tabs > wcs-tab');
|
|
117
|
+
return tabs.length !== 0
|
|
118
|
+
? tabs
|
|
119
|
+
: tabsEl.querySelector('slot')
|
|
120
|
+
? tabsEl.querySelector('slot').assignedElements()
|
|
121
|
+
: [];
|
|
122
|
+
}
|
|
123
|
+
selectTabAndEmitChangeEvent(index) {
|
|
124
|
+
this.currentActiveTabIndex = index;
|
|
125
|
+
this.emitActiveTabChange();
|
|
126
|
+
}
|
|
127
|
+
componentWillUpdate() {
|
|
128
|
+
if (!this.headersOnly) {
|
|
129
|
+
this.updateTabVisibility();
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.hideAllTabsContent();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
updateTabVisibility() {
|
|
136
|
+
this.tabs.forEach((el, idx) => {
|
|
137
|
+
if (idx !== this.currentActiveTabIndex) {
|
|
138
|
+
el.setAttribute('style', 'display: none;');
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
el.setAttribute('style', 'display: block;');
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
hideAllTabsContent() {
|
|
146
|
+
this.tabs.forEach((el) => el.setAttribute('style', 'display: none;'));
|
|
147
|
+
}
|
|
148
|
+
render() {
|
|
149
|
+
return (index.h(index.Host, null, index.h("div", { class: "wcs-tabs-headers" }, this.headers.map((header, idx) => index.h("div", { class: 'wcs-tab-header ' + (this.currentActiveTabIndex === idx ? 'active' : ''), onClick: () => this.selectTabAndEmitChangeEvent(idx), onKeyDown: evt => this.handleKeyDown(evt, idx), tabIndex: idx }, index.h("span", null, header)))), index.h("div", { class: "wcs-tabs" }, index.h("slot", { name: "wcs-tab" }))));
|
|
150
|
+
}
|
|
151
|
+
get el() { return index.getElement(this); }
|
|
152
|
+
static get watchers() { return {
|
|
153
|
+
"selectedIndex": ["selectedIndexChanged"],
|
|
154
|
+
"selectedKey": ["selectedTabkeyChanged"]
|
|
155
|
+
}; }
|
|
156
|
+
};
|
|
157
|
+
Tabs.style = tabsCss;
|
|
158
|
+
|
|
159
|
+
exports.wcs_tabs = Tabs;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3cb9d725.js');
|
|
6
|
+
const helpers = require('./helpers-6abce594.js');
|
|
7
|
+
|
|
8
|
+
const textareaCss = ":host{--wcs-textarea-icon-color:var(--wcs-text-medium);--wcs-internal-textarea-border-radius-left:var(--wcs-textarea-border-radius-left, var(--wcs-border-radius));--wcs-internal-textarea-border-radius-right:var(--wcs-textarea-border-radius-right, var(--wcs-border-radius));display:flex;flex-direction:row;width:100%;border-radius:var(--wcs-internal-textarea-border-radius-left) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-right) var(--wcs-internal-textarea-border-radius-left);background-color:var(--wcs-light);border:1px solid var(--wcs-light);background-clip:padding-box}:host ::placeholder{font-weight:400;font-style:italic}:host textarea{overflow:auto;flex:1;width:100%;box-sizing:border-box;min-height:24px;background-color:transparent;font-family:var(--wcs-font-sans-serif);color:var(--wcs-primary);font-weight:var(--wcs-font-weight-form-value) !important;border:none;padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-size:1rem;line-height:1.5}:host textarea:focus{box-shadow:none;outline:0}:host wcs-mat-icon{position:relative;margin-top:7px;margin-left:8px;margin-right:-8px}:host([disabled]) textarea{color:var(--wcs-text-disabled)}:host([state=error]){border-color:var(--wcs-red) !important}:host(:focus-within){border:solid 1px var(--wcs-primary)}:host(:focus-within) wcs-mat-icon{color:var(--wcs-primary)}";
|
|
9
|
+
|
|
10
|
+
let Textarea = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.wcsChange = index.createEvent(this, "wcsChange", 7);
|
|
14
|
+
this.wcsInput = index.createEvent(this, "wcsInput", 7);
|
|
15
|
+
this.wcsBlur = index.createEvent(this, "wcsBlur", 7);
|
|
16
|
+
this.wcsFocus = index.createEvent(this, "wcsFocus", 7);
|
|
17
|
+
this.inputId = `wcs-textarea-${textareaIds++}`;
|
|
18
|
+
this.didBlurAfterEdit = false;
|
|
19
|
+
this.inheritedAttributes = {};
|
|
20
|
+
/**
|
|
21
|
+
* This is required for a WebKit bug which requires us to
|
|
22
|
+
* blur and focus an input to properly focus the input in
|
|
23
|
+
* an item with delegatesFocus. It will no longer be needed
|
|
24
|
+
* with iOS 14.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
this.fireFocusEvents = true;
|
|
29
|
+
this.hasFocus = false;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
32
|
+
*/
|
|
33
|
+
this.autocapitalize = 'none';
|
|
34
|
+
/**
|
|
35
|
+
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
|
36
|
+
*/
|
|
37
|
+
this.autofocus = false;
|
|
38
|
+
/**
|
|
39
|
+
* If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
|
|
40
|
+
*/
|
|
41
|
+
this.clearOnEdit = false;
|
|
42
|
+
/**
|
|
43
|
+
* Set the amount of time, in milliseconds, to wait to trigger the `wcsChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
|
44
|
+
*/
|
|
45
|
+
this.debounce = 0;
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, the user cannot interact with the textarea.
|
|
48
|
+
*/
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
/**
|
|
51
|
+
* The name of the control, which is submitted with the form data.
|
|
52
|
+
*/
|
|
53
|
+
this.name = this.inputId;
|
|
54
|
+
/**
|
|
55
|
+
* If `true`, the user cannot modify the value.
|
|
56
|
+
*/
|
|
57
|
+
this.readonly = false;
|
|
58
|
+
/**
|
|
59
|
+
* If `true`, the user must fill in a value before submitting a form.
|
|
60
|
+
*/
|
|
61
|
+
this.required = false;
|
|
62
|
+
/**
|
|
63
|
+
* If `true`, the element will have its spelling and grammar checked.
|
|
64
|
+
*/
|
|
65
|
+
this.spellcheck = false;
|
|
66
|
+
/**
|
|
67
|
+
* Specifies the state of the input. By default the input is in an initial state but you can set it to 'error' state if the data given by the user is not valid.
|
|
68
|
+
*/
|
|
69
|
+
this.state = 'initial';
|
|
70
|
+
/**
|
|
71
|
+
* If `true`, the element height will increase based on the value.
|
|
72
|
+
*/
|
|
73
|
+
this.autoGrow = false;
|
|
74
|
+
/**
|
|
75
|
+
* The value of the textarea.
|
|
76
|
+
*/
|
|
77
|
+
this.value = '';
|
|
78
|
+
this.onInput = (ev) => {
|
|
79
|
+
if (this.nativeInput) {
|
|
80
|
+
this.value = this.nativeInput.value;
|
|
81
|
+
}
|
|
82
|
+
this.wcsInput.emit(ev);
|
|
83
|
+
};
|
|
84
|
+
this.onFocus = (ev) => {
|
|
85
|
+
this.hasFocus = true;
|
|
86
|
+
this.focusChange();
|
|
87
|
+
if (this.fireFocusEvents) {
|
|
88
|
+
this.wcsFocus.emit(ev);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
this.onBlur = (ev) => {
|
|
92
|
+
this.hasFocus = false;
|
|
93
|
+
this.focusChange();
|
|
94
|
+
if (this.fireFocusEvents) {
|
|
95
|
+
this.wcsBlur.emit(ev);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
this.onKeyDown = () => {
|
|
99
|
+
this.checkClearOnEdit();
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
debounceChanged() {
|
|
103
|
+
this.wcsChange = helpers.debounceEvent(this.wcsChange, this.debounce);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Update the native input element when the value changes
|
|
107
|
+
*/
|
|
108
|
+
valueChanged() {
|
|
109
|
+
const nativeInput = this.nativeInput;
|
|
110
|
+
const value = this.getValue();
|
|
111
|
+
if (nativeInput && nativeInput.value !== value) {
|
|
112
|
+
nativeInput.value = value;
|
|
113
|
+
}
|
|
114
|
+
this.runAutoGrow();
|
|
115
|
+
this.wcsChange.emit({ value });
|
|
116
|
+
}
|
|
117
|
+
connectedCallback() {
|
|
118
|
+
this.debounceChanged();
|
|
119
|
+
{
|
|
120
|
+
document.dispatchEvent(new CustomEvent('wcsInputDidLoad', {
|
|
121
|
+
detail: this.el
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
disconnectedCallback() {
|
|
126
|
+
{
|
|
127
|
+
document.dispatchEvent(new CustomEvent('wcsInputDidUnload', {
|
|
128
|
+
detail: this.el
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
componentWillLoad() {
|
|
133
|
+
this.inheritedAttributes = helpers.inheritAttributes(this.el, ['title']);
|
|
134
|
+
}
|
|
135
|
+
componentDidLoad() {
|
|
136
|
+
helpers.raf(() => this.runAutoGrow());
|
|
137
|
+
}
|
|
138
|
+
runAutoGrow() {
|
|
139
|
+
const nativeInput = this.nativeInput;
|
|
140
|
+
if (nativeInput && this.autoGrow) {
|
|
141
|
+
index.readTask(() => {
|
|
142
|
+
nativeInput.style.height = 'auto';
|
|
143
|
+
nativeInput.style.height = nativeInput.scrollHeight + 'px';
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* This method make the textarea automatically adopt the size of the content without a scroll bar
|
|
149
|
+
*/
|
|
150
|
+
async fitContent() {
|
|
151
|
+
helpers.raf(() => this.runAutoGrow());
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Sets focus on the native `textarea` in `wcs-textarea`. Use this method instead of the global
|
|
155
|
+
* `textarea.focus()`.
|
|
156
|
+
*/
|
|
157
|
+
async setFocus() {
|
|
158
|
+
if (this.nativeInput) {
|
|
159
|
+
this.nativeInput.focus();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Sets blur on the native `textarea` in `wcs-textarea`. Use this method instead of the global
|
|
164
|
+
* `textarea.blur()`.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
async setBlur() {
|
|
168
|
+
if (this.nativeInput) {
|
|
169
|
+
this.nativeInput.blur();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Returns the native `<textarea>` element used under the hood.
|
|
174
|
+
*/
|
|
175
|
+
getInputElement() {
|
|
176
|
+
// tslint:disable-next-line:no-non-null-assertion
|
|
177
|
+
return Promise.resolve(this.nativeInput);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Check if we need to clear the text input if clearOnEdit is enabled
|
|
181
|
+
*/
|
|
182
|
+
checkClearOnEdit() {
|
|
183
|
+
if (!this.clearOnEdit) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
// Did the input value change after it was blurred and edited?
|
|
187
|
+
if (this.didBlurAfterEdit && this.hasValue()) {
|
|
188
|
+
// Clear the input
|
|
189
|
+
this.value = '';
|
|
190
|
+
}
|
|
191
|
+
// Reset the flag
|
|
192
|
+
this.didBlurAfterEdit = false;
|
|
193
|
+
}
|
|
194
|
+
focusChange() {
|
|
195
|
+
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
|
196
|
+
if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
|
|
197
|
+
this.didBlurAfterEdit = true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
hasValue() {
|
|
201
|
+
return this.getValue() !== '';
|
|
202
|
+
}
|
|
203
|
+
getValue() {
|
|
204
|
+
return this.value || '';
|
|
205
|
+
}
|
|
206
|
+
render() {
|
|
207
|
+
const value = this.getValue();
|
|
208
|
+
const labelId = this.inputId + '-lbl';
|
|
209
|
+
const label = helpers.findItemLabel(this.el);
|
|
210
|
+
if (label) {
|
|
211
|
+
label.id = labelId;
|
|
212
|
+
}
|
|
213
|
+
return (index.h(index.Host, { "aria-disabled": this.disabled ? 'true' : null }, this.icon ? (index.h("wcs-mat-icon", { icon: this.icon, size: "m" })) : null, index.h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: el => this.nativeInput = el, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value)));
|
|
214
|
+
}
|
|
215
|
+
get el() { return index.getElement(this); }
|
|
216
|
+
static get watchers() { return {
|
|
217
|
+
"debounce": ["debounceChanged"],
|
|
218
|
+
"value": ["valueChanged"]
|
|
219
|
+
}; }
|
|
220
|
+
};
|
|
221
|
+
let textareaIds = 0;
|
|
222
|
+
Textarea.style = textareaCss;
|
|
223
|
+
|
|
224
|
+
exports.wcs_textarea = Textarea;
|