@true-engineering/true-react-common-ui-kit 4.0.0-alpha1 → 4.0.0-alpha2
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/dist/components/SearchInput/SearchInput.stories.d.ts +1 -11
- package/dist/components/SearchInput/SearchInput.styles.d.ts +3 -5
- package/dist/true-react-common-ui-kit.js +142 -190
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +142 -190
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +1 -1
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +6 -1
- package/src/components/IncrementInput/IncrementInput.styles.ts +1 -1
- package/src/components/SearchInput/SearchInput.styles.ts +16 -29
- package/src/components/SearchInput/SearchInput.tsx +12 -20
package/package.json
CHANGED
|
@@ -7,7 +7,12 @@ import { Button } from '../../../Button';
|
|
|
7
7
|
import { NumberInput } from '../../../NumberInput';
|
|
8
8
|
import { getLocale, sortValues } from '../../helpers';
|
|
9
9
|
import { IFilterLocaleKey, IPartialFilterLocale } from '../../types';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
clearButtonStyles,
|
|
12
|
+
IFilterIntervalStyles,
|
|
13
|
+
inputStyles,
|
|
14
|
+
useStyles,
|
|
15
|
+
} from './FilterInterval.styles';
|
|
11
16
|
|
|
12
17
|
export interface IFilterIntervalProps extends ICommonProps<IFilterIntervalStyles> {
|
|
13
18
|
value?: Array<number | undefined>;
|
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
import { colors, createThemedStyles, dimensions, ITweakStyles } from '../../theme';
|
|
2
1
|
import { IInputStyles } from '../Input';
|
|
3
2
|
|
|
4
|
-
const
|
|
3
|
+
export const inputStyles: IInputStyles = {
|
|
4
|
+
tweakControlWrapper: {
|
|
5
|
+
endIcon: {
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
width: 40,
|
|
8
|
+
left: 0,
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
+
'&:last-child': {
|
|
11
|
+
paddingRight: 0,
|
|
12
|
+
},
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
left: 12,
|
|
16
|
-
height: '100%',
|
|
17
|
-
width: 20,
|
|
18
|
-
color: colors.GREY_ACTIVE,
|
|
19
|
-
zIndex: Z_INDEX.CONTROL_FOCUS + 1,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
14
|
+
'&:not($activeIcon)': {
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
22
18
|
|
|
23
|
-
export const inputStyles: IInputStyles = {
|
|
24
|
-
tweakControlWrapper: {
|
|
25
19
|
controlWrapper: {
|
|
26
20
|
borderColor: 'transparent',
|
|
27
|
-
borderRadius: 18,
|
|
28
|
-
paddingLeft: 0,
|
|
29
|
-
transitionProperty: 'background-color, border-color',
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
focused: {
|
|
33
|
-
backgroundColor: colors.CLASSIC_WHITE,
|
|
34
|
-
borderColor: colors.BORDER_MAIN,
|
|
35
21
|
},
|
|
36
22
|
},
|
|
37
|
-
|
|
38
23
|
inputContent: {
|
|
39
24
|
fontSize: 14,
|
|
40
25
|
paddingLeft: 44,
|
|
41
26
|
},
|
|
42
27
|
};
|
|
43
28
|
|
|
44
|
-
export
|
|
29
|
+
export interface ISearchInputStyles {
|
|
30
|
+
tweakInput?: IInputStyles;
|
|
31
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { addDataAttributes } from '../../helpers';
|
|
2
|
+
import { getTestId } from '@true-engineering/true-react-platform-helpers';
|
|
4
3
|
import { useTweakStyles } from '../../hooks';
|
|
5
4
|
import { ICommonProps } from '../../types';
|
|
6
|
-
import { Icon } from '../Icon';
|
|
7
5
|
import { IInputProps, Input } from '../Input';
|
|
8
|
-
import { inputStyles, ISearchInputStyles
|
|
6
|
+
import { inputStyles, ISearchInputStyles } from './SearchInput.styles';
|
|
9
7
|
|
|
10
8
|
export type ISearchInputProps = Omit<
|
|
11
9
|
IInputProps,
|
|
@@ -15,15 +13,13 @@ export type ISearchInputProps = Omit<
|
|
|
15
13
|
|
|
16
14
|
export const SearchInput: FC<ISearchInputProps> = ({
|
|
17
15
|
isClearable = true,
|
|
18
|
-
tweakStyles,
|
|
19
16
|
placeholder,
|
|
20
17
|
value,
|
|
21
18
|
testId,
|
|
19
|
+
tweakStyles,
|
|
22
20
|
data,
|
|
23
21
|
...props
|
|
24
22
|
}) => {
|
|
25
|
-
const classes = useStyles({ theme: tweakStyles });
|
|
26
|
-
|
|
27
23
|
const tweakInputStyles = useTweakStyles({
|
|
28
24
|
innerStyles: inputStyles,
|
|
29
25
|
tweakStyles,
|
|
@@ -32,18 +28,14 @@ export const SearchInput: FC<ISearchInputProps> = ({
|
|
|
32
28
|
});
|
|
33
29
|
|
|
34
30
|
return (
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
tweakStyles={tweakInputStyles}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
31
|
+
<Input
|
|
32
|
+
value={value}
|
|
33
|
+
placeholder={placeholder}
|
|
34
|
+
icon="search"
|
|
35
|
+
isClearable={isClearable}
|
|
36
|
+
testId={getTestId(testId, 'input')}
|
|
37
|
+
tweakStyles={tweakInputStyles}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
48
40
|
);
|
|
49
41
|
};
|