@granto-umbrella/umbrella-components 2.0.7 → 2.1.0
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/umbrella-components.es.js +438 -407
- package/dist/umbrella-components.umd.js +129 -123
- package/package.json +1 -1
- package/src/components/atoms/Input/Input.tsx +4 -0
- package/src/components/atoms/Input/Input.types.ts +2 -0
- package/src/components/atoms/Select/Select.styles.ts +7 -23
- package/src/components/atoms/Select/Select.tsx +2 -1
- package/src/components/atoms/Textarea/Textarea.styles.ts +1 -0
package/package.json
CHANGED
|
@@ -40,6 +40,8 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
40
40
|
style,
|
|
41
41
|
register,
|
|
42
42
|
testId,
|
|
43
|
+
className,
|
|
44
|
+
onBlur,
|
|
43
45
|
},
|
|
44
46
|
ref
|
|
45
47
|
) => {
|
|
@@ -62,6 +64,8 @@ const Input = forwardRef<HTMLInputElement, InputProps>(
|
|
|
62
64
|
placeholder={placeholder}
|
|
63
65
|
value={value}
|
|
64
66
|
onChange={onChange}
|
|
67
|
+
onBlur={onBlur}
|
|
68
|
+
className={className}
|
|
65
69
|
disabled={disabled}
|
|
66
70
|
/>
|
|
67
71
|
</InputWrapper>
|
|
@@ -31,7 +31,7 @@ export const SupportingText = styled.span`
|
|
|
31
31
|
|
|
32
32
|
export const CustomSelect = styled(Select).attrs({
|
|
33
33
|
classNamePrefix: "react-select",
|
|
34
|
-
})<{ $size?:
|
|
34
|
+
})<{ $size?: keyof typeof semanticSizes.global.padding }>`
|
|
35
35
|
.react-select__control {
|
|
36
36
|
background: ${semanticColors.base.background};
|
|
37
37
|
border: 1px solid ${semanticColors.neutral[300]};
|
|
@@ -51,17 +51,7 @@ export const CustomSelect = styled(Select).attrs({
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.react-select__value-container {
|
|
54
|
-
padding: ${({ $size }) =>
|
|
55
|
-
switch ($size) {
|
|
56
|
-
case "md":
|
|
57
|
-
return semanticSizes.global.padding.md;
|
|
58
|
-
case "lg":
|
|
59
|
-
return semanticSizes.global.padding.lg;
|
|
60
|
-
case "sm":
|
|
61
|
-
default:
|
|
62
|
-
return semanticSizes.global.padding.sm;
|
|
63
|
-
}
|
|
64
|
-
}};
|
|
54
|
+
padding: ${({ $size = "sm" }) => semanticSizes.global.padding[$size]};
|
|
65
55
|
font-size: ${typographyTokens.fontSizes.labelM};
|
|
66
56
|
color: ${semanticColors.base.text};
|
|
67
57
|
}
|
|
@@ -73,17 +63,7 @@ export const CustomSelect = styled(Select).attrs({
|
|
|
73
63
|
}
|
|
74
64
|
|
|
75
65
|
.react-select__option {
|
|
76
|
-
padding: ${({ $size }) =>
|
|
77
|
-
switch ($size) {
|
|
78
|
-
case "md":
|
|
79
|
-
return semanticSizes.global.padding.md;
|
|
80
|
-
case "lg":
|
|
81
|
-
return semanticSizes.global.padding.lg;
|
|
82
|
-
case "sm":
|
|
83
|
-
default:
|
|
84
|
-
return semanticSizes.global.padding.sm;
|
|
85
|
-
}
|
|
86
|
-
}};
|
|
66
|
+
padding: ${({ $size = "sm" }) => semanticSizes.global.padding[$size]};
|
|
87
67
|
font-size: ${typographyTokens.fontSizes.labelM};
|
|
88
68
|
cursor: pointer;
|
|
89
69
|
transition: background 0.2s, color 0.2s;
|
|
@@ -108,4 +88,8 @@ export const CustomSelect = styled(Select).attrs({
|
|
|
108
88
|
.react-select__indicator-separator {
|
|
109
89
|
background-color: ${semanticColors.base.background};
|
|
110
90
|
}
|
|
91
|
+
|
|
92
|
+
.react-select__input-container {
|
|
93
|
+
padding: 0px;
|
|
94
|
+
}
|
|
111
95
|
`;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
SupportingText,
|
|
6
6
|
CustomSelect,
|
|
7
7
|
} from "./Select.styles";
|
|
8
|
+
import { semanticSizes } from "../../../styles/tokens";
|
|
8
9
|
|
|
9
10
|
interface Option {
|
|
10
11
|
label: string;
|
|
@@ -16,7 +17,7 @@ interface SelectProps {
|
|
|
16
17
|
placeholder?: string;
|
|
17
18
|
borderColor?: string;
|
|
18
19
|
borderRadius?: string;
|
|
19
|
-
size?:
|
|
20
|
+
size?: keyof typeof semanticSizes.global.padding;
|
|
20
21
|
options: { label: string; value: string }[];
|
|
21
22
|
onChange?: (newValue: Option | null, actionMeta: { action: string }) => void;
|
|
22
23
|
value?: Option | null;
|