armtek-uikit-react 1.0.256 → 1.0.259
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/Accordion.scss +113 -123
- package/assets/Adornment.scss +22 -22
- package/assets/Alert.scss +56 -56
- package/assets/Avatar.scss +105 -111
- package/assets/AvatarGroup.scss +47 -47
- package/assets/BackDrop.scss +27 -27
- package/assets/Badge.scss +96 -96
- package/assets/Button.scss +750 -750
- package/assets/ButtonGroup.scss +37 -37
- package/assets/ButtonIcon.scss +32 -32
- package/assets/Card.scss +13 -13
- package/assets/Checkbox.scss +313 -313
- package/assets/Chip.scss +294 -313
- package/assets/DateField.scss +2 -2
- package/assets/DatePicker.scss +72 -72
- package/assets/Dropdown.scss +42 -42
- package/assets/FormControls.scss +14 -14
- package/assets/HelperText.scss +11 -11
- package/assets/Icon.scss +30 -30
- package/assets/Interval.scss +34 -34
- package/assets/Link.scss +96 -96
- package/assets/ListItem.scss +75 -73
- package/assets/Loader.scss +56 -56
- package/assets/Logo.scss +28 -28
- package/assets/Modal.scss +97 -97
- package/assets/Pagination.scss +3 -3
- package/assets/Paper.scss +19 -22
- package/assets/Period.scss +8 -8
- package/assets/Popper.scss +2 -2
- package/assets/Rating.scss +26 -26
- package/assets/Select.scss +85 -85
- package/assets/Skeleton.scss +25 -25
- package/assets/Slider.scss +5 -5
- package/assets/Stack.scss +27 -27
- package/assets/Status.scss +51 -69
- package/assets/StepItem.scss +89 -89
- package/assets/StepItemIcon.scss +47 -47
- package/assets/Stepper.scss +30 -30
- package/assets/Switch.scss +67 -67
- package/assets/Table.scss +37 -52
- package/assets/TextArea.scss +17 -17
- package/assets/TextField.scss +197 -197
- package/assets/Tooltip.scss +17 -17
- package/assets/classes.scss +422 -422
- package/assets/fonts.scss +24 -24
- package/assets/global.scss +221 -222
- package/assets/styles.min.css +1 -1
- package/assets/styles.min.css.map +1 -1
- package/assets/styles.scss +46 -46
- package/assets/variables.scss +13 -13
- package/lib/hooks/useEnhancedEffect.js +6 -6
- package/lib/hooks/useTimeout.js +2 -2
- package/package.json +1 -1
- package/ui/Avatar/Avatar.d.ts +0 -1
- package/ui/Avatar/Avatar.js +1 -2
- package/ui/Button/Button.d.ts +1 -1
- package/ui/ButtonIcon/ButtonIcon.d.ts +1 -1
- package/ui/Chip/Chip.d.ts +3 -2
- package/ui/Chip/Chip.js +20 -2
- package/ui/Form/DateField/DateField.js +0 -4
- package/ui/Form/DatePicker/styles.css +802 -802
- package/ui/Form/FormControls/FormControls.js +1 -1
- package/ui/Form/FormControls/const.d.ts +0 -1
- package/ui/Form/FormControls/const.js +2 -3
- package/ui/Form/Period/Period.d.ts +1 -12
- package/ui/Form/Period/Period.js +4 -16
- package/ui/Form/Select/Select.d.ts +2 -2
- package/ui/Form/Select/Select.js +4 -8
- package/ui/Form/Select/SelectSummary.d.ts +3 -3
- package/ui/Form/TimeField/TimeField.d.ts +1 -1
- package/ui/Modal/Modal.js +0 -1
- package/ui/Slider/style.scss +346 -346
- package/ui/Table/Table.js +1 -4
|
@@ -18,7 +18,7 @@ const FormControls = props => {
|
|
|
18
18
|
...divProps
|
|
19
19
|
} = props;
|
|
20
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21
|
-
className:
|
|
21
|
+
className: _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,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.
|
|
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';
|
|
4
|
+
exports.FORM_CONTROLS_CLASSNAME = void 0;
|
|
5
|
+
const FORM_CONTROLS_CLASSNAME = exports.FORM_CONTROLS_CLASSNAME = 'arm-form-controls';
|
|
@@ -6,17 +6,6 @@ export type PeriodChangeEvent = (Event & {
|
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
8
|
});
|
|
9
|
-
export type PeriodProps = {
|
|
10
|
-
onChange?: (e: PeriodChangeEvent) => void;
|
|
11
|
-
value?: [Date | null, Date | null];
|
|
12
|
-
defaultValue?: [Date | null, Date | null];
|
|
13
|
-
disableSameDate?: boolean;
|
|
14
|
-
minDate?: Date | null;
|
|
15
|
-
maxDate?: Date | null;
|
|
16
|
-
showMonthDropdown?: boolean;
|
|
17
|
-
showYearDropdown?: boolean;
|
|
18
|
-
datePickerProps?: DatePickerProps;
|
|
19
|
-
} & Omit<TextFieldProps, 'value' | 'onChange' | 'defaultValue'>;
|
|
20
9
|
export declare function getPeriodDisplay(date1: Date | null | undefined, date2: Date | null | undefined): string;
|
|
21
10
|
declare const Period: import("react").ForwardRefExoticComponent<{
|
|
22
11
|
onChange?: (e: PeriodChangeEvent) => void;
|
|
@@ -28,5 +17,5 @@ declare const Period: import("react").ForwardRefExoticComponent<{
|
|
|
28
17
|
showMonthDropdown?: boolean;
|
|
29
18
|
showYearDropdown?: boolean;
|
|
30
19
|
datePickerProps?: DatePickerProps;
|
|
31
|
-
} & Omit<TextFieldProps, "
|
|
20
|
+
} & Omit<TextFieldProps, "defaultValue" | "onChange" | "value"> & import("react").RefAttributes<unknown>>;
|
|
32
21
|
export default Period;
|
package/ui/Form/Period/Period.js
CHANGED
|
@@ -114,22 +114,9 @@ const Period = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
if (startDateValid && endDateValid
|
|
117
|
+
if (startDateValid && endDateValid) {
|
|
118
118
|
handleSelect([startDateValid, endDateValid]);
|
|
119
|
-
}
|
|
120
|
-
// else
|
|
121
|
-
// {
|
|
122
|
-
// handleSelect([null, null])
|
|
123
|
-
// }
|
|
124
|
-
};
|
|
125
|
-
const handleBlur = e => {
|
|
126
|
-
setActive(false);
|
|
127
|
-
const value = e.target.value;
|
|
128
|
-
const valueParts = value.split(DELIMITER);
|
|
129
|
-
const startDateValid = valueParts[0] ? validateDate(valueParts[0], minDate, maxDate) : null;
|
|
130
|
-
const endDateValid = valueParts[1] ? validateDate(valueParts[1], minDate, maxDate) : null;
|
|
131
|
-
if (!startDateValid || !endDateValid || startDateValid && endDateValid && endDateValid.getTime() < startDateValid.getTime()) {
|
|
132
|
-
setTextValue('');
|
|
119
|
+
} else {
|
|
133
120
|
handleSelect([null, null]);
|
|
134
121
|
}
|
|
135
122
|
};
|
|
@@ -160,8 +147,9 @@ const Period = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
160
147
|
placeholder: 'дд.мм.гггг - дд.мм.гггг',
|
|
161
148
|
...restProps,
|
|
162
149
|
disabled: disabled,
|
|
150
|
+
id: 'period',
|
|
163
151
|
value: textValue,
|
|
164
|
-
onBlur:
|
|
152
|
+
onBlur: () => setActive(false),
|
|
165
153
|
onChange: handleChange,
|
|
166
154
|
onFocus: () => setActive(false),
|
|
167
155
|
autoComplete: 'off',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextFieldProps } from '../TextField/TextField';
|
|
2
|
-
import { MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { MouseEvent, KeyboardEvent, ReactNode } from 'react';
|
|
3
3
|
export type OptionType = {
|
|
4
4
|
text: string;
|
|
5
5
|
value: string;
|
|
@@ -42,7 +42,7 @@ export type SelectOptionsType<T extends boolean> = {
|
|
|
42
42
|
value?: T extends true ? string[] : string;
|
|
43
43
|
inline?: boolean;
|
|
44
44
|
multiple?: T;
|
|
45
|
-
onClick: (e: MouseEvent
|
|
45
|
+
onClick: (e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>, option: OptionType) => void;
|
|
46
46
|
listStyle?: 'checkbox' | 'default';
|
|
47
47
|
onSelectAll?: (e: MouseEvent) => void;
|
|
48
48
|
onClear?: (e: MouseEvent) => void;
|
package/ui/Form/Select/Select.js
CHANGED
|
@@ -59,19 +59,12 @@ function Select(props, ref) {
|
|
|
59
59
|
return inputRef.current;
|
|
60
60
|
}, []);
|
|
61
61
|
const handleOpen = () => {
|
|
62
|
-
if (open !== undefined) return;
|
|
63
62
|
if (!inputProps.disabled) {
|
|
64
63
|
setActive(true);
|
|
65
64
|
// if( e.target instanceof HTMLDivElement )
|
|
66
65
|
// setAnchorEl(e.currentTarget)
|
|
67
66
|
}
|
|
68
67
|
};
|
|
69
|
-
function handleClose() {
|
|
70
|
-
if (onClose) onClose();else {
|
|
71
|
-
if (open !== undefined) return;
|
|
72
|
-
setActive(false);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
68
|
const handleSelect = (e, option) => {
|
|
76
69
|
if (e.target.classList.contains(_const.CHECKBOX_LABEL_CLASSNAME)) {
|
|
77
70
|
e.stopPropagation();
|
|
@@ -97,7 +90,7 @@ function Select(props, ref) {
|
|
|
97
90
|
if (search && !multiple) {
|
|
98
91
|
setQ(options.find(item => getOptionValue(item) === newValueS).text);
|
|
99
92
|
}
|
|
100
|
-
if (!multiple)
|
|
93
|
+
if (!multiple) setActive(false);
|
|
101
94
|
};
|
|
102
95
|
const handleSearch = e => {
|
|
103
96
|
setQ(e.target.value);
|
|
@@ -155,6 +148,9 @@ function Select(props, ref) {
|
|
|
155
148
|
if (!!search) options = options.filter(item => item.text.toLowerCase().includes(q.toLowerCase()));
|
|
156
149
|
let valueArr = realValue ? Array.isArray(realValue) ? realValue : [realValue] : [];
|
|
157
150
|
let selectedOptions = options.filter(item => valueArr.includes(getOptionValue(item)));
|
|
151
|
+
function handleClose() {
|
|
152
|
+
if (onClose) onClose();else setActive(false);
|
|
153
|
+
}
|
|
158
154
|
let displayClear = clear && (multiple ? realValue && realValue.length > 0 : !!realValue);
|
|
159
155
|
let selectEndAdornment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
160
156
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Adornment.default, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MouseEvent } from 'react';
|
|
1
|
+
import { MouseEvent, KeyboardEvent } from 'react';
|
|
2
2
|
import { OptionType } from '../../../ui/Form/Select/Select';
|
|
3
3
|
export type SelectSummaryProps = {
|
|
4
|
-
onClose: (e: MouseEvent
|
|
4
|
+
onClose: (e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>, option: OptionType) => void;
|
|
5
5
|
options: OptionType[];
|
|
6
6
|
value: string[];
|
|
7
7
|
} & Omit<SelectSummaryControlsProps, 'countSelected' | 'countTotal'>;
|
|
@@ -9,7 +9,7 @@ export declare const SelectSummary: (props: SelectSummaryProps) => import("react
|
|
|
9
9
|
type SelectSummaryChipsProps = {
|
|
10
10
|
options: OptionType[];
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
onDelete: (e: MouseEvent
|
|
12
|
+
onDelete: (e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>, option: OptionType) => void;
|
|
13
13
|
};
|
|
14
14
|
export declare const SelectSummaryChips: (props: SelectSummaryChipsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
type SelectSummaryControlsProps = {
|
|
@@ -9,10 +9,10 @@ declare const TimeField: import("react").ForwardRefExoticComponent<{
|
|
|
9
9
|
showMonthYearPicker?: boolean;
|
|
10
10
|
showYearPicker?: boolean;
|
|
11
11
|
} & {
|
|
12
|
+
error?: boolean | undefined;
|
|
12
13
|
label?: string | undefined;
|
|
13
14
|
className?: string | undefined | undefined;
|
|
14
15
|
placeholder?: string | undefined | undefined;
|
|
15
|
-
error?: boolean | undefined;
|
|
16
16
|
helperText?: import("react").ReactNode;
|
|
17
17
|
} & Omit<import("react-datepicker").DatePickerProps, keyof {
|
|
18
18
|
onClick?: (e: import("react").MouseEvent) => void;
|
package/ui/Modal/Modal.js
CHANGED
|
@@ -19,7 +19,6 @@ 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;
|
|
23
22
|
const footer = document.createElement("div");
|
|
24
23
|
footer.classList.add(_const2.MODAL_FOOTER_CLASSNAME);
|
|
25
24
|
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']);
|