wcs-core 2.5.3 → 2.8.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 +104 -5
- package/README.md +17 -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 +45 -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 +69 -3
- 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.css +8 -5
- package/dist/collection/components/modal/modal.js +5 -5
- 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 +43 -18
- package/dist/collection/components/radio-group/radio-group.css +4 -0
- 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 +41 -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 +5 -0
- 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.d.ts +1 -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 +244 -41
- package/dist/types/interfaces.d.ts +21 -0
- package/dist/types/stencil-public-runtime.d.ts +183 -182
- 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-0a103e06.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-1e16709a.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-57247184.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-6b8d2bc7.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-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-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-f46e6c3c.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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
:host {
|
|
3
2
|
display: block;
|
|
4
3
|
}
|
|
@@ -9,7 +8,7 @@
|
|
|
9
8
|
font-family: icons;
|
|
10
9
|
padding-left: var(--wcs-base-margin);
|
|
11
10
|
font-size: 0.6rem;
|
|
12
|
-
content: "
|
|
11
|
+
content: "\f107";
|
|
13
12
|
line-height: 1;
|
|
14
13
|
box-sizing: border-box;
|
|
15
14
|
}
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
}
|
|
22
21
|
:host .label-container[data-open]:after {
|
|
23
22
|
position: absolute;
|
|
24
|
-
left: calc(
|
|
23
|
+
left: calc(50% + var(--wcs-com-content-max-width) / 8 - 0.5625rem);
|
|
25
24
|
z-index: 2;
|
|
26
25
|
display: block;
|
|
27
26
|
width: 1.125rem;
|
|
@@ -32,14 +31,14 @@
|
|
|
32
31
|
}
|
|
33
32
|
:host .item-container[data-open] {
|
|
34
33
|
position: absolute;
|
|
35
|
-
left: calc(
|
|
34
|
+
left: calc(50% + var(--wcs-com-content-max-width) / 8);
|
|
36
35
|
top: 0;
|
|
37
36
|
right: 0;
|
|
38
37
|
padding: 50px 0 50px 50px;
|
|
39
38
|
background-blend-mode: multiply;
|
|
40
39
|
background-color: rgba(0, 0, 0, 0.15);
|
|
41
40
|
box-sizing: border-box;
|
|
42
|
-
height:
|
|
41
|
+
height: 100%;
|
|
43
42
|
display: flex;
|
|
44
43
|
flex-direction: column;
|
|
45
44
|
align-items: start;
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
font-family: icons;
|
|
52
51
|
padding-left: var(--wcs-base-margin);
|
|
53
52
|
font-size: 0.6rem;
|
|
54
|
-
content: "
|
|
53
|
+
content: "\f107";
|
|
55
54
|
line-height: 1;
|
|
56
55
|
box-sizing: border-box;
|
|
57
56
|
}
|
|
@@ -32,11 +32,22 @@ export class ComNavCategory {
|
|
|
32
32
|
evt.stopPropagation();
|
|
33
33
|
this.wcsCategoryOpened.emit({ categoryElement: this.el });
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Close the category and fire item click if we detect a mouse click on a slotted `a` element.
|
|
37
|
+
* @param evt
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
handleItemClick(evt) {
|
|
41
|
+
if (evt.target.tagName === 'A') {
|
|
42
|
+
this.close();
|
|
43
|
+
this.wcsCategoryItemClicked.emit(evt);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
35
46
|
render() {
|
|
36
47
|
return (h(Host, { onClick: evt => this.onClick(evt) },
|
|
37
48
|
h("div", { class: "label-container", "data-open": this.categoryOpen, onClick: _ => this.categoryOpen = !this.categoryOpen },
|
|
38
49
|
h("span", { class: "label" }, this.label)),
|
|
39
|
-
h("div", { class: "item-container", "data-open": this.categoryOpen },
|
|
50
|
+
h("div", { class: "item-container", "data-open": this.categoryOpen, onClick: (evt) => this.handleItemClick(evt) },
|
|
40
51
|
h("slot", null))));
|
|
41
52
|
}
|
|
42
53
|
static get is() { return "wcs-com-nav-category"; }
|
|
@@ -89,6 +100,25 @@ export class ComNavCategory {
|
|
|
89
100
|
}
|
|
90
101
|
}
|
|
91
102
|
}
|
|
103
|
+
}, {
|
|
104
|
+
"method": "wcsCategoryItemClicked",
|
|
105
|
+
"name": "wcsCategoryItemClicked",
|
|
106
|
+
"bubbles": true,
|
|
107
|
+
"cancelable": true,
|
|
108
|
+
"composed": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "MouseEvent",
|
|
115
|
+
"resolved": "MouseEvent",
|
|
116
|
+
"references": {
|
|
117
|
+
"MouseEvent": {
|
|
118
|
+
"location": "global"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
92
122
|
}]; }
|
|
93
123
|
static get methods() { return {
|
|
94
124
|
"close": {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
1
|
:host {
|
|
3
2
|
display: block;
|
|
4
3
|
height: 100%;
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
font-family: icons;
|
|
71
70
|
padding-left: var(--wcs-base-margin);
|
|
72
71
|
font-size: 0.6rem;
|
|
73
|
-
content: "
|
|
72
|
+
content: "\f107";
|
|
74
73
|
line-height: 1;
|
|
75
74
|
box-sizing: border-box;
|
|
76
75
|
}
|
|
@@ -36,6 +36,20 @@ export class ComNavSubmenu {
|
|
|
36
36
|
evt.stopPropagation();
|
|
37
37
|
this.wcsSubmenuOpened.emit({ menuElement: this.el });
|
|
38
38
|
}
|
|
39
|
+
handleMenuItemsClick(evt) {
|
|
40
|
+
if (evt.target.tagName === 'A') {
|
|
41
|
+
this.close();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* handle category item click to close the submenu
|
|
46
|
+
* @param _
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
wcsCategoryItemClickedHandler(_) {
|
|
50
|
+
// If a category item is clicked, we close the submenu drawer;
|
|
51
|
+
this.close();
|
|
52
|
+
}
|
|
39
53
|
render() {
|
|
40
54
|
return (h(Host, { onClick: evt => this.onClick(evt) },
|
|
41
55
|
h("div", { onClick: _ => this.menuOpen = !this.menuOpen, class: "menu-button" },
|
|
@@ -48,7 +62,7 @@ export class ComNavSubmenu {
|
|
|
48
62
|
h("div", null,
|
|
49
63
|
h("h3", null, this.panelTitle),
|
|
50
64
|
h("p", null, this.panelDescription)),
|
|
51
|
-
h("div", { class: "menu-items" },
|
|
65
|
+
h("div", { class: "menu-items", onClick: (evt) => this.handleMenuItemsClick(evt) },
|
|
52
66
|
h("slot", null)))))));
|
|
53
67
|
}
|
|
54
68
|
static get is() { return "wcs-com-nav-submenu"; }
|
|
@@ -183,5 +197,11 @@ export class ComNavSubmenu {
|
|
|
183
197
|
"target": "window",
|
|
184
198
|
"capture": false,
|
|
185
199
|
"passive": false
|
|
200
|
+
}, {
|
|
201
|
+
"name": "wcsCategoryItemClicked",
|
|
202
|
+
"method": "wcsCategoryItemClickedHandler",
|
|
203
|
+
"target": undefined,
|
|
204
|
+
"capture": false,
|
|
205
|
+
"passive": false
|
|
186
206
|
}]; }
|
|
187
207
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
display:
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
position: relative;
|
|
5
|
-
flex-flow: row-reverse;
|
|
2
|
+
display: flex;
|
|
6
3
|
}
|
|
7
4
|
|
|
8
5
|
wcs-button {
|
|
9
6
|
--wcs-button-padding: 8px 10px 8px 16px !important;
|
|
10
7
|
}
|
|
11
8
|
|
|
12
|
-
:host([
|
|
13
|
-
|
|
9
|
+
:host([no-arrow]) wcs-button {
|
|
10
|
+
--wcs-button-padding: 8px 16px 8px 16px !important;
|
|
14
11
|
}
|
|
12
|
+
|
|
15
13
|
:host([shape=small]) wcs-button {
|
|
16
14
|
--wcs-button-padding: 2px 10px 2px 16px !important;
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
:host([shape=small][no-arrow]) wcs-button {
|
|
18
|
+
--wcs-button-padding: 2px 16px 2px 16px !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
19
21
|
.wcs-button-content-wrapper {
|
|
20
22
|
display: flex;
|
|
21
23
|
}
|
|
@@ -24,47 +26,53 @@ wcs-button {
|
|
|
24
26
|
display: none;
|
|
25
27
|
border: 1px solid #d7d7d7;
|
|
26
28
|
border-radius: var(--wcs-border-radius);
|
|
27
|
-
|
|
29
|
+
background-color: var(--wcs-white);
|
|
30
|
+
z-index: 9999;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.show {
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.container {
|
|
38
|
+
border-radius: inherit;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
padding: calc(var(--wcs-padding) / 2) 0;
|
|
41
|
+
background-color: var(--wcs-white);
|
|
28
42
|
}
|
|
29
43
|
|
|
30
|
-
|
|
44
|
+
#arrow,
|
|
45
|
+
#arrow::before {
|
|
31
46
|
position: absolute;
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border: solid transparent;
|
|
37
|
-
z-index: 1000;
|
|
47
|
+
width: 8px;
|
|
48
|
+
height: 8px;
|
|
49
|
+
background: inherit;
|
|
50
|
+
border: solid 1px #d7d7d7;
|
|
38
51
|
}
|
|
39
52
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
right: 1.0625rem;
|
|
44
|
-
margin-left: -0.625rem;
|
|
45
|
-
bottom: 100%;
|
|
46
|
-
border-bottom-color: #d7d7d7;
|
|
53
|
+
#arrow {
|
|
54
|
+
visibility: hidden;
|
|
55
|
+
z-index: -1;
|
|
47
56
|
}
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
margin-left: -0.5625rem;
|
|
54
|
-
bottom: 100%;
|
|
55
|
-
border-bottom-color: #fff;
|
|
58
|
+
#arrow::before {
|
|
59
|
+
visibility: visible;
|
|
60
|
+
content: "";
|
|
61
|
+
transform: rotate(45deg);
|
|
56
62
|
}
|
|
57
63
|
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
display: block;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
position: absolute;
|
|
63
|
-
background-color: var(--wcs-white);
|
|
64
|
-
top: 58px;
|
|
64
|
+
.popover[data-popper-placement^=top] > #arrow {
|
|
65
|
+
bottom: -5px;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
.popover[data-popper-placement^=bottom] > #arrow {
|
|
69
|
+
top: -6px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.popover[data-popper-placement^=left] > #arrow {
|
|
73
|
+
right: -4px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.popover[data-popper-placement^=right] > #arrow {
|
|
77
|
+
left: -6px;
|
|
70
78
|
}
|
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
import { Component, Element, h, Host, Listen, Prop, State } from '@stencil/core';
|
|
1
|
+
import { Component, Element, h, Host, Listen, Prop, State, Watch } from '@stencil/core';
|
|
2
2
|
import { SelectArrow } from '../select/select-arrow';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* @example ```hmtl
|
|
7
|
-
* <wcs-dropdown>
|
|
8
|
-
* <div slot="placeholder"></div>
|
|
9
|
-
* <div slot="items">
|
|
10
|
-
* <wcs-dropdown-header></wcs-dropdown-header>
|
|
11
|
-
* <wcs-divider></wcs-divider>
|
|
12
|
-
* <wcs-dropdown-item></wcs-dropdown-item>
|
|
13
|
-
* </div>
|
|
14
|
-
* </wcs-dropdown>
|
|
15
|
-
* ```
|
|
16
|
-
* @todo Complete keyboard navigation.
|
|
17
|
-
*/
|
|
3
|
+
import { createPopper } from '@popperjs/core';
|
|
4
|
+
import { clickTargetIsElementOrChildren } from '../../utils/helpers';
|
|
18
5
|
export class Dropdown {
|
|
19
6
|
constructor() {
|
|
7
|
+
/** Hides the arrow in the button */
|
|
8
|
+
this.noArrow = false;
|
|
9
|
+
/** Dropdown's button mode */
|
|
20
10
|
this.mode = 'stroked';
|
|
11
|
+
/** Dropdown's button shape */
|
|
21
12
|
this.shape = 'normal';
|
|
13
|
+
/** Specifies whether the dropdown button is clickable or not */
|
|
22
14
|
this.disabled = false;
|
|
15
|
+
/** placement of the dropdown's popover */
|
|
16
|
+
this.placement = 'bottom-end';
|
|
23
17
|
this.expanded = false;
|
|
24
18
|
}
|
|
19
|
+
placementChange() {
|
|
20
|
+
this.popper.setOptions(Object.assign(Object.assign({}, this.popper.state.options), { placement: this.placement })).then(_ => this.popper.update());
|
|
21
|
+
}
|
|
25
22
|
componentDidLoad() {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
this.
|
|
23
|
+
const wcsButtonElement = this.el.shadowRoot.querySelector('wcs-button');
|
|
24
|
+
const buttonWrapper = wcsButtonElement.shadowRoot.querySelector('button');
|
|
25
|
+
this.buttonTextColor = window.getComputedStyle(buttonWrapper).color;
|
|
26
|
+
const popoverDiv = this.el.shadowRoot.querySelector('.popover');
|
|
27
|
+
this.popper = createPopper(wcsButtonElement, popoverDiv, {
|
|
28
|
+
placement: this.placement,
|
|
29
|
+
modifiers: [
|
|
30
|
+
{
|
|
31
|
+
name: 'offset',
|
|
32
|
+
options: {
|
|
33
|
+
offset: [0, 8]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
this.el.shadowRoot.querySelector('.arrow').style.fill = this.buttonTextColor;
|
|
29
39
|
this.fixForFirefoxBelow63();
|
|
30
40
|
}
|
|
31
41
|
fixForFirefoxBelow63() {
|
|
@@ -39,14 +49,11 @@ export class Dropdown {
|
|
|
39
49
|
});
|
|
40
50
|
}
|
|
41
51
|
}
|
|
42
|
-
onButtonClick(
|
|
43
|
-
e.stopPropagation();
|
|
52
|
+
onButtonClick(_) {
|
|
44
53
|
this.expanded = !this.expanded;
|
|
45
54
|
}
|
|
46
55
|
onWindowClickEvent(event) {
|
|
47
|
-
|
|
48
|
-
const clickedOnDropdownOrChildren = event.target instanceof Node
|
|
49
|
-
&& this.el.contains(event.target);
|
|
56
|
+
const clickedOnDropdownOrChildren = clickTargetIsElementOrChildren(event, this.el);
|
|
50
57
|
if (this.expanded && !clickedOnDropdownOrChildren) {
|
|
51
58
|
this.expanded = false;
|
|
52
59
|
}
|
|
@@ -54,13 +61,22 @@ export class Dropdown {
|
|
|
54
61
|
dropdownItemClick(_) {
|
|
55
62
|
this.expanded = false;
|
|
56
63
|
}
|
|
64
|
+
componentDidRender() {
|
|
65
|
+
if (this.popper) {
|
|
66
|
+
this.popper.update();
|
|
67
|
+
}
|
|
68
|
+
if (!this.noArrow) {
|
|
69
|
+
this.el.shadowRoot.querySelector('.arrow').style.fill = this.buttonTextColor;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
57
72
|
render() {
|
|
58
73
|
return (h(Host, null,
|
|
59
|
-
h("wcs-button", { mode: this.mode, shape: this.shape, onClick: ($event) => this.onButtonClick($event) },
|
|
74
|
+
h("wcs-button", { mode: this.mode, shape: this.shape, disabled: this.disabled, onClick: ($event) => this.onButtonClick($event) },
|
|
60
75
|
h("div", { class: "wcs-button-content-wrapper" },
|
|
61
76
|
h("slot", { name: "placeholder" }),
|
|
62
|
-
h(SelectArrow, { up: this.expanded }))),
|
|
77
|
+
this.noArrow ? null : (h(SelectArrow, { up: this.expanded })))),
|
|
63
78
|
h("div", { class: (this.expanded ? 'show ' : '') + 'popover' },
|
|
79
|
+
h("div", { id: "arrow", "data-popper-arrow": true }),
|
|
64
80
|
h("div", { class: "container" },
|
|
65
81
|
h("slot", { name: "item" })))));
|
|
66
82
|
}
|
|
@@ -73,6 +89,24 @@ export class Dropdown {
|
|
|
73
89
|
"$": ["dropdown.css"]
|
|
74
90
|
}; }
|
|
75
91
|
static get properties() { return {
|
|
92
|
+
"noArrow": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "boolean",
|
|
97
|
+
"resolved": "boolean",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Hides the arrow in the button"
|
|
105
|
+
},
|
|
106
|
+
"attribute": "no-arrow",
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"defaultValue": "false"
|
|
109
|
+
},
|
|
76
110
|
"mode": {
|
|
77
111
|
"type": "string",
|
|
78
112
|
"mutable": false,
|
|
@@ -90,7 +124,7 @@ export class Dropdown {
|
|
|
90
124
|
"optional": false,
|
|
91
125
|
"docs": {
|
|
92
126
|
"tags": [],
|
|
93
|
-
"text": ""
|
|
127
|
+
"text": "Dropdown's button mode"
|
|
94
128
|
},
|
|
95
129
|
"attribute": "mode",
|
|
96
130
|
"reflect": false,
|
|
@@ -113,7 +147,7 @@ export class Dropdown {
|
|
|
113
147
|
"optional": false,
|
|
114
148
|
"docs": {
|
|
115
149
|
"tags": [],
|
|
116
|
-
"text": ""
|
|
150
|
+
"text": "Dropdown's button shape"
|
|
117
151
|
},
|
|
118
152
|
"attribute": "shape",
|
|
119
153
|
"reflect": false,
|
|
@@ -131,17 +165,44 @@ export class Dropdown {
|
|
|
131
165
|
"optional": false,
|
|
132
166
|
"docs": {
|
|
133
167
|
"tags": [],
|
|
134
|
-
"text": ""
|
|
168
|
+
"text": "Specifies whether the dropdown button is clickable or not"
|
|
135
169
|
},
|
|
136
170
|
"attribute": "disabled",
|
|
137
171
|
"reflect": false,
|
|
138
172
|
"defaultValue": "false"
|
|
173
|
+
},
|
|
174
|
+
"placement": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "WcsDropdownPlacement",
|
|
179
|
+
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
180
|
+
"references": {
|
|
181
|
+
"WcsDropdownPlacement": {
|
|
182
|
+
"location": "import",
|
|
183
|
+
"path": "./dropdown-interface"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": false,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "placement of the dropdown's popover"
|
|
192
|
+
},
|
|
193
|
+
"attribute": "placement",
|
|
194
|
+
"reflect": false,
|
|
195
|
+
"defaultValue": "'bottom-end'"
|
|
139
196
|
}
|
|
140
197
|
}; }
|
|
141
198
|
static get states() { return {
|
|
142
199
|
"expanded": {}
|
|
143
200
|
}; }
|
|
144
201
|
static get elementRef() { return "el"; }
|
|
202
|
+
static get watchers() { return [{
|
|
203
|
+
"propName": "placement",
|
|
204
|
+
"methodName": "placementChange"
|
|
205
|
+
}]; }
|
|
145
206
|
static get listeners() { return [{
|
|
146
207
|
"name": "click",
|
|
147
208
|
"method": "onWindowClickEvent",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, h, Host } from '@stencil/core';
|
|
2
|
+
export class DropdownDivider {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { slot: "item" }));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "wcs-dropdown-divider"; }
|
|
7
|
+
static get encapsulation() { return "shadow"; }
|
|
8
|
+
static get originalStyleUrls() { return {
|
|
9
|
+
"$": ["dropdown-divider.scss"]
|
|
10
|
+
}; }
|
|
11
|
+
static get styleUrls() { return {
|
|
12
|
+
"$": ["dropdown-divider.css"]
|
|
13
|
+
}; }
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, h, Host } from '@stencil/core';
|
|
2
|
+
export class DropdownHeader {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { slot: "item" },
|
|
5
|
+
h("slot", null)));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "wcs-dropdown-header"; }
|
|
8
|
+
static get encapsulation() { return "shadow"; }
|
|
9
|
+
static get originalStyleUrls() { return {
|
|
10
|
+
"$": ["dropdown-header.scss"]
|
|
11
|
+
}; }
|
|
12
|
+
static get styleUrls() { return {
|
|
13
|
+
"$": ["dropdown-header.css"]
|
|
14
|
+
}; }
|
|
15
|
+
}
|
|
@@ -233,9 +233,14 @@ export class EditableField {
|
|
|
233
233
|
"type": "string",
|
|
234
234
|
"mutable": false,
|
|
235
235
|
"complexType": {
|
|
236
|
-
"original": "
|
|
236
|
+
"original": "EditableFieldType",
|
|
237
237
|
"resolved": "\"input\" | \"select\" | \"textarea\"",
|
|
238
|
-
"references": {
|
|
238
|
+
"references": {
|
|
239
|
+
"EditableFieldType": {
|
|
240
|
+
"location": "import",
|
|
241
|
+
"path": "./editable-field-interface"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
239
244
|
},
|
|
240
245
|
"required": false,
|
|
241
246
|
"optional": false,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
--wcs-form-field-icon-color: var(--wcs-text-medium);
|
|
3
2
|
--wcs-form-field-border-radius-left: var(--wcs-border-radius);
|
|
4
3
|
--wcs-form-field-border-radius-right: var(--wcs-border-radius);
|
|
5
|
-
display:
|
|
4
|
+
display: flex;
|
|
6
5
|
flex-direction: column;
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -143,23 +143,6 @@ export class FormField {
|
|
|
143
143
|
"attribute": "is-error",
|
|
144
144
|
"reflect": true,
|
|
145
145
|
"defaultValue": "false"
|
|
146
|
-
},
|
|
147
|
-
"icon": {
|
|
148
|
-
"type": "any",
|
|
149
|
-
"mutable": false,
|
|
150
|
-
"complexType": {
|
|
151
|
-
"original": "any",
|
|
152
|
-
"resolved": "any",
|
|
153
|
-
"references": {}
|
|
154
|
-
},
|
|
155
|
-
"required": false,
|
|
156
|
-
"optional": false,
|
|
157
|
-
"docs": {
|
|
158
|
-
"tags": [],
|
|
159
|
-
"text": "Name of the material icon to add to the field"
|
|
160
|
-
},
|
|
161
|
-
"attribute": "icon",
|
|
162
|
-
"reflect": false
|
|
163
146
|
}
|
|
164
147
|
}; }
|
|
165
148
|
static get states() { return {
|