@true-engineering/true-react-common-ui-kit 4.0.0-alpha13 → 4.0.0-alpha14

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha13",
3
+ "version": "4.0.0-alpha14",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -44,7 +44,7 @@ export const useStyles = createThemedStyles('ControlWrapper', {
44
44
  position: 'absolute',
45
45
  pointerEvents: 'none',
46
46
  left: 'var(--control-padding)',
47
- top: '50%',
47
+ top: 'calc(var(--control-height) / 2)',
48
48
  transformOrigin: 'top left',
49
49
  transform: 'translateY(-50%)',
50
50
  transition: animations.defaultTransition,
@@ -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 <NumberInput {...args} value={value} onChange={(v) => setValue(v)} />;
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({});
@@ -1,5 +1,4 @@
1
1
  import { forwardRef } from 'react';
2
- import { getTestId } from '@true-engineering/true-react-platform-helpers';
3
2
  import { useTweakStyles } from '../../hooks';
4
3
  import { ICommonProps } from '../../types';
5
4
  import { IInputProps, Input } from '../Input';
@@ -12,7 +11,7 @@ export type ISearchInputProps = Omit<
12
11
  ICommonProps<ISearchInputStyles>;
13
12
 
14
13
  export const SearchInput = forwardRef<HTMLInputElement, ISearchInputProps>(
15
- ({ isClearable = true, placeholder, value, testId, tweakStyles, data, ...props }, ref) => {
14
+ ({ isClearable = true, tweakStyles, ...props }, ref) => {
16
15
  const tweakInputStyles = useTweakStyles({
17
16
  innerStyles: inputStyles,
18
17
  tweakStyles,
@@ -23,11 +22,8 @@ export const SearchInput = forwardRef<HTMLInputElement, ISearchInputProps>(
23
22
  return (
24
23
  <Input
25
24
  ref={ref}
26
- value={value}
27
- placeholder={placeholder}
28
25
  icon="search"
29
26
  isClearable={isClearable}
30
- testId={getTestId(testId, 'input')}
31
27
  tweakStyles={tweakInputStyles}
32
28
  {...props}
33
29
  />
@@ -69,12 +69,6 @@ export const useStyles = createThemedStyles('TextArea', {
69
69
  withLabel: {},
70
70
  });
71
71
 
72
- export const controlWrapperStyles: IControlWrapperStyles = {
73
- label: {
74
- top: 16,
75
- },
76
- };
77
-
78
72
  export type ITextAreaStyles = ITweakStyles<
79
73
  typeof useStyles,
80
74
  {
@@ -19,7 +19,7 @@ import { useTweakStyles } from '../../hooks';
19
19
  import { ICommonProps } from '../../types';
20
20
  import { ControlWrapper, IControlWrapperProps } from '../ControlWrapper';
21
21
  import { IWithMessagesProps, WithMessages } from '../WithMessages';
22
- import { controlWrapperStyles, ITextAreaStyles, useStyles } from './TextArea.styles';
22
+ import { ITextAreaStyles, useStyles } from './TextArea.styles';
23
23
 
24
24
  export interface ITextAreaProps
25
25
  extends ICommonProps<ITextAreaStyles>,
@@ -93,7 +93,6 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
93
93
  });
94
94
 
95
95
  const tweakControlWrapperStyles = useTweakStyles({
96
- innerStyles: controlWrapperStyles,
97
96
  tweakStyles,
98
97
  className: 'tweakControlWrapper',
99
98
  currentComponentName: 'TextArea',