@xqmsg/ui-core 0.24.4 → 0.24.5
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/input/StackedInput/StackedInput.d.ts +0 -1
- package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +0 -1
- package/dist/components/input/index.d.ts +1 -2
- package/dist/components/select/index.d.ts +0 -1
- package/dist/ui-core.cjs.development.js +6 -28
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +6 -28
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedInput/StackedInput.tsx +0 -8
- package/src/components/input/StackedTextarea/StackedTextarea.tsx +2 -22
- package/src/components/input/index.tsx +0 -3
- package/src/components/select/index.tsx +0 -1
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import { InputFieldProps } from '../InputTypes';
|
|
|
4
4
|
|
|
5
5
|
export interface StackedInputProps extends InputFieldProps {
|
|
6
6
|
isRequired?: boolean;
|
|
7
|
-
allowDefault?: boolean;
|
|
8
7
|
leftElement?: React.ReactNode;
|
|
9
8
|
rightElement?: React.ReactNode;
|
|
10
9
|
variant?: string;
|
|
@@ -22,7 +21,6 @@ const StackedInput = React.forwardRef<HTMLInputElement, StackedInputProps>(
|
|
|
22
21
|
rightElement,
|
|
23
22
|
leftElement,
|
|
24
23
|
defaultValue,
|
|
25
|
-
allowDefault,
|
|
26
24
|
variant,
|
|
27
25
|
label,
|
|
28
26
|
...props
|
|
@@ -44,12 +42,6 @@ const StackedInput = React.forwardRef<HTMLInputElement, StackedInputProps>(
|
|
|
44
42
|
defaultValue={defaultValue}
|
|
45
43
|
fontSize={isMobile ? '17px' : '13px'}
|
|
46
44
|
variant={variant}
|
|
47
|
-
onKeyDown={e => {
|
|
48
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
49
|
-
e.stopPropagation();
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
}
|
|
52
|
-
}}
|
|
53
45
|
/>
|
|
54
46
|
{rightElement && rightElement}
|
|
55
47
|
</InputGroup>
|
|
@@ -4,7 +4,6 @@ import { TextareaFieldProps } from '../InputTypes';
|
|
|
4
4
|
|
|
5
5
|
export interface StackedTextareaProps extends TextareaFieldProps {
|
|
6
6
|
isRequired?: boolean;
|
|
7
|
-
allowDefault?: boolean;
|
|
8
7
|
variant: string;
|
|
9
8
|
label?: string;
|
|
10
9
|
}
|
|
@@ -15,7 +14,7 @@ export interface StackedTextareaProps extends TextareaFieldProps {
|
|
|
15
14
|
const StackedTextarea = React.forwardRef<
|
|
16
15
|
HTMLTextAreaElement,
|
|
17
16
|
StackedTextareaProps
|
|
18
|
-
>(({ isRequired,
|
|
17
|
+
>(({ isRequired, variant, label, ...props }, _ref) => {
|
|
19
18
|
const isMobile = variant === 'mobile';
|
|
20
19
|
if (isMobile) {
|
|
21
20
|
return (
|
|
@@ -26,30 +25,11 @@ const StackedTextarea = React.forwardRef<
|
|
|
26
25
|
variant={variant}
|
|
27
26
|
fontSize="17px"
|
|
28
27
|
placeholder={label ?? ''}
|
|
29
|
-
onKeyDown={e => {
|
|
30
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
}
|
|
34
|
-
}}
|
|
35
28
|
/>
|
|
36
29
|
</Flex>
|
|
37
30
|
);
|
|
38
31
|
}
|
|
39
|
-
return
|
|
40
|
-
<Textarea
|
|
41
|
-
ref={_ref}
|
|
42
|
-
{...props}
|
|
43
|
-
variant={variant}
|
|
44
|
-
fontSize="13px"
|
|
45
|
-
onKeyDown={e => {
|
|
46
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
47
|
-
e.stopPropagation();
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
}
|
|
50
|
-
}}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
32
|
+
return <Textarea ref={_ref} {...props} variant={variant} fontSize="13px" />;
|
|
53
33
|
});
|
|
54
34
|
|
|
55
35
|
export default StackedTextarea;
|
|
@@ -47,7 +47,6 @@ export interface InputProps<T extends FieldValues = FieldValues>
|
|
|
47
47
|
setError: UseFormSetError<T>;
|
|
48
48
|
clearErrors: UseFormClearErrors<T>;
|
|
49
49
|
leftElement?: React.ReactNode;
|
|
50
|
-
allowDefault?: boolean;
|
|
51
50
|
rightElement?: React.ReactNode;
|
|
52
51
|
variant?: string;
|
|
53
52
|
separators?: string[];
|
|
@@ -78,7 +77,6 @@ export function Input<T extends FieldValues>({
|
|
|
78
77
|
disabled,
|
|
79
78
|
rightElement,
|
|
80
79
|
leftElement,
|
|
81
|
-
allowDefault,
|
|
82
80
|
variant = 'default',
|
|
83
81
|
onChange,
|
|
84
82
|
setValue,
|
|
@@ -113,7 +111,6 @@ export function Input<T extends FieldValues>({
|
|
|
113
111
|
disabled={disabled}
|
|
114
112
|
defaultValue={defaultValue}
|
|
115
113
|
value={value}
|
|
116
|
-
allowDefault={allowDefault}
|
|
117
114
|
variant={variant}
|
|
118
115
|
label={label as string}
|
|
119
116
|
/>
|