@true-engineering/true-react-common-ui-kit 4.0.0-alpha3 → 4.0.0-alpha31
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/README.md +11 -607
- package/dist/components/Button/Button.styles.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/components/ControlWrapper/ControlWrapper.d.ts +4 -2
- package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +2 -1
- package/dist/components/ControlWrapper/helpers.d.ts +4 -0
- package/dist/components/ControlWrapper/index.d.ts +2 -0
- package/dist/components/ControlWrapper/types.d.ts +12 -0
- package/dist/components/DateInput/DateInput.d.ts +1 -2
- package/dist/components/DatePicker/DatePicker.d.ts +4 -3
- package/dist/components/DatePicker/DatePicker.styles.d.ts +1 -1
- package/dist/components/DatePicker/components/DatePickerBase/DatePickerBase.d.ts +5 -0
- package/dist/components/DatePicker/components/DatePickerBase/index.d.ts +1 -0
- package/dist/components/DatePicker/components/PopperContainer/PopperContainer.d.ts +2 -4
- package/dist/components/DatePicker/components/index.d.ts +1 -0
- package/dist/components/DatePicker/constants.d.ts +7 -2
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/types.d.ts +3 -3
- package/dist/components/FiltersPane/FiltersPane.d.ts +7 -2
- package/dist/components/FiltersPane/components/Filter/Filter.d.ts +2 -2
- package/dist/components/FiltersPane/components/Filter/helpers.d.ts +4 -0
- package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +1 -1
- package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +1 -1
- package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +3 -1
- package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +2 -2
- package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +2 -2
- package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
- package/dist/components/FiltersPane/types.d.ts +16 -5
- package/dist/components/Flag/customFlags/customFlags.d.ts +10 -0
- package/dist/components/Flag/customFlags/index.d.ts +1 -0
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +4 -2
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +4 -3
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +6 -6
- package/dist/components/FlexibleTable/constants.d.ts +18 -2
- package/dist/components/FlexibleTable/types.d.ts +20 -12
- package/dist/components/Icon/icons-list.d.ts +1 -1
- package/dist/components/IconButton/IconButton.styles.d.ts +1 -1
- package/dist/components/IncrementInput/IncrementInput.styles.d.ts +1 -3
- package/dist/components/Input/Input.d.ts +3 -2
- package/dist/components/Input/InputBase.d.ts +2 -2
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/index.d.ts +2 -1
- package/dist/components/List/types.d.ts +4 -0
- package/dist/components/Modal/Modal.styles.d.ts +1 -1
- package/dist/components/Notification/Notification.styles.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.styles.d.ts +1 -1
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +5 -3
- package/dist/components/Select/Select.styles.d.ts +5 -5
- package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +2 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Status/Status.styles.d.ts +3 -2
- package/dist/components/Status/constants.d.ts +0 -1
- package/dist/components/Status/index.d.ts +1 -0
- package/dist/components/Status/types.d.ts +5 -2
- package/dist/components/TextArea/TextArea.d.ts +4 -5
- package/dist/components/TextArea/TextArea.styles.d.ts +5 -4
- package/dist/components/TextArea/index.d.ts +1 -1
- package/dist/components/TextArea/types.d.ts +4 -2
- package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/components/WithMessages/WithMessages.styles.d.ts +1 -1
- package/dist/components/WithPopup/WithPopup.d.ts +11 -3
- package/dist/hooks/index.d.ts +7 -4
- package/dist/hooks/use-intersection-ref.d.ts +8 -0
- package/dist/hooks/use-latest-ref.d.ts +2 -0
- package/dist/hooks/use-merge.d.ts +1 -0
- package/dist/hooks/use-mixed-styles.d.ts +3 -1
- package/dist/hooks/use-on-click-outside.d.ts +2 -2
- package/dist/hooks/use-tweak-styles.d.ts +5 -5
- package/dist/style.css +78 -142
- package/dist/theme/Provider.d.ts +6 -3
- package/dist/theme/create-themed-styles.d.ts +2 -0
- package/dist/theme/helpers.d.ts +9 -3
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/true-jss/ThemedStylesManager.d.ts +18 -0
- package/dist/theme/true-jss/TweakStylesManager.d.ts +34 -0
- package/dist/theme/true-jss/index.d.ts +2 -0
- package/dist/theme/true-jss/jss-context.d.ts +9 -0
- package/dist/theme/types.d.ts +5 -3
- package/dist/true-react-common-ui-kit.js +8157 -6924
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +8004 -6772
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +10 -3
- package/package.json +4 -5
- package/src/components/ControlWrapper/ControlWrapper.stories.tsx +8 -3
- package/src/components/ControlWrapper/ControlWrapper.styles.ts +7 -6
- package/src/components/ControlWrapper/ControlWrapper.tsx +31 -20
- package/src/components/ControlWrapper/helpers.ts +11 -0
- package/src/components/ControlWrapper/index.ts +2 -0
- package/src/components/ControlWrapper/types.ts +16 -0
- package/src/components/DateInput/DateInput.stories.tsx +0 -1
- package/src/components/DateInput/DateInput.tsx +3 -4
- package/src/components/DatePicker/DatePicker.stories.tsx +24 -11
- package/src/components/DatePicker/DatePicker.styles.ts +3 -1
- package/src/components/DatePicker/DatePicker.tsx +47 -16
- package/src/components/DatePicker/components/DatePickerBase/DatePickerBase.tsx +14 -0
- package/src/components/DatePicker/components/DatePickerBase/index.ts +1 -0
- package/src/components/DatePicker/components/PopperContainer/PopperContainer.tsx +4 -4
- package/src/components/DatePicker/components/index.ts +1 -0
- package/src/components/DatePicker/constants.ts +9 -3
- package/src/components/DatePicker/helpers.ts +1 -1
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/DatePicker/types.ts +6 -4
- package/src/components/FiltersPane/FiltersPane.stories.tsx +4 -2
- package/src/components/FiltersPane/FiltersPane.tsx +28 -19
- package/src/components/FiltersPane/components/Filter/Filter.tsx +36 -30
- package/src/components/FiltersPane/components/Filter/helpers.ts +18 -0
- package/src/components/FiltersPane/components/FilterSelect/FilterSelect.tsx +22 -23
- package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +27 -22
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.ts +2 -1
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +3 -4
- package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +4 -3
- package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +14 -10
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +5 -0
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +16 -19
- package/src/components/FiltersPane/types.ts +24 -5
- package/src/components/Flag/Flag.stories.tsx +2 -1
- package/src/components/Flag/Flag.styles.ts +4 -0
- package/src/components/Flag/Flag.tsx +23 -9
- package/src/components/Flag/customFlags/AB.svg +1 -0
- package/src/components/Flag/customFlags/OS.svg +1 -0
- package/src/components/Flag/customFlags/augment.d.ts +1 -0
- package/src/components/Flag/customFlags/customFlags.ts +13 -0
- package/src/components/Flag/customFlags/index.ts +1 -0
- package/src/components/FlexibleTable/FlexibleTable.tsx +40 -63
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +8 -5
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +13 -12
- package/src/components/FlexibleTable/constants.ts +6 -3
- package/src/components/FlexibleTable/types.ts +20 -16
- package/src/components/IncrementInput/IncrementInput.stories.tsx +2 -0
- package/src/components/IncrementInput/IncrementInput.styles.ts +31 -39
- package/src/components/IncrementInput/IncrementInput.tsx +28 -25
- package/src/components/Input/Input.stories.tsx +1 -6
- package/src/components/Input/Input.tsx +5 -3
- package/src/components/Input/InputBase.tsx +27 -25
- package/src/components/List/List.tsx +5 -2
- package/src/components/List/index.ts +2 -1
- package/src/components/List/types.ts +5 -0
- package/src/components/MultiSelectList/MultiSelectList.tsx +15 -11
- package/src/components/NumberInput/NumberInput.stories.tsx +5 -1
- package/src/components/PhoneInput/PhoneInput.stories.tsx +2 -1
- package/src/components/PhoneInput/PhoneInput.tsx +5 -2
- package/src/components/SearchInput/SearchInput.tsx +20 -29
- package/src/components/Select/CustomSelect.stories.tsx +1 -0
- package/src/components/Select/MultiSelect.stories.tsx +5 -0
- package/src/components/Select/Select.stories.tsx +6 -0
- package/src/components/Select/Select.styles.ts +5 -40
- package/src/components/Select/Select.tsx +36 -22
- package/src/components/Select/components/SelectList/SelectList.tsx +4 -2
- package/src/components/Select/components/SelectListItem/SelectListItem.tsx +5 -2
- package/src/components/Select/index.ts +1 -1
- package/src/components/Status/Status.stories.tsx +54 -1
- package/src/components/Status/Status.styles.ts +2 -37
- package/src/components/Status/constants.ts +0 -10
- package/src/components/Status/index.ts +1 -1
- package/src/components/Status/types.ts +7 -3
- package/src/components/TextArea/TextArea.stories.tsx +15 -1
- package/src/components/TextArea/TextArea.styles.ts +15 -8
- package/src/components/TextArea/TextArea.tsx +96 -62
- package/src/components/TextArea/index.ts +1 -1
- package/src/components/TextArea/types.ts +5 -5
- package/src/components/TextButton/TextButton.styles.ts +1 -0
- package/src/components/Tooltip/Tooltip.styles.ts +2 -0
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/WithMessages/WithMessages.stories.tsx +1 -1
- package/src/components/WithPopup/WithPopup.tsx +36 -15
- package/src/constants/phone-info.ts +20 -33
- package/src/helpers/phone.ts +19 -15
- package/src/hooks/index.ts +7 -4
- package/src/hooks/use-intersection-ref.ts +30 -0
- package/src/hooks/use-latest-ref.ts +7 -0
- package/src/hooks/use-merge.ts +8 -0
- package/src/hooks/use-mixed-styles.ts +9 -11
- package/src/hooks/use-on-click-outside.ts +22 -14
- package/src/hooks/use-tweak-styles.ts +49 -27
- package/src/theme/Provider.tsx +10 -5
- package/src/theme/create-themed-styles.ts +78 -0
- package/src/theme/helpers.ts +39 -39
- package/src/theme/index.ts +2 -0
- package/src/theme/true-jss/ThemedStylesManager.ts +92 -0
- package/src/theme/true-jss/TweakStylesManager.ts +157 -0
- package/src/theme/true-jss/index.ts +2 -0
- package/src/theme/true-jss/jss-context.tsx +34 -0
- package/src/theme/types.ts +5 -3
- package/src/types.ts +17 -4
- package/dist/components/AccountInfo/AccountInfo.stories.d.ts +0 -6
- package/dist/components/AddButton/AddButton.stories.d.ts +0 -6
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -8
- package/dist/components/CloseButton/CloseButton.stories.d.ts +0 -5
- package/dist/components/Colors/Colors.stories.d.ts +0 -5
- package/dist/components/ControlWrapper/ControlWrapper.stories.d.ts +0 -6
- package/dist/components/DateInput/DateInput.stories.d.ts +0 -7
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
- package/dist/components/Description/Description.stories.d.ts +0 -16
- package/dist/components/FileInput/FileInput.stories.d.ts +0 -7
- package/dist/components/FileItem/FileItem.stories.d.ts +0 -8
- package/dist/components/FiltersPane/FiltersPane.stories.d.ts +0 -31
- package/dist/components/Flag/Flag.stories.d.ts +0 -12
- package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +0 -19
- package/dist/components/Icon/Icon.stories.d.ts +0 -6
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -6
- package/dist/components/IncrementInput/IncrementInput.stories.d.ts +0 -6
- package/dist/components/Input/Input.stories.d.ts +0 -25
- package/dist/components/List/List.stories.d.ts +0 -5
- package/dist/components/Modal/Modal.stories.d.ts +0 -29
- package/dist/components/MoreMenu/MoreMenu.stories.d.ts +0 -6
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -13
- package/dist/components/NewMoreMenu/NewMoreMenu.stories.d.ts +0 -12
- package/dist/components/Notification/Notification.stories.d.ts +0 -8
- package/dist/components/NumberInput/NumberInput.stories.d.ts +0 -7
- package/dist/components/PhoneInput/PhoneInput.stories.d.ts +0 -28
- package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.d.ts +0 -5
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -7
- package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -6
- package/dist/components/Select/CustomSelect.stories.d.ts +0 -11
- package/dist/components/Select/MultiSelect.stories.d.ts +0 -15
- package/dist/components/Select/Select.stories.d.ts +0 -15
- package/dist/components/Selector/Selector.stories.d.ts +0 -7
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -6
- package/dist/components/SmartInput/SmartInput.stories.d.ts +0 -18
- package/dist/components/Status/Status.stories.d.ts +0 -6
- package/dist/components/Switch/Switch.stories.d.ts +0 -16
- package/dist/components/TextArea/TextArea.stories.d.ts +0 -17
- package/dist/components/TextButton/TextButton.stories.d.ts +0 -6
- package/dist/components/TextWithInfo/TextWithInfo.stories.d.ts +0 -12
- package/dist/components/TextWithTooltip/TextWithTooltip.stories.d.ts +0 -24
- package/dist/components/ThemedPreloader/ThemedPreloader.stories.d.ts +0 -17
- package/dist/components/Toaster/Toaster.stories.d.ts +0 -5
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -5
- package/dist/components/WithMessages/WithMessages.stories.d.ts +0 -7
- package/dist/components/WithPopup/WithPopup.stories.d.ts +0 -16
- package/dist/components/WithTooltip/WithTooltip.stories.d.ts +0 -6
|
@@ -1,41 +1,44 @@
|
|
|
1
1
|
import { animations, colors, createThemedStyles, dimensions, ITweakStyles } from '../../theme';
|
|
2
2
|
import { IInputStyles } from '../Input';
|
|
3
3
|
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export const inputStyles: IInputStyles = {
|
|
5
|
+
tweakControlWrapper: {
|
|
6
|
+
controlWrapper: {
|
|
7
|
+
'--increment-buttons-width': '36px',
|
|
8
|
+
'--increment-buttons-gap': '1px',
|
|
9
|
+
'--increment-buttons-margin': '1px',
|
|
10
|
+
'--increment-button-icon-size': '16px',
|
|
11
|
+
},
|
|
12
12
|
},
|
|
13
|
+
};
|
|
13
14
|
|
|
15
|
+
export const useStyles = createThemedStyles('IncrementInput', {
|
|
14
16
|
buttons: {
|
|
15
17
|
display: 'flex',
|
|
16
18
|
flexDirection: 'column',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
height: 'calc(100% - var(--increment-buttons-margin) * 2)',
|
|
20
|
+
margin: 'var(--increment-buttons-margin)',
|
|
21
|
+
gap: 'var(--increment-buttons-gap)',
|
|
22
|
+
flexShrink: 0,
|
|
23
|
+
order: 1000, // сдвигаем кнопки на самый конец
|
|
24
|
+
|
|
22
25
|
zIndex: dimensions.Z_INDEX.CONTROL_FOCUS + 1,
|
|
23
26
|
},
|
|
24
27
|
|
|
25
28
|
button: {
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
display: 'flex',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
width: 'var(--increment-buttons-width)',
|
|
33
|
+
flexGrow: 1,
|
|
34
|
+
|
|
35
|
+
cursor: 'pointer',
|
|
28
36
|
border: 'none',
|
|
29
37
|
outline: 'none',
|
|
38
|
+
color: colors.FONT_MEDIUM,
|
|
30
39
|
backgroundColor: colors.GREY_BACKGROUND,
|
|
31
40
|
transition: animations.defaultTransition,
|
|
32
|
-
transitionProperty: 'background-color',
|
|
33
|
-
color: colors.FONT_MEDIUM,
|
|
34
|
-
cursor: 'pointer',
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
justifyContent: 'center',
|
|
38
|
-
padding: [0, 10],
|
|
41
|
+
transitionProperty: 'background-color, color',
|
|
39
42
|
|
|
40
43
|
'&:hover, &:focus': {
|
|
41
44
|
backgroundColor: colors.GREY_HOVER,
|
|
@@ -44,16 +47,12 @@ export const useStyles = createThemedStyles('IncrementInput', {
|
|
|
44
47
|
'&:active': {
|
|
45
48
|
backgroundColor: colors.GREY_ACTIVE,
|
|
46
49
|
},
|
|
47
|
-
|
|
48
|
-
'&:first-child': {
|
|
49
|
-
marginBottom: 1,
|
|
50
|
-
},
|
|
51
50
|
},
|
|
52
51
|
|
|
53
52
|
disabledButton: {
|
|
54
|
-
backgroundColor: colors.CLASSIC_WHITE,
|
|
55
|
-
color: colors.FONT_DISABLED,
|
|
56
53
|
cursor: 'default',
|
|
54
|
+
color: colors.FONT_DISABLED,
|
|
55
|
+
backgroundColor: colors.CLASSIC_WHITE,
|
|
57
56
|
|
|
58
57
|
'&:hover': {
|
|
59
58
|
backgroundColor: colors.CLASSIC_WHITE,
|
|
@@ -61,18 +60,11 @@ export const useStyles = createThemedStyles('IncrementInput', {
|
|
|
61
60
|
},
|
|
62
61
|
|
|
63
62
|
errorButton: {},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export const inputStyles: IInputStyles = {
|
|
67
|
-
input: {
|
|
68
|
-
paddingRight: BUTTONS_WIDTH + BUTTONS_GAP,
|
|
69
|
-
},
|
|
70
63
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
64
|
+
icon: {
|
|
65
|
+
width: 'var(--increment-button-icon-size)',
|
|
66
|
+
height: 'var(--increment-button-icon-size)',
|
|
75
67
|
},
|
|
76
|
-
};
|
|
68
|
+
});
|
|
77
69
|
|
|
78
70
|
export type IIncrementInputStyles = ITweakStyles<typeof useStyles, { tweakInput: IInputStyles }>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, useEffect } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isNotEmpty, isNumberInteger } from '@true-engineering/true-react-platform-helpers';
|
|
4
|
+
import { getNumberInRange, getNumberLength } from '../../helpers';
|
|
5
5
|
import { useTweakStyles } from '../../hooks';
|
|
6
6
|
import { ICommonProps } from '../../types';
|
|
7
7
|
import { Icon } from '../Icon';
|
|
@@ -22,8 +22,6 @@ export const IncrementInput: FC<IIncrementInputProps> = ({
|
|
|
22
22
|
max,
|
|
23
23
|
step = 1,
|
|
24
24
|
intPartPrecision,
|
|
25
|
-
data,
|
|
26
|
-
testId,
|
|
27
25
|
tweakStyles,
|
|
28
26
|
isDisabled,
|
|
29
27
|
isReadonly,
|
|
@@ -39,14 +37,15 @@ export const IncrementInput: FC<IIncrementInputProps> = ({
|
|
|
39
37
|
|
|
40
38
|
const classes = useStyles({ theme: tweakStyles });
|
|
41
39
|
|
|
40
|
+
const isEditDisabled = isDisabled || isReadonly;
|
|
41
|
+
|
|
42
42
|
const isIncreaseDisabled =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(
|
|
46
|
-
(max !== undefined && value !== undefined && value >= max);
|
|
43
|
+
isEditDisabled ||
|
|
44
|
+
(isNotEmpty(intPartPrecision) && getNumberLength((value ?? 0) + step) > intPartPrecision) ||
|
|
45
|
+
(isNotEmpty(max) && isNotEmpty(value) && value >= max);
|
|
47
46
|
|
|
48
47
|
const isDecreaseDisabled =
|
|
49
|
-
|
|
48
|
+
isEditDisabled || (isNotEmpty(min) && isNotEmpty(value) && value <= min);
|
|
50
49
|
|
|
51
50
|
const increment = (): void => {
|
|
52
51
|
onChange(getNumberInRange((value ?? 0) + step, min, max));
|
|
@@ -63,19 +62,18 @@ export const IncrementInput: FC<IIncrementInputProps> = ({
|
|
|
63
62
|
}, [step]);
|
|
64
63
|
|
|
65
64
|
return (
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/>
|
|
65
|
+
<NumberInput
|
|
66
|
+
{...props}
|
|
67
|
+
isInvalid={isInvalid}
|
|
68
|
+
isDisabled={isDisabled}
|
|
69
|
+
isReadonly={isReadonly}
|
|
70
|
+
min={min}
|
|
71
|
+
max={max}
|
|
72
|
+
intPartPrecision={intPartPrecision}
|
|
73
|
+
onChange={onChange}
|
|
74
|
+
value={value}
|
|
75
|
+
tweakStyles={tweakInputStyles}
|
|
76
|
+
>
|
|
79
77
|
<div className={classes.buttons}>
|
|
80
78
|
<button
|
|
81
79
|
className={clsx(classes.button, {
|
|
@@ -86,8 +84,11 @@ export const IncrementInput: FC<IIncrementInputProps> = ({
|
|
|
86
84
|
disabled={isIncreaseDisabled}
|
|
87
85
|
onClick={increment}
|
|
88
86
|
>
|
|
89
|
-
<
|
|
87
|
+
<div className={classes.icon}>
|
|
88
|
+
<Icon type="plus" />
|
|
89
|
+
</div>
|
|
90
90
|
</button>
|
|
91
|
+
|
|
91
92
|
<button
|
|
92
93
|
className={clsx(classes.button, {
|
|
93
94
|
[classes.disabledButton]: isDecreaseDisabled,
|
|
@@ -97,9 +98,11 @@ export const IncrementInput: FC<IIncrementInputProps> = ({
|
|
|
97
98
|
disabled={isDecreaseDisabled}
|
|
98
99
|
onClick={decrement}
|
|
99
100
|
>
|
|
100
|
-
<
|
|
101
|
+
<div className={classes.icon}>
|
|
102
|
+
<Icon type="minus" />
|
|
103
|
+
</div>
|
|
101
104
|
</button>
|
|
102
105
|
</div>
|
|
103
|
-
</
|
|
106
|
+
</NumberInput>
|
|
104
107
|
);
|
|
105
108
|
};
|
|
@@ -35,12 +35,7 @@ const Template: ComponentStory<typeof Input> = (args) => {
|
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<div style={{ width: 300 }}>
|
|
38
|
-
<Input
|
|
39
|
-
{...args}
|
|
40
|
-
value={value}
|
|
41
|
-
onChange={setValue}
|
|
42
|
-
onIconClick={() => console.log('icon click')}
|
|
43
|
-
/>
|
|
38
|
+
<Input {...args} value={value} onChange={setValue} />
|
|
44
39
|
</div>
|
|
45
40
|
);
|
|
46
41
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
+
import { getTestId } from '@true-engineering/true-react-platform-helpers';
|
|
2
3
|
import { useTweakStyles } from '../../hooks';
|
|
3
4
|
import { IWithMessagesProps, WithMessages } from '../WithMessages';
|
|
4
5
|
import { IInputBaseProps, InputBase } from './InputBase';
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
-
|
|
7
|
+
export interface IInputProps
|
|
8
|
+
extends IInputBaseProps,
|
|
9
|
+
Pick<IWithMessagesProps, 'infoMessage' | 'errorMessage'> {}
|
|
8
10
|
|
|
9
11
|
export const Input = forwardRef<HTMLInputElement, IInputProps>(
|
|
10
12
|
({ infoMessage, errorMessage, isInvalid, testId, tweakStyles, ...inputProps }, ref) => {
|
|
@@ -17,7 +19,7 @@ export const Input = forwardRef<HTMLInputElement, IInputProps>(
|
|
|
17
19
|
<WithMessages
|
|
18
20
|
errorMessage={errorMessage}
|
|
19
21
|
infoMessage={infoMessage}
|
|
20
|
-
testId={testId}
|
|
22
|
+
testId={getTestId(testId, 'wrapper')}
|
|
21
23
|
tweakStyles={tweakWithMessagesStyles}
|
|
22
24
|
>
|
|
23
25
|
<InputBase
|
|
@@ -15,12 +15,12 @@ import InputMask, { Props as ReactInputMaskBaseProps } from 'react-input-mask';
|
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import {
|
|
17
17
|
addDataTestId,
|
|
18
|
+
isArrayLikeNotEmpty,
|
|
18
19
|
isNotEmpty,
|
|
19
20
|
isReactNodeNotEmpty,
|
|
20
21
|
isStringNotEmpty,
|
|
21
|
-
mergeRefs,
|
|
22
22
|
} from '@true-engineering/true-react-platform-helpers';
|
|
23
|
-
import { useTweakStyles } from '../../hooks';
|
|
23
|
+
import { useMergedRefs, useTweakStyles } from '../../hooks';
|
|
24
24
|
import { IClickHandlerEvent, ICommonProps } from '../../types';
|
|
25
25
|
import { ControlWrapper, IControlWrapperProps } from '../ControlWrapper';
|
|
26
26
|
import { IChangeInputEvent } from './types';
|
|
@@ -28,30 +28,17 @@ import { IInputStyles, useStyles } from './Input.styles';
|
|
|
28
28
|
|
|
29
29
|
export interface IInputBaseProps
|
|
30
30
|
extends ICommonProps<IInputStyles>,
|
|
31
|
+
Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size' | 'className'>,
|
|
31
32
|
Pick<
|
|
32
33
|
IControlWrapperProps,
|
|
33
34
|
| 'label'
|
|
34
35
|
| 'icon'
|
|
36
|
+
| 'size'
|
|
35
37
|
| 'groupPlacement'
|
|
36
38
|
| 'isInvalid'
|
|
37
39
|
| 'isRequired'
|
|
38
40
|
| 'isLoading'
|
|
39
41
|
| 'isDisabled'
|
|
40
|
-
| 'onIconClick'
|
|
41
|
-
>,
|
|
42
|
-
Pick<
|
|
43
|
-
InputHTMLAttributes<HTMLInputElement>,
|
|
44
|
-
| 'type'
|
|
45
|
-
| 'inputMode'
|
|
46
|
-
| 'autoComplete'
|
|
47
|
-
| 'name'
|
|
48
|
-
| 'maxLength'
|
|
49
|
-
| 'tabIndex'
|
|
50
|
-
| 'placeholder'
|
|
51
|
-
| 'onFocus'
|
|
52
|
-
| 'onBlur'
|
|
53
|
-
| 'onPaste'
|
|
54
|
-
| 'onKeyDown'
|
|
55
42
|
>,
|
|
56
43
|
Pick<
|
|
57
44
|
Partial<ReactInputMaskBaseProps>,
|
|
@@ -71,7 +58,7 @@ export interface IInputBaseProps
|
|
|
71
58
|
isAutoSized?: boolean;
|
|
72
59
|
/** @default false */
|
|
73
60
|
shouldAlwaysShowPlaceholder?: boolean;
|
|
74
|
-
onChange(value: string, event: IChangeInputEvent)
|
|
61
|
+
onChange: (value: string, event: IChangeInputEvent) => void;
|
|
75
62
|
}
|
|
76
63
|
|
|
77
64
|
export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
@@ -96,6 +83,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
96
83
|
units,
|
|
97
84
|
testId,
|
|
98
85
|
tabIndex,
|
|
86
|
+
shouldAlwaysShowPlaceholder,
|
|
99
87
|
onChange,
|
|
100
88
|
onPaste,
|
|
101
89
|
onFocus,
|
|
@@ -105,9 +93,16 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
105
93
|
mask,
|
|
106
94
|
maskPlaceholder,
|
|
107
95
|
alwaysShowMask,
|
|
108
|
-
shouldAlwaysShowPlaceholder,
|
|
109
96
|
beforeMaskedStateChange,
|
|
110
|
-
|
|
97
|
+
// Пропсы ControlWrapper
|
|
98
|
+
data,
|
|
99
|
+
groupPlacement,
|
|
100
|
+
icon,
|
|
101
|
+
isLoading,
|
|
102
|
+
isRequired,
|
|
103
|
+
size,
|
|
104
|
+
children,
|
|
105
|
+
...inputProps
|
|
111
106
|
},
|
|
112
107
|
ref,
|
|
113
108
|
) => {
|
|
@@ -123,7 +118,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
123
118
|
const [unitsWidth, setUnitsWidth] = useState<number>();
|
|
124
119
|
|
|
125
120
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
126
|
-
const mergedRef =
|
|
121
|
+
const mergedRef = useMergedRefs([ref, inputRef]);
|
|
127
122
|
|
|
128
123
|
// Try to guess input-mode if possible
|
|
129
124
|
const inputMode: IInputBaseProps['inputMode'] =
|
|
@@ -131,7 +126,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
131
126
|
(['email', 'tel', 'url'].includes(type) ? (type as 'email' | 'tel' | 'url') : undefined);
|
|
132
127
|
|
|
133
128
|
const hasFocus = isFocused || isActive;
|
|
134
|
-
const hasValue =
|
|
129
|
+
const hasValue = isArrayLikeNotEmpty(value);
|
|
135
130
|
const hasUnits = isReactNodeNotEmpty(units);
|
|
136
131
|
const hasPlaceholder =
|
|
137
132
|
(!isReactNodeNotEmpty(label) || hasFocus || shouldAlwaysShowPlaceholder) &&
|
|
@@ -194,7 +189,8 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
194
189
|
onFocus: handleFocus,
|
|
195
190
|
onBlur: handleBlur,
|
|
196
191
|
onChange: handleChange,
|
|
197
|
-
...addDataTestId(testId
|
|
192
|
+
...addDataTestId(testId),
|
|
193
|
+
...inputProps,
|
|
198
194
|
};
|
|
199
195
|
|
|
200
196
|
useEffect(() => {
|
|
@@ -234,17 +230,23 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
234
230
|
isDisabled={isDisabled}
|
|
235
231
|
isFocused={hasFocus}
|
|
236
232
|
isInvalid={isInvalid}
|
|
237
|
-
hasValue={hasValue
|
|
233
|
+
hasValue={hasValue}
|
|
238
234
|
isFullWidth={!isAutoSized}
|
|
239
235
|
tweakStyles={tweakControlWrapperStyles}
|
|
240
236
|
onClear={isClearable && hasValue ? handleInputClear : undefined}
|
|
241
|
-
{
|
|
237
|
+
data={data}
|
|
238
|
+
groupPlacement={groupPlacement}
|
|
239
|
+
icon={icon}
|
|
240
|
+
isLoading={isLoading}
|
|
241
|
+
isRequired={isRequired}
|
|
242
|
+
size={size}
|
|
242
243
|
>
|
|
243
244
|
{hasUnits || isAutoSized ? (
|
|
244
245
|
<div className={classes.autoSizeWrapper}>{inputContent}</div>
|
|
245
246
|
) : (
|
|
246
247
|
inputContent
|
|
247
248
|
)}
|
|
249
|
+
{children}
|
|
248
250
|
</ControlWrapper>
|
|
249
251
|
);
|
|
250
252
|
},
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
import { addDataAttributes } from '../../helpers';
|
|
9
9
|
import { ICommonProps } from '../../types';
|
|
10
10
|
import { WithPopup } from '../WithPopup';
|
|
11
|
-
import { IListItemProps,
|
|
11
|
+
import { IListItemProps, ListItem } from './components';
|
|
12
|
+
import { IListItem } from './types';
|
|
12
13
|
import { useStyles, IListStyles, withPopupStyles } from './List.styles';
|
|
13
14
|
|
|
14
15
|
export interface IListProps extends ICommonProps<IListStyles> {
|
|
@@ -29,9 +30,11 @@ export const List: FC<IListProps> = ({ items, testId, data, tweakStyles, onClick
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
|
|
33
|
+
const filteredItems = items.filter(({ isHidden }) => !isHidden);
|
|
34
|
+
|
|
32
35
|
return (
|
|
33
36
|
<div className={classes.root} {...addDataTestId(testId)} {...addDataAttributes(data)}>
|
|
34
|
-
{
|
|
37
|
+
{filteredItems.map((item, i) => {
|
|
35
38
|
const itemProps: IListItemProps = {
|
|
36
39
|
testId: getTestId(testId, `item-${i}`),
|
|
37
40
|
...item,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './List';
|
|
2
2
|
export type { IListStyles } from './List.styles';
|
|
3
|
-
export
|
|
3
|
+
export type { IListItem } from './types';
|
|
4
|
+
export { type IListItemStyles, type IListItemProps, ListItem } from './components';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { useEffect, useState, useMemo, useRef, useCallback, ReactNode } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { debounce } from 'ts-debounce';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
addDataAttributes,
|
|
6
|
+
addDataTestId,
|
|
7
|
+
getTestId,
|
|
8
|
+
isArrayNotEmpty,
|
|
9
|
+
isNotEmpty,
|
|
10
|
+
} from '@true-engineering/true-react-platform-helpers';
|
|
6
11
|
import { useIsMounted, useTweakStyles } from '../../hooks';
|
|
7
12
|
import { ICommonProps } from '../../types';
|
|
8
13
|
import { Button } from '../Button';
|
|
@@ -330,7 +335,7 @@ export function MultiSelectList<Value extends IMultiSelectListValues<Option>, Op
|
|
|
330
335
|
!isLoading && (isArrayNotEmpty(allOptions) || isArrayNotEmpty(chosenValues));
|
|
331
336
|
|
|
332
337
|
return (
|
|
333
|
-
<div className={classes.root} {...addDataAttributes(data)}>
|
|
338
|
+
<div className={classes.root} {...addDataAttributes(data, testId)}>
|
|
334
339
|
{isSearchEnabled && (
|
|
335
340
|
<div className={classes.dropdownInput}>
|
|
336
341
|
<SearchInput
|
|
@@ -339,16 +344,13 @@ export function MultiSelectList<Value extends IMultiSelectListValues<Option>, Op
|
|
|
339
344
|
onChange={handleOnChange}
|
|
340
345
|
tweakStyles={tweakSearchInputStyles}
|
|
341
346
|
maxLength={searchMaxLength}
|
|
342
|
-
testId={testId
|
|
347
|
+
testId={getTestId(testId, 'search')}
|
|
343
348
|
shouldFocusOnMount
|
|
344
349
|
/>
|
|
345
350
|
</div>
|
|
346
351
|
)}
|
|
347
352
|
{shouldShowOptionsList && (
|
|
348
|
-
<div
|
|
349
|
-
className={classes.list}
|
|
350
|
-
data-testid={testId !== undefined ? `${testId}-list` : undefined}
|
|
351
|
-
>
|
|
353
|
+
<div className={classes.list} {...addDataTestId(testId, 'list')}>
|
|
352
354
|
{/* Выбранные */}
|
|
353
355
|
{hasSelectedOptionsGroup && (
|
|
354
356
|
<>
|
|
@@ -379,8 +381,9 @@ export function MultiSelectList<Value extends IMultiSelectListValues<Option>, Op
|
|
|
379
381
|
value={val}
|
|
380
382
|
tweakStyles={tweakCheckboxStyles}
|
|
381
383
|
labelPosition={checkboxPosition === 'left' ? 'right' : 'left'}
|
|
384
|
+
data={{ id }}
|
|
382
385
|
>
|
|
383
|
-
<div className={classes.option}
|
|
386
|
+
<div className={classes.option} {...addDataAttributes({ option: id })}>
|
|
384
387
|
{view}
|
|
385
388
|
</div>
|
|
386
389
|
</Checkbox>
|
|
@@ -417,8 +420,9 @@ export function MultiSelectList<Value extends IMultiSelectListValues<Option>, Op
|
|
|
417
420
|
value={val}
|
|
418
421
|
tweakStyles={tweakCheckboxStyles}
|
|
419
422
|
labelPosition={checkboxPosition === 'left' ? 'right' : 'left'}
|
|
423
|
+
data={{ id }}
|
|
420
424
|
>
|
|
421
|
-
<div className={classes.option}
|
|
425
|
+
<div className={classes.option} {...addDataAttributes({ option: id })}>
|
|
422
426
|
{view}
|
|
423
427
|
</div>
|
|
424
428
|
</Checkbox>
|
|
@@ -449,7 +453,7 @@ export function MultiSelectList<Value extends IMultiSelectListValues<Option>, Op
|
|
|
449
453
|
onClick={handleClear}
|
|
450
454
|
size="s"
|
|
451
455
|
view="text"
|
|
452
|
-
testId={testId
|
|
456
|
+
testId={getTestId(testId, 'clear-button')}
|
|
453
457
|
tweakStyles={tweakClearButtonStyles}
|
|
454
458
|
>
|
|
455
459
|
{translates.clear}
|
|
@@ -9,7 +9,11 @@ export default {
|
|
|
9
9
|
|
|
10
10
|
const Template: ComponentStory<typeof NumberInput> = (args) => {
|
|
11
11
|
const [value, setValue] = useState<number>();
|
|
12
|
-
return
|
|
12
|
+
return (
|
|
13
|
+
<div style={{ width: 300 }}>
|
|
14
|
+
<NumberInput {...args} value={value} onChange={(v) => setValue(v)} />
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
export const Default = Template.bind({});
|
|
@@ -26,7 +26,8 @@ export default {
|
|
|
26
26
|
const Template: ComponentStory<typeof PhoneInput> = (args) => {
|
|
27
27
|
const [value, setValue] = useState<IPhoneValue>({
|
|
28
28
|
dialCode: '7',
|
|
29
|
-
phoneNumber: '
|
|
29
|
+
phoneNumber: '9134567890',
|
|
30
|
+
countryCode: 'RU',
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
return <PhoneInput {...args} value={value} onChange={setValue} />;
|
|
@@ -76,7 +76,7 @@ export const PhoneInput: FC<IPhoneInputProps> = ({
|
|
|
76
76
|
|
|
77
77
|
const countryCode = useMemo(
|
|
78
78
|
() => value?.countryCode ?? getCountryCodeFromPhone(phoneWithCode),
|
|
79
|
-
[value.dialCode, value.phoneNumber],
|
|
79
|
+
[value.countryCode, value.dialCode, value.phoneNumber],
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
const handleClose = () => {
|
|
@@ -122,7 +122,10 @@ export const PhoneInput: FC<IPhoneInputProps> = ({
|
|
|
122
122
|
if (newPhoneInfo.countryCode !== countryCode) {
|
|
123
123
|
onChange(
|
|
124
124
|
{
|
|
125
|
-
phoneNumber:
|
|
125
|
+
phoneNumber:
|
|
126
|
+
newPhoneInfo.dialCode !== value.dialCode
|
|
127
|
+
? ''
|
|
128
|
+
: getPhoneObjFromString(phoneWithCode).phoneNumber,
|
|
126
129
|
dialCode: newPhoneInfo.dialCode,
|
|
127
130
|
countryCode: newPhoneInfo.countryCode,
|
|
128
131
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getTestId } from '@true-engineering/true-react-platform-helpers';
|
|
1
|
+
import { forwardRef } from 'react';
|
|
3
2
|
import { useTweakStyles } from '../../hooks';
|
|
4
3
|
import { ICommonProps } from '../../types';
|
|
5
4
|
import { IInputProps, Input } from '../Input';
|
|
@@ -11,31 +10,23 @@ export type ISearchInputProps = Omit<
|
|
|
11
10
|
> &
|
|
12
11
|
ICommonProps<ISearchInputStyles>;
|
|
13
12
|
|
|
14
|
-
export const SearchInput
|
|
15
|
-
isClearable = true,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) => {
|
|
23
|
-
const tweakInputStyles = useTweakStyles({
|
|
24
|
-
innerStyles: inputStyles,
|
|
25
|
-
tweakStyles,
|
|
26
|
-
className: 'tweakInput',
|
|
27
|
-
currentComponentName: 'SearchInput',
|
|
28
|
-
});
|
|
13
|
+
export const SearchInput = forwardRef<HTMLInputElement, ISearchInputProps>(
|
|
14
|
+
({ isClearable = true, tweakStyles, ...props }, ref) => {
|
|
15
|
+
const tweakInputStyles = useTweakStyles({
|
|
16
|
+
innerStyles: inputStyles,
|
|
17
|
+
tweakStyles,
|
|
18
|
+
className: 'tweakInput',
|
|
19
|
+
currentComponentName: 'SearchInput',
|
|
20
|
+
});
|
|
29
21
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
22
|
+
return (
|
|
23
|
+
<Input
|
|
24
|
+
ref={ref}
|
|
25
|
+
icon="search"
|
|
26
|
+
isClearable={isClearable}
|
|
27
|
+
tweakStyles={tweakInputStyles}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode, useEffect, useState } from 'react';
|
|
2
2
|
import { isStringNotEmpty } from '@true-engineering/true-react-platform-helpers';
|
|
3
3
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
4
|
+
import { iconsList } from '../Icon';
|
|
4
5
|
import { IMultipleSelectProps, Select } from './Select';
|
|
5
6
|
|
|
6
7
|
interface ObjectValue {
|
|
@@ -54,6 +55,8 @@ const objectOptions: ObjectValue[] = [
|
|
|
54
55
|
{ name: 'Artem', age: 23 },
|
|
55
56
|
];
|
|
56
57
|
|
|
58
|
+
const icons = [undefined, ...Object.keys(iconsList)];
|
|
59
|
+
|
|
57
60
|
// Максимум не включается, минимум включается
|
|
58
61
|
const getRandomInt = (min: number, max: number) =>
|
|
59
62
|
Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min))) + Math.ceil(min);
|
|
@@ -195,6 +198,7 @@ export default {
|
|
|
195
198
|
control: 'inline-radio',
|
|
196
199
|
options: ['strings', 'objects'],
|
|
197
200
|
},
|
|
201
|
+
icon: { control: 'select', options: icons },
|
|
198
202
|
},
|
|
199
203
|
} as ComponentMeta<typeof SelectWithCustomProps>;
|
|
200
204
|
|
|
@@ -229,4 +233,5 @@ MultiSelect.args = {
|
|
|
229
233
|
shouldScrollToList: true,
|
|
230
234
|
canBeFlipped: false,
|
|
231
235
|
scrollParent: 'document',
|
|
236
|
+
size: undefined,
|
|
232
237
|
};
|