cherry-styled-components 0.1.0-9 → 0.1.1

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 (60) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.prettierrc +9 -9
  3. package/.supermaven/config.json +1 -0
  4. package/README.md +1 -1
  5. package/dist/App.d.ts +0 -1
  6. package/dist/cherry.js +4066 -2890
  7. package/dist/cherry.umd.cjs +916 -791
  8. package/dist/lib/box.d.ts +3 -3
  9. package/dist/lib/button.d.ts +6 -4
  10. package/dist/lib/col.d.ts +3 -3
  11. package/dist/lib/container.d.ts +3 -3
  12. package/dist/lib/flex.d.ts +5 -3
  13. package/dist/lib/grid.d.ts +3 -3
  14. package/dist/lib/index.d.ts +15 -15
  15. package/dist/lib/input.d.ts +16 -5
  16. package/dist/lib/max-width.d.ts +3 -2
  17. package/dist/lib/range.d.ts +3 -3
  18. package/dist/lib/select.d.ts +5 -4
  19. package/dist/lib/space.d.ts +2 -2
  20. package/dist/lib/styled-components/index.d.ts +2 -2
  21. package/dist/lib/styled-components/registry.d.ts +1 -1
  22. package/dist/lib/styled-components/theme-provider.d.ts +10 -4
  23. package/dist/lib/textarea.d.ts +4 -3
  24. package/dist/lib/toggle.d.ts +3 -3
  25. package/dist/lib/utils/global.d.ts +2 -2
  26. package/dist/lib/utils/icons.d.ts +6 -10
  27. package/dist/lib/utils/index.d.ts +5 -5
  28. package/dist/lib/utils/mixins.d.ts +11 -11
  29. package/dist/lib/utils/theme.d.ts +4 -0
  30. package/dist/lib/utils/typography.d.ts +19 -19
  31. package/dist/toggle-theme.d.ts +3 -0
  32. package/package.json +17 -15
  33. package/pnpm-workspace.yaml +3 -0
  34. package/src/App.tsx +80 -93
  35. package/src/lib/box.tsx +26 -21
  36. package/src/lib/button.tsx +162 -159
  37. package/src/lib/col.tsx +45 -43
  38. package/src/lib/container.tsx +59 -64
  39. package/src/lib/flex.tsx +92 -95
  40. package/src/lib/grid.tsx +64 -70
  41. package/src/lib/index.ts +15 -15
  42. package/src/lib/input.tsx +384 -267
  43. package/src/lib/max-width.tsx +50 -43
  44. package/src/lib/range.tsx +208 -226
  45. package/src/lib/select.tsx +121 -131
  46. package/src/lib/space.tsx +52 -54
  47. package/src/lib/styled-components/index.ts +2 -2
  48. package/src/lib/styled-components/registry.tsx +26 -26
  49. package/src/lib/styled-components/theme-provider.tsx +49 -21
  50. package/src/lib/textarea.tsx +94 -103
  51. package/src/lib/toggle.tsx +147 -160
  52. package/src/lib/utils/global.tsx +95 -79
  53. package/src/lib/utils/icons.tsx +84 -170
  54. package/src/lib/utils/index.ts +5 -5
  55. package/src/lib/utils/mixins.tsx +95 -108
  56. package/src/lib/utils/theme.ts +289 -242
  57. package/src/lib/utils/typography.tsx +204 -204
  58. package/src/main.tsx +14 -14
  59. package/src/toggle-theme.tsx +25 -0
  60. package/src/vite-env.d.ts +8 -1
package/src/lib/input.tsx CHANGED
@@ -1,267 +1,384 @@
1
- "use client";
2
- import React from "react";
3
- import styled from "styled-components";
4
- import {
5
- theme as defaultTheme,
6
- Theme,
7
- IconCheck,
8
- formElementHeightStyles,
9
- fullWidthStyles,
10
- resetButton,
11
- resetInput,
12
- statusBorderStyles,
13
- } from "./utils";
14
-
15
- interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
16
- children?: React.ReactNode;
17
- $label?: string;
18
- $size?: "default" | "big";
19
- $error?: boolean;
20
- $success?: boolean;
21
- $fullWidth?: boolean;
22
- theme?: Theme;
23
- }
24
-
25
- export const StyledInputWrapper = styled.span<InputProps>`
26
- display: inline-flex;
27
- flex-wrap: ${({ type }) =>
28
- type === "checkbox" || type === "radio" ? "nowrap" : "wrap"};
29
- gap: 10px;
30
- align-items: center;
31
-
32
- ${({ $fullWidth }) => fullWidthStyles($fullWidth ? true : false)}
33
- `;
34
-
35
- export const StyledLabel = styled.label<InputProps>`
36
- display: inline-block;
37
- color: ${({ theme }) => theme.colors.grayDark};
38
- font-size: ${({ theme }) => theme.fontSizes.text.lg};
39
- line-height: ${({ theme }) => theme.lineHeights.text.lg};
40
- `;
41
-
42
- const StyledInput = styled.input<InputProps>`
43
- ${resetButton};
44
- ${resetInput};
45
- font-family: inherit;
46
- display: inline-block;
47
- padding: 17px 15px;
48
- border-radius: ${({ theme }) => theme.spacing.radius.xs};
49
- font-weight: 400;
50
- white-space: nowrap;
51
- hyphens: auto;
52
- color: ${({ theme }) => theme.colors.dark};
53
- background: ${({ theme }) => theme.colors.light};
54
- border: solid 2px ${({ theme }) => theme.colors.grayLight};
55
- box-shadow: 0 0 0 0px ${({ theme }) => theme.colors.primaryLight};
56
- transition: all 0.3s ease;
57
-
58
- &::placeholder {
59
- color: ${({ theme }) => theme.colors.gray};
60
- }
61
-
62
- @media (hover: hover) {
63
- &:hover:not([disabled]) {
64
- border-color: ${({ theme }) => theme.colors.primary};
65
- }
66
- }
67
-
68
- &:focus:not([disabled]) {
69
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
70
- border-color: ${({ theme }) => theme.colors.primary};
71
- }
72
-
73
- &:active:not([disabled]) {
74
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
75
- }
76
-
77
- ${({ $size }) => formElementHeightStyles($size)}
78
-
79
- ${({ $size, theme }) =>
80
- $size === "big"
81
- ? `font-size: ${theme.fontSizes.inputBig.lg};
82
- line-height: ${theme.lineHeights.inputBig.lg};
83
- `
84
- : `font-size: ${theme.fontSizes.input.lg};
85
- line-height: ${theme.lineHeights.input.lg};`}
86
-
87
- ${({ $error, $success, theme }) => {
88
- return statusBorderStyles(
89
- $error ? true : false,
90
- $success ? true : false,
91
- theme,
92
- );
93
- }}
94
-
95
- ${({ disabled, theme }) =>
96
- disabled &&
97
- `cursor: not-allowed;
98
- background: ${theme.colors.grayLight};
99
- border-color: ${theme.colors.gray};
100
- color: ${theme.colors.gray};
101
- `}
102
-
103
- ${({ $fullWidth }) => fullWidthStyles($fullWidth ? true : false)}
104
- `;
105
-
106
- const StyledIconWrapper = styled.span<InputProps>`
107
- display: inline-flex;
108
- position: relative;
109
- line-height: 0;
110
-
111
- & em {
112
- display: block;
113
- border-radius: 50%;
114
- background: ${({ theme }) => theme.colors.primary};
115
- }
116
-
117
- & svg,
118
- & em {
119
- object-fit: contain;
120
- position: absolute;
121
- top: 50%;
122
- left: 50%;
123
- transform: translate(-50%, -50%) scale(0.7);
124
- opacity: 0;
125
- pointer-events: none;
126
- transition: all 0.3s ease;
127
- }
128
- `;
129
-
130
- const StyledRadioCheckboxInput = styled.input<InputProps>`
131
- ${resetButton};
132
- display: inline-block;
133
- border: solid 2px ${({ theme }) => theme.colors.grayLight};
134
- box-shadow: 0 0 0 0px ${({ theme }) => theme.colors.primaryLight};
135
- transition: all 0.3s ease;
136
-
137
- @media (hover: hover) {
138
- &:hover:not([disabled]) {
139
- border-color: ${({ theme }) => theme.colors.primary};
140
- }
141
- }
142
-
143
- &:focus:not([disabled]) {
144
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
145
- border-color: ${({ theme }) => theme.colors.primary};
146
- }
147
-
148
- &:active:not([disabled]) {
149
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
150
- }
151
-
152
- ${({ type, theme }) =>
153
- type === "checkbox"
154
- ? `border-radius: ${theme.spacing.radius.xs};`
155
- : `border-radius: 50%;`}
156
-
157
- ${({ disabled, theme }) =>
158
- disabled &&
159
- `cursor: not-allowed;
160
- background: ${theme.colors.grayLight};
161
- border-color: ${theme.colors.gray};
162
- color: ${theme.colors.gray};
163
- `}
164
-
165
- ${({ $error, $success, theme }) => {
166
- return statusBorderStyles(
167
- $error ? true : false,
168
- $success ? true : false,
169
- theme,
170
- );
171
- }}
172
-
173
- ${({ $size }) => {
174
- if ($size === "big") {
175
- return `
176
- min-width: 32px;
177
- width: 32px;
178
- min-height: 32px;
179
- height: 32px;
180
-
181
- & ~ svg {
182
- min-width: 18px;
183
- width: 18px;
184
- min-height: 18px;
185
- height: 18px;
186
- }
187
-
188
- & ~ em {
189
- min-width: 14px;
190
- width: 14px;
191
- min-height: 14px;
192
- height: 14px;
193
- }
194
- `;
195
- } else {
196
- return `
197
- min-width: 22px;
198
- width: 22px;
199
- min-height: 22px;
200
- height: 22px;
201
-
202
- & ~ svg {
203
- min-width: 12px;
204
- width: 12px;
205
- min-height: 12px;
206
- height: 12px;
207
- }
208
-
209
- & ~ em {
210
- min-width: 8px;
211
- width: 8px;
212
- min-height: 8px;
213
- height: 8px;
214
- }
215
- `;
216
- }
217
- }}
218
-
219
- &:checked ~ svg,
220
- &:checked ~ em {
221
- opacity: 1;
222
- transform: translate(-50%, -50%) scale(1);
223
- }
224
- `;
225
-
226
- function Input({ theme = defaultTheme, ...props }: InputProps) {
227
- if (props.type === "checkbox" || props.type === "radio") {
228
- return (
229
- <StyledInputWrapper
230
- $fullWidth={props.$fullWidth}
231
- type={props.type}
232
- theme={theme}
233
- >
234
- <StyledIconWrapper theme={theme}>
235
- <StyledRadioCheckboxInput {...props} theme={theme} />
236
- {!props.disabled && props.type === "checkbox" ? (
237
- <IconCheck />
238
- ) : (
239
- <em />
240
- )}
241
- </StyledIconWrapper>
242
- {props.$label && (
243
- <StyledLabel htmlFor={props.id} theme={theme}>
244
- {props.$label}
245
- </StyledLabel>
246
- )}
247
- </StyledInputWrapper>
248
- );
249
- }
250
-
251
- return (
252
- <StyledInputWrapper
253
- $fullWidth={props.$fullWidth}
254
- type={props.type}
255
- theme={theme}
256
- >
257
- {props.$label && (
258
- <StyledLabel htmlFor={props.id} theme={theme}>
259
- {props.$label}
260
- </StyledLabel>
261
- )}
262
- <StyledInput {...props} theme={theme} />
263
- </StyledInputWrapper>
264
- );
265
- }
266
-
267
- export { Input };
1
+ "use client";
2
+ import React, { forwardRef } from "react";
3
+ import styled, { css } from "styled-components";
4
+ import type { IStyledComponent } from "styled-components";
5
+ import {
6
+ Theme,
7
+ IconCheck,
8
+ formElementHeightStyles,
9
+ fullWidthStyles,
10
+ resetButton,
11
+ resetInput,
12
+ statusBorderStyles,
13
+ IconCalendar,
14
+ } from "./utils";
15
+
16
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
17
+ children?: React.ReactNode;
18
+ $label?: string;
19
+ $size?: "default" | "big";
20
+ $error?: boolean;
21
+ $success?: boolean;
22
+ $fullWidth?: boolean;
23
+ $icon?: React.ReactNode;
24
+ $iconPosition?: "left" | "right";
25
+ theme?: Theme;
26
+ }
27
+
28
+ interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
29
+ $label?: string;
30
+ $size?: "default" | "big";
31
+ $error?: boolean;
32
+ $success?: boolean;
33
+ $fullWidth?: boolean;
34
+ theme?: Theme;
35
+ }
36
+
37
+ export const StyledInputWrapper: IStyledComponent<"web", React.HTMLAttributes<HTMLSpanElement> & Pick<InputProps, "$label" | "$fullWidth" | "type">> = styled.span<Pick<InputProps, "$label" | "$fullWidth" | "type">>`
38
+ display: inline-flex;
39
+ flex-wrap: ${({ type }) => (type === "checkbox" || type === "radio" ? "nowrap" : "wrap")};
40
+ align-items: center;
41
+
42
+ ${({ $label }) =>
43
+ $label &&
44
+ css`
45
+ gap: 10px;
46
+ align-items: flex-start;
47
+ `}
48
+
49
+ & .icon-calendar {
50
+ position: absolute;
51
+ top: 50%;
52
+ right: 17px;
53
+ left: initial;
54
+ transform: translateY(-50%);
55
+ pointer-events: none;
56
+ width: 24px;
57
+ height: 24px;
58
+
59
+ @supports (-moz-appearance: none) {
60
+ display: none;
61
+ }
62
+ }
63
+
64
+ ${({ $fullWidth }) => fullWidthStyles($fullWidth ? true : false)}
65
+ `;
66
+
67
+ export const StyledLabel: IStyledComponent<"web", LabelProps> = styled.label<LabelProps>`
68
+ display: inline-block;
69
+ color: ${({ theme }) => theme.colors.grayDark};
70
+ font-size: ${({ theme }) => theme.fontSizes.text.lg};
71
+ line-height: ${({ theme }) => theme.lineHeights.text.lg};
72
+ `;
73
+
74
+ const StyledInput = styled.input<InputProps>`
75
+ ${resetButton};
76
+ ${resetInput};
77
+ font-family: inherit;
78
+ display: inline-block;
79
+ padding: 17px 15px;
80
+ border-radius: ${({ theme }) => theme.spacing.radius.xs};
81
+ font-weight: 400;
82
+ white-space: nowrap;
83
+ hyphens: auto;
84
+ color: ${({ theme }) => theme.colors.dark};
85
+ background: ${({ theme }) => theme.colors.light};
86
+ border: solid 2px ${({ theme }) => theme.colors.grayLight};
87
+ box-shadow: 0 0 0 0px ${({ theme }) => theme.colors.primaryLight};
88
+ transition: all 0.3s ease;
89
+ word-break: keep-all;
90
+ white-space: nowrap;
91
+ display: inline-flex;
92
+
93
+ &[type="date"] {
94
+ padding: 17px 45px 17px 15px;
95
+
96
+ @supports (-moz-appearance: none) {
97
+ padding: 13px 15px;
98
+ }
99
+ }
100
+
101
+ &::-webkit-datetime-edit {
102
+ padding: 0;
103
+ margin: 0;
104
+ vertical-align: middle;
105
+ }
106
+
107
+ &::-webkit-datetime-edit-fields-wrapper {
108
+ padding: 4px 0;
109
+ margin: 0;
110
+ vertical-align: middle;
111
+ }
112
+
113
+ &::-webkit-calendar-picker-indicator {
114
+ background: transparent;
115
+ cursor: pointer;
116
+ position: absolute;
117
+ right: 15px;
118
+ top: 50%;
119
+ transform: translateY(-50%);
120
+ width: 24px;
121
+ height: 24px;
122
+ }
123
+
124
+ &::-webkit-datetime-edit-text {
125
+ color: ${({ theme }) => theme.colors.gray};
126
+ }
127
+
128
+ &::-webkit-datetime-edit-month-field {
129
+ &:focus {
130
+ background: ${({ theme }) => theme.colors.primary};
131
+ color: ${({ theme }) => theme.colors.light};
132
+ border-radius: 4px;
133
+ }
134
+ }
135
+
136
+ &::-webkit-datetime-edit-day-field {
137
+ &:focus {
138
+ background: ${({ theme }) => theme.colors.primary};
139
+ color: ${({ theme }) => theme.colors.light};
140
+ border-radius: 4px;
141
+ }
142
+ }
143
+
144
+ &::-webkit-datetime-edit-year-field {
145
+ &:focus {
146
+ background: ${({ theme }) => theme.colors.primary};
147
+ color: ${({ theme }) => theme.colors.light};
148
+ border-radius: 4px;
149
+ }
150
+ }
151
+
152
+ &::placeholder {
153
+ color: ${({ theme }) => theme.colors.gray};
154
+ }
155
+
156
+ @media (hover: hover) {
157
+ &:hover:not([disabled]) {
158
+ border-color: ${({ theme }) => theme.colors.primary};
159
+ }
160
+ }
161
+
162
+ &:focus:not([disabled]) {
163
+ box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
164
+ border-color: ${({ theme }) => theme.colors.primary};
165
+ }
166
+
167
+ &:active:not([disabled]) {
168
+ box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
169
+ }
170
+
171
+ ${({ $size }) => formElementHeightStyles($size)}
172
+
173
+ ${({ $size, theme }) =>
174
+ $size === "big"
175
+ ? `font-size: ${theme.fontSizes.inputBig.lg};
176
+ line-height: ${theme.lineHeights.inputBig.lg};
177
+ `
178
+ : `font-size: ${theme.fontSizes.input.lg};
179
+ line-height: ${theme.lineHeights.input.lg};`}
180
+
181
+ ${({ $error, $success, theme }) => {
182
+ return statusBorderStyles($error ? true : false, $success ? true : false, theme);
183
+ }}
184
+
185
+ ${({ disabled, theme }) =>
186
+ disabled &&
187
+ `cursor: not-allowed;
188
+ background: ${theme.colors.grayLight};
189
+ border-color: ${theme.colors.gray};
190
+ color: ${theme.colors.gray};
191
+ `}
192
+
193
+ ${({ $fullWidth }) => fullWidthStyles($fullWidth ? true : false)}
194
+ `;
195
+
196
+ const StyledIconWrapper = styled.span<InputProps>`
197
+ display: inline-flex;
198
+ position: relative;
199
+ line-height: 0;
200
+ min-width: fit-content;
201
+
202
+ & em {
203
+ display: block;
204
+ border-radius: 50%;
205
+ background: ${({ theme }) => theme.colors.primary};
206
+ }
207
+
208
+ & svg,
209
+ & em {
210
+ object-fit: contain;
211
+ position: absolute;
212
+ top: 50%;
213
+ left: 50%;
214
+ transform: translate(-50%, -50%) scale(0.7);
215
+ opacity: 0;
216
+ pointer-events: none;
217
+ transition: all 0.3s ease;
218
+ }
219
+ `;
220
+
221
+ const StyledRadioCheckboxInput = styled.input<InputProps>`
222
+ ${resetButton};
223
+ display: inline-block;
224
+ border: solid 2px ${({ theme }) => theme.colors.grayLight};
225
+ box-shadow: 0 0 0 0px ${({ theme }) => theme.colors.primaryLight};
226
+ transition: all 0.3s ease;
227
+
228
+ @media (hover: hover) {
229
+ &:hover:not([disabled]) {
230
+ border-color: ${({ theme }) => theme.colors.primary};
231
+ }
232
+ }
233
+
234
+ &:focus:not([disabled]) {
235
+ box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
236
+ border-color: ${({ theme }) => theme.colors.primary};
237
+ }
238
+
239
+ &:active:not([disabled]) {
240
+ box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
241
+ }
242
+
243
+ ${({ type, theme }) =>
244
+ type === "checkbox" ? `border-radius: ${theme.spacing.radius.xs};` : `border-radius: 50%;`}
245
+
246
+ ${({ disabled, theme }) =>
247
+ disabled &&
248
+ `cursor: not-allowed;
249
+ background: ${theme.colors.grayLight};
250
+ border: solid 2px ${theme.colors.gray};
251
+ color: ${theme.colors.gray};
252
+ `}
253
+
254
+ ${({ $error, $success, theme }) => {
255
+ return statusBorderStyles($error ? true : false, $success ? true : false, theme);
256
+ }}
257
+
258
+ ${({ $size }) => {
259
+ if ($size === "big") {
260
+ return `
261
+ min-width: 32px;
262
+ width: 32px;
263
+ min-height: 32px;
264
+ height: 32px;
265
+
266
+ & ~ svg {
267
+ min-width: 18px;
268
+ width: 18px;
269
+ min-height: 18px;
270
+ height: 18px;
271
+ }
272
+
273
+ & ~ em {
274
+ min-width: 14px;
275
+ width: 14px;
276
+ min-height: 14px;
277
+ height: 14px;
278
+ }
279
+ `;
280
+ } else {
281
+ return `
282
+ min-width: 22px;
283
+ width: 22px;
284
+ min-height: 22px;
285
+ height: 22px;
286
+
287
+ & ~ svg {
288
+ min-width: 12px;
289
+ width: 12px;
290
+ min-height: 12px;
291
+ height: 12px;
292
+ }
293
+
294
+ & ~ em {
295
+ min-width: 8px;
296
+ width: 8px;
297
+ min-height: 8px;
298
+ height: 8px;
299
+ }
300
+ `;
301
+ }
302
+ }}
303
+
304
+ &:checked ~ svg,
305
+ &:checked ~ em {
306
+ opacity: 1;
307
+ transform: translate(-50%, -50%) scale(1);
308
+ }
309
+ `;
310
+
311
+ const StyledCustomIconWrapper = styled.span<InputProps>`
312
+ position: relative;
313
+ ${({ $fullWidth }) => fullWidthStyles($fullWidth ? true : false)};
314
+
315
+ & svg {
316
+ position: absolute;
317
+ top: 50%;
318
+ transform: translateY(-50%);
319
+ pointer-events: none;
320
+ width: 24px;
321
+ height: 24px;
322
+ object-fit: contain;
323
+ color: ${({ theme }) => theme.colors.primary};
324
+ }
325
+
326
+ ${({ $icon, $iconPosition }) =>
327
+ $icon && $iconPosition === "right"
328
+ ? css`
329
+ & svg {
330
+ right: 16px;
331
+ }
332
+
333
+ & input {
334
+ padding-right: 50px;
335
+ }
336
+ `
337
+ : css`
338
+ & svg {
339
+ left: 16px;
340
+ }
341
+
342
+ & svg ~ input {
343
+ padding-left: 50px;
344
+ }
345
+ `}
346
+ `;
347
+
348
+ function LocalInput({ ...props }: InputProps, ref: React.Ref<HTMLInputElement>) {
349
+ if (props.type === "checkbox" || props.type === "radio") {
350
+ return (
351
+ <StyledInputWrapper $fullWidth={props.$fullWidth} type={props.type} $label={props.$label}>
352
+ <StyledIconWrapper>
353
+ <StyledRadioCheckboxInput {...props} ref={ref} />
354
+ {!props.disabled && props.type === "checkbox" ? <IconCheck /> : <em />}
355
+ </StyledIconWrapper>
356
+ {props.$label && (
357
+ <StyledLabel htmlFor={props.id}>
358
+ {props.$label}
359
+ </StyledLabel>
360
+ )}
361
+ </StyledInputWrapper>
362
+ );
363
+ }
364
+
365
+ return (
366
+ <StyledInputWrapper $fullWidth={props.$fullWidth} type={props.type} $label={props.$label}>
367
+ {props.$label && <StyledLabel htmlFor={props.id}>{props.$label}</StyledLabel>}
368
+ <StyledCustomIconWrapper
369
+ $fullWidth={props.$fullWidth}
370
+ $iconPosition={props.$iconPosition}
371
+ $icon={props.$icon}
372
+ >
373
+ {props.$iconPosition !== "right" && props.$icon && props.$icon}
374
+ <StyledInput {...props} ref={ref} />
375
+ {props.$iconPosition === "right" && props.$icon && props.$icon}
376
+ {props.type === "date" && <IconCalendar className="icon-calendar" />}
377
+ </StyledCustomIconWrapper>
378
+ </StyledInputWrapper>
379
+ );
380
+ }
381
+
382
+ const Input = forwardRef(LocalInput);
383
+
384
+ export { Input };