armtek-uikit-react 1.0.229 → 1.0.232
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.232","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"}}
|
|
@@ -37,9 +37,12 @@ const DatePicker = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
37
37
|
inline: true,
|
|
38
38
|
renderDayContents: renderDayContents,
|
|
39
39
|
...props,
|
|
40
|
-
renderCustomHeader:
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
renderCustomHeader: headerProps => {
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PickerHeader, {
|
|
42
|
+
...headerProps,
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
43
46
|
})
|
|
44
47
|
})
|
|
45
48
|
});
|
package/ui/Form/Select/Select.js
CHANGED
|
@@ -53,6 +53,10 @@ function Select(props, ref) {
|
|
|
53
53
|
let [q, setQ] = (0, _react.useState)('');
|
|
54
54
|
const anchorEl = (0, _react.useRef)(null);
|
|
55
55
|
const inlineOptRef = (0, _useClickOutside.default)(handleClose);
|
|
56
|
+
const inputRef = (0, _react.useRef)(null);
|
|
57
|
+
(0, _react.useImperativeHandle)(ref, () => {
|
|
58
|
+
return inputRef.current;
|
|
59
|
+
}, []);
|
|
56
60
|
const handleOpen = () => {
|
|
57
61
|
if (!inputProps.disabled) {
|
|
58
62
|
setActive(true);
|
|
@@ -109,8 +113,14 @@ function Select(props, ref) {
|
|
|
109
113
|
};
|
|
110
114
|
const handleResetAll = clear ? e => {
|
|
111
115
|
e.preventDefault();
|
|
116
|
+
e.stopPropagation();
|
|
112
117
|
if (props.disabled) return;
|
|
113
118
|
setSelected(multiple ? [] : '');
|
|
119
|
+
if (search) {
|
|
120
|
+
setQ('');
|
|
121
|
+
setFocused(false);
|
|
122
|
+
if (inputRef.current) inputRef.current.value = '';
|
|
123
|
+
}
|
|
114
124
|
if (onChange) {
|
|
115
125
|
Object.defineProperty(e, 'target', {
|
|
116
126
|
writable: false,
|
|
@@ -185,7 +195,7 @@ function Select(props, ref) {
|
|
|
185
195
|
value: !search ? selectedText : value !== undefined && !q ? selectedText : query !== undefined ? query : q,
|
|
186
196
|
endAdornment: selectEndAdornment,
|
|
187
197
|
editable: !!search,
|
|
188
|
-
ref:
|
|
198
|
+
ref: inputRef,
|
|
189
199
|
style: cachedStyles,
|
|
190
200
|
WrapperProps: cachedWrapperProps
|
|
191
201
|
})
|
|
@@ -15,7 +15,7 @@ const TextArea = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
15
15
|
...restProps
|
|
16
16
|
} = props;
|
|
17
17
|
let [minHeight, setMinHeight] = (0, _react.useState)(0);
|
|
18
|
-
let textareaRef = (0, _react.useRef)();
|
|
18
|
+
let textareaRef = (0, _react.useRef)(null);
|
|
19
19
|
(0, _react.useImperativeHandle)(ref, () => {
|
|
20
20
|
return textareaRef.current;
|
|
21
21
|
}, []);
|
|
@@ -30,7 +30,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<{
|
|
|
30
30
|
editable?: boolean;
|
|
31
31
|
classes?: Partial<Classes>;
|
|
32
32
|
WrapperProps?: ComponentPropsWithoutRef<"div">;
|
|
33
|
-
} & Omit<InputHTMLAttributes<any>, "size"> & import("react").RefAttributes<
|
|
33
|
+
} & Omit<InputHTMLAttributes<any>, "size"> & import("react").RefAttributes<HTMLElement>>;
|
|
34
34
|
type ContainerPropsType = {
|
|
35
35
|
focused?: boolean;
|
|
36
36
|
disabled?: boolean;
|
|
@@ -144,7 +144,7 @@ const TextFieldContainer = props => {
|
|
|
144
144
|
};
|
|
145
145
|
exports.TextFieldContainer = TextFieldContainer;
|
|
146
146
|
const TextFieldInput = exports.TextFieldInput = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
147
|
-
var _ref$current;
|
|
147
|
+
var _ref$current, _ref$current2;
|
|
148
148
|
let {
|
|
149
149
|
Component = 'input',
|
|
150
150
|
size,
|
|
@@ -180,7 +180,7 @@ const TextFieldInput = exports.TextFieldInput = /*#__PURE__*/(0, _react.forwardR
|
|
|
180
180
|
}, className)
|
|
181
181
|
}), label && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
182
182
|
className: (0, _clsx.default)('arm-textfield__label', {
|
|
183
|
-
'arm-textfield__label_focused': focused || !!props.value ||
|
|
183
|
+
'arm-textfield__label_focused': focused || !!props.value || typeof ((_ref$current = ref.current) == null ? void 0 : _ref$current.value) === 'string' && !!((_ref$current2 = ref.current) != null && _ref$current2.value),
|
|
184
184
|
'arm-textfield__label_small': size === 'small',
|
|
185
185
|
'arm-textfield__label_error': error
|
|
186
186
|
}),
|