armtek-uikit-react 1.0.241 → 1.0.243
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.243","description":"Armtek UIKit for React","main":"cjs/index.js","module":"esm/index.js","types":"esm/index.d.ts","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"@popperjs/core":"^2.11.8","clsx":"^2.0.0","date-fns":"^4.1.0","rc-slider":"^10.2.1","react":"<=18.2.0","react-datepicker":"^8.3.0","react-dom":"<=18.2.0","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"<=18.2.0","react-dom":"<=18.2.0"},"engines":{"node":">=14.0.0"},"scripts":{"pub":"npm version patch && npm publish"}}
|
|
@@ -18,7 +18,7 @@ const FormControls = props => {
|
|
|
18
18
|
...divProps
|
|
19
19
|
} = props;
|
|
20
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
|
-
className: _const.FORM_CONTROLS_CLASSNAME,
|
|
21
|
+
className: (0, _clsx.default)(_const.FORM_CONTROLS_CLASSNAME),
|
|
22
22
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23
23
|
...divProps,
|
|
24
24
|
className: (0, _clsx.default)(className, 'arm-form-controls__stack'),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.FORM_CONTROLS_CLASSNAME = void 0;
|
|
5
|
-
const FORM_CONTROLS_CLASSNAME = exports.FORM_CONTROLS_CLASSNAME = 'arm-form-controls';
|
|
4
|
+
exports.FORM_CONTROLS_SKIP_REPLACE_CLASSNAME = exports.FORM_CONTROLS_CLASSNAME = void 0;
|
|
5
|
+
const FORM_CONTROLS_CLASSNAME = exports.FORM_CONTROLS_CLASSNAME = 'arm-form-controls';
|
|
6
|
+
const FORM_CONTROLS_SKIP_REPLACE_CLASSNAME = exports.FORM_CONTROLS_SKIP_REPLACE_CLASSNAME = '_skip_replace';
|
package/ui/Form/Select/Select.js
CHANGED
|
@@ -59,12 +59,19 @@ function Select(props, ref) {
|
|
|
59
59
|
return inputRef.current;
|
|
60
60
|
}, []);
|
|
61
61
|
const handleOpen = () => {
|
|
62
|
+
if (open !== undefined) return;
|
|
62
63
|
if (!inputProps.disabled) {
|
|
63
64
|
setActive(true);
|
|
64
65
|
// if( e.target instanceof HTMLDivElement )
|
|
65
66
|
// setAnchorEl(e.currentTarget)
|
|
66
67
|
}
|
|
67
68
|
};
|
|
69
|
+
function handleClose() {
|
|
70
|
+
if (onClose) onClose();else {
|
|
71
|
+
if (open !== undefined) return;
|
|
72
|
+
setActive(false);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
68
75
|
const handleSelect = (e, option) => {
|
|
69
76
|
if (e.target.classList.contains(_const.CHECKBOX_LABEL_CLASSNAME)) {
|
|
70
77
|
e.stopPropagation();
|
|
@@ -90,7 +97,7 @@ function Select(props, ref) {
|
|
|
90
97
|
if (search && !multiple) {
|
|
91
98
|
setQ(options.find(item => getOptionValue(item) === newValueS).text);
|
|
92
99
|
}
|
|
93
|
-
if (!multiple)
|
|
100
|
+
if (!multiple) handleClose();
|
|
94
101
|
};
|
|
95
102
|
const handleSearch = e => {
|
|
96
103
|
setQ(e.target.value);
|
|
@@ -148,9 +155,6 @@ function Select(props, ref) {
|
|
|
148
155
|
if (!!search) options = options.filter(item => item.text.toLowerCase().includes(q.toLowerCase()));
|
|
149
156
|
let valueArr = realValue ? Array.isArray(realValue) ? realValue : [realValue] : [];
|
|
150
157
|
let selectedOptions = options.filter(item => valueArr.includes(getOptionValue(item)));
|
|
151
|
-
function handleClose() {
|
|
152
|
-
if (onClose) onClose();else setActive(false);
|
|
153
|
-
}
|
|
154
158
|
let displayClear = clear && (multiple ? realValue && realValue.length > 0 : !!realValue);
|
|
155
159
|
let selectEndAdornment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
156
160
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.default, {
|
package/ui/Modal/Modal.js
CHANGED
|
@@ -19,6 +19,7 @@ function replaceControlsIfExists(container, props) {
|
|
|
19
19
|
if (!body) return;
|
|
20
20
|
const controls = body.querySelectorAll(`.${_const.FORM_CONTROLS_CLASSNAME}`);
|
|
21
21
|
if (controls.length !== 1) return;
|
|
22
|
+
if (controls[0].querySelector(`.${_const.FORM_CONTROLS_SKIP_REPLACE_CLASSNAME}`)) return;
|
|
22
23
|
const footer = document.createElement("div");
|
|
23
24
|
footer.classList.add(_const2.MODAL_FOOTER_CLASSNAME);
|
|
24
25
|
if ((_props$classes = props.classes) != null && _props$classes['Arm-Modal__footer']) footer.classList.add((_props$classes2 = props.classes) == null ? void 0 : _props$classes2['Arm-Modal__footer']);
|