@watermarkinsights/ripple 5.16.0-alpha.5 → 5.16.0-alpha.6
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/{app-globals-409642c7.js → app-globals-9c7ce1fb.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/priv-navigator-button.cjs.entry.js +1 -1
- package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +2 -2
- package/dist/cjs/wm-button.cjs.entry.js +1 -1
- package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +12 -6
- package/dist/cjs/wm-file-list.cjs.entry.js +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +1 -1
- package/dist/cjs/wm-flyout.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +8 -2
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +4 -4
- package/dist/cjs/wm-modal_3.cjs.entry.js +4 -4
- package/dist/cjs/wm-navigation_3.cjs.entry.js +4 -4
- package/dist/cjs/wm-nested-select.cjs.entry.js +10 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +9 -3
- package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wm-search.cjs.entry.js +2 -2
- package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +3 -3
- package/dist/cjs/wm-tag-input.cjs.entry.js +10 -4
- package/dist/cjs/wm-textarea.cjs.entry.js +8 -2
- package/dist/cjs/wm-timepicker.cjs.entry.js +9 -3
- package/dist/cjs/wm-toggletip.cjs.entry.js +2 -2
- package/dist/cjs/wm-uploader.cjs.entry.js +4 -4
- package/dist/collection/components/datepickers/datepicker.css +15 -9
- package/dist/collection/components/datepickers/wm-datepicker.js +12 -6
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +15 -9
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +10 -4
- package/dist/collection/components/selects/wm-select/wm-select.css +15 -9
- package/dist/collection/components/selects/wm-select/wm-select.js +9 -3
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-flyout/wm-flyout.js +1 -1
- package/dist/collection/components/wm-input/wm-input.css +15 -9
- package/dist/collection/components/wm-input/wm-input.js +8 -2
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +15 -9
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +9 -3
- package/dist/collection/components/wm-textarea/wm-textarea.css +15 -9
- package/dist/collection/components/wm-textarea/wm-textarea.js +8 -2
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +15 -9
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +9 -3
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.css +15 -9
- package/dist/collection/components/wm-uploader/wm-uploader.js +3 -3
- package/dist/esm/{app-globals-1fe6cb7f.js → app-globals-e4bb1a1f.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/priv-navigator-button.entry.js +1 -1
- package/dist/esm/priv-navigator-item.entry.js +1 -1
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-action-menu_2.entry.js +2 -2
- package/dist/esm/wm-button.entry.js +1 -1
- package/dist/esm/wm-date-range.entry.js +1 -1
- package/dist/esm/wm-datepicker.entry.js +13 -7
- package/dist/esm/wm-file-list.entry.js +1 -1
- package/dist/esm/wm-file.entry.js +1 -1
- package/dist/esm/wm-flyout.entry.js +1 -1
- package/dist/esm/wm-input.entry.js +9 -3
- package/dist/esm/wm-modal-pss_3.entry.js +4 -4
- package/dist/esm/wm-modal_3.entry.js +4 -4
- package/dist/esm/wm-navigation_3.entry.js +4 -4
- package/dist/esm/wm-nested-select.entry.js +11 -5
- package/dist/esm/wm-option_2.entry.js +10 -4
- package/dist/esm/wm-pagination.entry.js +1 -1
- package/dist/esm/wm-search.entry.js +2 -2
- package/dist/esm/wm-snackbar.entry.js +2 -2
- package/dist/esm/wm-tab-item_3.entry.js +3 -3
- package/dist/esm/wm-tag-input.entry.js +10 -4
- package/dist/esm/wm-textarea.entry.js +9 -3
- package/dist/esm/wm-timepicker.entry.js +10 -4
- package/dist/esm/wm-toggletip.entry.js +2 -2
- package/dist/esm/wm-uploader.entry.js +4 -4
- package/dist/esm-es5/{app-globals-1fe6cb7f.js → app-globals-e4bb1a1f.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-flyout.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
- package/dist/esm-es5/wm-modal_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/ripple/{p-0bb576c5.system.entry.js → p-0af5c1e8.system.entry.js} +1 -1
- package/dist/ripple/{p-2f7ca1a7.system.entry.js → p-0f9592c5.system.entry.js} +1 -1
- package/dist/ripple/{p-2f2ba62b.system.entry.js → p-14751332.system.entry.js} +1 -1
- package/dist/ripple/{p-bd48c50a.entry.js → p-176dd9b5.entry.js} +1 -1
- package/dist/ripple/{p-8ec2e944.system.entry.js → p-17d94094.system.entry.js} +1 -1
- package/dist/ripple/{p-c699aec8.system.entry.js → p-198f0ef2.system.entry.js} +1 -1
- package/dist/ripple/{p-22b55b6f.entry.js → p-1e92012c.entry.js} +1 -1
- package/dist/ripple/{p-bc4976e6.entry.js → p-1f5856ac.system.entry.js} +1 -1
- package/dist/ripple/{p-b34552b0.system.entry.js → p-2adde5b2.system.entry.js} +1 -1
- package/dist/ripple/{p-f9fa1506.system.entry.js → p-324aed64.system.entry.js} +1 -1
- package/dist/ripple/{p-b01f9572.system.entry.js → p-34808b52.system.entry.js} +1 -1
- package/dist/ripple/{p-8f987f71.entry.js → p-44a95d6d.entry.js} +1 -1
- package/dist/ripple/p-46c36aa8.system.entry.js +1 -0
- package/dist/ripple/p-47ba4aa8.system.entry.js +1 -0
- package/dist/ripple/{p-b39ab477.entry.js → p-4e01d719.entry.js} +1 -1
- package/dist/ripple/{p-fe93b6b9.system.entry.js → p-5a5d5833.system.entry.js} +1 -1
- package/dist/ripple/{p-6a082957.entry.js → p-5b56e874.entry.js} +1 -1
- package/dist/ripple/{p-8a569d3b.entry.js → p-62ed69c0.entry.js} +1 -1
- package/dist/ripple/p-64616362.system.entry.js +1 -0
- package/dist/ripple/{p-36fd8aed.system.entry.js → p-67ba6533.system.entry.js} +1 -1
- package/dist/ripple/{p-97ffaa7d.entry.js → p-6b4e1fe9.entry.js} +1 -1
- package/dist/ripple/{p-c4896784.system.entry.js → p-7300282d.system.entry.js} +1 -1
- package/dist/ripple/{p-4a29bb8c.entry.js → p-731f5721.entry.js} +1 -1
- package/dist/ripple/p-764a08fb.entry.js +1 -0
- package/dist/ripple/{p-9328023c.entry.js → p-76aef56f.entry.js} +1 -1
- package/dist/ripple/p-76d7a58b.entry.js +1 -0
- package/dist/ripple/{p-f8995a5e.system.entry.js → p-7b6cd418.system.entry.js} +1 -1
- package/dist/ripple/{p-3ae8153c.system.js → p-86066976.system.js} +1 -1
- package/dist/ripple/{p-30236be3.system.entry.js → p-86ac8ff7.system.entry.js} +1 -1
- package/dist/ripple/{p-4fb4deb9.entry.js → p-8c33cb29.entry.js} +1 -1
- package/dist/ripple/{p-94f776eb.entry.js → p-9672ada1.entry.js} +1 -1
- package/dist/ripple/{p-2823d02b.system.entry.js → p-9ea37550.system.entry.js} +1 -1
- package/dist/ripple/{p-61f9987d.system.entry.js → p-ad0fcb42.system.entry.js} +1 -1
- package/dist/ripple/{p-0e4d663a.js → p-ad908c29.js} +1 -1
- package/dist/ripple/{p-72ed488e.system.entry.js → p-b00c4904.system.entry.js} +1 -1
- package/dist/ripple/{p-5ef786db.system.entry.js → p-ba4f9ec6.system.entry.js} +1 -1
- package/dist/ripple/p-c02c1b9c.entry.js +1 -0
- package/dist/ripple/{p-57c25b63.entry.js → p-c2e1f0bb.entry.js} +1 -1
- package/dist/ripple/p-c6b8cf27.entry.js +1 -0
- package/dist/ripple/{p-fc6eeb8f.system.js → p-cd1e47e2.system.js} +1 -1
- package/dist/ripple/{p-091fbc50.system.entry.js → p-ce1cffe9.system.entry.js} +1 -1
- package/dist/ripple/{p-0189929d.entry.js → p-cfdb8451.entry.js} +1 -1
- package/dist/ripple/{p-74f103dd.entry.js → p-d1f3e879.entry.js} +1 -1
- package/dist/ripple/p-d67c99d9.entry.js +1 -0
- package/dist/ripple/{p-59591401.entry.js → p-d725d3cb.entry.js} +1 -1
- package/dist/ripple/p-d81beb53.entry.js +1 -0
- package/dist/ripple/{p-a5fb4171.system.entry.js → p-da2d993b.entry.js} +1 -1
- package/dist/ripple/{p-9b2281e2.system.entry.js → p-e1fe79f3.system.entry.js} +1 -1
- package/dist/ripple/{p-c7d71181.system.entry.js → p-ec3db1e4.system.entry.js} +1 -1
- package/dist/ripple/{p-30201dc9.entry.js → p-f6f07b48.entry.js} +1 -1
- package/dist/ripple/p-ffb5b71e.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/datepickers/wm-datepicker.d.ts +1 -0
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +1 -0
- package/dist/types/components/selects/wm-select/wm-select.d.ts +1 -0
- package/dist/types/components/wm-input/wm-input.d.ts +1 -0
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +1 -0
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +1 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +1 -0
- package/package.json +2 -2
- package/dist/ripple/p-0c89b82c.entry.js +0 -1
- package/dist/ripple/p-144ce232.entry.js +0 -1
- package/dist/ripple/p-1497ccfc.entry.js +0 -1
- package/dist/ripple/p-1a5a0cd6.entry.js +0 -1
- package/dist/ripple/p-257d2d5c.entry.js +0 -1
- package/dist/ripple/p-36d2b888.entry.js +0 -1
- package/dist/ripple/p-492aa9fe.system.entry.js +0 -1
- package/dist/ripple/p-56d54fe6.system.entry.js +0 -1
- package/dist/ripple/p-5cff41e0.entry.js +0 -1
- package/dist/ripple/p-6d12cfb7.system.entry.js +0 -1
|
@@ -892,21 +892,28 @@
|
|
|
892
892
|
flex-direction: column;
|
|
893
893
|
font-size: 0.875rem;
|
|
894
894
|
}
|
|
895
|
+
:host .wrapper .label-wrapper {
|
|
896
|
+
display: flex;
|
|
897
|
+
}
|
|
895
898
|
:host .wrapper .label {
|
|
896
|
-
display: block;
|
|
899
|
+
display: inline-block;
|
|
897
900
|
line-height: normal;
|
|
898
901
|
font-weight: 600;
|
|
899
902
|
white-space: nowrap;
|
|
903
|
+
overflow: hidden;
|
|
904
|
+
text-overflow: ellipsis;
|
|
900
905
|
margin-bottom: 0.25rem;
|
|
901
906
|
}
|
|
902
|
-
:host .wrapper .
|
|
907
|
+
:host .wrapper .required {
|
|
908
|
+
display: inline-block;
|
|
903
909
|
color: var(--wmcolor-text-required);
|
|
904
910
|
}
|
|
905
911
|
:host .wrapper.label-left {
|
|
906
912
|
flex-direction: row;
|
|
907
913
|
}
|
|
908
914
|
:host .wrapper.label-left .label-wrapper {
|
|
909
|
-
|
|
915
|
+
height: fit-content;
|
|
916
|
+
margin-right: 0.75rem;
|
|
910
917
|
}
|
|
911
918
|
:host .wrapper.label-left .label-wrapper .label {
|
|
912
919
|
display: flex;
|
|
@@ -914,7 +921,6 @@
|
|
|
914
921
|
min-height: 2.5rem;
|
|
915
922
|
white-space: normal;
|
|
916
923
|
margin-bottom: 0;
|
|
917
|
-
margin-right: 0.75rem;
|
|
918
924
|
}
|
|
919
925
|
:host .wrapper.label-none label {
|
|
920
926
|
position: absolute !important;
|
|
@@ -928,11 +934,11 @@
|
|
|
928
934
|
white-space: nowrap !important;
|
|
929
935
|
margin: -1px !important;
|
|
930
936
|
}
|
|
931
|
-
:host .wrapper.invalid .label {
|
|
937
|
+
:host .wrapper.invalid .label-wrapper {
|
|
932
938
|
color: var(--wmcolor-text-error);
|
|
933
939
|
position: relative;
|
|
934
940
|
}
|
|
935
|
-
:host .wrapper.invalid .label:after {
|
|
941
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
936
942
|
content: "";
|
|
937
943
|
display: block;
|
|
938
944
|
background-color: var(--icon-fill, currentColor);
|
|
@@ -941,14 +947,14 @@
|
|
|
941
947
|
-webkit-mask-size: 100%;
|
|
942
948
|
mask-size: 100%;
|
|
943
949
|
}
|
|
944
|
-
:host .wrapper.invalid .label:after {
|
|
950
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
945
951
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
946
952
|
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
947
953
|
}
|
|
948
|
-
:host .wrapper.invalid .label:after {
|
|
954
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
949
955
|
display: inline-block;
|
|
950
956
|
margin-inline-start: 0.25rem;
|
|
951
|
-
|
|
957
|
+
align-self: center;
|
|
952
958
|
flex-shrink: 0;
|
|
953
959
|
transform: translateY(-1px);
|
|
954
960
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { intl, toBool, handleDisabledAttribute, hasRoomRight, shouldOpenUp, dateToISO } from "../../global/functions";
|
|
2
|
+
import { intl, toBool, handleDisabledAttribute, hasRoomRight, shouldOpenUp, dateToISO, showTooltip, hideTooltip } from "../../global/functions";
|
|
3
3
|
export class DatePicker {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.openUp = false;
|
|
@@ -97,6 +97,12 @@ export class DatePicker {
|
|
|
97
97
|
const event = new CustomEvent("change");
|
|
98
98
|
this.el.dispatchEvent(event);
|
|
99
99
|
}
|
|
100
|
+
handleLabelMouseEnter(ev) {
|
|
101
|
+
const labelEl = ev.target;
|
|
102
|
+
if (labelEl.scrollWidth > labelEl.clientWidth) {
|
|
103
|
+
showTooltip("right", ev.target, this.label);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
100
106
|
handleKey(ev) {
|
|
101
107
|
if (ev.key === "Escape" && this.isExpanded) {
|
|
102
108
|
ev.preventDefault();
|
|
@@ -212,23 +218,23 @@ export class DatePicker {
|
|
|
212
218
|
this.liveRegionEl.textContent = message;
|
|
213
219
|
}
|
|
214
220
|
render() {
|
|
215
|
-
return (h(Host, { key: '
|
|
221
|
+
return (h(Host, { key: 'a39778334c75f23ba1899c09be30532159690702', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '6ee4980b6e71aee501d915f3c4dbbb3fbaf22734', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'a3d835b3dbb22d46ad8b0bf4fb99c37655294739', class: "label-wrapper", ref: (e) => (this.labelWrapperEl = e) }, this.labelPosition !== "none" && (h("label", { key: '9a103f811a1cc1aec926e226bd5d74025a9722b7', id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})`, onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '670aee88b2b537798b586adc7514bd707292ef30', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: '5df7831267c9cc092485cdace4b6e0cf635aa436' }, h("div", { key: 'c1b475da0779513a06ef7c38dcfbde9a63fcfa55', class: "single-wrapper input" }, h("input", { key: '51f641e88d0a25894cb9b33c7bf5c0ba720a4767', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'b319f80dc709f9e9521adbbf3d5031d918d095d2', class: "container", id: "wm-container" }, h("button", { key: '0db3bd1fcce0f0633959eeadc5d7571bcbce45d2', disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-label": intl.formatMessage({
|
|
216
222
|
id: "date.selectDate",
|
|
217
223
|
defaultMessage: "Select date",
|
|
218
224
|
description: "Button text for screen readers.",
|
|
219
|
-
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { key: '
|
|
225
|
+
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { key: '4d8d16c3ea0974d6481f7fa3b4ad39de90f6dce9', class: "svg-icon svg-date" }), h("span", { key: '37f0b3146399bb1935445fe0f2f153dc87a77aa8', class: "calendar", title: intl.formatMessage({
|
|
220
226
|
id: "date.calendarView",
|
|
221
227
|
defaultMessage: "Calendar View",
|
|
222
228
|
description: "Calendar button",
|
|
223
|
-
}) })), h("div", { key: '
|
|
229
|
+
}) })), h("div", { key: 'f89faa98af2d531bf0f24446ad25b57b209b37ed', class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.openUp ? "expand-upwards" : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), onClick: () => (this.popupClicked = true) }, h("div", { key: 'c77b6b59dd6e9920b6c34e13d87dd103d4410c33', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { key: '97bf11cc5619baaf7f673f5889e70a3f021f42fa', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { key: 'a78912a544b826d5c32ed29979ee01c1354c8151', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { key: '6c2e4c630b6e90d721eb5c37bf09be1ec3edac02', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '28049bae95cbebe75888cc5c13c2886a0da11918', id: "month-title", class: "sr-only" }, intl.formatMessage({
|
|
224
230
|
id: "date.selectMonth",
|
|
225
231
|
defaultMessage: "Activate to select a month.",
|
|
226
232
|
description: "Calendar button",
|
|
227
|
-
})), h("div", { key: '
|
|
233
|
+
})), h("div", { key: 'e018b23145de450cb77fade79734c714ea78d06c', id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
228
234
|
id: "date.selectYear",
|
|
229
235
|
defaultMessage: "Activate to select a year.",
|
|
230
236
|
description: "Calendar button",
|
|
231
|
-
})))), h("div", { key: '
|
|
237
|
+
})))), h("div", { key: '88a57912e4573d3b76bdbc108bb77c680b30422d', id: "error", class: "error" }, this.errorMessage), h("div", { key: '665e1a5e3a697d34a8e102baf101a137647a4584', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
232
238
|
}
|
|
233
239
|
static get is() { return "wm-datepicker"; }
|
|
234
240
|
static get encapsulation() { return "shadow"; }
|
|
@@ -879,21 +879,28 @@
|
|
|
879
879
|
flex-direction: column;
|
|
880
880
|
font-size: 0.875rem;
|
|
881
881
|
}
|
|
882
|
+
.wrapper .label-wrapper {
|
|
883
|
+
display: flex;
|
|
884
|
+
}
|
|
882
885
|
.wrapper .label {
|
|
883
|
-
display: block;
|
|
886
|
+
display: inline-block;
|
|
884
887
|
line-height: normal;
|
|
885
888
|
font-weight: 600;
|
|
886
889
|
white-space: nowrap;
|
|
890
|
+
overflow: hidden;
|
|
891
|
+
text-overflow: ellipsis;
|
|
887
892
|
margin-bottom: 0.25rem;
|
|
888
893
|
}
|
|
889
|
-
.wrapper .
|
|
894
|
+
.wrapper .required {
|
|
895
|
+
display: inline-block;
|
|
890
896
|
color: var(--wmcolor-text-required);
|
|
891
897
|
}
|
|
892
898
|
.wrapper.label-left {
|
|
893
899
|
flex-direction: row;
|
|
894
900
|
}
|
|
895
901
|
.wrapper.label-left .label-wrapper {
|
|
896
|
-
|
|
902
|
+
height: fit-content;
|
|
903
|
+
margin-right: 0.75rem;
|
|
897
904
|
}
|
|
898
905
|
.wrapper.label-left .label-wrapper .label {
|
|
899
906
|
display: flex;
|
|
@@ -901,7 +908,6 @@
|
|
|
901
908
|
min-height: 2.5rem;
|
|
902
909
|
white-space: normal;
|
|
903
910
|
margin-bottom: 0;
|
|
904
|
-
margin-right: 0.75rem;
|
|
905
911
|
}
|
|
906
912
|
.wrapper.label-none label {
|
|
907
913
|
position: absolute !important;
|
|
@@ -915,11 +921,11 @@
|
|
|
915
921
|
white-space: nowrap !important;
|
|
916
922
|
margin: -1px !important;
|
|
917
923
|
}
|
|
918
|
-
.wrapper.invalid .label {
|
|
924
|
+
.wrapper.invalid .label-wrapper {
|
|
919
925
|
color: var(--wmcolor-text-error);
|
|
920
926
|
position: relative;
|
|
921
927
|
}
|
|
922
|
-
.wrapper.invalid .label:after {
|
|
928
|
+
.wrapper.invalid .label-wrapper:after {
|
|
923
929
|
content: "";
|
|
924
930
|
display: block;
|
|
925
931
|
background-color: var(--icon-fill, currentColor);
|
|
@@ -928,14 +934,14 @@
|
|
|
928
934
|
-webkit-mask-size: 100%;
|
|
929
935
|
mask-size: 100%;
|
|
930
936
|
}
|
|
931
|
-
.wrapper.invalid .label:after {
|
|
937
|
+
.wrapper.invalid .label-wrapper:after {
|
|
932
938
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
933
939
|
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
934
940
|
}
|
|
935
|
-
.wrapper.invalid .label:after {
|
|
941
|
+
.wrapper.invalid .label-wrapper:after {
|
|
936
942
|
display: inline-block;
|
|
937
943
|
margin-inline-start: 0.25rem;
|
|
938
|
-
|
|
944
|
+
align-self: center;
|
|
939
945
|
flex-shrink: 0;
|
|
940
946
|
transform: translateY(-1px);
|
|
941
947
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host, forceUpdate } from "@stencil/core";
|
|
2
|
-
import { getContextMeasurements, getTextDir, isElOrChild, shouldOpenUp, toBool } from "../../../global/functions";
|
|
2
|
+
import { getContextMeasurements, getTextDir, isElOrChild, shouldOpenUp, toBool, showTooltip, hideTooltip } from "../../../global/functions";
|
|
3
3
|
import { globalMessages, selectMessages } from "../../../global/intl";
|
|
4
4
|
export class NestedSelect {
|
|
5
5
|
constructor() {
|
|
@@ -217,6 +217,12 @@ export class NestedSelect {
|
|
|
217
217
|
this.wmNestedSelectBlurred.emit();
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
+
handleLabelMouseEnter(ev) {
|
|
221
|
+
const labelEl = ev.target;
|
|
222
|
+
if (labelEl.scrollWidth > labelEl.clientWidth) {
|
|
223
|
+
showTooltip("right", ev.target, this.label);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
220
226
|
handleOptgroupExpanded() {
|
|
221
227
|
this.menuEl.classList.add("hidden");
|
|
222
228
|
this.optListWrapperEl.classList.remove("hidden");
|
|
@@ -286,16 +292,16 @@ export class NestedSelect {
|
|
|
286
292
|
this.isExpanded ? this.close() : this.open();
|
|
287
293
|
},
|
|
288
294
|
};
|
|
289
|
-
return (h(Host, { key: '
|
|
295
|
+
return (h(Host, { key: '5f959093568bc000490f93b887bc0c6cea467c39', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'a83e7570a7cfeb417728d4e94cadcd7b44c4a52c', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '880400f61bc3c1ab3bcbc3bb2d414f05af37c20b', class: "label-wrapper" }, h("label", { key: '776e280c3535923d6c39d4d345c50d2b552b25e6', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
|
|
290
296
|
// we can't use aria-required because the listbox is in a sub-component and it is not announced
|
|
291
|
-
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))
|
|
297
|
+
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : ("")), h("div", { key: 'e9d9fba2781c3c0abf101d4027c3f48e585dcdb4', class: "button-wrapper" }, h("button", Object.assign({ key: 'c40510c5476a961a5ec60e8f6cf1eb8fb68e236d' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { key: '466733e138ca9162ca35cc145ac2b15600d9a381', class: "overflowcontrol" }, h("span", { key: 'b4e2134d076ab22c5baaa87f8fbe5bb022ee822f', class: "button-text" }, this.renderButtonText())), h("div", { key: '05b13a8f7aef21c663f408d48488843fa8da8be9', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '16d82a9457d895a592890d874f8dc7245478fb73', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '4b0375b2acef34d7607c3fa23d741843d3005017', class: `dropdown ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { key: '52ecc936ebdb87eae9bb2de5551c075bc75bb2fc', ref: (el) => (this.menuEl = el), class: "menu", style: { "--max-height": this.constrainedMaxHeight }, tabIndex: -1 }, this.renderClearSelectionButton(), this.optgroupEls.map((optgroupEl) => {
|
|
292
298
|
return (h("button", { class: `menuitem group-btn ${optgroupEl.disabled ? "disabled" : ""}`, role: "menuitem", "data-label": optgroupEl.label, tabindex: -1, "aria-disabled": optgroupEl.disabled, onClick: () => {
|
|
293
299
|
if (!optgroupEl.disabled) {
|
|
294
300
|
optgroupEl.isExpanded = !optgroupEl.isExpanded;
|
|
295
301
|
forceUpdate(this.el);
|
|
296
302
|
}
|
|
297
303
|
}, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, h("div", { class: "option-text" }, h("span", null, optgroupEl.label), this.renderSelectionCount(optgroupEl), optgroupEl.disabled && h("div", { class: "disabled-indication" }, "Disabled")), h("div", { class: "svg-icon svg-next" })));
|
|
298
|
-
})), h("div", { key: '
|
|
304
|
+
})), h("div", { key: '3861f21a5798af5cabbcdc37dd06b41db59a450f', ref: (el) => (this.optListWrapperEl = el), class: "option-list-wrapper hidden" }, h("slot", { key: '1e9c15552d06669d790b8490d84da4855a0c841d' }))), h("div", { key: 'ca12e1f32d3d8e57bc562538d3959d7fc8f78575', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage))), h("div", { key: 'd9d2aa31d14f78158a69aadb981df4063dcc9c82', id: "nestedselect-announcement", "aria-live": "assertive", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
|
|
299
305
|
}
|
|
300
306
|
static get is() { return "wm-nested-select"; }
|
|
301
307
|
static get encapsulation() { return "shadow"; }
|
|
@@ -891,21 +891,28 @@
|
|
|
891
891
|
flex-direction: column;
|
|
892
892
|
font-size: 0.875rem;
|
|
893
893
|
}
|
|
894
|
+
.wrapper .label-wrapper {
|
|
895
|
+
display: flex;
|
|
896
|
+
}
|
|
894
897
|
.wrapper .label {
|
|
895
|
-
display: block;
|
|
898
|
+
display: inline-block;
|
|
896
899
|
line-height: normal;
|
|
897
900
|
font-weight: 600;
|
|
898
901
|
white-space: nowrap;
|
|
902
|
+
overflow: hidden;
|
|
903
|
+
text-overflow: ellipsis;
|
|
899
904
|
margin-bottom: 0.25rem;
|
|
900
905
|
}
|
|
901
|
-
.wrapper .
|
|
906
|
+
.wrapper .required {
|
|
907
|
+
display: inline-block;
|
|
902
908
|
color: var(--wmcolor-text-required);
|
|
903
909
|
}
|
|
904
910
|
.wrapper.label-left {
|
|
905
911
|
flex-direction: row;
|
|
906
912
|
}
|
|
907
913
|
.wrapper.label-left .label-wrapper {
|
|
908
|
-
|
|
914
|
+
height: fit-content;
|
|
915
|
+
margin-right: 0.75rem;
|
|
909
916
|
}
|
|
910
917
|
.wrapper.label-left .label-wrapper .label {
|
|
911
918
|
display: flex;
|
|
@@ -913,7 +920,6 @@
|
|
|
913
920
|
min-height: 2.5rem;
|
|
914
921
|
white-space: normal;
|
|
915
922
|
margin-bottom: 0;
|
|
916
|
-
margin-right: 0.75rem;
|
|
917
923
|
}
|
|
918
924
|
.wrapper.label-none label {
|
|
919
925
|
position: absolute !important;
|
|
@@ -927,11 +933,11 @@
|
|
|
927
933
|
white-space: nowrap !important;
|
|
928
934
|
margin: -1px !important;
|
|
929
935
|
}
|
|
930
|
-
.wrapper.invalid .label {
|
|
936
|
+
.wrapper.invalid .label-wrapper {
|
|
931
937
|
color: var(--wmcolor-text-error);
|
|
932
938
|
position: relative;
|
|
933
939
|
}
|
|
934
|
-
.wrapper.invalid .label:after {
|
|
940
|
+
.wrapper.invalid .label-wrapper:after {
|
|
935
941
|
content: "";
|
|
936
942
|
display: block;
|
|
937
943
|
background-color: var(--icon-fill, currentColor);
|
|
@@ -940,14 +946,14 @@
|
|
|
940
946
|
-webkit-mask-size: 100%;
|
|
941
947
|
mask-size: 100%;
|
|
942
948
|
}
|
|
943
|
-
.wrapper.invalid .label:after {
|
|
949
|
+
.wrapper.invalid .label-wrapper:after {
|
|
944
950
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
945
951
|
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
946
952
|
}
|
|
947
|
-
.wrapper.invalid .label:after {
|
|
953
|
+
.wrapper.invalid .label-wrapper:after {
|
|
948
954
|
display: inline-block;
|
|
949
955
|
margin-inline-start: 0.25rem;
|
|
950
|
-
|
|
956
|
+
align-self: center;
|
|
951
957
|
flex-shrink: 0;
|
|
952
958
|
transform: translateY(-1px);
|
|
953
959
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { forceUpdate } from "@stencil/core";
|
|
3
|
-
import { getTextDir, shouldOpenUp, isElOrChild, toBool, handleDisabledAttribute } from "../../../global/functions";
|
|
3
|
+
import { getTextDir, shouldOpenUp, isElOrChild, toBool, handleDisabledAttribute, showTooltip, hideTooltip } from "../../../global/functions";
|
|
4
4
|
import { globalMessages, selectMessages } from "../../../global/intl";
|
|
5
5
|
export class Select {
|
|
6
6
|
constructor() {
|
|
@@ -172,6 +172,12 @@ export class Select {
|
|
|
172
172
|
this.wmSelectBlurred.emit();
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
+
handleLabelMouseEnter(ev) {
|
|
176
|
+
const labelEl = ev.target;
|
|
177
|
+
if (labelEl.scrollWidth > labelEl.clientWidth) {
|
|
178
|
+
showTooltip("right", ev.target, this.label);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
175
181
|
setButtonText() {
|
|
176
182
|
this.displayedOptions = this.childOptions.filter((x) => x.selected);
|
|
177
183
|
// handle overflow + counter for multiselect
|
|
@@ -228,9 +234,9 @@ export class Select {
|
|
|
228
234
|
["aria-expanded"]: this.isExpanded ? "true" : "false",
|
|
229
235
|
onClick: () => (this.isExpanded ? this.close() : this.open()),
|
|
230
236
|
};
|
|
231
|
-
return (h(Host, { key: '
|
|
237
|
+
return (h(Host, { key: '27f57d30b836eac8dc27ae98a425015d86a0948b', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '8f48d8e8d616244350e61d6e81f350640131bbf0', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '39d3bcec9b67d671a6bdbb6a3ee738832189ea51', ref: (el) => (this.labelEl = el), class: "label-wrapper" }, h("label", { key: 'b0bb90a215ac20de94afa8dba56e839bdc590dc1', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
|
|
232
238
|
// we can't use aria-required because the listbox is in a sub-component and it is not announced
|
|
233
|
-
this.requiredField
|
|
239
|
+
this.requiredField && (h("span", { key: '4a5648503a023ff1eba34db936d49709e14da9f1', class: "required" }, h("span", { key: '3fe783c7174d3d827b20589cad412d32fa4cd978', class: "sr-only" }, globalMessages.requiredField), h("span", { key: '85ac4ca35f1077ade1bdda403b8888cc206ff28e', "aria-hidden": "true" }, "*")))), h("div", { key: 'c2e70d87db2d533713ac9c5a877ddba98a9a9a2f', class: "button-wrapper" }, h("button", Object.assign({ key: '460c6ac5cde8637b0098201966ca4268301ac2b7' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { key: '3af3357f45ceacc5689e90e2bdc6459cab591c2f', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'bd9869db1146e54cc47c2965ebe2776873e2a18e', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'b22d952625e93fab98ebb1b688101fd8891a4af7', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: '1f6448ee167d1847eff8fb5bc7a30e0a964e6efe', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '0d550b97a3e08e9b708f2f4c3d91f9cac76ba5d8', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '59cc7fcfa25d9d3eab8e4d70cdcd365e36e160ad', class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("priv-option-list", { key: '9fb7d0396527bc18bb8f5d00d64c858470d0698d', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => this.close(), onOptionListAllSelected: () => this.wmSelectAllSelected.emit(), onOptionListAllDeselected: () => this.wmSelectAllDeselected.emit() }, h("slot", { key: '4c307bca5104ec962ca050b46adf882fb78bb74a' }))), h("div", { key: '06f11b61b475cc6cd78c2a8278b8455a79405e17', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '86cf865fbb7fd0e2c88290fe92e6062ada7d9ab6', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
|
|
234
240
|
}
|
|
235
241
|
static get is() { return "wm-select"; }
|
|
236
242
|
static get encapsulation() { return "shadow"; }
|
|
@@ -190,7 +190,7 @@ export class ActionMenu {
|
|
|
190
190
|
return null;
|
|
191
191
|
}
|
|
192
192
|
render() {
|
|
193
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '6a2551f3260b0ab3a606174243d89bfc7daa68e5', onBlur: () => this.close(false) }, h("div", { key: '1dc817e8a83608d514b45aa00c4c00031ba3019d', class: getTextDir() }, h("wm-button", { key: '4d9bb231cef8871774fbe03c71a0c3e203c0dd99', "button-type": this.internalButtonType, tooltip: this.tooltip, "custom-background": this.darkMode ? "dark" : undefined, "label-for-identical-buttons": this.labelForIdenticalButtons, icon: this.actionMenuType === "icon" ? "#more-options" : "", iconSize: this.actionMenuType === "icon" ? "24px" : undefined, id: "menubtn", onClick: () => (this.isExpanded ? this.close() : this.open()), onBlur: (ev) => this.handleButtonBlur(ev), disabled: this.disabled, ref: (el) => (this.wmButtonEl = el), "tooltip-position": this.tooltipPosition || this.horizontalPosition, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? "true" : "false", "aria-controls": "menu" }, this.buttonText), h("div", { key: 'c9c33887915c59b82c2b87fd65e39059a6f84bd5', class: `dropdown ${this.openUp ? "open-up" : ""} ${this.horizontalPosition} ${this.isExpanded ? "open" : ""} hidden`, id: "menu", tabindex: -1, role: "menu", ref: (el) => (this.itemsEl = el) }, h("slot", { key: '0c5a25373176ffa495a75a0e91ab6e71e45d3bbf' })))));
|
|
194
194
|
}
|
|
195
195
|
static get is() { return "wm-action-menu"; }
|
|
196
196
|
static get encapsulation() { return "shadow"; }
|
|
@@ -249,7 +249,7 @@ export class Button {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
render() {
|
|
252
|
-
return (h(Host, { key: '
|
|
252
|
+
return (h(Host, { key: 'd122993141c67e59f1b99fcc574772c7c35be7a7', class: `${this.isDisabled ? "button-disabled" : ""} -${this.buttonType}` }, h("button", { key: '6c6cb49fa724cb4e317a3a7c7fdc32e9d1ca43f6', id: this.id, class: `${this.buttonClasses}`, disabled: this.isDisabled, ref: (el) => (this.buttonEl = el), "aria-label": this.getAriaLabel(), "aria-hasPopup": this.ariaPopup ? "menu" : null, onMouseEnter: (ev) => this.handleMouseEnter(ev), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.handleFocus(ev), onBlur: () => hideTooltip(), onClick: () => hideTooltip() }, (this.icon || this.buttonType.endsWith("-ai")) && this.renderIcon(), (!this.buttonType.startsWith("navigational") && !this.buttonType.startsWith("icononly")) && (h("span", { key: '164207b617f46f932f462f15fb22529885a64e86', class: "button-text" }, h("slot", { key: '9e2831478378a258a8fd83405d0a1509e0e56697' }))), (this.buttonType == "selector" || this.buttonType == "selector-primary") && (h("div", { key: 'f0a5ebc4c97bd184a7e14171aaa0f103fd8c0c35', class: "selector-icon svg-icon svg-expand-more" })))));
|
|
253
253
|
}
|
|
254
254
|
static get is() { return "wm-button"; }
|
|
255
255
|
static get encapsulation() { return "shadow"; }
|
|
@@ -171,7 +171,7 @@ export class File {
|
|
|
171
171
|
return (h("div", { class: `file-wrapper` }, h("div", { class: `file ${this.errorMessage ? "--error" : ""} ${this.isCondensed ? "condensed" : ""}` }, this.renderFileName(), !this.errorMessage && (h("div", { class: "right-group" }, this.renderFileInfo(), this.fileActions !== "" && this.renderFileControls())), this.errorMessage && (h("wm-button", { "permanently-delete": true, "button-type": "textonly", "label-for-identical-buttons": this.generateClearButtonLabel(this.name), onClick: () => this.wmFileErrorCleared.emit() }, this.clearButtonText)), this.progress == 100 && h("span", { class: "svg-icon svg-success" })), this.errorMessage && h("div", { class: "error-message" }, this.errorMessage)));
|
|
172
172
|
}
|
|
173
173
|
render() {
|
|
174
|
-
return h(Host, { key: '
|
|
174
|
+
return h(Host, { key: '62b766d8fcbf74186344e2186df66554055465a6', role: "listitem" }, this.isUploading ? this.renderFileInProgress() : this.renderFile());
|
|
175
175
|
}
|
|
176
176
|
static get is() { return "wm-file"; }
|
|
177
177
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ export class FileList {
|
|
|
4
4
|
this.showInfo = "last-updated";
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h("div", { key: '
|
|
7
|
+
return (h("div", { key: 'bc22d0fa97458ed4323d6bba8d13966a68e9f5c4', role: "list", class: "list-wrapper" }, h("slot", { key: '105cb8fc11a0d9349ac2e38951cf0a2245b69bd8' })));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "wm-file-list"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -154,7 +154,7 @@ export class Flyout {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
render() {
|
|
157
|
-
return (h(Host, { key: '
|
|
157
|
+
return (h(Host, { key: '8894995294b9021b86d1b4ebc86f2cb2bd60871a' }, h("dialog", { key: '63be3184845ad41d03dd2ebdc990a65f7a48e27c', ref: (el) => (this.dialogEl = el), class: "flyout", onClose: () => this.wmFlyoutCloseTriggered.emit(), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("div", { key: '3786a4603653d069fcb7e92ca0a4d05d98d0a286', tabindex: "0", class: "focus-trap", onFocus: () => this.lastFocusableEl.focus(), "aria-hidden": "true" }), this.renderHeader(), h("div", { key: '5704a2497b84e2cbdac8199bb93abca519c97b68', class: "flyout-content" }, h("slot", { key: '7baba513445a86f677b71073870c7319d88d1e6b' })), this.renderFooter(), h("div", { key: 'df34388640730eca6f00cd2a9bb632e8e29467ce', tabindex: "0", class: "focus-trap", onFocus: () => this.handleEndBookendFocus(), "aria-hidden": "true" }))));
|
|
158
158
|
}
|
|
159
159
|
static get is() { return "wm-flyout"; }
|
|
160
160
|
static get encapsulation() { return "shadow"; }
|
|
@@ -874,21 +874,28 @@
|
|
|
874
874
|
flex-direction: column;
|
|
875
875
|
font-size: 0.875rem;
|
|
876
876
|
}
|
|
877
|
+
:host .wrapper .label-wrapper {
|
|
878
|
+
display: flex;
|
|
879
|
+
}
|
|
877
880
|
:host .wrapper .label {
|
|
878
|
-
display: block;
|
|
881
|
+
display: inline-block;
|
|
879
882
|
line-height: normal;
|
|
880
883
|
font-weight: 600;
|
|
881
884
|
white-space: nowrap;
|
|
885
|
+
overflow: hidden;
|
|
886
|
+
text-overflow: ellipsis;
|
|
882
887
|
margin-bottom: 0.25rem;
|
|
883
888
|
}
|
|
884
|
-
:host .wrapper .
|
|
889
|
+
:host .wrapper .required {
|
|
890
|
+
display: inline-block;
|
|
885
891
|
color: var(--wmcolor-text-required);
|
|
886
892
|
}
|
|
887
893
|
:host .wrapper.label-left {
|
|
888
894
|
flex-direction: row;
|
|
889
895
|
}
|
|
890
896
|
:host .wrapper.label-left .label-wrapper {
|
|
891
|
-
|
|
897
|
+
height: fit-content;
|
|
898
|
+
margin-right: 0.75rem;
|
|
892
899
|
}
|
|
893
900
|
:host .wrapper.label-left .label-wrapper .label {
|
|
894
901
|
display: flex;
|
|
@@ -896,7 +903,6 @@
|
|
|
896
903
|
min-height: 2.5rem;
|
|
897
904
|
white-space: normal;
|
|
898
905
|
margin-bottom: 0;
|
|
899
|
-
margin-right: 0.75rem;
|
|
900
906
|
}
|
|
901
907
|
:host .wrapper.label-none label {
|
|
902
908
|
position: absolute !important;
|
|
@@ -910,11 +916,11 @@
|
|
|
910
916
|
white-space: nowrap !important;
|
|
911
917
|
margin: -1px !important;
|
|
912
918
|
}
|
|
913
|
-
:host .wrapper.invalid .label {
|
|
919
|
+
:host .wrapper.invalid .label-wrapper {
|
|
914
920
|
color: var(--wmcolor-text-error);
|
|
915
921
|
position: relative;
|
|
916
922
|
}
|
|
917
|
-
:host .wrapper.invalid .label:after {
|
|
923
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
918
924
|
content: "";
|
|
919
925
|
display: block;
|
|
920
926
|
background-color: var(--icon-fill, currentColor);
|
|
@@ -923,14 +929,14 @@
|
|
|
923
929
|
-webkit-mask-size: 100%;
|
|
924
930
|
mask-size: 100%;
|
|
925
931
|
}
|
|
926
|
-
:host .wrapper.invalid .label:after {
|
|
932
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
927
933
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
928
934
|
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z'/%3E%3C/svg%3E%0A");
|
|
929
935
|
}
|
|
930
|
-
:host .wrapper.invalid .label:after {
|
|
936
|
+
:host .wrapper.invalid .label-wrapper:after {
|
|
931
937
|
display: inline-block;
|
|
932
938
|
margin-inline-start: 0.25rem;
|
|
933
|
-
|
|
939
|
+
align-self: center;
|
|
934
940
|
flex-shrink: 0;
|
|
935
941
|
transform: translateY(-1px);
|
|
936
942
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { triggerFormSubmit, toBool, handleDisabledAttribute } from "../../global/functions";
|
|
2
|
+
import { triggerFormSubmit, toBool, handleDisabledAttribute, hideTooltip, showTooltip } from "../../global/functions";
|
|
3
3
|
import { globalMessages } from "../../global/intl";
|
|
4
4
|
export class Input {
|
|
5
5
|
constructor() {
|
|
@@ -58,6 +58,12 @@ export class Input {
|
|
|
58
58
|
this.announce(this.generateCharacterLimitWarning(this.charCount, this.characterLimit));
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
handleLabelMouseEnter(ev) {
|
|
62
|
+
const labelEl = ev.target;
|
|
63
|
+
if (labelEl.scrollWidth > labelEl.clientWidth) {
|
|
64
|
+
showTooltip("right", labelEl, this.label);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
61
67
|
handleKeyDown(ev) {
|
|
62
68
|
// in most browsers, onInput doesn't fire if the input's maxLength is reached
|
|
63
69
|
// to handle the case where a user continues to type after reaching the character limit, the keyDown event must be used
|
|
@@ -101,7 +107,7 @@ export class Input {
|
|
|
101
107
|
: `info error`;
|
|
102
108
|
}
|
|
103
109
|
render() {
|
|
104
|
-
return (h("div", { key: '
|
|
110
|
+
return (h("div", { key: 'abe39d76f1df8098aad09d37dae556ffafed9de3', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.inputWrapperEl = el) }, h("div", { key: 'f6ebdff5ee4efb2f6ce435848379e8f63bcb3f71', class: "label-wrapper" }, h("label", { key: 'b3a7708e8f5660b68cf81fe260986373c31f6fa4', htmlFor: "inputfield", class: "label", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label, this.characterLimit && (h("span", { key: '5b6a934fddfbea75e3314ef472b49197de32d81f', class: "sr-only" }, " ", globalMessages.getCharacterLimit(this.characterLimit))), this.requiredField && (h("span", { key: '248913cb6fd3c8103dae938698945d10ddf427e7', class: "required", "aria-hidden": "true" }, "*")))), h("div", { key: '4e4769f816f738fcea46360db28de7e84279dd93', class: "inner-wrapper" }, h("div", { key: 'c322e3fe0685bae536d60bbd839300a6bd98278c', class: "text-after-wrapper" }, h("div", { key: '73367c2ca11589b5a9824d9c75df21b5e4782a60', class: `inputfield-wrapper ${this.isDisabled ? "disabled" : ""}`, style: this.getInputWidth() }, this.symbolBefore && (h("span", { key: '1c9f9f9c4919ee35b568552e0f64c5e932527e39', class: "symbol", id: "symbol-before" }, this.symbolBefore)), h("input", { key: '06ae1732dd7113f7b64bc5dc1d87cb20b54c2cae', ref: (el) => (this.inputEl = el), id: "inputfield", disabled: this.isDisabled, "aria-describedby": this.descriptors(), onInput: (ev) => this.handleInput(ev), onKeyDown: (ev) => this.handleKeyDown(ev), onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus(), placeholder: this.placeholder, autocomplete: "off", "aria-required": this.requiredField ? "true" : null, maxLength: this.characterLimit || undefined, type: this.type, step: this.step, max: this.max, min: this.min, value: this.el.value }), this.symbolAfter && (h("span", { key: '1e2d0a079adf0afe217a2eaf83c5e5dcf288177f', class: "symbol", id: "symbol-after" }, this.symbolAfter)), this.characterLimit && typeof this.characterLimit === "number" ? (h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit)) : ("")), this.textAfter && (h("span", { key: '486e6a2a5fd06134b8ecf7304cd36f316f52ea6f', class: "text-after", id: "text-after" }, this.textAfter))), this.info && (h("div", { key: 'e4187262201b8fc564f61c3c22c9636a06defba8', id: "info", class: "info" }, this.info)), h("div", { key: 'd366fcd90b17967c499dbfecde85873059ee74f2', id: "error", class: "error-message" }, this.errorMessage), h("div", { key: '778b3161f6e91606e7c8d8e372afd9df59f77916', class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
|
|
105
111
|
}
|
|
106
112
|
static get is() { return "wm-input"; }
|
|
107
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -98,7 +98,7 @@ export class Menuitem {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
|
-
return (h(Host, { key: '
|
|
101
|
+
return (h(Host, { key: 'e6315d1845768369730087b4e9e0cb52224af68a', tabindex: -1, role: "menuitem", "aria-disabled": this.disabled ? "true" : null }, h("div", { key: 'a1e8dc4267cf04c0ec5678744e2928acb39102c0', class: "wrapper", "aria-disabled": this.disabled ? "true" : null }, this.icon && this.renderIcon(), this.el.textContent, this.description ? h("div", { class: "description" }, this.description) : "")));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "wm-menuitem"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,7 +31,7 @@ export class ModalFooter {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h("div", { key: '
|
|
34
|
+
return (h("div", { key: '019e3ea4b92089f44320cc3f9d256f7cea96cfbc', class: `wm-wrapper ${this.infoText ? " footer-text" : ""}` }, h("div", { key: 'e5c34592f8a374bc016fc6cb6125a864f99d17bd', class: "wm-info", "aria-live": "polite" }, this.infoText), h("div", { key: '6349bd48d3aab79be1f33438f904d758a48066fd', class: "wm-button-collection" }, this.secondaryText && (h("wm-button", { key: '4154880503f788a9ea023fe4f0ce05b5f67b0f41', onClick: () => this.emitParentSecondaryEvent(), id: `wm-secondary-${this.uid}`, ref: (el) => (this.primaryActionDisabled ? (this.lastElement = el) : undefined) }, this.secondaryText)), h("wm-button", { key: 'a48b61feaf42d6da0b237a68af68d5ac8ae49642', "button-type": this.deleteStyle ? "secondary" : "primary", "permanently-delete": this.deleteStyle, onClick: () => this.emitParentPrimaryEvent(), disabled: this.primaryActionDisabled, id: `wm-primary-${this.uid}`, ref: (el) => (!this.primaryActionDisabled ? (this.lastElement = el) : undefined) }, this.primaryText))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "wm-modal-footer"; }
|
|
37
37
|
static get originalStyleUrls() {
|
|
@@ -22,7 +22,7 @@ export class ModalHeader {
|
|
|
22
22
|
parentModal.emitCloseEvent();
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: 'ebb2d8038aa0ac395c53d4f0d91499919aa932f6' }, h("div", { key: '1f5486f23c9a9a32e5e33e47b6edc31c37c37821', class: "wm-wrapper" }, h("div", { key: 'a1192d79c1d5d7fed157386cc6acb92522e14cf7' }, h("h2", { key: 'bf4b908dad455408550d5a2695d3c4fcfcd75c3b', class: "title", id: `wm-modal-heading-text-${this.uid}` }, this.heading, h("span", { key: '32347ba7f539174fee47edfce977f7c8426a3298', class: "subtitle" }, this.subheading))), h("wm-button", { key: '04324e5098e8580bcc3e44a107a348ff6fe5c9df', "button-type": "navigational", icon: "#close", tooltip: globalMessages.close, "tooltip-position": "left", id: `wm-modal-close-${this.uid}`, ref: (el) => (this.closeButtonEl = el), onClick: () => this.emitParentCloseEvent() }))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "wm-modal-header"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -108,11 +108,11 @@ export class Modal {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
render() {
|
|
111
|
-
return (h("dialog", { key: '
|
|
111
|
+
return (h("dialog", { key: '37c9534a1839dc5c6e2be8ca838fa9da956d34ba', class: `${"wm-" + this.modalType}`, ref: (el) => (this.dialogEl = el), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("div", { key: 'ce59adc5fa795c32da6fd374468c451147ccca38', class: "tabtrap sr-only", tabindex: "0", onFocus: (ev) => {
|
|
112
112
|
const focusedFromCloseButton = ev.relatedTarget && ev.relatedTarget == this.closeButtonEl;
|
|
113
113
|
// no related target means we're coming from outside the page (browser chrome), and first element should be focused instead
|
|
114
114
|
focusedFromCloseButton ? this.focusLastElement.emit() : this.focusFirstElement.emit();
|
|
115
|
-
} }), !this.hasBrowserPopoverSupport && h("div", { key: '
|
|
115
|
+
} }), !this.hasBrowserPopoverSupport && h("div", { key: 'c62753c1bba03d72707398899b68fe318d285bc8', class: "wm-tooltip" }), h("slot", { key: '24f8462de2987ddadc5a4573bb9ff0a4ad42d95a' }), h("div", { key: '390395f0b4bc778d6811276f2a7facfe3fd8f9da', class: "tabtrap sr-only", tabindex: "0", onFocus: () => {
|
|
116
116
|
this.focusFirstElement.emit();
|
|
117
117
|
} })));
|
|
118
118
|
}
|