@watermarkinsights/ripple 5.6.0-8 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chartFunctions-995023b1.js → chartFunctions-6fd43417.js} +1 -1
- package/dist/cjs/{functions-e24249e6.js → functions-04149f6d.js} +0 -6
- package/dist/cjs/{global-9662b435.js → global-4a315ae6.js} +1 -1
- package/dist/cjs/index-e86c28b6.js +0 -12
- package/dist/cjs/{intl-5aeba788.js → intl-b1e99809.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/wm-button.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-line-chart.cjs.entry.js +10 -25
- package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/wm-modal.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +338 -33
- package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
- package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -5
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +7 -22
- package/dist/collection/components/wm-option/wm-option.js +9 -35
- package/dist/collection/components/wm-option/wm-option.spec.js +1 -1
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.css +74 -0
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.js +383 -16
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.spec.js +62 -62
- package/dist/collection/global/functions.js +0 -5
- package/dist/esm/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
- package/dist/esm/{functions-b791a892.js → functions-cf37f81f.js} +1 -6
- package/dist/esm/{global-f1582c2f.js → global-016b76a8.js} +1 -1
- package/dist/esm/index-558b5a82.js +0 -12
- package/dist/esm/{intl-f2f7ce8b.js → intl-c72b75dc.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/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-input.entry.js +2 -2
- package/dist/esm/wm-line-chart.entry.js +10 -25
- package/dist/esm/wm-modal-header.entry.js +2 -2
- package/dist/esm/wm-modal.entry.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-option_2.entry.js +338 -33
- package/dist/esm/wm-pagination.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/wm-tag-input.entry.js +2 -2
- package/dist/esm/wm-tag-option.entry.js +1 -1
- package/dist/esm/wm-textarea.entry.js +2 -2
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +1 -1
- package/dist/esm/wm-uploader.entry.js +2 -2
- package/dist/esm-es5/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
- package/dist/esm-es5/{functions-b791a892.js → functions-cf37f81f.js} +1 -1
- package/dist/esm-es5/global-016b76a8.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -1
- package/dist/esm-es5/{intl-f2f7ce8b.js → intl-c72b75dc.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/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-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.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-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-c1e3c2fb.entry.js → p-04f9a60a.entry.js} +1 -1
- package/dist/ripple/{p-41550baa.entry.js → p-0b570b66.entry.js} +1 -1
- package/dist/ripple/{p-5300b15d.entry.js → p-0d05b4a9.entry.js} +1 -1
- package/dist/ripple/p-11aaef56.system.entry.js +1 -0
- package/dist/ripple/{p-b01f9998.system.entry.js → p-120dbdc8.system.entry.js} +1 -1
- package/dist/ripple/{p-f24572f5.entry.js → p-1aef4b40.entry.js} +1 -1
- package/dist/ripple/{p-13f51c06.entry.js → p-20a800a7.entry.js} +1 -1
- package/dist/ripple/{p-236af552.entry.js → p-24103be5.entry.js} +1 -1
- package/dist/ripple/{p-1389302e.system.entry.js → p-2ccf8450.system.entry.js} +1 -1
- package/dist/ripple/{p-6cc07645.system.entry.js → p-2d0bcc88.system.entry.js} +1 -1
- package/dist/ripple/{p-0b1c6965.system.entry.js → p-2d0e4020.system.entry.js} +1 -1
- package/dist/ripple/{p-215793a4.entry.js → p-31094930.entry.js} +1 -1
- package/dist/ripple/{p-1e625a5e.entry.js → p-3ea0e27c.entry.js} +1 -1
- package/dist/ripple/{p-db9657eb.system.entry.js → p-446e0b2c.system.entry.js} +1 -1
- package/dist/ripple/{p-72165bd2.entry.js → p-451433a6.entry.js} +1 -1
- package/dist/ripple/p-481a9e2f.system.js +1 -0
- package/dist/ripple/{p-45f9ad09.entry.js → p-508362c5.entry.js} +1 -1
- package/dist/ripple/{p-3deaf4d9.system.entry.js → p-53519eed.system.entry.js} +1 -1
- package/dist/ripple/p-55668879.system.js +1 -0
- package/dist/ripple/p-5967bd2a.system.entry.js +1 -0
- package/dist/ripple/{p-5a9e3108.system.entry.js → p-5db92638.system.entry.js} +1 -1
- package/dist/ripple/{p-3e415c49.system.entry.js → p-5f793375.system.entry.js} +1 -1
- package/dist/ripple/p-6636a40b.system.entry.js +1 -0
- package/dist/ripple/{p-f90e4094.entry.js → p-6f4c4231.entry.js} +1 -1
- package/dist/ripple/{p-828adbf1.system.js → p-74032162.system.js} +1 -1
- package/dist/ripple/{p-5284791c.entry.js → p-762429a8.entry.js} +1 -1
- package/dist/ripple/{p-16f65bf4.js → p-76825602.js} +1 -1
- package/dist/ripple/{p-c47fab48.entry.js → p-76d53189.entry.js} +1 -1
- package/dist/ripple/{p-fa4f1030.system.entry.js → p-7f483c55.system.entry.js} +1 -1
- package/dist/ripple/{p-a3c01e10.system.entry.js → p-7fdcce90.system.entry.js} +1 -1
- package/dist/ripple/{p-cad0c5f9.system.entry.js → p-8008f0f2.system.entry.js} +1 -1
- package/dist/ripple/{p-3d50db36.entry.js → p-86d81e42.entry.js} +1 -1
- package/dist/ripple/{p-f2101a0d.entry.js → p-8a11ee6f.entry.js} +1 -1
- package/dist/ripple/{p-c2e00d4a.system.entry.js → p-8b272d80.system.entry.js} +1 -1
- package/dist/ripple/{p-885c3527.entry.js → p-9603168d.entry.js} +1 -1
- package/dist/ripple/{p-f40e1468.system.entry.js → p-97f276aa.system.entry.js} +1 -1
- package/dist/ripple/{p-749597da.system.entry.js → p-984287f7.system.entry.js} +1 -1
- package/dist/ripple/{p-ff1ed90f.entry.js → p-9b75d56c.entry.js} +1 -1
- package/dist/ripple/{p-a0ecb6d7.system.entry.js → p-9df3574d.system.entry.js} +1 -1
- package/dist/ripple/p-a40b0af9.system.js +1 -0
- package/dist/ripple/p-a895f1ef.entry.js +1 -0
- package/dist/ripple/{p-e081fdc2.system.entry.js → p-ae4460f2.system.entry.js} +1 -1
- package/dist/ripple/{p-b9dbf1f4.entry.js → p-bd142645.entry.js} +1 -1
- package/dist/ripple/{p-aea13873.entry.js → p-c61366fd.entry.js} +1 -1
- package/dist/ripple/{p-ca971eac.system.entry.js → p-c9200deb.system.entry.js} +1 -1
- package/dist/ripple/{p-6d129ef8.system.entry.js → p-cd51ee87.system.entry.js} +1 -1
- package/dist/ripple/{p-465d44f0.system.entry.js → p-ce8c6180.system.entry.js} +1 -1
- package/dist/ripple/{p-84ba5b74.entry.js → p-d0387d35.entry.js} +1 -1
- package/dist/ripple/{p-ed1f6b8d.system.entry.js → p-d8994408.system.entry.js} +1 -1
- package/dist/ripple/{p-eddbcb21.js → p-db190563.js} +1 -1
- package/dist/ripple/{p-83be63f6.entry.js → p-db8917e4.entry.js} +1 -1
- package/dist/ripple/{p-505eca1c.system.entry.js → p-dc7a6037.system.entry.js} +1 -1
- package/dist/ripple/p-dfd1b720.entry.js +1 -0
- package/dist/ripple/{p-df157138.entry.js → p-e3899e1f.entry.js} +1 -1
- package/dist/ripple/{p-30b905eb.system.entry.js → p-ed1971ff.system.entry.js} +1 -1
- package/dist/ripple/{p-2e79fa49.entry.js → p-f177d841.entry.js} +1 -1
- package/dist/ripple/{p-149a22bf.entry.js → p-f4b64ded.entry.js} +1 -1
- package/dist/ripple/p-f9494a9d.js +1 -0
- package/dist/ripple/{p-21d372ed.js → p-fb229776.js} +1 -1
- package/dist/ripple/{p-81c2df85.system.js → p-fb751343.system.js} +1 -1
- package/dist/ripple/{p-c853e185.system.entry.js → p-ffa15c47.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +1 -1
- package/dist/types/components/wm-option/wm-option.d.ts +39 -0
- package/dist/types/components/wm-select/wm-select.d.ts +96 -0
- package/dist/types/components.d.ts +2 -148
- package/dist/types/global/functions.d.ts +0 -1
- package/package.json +2 -2
- package/dist/cjs/priv-option-list.cjs.entry.js +0 -384
- package/dist/cjs/wm-nested-select.cjs.entry.js +0 -295
- package/dist/cjs/wm-optgroup.cjs.entry.js +0 -56
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -104
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -714
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -378
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -581
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -77
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -197
- package/dist/collection/dev/nested-select.js +0 -62
- package/dist/esm/priv-option-list.entry.js +0 -380
- package/dist/esm/wm-nested-select.entry.js +0 -291
- package/dist/esm/wm-optgroup.entry.js +0 -52
- package/dist/esm-es5/global-f1582c2f.js +0 -1
- package/dist/esm-es5/priv-option-list.entry.js +0 -1
- package/dist/esm-es5/wm-nested-select.entry.js +0 -1
- package/dist/esm-es5/wm-optgroup.entry.js +0 -1
- package/dist/ripple/p-104c0e9b.system.entry.js +0 -1
- package/dist/ripple/p-17c8aac1.system.entry.js +0 -1
- package/dist/ripple/p-24ba754f.entry.js +0 -1
- package/dist/ripple/p-2fb58947.entry.js +0 -1
- package/dist/ripple/p-4564a101.system.entry.js +0 -1
- package/dist/ripple/p-4ca5ed96.entry.js +0 -1
- package/dist/ripple/p-50388b6f.system.entry.js +0 -1
- package/dist/ripple/p-5b9babd9.system.entry.js +0 -1
- package/dist/ripple/p-8835adfb.entry.js +0 -1
- package/dist/ripple/p-ae82b3d2.system.js +0 -1
- package/dist/ripple/p-ba422994.entry.js +0 -1
- package/dist/ripple/p-bfeb6ef8.system.js +0 -1
- package/dist/ripple/p-cf2121f3.system.entry.js +0 -1
- package/dist/ripple/p-cf55659f.js +0 -1
- package/dist/ripple/p-f6fd623f.system.js +0 -1
- package/dist/types/components/selects/wm-select/wm-select.d.ts +0 -53
- /package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.e2e.js +0 -0
|
@@ -1,581 +0,0 @@
|
|
|
1
|
-
import { h, Host, forceUpdate } from "@stencil/core";
|
|
2
|
-
import { getTextDir, intl, isElOrChild, toBool } from "../../../global/functions";
|
|
3
|
-
import { globalMessages } from "../../../global/intl";
|
|
4
|
-
export class NestedSelect {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.overflowCount = 0;
|
|
7
|
-
this.displayedOptions = [];
|
|
8
|
-
this.clearSelectionMessage = this.multiple
|
|
9
|
-
? intl.formatMessage({
|
|
10
|
-
id: "select.multiClearSelection",
|
|
11
|
-
defaultMessage: "Clear all Selections",
|
|
12
|
-
description: "Button text to clear selection. Use imperative",
|
|
13
|
-
})
|
|
14
|
-
: intl.formatMessage({
|
|
15
|
-
id: "select.singleClearSelection",
|
|
16
|
-
defaultMessage: "Clear Selection",
|
|
17
|
-
description: "Button text to clear selection. Use imperative",
|
|
18
|
-
});
|
|
19
|
-
this.disabled = false;
|
|
20
|
-
this.maxHeight = undefined;
|
|
21
|
-
this.label = undefined;
|
|
22
|
-
this.labelPosition = "top";
|
|
23
|
-
this.requiredField = false;
|
|
24
|
-
this.errorMessage = undefined;
|
|
25
|
-
this.multiple = false;
|
|
26
|
-
this.search = false;
|
|
27
|
-
this.selectAll = false;
|
|
28
|
-
this.placeholder = this.multiple
|
|
29
|
-
? intl.formatMessage({
|
|
30
|
-
id: "select.multiPlaceholder",
|
|
31
|
-
defaultMessage: "Make a selection",
|
|
32
|
-
description: "Placeholder text for multiple select. Use imperative",
|
|
33
|
-
})
|
|
34
|
-
: intl.formatMessage({
|
|
35
|
-
id: "select.singlePlaceholder",
|
|
36
|
-
defaultMessage: "Select an Option",
|
|
37
|
-
description: "Placeholder text for single select. Use imperative",
|
|
38
|
-
});
|
|
39
|
-
this.searchPlaceholder = intl.formatMessage({
|
|
40
|
-
id: "select.searchPlaceholder",
|
|
41
|
-
defaultMessage: "Search",
|
|
42
|
-
description: "Placeholder text. Use imperative",
|
|
43
|
-
});
|
|
44
|
-
this.allSelectedMessage = intl.formatMessage({
|
|
45
|
-
id: "select.allSelected",
|
|
46
|
-
defaultMessage: "All selected",
|
|
47
|
-
description: "Text displayed when all options are selected",
|
|
48
|
-
});
|
|
49
|
-
this.isExpanded = false;
|
|
50
|
-
this.optgroupExpanded = false;
|
|
51
|
-
}
|
|
52
|
-
get isDisabled() {
|
|
53
|
-
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
54
|
-
return toBool(this.disabled);
|
|
55
|
-
}
|
|
56
|
-
get childOptions() {
|
|
57
|
-
return Array.from(this.el.querySelectorAll("wm-option"));
|
|
58
|
-
}
|
|
59
|
-
get optgroupEls() {
|
|
60
|
-
return Array.from(this.el.querySelectorAll("wm-optgroup"));
|
|
61
|
-
}
|
|
62
|
-
get menuitemEls() {
|
|
63
|
-
return Array.from(this.el.shadowRoot.querySelectorAll(".menuitem"));
|
|
64
|
-
}
|
|
65
|
-
get allSelected() {
|
|
66
|
-
return this.childOptions.every((option) => option.selected);
|
|
67
|
-
}
|
|
68
|
-
componentWillLoad() {
|
|
69
|
-
const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
|
|
70
|
-
mutationObserver.observe(this.el, {
|
|
71
|
-
childList: true,
|
|
72
|
-
attributes: true,
|
|
73
|
-
subtree: true,
|
|
74
|
-
attributeFilter: ["selected"],
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
componentDidLoad() {
|
|
78
|
-
if (this.maxHeight) {
|
|
79
|
-
// this.listboxEl.style.maxHeight = this.maxHeight;
|
|
80
|
-
this.dropdownEl.style.maxHeight = this.maxHeight;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
handleChildChange(_) {
|
|
84
|
-
// on update of children or children selected state, reset button text and rerender
|
|
85
|
-
this.setButtonText();
|
|
86
|
-
forceUpdate(this.el);
|
|
87
|
-
// this.optionListEl.handleChildChange(_);
|
|
88
|
-
}
|
|
89
|
-
setButtonText() {
|
|
90
|
-
this.displayedOptions = this.childOptions.filter((x) => x.selected);
|
|
91
|
-
// handle overflow + counter for multiselect
|
|
92
|
-
if (this.multiple) {
|
|
93
|
-
// this is a fixed measurement accounting for the max width of a 3 character overflow counter
|
|
94
|
-
const overflowCounterWidth = 38;
|
|
95
|
-
const computedStyle = window.getComputedStyle(this.buttonEl);
|
|
96
|
-
// there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
|
|
97
|
-
const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
|
|
98
|
-
const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
|
|
99
|
-
const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
|
|
100
|
-
let optionsWidths = this.displayedOptions.map((x) => x.shadowRoot.querySelector(".option-text").clientWidth);
|
|
101
|
-
let optionsTotalWidth = optionsWidths.reduce((acc, x) => acc + x, 0);
|
|
102
|
-
this.overflowCount = 0;
|
|
103
|
-
while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
|
|
104
|
-
this.overflowCount++;
|
|
105
|
-
optionsTotalWidth -= optionsWidths[optionsWidths.length - 1];
|
|
106
|
-
optionsWidths.pop();
|
|
107
|
-
this.displayedOptions.pop();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
countOptgroupSelected(optgroupEl) {
|
|
112
|
-
let selectedOptions = Array.from(optgroupEl.querySelectorAll("wm-option")).filter((option) => option.selected);
|
|
113
|
-
return selectedOptions.length;
|
|
114
|
-
}
|
|
115
|
-
handleOptionSelection() {
|
|
116
|
-
if (!this.multiple) {
|
|
117
|
-
this.close();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
handleChildEnter() {
|
|
121
|
-
// only occurs for multiselects. handle the click, then close
|
|
122
|
-
this.close();
|
|
123
|
-
}
|
|
124
|
-
closePopupOnEscape() {
|
|
125
|
-
this.close();
|
|
126
|
-
}
|
|
127
|
-
handleOptionKeyLeft(ev) {
|
|
128
|
-
const parentOptgroup = ev.detail.parentElement;
|
|
129
|
-
parentOptgroup.isExpanded = false;
|
|
130
|
-
this.focusFirstMenuitem();
|
|
131
|
-
}
|
|
132
|
-
close(returnFocus = true) {
|
|
133
|
-
if (this.isExpanded) {
|
|
134
|
-
this.isExpanded = false;
|
|
135
|
-
this.optgroupEls.forEach((optgroupEl) => (optgroupEl.isExpanded = false));
|
|
136
|
-
window.setTimeout(() => {
|
|
137
|
-
this.dropdownEl.classList.remove("open");
|
|
138
|
-
if (returnFocus) {
|
|
139
|
-
this.buttonEl.focus();
|
|
140
|
-
}
|
|
141
|
-
}, 150);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
open() {
|
|
145
|
-
// TODO implement opening upwards if not enough space below
|
|
146
|
-
this.isExpanded = true;
|
|
147
|
-
this.dropdownEl.classList.add("open");
|
|
148
|
-
window.requestAnimationFrame(() => {
|
|
149
|
-
this.focusFirstMenuitem();
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
focusFirstMenuitem() {
|
|
153
|
-
if (this.menuitemEls.length > 0) {
|
|
154
|
-
this.menuitemEls[0].focus();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
moveDown(menuitemEl) {
|
|
158
|
-
const currentIndex = this.menuitemEls.indexOf(menuitemEl);
|
|
159
|
-
if (currentIndex == this.menuitemEls.length - 1) {
|
|
160
|
-
this.menuitemEls[0].focus();
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
this.menuitemEls[currentIndex + 1].focus();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
moveUp(menuitemEl) {
|
|
167
|
-
const currentIndex = this.menuitemEls.indexOf(menuitemEl);
|
|
168
|
-
if (currentIndex == 0) {
|
|
169
|
-
this.menuitemEls[this.menuitemEls.length - 1].focus();
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
this.menuitemEls[currentIndex - 1].focus();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
handleButtonBlur(ev) {
|
|
176
|
-
if (isElOrChild(this.el, ev.relatedTarget)) {
|
|
177
|
-
// do not emit a blur event when opening the dropdown and focusing the Options
|
|
178
|
-
ev.stopPropagation();
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
handleClick(ev) {
|
|
182
|
-
if (!isElOrChild(this.el, ev.target)) {
|
|
183
|
-
this.close();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
handleMenuitemKeydown(ev) {
|
|
187
|
-
switch (ev.key) {
|
|
188
|
-
case "ArrowDown":
|
|
189
|
-
ev.preventDefault();
|
|
190
|
-
// focus next
|
|
191
|
-
this.moveDown(ev.target);
|
|
192
|
-
break;
|
|
193
|
-
case "ArrowUp":
|
|
194
|
-
ev.preventDefault();
|
|
195
|
-
this.moveUp(ev.target);
|
|
196
|
-
// focus previous
|
|
197
|
-
break;
|
|
198
|
-
case "ArrowRight":
|
|
199
|
-
if (ev.target.classList.contains("group-btn")) {
|
|
200
|
-
ev.preventDefault();
|
|
201
|
-
ev.target.click();
|
|
202
|
-
}
|
|
203
|
-
break;
|
|
204
|
-
case "Escape":
|
|
205
|
-
ev.preventDefault();
|
|
206
|
-
this.close();
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
handleComponentBlur(ev) {
|
|
211
|
-
// Do not close or emit custom blur event when blurring to an element inside (wm-option)
|
|
212
|
-
if (!this.el.contains(ev.relatedTarget)) {
|
|
213
|
-
this.close(false);
|
|
214
|
-
this.wmNestedSelectBlurred.emit();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
handleOptgroupExpanded() {
|
|
218
|
-
this.optgroupExpanded = true;
|
|
219
|
-
}
|
|
220
|
-
handleOptgroupHidden() {
|
|
221
|
-
this.optgroupExpanded = false;
|
|
222
|
-
}
|
|
223
|
-
renderButtonText() {
|
|
224
|
-
if (this.displayedOptions.length < 1) {
|
|
225
|
-
return h("span", null, this.placeholder);
|
|
226
|
-
}
|
|
227
|
-
else if (this.multiple && this.allSelected && this.overflowCount > 0) {
|
|
228
|
-
return this.allSelectedMessage;
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
renderOverflowCount() {
|
|
235
|
-
// TODO overflow count not appearing due to refactor, in both regular select and nested select
|
|
236
|
-
if (this.overflowCount > 0) {
|
|
237
|
-
return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
handleClearSelection() {
|
|
241
|
-
this.optgroupEls.forEach((optgroupEl) => optgroupEl.emitDeselection());
|
|
242
|
-
}
|
|
243
|
-
renderClearSelectionButton() {
|
|
244
|
-
let selectedCount = this.childOptions.some((o) => o.selected);
|
|
245
|
-
if (selectedCount) {
|
|
246
|
-
return (h("button", { class: "menuitem", onClick: () => this.handleClearSelection(), tabindex: -1, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, this.clearSelectionMessage));
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
renderSelectionCount(optgroupEl) {
|
|
250
|
-
const selectionCount = this.countOptgroupSelected(optgroupEl);
|
|
251
|
-
if (selectionCount) {
|
|
252
|
-
const selectionCountMessage = intl.formatMessage({
|
|
253
|
-
id: "select.optgroupSelectionCount",
|
|
254
|
-
defaultMessage: "{numSelected, plural, one {Item} other {#}} Selected",
|
|
255
|
-
description: "Text indicating number of selected in a group.",
|
|
256
|
-
}, { numSelected: selectionCount });
|
|
257
|
-
return (h("div", { class: "selection-count" }, h("span", null, selectionCountMessage)));
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
render() {
|
|
261
|
-
const buttonProps = {
|
|
262
|
-
id: "selectbtn",
|
|
263
|
-
["disabled"]: this.isDisabled,
|
|
264
|
-
["aria-controls"]: "list",
|
|
265
|
-
["aria-labelledby"]: "label selectbtn",
|
|
266
|
-
["aria-describedby"]: "error",
|
|
267
|
-
["aria-expanded"]: this.isExpanded ? "true" : "false",
|
|
268
|
-
onClick: () => {
|
|
269
|
-
this.isExpanded ? this.close() : this.open();
|
|
270
|
-
},
|
|
271
|
-
};
|
|
272
|
-
return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
|
|
273
|
-
// we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
|
|
274
|
-
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText())), this.renderOverflowCount()), h("div", { class: "dropdown", ref: (el) => (this.dropdownEl = el) }, h("div", { class: `menu ${this.optgroupExpanded ? "hidden" : ""}` }, this.renderClearSelectionButton(), this.optgroupEls.map((optgroupEl) => {
|
|
275
|
-
return (h("button", { class: "menuitem group-btn", role: "menuitem", tabindex: -1, onClick: () => {
|
|
276
|
-
optgroupEl.isExpanded = !optgroupEl.isExpanded;
|
|
277
|
-
forceUpdate(this.el);
|
|
278
|
-
}, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, h("span", null, optgroupEl.label), this.renderSelectionCount(optgroupEl)));
|
|
279
|
-
})), h("div", { class: `option-list-wrapper ${this.optgroupExpanded ? "visible" : ""}` }, h("slot", null))), h("div", { id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage)))));
|
|
280
|
-
}
|
|
281
|
-
static get is() { return "wm-nested-select"; }
|
|
282
|
-
static get encapsulation() { return "shadow"; }
|
|
283
|
-
static get delegatesFocus() { return true; }
|
|
284
|
-
static get originalStyleUrls() {
|
|
285
|
-
return {
|
|
286
|
-
"$": ["wm-nested-select.scss"]
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
static get styleUrls() {
|
|
290
|
-
return {
|
|
291
|
-
"$": ["wm-nested-select.css"]
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
static get properties() {
|
|
295
|
-
return {
|
|
296
|
-
"disabled": {
|
|
297
|
-
"type": "boolean",
|
|
298
|
-
"mutable": false,
|
|
299
|
-
"complexType": {
|
|
300
|
-
"original": "boolean",
|
|
301
|
-
"resolved": "boolean",
|
|
302
|
-
"references": {}
|
|
303
|
-
},
|
|
304
|
-
"required": false,
|
|
305
|
-
"optional": false,
|
|
306
|
-
"docs": {
|
|
307
|
-
"tags": [],
|
|
308
|
-
"text": ""
|
|
309
|
-
},
|
|
310
|
-
"attribute": "disabled",
|
|
311
|
-
"reflect": true,
|
|
312
|
-
"defaultValue": "false"
|
|
313
|
-
},
|
|
314
|
-
"maxHeight": {
|
|
315
|
-
"type": "string",
|
|
316
|
-
"mutable": false,
|
|
317
|
-
"complexType": {
|
|
318
|
-
"original": "string",
|
|
319
|
-
"resolved": "string | undefined",
|
|
320
|
-
"references": {}
|
|
321
|
-
},
|
|
322
|
-
"required": false,
|
|
323
|
-
"optional": true,
|
|
324
|
-
"docs": {
|
|
325
|
-
"tags": [],
|
|
326
|
-
"text": ""
|
|
327
|
-
},
|
|
328
|
-
"attribute": "max-height",
|
|
329
|
-
"reflect": false
|
|
330
|
-
},
|
|
331
|
-
"label": {
|
|
332
|
-
"type": "string",
|
|
333
|
-
"mutable": true,
|
|
334
|
-
"complexType": {
|
|
335
|
-
"original": "string",
|
|
336
|
-
"resolved": "string | undefined",
|
|
337
|
-
"references": {}
|
|
338
|
-
},
|
|
339
|
-
"required": false,
|
|
340
|
-
"optional": true,
|
|
341
|
-
"docs": {
|
|
342
|
-
"tags": [],
|
|
343
|
-
"text": ""
|
|
344
|
-
},
|
|
345
|
-
"attribute": "label",
|
|
346
|
-
"reflect": false
|
|
347
|
-
},
|
|
348
|
-
"labelPosition": {
|
|
349
|
-
"type": "string",
|
|
350
|
-
"mutable": false,
|
|
351
|
-
"complexType": {
|
|
352
|
-
"original": "\"top\" | \"left\" | \"none\"",
|
|
353
|
-
"resolved": "\"left\" | \"none\" | \"top\"",
|
|
354
|
-
"references": {}
|
|
355
|
-
},
|
|
356
|
-
"required": false,
|
|
357
|
-
"optional": false,
|
|
358
|
-
"docs": {
|
|
359
|
-
"tags": [],
|
|
360
|
-
"text": ""
|
|
361
|
-
},
|
|
362
|
-
"attribute": "label-position",
|
|
363
|
-
"reflect": false,
|
|
364
|
-
"defaultValue": "\"top\""
|
|
365
|
-
},
|
|
366
|
-
"requiredField": {
|
|
367
|
-
"type": "boolean",
|
|
368
|
-
"mutable": false,
|
|
369
|
-
"complexType": {
|
|
370
|
-
"original": "boolean",
|
|
371
|
-
"resolved": "boolean",
|
|
372
|
-
"references": {}
|
|
373
|
-
},
|
|
374
|
-
"required": false,
|
|
375
|
-
"optional": false,
|
|
376
|
-
"docs": {
|
|
377
|
-
"tags": [],
|
|
378
|
-
"text": ""
|
|
379
|
-
},
|
|
380
|
-
"attribute": "required-field",
|
|
381
|
-
"reflect": false,
|
|
382
|
-
"defaultValue": "false"
|
|
383
|
-
},
|
|
384
|
-
"errorMessage": {
|
|
385
|
-
"type": "string",
|
|
386
|
-
"mutable": true,
|
|
387
|
-
"complexType": {
|
|
388
|
-
"original": "string",
|
|
389
|
-
"resolved": "string | undefined",
|
|
390
|
-
"references": {}
|
|
391
|
-
},
|
|
392
|
-
"required": false,
|
|
393
|
-
"optional": true,
|
|
394
|
-
"docs": {
|
|
395
|
-
"tags": [],
|
|
396
|
-
"text": ""
|
|
397
|
-
},
|
|
398
|
-
"attribute": "error-message",
|
|
399
|
-
"reflect": false
|
|
400
|
-
},
|
|
401
|
-
"multiple": {
|
|
402
|
-
"type": "boolean",
|
|
403
|
-
"mutable": false,
|
|
404
|
-
"complexType": {
|
|
405
|
-
"original": "boolean",
|
|
406
|
-
"resolved": "boolean",
|
|
407
|
-
"references": {}
|
|
408
|
-
},
|
|
409
|
-
"required": false,
|
|
410
|
-
"optional": false,
|
|
411
|
-
"docs": {
|
|
412
|
-
"tags": [],
|
|
413
|
-
"text": ""
|
|
414
|
-
},
|
|
415
|
-
"attribute": "multiple",
|
|
416
|
-
"reflect": false,
|
|
417
|
-
"defaultValue": "false"
|
|
418
|
-
},
|
|
419
|
-
"search": {
|
|
420
|
-
"type": "boolean",
|
|
421
|
-
"mutable": false,
|
|
422
|
-
"complexType": {
|
|
423
|
-
"original": "boolean",
|
|
424
|
-
"resolved": "boolean",
|
|
425
|
-
"references": {}
|
|
426
|
-
},
|
|
427
|
-
"required": false,
|
|
428
|
-
"optional": false,
|
|
429
|
-
"docs": {
|
|
430
|
-
"tags": [],
|
|
431
|
-
"text": ""
|
|
432
|
-
},
|
|
433
|
-
"attribute": "search",
|
|
434
|
-
"reflect": false,
|
|
435
|
-
"defaultValue": "false"
|
|
436
|
-
},
|
|
437
|
-
"selectAll": {
|
|
438
|
-
"type": "boolean",
|
|
439
|
-
"mutable": false,
|
|
440
|
-
"complexType": {
|
|
441
|
-
"original": "boolean",
|
|
442
|
-
"resolved": "boolean",
|
|
443
|
-
"references": {}
|
|
444
|
-
},
|
|
445
|
-
"required": false,
|
|
446
|
-
"optional": false,
|
|
447
|
-
"docs": {
|
|
448
|
-
"tags": [],
|
|
449
|
-
"text": ""
|
|
450
|
-
},
|
|
451
|
-
"attribute": "select-all",
|
|
452
|
-
"reflect": false,
|
|
453
|
-
"defaultValue": "false"
|
|
454
|
-
},
|
|
455
|
-
"placeholder": {
|
|
456
|
-
"type": "string",
|
|
457
|
-
"mutable": false,
|
|
458
|
-
"complexType": {
|
|
459
|
-
"original": "string",
|
|
460
|
-
"resolved": "string",
|
|
461
|
-
"references": {}
|
|
462
|
-
},
|
|
463
|
-
"required": false,
|
|
464
|
-
"optional": false,
|
|
465
|
-
"docs": {
|
|
466
|
-
"tags": [],
|
|
467
|
-
"text": ""
|
|
468
|
-
},
|
|
469
|
-
"attribute": "placeholder",
|
|
470
|
-
"reflect": false,
|
|
471
|
-
"defaultValue": "this.multiple\n ? intl.formatMessage({\n id: \"select.multiPlaceholder\",\n defaultMessage: \"Make a selection\",\n description: \"Placeholder text for multiple select. Use imperative\",\n })\n : intl.formatMessage({\n id: \"select.singlePlaceholder\",\n defaultMessage: \"Select an Option\",\n description: \"Placeholder text for single select. Use imperative\",\n })"
|
|
472
|
-
},
|
|
473
|
-
"searchPlaceholder": {
|
|
474
|
-
"type": "string",
|
|
475
|
-
"mutable": false,
|
|
476
|
-
"complexType": {
|
|
477
|
-
"original": "string",
|
|
478
|
-
"resolved": "string",
|
|
479
|
-
"references": {}
|
|
480
|
-
},
|
|
481
|
-
"required": false,
|
|
482
|
-
"optional": false,
|
|
483
|
-
"docs": {
|
|
484
|
-
"tags": [],
|
|
485
|
-
"text": ""
|
|
486
|
-
},
|
|
487
|
-
"attribute": "search-placeholder",
|
|
488
|
-
"reflect": false,
|
|
489
|
-
"defaultValue": "intl.formatMessage({\n id: \"select.searchPlaceholder\",\n defaultMessage: \"Search\",\n description: \"Placeholder text. Use imperative\",\n })"
|
|
490
|
-
},
|
|
491
|
-
"allSelectedMessage": {
|
|
492
|
-
"type": "string",
|
|
493
|
-
"mutable": false,
|
|
494
|
-
"complexType": {
|
|
495
|
-
"original": "string",
|
|
496
|
-
"resolved": "string",
|
|
497
|
-
"references": {}
|
|
498
|
-
},
|
|
499
|
-
"required": false,
|
|
500
|
-
"optional": false,
|
|
501
|
-
"docs": {
|
|
502
|
-
"tags": [],
|
|
503
|
-
"text": ""
|
|
504
|
-
},
|
|
505
|
-
"attribute": "all-selected-message",
|
|
506
|
-
"reflect": false,
|
|
507
|
-
"defaultValue": "intl.formatMessage({\n id: \"select.allSelected\",\n defaultMessage: \"All selected\",\n description: \"Text displayed when all options are selected\",\n })"
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
static get states() {
|
|
512
|
-
return {
|
|
513
|
-
"isExpanded": {},
|
|
514
|
-
"optgroupExpanded": {}
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
static get events() {
|
|
518
|
-
return [{
|
|
519
|
-
"method": "wmNestedSelectBlurred",
|
|
520
|
-
"name": "wmNestedSelectBlurred",
|
|
521
|
-
"bubbles": true,
|
|
522
|
-
"cancelable": true,
|
|
523
|
-
"composed": true,
|
|
524
|
-
"docs": {
|
|
525
|
-
"tags": [],
|
|
526
|
-
"text": ""
|
|
527
|
-
},
|
|
528
|
-
"complexType": {
|
|
529
|
-
"original": "void",
|
|
530
|
-
"resolved": "void",
|
|
531
|
-
"references": {}
|
|
532
|
-
}
|
|
533
|
-
}];
|
|
534
|
-
}
|
|
535
|
-
static get elementRef() { return "el"; }
|
|
536
|
-
static get listeners() {
|
|
537
|
-
return [{
|
|
538
|
-
"name": "wmOptionSelected",
|
|
539
|
-
"method": "handleOptionSelection",
|
|
540
|
-
"target": undefined,
|
|
541
|
-
"capture": false,
|
|
542
|
-
"passive": false
|
|
543
|
-
}, {
|
|
544
|
-
"name": "wmEnterKeyPressed",
|
|
545
|
-
"method": "handleChildEnter",
|
|
546
|
-
"target": undefined,
|
|
547
|
-
"capture": false,
|
|
548
|
-
"passive": false
|
|
549
|
-
}, {
|
|
550
|
-
"name": "wmEscKeyPressed",
|
|
551
|
-
"method": "closePopupOnEscape",
|
|
552
|
-
"target": undefined,
|
|
553
|
-
"capture": false,
|
|
554
|
-
"passive": false
|
|
555
|
-
}, {
|
|
556
|
-
"name": "wmKeyLeftPressed",
|
|
557
|
-
"method": "handleOptionKeyLeft",
|
|
558
|
-
"target": undefined,
|
|
559
|
-
"capture": false,
|
|
560
|
-
"passive": false
|
|
561
|
-
}, {
|
|
562
|
-
"name": "click",
|
|
563
|
-
"method": "handleClick",
|
|
564
|
-
"target": "document",
|
|
565
|
-
"capture": true,
|
|
566
|
-
"passive": false
|
|
567
|
-
}, {
|
|
568
|
-
"name": "optgroupExpanded",
|
|
569
|
-
"method": "handleOptgroupExpanded",
|
|
570
|
-
"target": undefined,
|
|
571
|
-
"capture": false,
|
|
572
|
-
"passive": false
|
|
573
|
-
}, {
|
|
574
|
-
"name": "optgroupHidden",
|
|
575
|
-
"method": "handleOptgroupHidden",
|
|
576
|
-
"target": undefined,
|
|
577
|
-
"capture": false,
|
|
578
|
-
"passive": false
|
|
579
|
-
}];
|
|
580
|
-
}
|
|
581
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------
|
|
2
|
-
1. Box-shadow
|
|
3
|
-
-------------------------------------- */
|
|
4
|
-
/* --------------------------------------
|
|
5
|
-
2. Border-radius
|
|
6
|
-
-------------------------------------- */
|
|
7
|
-
/* --------------------------------------
|
|
8
|
-
3. Transforms
|
|
9
|
-
-------------------------------------- */
|
|
10
|
-
/* --------------------------------------
|
|
11
|
-
4. Button Focus
|
|
12
|
-
-------------------------------------- */
|
|
13
|
-
/* --------------------------------------
|
|
14
|
-
5. Flex
|
|
15
|
-
-------------------------------------- */
|
|
16
|
-
/* --------------------------------------
|
|
17
|
-
7. Screen Reader Only
|
|
18
|
-
-------------------------------------- */
|
|
19
|
-
/* --------------------------------------
|
|
20
|
-
8. Label styles
|
|
21
|
-
this mixin includes all the styles for the label
|
|
22
|
-
+ flex rules on the parent container to switch between top and left position
|
|
23
|
-
+ srOnly when label is hidden
|
|
24
|
-
Assumes the following markup:
|
|
25
|
-
div.wrapper[.label-left.invalid] > div.label-wrapper > label.label > span.required
|
|
26
|
-
.wrapper is for the flex rules
|
|
27
|
-
.label-wrapper is to set the height of the label when positioned left so it's the same height as
|
|
28
|
-
the input. It can't be done directly on .label because of possible line wrapping.
|
|
29
|
-
When the label is on top there's no line wrapping at all to ensure proper alignment of inlined elements
|
|
30
|
-
(they can't be aligned on the baseline because of possible description text and error message)
|
|
31
|
-
-------------------------------------- */
|
|
32
|
-
:host {
|
|
33
|
-
width: 100%;
|
|
34
|
-
display: none;
|
|
35
|
-
}
|
|
36
|
-
:host .sr-only {
|
|
37
|
-
position: absolute !important;
|
|
38
|
-
width: 1px !important;
|
|
39
|
-
height: 1px !important;
|
|
40
|
-
padding: 0 !important;
|
|
41
|
-
border: 0 !important;
|
|
42
|
-
overflow: hidden !important;
|
|
43
|
-
clip: rect(0, 0, 0, 0) !important;
|
|
44
|
-
clip-path: inset(50%) !important;
|
|
45
|
-
white-space: nowrap !important;
|
|
46
|
-
margin: -1px !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host(.visible) {
|
|
50
|
-
display: unset;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.return-btn {
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
padding: 1.25rem;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
font-weight: 600;
|
|
59
|
-
font-size: 0.875rem;
|
|
60
|
-
border-bottom: 1px solid #4a4a4a;
|
|
61
|
-
}
|
|
62
|
-
.return-btn:before {
|
|
63
|
-
display: inline-block;
|
|
64
|
-
font: normal normal normal 24px/1 "Material Design Icons";
|
|
65
|
-
font-size: inherit;
|
|
66
|
-
text-rendering: auto;
|
|
67
|
-
line-height: inherit;
|
|
68
|
-
-webkit-font-smoothing: antialiased;
|
|
69
|
-
-moz-osx-font-smoothing: grayscale;
|
|
70
|
-
content: "\f141";
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
font-size: 1.12rem;
|
|
73
|
-
}
|
|
74
|
-
.return-btn:hover {
|
|
75
|
-
background: var(--wmcolor-select-option-background-hover);
|
|
76
|
-
outline: none;
|
|
77
|
-
}
|