colibri-ui 0.7.7 → 0.7.9

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.
Files changed (105) hide show
  1. package/Button/index.props.d.ts +5 -9
  2. package/Button/index.props.js +0 -6
  3. package/Button/styles.d.ts +2 -2
  4. package/Button/styles.js +13 -7
  5. package/Checkbox/index.js +48 -0
  6. package/Checkbox/index.props.d.ts +2 -2
  7. package/Checkbox/styles.js +61 -0
  8. package/Grid/Item/index.d.ts +4 -0
  9. package/Grid/Item/index.props.d.ts +6 -0
  10. package/Grid/Item/styles.d.ts +7 -0
  11. package/Grid/index.d.ts +4 -0
  12. package/Grid/index.js +19 -0
  13. package/Grid/index.props.d.ts +5 -0
  14. package/Grid/package.json +6 -0
  15. package/Grid/styles.d.ts +9 -0
  16. package/Grid/styles.js +25 -0
  17. package/Icons/index.d.ts +0 -2
  18. package/Icons/index.js +0 -4
  19. package/Input/index.d.ts +4 -0
  20. package/Input/index.js +50 -0
  21. package/Input/index.props.d.ts +13 -0
  22. package/Input/package.json +6 -0
  23. package/README.md +3 -1
  24. package/Skeleton/index.d.ts +4 -0
  25. package/Skeleton/index.js +34 -0
  26. package/Skeleton/index.props.d.ts +11 -0
  27. package/Skeleton/package.json +6 -0
  28. package/Skeleton/styles.d.ts +9 -0
  29. package/Skeleton/styles.js +31 -0
  30. package/Theme/color.d.ts +15 -7
  31. package/Theme/color.js +12 -6
  32. package/Theme/index.d.ts +92 -6
  33. package/Theme/index.props.d.ts +2 -0
  34. package/Theme/themes/buenos_aires.d.ts +86 -3
  35. package/Theme/themes/buenos_aires.js +60 -18
  36. package/Theme/themes/default.d.ts +86 -3
  37. package/Theme/themes/default.js +60 -19
  38. package/Typography/index.props.d.ts +4 -7
  39. package/base/FormField/index.d.ts +4 -0
  40. package/base/FormField/index.js +30 -0
  41. package/base/FormField/index.props.d.ts +8 -0
  42. package/base/FormField/styles.d.ts +5 -0
  43. package/base/FormField/styles.js +18 -0
  44. package/base/InputRoot/index.d.ts +4 -0
  45. package/base/InputRoot/index.js +34 -0
  46. package/base/InputRoot/index.props.d.ts +41 -0
  47. package/base/InputRoot/styles.d.ts +27 -0
  48. package/base/InputRoot/styles.js +82 -0
  49. package/esm/Button/index.props.d.ts +5 -9
  50. package/esm/Button/index.props.js +1 -7
  51. package/esm/Button/styles.d.ts +2 -2
  52. package/esm/Button/styles.js +13 -7
  53. package/esm/Checkbox/index.js +44 -0
  54. package/esm/Checkbox/index.props.d.ts +2 -2
  55. package/esm/Checkbox/styles.js +52 -0
  56. package/esm/Grid/Item/index.d.ts +4 -0
  57. package/esm/Grid/Item/index.props.d.ts +6 -0
  58. package/esm/Grid/Item/styles.d.ts +7 -0
  59. package/esm/Grid/index.d.ts +4 -0
  60. package/esm/Grid/index.js +15 -0
  61. package/esm/Grid/index.props.d.ts +5 -0
  62. package/esm/Grid/styles.d.ts +9 -0
  63. package/esm/Grid/styles.js +18 -0
  64. package/esm/Icons/index.d.ts +0 -2
  65. package/esm/Icons/index.js +0 -2
  66. package/esm/Input/index.d.ts +4 -0
  67. package/esm/Input/index.js +46 -0
  68. package/esm/Input/index.props.d.ts +13 -0
  69. package/esm/Skeleton/index.d.ts +4 -0
  70. package/esm/Skeleton/index.js +31 -0
  71. package/esm/Skeleton/index.props.d.ts +11 -0
  72. package/esm/Skeleton/styles.d.ts +9 -0
  73. package/esm/Skeleton/styles.js +24 -0
  74. package/esm/Theme/color.d.ts +15 -7
  75. package/esm/Theme/color.js +11 -6
  76. package/esm/Theme/index.d.ts +92 -6
  77. package/esm/Theme/index.props.d.ts +2 -0
  78. package/esm/Theme/themes/buenos_aires.d.ts +86 -3
  79. package/esm/Theme/themes/buenos_aires.js +60 -19
  80. package/esm/Theme/themes/default.d.ts +86 -3
  81. package/esm/Theme/themes/default.js +60 -20
  82. package/esm/Typography/index.props.d.ts +4 -7
  83. package/esm/base/FormField/index.d.ts +4 -0
  84. package/esm/base/FormField/index.js +26 -0
  85. package/esm/base/FormField/index.props.d.ts +8 -0
  86. package/esm/base/FormField/styles.d.ts +5 -0
  87. package/esm/base/FormField/styles.js +12 -0
  88. package/esm/base/InputRoot/index.d.ts +4 -0
  89. package/esm/base/InputRoot/index.js +30 -0
  90. package/esm/base/InputRoot/index.props.d.ts +41 -0
  91. package/esm/base/InputRoot/styles.d.ts +27 -0
  92. package/esm/base/InputRoot/styles.js +72 -0
  93. package/esm/index.d.ts +4 -0
  94. package/esm/index.js +4 -2
  95. package/index.d.ts +4 -0
  96. package/index.js +18 -13
  97. package/package.json +1 -3
  98. package/Icons/Burger.d.ts +0 -3
  99. package/Icons/Burger.js +0 -22
  100. package/Icons/Check.d.ts +0 -3
  101. package/Icons/Check.js +0 -24
  102. package/esm/Icons/Burger.d.ts +0 -3
  103. package/esm/Icons/Burger.js +0 -18
  104. package/esm/Icons/Check.d.ts +0 -3
  105. package/esm/Icons/Check.js +0 -20
@@ -13,12 +13,12 @@ var ButtonThemeBA = {
13
13
  backgroundColor: Color.PRIMARY_BA_4,
14
14
  borderColor: Color.PRIMARY_BA_4
15
15
  },
16
- hover: {
16
+ hovered: {
17
17
  color: Color.WHITE,
18
18
  backgroundColor: Color.PRIMARY_BA_5,
19
19
  borderColor: Color.PRIMARY_BA_5
20
20
  },
21
- focus: {
21
+ focused: {
22
22
  color: Color.WHITE,
23
23
  backgroundColor: Color.PRIMARY_BA_5,
24
24
  borderColor: Color.PRIMARY_BA_5
@@ -29,9 +29,9 @@ var ButtonThemeBA = {
29
29
  borderColor: Color.PRIMARY_BA_5
30
30
  },
31
31
  disabled: {
32
- color: Color.PRIMARY_BA_3,
33
- backgroundColor: Color.PRIMARY_BA_2,
34
- borderColor: Color.PRIMARY_BA_2
32
+ color: Color.BG_3,
33
+ backgroundColor: Color.BG_1,
34
+ borderColor: Color.BG_1
35
35
  }
36
36
  },
37
37
  secondary: {
@@ -40,12 +40,12 @@ var ButtonThemeBA = {
40
40
  backgroundColor: Color.SECONDARY_BA_4,
41
41
  borderColor: Color.SECONDARY_BA_4
42
42
  },
43
- hover: {
43
+ hovered: {
44
44
  color: Color.WHITE,
45
45
  backgroundColor: Color.SECONDARY_BA_5,
46
46
  borderColor: Color.SECONDARY_BA_5
47
47
  },
48
- focus: {
48
+ focused: {
49
49
  color: Color.WHITE,
50
50
  backgroundColor: Color.SECONDARY_BA_5,
51
51
  borderColor: Color.SECONDARY_BA_5
@@ -56,9 +56,9 @@ var ButtonThemeBA = {
56
56
  borderColor: Color.SECONDARY_BA_5
57
57
  },
58
58
  disabled: {
59
- color: Color.SECONDARY_BA_3,
60
- backgroundColor: Color.SECONDARY_BA_2,
61
- borderColor: Color.SECONDARY_BA_2
59
+ color: Color.BG_3,
60
+ backgroundColor: Color.BG_1,
61
+ borderColor: Color.BG_1
62
62
  }
63
63
  },
64
64
  clear: {
@@ -67,7 +67,7 @@ var ButtonThemeBA = {
67
67
  backgroundColor: Color.WHITE,
68
68
  borderColor: Color.WHITE
69
69
  },
70
- hover: {
70
+ hovered: {
71
71
  color: Color.TRETIARY_BA_5,
72
72
  backgroundColor: Color.TRETIARY_BA_2,
73
73
  borderColor: Color.TRETIARY_BA_2
@@ -78,9 +78,46 @@ var ButtonThemeBA = {
78
78
  borderColor: Color.TRETIARY_BA_2
79
79
  },
80
80
  disabled: {
81
- color: Color.TRETIARY_BA_3,
82
- backgroundColor: Color.TRETIARY_BA_1,
83
- borderColor: Color.TRETIARY_BA_1
81
+ color: Color.BG_3,
82
+ backgroundColor: Color.BG_1,
83
+ borderColor: Color.BG_1
84
+ }
85
+ }
86
+ };
87
+ var InputThemeBA = {
88
+ placeholder: {
89
+ color: Color.BG_2
90
+ },
91
+ primary: {
92
+ normal: {
93
+ borderColor: Color.BG_3
94
+ },
95
+ hovered: {
96
+ borderColor: Color.PRIMARY_BA_3,
97
+ boxShadow: "0px 0px 0px 2px ".concat(Color.PRIMARY_BA_2)
98
+ },
99
+ focused: {
100
+ borderColor: Color.PRIMARY_BA_4
101
+ },
102
+ disabled: {
103
+ color: Color.BG_3,
104
+ backgroundColor: Color.BG_1,
105
+ borderColor: Color.BG_3
106
+ },
107
+ error: {
108
+ normal: {
109
+ backgroundColor: Color.TRETIARY_2,
110
+ borderColor: Color.ALERT
111
+ },
112
+ hovered: {
113
+ backgroundColor: Color.WHITE,
114
+ borderColor: Color.ALERT,
115
+ boxShadow: "0px 0px 0px 2px ".concat(Color.TRETIARY_2)
116
+ },
117
+ focused: {
118
+ backgroundColor: Color.WHITE,
119
+ borderColor: Color.ALERT
120
+ }
84
121
  }
85
122
  }
86
123
  };
@@ -89,10 +126,10 @@ var CheckboxThemeBA = {
89
126
  normal: {
90
127
  backgroundColor: Color.PRIMARY_BA_4
91
128
  },
92
- hover: {
129
+ hovered: {
93
130
  backgroundColor: Color.PRIMARY_BA_4
94
131
  },
95
- focus: {
132
+ focused: {
96
133
  boxShadow: "0 0 0 2px ".concat(Color.PRIMARY_BA_1)
97
134
  },
98
135
  checked: {
@@ -114,6 +151,9 @@ var TypographyThemeBA = {
114
151
  },
115
152
  success: {
116
153
  color: Color.SUCCESS
154
+ },
155
+ secondary: {
156
+ color: Color.BG_3
117
157
  }
118
158
  };
119
159
  var SwitchThemeDefault = {
@@ -122,8 +162,8 @@ var SwitchThemeDefault = {
122
162
  },
123
163
  state: {
124
164
  normal: {
125
- backgroundColor: Color.BG_1,
126
- borderColor: Color.BG_1
165
+ backgroundColor: Color.BG_2,
166
+ borderColor: Color.BG_2
127
167
  },
128
168
  checked: {
129
169
  backgroundColor: Color.PRIMARY_BA_5,
@@ -134,10 +174,11 @@ var SwitchThemeDefault = {
134
174
  var THEME_BA = {
135
175
  breakpoints: Breakpoints,
136
176
  button: ButtonThemeBA,
177
+ input: InputThemeBA,
137
178
  checkbox: CheckboxThemeBA,
138
179
  typography: TypographyThemeBA,
139
180
  "switch": SwitchThemeDefault,
140
181
  palette: Color
141
182
  };
142
183
 
143
- export { ButtonThemeBA, CheckboxThemeBA, SwitchThemeDefault, THEME_BA, TypographyThemeBA };
184
+ export { ButtonThemeBA, CheckboxThemeBA, InputThemeBA, SwitchThemeDefault, THEME_BA, TypographyThemeBA };
@@ -1,6 +1,43 @@
1
1
  import type { CheckboxVariant } from "../../Checkbox/index.props";
2
2
  import type { ButtonBase, ButtonVariant } from "../../Button/index.props";
3
3
  export declare const ButtonThemeDefault: ButtonVariant & ButtonBase;
4
+ export declare const InputThemeDefault: {
5
+ placeholder: {
6
+ color: string;
7
+ };
8
+ primary: {
9
+ normal: {
10
+ borderColor: string;
11
+ };
12
+ hovered: {
13
+ borderColor: string;
14
+ boxShadow: string;
15
+ };
16
+ focused: {
17
+ borderColor: string;
18
+ };
19
+ disabled: {
20
+ color: string;
21
+ backgroundColor: string;
22
+ borderColor: string;
23
+ };
24
+ error: {
25
+ normal: {
26
+ backgroundColor: string;
27
+ borderColor: string;
28
+ };
29
+ hovered: {
30
+ backgroundColor: string;
31
+ borderColor: string;
32
+ boxShadow: string;
33
+ };
34
+ focused: {
35
+ backgroundColor: string;
36
+ borderColor: string;
37
+ };
38
+ };
39
+ };
40
+ };
4
41
  export declare const CheckboxThemeDefault: CheckboxVariant;
5
42
  export declare const TypographyThemeDefault: {
6
43
  alert: {
@@ -9,6 +46,9 @@ export declare const TypographyThemeDefault: {
9
46
  success: {
10
47
  color: string;
11
48
  };
49
+ secondary: {
50
+ color: string;
51
+ };
12
52
  };
13
53
  export declare const SwitchThemeDefault: {
14
54
  circle: {
@@ -28,6 +68,43 @@ export declare const SwitchThemeDefault: {
28
68
  export declare const THEME_DEFAULT: {
29
69
  breakpoints: import("../breakpoints").BreakpointsTheme;
30
70
  button: ButtonVariant & ButtonBase;
71
+ input: {
72
+ placeholder: {
73
+ color: string;
74
+ };
75
+ primary: {
76
+ normal: {
77
+ borderColor: string;
78
+ };
79
+ hovered: {
80
+ borderColor: string;
81
+ boxShadow: string;
82
+ };
83
+ focused: {
84
+ borderColor: string;
85
+ };
86
+ disabled: {
87
+ color: string;
88
+ backgroundColor: string;
89
+ borderColor: string;
90
+ };
91
+ error: {
92
+ normal: {
93
+ backgroundColor: string;
94
+ borderColor: string;
95
+ };
96
+ hovered: {
97
+ backgroundColor: string;
98
+ borderColor: string;
99
+ boxShadow: string;
100
+ };
101
+ focused: {
102
+ backgroundColor: string;
103
+ borderColor: string;
104
+ };
105
+ };
106
+ };
107
+ };
31
108
  checkbox: CheckboxVariant;
32
109
  typography: {
33
110
  alert: {
@@ -36,6 +113,9 @@ export declare const THEME_DEFAULT: {
36
113
  success: {
37
114
  color: string;
38
115
  };
116
+ secondary: {
117
+ color: string;
118
+ };
39
119
  };
40
120
  switch: {
41
121
  circle: {
@@ -88,9 +168,12 @@ export declare const THEME_DEFAULT: {
88
168
  BG_3: string;
89
169
  BG_4: string;
90
170
  BG_5: string;
91
- TEXT_BA_PRIMARY: string;
92
- TEXT_BA_SECONDARY: string;
93
- TEXT_BA_TRETIARY: string;
171
+ BRAND_BA_1: string;
172
+ BRAND_BA_2: string;
173
+ BRAND_BA_3: string;
174
+ BRAND_DEFAULT_1: string;
175
+ BRAND_DEFAULT_2: string;
176
+ BRAND_DEFAULT_3: string;
94
177
  ALERT: string;
95
178
  SUCCESS: string;
96
179
  WHITE: string;
@@ -3,7 +3,6 @@ import Breakpoints from '../breakpoints.js';
3
3
 
4
4
  var ButtonThemeDefault = {
5
5
  base: {
6
- color: Color.BLACK,
7
6
  borderRadius: "26px"
8
7
  },
9
8
  primary: {
@@ -12,12 +11,12 @@ var ButtonThemeDefault = {
12
11
  backgroundColor: Color.PRIMARY_4,
13
12
  borderColor: Color.PRIMARY_4
14
13
  },
15
- hover: {
14
+ hovered: {
16
15
  color: Color.WHITE,
17
16
  backgroundColor: Color.PRIMARY_5,
18
17
  borderColor: Color.PRIMARY_5
19
18
  },
20
- focus: {
19
+ focused: {
21
20
  color: Color.WHITE,
22
21
  backgroundColor: Color.PRIMARY_5,
23
22
  borderColor: Color.PRIMARY_5
@@ -28,9 +27,9 @@ var ButtonThemeDefault = {
28
27
  borderColor: Color.PRIMARY_5
29
28
  },
30
29
  disabled: {
31
- color: Color.PRIMARY_3,
32
- backgroundColor: Color.PRIMARY_2,
33
- borderColor: Color.PRIMARY_2
30
+ color: Color.BG_3,
31
+ backgroundColor: Color.BG_1,
32
+ borderColor: Color.BG_1
34
33
  }
35
34
  },
36
35
  secondary: {
@@ -39,12 +38,12 @@ var ButtonThemeDefault = {
39
38
  backgroundColor: Color.SECONDARY_4,
40
39
  borderColor: Color.SECONDARY_4
41
40
  },
42
- hover: {
41
+ hovered: {
43
42
  color: Color.WHITE,
44
43
  backgroundColor: Color.SECONDARY_5,
45
44
  borderColor: Color.SECONDARY_5
46
45
  },
47
- focus: {
46
+ focused: {
48
47
  color: Color.WHITE,
49
48
  backgroundColor: Color.SECONDARY_5,
50
49
  borderColor: Color.SECONDARY_5
@@ -55,9 +54,9 @@ var ButtonThemeDefault = {
55
54
  borderColor: Color.SECONDARY_5
56
55
  },
57
56
  disabled: {
58
- color: Color.SECONDARY_3,
59
- backgroundColor: Color.SECONDARY_2,
60
- borderColor: Color.SECONDARY_2
57
+ color: Color.BG_3,
58
+ backgroundColor: Color.BG_1,
59
+ borderColor: Color.BG_1
61
60
  }
62
61
  },
63
62
  clear: {
@@ -66,7 +65,7 @@ var ButtonThemeDefault = {
66
65
  backgroundColor: Color.WHITE,
67
66
  borderColor: Color.WHITE
68
67
  },
69
- hover: {
68
+ hovered: {
70
69
  color: Color.TRETIARY_5,
71
70
  backgroundColor: Color.TRETIARY_2,
72
71
  borderColor: Color.TRETIARY_2
@@ -77,9 +76,46 @@ var ButtonThemeDefault = {
77
76
  borderColor: Color.TRETIARY_2
78
77
  },
79
78
  disabled: {
80
- color: Color.TRETIARY_3,
81
- backgroundColor: Color.TRETIARY_1,
82
- borderColor: Color.TRETIARY_1
79
+ color: Color.BG_3,
80
+ backgroundColor: Color.BG_1,
81
+ borderColor: Color.BG_1
82
+ }
83
+ }
84
+ };
85
+ var InputThemeDefault = {
86
+ placeholder: {
87
+ color: Color.BG_2
88
+ },
89
+ primary: {
90
+ normal: {
91
+ borderColor: Color.BG_3
92
+ },
93
+ hovered: {
94
+ borderColor: Color.PRIMARY_3,
95
+ boxShadow: "0px 0px 0px 2px ".concat(Color.PRIMARY_2)
96
+ },
97
+ focused: {
98
+ borderColor: Color.PRIMARY_4
99
+ },
100
+ disabled: {
101
+ color: Color.BG_3,
102
+ backgroundColor: Color.BG_1,
103
+ borderColor: Color.BG_3
104
+ },
105
+ error: {
106
+ normal: {
107
+ backgroundColor: Color.TRETIARY_2,
108
+ borderColor: Color.ALERT
109
+ },
110
+ hovered: {
111
+ backgroundColor: Color.WHITE,
112
+ borderColor: Color.ALERT,
113
+ boxShadow: "0px 0px 0px 2px ".concat(Color.TRETIARY_2)
114
+ },
115
+ focused: {
116
+ backgroundColor: Color.WHITE,
117
+ borderColor: Color.ALERT
118
+ }
83
119
  }
84
120
  }
85
121
  };
@@ -88,10 +124,10 @@ var CheckboxThemeDefault = {
88
124
  normal: {
89
125
  backgroundColor: Color.PRIMARY_4
90
126
  },
91
- hover: {
127
+ hovered: {
92
128
  backgroundColor: Color.PRIMARY_4
93
129
  },
94
- focus: {
130
+ focused: {
95
131
  boxShadow: "0 0 0 2px ".concat(Color.PRIMARY_1)
96
132
  },
97
133
  checked: {
@@ -113,6 +149,9 @@ var TypographyThemeDefault = {
113
149
  },
114
150
  success: {
115
151
  color: Color.SUCCESS
152
+ },
153
+ secondary: {
154
+ color: Color.BG_3
116
155
  }
117
156
  };
118
157
  var SwitchThemeDefault = {
@@ -121,8 +160,8 @@ var SwitchThemeDefault = {
121
160
  },
122
161
  state: {
123
162
  normal: {
124
- backgroundColor: Color.BG_1,
125
- borderColor: Color.BG_1
163
+ backgroundColor: Color.BG_2,
164
+ borderColor: Color.BG_2
126
165
  },
127
166
  checked: {
128
167
  backgroundColor: Color.PRIMARY_5,
@@ -133,10 +172,11 @@ var SwitchThemeDefault = {
133
172
  var THEME_DEFAULT = {
134
173
  breakpoints: Breakpoints,
135
174
  button: ButtonThemeDefault,
175
+ input: InputThemeDefault,
136
176
  checkbox: CheckboxThemeDefault,
137
177
  typography: TypographyThemeDefault,
138
178
  "switch": SwitchThemeDefault,
139
179
  palette: Color
140
180
  };
141
181
 
142
- export { ButtonThemeDefault, CheckboxThemeDefault, SwitchThemeDefault, THEME_DEFAULT, TypographyThemeDefault };
182
+ export { ButtonThemeDefault, CheckboxThemeDefault, InputThemeDefault, SwitchThemeDefault, THEME_DEFAULT, TypographyThemeDefault };
@@ -1,18 +1,15 @@
1
1
  import type { CSSObject } from "@emotion/react";
2
- export declare enum VARIANT {
3
- ALERT = "alert",
4
- SUCCESS = "success"
5
- }
6
2
  type VariantStyles = {
7
3
  color?: CSSObject["color"];
8
4
  };
9
5
  export type TypographyVariant = {
10
- [VARIANT.ALERT]: VariantStyles;
11
- [VARIANT.SUCCESS]: VariantStyles;
6
+ alert: VariantStyles;
7
+ success: VariantStyles;
8
+ secondary: VariantStyles;
12
9
  };
13
10
  export type TypographyFontWeight = "normal" | "medium" | "bold";
14
11
  export type TypographySize = "xs" | "s" | "m" | "l" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
15
- export type TypographyTag = "span" | "legend" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s";
12
+ export type TypographyTag = "span" | "label" | "legend" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s";
16
13
  export type TypographyProps = {
17
14
  className?: string;
18
15
  tag?: TypographyTag;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { FormFieldProps } from "./index.props";
3
+ declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default FormField;
@@ -0,0 +1,26 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import Typography from '../../Typography/index.js';
4
+ import { BaseContainer } from './styles.js';
5
+
6
+ var FormField = /*#__PURE__*/forwardRef(function (_a, ref) {
7
+ var label = _a.label,
8
+ hint = _a.hint,
9
+ children = _a.children,
10
+ error = _a.error,
11
+ className = _a.className;
12
+ return jsxs(BaseContainer, {
13
+ className: className,
14
+ ref: ref,
15
+ children: [label && jsx(Typography, {
16
+ tag: "label",
17
+ children: label
18
+ }), children, hint && jsx(Typography, {
19
+ variant: error ? "alert" : "secondary",
20
+ tag: "span",
21
+ children: hint
22
+ })]
23
+ });
24
+ });
25
+
26
+ export { FormField as default };
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from "react";
2
+ export type FormFieldProps = {
3
+ label?: ReactNode;
4
+ hint?: ReactNode;
5
+ error?: boolean;
6
+ className?: string;
7
+ children: ReactNode;
8
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const BaseContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,12 @@
1
+ import _styled from '@emotion/styled/base';
2
+ import { __makeTemplateObject } from 'tslib';
3
+
4
+ var BaseContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
5
+ target: "ex9vcr90"
6
+ } : {
7
+ target: "ex9vcr90",
8
+ label: "BaseContainer"
9
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuZXhwb3J0IHZhciBCYXNlQ29udGFpbmVyID0gc3R5bGVkLmRpdih0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSwgW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSkpKTtcbnZhciB0ZW1wbGF0ZU9iamVjdF8xO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdfQ== */")], ["\n display: flex;\n flex-direction: column;\n gap: 8px;\n" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tIFwidHNsaWJcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuZXhwb3J0IHZhciBCYXNlQ29udGFpbmVyID0gc3R5bGVkLmRpdih0ZW1wbGF0ZU9iamVjdF8xIHx8ICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSwgW1wiXFxuICBkaXNwbGF5OiBmbGV4O1xcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcXG4gIGdhcDogOHB4O1xcblwiXSkpKTtcbnZhciB0ZW1wbGF0ZU9iamVjdF8xO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGVzLmpzLm1hcCJdfQ== */")])));
10
+ var templateObject_1;
11
+
12
+ export { BaseContainer };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { InputProps } from "./index.props";
3
+ declare const InputRoot: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default InputRoot;
@@ -0,0 +1,30 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { BaseInputRoot, BaseIcon, BaseDisableWrapper } from './styles.js';
4
+
5
+ var InputRoot = /*#__PURE__*/forwardRef(function (_a, ref) {
6
+ var className = _a.className,
7
+ startIcon = _a.startIcon,
8
+ endIcon = _a.endIcon,
9
+ children = _a.children,
10
+ _b = _a.variant,
11
+ variant = _b === void 0 ? "primary" : _b,
12
+ disabled = _a.disabled,
13
+ error = _a.error,
14
+ size = _a.size;
15
+ return jsxs(BaseInputRoot, {
16
+ ref: ref,
17
+ className: className,
18
+ variant: variant,
19
+ isError: error ? 1 : 0,
20
+ disabled: disabled,
21
+ size: size,
22
+ children: [startIcon && jsx(BaseIcon, {
23
+ children: startIcon
24
+ }), children, endIcon && jsx(BaseIcon, {
25
+ children: endIcon
26
+ }), disabled && jsx(BaseDisableWrapper, {})]
27
+ });
28
+ });
29
+
30
+ export { InputRoot as default };
@@ -0,0 +1,41 @@
1
+ import type { CSSObject } from "@emotion/react";
2
+ import type { ReactNode } from "react";
3
+ export type InputSize = "s" | "m" | "l";
4
+ type VariantStyles = {
5
+ color?: CSSObject["color"];
6
+ backgroundColor?: CSSObject["backgroundColor"];
7
+ borderColor?: CSSObject["borderColor"];
8
+ boxShadow?: CSSObject["boxShadow"];
9
+ };
10
+ type PlaceholderStyles = {
11
+ color?: CSSObject["color"];
12
+ };
13
+ type VariantStates = {
14
+ normal?: VariantStyles;
15
+ hovered?: VariantStyles;
16
+ focused?: VariantStyles;
17
+ active?: VariantStyles;
18
+ disabled?: VariantStyles;
19
+ error?: {
20
+ normal?: VariantStyles;
21
+ hovered?: VariantStyles;
22
+ focused?: VariantStyles;
23
+ };
24
+ };
25
+ export type InputVariant = {
26
+ primary: VariantStates;
27
+ };
28
+ export type PlaceholderProps = {
29
+ placeholder: PlaceholderStyles;
30
+ };
31
+ export type InputProps = {
32
+ variant?: keyof InputVariant;
33
+ disabled: boolean;
34
+ error?: boolean;
35
+ className?: string;
36
+ startIcon?: ReactNode;
37
+ endIcon?: ReactNode;
38
+ children: ReactNode;
39
+ size?: InputSize;
40
+ };
41
+ export {};
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { InputSize, InputVariant } from "./index.props";
3
+ export declare const BaseInputRoot: import("@emotion/styled").StyledComponent<{
4
+ theme?: import("@emotion/react").Theme | undefined;
5
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ } & {
7
+ disabled: boolean;
8
+ isError?: number | undefined;
9
+ size?: InputSize | undefined;
10
+ variant: keyof InputVariant;
11
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
12
+ export declare const BaseInput: import("@emotion/styled").StyledComponent<{
13
+ theme?: import("@emotion/react").Theme | undefined;
14
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
15
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
+ export declare const BasePlaceholder: import("@emotion/styled").StyledComponent<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
19
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
20
+ export declare const BaseIcon: import("@emotion/styled").StyledComponent<{
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
23
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
24
+ export declare const BaseDisableWrapper: import("@emotion/styled").StyledComponent<{
25
+ theme?: import("@emotion/react").Theme | undefined;
26
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
27
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;