@watermarkinsights/ripple 5.20.0-alpha.0 → 5.20.0-alpha.10
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-b26975cf.js → app-globals-259a270b.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-option-list.cjs.entry.js +2 -4
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-option_2.cjs.entry.js +175 -95
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +165 -74
- package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +1 -1
- package/dist/cjs/wm-timepicker.cjs.entry.js +2 -2
- package/dist/cjs/wm-toggletip.cjs.entry.js +3 -3
- package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +2 -4
- package/dist/collection/components/selects/wm-select/wm-select.css +67 -55
- package/dist/collection/components/selects/wm-select/wm-select.js +186 -110
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +30 -21
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +24 -33
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +55 -9
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +171 -90
- 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.js +2 -2
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +2 -2
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +3 -3
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/esm/{app-globals-0290058e.js → app-globals-ed8cd888.js} +1 -1
- package/dist/esm/{chartFunctions-3a54f8ac.js → chartFunctions-613e9c87.js} +1 -1
- package/dist/esm/{functions-669184a6.js → functions-38e392cb.js} +1 -1
- package/dist/esm/{intl-7906e2d7.js → intl-0b8f342e.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/priv-calendar.entry.js +1 -1
- package/dist/esm/priv-chart-popover.entry.js +1 -1
- package/dist/esm/priv-option-list.entry.js +4 -6
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +1 -1
- package/dist/esm/wm-button.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +3 -3
- package/dist/esm/wm-date-range.entry.js +1 -1
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-file.entry.js +1 -1
- package/dist/esm/wm-flyout.entry.js +2 -2
- package/dist/esm/wm-input.entry.js +2 -2
- package/dist/esm/wm-line-chart.entry.js +3 -3
- package/dist/esm/wm-modal-pss_3.entry.js +2 -2
- package/dist/esm/wm-modal_3.entry.js +2 -2
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-nested-select.entry.js +2 -2
- package/dist/esm/wm-optgroup.entry.js +1 -1
- package/dist/esm/wm-option_2.entry.js +177 -97
- package/dist/esm/wm-pagination.entry.js +2 -2
- package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
- 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 +167 -76
- package/dist/esm/wm-tag-input.entry.js +4 -4
- package/dist/esm/wm-tag-option.entry.js +1 -1
- package/dist/esm/wm-textarea.entry.js +3 -3
- package/dist/esm/wm-timepicker.entry.js +3 -3
- package/dist/esm/wm-toggletip.entry.js +4 -4
- package/dist/esm/wm-uploader.entry.js +4 -4
- package/dist/esm-es5/app-globals-ed8cd888.js +1 -0
- package/dist/esm-es5/{chartFunctions-3a54f8ac.js → chartFunctions-613e9c87.js} +1 -1
- package/dist/esm-es5/{functions-669184a6.js → functions-38e392cb.js} +1 -1
- package/dist/esm-es5/{intl-7906e2d7.js → intl-0b8f342e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-option-list.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-chart.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.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-line-chart.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-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-optgroup.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-progress-indicator_3.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-tag-option.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-6d32911c.system.entry.js → p-00eaa361.system.entry.js} +1 -1
- package/dist/ripple/{p-c85dae6b.entry.js → p-0825151e.entry.js} +1 -1
- package/dist/ripple/{p-c70fa14f.entry.js → p-0bce3f83.entry.js} +1 -1
- package/dist/ripple/{p-69b38da5.entry.js → p-118093e1.entry.js} +1 -1
- package/dist/ripple/{p-4b0b66e0.system.entry.js → p-17964357.system.entry.js} +1 -1
- package/dist/ripple/{p-bd37b0f9.system.entry.js → p-1a89139d.system.entry.js} +1 -1
- package/dist/ripple/{p-03759d86.system.entry.js → p-1fcf0ea8.system.entry.js} +1 -1
- package/dist/ripple/{p-bdac9bec.entry.js → p-2508b801.entry.js} +1 -1
- package/dist/ripple/{p-d784f4b4.entry.js → p-26ffcd83.entry.js} +1 -1
- package/dist/ripple/{p-55cdfcb4.system.entry.js → p-2b7259cb.system.entry.js} +1 -1
- package/dist/ripple/{p-ff6b7376.system.entry.js → p-2db6573e.system.entry.js} +1 -1
- package/dist/ripple/{p-1efa25b5.system.entry.js → p-3133ce3c.system.entry.js} +1 -1
- package/dist/ripple/{p-9ac6957b.entry.js → p-31bac55d.entry.js} +1 -1
- package/dist/ripple/p-3422832f.entry.js +1 -0
- package/dist/ripple/{p-c1d6740e.entry.js → p-3612ee73.entry.js} +1 -1
- package/dist/ripple/{p-21c100d8.entry.js → p-39a4934f.entry.js} +1 -1
- package/dist/ripple/{p-54759960.entry.js → p-41664372.entry.js} +1 -1
- package/dist/ripple/{p-c8dfc321.system.entry.js → p-44cc05f6.system.entry.js} +1 -1
- package/dist/ripple/{p-c73882de.system.entry.js → p-4602304a.system.entry.js} +1 -1
- package/dist/ripple/{p-bb364d6b.entry.js → p-4b8f7d1e.entry.js} +1 -1
- package/dist/ripple/{p-b55883ee.entry.js → p-4d0abf7a.entry.js} +1 -1
- package/dist/ripple/{p-328b9560.entry.js → p-4df8346a.entry.js} +1 -1
- package/dist/ripple/{p-b1282d28.system.entry.js → p-507ea41f.system.entry.js} +1 -1
- package/dist/ripple/{p-26ab5004.system.entry.js → p-5405df80.system.entry.js} +1 -1
- package/dist/ripple/{p-7d708fab.entry.js → p-56b6d9f6.entry.js} +1 -1
- package/dist/ripple/{p-96a7c1b9.system.entry.js → p-56e376b2.system.entry.js} +1 -1
- package/dist/ripple/p-598faa0e.js +1 -0
- package/dist/ripple/{p-88a7ccee.system.js → p-608971f2.system.js} +1 -1
- package/dist/ripple/{p-6ec4129b.entry.js → p-60e16c79.entry.js} +1 -1
- package/dist/ripple/{p-95f19440.system.js → p-65abcbb4.system.js} +1 -1
- package/dist/ripple/{p-65d3f9c4.system.entry.js → p-667fdcbb.system.entry.js} +1 -1
- package/dist/ripple/{p-68e90b50.system.entry.js → p-6a70dc0b.system.entry.js} +1 -1
- package/dist/ripple/{p-7394f4e9.system.entry.js → p-7134a305.system.entry.js} +1 -1
- package/dist/ripple/{p-059efd2a.entry.js → p-72e1fdb5.entry.js} +1 -1
- package/dist/ripple/{p-047e510d.entry.js → p-7c3bf608.entry.js} +1 -1
- package/dist/ripple/{p-176dcfc0.system.js → p-7edd25f7.system.js} +1 -1
- package/dist/ripple/p-7f132a0e.system.js +1 -0
- package/dist/ripple/{p-ebfa5876.entry.js → p-86a61a2a.entry.js} +1 -1
- package/dist/ripple/{p-8c73dadf.system.entry.js → p-8d1e0f23.system.entry.js} +1 -1
- package/dist/ripple/{p-009a6e5a.entry.js → p-8e2f3a45.entry.js} +1 -1
- package/dist/ripple/{p-a0ef456d.entry.js → p-8ec6ec53.entry.js} +1 -1
- package/dist/ripple/{p-71cc21a4.entry.js → p-908057b2.entry.js} +1 -1
- package/dist/ripple/{p-dbc3a44d.entry.js → p-9202d9e9.entry.js} +1 -1
- package/dist/ripple/{p-0ae9b6d3.js → p-92c8361f.js} +1 -1
- package/dist/ripple/{p-ad10664f.entry.js → p-957f13fb.entry.js} +1 -1
- package/dist/ripple/{p-1ad6c15b.entry.js → p-9609d8e7.entry.js} +1 -1
- package/dist/ripple/{p-3c9972a6.system.entry.js → p-960d2cf0.system.entry.js} +1 -1
- package/dist/ripple/{p-22d4c7e0.system.entry.js → p-96f86eb4.system.entry.js} +1 -1
- package/dist/ripple/{p-ea10c498.entry.js → p-9e89655f.entry.js} +1 -1
- package/dist/ripple/{p-f8fd7172.system.entry.js → p-a14dee02.system.entry.js} +1 -1
- package/dist/ripple/{p-222624ae.entry.js → p-a5c5c64c.entry.js} +1 -1
- package/dist/ripple/p-a6f9a3b2.system.js +1 -0
- package/dist/ripple/{p-dfa30c3d.entry.js → p-a7cde3fc.entry.js} +1 -1
- package/dist/ripple/{p-acb4d87c.system.entry.js → p-abcdd7be.system.entry.js} +1 -1
- package/dist/ripple/{p-0c20a096.system.entry.js → p-b0da7ad4.system.entry.js} +1 -1
- package/dist/ripple/{p-6a40014e.system.entry.js → p-b1fb99e4.system.entry.js} +1 -1
- package/dist/ripple/{p-91669f66.js → p-b511ebfd.js} +1 -1
- package/dist/ripple/p-b921ee01.entry.js +1 -0
- package/dist/ripple/{p-036fd03b.system.entry.js → p-bde7e77b.system.entry.js} +1 -1
- package/dist/ripple/{p-c0f4f1ea.system.entry.js → p-c7f3ef7f.system.entry.js} +1 -1
- package/dist/ripple/p-cf5ad12d.system.entry.js +1 -0
- package/dist/ripple/{p-1806e50b.js → p-d815809f.js} +1 -1
- package/dist/ripple/{p-fb61a10e.system.entry.js → p-e5c34af5.system.entry.js} +1 -1
- package/dist/ripple/{p-e1a15515.system.entry.js → p-e660d0b8.system.entry.js} +1 -1
- package/dist/ripple/{p-66489ded.entry.js → p-ecd1c2ba.entry.js} +1 -1
- package/dist/ripple/{p-5bf2eb50.system.entry.js → p-f4390a0a.system.entry.js} +1 -1
- package/dist/ripple/{p-ae2520e4.entry.js → p-f91fc18d.entry.js} +1 -1
- package/dist/ripple/{p-1841c319.system.entry.js → p-f9bbb123.system.entry.js} +1 -1
- package/dist/ripple/{p-25c17efe.system.entry.js → p-fbad04d7.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/selects/wm-select/wm-select.d.ts +16 -9
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +3 -1
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +15 -20
- package/dist/types/components.d.ts +2 -23
- package/package.json +2 -2
- package/dist/esm-es5/app-globals-0290058e.js +0 -1
- package/dist/ripple/p-1eb2ec31.system.entry.js +0 -1
- package/dist/ripple/p-324f341f.system.js +0 -1
- package/dist/ripple/p-9e1ea6e2.entry.js +0 -1
- package/dist/ripple/p-ec9f782e.entry.js +0 -1
- package/dist/ripple/p-f7ed42b0.system.js +0 -1
- package/dist/ripple/p-fbc46f7e.js +0 -1
|
@@ -869,25 +869,71 @@
|
|
|
869
869
|
--wmcolor-tab-background-dark: var(--wmcolor-background-dark);
|
|
870
870
|
--wmcolor-tab-text-ondark: var(--wmcolor-interactive-ondark);
|
|
871
871
|
--wmcolor-tab-text: var(--wmcolor-interactive);
|
|
872
|
-
|
|
873
|
-
white-space: nowrap;
|
|
874
|
-
height: fit-content;
|
|
872
|
+
background: var(--wmcolor-tab-background);
|
|
875
873
|
display: block;
|
|
874
|
+
position: relative;
|
|
875
|
+
width: 100%;
|
|
876
|
+
}
|
|
877
|
+
:host .component-wrapper {
|
|
878
|
+
display: flex;
|
|
879
|
+
align-items: center;
|
|
880
|
+
width: 100%;
|
|
881
|
+
border-block-end: 1px solid var(--wmcolor-border);
|
|
882
|
+
}
|
|
883
|
+
:host .component-wrapper:has(.dark) {
|
|
884
|
+
background: var(--wmcolor-tab-background-dark);
|
|
885
|
+
border-block-end: 2px solid var(--wmcolor-tab-background-dark);
|
|
876
886
|
}
|
|
877
887
|
:host .tabcontainer {
|
|
878
|
-
background: var(--wmcolor-tab-background);
|
|
879
888
|
margin: 0;
|
|
880
|
-
width:
|
|
881
|
-
|
|
889
|
+
width: fit-content;
|
|
890
|
+
max-width: 100%;
|
|
891
|
+
min-height: 2.75rem;
|
|
882
892
|
display: flex;
|
|
883
893
|
flex-direction: row;
|
|
884
894
|
align-items: center;
|
|
885
895
|
padding: 0;
|
|
896
|
+
overflow-x: hidden;
|
|
897
|
+
--fade-distance: 0.875rem;
|
|
886
898
|
}
|
|
887
899
|
:host .tabcontainer.dark {
|
|
888
|
-
background: var(--wmcolor-tab-background-dark);
|
|
889
900
|
margin: 0;
|
|
901
|
+
padding-inline: 0.125rem;
|
|
902
|
+
}
|
|
903
|
+
:host .tabcontainer.fade-left.fade-right {
|
|
904
|
+
mask-image: linear-gradient(90deg, transparent 0, black var(--fade-distance), black calc(100% - var(--fade-distance)), transparent 100%);
|
|
905
|
+
}
|
|
906
|
+
:host .tabcontainer.fade-left:not(.fade-right) {
|
|
907
|
+
mask-image: linear-gradient(90deg, transparent 0, black var(--fade-distance), black 100%);
|
|
908
|
+
}
|
|
909
|
+
:host .tabcontainer.fade-right:not(.fade-left) {
|
|
910
|
+
mask-image: linear-gradient(90deg, black 0, black calc(100% - var(--fade-distance)), transparent 100%);
|
|
911
|
+
}
|
|
912
|
+
:host wm-button.left-arrow,
|
|
913
|
+
:host wm-button.right-arrow {
|
|
914
|
+
--icon-size: 1.25rem;
|
|
915
|
+
display: none;
|
|
916
|
+
flex-shrink: 0;
|
|
917
|
+
}
|
|
918
|
+
:host wm-button.left-arrow.visible,
|
|
919
|
+
:host wm-button.right-arrow.visible {
|
|
920
|
+
display: block;
|
|
921
|
+
}
|
|
922
|
+
:host wm-button.left-arrow {
|
|
923
|
+
margin-inline: 0.125rem 0.5rem;
|
|
924
|
+
}
|
|
925
|
+
:host wm-button.right-arrow {
|
|
926
|
+
margin-inline: 0.5rem 0.125rem;
|
|
890
927
|
}
|
|
891
|
-
:host
|
|
892
|
-
|
|
928
|
+
:host .sr-only {
|
|
929
|
+
position: absolute !important;
|
|
930
|
+
width: 1px !important;
|
|
931
|
+
height: 1px !important;
|
|
932
|
+
padding: 0 !important;
|
|
933
|
+
border: 0 !important;
|
|
934
|
+
overflow: hidden !important;
|
|
935
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
936
|
+
clip-path: inset(50%) !important;
|
|
937
|
+
white-space: nowrap !important;
|
|
938
|
+
margin: -1px !important;
|
|
893
939
|
}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { debounce, intl } from "../../../global/functions";
|
|
3
3
|
export class TabList {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
this.debouncedSetLayout = debounce(() => {
|
|
11
|
-
if (!this.listWidth) {
|
|
12
|
-
this.setListWidth();
|
|
13
|
-
}
|
|
14
|
-
forceUpdate(this.el);
|
|
15
|
-
}, 10);
|
|
5
|
+
this.debouncedUpdateContainerState = debounce(() => {
|
|
6
|
+
this.updateContainerFade();
|
|
7
|
+
this.updateArrowVisibility();
|
|
8
|
+
}, 16);
|
|
16
9
|
this.customBackground = undefined;
|
|
17
|
-
this.customPadding = undefined;
|
|
18
10
|
this.selectedTab = undefined;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
get menuLayout() {
|
|
24
|
-
if (this.listWidth) {
|
|
25
|
-
return this.el.offsetWidth < this.listWidth - 24; // to take into account the negative margin on the ul
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return false; // in case listWidth couldn't get computed, we render regular tabs
|
|
29
|
-
}
|
|
11
|
+
this.announcement = "";
|
|
12
|
+
this.containerFadeLeft = false;
|
|
13
|
+
this.containerFadeRight = false;
|
|
14
|
+
this.scrollArrowsVisible = false;
|
|
30
15
|
}
|
|
31
16
|
get tabItems() {
|
|
32
17
|
return Array.from(this.el.querySelectorAll("wm-tab-item"));
|
|
@@ -45,10 +30,6 @@ export class TabList {
|
|
|
45
30
|
getPanel(tabId) {
|
|
46
31
|
return this.panels.find((p) => p.tabId === tabId);
|
|
47
32
|
}
|
|
48
|
-
setListWidth() {
|
|
49
|
-
let newCalc = this.tabItems.reduce((sum, tab) => sum + tab.offsetWidth, 0);
|
|
50
|
-
this.listWidth = newCalc && newCalc > 0 ? newCalc : this.listWidth; // the function may return 0. In this case keep the previous value
|
|
51
|
-
}
|
|
52
33
|
setSelected(id) {
|
|
53
34
|
this.tabItems.map((tab) => (tab.selected = tab.tabId === id));
|
|
54
35
|
const singlePanel = this.panels.length === 1 && this.tabItems.length > 1;
|
|
@@ -62,28 +43,29 @@ export class TabList {
|
|
|
62
43
|
else {
|
|
63
44
|
this.panels.map((panel) => (panel.active = panel.tabId === id));
|
|
64
45
|
}
|
|
65
|
-
|
|
66
|
-
showItems() {
|
|
67
|
-
this.tabItems.map((t) => (t.show = true));
|
|
68
|
-
}
|
|
69
|
-
hideItems() {
|
|
70
|
-
this.tabItems.map((t) => (t.show = false));
|
|
46
|
+
this.handleTabFocused(this.selectedTabItem);
|
|
71
47
|
}
|
|
72
48
|
componentWillLoad() {
|
|
73
49
|
this.el.focus = () => {
|
|
74
50
|
// in addition to delegatesFocus, we need to highjack the focus method to send focus to the selected tab-item
|
|
75
|
-
this.selectedTabItem && this.selectedTabItem.focus();
|
|
51
|
+
this.selectedTabItem && this.selectedTabItem.focus({ preventScroll: true });
|
|
76
52
|
};
|
|
77
|
-
const resizeObserver = new ResizeObserver(() => this.debouncedSetLayout());
|
|
78
|
-
resizeObserver.observe(this.el);
|
|
79
53
|
}
|
|
80
54
|
componentDidLoad() {
|
|
81
55
|
const selectedTab = this.selectedTab || this.tabItems[0].tabId;
|
|
82
56
|
this.setSelected(selectedTab);
|
|
57
|
+
this.handleTabFocused(this.selectedTabItem);
|
|
58
|
+
this.updateArrowVisibility();
|
|
59
|
+
this.tabContainerEl.addEventListener("scroll", this.debouncedUpdateContainerState);
|
|
60
|
+
const resizeObserver = new ResizeObserver(() => this.debouncedUpdateContainerState());
|
|
61
|
+
resizeObserver.observe(this.el);
|
|
83
62
|
}
|
|
84
63
|
tabItemLoaded(ev) {
|
|
85
64
|
this.setAriaOnPanelAndTab(ev.target);
|
|
86
65
|
}
|
|
66
|
+
wmTabFocused(ev) {
|
|
67
|
+
this.handleTabFocused(ev.detail.tabItem);
|
|
68
|
+
}
|
|
87
69
|
setAriaOnPanelAndTab(tab) {
|
|
88
70
|
const panel = this.getPanel(tab.tabId);
|
|
89
71
|
// If there's no panel, check for case where content is conditionally rendered in one panel, in which case attributes on all tabs should point to this single panel.
|
|
@@ -135,32 +117,152 @@ export class TabList {
|
|
|
135
117
|
index = 0;
|
|
136
118
|
}
|
|
137
119
|
const tabToFocus = this.tabItems[index];
|
|
138
|
-
this.getLinkEl(tabToFocus).focus();
|
|
120
|
+
this.getLinkEl(tabToFocus).focus({ preventScroll: true });
|
|
121
|
+
}
|
|
122
|
+
handleTabFocused(tabItem, alignment = "auto") {
|
|
123
|
+
// Calculate and apply scroll position
|
|
124
|
+
const targetScrollLeft = this.calculateScrollPositionForTab(tabItem, alignment);
|
|
125
|
+
this.tabContainerEl.scrollTo({ left: targetScrollLeft, behavior: "smooth" });
|
|
139
126
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
127
|
+
calculateScrollPositionForTab(tabItem, alignment = "auto") {
|
|
128
|
+
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
129
|
+
const containerScrollLeft = this.tabContainerEl.scrollLeft;
|
|
130
|
+
const tabRect = tabItem.getBoundingClientRect();
|
|
131
|
+
const tabLeft = containerScrollLeft + (tabRect.left - containerRect.left);
|
|
132
|
+
const tabRight = tabLeft + tabRect.width;
|
|
133
|
+
// Explicit alignment
|
|
134
|
+
if (alignment === "left") {
|
|
135
|
+
return tabLeft; // Snap to left edge
|
|
144
136
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
137
|
+
if (alignment === "right") {
|
|
138
|
+
return Math.max(0, tabRight - containerRect.width); // Snap to right edge
|
|
139
|
+
}
|
|
140
|
+
// Auto alignment
|
|
141
|
+
const firstTab = this.tabItems[0];
|
|
142
|
+
const lastTab = this.tabItems[this.tabItems.length - 1];
|
|
143
|
+
if (tabItem === firstTab) {
|
|
144
|
+
return 0;
|
|
145
|
+
}
|
|
146
|
+
if (tabItem === lastTab) {
|
|
147
|
+
return Math.max(0, this.tabContainerEl.scrollWidth - containerRect.width);
|
|
148
|
+
}
|
|
149
|
+
if (tabLeft < containerScrollLeft) {
|
|
150
|
+
return tabLeft; // Left edge cut off, align left
|
|
151
|
+
}
|
|
152
|
+
if (tabRight > containerScrollLeft + containerRect.width) {
|
|
153
|
+
return tabRight - containerRect.width; // Right edge cut off, align right
|
|
154
|
+
}
|
|
155
|
+
return containerScrollLeft; // Fully visible, no scroll needed
|
|
156
|
+
}
|
|
157
|
+
updateContainerFade() {
|
|
158
|
+
const tolerance = 1; // 1px tolerance for floating-point precision
|
|
159
|
+
// Check if there's content scrolled out of view on each side
|
|
160
|
+
let shouldFadeLeft = this.tabContainerEl.scrollLeft > tolerance;
|
|
161
|
+
let shouldFadeRight = this.tabContainerEl.scrollLeft + this.tabContainerEl.clientWidth < this.tabContainerEl.scrollWidth - tolerance;
|
|
162
|
+
const focusedTab = this.tabItems.find((tab) => tab.matches(":focus-within"));
|
|
163
|
+
if (focusedTab) {
|
|
164
|
+
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
165
|
+
const tabRect = focusedTab.getBoundingClientRect();
|
|
166
|
+
const isAtOrOverlappingLeft = tabRect.left <= containerRect.left + tolerance;
|
|
167
|
+
const isAtOrOverlappingRight = tabRect.right >= containerRect.right - tolerance;
|
|
168
|
+
if (isAtOrOverlappingLeft) {
|
|
169
|
+
shouldFadeLeft = false; // Don't fade left if focused tab is at/beyond left edge
|
|
170
|
+
}
|
|
171
|
+
if (isAtOrOverlappingRight) {
|
|
172
|
+
shouldFadeRight = false; // Don't fade right if focused tab is at/beyond right edge
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.containerFadeLeft = shouldFadeLeft;
|
|
176
|
+
this.containerFadeRight = shouldFadeRight;
|
|
177
|
+
}
|
|
178
|
+
updateArrowVisibility() {
|
|
179
|
+
const leftArrowEl = this.el.shadowRoot.querySelector(".left-arrow");
|
|
180
|
+
const rightArrowEl = this.el.shadowRoot.querySelector(".right-arrow");
|
|
181
|
+
const isScrollable = this.tabContainerEl.scrollWidth > this.el.getBoundingClientRect().width;
|
|
182
|
+
this.scrollArrowsVisible = isScrollable;
|
|
183
|
+
requestAnimationFrame(() => {
|
|
184
|
+
// Let arrows render before checking if they should be disabled
|
|
185
|
+
if (this.scrollArrowsVisible) {
|
|
186
|
+
const tolerance = 1; // 1px tolerance for floating-point precision
|
|
187
|
+
const canScrollLeft = this.tabContainerEl.scrollLeft > tolerance;
|
|
188
|
+
const canScrollRight = this.tabContainerEl.scrollLeft + this.tabContainerEl.clientWidth <
|
|
189
|
+
this.tabContainerEl.scrollWidth - tolerance;
|
|
190
|
+
leftArrowEl.classList.toggle("disabled", !canScrollLeft);
|
|
191
|
+
rightArrowEl.classList.toggle("disabled", !canScrollRight);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
handleLeftArrowClick(ev) {
|
|
196
|
+
const buttonEl = ev.target;
|
|
197
|
+
if (buttonEl.classList.contains("disabled")) {
|
|
198
|
+
// If the arrow is disabled, take no action and announce reason
|
|
199
|
+
this.announce(intl.formatMessage({
|
|
200
|
+
id: "tabs.cannotScrollLeft",
|
|
201
|
+
defaultMessage: "No more tabs to the left",
|
|
202
|
+
description: "Announcement for button scrolling tab group.",
|
|
203
|
+
}));
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
// Find the first tab that's partially or completely obscured on the left
|
|
207
|
+
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
208
|
+
const containerLeft = containerRect.left;
|
|
209
|
+
let tabToFocus = null;
|
|
210
|
+
const reversedTabItems = this.tabItems.reverse();
|
|
211
|
+
reversedTabItems.forEach((tab) => {
|
|
212
|
+
if (!tabToFocus) {
|
|
213
|
+
const tabRect = tab.getBoundingClientRect();
|
|
214
|
+
if (tabRect.left < containerLeft - 1) {
|
|
215
|
+
tabToFocus = tab;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
if (tabToFocus) {
|
|
220
|
+
this.handleTabFocused(tabToFocus, "right"); // Snap to right edge for page-scroll behavior
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
handleRightArrowClick(ev) {
|
|
224
|
+
const buttonEl = ev.target;
|
|
225
|
+
if (buttonEl.classList.contains("disabled")) {
|
|
226
|
+
this.announce(intl.formatMessage({
|
|
227
|
+
id: "tabs.cannotScrollRight",
|
|
228
|
+
defaultMessage: "No more tabs to the right",
|
|
229
|
+
description: "Announcement for button scrolling tab group.",
|
|
230
|
+
}));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
// Find the first tab that's partially or completely obscured on the right
|
|
234
|
+
const containerRect = this.tabContainerEl.getBoundingClientRect();
|
|
235
|
+
const containerRight = containerRect.right;
|
|
236
|
+
let tabToFocus = null;
|
|
237
|
+
this.tabItems.forEach((tab) => {
|
|
238
|
+
if (!tabToFocus) {
|
|
239
|
+
const tabRect = tab.getBoundingClientRect();
|
|
240
|
+
if (tabRect.right > containerRight + 1) {
|
|
241
|
+
tabToFocus = tab;
|
|
242
|
+
}
|
|
152
243
|
}
|
|
153
|
-
|
|
244
|
+
});
|
|
245
|
+
if (tabToFocus) {
|
|
246
|
+
this.handleTabFocused(tabToFocus, "left"); // Snap to left edge for page-scroll behavior
|
|
154
247
|
}
|
|
155
248
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
249
|
+
announce(message) {
|
|
250
|
+
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
251
|
+
if (this.liveRegionEl.textContent === message) {
|
|
252
|
+
message += "\u00A0";
|
|
253
|
+
}
|
|
254
|
+
this.announcement = message;
|
|
161
255
|
}
|
|
162
256
|
render() {
|
|
163
|
-
return h(Host, { key: '
|
|
257
|
+
return (h(Host, { key: 'e555fa0280ec84bb47b526bf7d475cb3a78497e5' }, h("div", { key: '14ae10e3627884c0d7c46b70065f24c7c7f737e7', class: "component-wrapper" }, h("wm-button", { key: 'ef4bcbd93b6a2f53e81dc44032fe90111c5cb037', class: `left-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#previous", tooltip: intl.formatMessage({
|
|
258
|
+
id: "tabs.showPreviousTabs",
|
|
259
|
+
defaultMessage: "Show previous tabs",
|
|
260
|
+
description: "Tooltip for button scrolling tab group.",
|
|
261
|
+
}), onClick: (ev) => this.handleLeftArrowClick(ev) }), h("ul", { key: '71fc27a6c6d8c6eed9b21a315a9f986bc73ed892', id: "tablist", ref: (el) => (this.tabContainerEl = el), class: `tabcontainer ${this.customBackground || ""} ${this.containerFadeLeft ? "fade-left" : ""} ${this.containerFadeRight ? "fade-right" : ""}`, role: "tablist", tabIndex: -1 }, h("slot", { key: 'e79555a99f5700f9dd3830fc3d3ba33c0214bf9c' })), h("wm-button", { key: 'b8d70cfe5460c8455476dd33ccd46c4ad959933f', class: `right-arrow ${this.scrollArrowsVisible ? "visible" : ""}`, "aria-controls": "tablist", customBackground: this.customBackground, buttonType: "navigational", icon: "#next", tooltip: intl.formatMessage({
|
|
262
|
+
id: "tabs.showNextTabs",
|
|
263
|
+
defaultMessage: "Show next tabs",
|
|
264
|
+
description: "Tooltip for button scrolling tab group.",
|
|
265
|
+
}), onClick: (ev) => this.handleRightArrowClick(ev) }), h("span", { key: 'eb56710b313de2e0dcec69ae2b0cf934ff064c5e', "aria-live": "assertive", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
|
|
164
266
|
}
|
|
165
267
|
static get is() { return "wm-tab-list"; }
|
|
166
268
|
static get encapsulation() { return "shadow"; }
|
|
@@ -194,23 +296,6 @@ export class TabList {
|
|
|
194
296
|
"attribute": "custom-background",
|
|
195
297
|
"reflect": false
|
|
196
298
|
},
|
|
197
|
-
"customPadding": {
|
|
198
|
-
"type": "string",
|
|
199
|
-
"mutable": false,
|
|
200
|
-
"complexType": {
|
|
201
|
-
"original": "string",
|
|
202
|
-
"resolved": "string | undefined",
|
|
203
|
-
"references": {}
|
|
204
|
-
},
|
|
205
|
-
"required": false,
|
|
206
|
-
"optional": true,
|
|
207
|
-
"docs": {
|
|
208
|
-
"tags": [],
|
|
209
|
-
"text": ""
|
|
210
|
-
},
|
|
211
|
-
"attribute": "custom-padding",
|
|
212
|
-
"reflect": false
|
|
213
|
-
},
|
|
214
299
|
"selectedTab": {
|
|
215
300
|
"type": "string",
|
|
216
301
|
"mutable": false,
|
|
@@ -230,23 +315,13 @@ export class TabList {
|
|
|
230
315
|
}
|
|
231
316
|
};
|
|
232
317
|
}
|
|
233
|
-
static get
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
"docs": {
|
|
241
|
-
"tags": [],
|
|
242
|
-
"text": "Emitted by wm-select options when tabs have the menu format"
|
|
243
|
-
},
|
|
244
|
-
"complexType": {
|
|
245
|
-
"original": "{ tabId: string }",
|
|
246
|
-
"resolved": "{ tabId: string; }",
|
|
247
|
-
"references": {}
|
|
248
|
-
}
|
|
249
|
-
}];
|
|
318
|
+
static get states() {
|
|
319
|
+
return {
|
|
320
|
+
"announcement": {},
|
|
321
|
+
"containerFadeLeft": {},
|
|
322
|
+
"containerFadeRight": {},
|
|
323
|
+
"scrollArrowsVisible": {}
|
|
324
|
+
};
|
|
250
325
|
}
|
|
251
326
|
static get elementRef() { return "el"; }
|
|
252
327
|
static get watchers() {
|
|
@@ -262,6 +337,12 @@ export class TabList {
|
|
|
262
337
|
"target": undefined,
|
|
263
338
|
"capture": false,
|
|
264
339
|
"passive": false
|
|
340
|
+
}, {
|
|
341
|
+
"name": "wmIntTabFocused",
|
|
342
|
+
"method": "wmTabFocused",
|
|
343
|
+
"target": undefined,
|
|
344
|
+
"capture": false,
|
|
345
|
+
"passive": false
|
|
265
346
|
}, {
|
|
266
347
|
"name": "keydownOnTabItem",
|
|
267
348
|
"method": "handleKeydown",
|
|
@@ -12,7 +12,7 @@ export class TabPanel {
|
|
|
12
12
|
this.tabPanelLoaded.emit({ tabId: this.tabId });
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return h(Host, { key: '
|
|
15
|
+
return h(Host, { key: 'de7b52323f4628b61114793939ad10a3d96a8465', role: "tabpanel", class: { "tab-hidden": !this.active } });
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "wm-tab-panel"; }
|
|
18
18
|
static get originalStyleUrls() {
|
|
@@ -927,10 +927,10 @@ export class TagInput {
|
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
render() {
|
|
930
|
-
return (h("div", { key: '
|
|
930
|
+
return (h("div", { key: '4fe42ced37f66d1da1f80d351d2058f2fa04caed', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'feac40a76d0300a640d353789188567b6bce88bd', class: "label-wrapper" }, h("label", { key: '8daeb0009a81b3372686cdcaf7823ca66574ea4c', class: "label", htmlFor: "input", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label), this.requiredField && (h("div", { key: 'a09c606545f86da661d38d30bc2207ee138c903d', class: "required", "aria-hidden": "true" }, "*"))), h("div", { key: '9bb84f04fdb72fd60348a7c47f45a7c6d0eb1e1c', class: `field-wrapper ${this.el.shadowRoot.activeElement === this.inputEl ? "focused" : ""} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.fieldWrapperEl = el) }, h("div", { key: 'e67ffb9ecd84146e6feec21602eaa00f76b262b8', class: "upper-row" }, h("div", { key: 'f91652753a955980cd5079030b161abc19df0581', class: "svg-icon svg-search" }), h("div", { key: '6845759499b0f5165c145730c416a6036afb7ed3', class: `tags-and-input-wrapper` }, h("ul", { key: '4f785e55658d3f900b05a2de2a69f162339b46bf', ref: (el) => (this.tagAreaEl = el), class: `tag-area ${this.taggedOptions.length === 0 && "empty"} ${this.isKeying ? "user-is-keying" : ""}`, role: "listbox", "aria-activedescendant": this.focusedTag ? this.focusedTag.id : null, "aria-orientation": "horizontal", "aria-label": `${this.label} ${this.tagAreaInstructions}`, tabindex: this._tagEls.length > 0 ? 0 : -1, "aria-describedby": `info max-tags`, onFocus: (ev) => this.handleTagAreaFocus(ev), onBlur: (ev) => {
|
|
931
931
|
this.focusedTagIndex = undefined;
|
|
932
932
|
this.handleBlur(ev);
|
|
933
|
-
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), this.isDropdown && this.renderDropdownInput(), this.isTable && this.renderTableInput()), this.isDropdown && (h("div", { key: '
|
|
933
|
+
}, onKeyDown: (ev) => this.handleTagAreaKeyDown(ev) }, this.renderTags()), this.isDropdown && this.renderDropdownInput(), this.isTable && this.renderTableInput()), this.isDropdown && (h("div", { key: 'f6c8abfeba27ff6c8a3e769c90ef8a005ff9a661', class: "character-count" }, this.charCount, "/", this.characterLimit))), this.renderTagCounter(), this.isDropdown && this.renderDropdown()), this.info && (h("div", { key: 'f8633a6fe6a65ac8a3b17f4a9fb8ba1fabe1d827', id: "info", class: "info-text" }, this.info)), h("div", { key: '09279e977b383947404bb3c47dd41a6461e9e259', id: "error" }, this.errorMessage), h("div", { key: 'c9622856c1e7f6fcc9f162563245e561f962252f', class: "sr-only", "aria-live": "polite", ref: (el) => (this.liveRegionEl = el), "aria-atomic": "true" }, this.liveRegionMessage), this.isTable && this.renderTable()));
|
|
934
934
|
}
|
|
935
935
|
static get is() { return "wm-tag-input"; }
|
|
936
936
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class Textarea {
|
|
|
71
71
|
this.announcement = message;
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: '7f63d4224b5570bac29bf622adbd24c12a987fce', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '4b0b469d325eec11069f363f5e7bd44d67a10a46', class: "label-wrapper" }, h("label", { key: '9f7494233096cd6bd246a0994d3e9e04f4ded813', htmlFor: "inputfield", class: "label", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label, this.characterLimit && (h("span", { key: '558c487419c9906646191d3f57e3826f0e0474ec', class: "sr-only" }, " ", globalMessages.getCharacterLimit(this.characterLimit)))), this.requiredField && (h("span", { key: '5efa5cc6d810b34ecb81da1ac013827961b9400f', class: "required", "aria-hidden": "true" }, "*"))), h("div", { key: 'caa5d6620b159c6cf24b763afd546c5ab958d625', class: "inner-wrapper" }, h("div", { key: '160d74581d77259428c48c0ade43038280820e10', class: `inputfield-wrapper ${this.errorMessage ? "invalid" : ""}`, style: this.inputWidth ? { width: this.inputWidth } : {} }, h("textarea", { key: '00698ddec17a31ed6cd4ffc27e126bfeaa6aa185', id: "inputfield", disabled: this.isDisabled, "aria-describedby": "info error", onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleBlur(), placeholder: this.placeholder, autocomplete: "off", "aria-required": this.requiredField ? "true" : null, value: this.value, rows: 3, style: { height: this.inputHeight } }), this.characterLimit && typeof this.characterLimit === "number" ? (h("div", { class: `character-count ${this.value.length > this.characterLimit ? "exceeded" : ""}` }, this.charCount, "/", this.characterLimit)) : ("")), this.info && (h("div", { key: 'bf3461f07b38d3ef97143cf3cf1b6d1f2351e079', id: "info", class: "info" }, this.info)), h("div", { key: '39a86570c355661e0136b1bd4855d68fec298514', id: "error", class: "error-message" }, this.errorMessage), h("div", { key: '274ebbb587acc31f4d9ffda5d1ba01f279a9053c', id: "live-polite", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "wm-textarea"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -281,13 +281,13 @@ export class Timepicker {
|
|
|
281
281
|
return this.times.map((time, index) => (h("li", { id: `option${index + 1}`, "data-time": time, role: "option", onClick: () => this.handleOptionClick(time) }, this.reformatTimeInternal("12", time))));
|
|
282
282
|
}
|
|
283
283
|
render() {
|
|
284
|
-
return (h(Host, { key: '
|
|
284
|
+
return (h(Host, { key: '85faaac7eaff466eef31897a1d02e29d7ec7b223', onBlur: () => this.close(false) }, h("div", { key: '82f88250e7090d6517e7ecd25a4423ff0b7638d7', class: `wrapper label-${this.labelPosition} ${!!this.errorMessage ? "invalid" : ""}`, ref: (t) => (this.tpWrapper = t) }, h("div", { key: '114df6b8a382f59b8b6ea238c29051c1ddf568a0', class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { key: 'd26dcc57be0e23f599d64df50520056cf88c9bf9', id: "label", class: "label", htmlFor: "time-input", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '2b47dbd56c50265a5128a1c77e312b5745db6e2e', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: '46df6ba5efc5d779fb301b2e799f19e6acd6a48f' }, h("div", { key: '13c58fb83da101c3ffba9f7647ad3202898db08a', class: "inner-wrapper" }, h("input", { key: 'dc442e2553f0c070355744ad614b2543eac29c62', id: "time-input", "aria-label": this.label, "aria-describedby": "error", ref: (el) => (this.inputEl = el), onBlur: () => this.handleInputBlur(), onInput: () => (this.value = this.inputEl.value), disabled: this.isDisabled, "aria-required": this.requiredField ? "true" : null, placeholder: this.timeFormat, autocomplete: "off", value: this.value, onFocus: () => this.tpWrapper.classList.add("focus") }), h("button", { key: '298e10e7a3edb327d37d7450e3780aeb483934c6', id: "btn", ref: (el) => (this.buttonEl = el), disabled: this.isDisabled, "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", "aria-label": this.buttonAriaLabel, "aria-describedby": "time-input", onClick: () => (this.isExpanded ? this.close() : this.open()),
|
|
285
285
|
// This addresses an issue in Safari, where clicking buttons does not focus them
|
|
286
286
|
// if the button does not receive focus when clicked, Timepicker incorrectly emits a blur event
|
|
287
287
|
onMouseDown: (ev) => {
|
|
288
288
|
ev.preventDefault();
|
|
289
289
|
this.buttonEl.focus();
|
|
290
|
-
} }, h("span", { key: '
|
|
290
|
+
} }, h("span", { key: 'f5269ee6b6266dd404f11b5c6cc943082dd539f7', class: "svg-icon svg-time" })), h("ul", { key: '219ad64e4a20f478927adff1af541ecc0b8ca688', class: `options ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, id: "list", role: "listbox", "aria-labelledby": "label", "aria-describedby": this.isExpanded ? "collapsed" : null, tabindex: -1, ref: (el) => (this.optionsEl = el) }, this.renderOptions())), h("div", { key: '709e44a44ed4f99a7cbdbc4dacd461f73615324c', id: "error", class: "error" }, this.errorMessage)), h("div", { key: '0b9919a2c9701b6b76b76b780fd35a240eb2adf6', id: "live-polite", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }))));
|
|
291
291
|
}
|
|
292
292
|
static get is() { return "wm-timepicker"; }
|
|
293
293
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,11 +229,11 @@ export class Toggletip {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
render() {
|
|
232
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '19824ec52b7d5a97250fdf7099041c47a9c10667', class: `size-${this.targetSize}` }, h("button", { key: '8442fd803719d93d0354dec15c8f17085f22d955', ref: (el) => (this.buttonEl = el), class: "button", type: "button", "aria-label": this.label, popoverTarget: "toggletip", popoverTargetAction: "toggle", onClick: () => this.open(),
|
|
233
233
|
// In order to position the tooltip identically to the toggletip, its presence is determined by these four events
|
|
234
|
-
onMouseEnter: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => hideTooltip(), onFocus: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, this.renderIcon()), h("div", { key: '
|
|
234
|
+
onMouseEnter: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onMouseLeave: () => hideTooltip(), onFocus: () => !this.isOpen && showTooltip(this.toggletipPosition, this.el, this.tooltipMessage), onBlur: () => this.handleBlur() }, this.renderIcon()), h("div", { key: 'dfd429b739ef31459a4957a8cfd36c0279e83e24', popover: "", ref: (el) => (this.toggletipEl = el), class: `toggletip ${this.targetSize} ${this.isHidden ? "hidden" : ""}`, id: "toggletip",
|
|
235
235
|
// @ts-ignore - despite what Typescript says, this is a valid event for popover elements
|
|
236
|
-
onToggle: (ev) => this.handlePopoverToggle(ev) }, this.tooltip), h("div", { key: '
|
|
236
|
+
onToggle: (ev) => this.handlePopoverToggle(ev) }, this.tooltip), h("div", { key: 'af70f189b7f510fc3ae813edfd958050b11e636c', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" })));
|
|
237
237
|
}
|
|
238
238
|
static get is() { return "wm-toggletip"; }
|
|
239
239
|
static get encapsulation() { return "shadow"; }
|
|
@@ -313,9 +313,9 @@ export class Uploader {
|
|
|
313
313
|
return (h("div", { class: `drop-area -${this.dropArea}`, ref: (el) => (this.dropAreaEl = el), onDragEnter: (ev) => this.handleDragEnter(ev), onDragOver: (ev) => this.handleDragOver(ev), onDragLeave: (ev) => this.handleDragLeave(ev), onDrop: (ev) => this.handleDrop(ev) }, this.dropArea == "page" && (h("div", { ref: (el) => (this.dropOverlayEl = el), class: "drop-overlay", popover: "manual" }, h("span", { class: "upload-arrow" }), h("span", null, "Drop to Upload")))));
|
|
314
314
|
}
|
|
315
315
|
render() {
|
|
316
|
-
return (h(Host, { key: '
|
|
316
|
+
return (h(Host, { key: 'f6796cb24519a9cce643c24c69abeb9d33c8632f', class: `-${this.dropArea}` }, this.uploaderType == "drop" && this.renderDropArea(), this.label && this.renderLabel(), this.renderHeader(), this.renderListContainer(), h("div", { key: 'ffe55bea4476877b4df8f3c2df3edcb7ac9ab673', ref: (el) => (this.assertiveLiveRegionEl = el), class: "live-region sr-only", "aria-live": "assertive" // since it's directly linked to the action the user took, it should be read in priority. With polite, some messages get dismissed in favor of the page title
|
|
317
317
|
,
|
|
318
|
-
"aria-atomic": "true" }), h("div", { key: '
|
|
318
|
+
"aria-atomic": "true" }), h("div", { key: 'b38debdfda642c215bbb570082dfdeef24da8a8f', ref: (el) => (this.politeLiveRegionEl = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" })));
|
|
319
319
|
}
|
|
320
320
|
static get is() { return "wm-uploader"; }
|
|
321
321
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-130e07bb.js';
|
|
2
|
-
import { i as intl, c as checkForActiveElInShadow, e as safeMultiplyFloat, f as getPosition } from './functions-
|
|
2
|
+
import { i as intl, c as checkForActiveElInShadow, e as safeMultiplyFloat, f as getPosition } from './functions-38e392cb.js';
|
|
3
3
|
|
|
4
4
|
const colors = {
|
|
5
5
|
salmon: "#ff5f4e",
|
|
@@ -10585,4 +10585,4 @@ const weekdays = [
|
|
|
10585
10585
|
intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
|
|
10586
10586
|
];
|
|
10587
10587
|
|
|
10588
|
-
export { findPrev as A, getTextDir as B,
|
|
10588
|
+
export { findPrev as A, getTextDir as B, throttle as C, getContextMeasurements as D, dateFind as E, calendar_months as F, findParentWithHiddenOverflow as G, transposeMatrix as H, wrapAround as I, getSmallestSkipInterval as J, calcPercentageInRange as K, isElOrChild as L, makeISO as M, getMonthLength as N, weekdays as O, handleDisabledAttribute as a, triggerFormSubmit as b, checkForActiveElInShadow as c, debounce as d, safeMultiplyFloat as e, getPosition as f, generateId as g, hideTooltip as h, intl as i, findAllScrollableParents as j, dateToISO as k, shouldOpenUp as l, hasRoomRight as m, truncateText as n, getLastFocusableDescendant as o, csvToArray as p, snakeCaseToCamelCase as q, getNewIndexToFocus as r, showTooltip as s, toBool as t, getCumulativeScrollOffset as u, shouldOpenDown as v, shouldShiftRight as w, shouldShiftLeft as x, measureText as y, findNext as z };
|