armtek-uikit-react 1.0.97 → 1.0.99
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/assets/Card.scss +1 -0
- package/package.json +1 -1
- package/ui/Form/DateField/DateField.js +2 -0
- package/ui/Form/Select/Select.d.ts +2 -0
- package/ui/Form/Select/Select.js +9 -3
- package/ui/Icon/Mi.js +4 -4
- package/ui/Popover/Popover.js +1 -1
- package/ui/Popover/index.d.ts +1 -0
- package/ui/Popover/index.js +2 -1
package/assets/Card.scss
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.99","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
|
|
@@ -49,6 +49,8 @@ export const DateField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
49
49
|
const btnRef = useRef();
|
|
50
50
|
const inputIcon = showTime && showTimeOnly ? 'schedule' : 'calendar_today';
|
|
51
51
|
let dateValue = typeof realValue === 'string' ? new Date(realValue) : realValue;
|
|
52
|
+
|
|
53
|
+
//TODO Подключение Popover ломает тесты, разобраться почему
|
|
52
54
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
53
55
|
children: [/*#__PURE__*/_jsx(TextField, {
|
|
54
56
|
ref: ref,
|
package/ui/Form/Select/Select.js
CHANGED
|
@@ -24,6 +24,7 @@ function Select(props) {
|
|
|
24
24
|
var _options$find;
|
|
25
25
|
let {
|
|
26
26
|
options,
|
|
27
|
+
defaultOpen,
|
|
27
28
|
endAdornment,
|
|
28
29
|
className,
|
|
29
30
|
inline,
|
|
@@ -35,11 +36,12 @@ function Select(props) {
|
|
|
35
36
|
open,
|
|
36
37
|
listStyle,
|
|
37
38
|
onSubmit,
|
|
39
|
+
onClose,
|
|
38
40
|
onClearAll,
|
|
39
41
|
onSelectAll,
|
|
40
42
|
...inputProps
|
|
41
43
|
} = props;
|
|
42
|
-
let [active, setActive] = useState(
|
|
44
|
+
let [active, setActive] = useState(!!defaultOpen);
|
|
43
45
|
let [selected, setSelected] = useState(defaultValue || (multiple ? [] : ''));
|
|
44
46
|
let [focused, setFocused] = useState(false);
|
|
45
47
|
let [q, setQ] = useState('');
|
|
@@ -113,6 +115,9 @@ function Select(props) {
|
|
|
113
115
|
if (!!search) options = options.filter(item => item.text.toLowerCase().includes(q.toLowerCase()));
|
|
114
116
|
let valueArr = realValue ? Array.isArray(realValue) ? realValue : [realValue] : [];
|
|
115
117
|
let selectedOptions = options.filter(item => valueArr.includes(getOptionValue(item)));
|
|
118
|
+
const handleClose = () => {
|
|
119
|
+
if (onClose) onClose();else setActive(false);
|
|
120
|
+
};
|
|
116
121
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
117
122
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
118
123
|
className: css.select,
|
|
@@ -138,10 +143,11 @@ function Select(props) {
|
|
|
138
143
|
disabled: inputProps.disabled,
|
|
139
144
|
onDelete: handleSelect
|
|
140
145
|
})]
|
|
141
|
-
}), anchorEl && /*#__PURE__*/_jsx(Popover, {
|
|
146
|
+
}), realActive && anchorEl && /*#__PURE__*/_jsx(Popover, {
|
|
147
|
+
matchWidth: true,
|
|
142
148
|
anchorEl: anchorEl,
|
|
143
149
|
open: realActive,
|
|
144
|
-
onClose:
|
|
150
|
+
onClose: handleClose,
|
|
145
151
|
placement: 'bottom-start',
|
|
146
152
|
children: /*#__PURE__*/_jsx(SelectOptions, {
|
|
147
153
|
disabled: inputProps.disabled,
|
package/ui/Icon/Mi.js
CHANGED
|
@@ -13,12 +13,12 @@ export const Mi = props => {
|
|
|
13
13
|
...tooltipProps,
|
|
14
14
|
text: title,
|
|
15
15
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
variant: 'outlined',
|
|
17
|
+
...iconProps
|
|
18
18
|
})
|
|
19
19
|
}) : /*#__PURE__*/_jsx(Icon, {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
variant: 'outlined',
|
|
21
|
+
...iconProps
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
24
|
};
|
package/ui/Popover/Popover.js
CHANGED
package/ui/Popover/index.d.ts
CHANGED
package/ui/Popover/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./Popover";
|
|
1
|
+
export { default } from "./Popover";
|
|
2
|
+
export * from "./Popover";
|