linear-react-components-ui 1.1.20-beta.12 → 1.1.20-beta.14
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/lib/alerts/BaseAlert.js +1 -1
- package/lib/alerts/Message.js +1 -1
- package/lib/assets/styles/button.scss +0 -1
- package/lib/assets/styles/select.scss +2 -1
- package/lib/assets/styles/table.scss +10 -6
- package/lib/assets/styles/toolbar.scss +3 -0
- package/lib/assets/styles/wizard.scss +127 -0
- package/lib/avatar/index.js +8 -9
- package/lib/badge/index.js +4 -4
- package/lib/buttons/DangerButton.js +1 -1
- package/lib/buttons/DefaultButton.js +5 -17
- package/lib/buttons/InfoButton.js +1 -1
- package/lib/buttons/PrimaryButton.js +1 -1
- package/lib/buttons/SuccessButton.js +1 -1
- package/lib/buttons/WarningButton.js +1 -1
- package/lib/buttons/button_container/index.js +1 -1
- package/lib/buttons/split_button/index.js +1 -1
- package/lib/buttons/types.d.ts +0 -1
- package/lib/calendar/base/Day.js +1 -1
- package/lib/calendar/base/Month.js +1 -1
- package/lib/calendar/base/helpers.js +2 -2
- package/lib/calendar/base/index.js +1 -1
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/base/Content.d.ts +1 -1
- package/lib/dialog/base/Content.js +3 -2
- package/lib/dialog/base/Header.js +2 -2
- package/lib/dialog/base/index.js +6 -4
- package/lib/dialog/form/index.js +8 -3
- package/lib/dialog/types.d.ts +36 -4
- package/lib/dialog/wizard/index.d.ts +13 -0
- package/lib/dialog/wizard/index.js +78 -0
- package/lib/dialog/wizard/progressbar.d.ts +13 -0
- package/lib/dialog/wizard/progressbar.js +36 -0
- package/lib/dialog/wizard/step.d.ts +9 -0
- package/lib/dialog/wizard/step.js +22 -0
- package/lib/dialog/wizard/useWizard.d.ts +9 -0
- package/lib/dialog/wizard/useWizard.js +48 -0
- package/lib/drawer/Drawer.js +3 -3
- package/lib/drawer/Header.js +1 -1
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +22 -43
- package/lib/dropdown/helper.js +1 -1
- package/lib/dropdown/types.d.ts +2 -6
- package/lib/dropdown/withDropdown.js +6 -7
- package/lib/fieldset/index.js +7 -7
- package/lib/form/Field.js +11 -24
- package/lib/form/FieldArray.js +10 -25
- package/lib/form/FieldNumber.js +9 -21
- package/lib/form/FieldPeriod.js +5 -5
- package/lib/form/index.js +9 -6
- package/lib/form/types.d.ts +10 -6
- package/lib/form/withFieldHOC.js +2 -2
- package/lib/gridlayout/GridCol.js +5 -5
- package/lib/gridlayout/GridRow.js +1 -4
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/index.js +1 -7
- package/lib/icons/helper.d.ts +20 -0
- package/lib/icons/helper.js +20 -0
- package/lib/icons/index.js +27 -24
- package/lib/inputs/base/InputTextBase.js +9 -6
- package/lib/inputs/base/Label.js +1 -1
- package/lib/inputs/base/helpers.js +3 -7
- package/lib/inputs/date/helpers.js +1 -4
- package/lib/inputs/date/index.js +15 -9
- package/lib/inputs/errorMessage/index.js +1 -1
- package/lib/inputs/file/DefaultFile.js +6 -5
- package/lib/inputs/file/DragDropFile.js +17 -15
- package/lib/inputs/file/File.js +4 -3
- package/lib/inputs/mask/BaseMask.js +1 -1
- package/lib/inputs/multiSelect/Dropdown.js +10 -9
- package/lib/inputs/multiSelect/helper.js +2 -1
- package/lib/inputs/multiSelect/index.js +9 -7
- package/lib/inputs/number/BaseNumber.d.ts +1 -1
- package/lib/inputs/number/BaseNumber.js +2 -9
- package/lib/inputs/number/Currency.d.ts +1 -1
- package/lib/inputs/number/Currency.js +4 -11
- package/lib/inputs/number/index.js +1 -1
- package/lib/inputs/period/PeriodList.js +1 -1
- package/lib/inputs/period/helper.js +1 -3
- package/lib/inputs/period/index.js +14 -9
- package/lib/inputs/search/index.js +1 -1
- package/lib/inputs/select/Dropdown.js +1 -1
- package/lib/inputs/select/helper.js +13 -10
- package/lib/inputs/select/multiple/Selecteds.js +1 -1
- package/lib/inputs/select/multiple/index.js +19 -12
- package/lib/inputs/select/simple/index.js +22 -13
- package/lib/inputs/select/types.d.ts +1 -0
- package/lib/inputs/textarea/index.js +1 -1
- package/lib/internals/withTooltip.js +9 -9
- package/lib/labelMessages/index.js +3 -4
- package/lib/labels/DefaultLabel.js +1 -4
- package/lib/labels/label_container/index.js +1 -1
- package/lib/list/Header.js +1 -1
- package/lib/list/Item.js +7 -9
- package/lib/list/index.js +1 -1
- package/lib/menus/float/MenuItem.js +2 -2
- package/lib/menus/float/SubMenuContainer.js +1 -1
- package/lib/menus/float/index.js +1 -1
- package/lib/menus/sidenav/ExpandMenu.js +1 -1
- package/lib/menus/sidenav/NavMenuGroup.js +1 -1
- package/lib/menus/sidenav/NavMenuItem.js +9 -7
- package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
- package/lib/menus/sidenav/helpers.js +1 -1
- package/lib/menus/sidenav/index.js +5 -5
- package/lib/panel/Content.js +7 -5
- package/lib/panel/Default.js +2 -2
- package/lib/panel/Header.js +3 -3
- package/lib/permissionValidations.js +1 -1
- package/lib/popover/PopoverText.d.ts +2 -3
- package/lib/popover/PopoverText.js +8 -5
- package/lib/popover/PopoverTitle.d.ts +0 -1
- package/lib/popover/index.d.ts +5 -3
- package/lib/popover/index.js +14 -20
- package/lib/popover/types.d.ts +1 -12
- package/lib/progress/Bar.js +6 -6
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/index.js +4 -4
- package/lib/radio/types.d.ts +2 -1
- package/lib/shortcuts/index.js +1 -1
- package/lib/skeleton/SkeletonContainer.js +1 -2
- package/lib/skeleton/index.js +1 -4
- package/lib/spinner/index.js +2 -2
- package/lib/split/Split.js +1 -1
- package/lib/split/SplitSide.js +3 -3
- package/lib/table/Body.js +3 -3
- package/lib/table/Header.js +11 -8
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +7 -6
- package/lib/table/Row.js +3 -3
- package/lib/table/RowColumn.js +3 -2
- package/lib/table/index.js +1 -6
- package/lib/table/types.d.ts +4 -2
- package/lib/tabs/DropdownTabs.js +1 -1
- package/lib/tabs/Menu.js +1 -1
- package/lib/tabs/MenuTabs.js +2 -2
- package/lib/tabs/Panel.js +7 -5
- package/lib/tabs/context.js +6 -3
- package/lib/textContent/index.js +1 -1
- package/lib/toolbar/ButtonBar.js +1 -1
- package/lib/toolbar/index.js +1 -1
- package/lib/tooltip/index.js +7 -7
- package/lib/treetable/Body.js +1 -1
- package/lib/treetable/Header.js +2 -2
- package/lib/treetable/Row.js +10 -13
- package/lib/treeview/Header.js +1 -1
- package/lib/treeview/Node.js +15 -11
- package/lib/treeview/index.js +11 -7
- package/lib/treeview/types.d.ts +4 -0
- package/lib/uitour/index.js +8 -6
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.returnDropdownDynamicStyles = exports.getFilteredSimpleDataCombo = exports.getFilteredMultipleDataCombo = exports.getDropdownItemCssClass = exports.contentClass = void 0;
|
|
7
|
-
const contentClass = props =>
|
|
7
|
+
const contentClass = props => "content ".concat(props.showClearButton ? '' : 'noclear');
|
|
8
8
|
exports.contentClass = contentClass;
|
|
9
9
|
const getDropdownItemCssClass = (selected, disabled, striped) => {
|
|
10
10
|
let className = 'item';
|
|
@@ -21,10 +21,12 @@ const getFilteredSimpleDataCombo = _ref => {
|
|
|
21
21
|
inputText
|
|
22
22
|
} = _ref;
|
|
23
23
|
return dataSource && dataSource.filter(item => {
|
|
24
|
+
var _descriptionKey;
|
|
24
25
|
if (typeof descriptionKey === 'string') {
|
|
25
|
-
|
|
26
|
+
var _item$descriptionKey;
|
|
27
|
+
return ((_item$descriptionKey = item[descriptionKey]) === null || _item$descriptionKey === void 0 ? void 0 : _item$descriptionKey.toLowerCase().indexOf(inputText === null || inputText === void 0 ? void 0 : inputText.toString().toLowerCase())) > -1;
|
|
26
28
|
}
|
|
27
|
-
return descriptionKey(item)
|
|
29
|
+
return ((_descriptionKey = descriptionKey(item)) === null || _descriptionKey === void 0 ? void 0 : _descriptionKey.toLowerCase().indexOf(inputText === null || inputText === void 0 ? void 0 : inputText.toString().toLowerCase())) > -1;
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
32
|
exports.getFilteredSimpleDataCombo = getFilteredSimpleDataCombo;
|
|
@@ -36,10 +38,11 @@ const getFilteredMultipleDataCombo = _ref2 => {
|
|
|
36
38
|
currents
|
|
37
39
|
} = _ref2;
|
|
38
40
|
return dataSource.filter(item => {
|
|
41
|
+
var _descriptionKey2;
|
|
39
42
|
if (typeof descriptionKey === 'string') {
|
|
40
|
-
return item[descriptionKey].toLowerCase().indexOf(inputText
|
|
43
|
+
return item[descriptionKey].toLowerCase().indexOf(inputText === null || inputText === void 0 ? void 0 : inputText.toString().toLowerCase()) > -1 && !currents.includes(item);
|
|
41
44
|
}
|
|
42
|
-
return descriptionKey(item)
|
|
45
|
+
return ((_descriptionKey2 = descriptionKey(item)) === null || _descriptionKey2 === void 0 ? void 0 : _descriptionKey2.toLowerCase().indexOf(inputText === null || inputText === void 0 ? void 0 : inputText.toString().toLowerCase())) > -1 && !currents.includes(item);
|
|
43
46
|
});
|
|
44
47
|
};
|
|
45
48
|
exports.getFilteredMultipleDataCombo = getFilteredMultipleDataCombo;
|
|
@@ -51,7 +54,7 @@ const returnDropdownPosition = function (_ref3) {
|
|
|
51
54
|
} = _ref3;
|
|
52
55
|
let aboveDropdown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
53
56
|
const DEFAULT_MARGIN_BOTTOM = 10;
|
|
54
|
-
if (aboveDropdown && dropdownRef
|
|
57
|
+
if (aboveDropdown && dropdownRef !== null && dropdownRef !== void 0 && dropdownRef.current && dropdownRects !== null && dropdownRects !== void 0 && dropdownRects.height) {
|
|
55
58
|
return selectFieldRects.top + window.scrollY - (dropdownRef.current && dropdownRects.height) - DEFAULT_MARGIN_BOTTOM;
|
|
56
59
|
}
|
|
57
60
|
return selectFieldRects.top + window.scrollY + selectFieldRects.height;
|
|
@@ -62,10 +65,10 @@ const returnDropdownDynamicStyles = _ref4 => {
|
|
|
62
65
|
dropdownMaxHeight,
|
|
63
66
|
dropdownRef
|
|
64
67
|
} = _ref4;
|
|
65
|
-
const selectFieldRects = selectFieldRef
|
|
66
|
-
const dropdownRects = dropdownRef
|
|
67
|
-
const selectFieldRectsBottom = selectFieldRects ? selectFieldRects
|
|
68
|
-
const selectFieldRectsTop = selectFieldRects ? selectFieldRects
|
|
68
|
+
const selectFieldRects = selectFieldRef !== null && selectFieldRef !== void 0 && selectFieldRef.current ? selectFieldRef.current.getBoundingClientRect() : undefined;
|
|
69
|
+
const dropdownRects = dropdownRef !== null && dropdownRef !== void 0 && dropdownRef.current ? dropdownRef.current.getBoundingClientRect() : undefined;
|
|
70
|
+
const selectFieldRectsBottom = selectFieldRects ? selectFieldRects === null || selectFieldRects === void 0 ? void 0 : selectFieldRects.bottom : 0;
|
|
71
|
+
const selectFieldRectsTop = selectFieldRects ? selectFieldRects === null || selectFieldRects === void 0 ? void 0 : selectFieldRects.top : 0;
|
|
69
72
|
const dropdownBottomDistance = window.innerHeight - selectFieldRectsBottom;
|
|
70
73
|
const bottomOffset = 30;
|
|
71
74
|
let maxDropdownBottomDistance = 200;
|
|
@@ -15,7 +15,7 @@ const Selecteds = _ref => {
|
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, currents.map(selected => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
17
|
className: "selecteditem",
|
|
18
|
-
key:
|
|
18
|
+
key: "selected-".concat(selected[idKey])
|
|
19
19
|
}, typeof descriptionKey === 'string' ? selected[descriptionKey] : descriptionKey(selected), /*#__PURE__*/_react.default.createElement("button", {
|
|
20
20
|
className: "close",
|
|
21
21
|
tabIndex: -1,
|
|
@@ -25,7 +25,8 @@ const MultipleSelect = props => {
|
|
|
25
25
|
value = [],
|
|
26
26
|
remoteSearch = false,
|
|
27
27
|
descriptionKey,
|
|
28
|
-
showClearButton
|
|
28
|
+
showClearButton,
|
|
29
|
+
rightElements = []
|
|
29
30
|
} = props;
|
|
30
31
|
const [dataCombo, setDataCombo] = (0, _react.useState)(dataSource);
|
|
31
32
|
const [currents, setCurrents] = (0, _react.useState)([]);
|
|
@@ -36,7 +37,7 @@ const MultipleSelect = props => {
|
|
|
36
37
|
const [insideComponent, setInsideComponent] = (0, _react.useState)(false);
|
|
37
38
|
const [onDenied, setOnDeniedSelect] = (0, _react.useState)();
|
|
38
39
|
const [valueFromProps, setValueFromProps] = (0, _react.useState)([]);
|
|
39
|
-
const componentId =
|
|
40
|
+
const componentId = "select-component".concat(uuid.v1());
|
|
40
41
|
const componentRef = (0, _react.useRef)(null);
|
|
41
42
|
const dropdownRef = (0, _react.useRef)(null);
|
|
42
43
|
const selectWrapper = (0, _react.useRef)();
|
|
@@ -56,10 +57,11 @@ const MultipleSelect = props => {
|
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
const onMouseMove = event => {
|
|
60
|
+
var _dropdownRef$current, _dropdownRef$current$;
|
|
59
61
|
const target = event.target;
|
|
60
|
-
const idDropdown = dropdownRef.current
|
|
62
|
+
const idDropdown = ((_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : (_dropdownRef$current$ = _dropdownRef$current.parentElement) === null || _dropdownRef$current$ === void 0 ? void 0 : _dropdownRef$current$.id) || '';
|
|
61
63
|
const dropdownElement = document.getElementById(idDropdown);
|
|
62
|
-
const keepDropdownOpen = Boolean(dropdownElement
|
|
64
|
+
const keepDropdownOpen = Boolean(dropdownElement === null || dropdownElement === void 0 ? void 0 : dropdownElement.contains(target));
|
|
63
65
|
setInsideComponent(keepDropdownOpen);
|
|
64
66
|
};
|
|
65
67
|
const onClearClick = () => {
|
|
@@ -96,6 +98,7 @@ const MultipleSelect = props => {
|
|
|
96
98
|
setDropdownWidth(dropdownWidthFocus);
|
|
97
99
|
};
|
|
98
100
|
const onSelect = select => {
|
|
101
|
+
var _dropdownRef$current2;
|
|
99
102
|
if (select === null) return;
|
|
100
103
|
const currentsSelect = [...currents, select];
|
|
101
104
|
setCurrents(currentsSelect);
|
|
@@ -103,16 +106,17 @@ const MultipleSelect = props => {
|
|
|
103
106
|
setInputValue([]);
|
|
104
107
|
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
105
108
|
if (props.onSelect) setSelected(props.onSelect(currentsSelect.map(i => i[idKey])));
|
|
106
|
-
dropdownRef.current
|
|
109
|
+
(_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : _dropdownRef$current2.focus();
|
|
107
110
|
};
|
|
108
111
|
const onUnselect = id => {
|
|
109
112
|
if (currents) {
|
|
113
|
+
var _dropdownRef$current3;
|
|
110
114
|
const result = currents.filter(item => item[idKey] !== id);
|
|
111
115
|
setCurrents(result);
|
|
112
116
|
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
113
117
|
setOpened(false);
|
|
114
118
|
if (props.onSelect) setSelected(props.onSelect(result.map(i => i[idKey])));
|
|
115
|
-
dropdownRef.current
|
|
119
|
+
(_dropdownRef$current3 = dropdownRef.current) === null || _dropdownRef$current3 === void 0 ? void 0 : _dropdownRef$current3.focus();
|
|
116
120
|
}
|
|
117
121
|
};
|
|
118
122
|
const onOpenClose = () => {
|
|
@@ -129,9 +133,11 @@ const MultipleSelect = props => {
|
|
|
129
133
|
const onInputKeyDown = e => {
|
|
130
134
|
if (e.keyCode) {
|
|
131
135
|
if (e.keyCode === constants.keyCodes.ENTER && selected && opened) {
|
|
132
|
-
|
|
136
|
+
var _e$preventDefault;
|
|
137
|
+
(_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
|
133
138
|
if (!currents.some(current => current[idKey] === selected[idKey])) {
|
|
134
|
-
|
|
139
|
+
var _e$preventDefault2;
|
|
140
|
+
(_e$preventDefault2 = e.preventDefault) === null || _e$preventDefault2 === void 0 ? void 0 : _e$preventDefault2.call(e);
|
|
135
141
|
onSelect(selected);
|
|
136
142
|
}
|
|
137
143
|
} else if ([constants.keyCodes.ARROW_UP, constants.keyCodes.ARROW_DOWN].includes(e.keyCode)) {
|
|
@@ -177,7 +183,7 @@ const MultipleSelect = props => {
|
|
|
177
183
|
}, []);
|
|
178
184
|
(0, _react.useEffect)(() => {
|
|
179
185
|
if (props.gridLayout) {
|
|
180
|
-
const gridEl = document.querySelector(
|
|
186
|
+
const gridEl = document.querySelector("#".concat(componentId, ">.-withinput.grid-container"));
|
|
181
187
|
if (gridElRef.current !== gridEl && gridEl) gridElRef.current = gridEl;
|
|
182
188
|
}
|
|
183
189
|
}, []);
|
|
@@ -229,13 +235,14 @@ const MultipleSelect = props => {
|
|
|
229
235
|
},
|
|
230
236
|
onClick: onFocus,
|
|
231
237
|
onKeyDown: onInputKeyDown,
|
|
232
|
-
customClassForWrapper:
|
|
238
|
+
customClassForWrapper: "selectwrapper ".concat((props.readOnly || shouldDisable() || shouldBeReadOnly()) && ' -undigitable'),
|
|
233
239
|
customClassForInputContent: "multiselect",
|
|
234
240
|
inputBaseRef: r => {
|
|
235
241
|
selectWrapper.current = r;
|
|
236
242
|
},
|
|
237
243
|
handlerSetOnDenied: setOnDenied,
|
|
238
|
-
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
244
|
+
rightElements: [...rightElements, /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
245
|
+
key: "action-buttons-multiselect",
|
|
239
246
|
showClearButton: showClearButton,
|
|
240
247
|
disabled: shouldDisable() || shouldBeReadOnly(),
|
|
241
248
|
dropDownOpened: opened,
|
|
@@ -244,7 +251,7 @@ const MultipleSelect = props => {
|
|
|
244
251
|
return onClearClick();
|
|
245
252
|
},
|
|
246
253
|
handlerOpenClose: onOpenClose
|
|
247
|
-
})
|
|
254
|
+
})]
|
|
248
255
|
}), /*#__PURE__*/_react.default.createElement(_Selecteds.default, _extends({}, props, {
|
|
249
256
|
currents: currents,
|
|
250
257
|
handlerOnUnselect: onUnselect
|
|
@@ -34,7 +34,8 @@ const SimpleSelect = props => {
|
|
|
34
34
|
searchOnDropdown = false,
|
|
35
35
|
allOptions = undefined,
|
|
36
36
|
showClearButton = false,
|
|
37
|
-
searchNotFoundText
|
|
37
|
+
searchNotFoundText,
|
|
38
|
+
rightElements = []
|
|
38
39
|
} = props;
|
|
39
40
|
const descriptionKeyIsString = typeof descriptionKey === 'string';
|
|
40
41
|
const dataSourceWithAllOptions = allOptions ? [{
|
|
@@ -50,7 +51,7 @@ const SimpleSelect = props => {
|
|
|
50
51
|
const [onDenied, setOnDeniedSelect] = (0, _react.useState)();
|
|
51
52
|
const [isTyping, setIsTyping] = (0, _react.useState)(false);
|
|
52
53
|
const dropdownRef = (0, _react.useRef)(null);
|
|
53
|
-
const componentId =
|
|
54
|
+
const componentId = "select-component-".concat(name, "-").concat(uuid.v1());
|
|
54
55
|
const componentRef = (0, _react.useRef)(null);
|
|
55
56
|
const selectWrapper = (0, _react.useRef)();
|
|
56
57
|
const gridElement = (0, _react.useRef)();
|
|
@@ -59,18 +60,20 @@ const SimpleSelect = props => {
|
|
|
59
60
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
60
61
|
};
|
|
61
62
|
const onClickOutside = event => {
|
|
63
|
+
var _selectWrapper$curren, _dropdownRef$current;
|
|
62
64
|
const {
|
|
63
65
|
target
|
|
64
66
|
} = event;
|
|
65
|
-
if (target !== selectWrapper.current && !selectWrapper.current
|
|
67
|
+
if (target !== selectWrapper.current && !((_selectWrapper$curren = selectWrapper.current) !== null && _selectWrapper$curren !== void 0 && _selectWrapper$curren.contains(target)) && !((_dropdownRef$current = dropdownRef.current) !== null && _dropdownRef$current !== void 0 && _dropdownRef$current.contains(target))) {
|
|
66
68
|
setOpened(false);
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
const onMouseMove = event => {
|
|
72
|
+
var _dropdownRef$current2, _dropdownRef$current3;
|
|
70
73
|
const target = event.target;
|
|
71
|
-
const idDropdown = dropdownRef.current
|
|
74
|
+
const idDropdown = ((_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : (_dropdownRef$current3 = _dropdownRef$current2.parentElement) === null || _dropdownRef$current3 === void 0 ? void 0 : _dropdownRef$current3.id) || '';
|
|
72
75
|
const dropdownElement = document.getElementById(idDropdown);
|
|
73
|
-
const keepDropdownOpen = Boolean(dropdownElement
|
|
76
|
+
const keepDropdownOpen = Boolean(dropdownElement === null || dropdownElement === void 0 ? void 0 : dropdownElement.contains(target));
|
|
74
77
|
setInsideComponent(keepDropdownOpen);
|
|
75
78
|
};
|
|
76
79
|
const getSelectEvent = selectedEvent => ({
|
|
@@ -110,6 +113,7 @@ const SimpleSelect = props => {
|
|
|
110
113
|
}
|
|
111
114
|
};
|
|
112
115
|
const onSelect = selectedDropdown => {
|
|
116
|
+
var _dropdownRef$current4;
|
|
113
117
|
if (!selectedDropdown) return;
|
|
114
118
|
setSelected(selectedDropdown);
|
|
115
119
|
if (descriptionKeyIsString) setInputText(selectedDropdown[descriptionKey]);else setInputText(descriptionKey(selectedDropdown));
|
|
@@ -119,7 +123,7 @@ const SimpleSelect = props => {
|
|
|
119
123
|
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
120
124
|
setOpened(false);
|
|
121
125
|
});
|
|
122
|
-
dropdownRef.current
|
|
126
|
+
(_dropdownRef$current4 = dropdownRef.current) === null || _dropdownRef$current4 === void 0 ? void 0 : _dropdownRef$current4.focus();
|
|
123
127
|
};
|
|
124
128
|
const onOpenClose = () => {
|
|
125
129
|
setOpened(prevState => !prevState);
|
|
@@ -155,7 +159,8 @@ const SimpleSelect = props => {
|
|
|
155
159
|
const onInputKeyDown = e => {
|
|
156
160
|
if (e.keyCode) {
|
|
157
161
|
if (e.keyCode === constants.keyCodes.ENTER && selected && opened) {
|
|
158
|
-
|
|
162
|
+
var _e$preventDefault;
|
|
163
|
+
(_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
|
159
164
|
onSelect(selected);
|
|
160
165
|
} else if ([constants.keyCodes.ARROW_UP, constants.keyCodes.ARROW_DOWN].includes(e.keyCode)) {
|
|
161
166
|
if (!opened) setOpened(true);
|
|
@@ -163,7 +168,7 @@ const SimpleSelect = props => {
|
|
|
163
168
|
if (e.keyCode === constants.keyCodes.ARROW_DOWN) {
|
|
164
169
|
index = dataCombo && index === dataCombo.length - 1 ? 0 : index + 1;
|
|
165
170
|
} else {
|
|
166
|
-
index = dataCombo && index === 0 ? dataCombo
|
|
171
|
+
index = dataCombo && index === 0 ? (dataCombo === null || dataCombo === void 0 ? void 0 : dataCombo.length) - 1 : index - 1;
|
|
167
172
|
}
|
|
168
173
|
setSelected(dataCombo[index]);
|
|
169
174
|
if (descriptionKeyIsString) setInputText(dataCombo[index][descriptionKey]);
|
|
@@ -200,7 +205,7 @@ const SimpleSelect = props => {
|
|
|
200
205
|
}, []);
|
|
201
206
|
(0, _react.useEffect)(() => {
|
|
202
207
|
if (gridLayout) {
|
|
203
|
-
const gridEl = document.querySelector(
|
|
208
|
+
const gridEl = document.querySelector("#".concat(componentId, ">.-withinput.grid-container"));
|
|
204
209
|
if (gridElement.current !== gridEl && gridEl) gridElement.current = gridEl;
|
|
205
210
|
}
|
|
206
211
|
}, [gridLayout]);
|
|
@@ -208,7 +213,10 @@ const SimpleSelect = props => {
|
|
|
208
213
|
if (dataSourceWithAllOptions.length > 0) {
|
|
209
214
|
let newCurrent = null;
|
|
210
215
|
if (value || value === 0) {
|
|
211
|
-
newCurrent = dataSourceWithAllOptions.find(i =>
|
|
216
|
+
newCurrent = dataSourceWithAllOptions.find(i => {
|
|
217
|
+
var _i$idKey;
|
|
218
|
+
return (value || value === 0) && ((_i$idKey = i[idKey]) === null || _i$idKey === void 0 ? void 0 : _i$idKey.toString().toLowerCase()) === (value === null || value === void 0 ? void 0 : value.toString().toLowerCase());
|
|
219
|
+
});
|
|
212
220
|
} else if (dataSourceWithAllOptions.length > 0 && selectFirstOnEnter) {
|
|
213
221
|
newCurrent = dataSourceWithAllOptions[0];
|
|
214
222
|
}
|
|
@@ -261,13 +269,14 @@ const SimpleSelect = props => {
|
|
|
261
269
|
},
|
|
262
270
|
onClick: onFocus,
|
|
263
271
|
onKeyDown: onInputKeyDown,
|
|
264
|
-
customClassForWrapper:
|
|
272
|
+
customClassForWrapper: "selectwrapper ".concat((undigitable || searchOnDropdown || shouldBeReadOnly()) && ' -undigitable'),
|
|
265
273
|
customClassForInputContent: "multiselect",
|
|
266
274
|
inputBaseRef: r => {
|
|
267
275
|
selectWrapper.current = r;
|
|
268
276
|
},
|
|
269
277
|
handlerSetOnDenied: inputOnDenied => setOnDenied(inputOnDenied),
|
|
270
|
-
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
278
|
+
rightElements: [...rightElements, /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
279
|
+
key: "action-buttons-simpleselect",
|
|
271
280
|
disabled: shouldDisable() || shouldBeReadOnly(),
|
|
272
281
|
showClearButton: showClearButton,
|
|
273
282
|
dropDownOpened: opened,
|
|
@@ -276,7 +285,7 @@ const SimpleSelect = props => {
|
|
|
276
285
|
return onClearClick();
|
|
277
286
|
},
|
|
278
287
|
handlerOpenClose: onOpenClose
|
|
279
|
-
})
|
|
288
|
+
})]
|
|
280
289
|
})), opened && /*#__PURE__*/_react.default.createElement(_Dropdown.default, _extends({}, props, {
|
|
281
290
|
opened: opened,
|
|
282
291
|
selected: selected,
|
|
@@ -50,6 +50,7 @@ interface ISimpleSelectProps {
|
|
|
50
50
|
onFocus?: () => void;
|
|
51
51
|
allOptions?: AllOptions;
|
|
52
52
|
inputRef?: MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null> | ((ref: HTMLInputElement | HTMLTextAreaElement | null) => void);
|
|
53
|
+
rightElements?: JSX.Element[];
|
|
53
54
|
}
|
|
54
55
|
interface ISelectFieldProps extends Omit<ISimpleSelectProps, 'idKey' | 'value' | 'descriptionKey'> {
|
|
55
56
|
multiple?: boolean;
|
|
@@ -87,23 +87,23 @@ const withTooltip = WrappedComponent => {
|
|
|
87
87
|
const targetDimensions = targetElement.current.getBoundingClientRect();
|
|
88
88
|
const targetVerticalCenter = (targetDimensions.top + targetDimensions.bottom) / 2;
|
|
89
89
|
const tooltipClientWidth = tooltipElement.current.clientWidth;
|
|
90
|
-
let style =
|
|
90
|
+
let style = "width: ".concat(typeof width === 'string' ? width : "".concat(width, "px"));
|
|
91
91
|
let left = targetDimensions.left + targetDimensions.width / 2 - tooltipClientWidth / 2;
|
|
92
92
|
left = Math.min(left, document.body.clientWidth - tooltipClientWidth - space);
|
|
93
|
-
style +=
|
|
93
|
+
style += "; left: ".concat(Math.max(space, left), "px");
|
|
94
94
|
switch (stateTooltipPosition) {
|
|
95
95
|
case 'top':
|
|
96
96
|
if (targetDimensions.top < height) {
|
|
97
97
|
setStateTooltipPosition('bottom');
|
|
98
98
|
} else {
|
|
99
|
-
style +=
|
|
99
|
+
style += "; top: ".concat(targetDimensions.top + window.scrollY - height - 5, "px");
|
|
100
100
|
}
|
|
101
101
|
break;
|
|
102
102
|
case 'bottom':
|
|
103
103
|
if (window.innerHeight - targetDimensions.bottom < height) {
|
|
104
104
|
setStateTooltipPosition('top');
|
|
105
105
|
} else {
|
|
106
|
-
style +=
|
|
106
|
+
style += "; top: ".concat(targetDimensions.top + window.scrollY + targetDimensions.height + 5, "px");
|
|
107
107
|
}
|
|
108
108
|
break;
|
|
109
109
|
case 'left':
|
|
@@ -114,16 +114,16 @@ const withTooltip = WrappedComponent => {
|
|
|
114
114
|
setStateTooltipPosition('right');
|
|
115
115
|
}
|
|
116
116
|
} else {
|
|
117
|
-
style +=
|
|
118
|
-
style +=
|
|
117
|
+
style += "; top: ".concat(targetVerticalCenter + window.scrollY - height / 2, "px");
|
|
118
|
+
style += "; left: ".concat(targetDimensions.left - tooltipClientWidth - 6, "px");
|
|
119
119
|
}
|
|
120
120
|
break;
|
|
121
121
|
case 'right':
|
|
122
122
|
if (window.innerWidth - targetDimensions.right < tooltipClientWidth) {
|
|
123
123
|
setStateTooltipPosition('left');
|
|
124
124
|
} else {
|
|
125
|
-
style +=
|
|
126
|
-
style +=
|
|
125
|
+
style += "; top: ".concat(targetVerticalCenter + window.scrollY - height / 2, "px");
|
|
126
|
+
style += "; left: ".concat(targetDimensions.left + targetDimensions.width + 5, "px");
|
|
127
127
|
}
|
|
128
128
|
break;
|
|
129
129
|
default:
|
|
@@ -166,7 +166,7 @@ const withTooltip = WrappedComponent => {
|
|
|
166
166
|
targetRef: getTarget
|
|
167
167
|
})), showTooltip && getTooltip());
|
|
168
168
|
};
|
|
169
|
-
EnhancedComponent.displayName =
|
|
169
|
+
EnhancedComponent.displayName = "withTooltip(".concat(getDisplayName(WrappedComponent), ")");
|
|
170
170
|
return EnhancedComponent;
|
|
171
171
|
};
|
|
172
172
|
var _default = exports.default = withTooltip;
|
|
@@ -25,8 +25,7 @@ const LabelMessages = _ref => {
|
|
|
25
25
|
showCloseButton = false
|
|
26
26
|
} = _ref;
|
|
27
27
|
const [closed, setClosed] = (0, _react.useState)(false);
|
|
28
|
-
const getClass = () =>
|
|
29
|
-
${square && '-square'} ${flat && '-flat'}`;
|
|
28
|
+
const getClass = () => "labelmessages-component -".concat(type, " ").concat(customClass, "\n ").concat(square && '-square', " ").concat(flat && '-flat');
|
|
30
29
|
const getIcon = () => {
|
|
31
30
|
if (icon) {
|
|
32
31
|
return icon;
|
|
@@ -35,14 +34,14 @@ const LabelMessages = _ref => {
|
|
|
35
34
|
name: iconName,
|
|
36
35
|
size: 16,
|
|
37
36
|
color: "#ffffff",
|
|
38
|
-
customClass:
|
|
37
|
+
customClass: "-".concat(type, "svg")
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
return null;
|
|
42
41
|
};
|
|
43
42
|
if (closed || !visible) return null;
|
|
44
43
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
-
className:
|
|
44
|
+
className: "".concat(getClass(), " ").concat(customClass),
|
|
46
45
|
style: style
|
|
47
46
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
47
|
className: "labelmessagesitem text"
|
|
@@ -30,10 +30,7 @@ const DefaultLabel = _ref => {
|
|
|
30
30
|
} = _ref;
|
|
31
31
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
32
32
|
const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr));
|
|
33
|
-
const getClass = () =>
|
|
34
|
-
${skeletonize ? '-skeletonized' : ''}
|
|
35
|
-
${size ? `-${size}` : ''}
|
|
36
|
-
${iconAlign ? `icon-${iconAlign}` : ''}`;
|
|
33
|
+
const getClass = () => "label-component ".concat(className, " ").concat(customClass, " ").concat(bordered ? '-bordered' : '', " ").concat(disabled ? '-disabled' : '', "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(size ? "-".concat(size) : '', "\n ").concat(iconAlign ? "icon-".concat(iconAlign) : '');
|
|
37
34
|
const getIcon = () => {
|
|
38
35
|
if (icon) {
|
|
39
36
|
return icon;
|
package/lib/list/Header.js
CHANGED
|
@@ -14,7 +14,7 @@ const Header = _ref => {
|
|
|
14
14
|
customClass
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
17
|
-
className:
|
|
17
|
+
className: "list-header ".concat(customClass),
|
|
18
18
|
style: style
|
|
19
19
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
20
20
|
className: "title"
|
package/lib/list/Item.js
CHANGED
|
@@ -54,8 +54,7 @@ const Item = props => {
|
|
|
54
54
|
const disabledByPermission = onDenied.disabled;
|
|
55
55
|
const shouldDisable = () => disabled || onDenied.disabled;
|
|
56
56
|
const disabledIconColor = 'rgb(193, 193, 193)';
|
|
57
|
-
const getClass = () =>
|
|
58
|
-
${displayCheckbox && 'list-checkbox'}`;
|
|
57
|
+
const getClass = () => "item ".concat(customClass, " ").concat(separator && 'list-separator', " ").concat(shouldDisable() && 'disabled', "\n ").concat(displayCheckbox && 'list-checkbox');
|
|
59
58
|
const getIcon = (iconName, icon) => {
|
|
60
59
|
const noIconDisabledByPermission = !icon && !displayCheckbox && !leftElement && !leftIconName && !leftIcon && onDenied.disabled;
|
|
61
60
|
if (icon) {
|
|
@@ -120,23 +119,22 @@ const Item = props => {
|
|
|
120
119
|
return /*#__PURE__*/_react.default.createElement("li", _extends({
|
|
121
120
|
ref: itemId && selectedItemId === itemId ? selectedItemRef : null,
|
|
122
121
|
style: style,
|
|
123
|
-
className:
|
|
124
|
-
${itemId && selectedItemId === itemId ? '-activedlist' : ''}`
|
|
122
|
+
className: "item-container ".concat(hovered && 'hovered', "\n ").concat(itemId && selectedItemId === itemId ? '-activedlist' : '')
|
|
125
123
|
}, getProps(), {
|
|
126
124
|
key: itemId
|
|
127
125
|
}), url && !shouldDisable() && /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
|
|
128
126
|
className: "linkitem",
|
|
129
127
|
to: url
|
|
130
128
|
}), (displayCheckbox || leftElement || leftIconName || leftIcon) && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
-
className:
|
|
129
|
+
className: "".concat(getClass(), " -icon-left")
|
|
132
130
|
}, renderCheckBox, leftElement, getIcon(leftIconName, leftIcon)), (text || subText || children) && /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
-
className:
|
|
131
|
+
className: "".concat(getClass())
|
|
134
132
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
135
|
-
className:
|
|
133
|
+
className: "".concat(text && 'text')
|
|
136
134
|
}, text), /*#__PURE__*/_react.default.createElement("p", {
|
|
137
|
-
className:
|
|
135
|
+
className: "".concat(subText && 'subtext')
|
|
138
136
|
}, subText), children), (rightIconName || rightIcon || rightElement || disabledByPermission) && /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
-
className:
|
|
137
|
+
className: "".concat(getClass(), " -icon-right")
|
|
140
138
|
}, getIcon(rightIconName, rightIcon), rightElement));
|
|
141
139
|
};
|
|
142
140
|
var _default = exports.default = Item;
|
package/lib/list/index.js
CHANGED
|
@@ -175,7 +175,7 @@ const List = props => {
|
|
|
175
175
|
"data-testid": "list-component",
|
|
176
176
|
style: style,
|
|
177
177
|
ref: listRef,
|
|
178
|
-
className:
|
|
178
|
+
className: "list-component ".concat(condensed && '-condensed', " ").concat(!transparent && '-listbackground', " ").concat(customClass)
|
|
179
179
|
}, newChildren));
|
|
180
180
|
};
|
|
181
181
|
var _default = exports.default = List;
|
|
@@ -29,7 +29,7 @@ const MenuItem = _ref => {
|
|
|
29
29
|
const dropdownContext = (0, _react.useContext)(_withDropdown.WithDropdownContext);
|
|
30
30
|
const handleOnClick = () => {
|
|
31
31
|
if (onClick) {
|
|
32
|
-
onClick(dropdownContext
|
|
32
|
+
onClick(dropdownContext === null || dropdownContext === void 0 ? void 0 : dropdownContext.handleDropdownClose);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
if (dropdownContext) dropdownContext.handleDropdownClose();
|
|
@@ -37,7 +37,7 @@ const MenuItem = _ref => {
|
|
|
37
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
38
|
className: "floatmenuitem"
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className:
|
|
40
|
+
className: "".concat(customClassMenuItem, " -items")
|
|
41
41
|
}, !_lodash.default.isEmpty(dropdownMenu) && !onClick && /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
42
42
|
customClass: "floatmenudropdown",
|
|
43
43
|
iconName: "more1",
|
|
@@ -46,7 +46,7 @@ const SubMenuContainer = _ref => {
|
|
|
46
46
|
handlerGoBack();
|
|
47
47
|
}, []);
|
|
48
48
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
-
className:
|
|
49
|
+
className: "floatsubmenu ".concat(customClass)
|
|
50
50
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
51
51
|
className: "submenuheader"
|
|
52
52
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
package/lib/menus/float/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const FloatMenu = props => {
|
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement(_helpers.default.Provider, {
|
|
48
48
|
value: contextValues
|
|
49
49
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
50
|
-
className:
|
|
50
|
+
className: "floatmenu-component ".concat(customClass)
|
|
51
51
|
}, /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
52
52
|
transparent: true,
|
|
53
53
|
key: "button-",
|
|
@@ -14,7 +14,7 @@ const ExpandMenu = _ref => {
|
|
|
14
14
|
iconName
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
-
className:
|
|
17
|
+
className: "openclosemenu ".concat(expandMenuCustomClass),
|
|
18
18
|
role: "button",
|
|
19
19
|
tabIndex: 0,
|
|
20
20
|
onClick: onExpandMenu,
|
|
@@ -20,7 +20,7 @@ const NavMenuGroup = _ref => {
|
|
|
20
20
|
} = (0, _react.useContext)(_helpers.SideNavContext);
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
22
22
|
style: style,
|
|
23
|
-
className:
|
|
23
|
+
className: "".concat(scrollable && 'customscroll', " ").concat((0, _helpers.default)(isExpanded, menuSize))
|
|
24
24
|
}, children);
|
|
25
25
|
};
|
|
26
26
|
var _default = exports.default = NavMenuGroup;
|
|
@@ -76,17 +76,19 @@ const NavMenuItem = props => {
|
|
|
76
76
|
(0, _react.useEffect)(() => {
|
|
77
77
|
if (showSubMenu && showDropdownOnClick) {
|
|
78
78
|
document.addEventListener('click', e => {
|
|
79
|
+
var _menuItemRef$current;
|
|
79
80
|
const target = e.target;
|
|
80
|
-
const insideMenu = menuItemRef.current
|
|
81
|
+
const insideMenu = (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.contains(target);
|
|
81
82
|
if (!insideMenu) setShowSubMenu(false);
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
85
|
}, [showSubMenu, showDropdownOnClick]);
|
|
85
86
|
(0, _react.useEffect)(() => {
|
|
86
|
-
|
|
87
|
-
const
|
|
87
|
+
var _submenuContainerRef$, _submenuContentRef$cu, _submenuContentRef$cu2;
|
|
88
|
+
const heigthSubmenuContainer = ((_submenuContainerRef$ = submenuContainerRef.current) === null || _submenuContainerRef$ === void 0 ? void 0 : _submenuContainerRef$.clientHeight) || 0;
|
|
89
|
+
const heigthSubmenuContent = ((_submenuContentRef$cu = submenuContentRef.current) === null || _submenuContentRef$cu === void 0 ? void 0 : _submenuContentRef$cu.clientHeight) || 0;
|
|
88
90
|
const maxHeigthSubMenu = isOnEndWindow ? '100%' : (window.innerHeight - targetDimensions.top - (heigthSubmenuContainer - heigthSubmenuContent) - 1).toString().concat('px') || '0px';
|
|
89
|
-
submenuContentRef.current
|
|
91
|
+
(_submenuContentRef$cu2 = submenuContentRef.current) === null || _submenuContentRef$cu2 === void 0 ? void 0 : _submenuContentRef$cu2.style.setProperty('max-height', maxHeigthSubMenu);
|
|
90
92
|
}, [showSubMenu]);
|
|
91
93
|
if (unvisible) return null;
|
|
92
94
|
return /*#__PURE__*/_react.default.createElement(_helpers.SubMenuContext.Provider, {
|
|
@@ -97,7 +99,7 @@ const NavMenuItem = props => {
|
|
|
97
99
|
menuItemRef.current = r;
|
|
98
100
|
if (targetRef) targetRef(r);
|
|
99
101
|
},
|
|
100
|
-
className:
|
|
102
|
+
className: "item ".concat(url && !disabled && '-withlink', " ").concat(customClass, " ").concat(disabled && '-disabled'),
|
|
101
103
|
onMouseEnter: onMouseEnter,
|
|
102
104
|
onMouseLeave: () => {
|
|
103
105
|
if (showDropdownOnClick) return;
|
|
@@ -121,7 +123,7 @@ const NavMenuItem = props => {
|
|
|
121
123
|
className: "title"
|
|
122
124
|
}, title), !childrenIsSubMenu && children)), showSubMenu && children && childrenIsSubMenu && !disabled && !openSearchMenuPopup && /*#__PURE__*/_react.default.createElement("div", {
|
|
123
125
|
ref: submenuContainerRef,
|
|
124
|
-
className:
|
|
126
|
+
className: "".concat(customClassForDropdown, " ").concat(disableDefaultStyle ? '' : 'submenu-container'),
|
|
125
127
|
style: isOnEndWindow ? {
|
|
126
128
|
marginLeft: targetDimensions.width,
|
|
127
129
|
bottom: '0',
|
|
@@ -139,7 +141,7 @@ const NavMenuItem = props => {
|
|
|
139
141
|
ref: submenuContentRef,
|
|
140
142
|
className: "submenu",
|
|
141
143
|
style: {
|
|
142
|
-
gridTemplateColumns:
|
|
144
|
+
gridTemplateColumns: "repeat(".concat(columnsQtty, ", 1fr)")
|
|
143
145
|
}
|
|
144
146
|
}, children))));
|
|
145
147
|
};
|
|
@@ -28,7 +28,7 @@ const NavSubMenuItem = _ref => {
|
|
|
28
28
|
} = onDenied;
|
|
29
29
|
if (unvisible) return null;
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
className:
|
|
31
|
+
className: "item hvr-forward ".concat(disabled && '-disabled'),
|
|
32
32
|
onKeyDown: () => {},
|
|
33
33
|
role: "button",
|
|
34
34
|
tabIndex: -1,
|
|
@@ -9,7 +9,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
9
9
|
const getCssClassMenu = (isExpanded, size) => {
|
|
10
10
|
let cssClass = 'expandedmenu';
|
|
11
11
|
if (!isExpanded) {
|
|
12
|
-
cssClass =
|
|
12
|
+
cssClass = "collapsedmenu -".concat(size);
|
|
13
13
|
}
|
|
14
14
|
return cssClass;
|
|
15
15
|
};
|