masked-components-cli 1.5.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.
Files changed (44) hide show
  1. package/README.md +189 -0
  2. package/dist/cli.js +103 -0
  3. package/package.json +40 -0
  4. package/templates/masked-buttons/MaskedButton/Base/BaseButton.styles.ts +155 -0
  5. package/templates/masked-buttons/MaskedButton/Base/BaseButton.tsx +75 -0
  6. package/templates/masked-buttons/MaskedButton/MaskedButton.tsx +38 -0
  7. package/templates/masked-buttons/MaskedButton/MaskedButton.types.ts +67 -0
  8. package/templates/masked-buttons/MaskedButton/variants/Default/DefaultButton.styles.ts +53 -0
  9. package/templates/masked-buttons/MaskedButton/variants/Default/DefaultButton.tsx +10 -0
  10. package/templates/masked-buttons/MaskedButton/variants/Ghost/GhostButton.styles.ts +52 -0
  11. package/templates/masked-buttons/MaskedButton/variants/Ghost/GhostButton.tsx +10 -0
  12. package/templates/masked-buttons/MaskedButton/variants/Gradient/GradientButton.styles.ts +52 -0
  13. package/templates/masked-buttons/MaskedButton/variants/Gradient/GradientButton.tsx +10 -0
  14. package/templates/masked-buttons/MaskedButton/variants/Link/LinkButton.styles.ts +55 -0
  15. package/templates/masked-buttons/MaskedButton/variants/Link/LinkButton.tsx +10 -0
  16. package/templates/masked-buttons/MaskedButton/variants/Neon/NeonButton.styles.ts +57 -0
  17. package/templates/masked-buttons/MaskedButton/variants/Neon/NeonButton.tsx +10 -0
  18. package/templates/masked-buttons/MaskedButton/variants/Outline/OutlineButton.styles.ts +53 -0
  19. package/templates/masked-buttons/MaskedButton/variants/Outline/OutlineButton.tsx +10 -0
  20. package/templates/masked-buttons/MaskedButton/variants/Toggle/ToggleButton.styles.ts +70 -0
  21. package/templates/masked-buttons/MaskedButton/variants/Toggle/ToggleButton.tsx +15 -0
  22. package/templates/masked-cards/MaskedCards/MaskedCards.styles.ts +0 -0
  23. package/templates/masked-cards/MaskedCards/MaskedCards.tsx +0 -0
  24. package/templates/masked-cards/MaskedCards/MaskedCardsStyles.ts +0 -0
  25. package/templates/masked-input/MaskedInput/FormikMaskedInput.tsx +44 -0
  26. package/templates/masked-input/MaskedInput/MaskedInput.styles.ts +298 -0
  27. package/templates/masked-input/MaskedInput/MaskedInput.tsx +42 -0
  28. package/templates/masked-input/MaskedInput/MaskedInput.types.ts +79 -0
  29. package/templates/masked-input/MaskedInput/formikVariants/FormikCurrencyInput.tsx +13 -0
  30. package/templates/masked-input/MaskedInput/formikVariants/FormikFileInput.tsx +13 -0
  31. package/templates/masked-input/MaskedInput/formikVariants/FormikMaskedTextInput.tsx +13 -0
  32. package/templates/masked-input/MaskedInput/formikVariants/FormikPasswordInput.tsx +13 -0
  33. package/templates/masked-input/MaskedInput/formikVariants/FormikSearchInput.tsx +13 -0
  34. package/templates/masked-input/MaskedInput/formikVariants/FormikSelectInput.tsx +13 -0
  35. package/templates/masked-input/MaskedInput/formikVariants/FormikTextInput.tsx +13 -0
  36. package/templates/masked-input/MaskedInput/formikVariants/FormikTextareaInput.tsx +13 -0
  37. package/templates/masked-input/MaskedInput/variants/CurrencyInput.tsx +100 -0
  38. package/templates/masked-input/MaskedInput/variants/FileInput.tsx +94 -0
  39. package/templates/masked-input/MaskedInput/variants/MaskedInput.tsx +35 -0
  40. package/templates/masked-input/MaskedInput/variants/PasswordInput.tsx +39 -0
  41. package/templates/masked-input/MaskedInput/variants/SearchInput.tsx +47 -0
  42. package/templates/masked-input/MaskedInput/variants/SelectInput.tsx +67 -0
  43. package/templates/masked-input/MaskedInput/variants/TextInput.tsx +34 -0
  44. package/templates/masked-input/MaskedInput/variants/TextareaInput.tsx +33 -0
@@ -0,0 +1,53 @@
1
+ import styled, { css } from 'styled-components'
2
+ import { BaseButton } from '../../Base/BaseButton'
3
+
4
+ type props = {
5
+ $isActive?: boolean
6
+ $isError?: boolean
7
+ }
8
+
9
+ const activeStyles = css`
10
+ color: ${({ theme }) => theme.colors.baseBlue.light20};
11
+ background-color: ${({ theme }) => theme.colors.baseBlue.dark20};
12
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.light20};
13
+
14
+ box-shadow: 0px 0px 10px 1px ${({ theme }) => theme.colors.baseBlue.base};
15
+
16
+ svg {
17
+ color: inherit;
18
+ }
19
+
20
+ &:hover {
21
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
22
+ background-color: ${({ theme }) => theme.colors.baseBlue.light};
23
+ border-color: ${({ theme }) => theme.colors.baseBlue.dark20};
24
+ }
25
+ `
26
+
27
+ const errorStyles = css`
28
+ background-color: ${({ theme }) => theme.colors.baseRed.light08};
29
+ color: ${({ theme }) => theme.colors.baseRed.light30};
30
+ border-color: ${({ theme }) => theme.colors.baseRed.light08};
31
+
32
+ &:hover {
33
+ background-color: ${({ theme }) => theme.colors.baseRed.dark};
34
+ color: ${({ theme }) => theme.colors.baseRed.dark30};
35
+ border-color: ${({ theme }) => theme.colors.baseRed.dark30};
36
+ }
37
+ `
38
+
39
+ export const DefaultButtonContainer = styled(BaseButton)<props>`
40
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
41
+ background-color: ${({ theme }) => theme.colors.baseBlue.light20};
42
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.dark20};
43
+
44
+ &:hover {
45
+ background-color: ${({ theme }) => theme.colors.baseBlue.light20};
46
+ color: ${({ theme }) => theme.colors.baseBlue.base};
47
+ border-color: ${({ theme }) => theme.colors.baseBlue.base};
48
+ }
49
+
50
+ ${({ $isActive }) => $isActive && activeStyles}
51
+
52
+ ${({ $isError }) => $isError && errorStyles}
53
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { DefaultButtonContainer } from './DefaultButton.styles'
5
+
6
+ type props = { variant: 'default' } & ButtonVariantMap['default']
7
+
8
+ export default function DefaultButton(props: props) {
9
+ return <DefaultButtonContainer $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,52 @@
1
+ import { css, styled } from 'styled-components'
2
+ import { BaseButton } from '../../Base/BaseButton'
3
+
4
+ type props = {
5
+ $isActive?: boolean
6
+ $isError?: boolean
7
+ }
8
+
9
+ const activeStyles = css`
10
+ color: ${({ theme }) => theme.colors.baseBlue.light20};
11
+ background-color: transparent;
12
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.light20};
13
+
14
+ box-shadow: 0px 0px 10px 1px ${({ theme }) => theme.colors.baseBlue.light50};
15
+
16
+ svg {
17
+ color: inherit;
18
+ }
19
+
20
+ &:hover {
21
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
22
+ background-color: ${({ theme }) => theme.colors.baseBlue.light};
23
+ border-color: transparent;
24
+ }
25
+ `
26
+
27
+ const errorStyles = css`
28
+ color: ${({ theme }) => theme.colors.baseRed.light40};
29
+ background-color: transparent;
30
+ border: 2px solid transparent;
31
+
32
+ &:hover {
33
+ background-color: ${({ theme }) => theme.colors.baseRed.light04};
34
+ color: ${({ theme }) => theme.colors.baseRed.light40};
35
+ border-color: transparent;
36
+ }
37
+ `
38
+
39
+ export const GhostButtonContainer = styled(BaseButton)<props>`
40
+ color: ${({ theme }) => theme.colors.baseBlue.base};
41
+ background-color: transparent;
42
+ border: 2px solid transparent;
43
+
44
+ &:hover {
45
+ background-color: ${({ theme }) => theme.colors.baseBlue.base};
46
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
47
+ border-color: transparent;
48
+ }
49
+
50
+ ${({ $isActive }) => $isActive && activeStyles}
51
+ ${({ $isError }) => $isError && errorStyles}
52
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { GhostButtonContainer } from './GhostButton.styles'
5
+
6
+ type props = { variant: 'ghost' } & ButtonVariantMap['ghost']
7
+
8
+ export default function GhostButton(props: props) {
9
+ return <GhostButtonContainer $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,52 @@
1
+ import { theme } from '@/styles/theme'
2
+ import { css, styled } from 'styled-components'
3
+ import { BaseButton } from '../../Base/BaseButton'
4
+
5
+ type props = {
6
+ $isActive?: boolean
7
+ $isError?: boolean
8
+ }
9
+
10
+ export const activeStyles = css`
11
+ color: ${({ theme }) => theme.colors.baseBlue.light40};
12
+ background-image: linear-gradient(180deg, ${theme.colors.baseBlue.light30}, ${theme.colors.baseBlue.dark30});
13
+ border: 2px solid ${theme.colors.baseBlue.light30};
14
+
15
+ svg {
16
+ color: inherit;
17
+ }
18
+
19
+ &:hover {
20
+ background-image: linear-gradient(180deg, ${theme.colors.baseBlue.dark30}, ${theme.colors.baseBlue.light30});
21
+ color: ${theme.colors.baseBlue.dark40};
22
+ border-color: ${theme.colors.baseBlue.base};
23
+ }
24
+ `
25
+
26
+ export const errorStyles = css`
27
+ background-image: linear-gradient(180deg, ${theme.colors.baseRed.light08}, ${theme.colors.baseRed.dark});
28
+ color: ${({ theme }) => theme.colors.baseRed.light30};
29
+ border-color: ${({ theme }) => theme.colors.baseRed.light08};
30
+
31
+ &:hover {
32
+ background-image: linear-gradient(180deg, ${theme.colors.baseRed.dark}, ${theme.colors.baseRed.light08});
33
+ color: ${({ theme }) => theme.colors.baseRed.light40};
34
+ border-color: ${({ theme }) => theme.colors.baseRed.light40};
35
+ }
36
+ `
37
+
38
+ export const GradientButtonContainer = styled(BaseButton)<props>`
39
+ color: ${({ theme }) => theme.colors.baseBlue.light30};
40
+ background-image: linear-gradient(180deg, ${theme.colors.baseBlue.light}, ${theme.colors.baseBlue.dark});
41
+ border: 2px solid ${theme.colors.baseBlue.light02};
42
+
43
+ &:hover {
44
+ background-image: linear-gradient(180deg, ${theme.colors.baseBlue.dark}, ${theme.colors.baseBlue.light});
45
+ color: ${theme.colors.baseBlue.dark30};
46
+ border-color: ${theme.colors.baseBlue.base};
47
+ }
48
+
49
+ ${({ $isActive }) => $isActive && activeStyles}
50
+
51
+ ${({ $isError }) => $isError && errorStyles}
52
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { GradientButtonContainer } from './GradientButton.styles'
5
+
6
+ type props = { variant: 'gradient' } & ButtonVariantMap['gradient']
7
+
8
+ export default function GradientButton(props: props) {
9
+ return <GradientButtonContainer $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,55 @@
1
+ import { theme } from '@/styles/theme'
2
+ import { css, styled } from 'styled-components'
3
+ import { BaseButton } from '../../Base/BaseButton'
4
+
5
+ type props = {
6
+ $isActive?: boolean
7
+ $isError?: boolean
8
+ }
9
+
10
+ const activeStyles = css`
11
+ color: ${theme.colors.baseBlue.light20};
12
+ text-decoration: underline;
13
+
14
+ svg {
15
+ color: inherit;
16
+ }
17
+
18
+ &:hover {
19
+ color: ${theme.colors.baseBlue.light30};
20
+ }
21
+ `
22
+
23
+ const errorStyles = css`
24
+ color: ${theme.colors.baseRed.light30};
25
+
26
+ &:hover {
27
+ color: ${theme.colors.baseRed.light20};
28
+ text-decoration: underline;
29
+ }
30
+ `
31
+
32
+ export const LinkButtonContainer = styled(BaseButton)<props>`
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ text-decoration: none;
37
+
38
+ color: ${theme.colors.baseBlue.base};
39
+ background-color: transparent;
40
+ border: none;
41
+
42
+ &:hover {
43
+ color: ${theme.colors.baseBlue.base};
44
+ background-color: transparent;
45
+ border: none;
46
+
47
+ text-decoration: underline;
48
+ color: ${theme.colors.baseBlue.light30};
49
+ transition: all 0.3s ease;
50
+ }
51
+
52
+ ${({ $isActive }) => $isActive && activeStyles}
53
+
54
+ ${({ $isError }) => $isError && errorStyles}
55
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { LinkButtonContainer } from './LinkButton.styles'
5
+
6
+ type props = { variant: 'link' } & ButtonVariantMap['link']
7
+
8
+ export default function LinkButton(props: props) {
9
+ return <LinkButtonContainer data-testid="link-button" $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,57 @@
1
+ import { theme, themeConfig } from '@/styles/theme'
2
+ import { css, styled } from 'styled-components'
3
+ import { BaseButton } from '../../Base/BaseButton'
4
+
5
+ type props = {
6
+ $isActive?: boolean
7
+ $isError?: boolean
8
+ }
9
+
10
+ const activeStyles = css`
11
+ color: ${theme.colors.baseBlue.dark50};
12
+ background-image: linear-gradient(70deg, ${themeConfig.neon.colors.neonPink.base}, ${themeConfig.neon.colors.neonBlue.base});
13
+ border: 2px solid ${themeConfig.neon.colors.neonBlue.base};
14
+
15
+ box-shadow: 0 0 13px ${themeConfig.neon.colors.neonBlue.base};
16
+
17
+ svg {
18
+ color: inherit;
19
+ }
20
+
21
+ &:hover {
22
+ background-image: linear-gradient(380deg, ${themeConfig.neon.colors.neonBlue.base}, ${themeConfig.neon.colors.neonPink.base});
23
+ color: ${theme.colors.baseBlue.dark50};
24
+ border-color: ${themeConfig.neon.colors.neonBlue.base};
25
+ box-shadow: 0 0 10px ${themeConfig.neon.colors.neonBlue.base};
26
+ }
27
+ `
28
+
29
+ const errorStyles = css`
30
+ background-image: linear-gradient(70deg, ${themeConfig.neon.colors.neonBlue.base}, ${theme.colors.baseRed.dark});
31
+ color: ${themeConfig.neon.colors.neonRed.soft};
32
+ border-color: ${themeConfig.neon.colors.neonBlue.base};
33
+
34
+ &:hover {
35
+ background-image: linear-gradient(380deg, ${theme.colors.baseRed.dark}, ${themeConfig.neon.colors.neonBlue.base});
36
+ color: ${theme.colors.baseRed.light40};
37
+ border-color: ${themeConfig.neon.colors.neonRed.base};
38
+ box-shadow: 0 0 15px ${themeConfig.neon.colors.neonRed.base};
39
+ }
40
+ `
41
+
42
+ export const NeonButtonContainer = styled(BaseButton)<props>`
43
+ color: ${theme.colors.baseBlue.dark50};
44
+ background-image: linear-gradient(70deg, ${themeConfig.neon.colors.neonPink.base}, ${themeConfig.neon.colors.neonBlue.base});
45
+ border: 2px solid ${themeConfig.neon.colors.neonBlue.base};
46
+
47
+ &:hover {
48
+ background-image: linear-gradient(380deg, ${themeConfig.neon.colors.neonBlue.base}, ${themeConfig.neon.colors.neonPink.base});
49
+ color: ${theme.colors.baseBlue.dark50};
50
+ border-color: ${themeConfig.neon.colors.neonBlue.base};
51
+ box-shadow: 0 0 10px ${themeConfig.neon.colors.neonBlue.base};
52
+ }
53
+
54
+ ${({ $isActive }) => $isActive && activeStyles}
55
+
56
+ ${({ $isError }) => $isError && errorStyles}
57
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { NeonButtonContainer } from './NeonButton.styles'
5
+
6
+ type props = { variant: 'neon' } & ButtonVariantMap['neon']
7
+
8
+ export default function NeonButton(props: props) {
9
+ return <NeonButtonContainer $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,53 @@
1
+ import { css, styled } from 'styled-components'
2
+ import { BaseButton } from '../../Base/BaseButton'
3
+
4
+ type props = {
5
+ $isActive?: boolean
6
+ $isError?: boolean
7
+ }
8
+
9
+ const activeStyles = css`
10
+ color: ${({ theme }) => theme.colors.baseBlue.light20};
11
+ background-color: ${({ theme }) => theme.colors.baseBlue.dark02};
12
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.light20};
13
+
14
+ box-shadow: 0px 0px 10px 1px ${({ theme }) => theme.colors.baseBlue.base};
15
+
16
+ svg {
17
+ color: inherit;
18
+ }
19
+
20
+ &:hover {
21
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
22
+ background-color: ${({ theme }) => theme.colors.baseBlue.light08};
23
+ border-color: ${({ theme }) => theme.colors.baseBlue.dark08};
24
+ }
25
+ `
26
+
27
+ const errorStyles = css`
28
+ background-color: transparent;
29
+ color: ${({ theme }) => theme.colors.baseRed.light30};
30
+ border-color: ${({ theme }) => theme.colors.baseRed.light08};
31
+
32
+ &:hover {
33
+ background-color: ${({ theme }) => theme.colors.baseRed.light04};
34
+ color: ${({ theme }) => theme.colors.baseRed.light40};
35
+ border-color: ${({ theme }) => theme.colors.baseRed.light40};
36
+ }
37
+ `
38
+
39
+ export const OutlineButtonContainer = styled(BaseButton)<props>`
40
+ color: ${({ theme }) => theme.colors.baseBlue.base};
41
+ background-color: transparent;
42
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.base};
43
+
44
+ &:hover {
45
+ background-color: ${({ theme }) => theme.colors.baseBlue.base};
46
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
47
+ border-color: ${({ theme }) => theme.colors.baseBlue.dark20};
48
+ }
49
+
50
+ ${({ $isActive }) => $isActive && activeStyles}
51
+
52
+ ${({ $isError }) => $isError && errorStyles}
53
+ `
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { OutlineButtonContainer } from './OutlineButton.styles'
5
+
6
+ type Props = { variant: 'outline' } & ButtonVariantMap['outline']
7
+
8
+ export default function OutlineButton(props: Props) {
9
+ return <OutlineButtonContainer $isActive={props.$isActive} $isError={props.state === 'error'} {...props} />
10
+ }
@@ -0,0 +1,70 @@
1
+ import { transitions } from '@/styles/animations'
2
+ import { css, styled } from 'styled-components'
3
+ import { BaseButtonContainer } from '../../Base/BaseButton.styles'
4
+
5
+ type props = {
6
+ $isActive?: boolean
7
+ }
8
+
9
+ const activeStyles = css`
10
+ color: ${({ theme }) => theme.colors.baseBlue.light20};
11
+ background-color: ${({ theme }) => theme.colors.baseBlue.dark02};
12
+ border: 2px solid ${({ theme }) => theme.colors.baseBlue.light20};
13
+
14
+ box-shadow: 0px 0px 10px 1px ${({ theme }) => theme.colors.baseBlue.base};
15
+
16
+ svg {
17
+ color: inherit;
18
+ }
19
+
20
+ &:hover {
21
+ color: ${({ theme }) => theme.colors.baseBlue.dark20};
22
+ background-color: ${({ theme }) => theme.colors.baseBlue.light08};
23
+ border-color: ${({ theme }) => theme.colors.baseBlue.dark08};
24
+ }
25
+ `
26
+
27
+ export const ToggleWrapper = styled.div`
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ flex-direction: column;
32
+ gap: 8px;
33
+ `
34
+
35
+ export const ToggleButtonContainer = styled(BaseButtonContainer)<props>`
36
+ background-color: ${({ theme, $isActive }) => ($isActive ? theme.colors.baseBlue.light30 : theme.colors.baseBlack.light20)};
37
+ border: 2px solid ${({ theme, $isActive }) => ($isActive ? theme.colors.baseBlue.base : theme.colors.baseBlack.base)};
38
+ width: 44px;
39
+ height: 24px;
40
+ border-radius: 999px;
41
+ position: relative;
42
+ padding: 0;
43
+
44
+ ${transitions.slow}
45
+
46
+ &::before {
47
+ content: '';
48
+ position: absolute;
49
+ top: 50%;
50
+ left: 2px;
51
+ transform: ${({ $isActive }) => ($isActive ? 'translate(20px, -50%)' : 'translate(0, -50%)')};
52
+ width: 18px;
53
+ height: 18px;
54
+ border-radius: 50%;
55
+ background-color: ${({ theme, $isActive }) => ($isActive ? theme.colors.baseBlue.light20 : theme.colors.baseBlack.base)};
56
+
57
+ ${transitions.slow}
58
+ }
59
+
60
+ &:hover:not(:disabled) {
61
+ transform: scale(1.05);
62
+ background-color: ${({ theme, $isActive }) => ($isActive ? theme.colors.baseBlue.light04 : theme.colors.baseBlack.light20)};
63
+ }
64
+
65
+ &:active:not(:disabled) {
66
+ transform: scale(0.98);
67
+ }
68
+
69
+ ${({ $isActive }) => $isActive && activeStyles}
70
+ `
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+
3
+ import { ButtonVariantMap } from '../../MaskedButton.types'
4
+ import { ToggleButtonContainer, ToggleWrapper } from './ToggleButton.styles'
5
+
6
+ type Props = { variant: "toggle" } & ButtonVariantMap['toggle']
7
+
8
+ export default function ToggleButton(props: Props) {
9
+ return (
10
+ <ToggleWrapper>
11
+ {props.$toggleLabel}
12
+ <ToggleButtonContainer $isActive={props.$isActive} {...props} />
13
+ </ToggleWrapper>
14
+ )
15
+ }
@@ -0,0 +1,44 @@
1
+ 'use client'
2
+
3
+ import { FormikCurrencyInput } from './formikVariants/FormikCurrencyInput'
4
+ import { FormikFileInput } from './formikVariants/FormikFileInput'
5
+ import { FormikMaskedTextInput } from './formikVariants/FormikMaskedTextInput'
6
+ import { FormikPasswordInput } from './formikVariants/FormikPasswordInput'
7
+ import { FormikSearchInput } from './formikVariants/FormikSearchInput'
8
+ import { FormikSelectInput } from './formikVariants/FormikSelectInput'
9
+ import { FormikTextareaInput } from './formikVariants/FormikTextareaInput'
10
+ import { FormikTextInput } from './formikVariants/FormikTextInput'
11
+ import { InputProps } from './MaskedInput.types'
12
+
13
+ type Props = InputProps & { name: string }
14
+
15
+ export function FormikMInput(props: Props) {
16
+ switch (props.variant) {
17
+ case 'default':
18
+ return <FormikTextInput {...props} />
19
+
20
+ case 'textarea':
21
+ return <FormikTextareaInput {...props} />
22
+
23
+ case 'masked':
24
+ return <FormikMaskedTextInput {...props} />
25
+
26
+ case 'password':
27
+ return <FormikPasswordInput {...props} />
28
+
29
+ case 'select':
30
+ return <FormikSelectInput {...props} />
31
+
32
+ case 'file':
33
+ return <FormikFileInput {...props} />
34
+
35
+ case 'search':
36
+ return <FormikSearchInput {...props} />
37
+
38
+ case 'currency':
39
+ return <FormikCurrencyInput {...props} />
40
+
41
+ default:
42
+ return null
43
+ }
44
+ }