@npm_leadtech/legal-lib-components 7.42.2 → 7.43.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 (78) hide show
  1. package/dist/css/styles.css +3 -0
  2. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.d.ts +3 -0
  3. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.js +5 -0
  4. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.styled.d.ts +1 -0
  5. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.styled.js +46 -0
  6. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.styled.ts +47 -0
  7. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCard.tsx +20 -0
  8. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCardProps.d.ts +5 -0
  9. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCardProps.js +1 -0
  10. package/dist/src/components/molecules/LawGeniusInfoCard/LawGeniusInfoCardProps.ts +5 -0
  11. package/dist/src/components/molecules/LawGeniusInfoCard/index.d.ts +2 -0
  12. package/dist/src/components/molecules/LawGeniusInfoCard/index.js +2 -0
  13. package/dist/src/components/molecules/LawGeniusInfoCard/index.ts +2 -0
  14. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.js +2 -2
  15. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.d.ts +1 -6
  16. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.js +121 -231
  17. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.styled.ts +119 -238
  18. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCard.tsx +5 -5
  19. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCardProps.types.d.ts +0 -2
  20. package/dist/src/components/molecules/SubtypeDocumentCard/SubtypeDocumentCardProps.types.ts +0 -3
  21. package/dist/src/components/molecules/SubtypeDocumentCard/index.d.ts +1 -1
  22. package/dist/src/components/molecules/SubtypeDocumentCard/index.ts +1 -1
  23. package/dist/src/components/molecules/TextInput/Input.d.ts +1 -1
  24. package/dist/src/components/molecules/TextInput/Input.js +2 -1
  25. package/dist/src/components/molecules/TextInput/Input.tsx +3 -2
  26. package/dist/src/components/molecules/TextInput/TextInput.scss +4 -0
  27. package/dist/src/components/molecules/TextInput/TextInputProps.types.d.ts +1 -1
  28. package/dist/src/components/molecules/TextInput/TextInputProps.types.ts +1 -1
  29. package/dist/src/components/molecules/TextInput/stories/TextInput.stories.tsx +10 -0
  30. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContent.js +5 -2
  31. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContent.styled.js +35 -2
  32. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContent.styled.ts +35 -2
  33. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContent.tsx +7 -2
  34. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContentProps.types.d.ts +4 -1
  35. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContentProps.types.js +2 -0
  36. package/dist/src/components/organisms/TryOurFreeLegalBlogsContent/TryOurFreeLegalBlogsContentProps.types.ts +4 -1
  37. package/dist/src/components/pages/HowItWorksPage/HowItWorksPage.d.ts +3 -0
  38. package/dist/src/components/pages/HowItWorksPage/HowItWorksPage.js +5 -0
  39. package/dist/src/components/pages/HowItWorksPage/HowItWorksPage.tsx +26 -0
  40. package/dist/src/components/pages/HowItWorksPage/HowItWorksPageProps.d.ts +10 -0
  41. package/dist/src/components/pages/HowItWorksPage/HowItWorksPageProps.js +1 -0
  42. package/dist/src/components/pages/HowItWorksPage/HowItWorksPageProps.ts +16 -0
  43. package/dist/src/components/pages/HowItWorksPage/index.d.ts +2 -0
  44. package/dist/src/components/pages/HowItWorksPage/index.js +2 -0
  45. package/dist/src/components/pages/HowItWorksPage/index.ts +2 -0
  46. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.d.ts +4 -0
  47. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.js +12 -0
  48. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.styled.d.ts +1 -0
  49. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.styled.js +118 -0
  50. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.styled.ts +119 -0
  51. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSection.tsx +70 -0
  52. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSectionProps.types.d.ts +15 -0
  53. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSectionProps.types.js +1 -0
  54. package/dist/src/components/sections/LawGeniusCardsSection/LawGeniusCardsSectionProps.types.ts +16 -0
  55. package/dist/src/components/sections/LawGeniusCardsSection/index.d.ts +2 -0
  56. package/dist/src/components/sections/LawGeniusCardsSection/index.js +1 -0
  57. package/dist/src/components/sections/LawGeniusCardsSection/index.ts +2 -0
  58. package/dist/src/components/sections/TryNowSection/TryNowSection.d.ts +3 -0
  59. package/dist/src/components/sections/TryNowSection/TryNowSection.js +6 -0
  60. package/dist/src/components/sections/TryNowSection/TryNowSection.styled.d.ts +1 -0
  61. package/dist/src/components/sections/TryNowSection/TryNowSection.styled.js +190 -0
  62. package/dist/src/components/sections/TryNowSection/TryNowSection.styled.ts +191 -0
  63. package/dist/src/components/sections/TryNowSection/TryNowSection.tsx +27 -0
  64. package/dist/src/components/sections/TryNowSection/TryNowSectionProps.d.ts +8 -0
  65. package/dist/src/components/sections/TryNowSection/TryNowSectionProps.js +1 -0
  66. package/dist/src/components/sections/TryNowSection/TryNowSectionProps.ts +9 -0
  67. package/dist/src/components/sections/TryNowSection/index.d.ts +2 -0
  68. package/dist/src/components/sections/TryNowSection/index.js +1 -0
  69. package/dist/src/components/sections/TryNowSection/index.ts +2 -0
  70. package/dist/src/components/sections/TryOurFreeLegalBlogsSection/TryOurFreeLegalBlogsSection.js +9 -1
  71. package/dist/src/components/sections/TryOurFreeLegalBlogsSection/TryOurFreeLegalBlogsSection.styled.js +30 -0
  72. package/dist/src/components/sections/TryOurFreeLegalBlogsSection/TryOurFreeLegalBlogsSection.styled.ts +30 -0
  73. package/dist/src/components/sections/TryOurFreeLegalBlogsSection/TryOurFreeLegalBlogsSection.tsx +11 -1
  74. package/dist/src/components/sections/index.d.ts +3 -0
  75. package/dist/src/components/sections/index.js +3 -0
  76. package/dist/src/components/sections/index.ts +3 -0
  77. package/dist/tsconfig.build.tsbuildinfo +1 -1
  78. package/package.json +2 -1
@@ -1,281 +1,162 @@
1
+ import { device, size } from '../../../globalStyles/breakpoints'
1
2
  import styled from 'styled-components'
2
3
 
3
- import { device, size } from '../../../globalStyles/breakpoints'
4
+ export const SubtypeDocumentCardStyled = styled.div`
5
+ display: flex;
6
+ flex-direction: column;
7
+ width: 100%;
8
+ align-items: center;
9
+ justify-content: center;
10
+ width: 100%;
11
+ max-width: 376px;
12
+ min-height: 600px;
13
+ padding: 2rem 1.5rem 2rem 1.5rem;
14
+ gap: 24px;
15
+ border-radius: var(--s-border-radius) 0 0 0;
16
+ opacity: 0px;
17
+ box-shadow: 0px 2px 6px 0px var(--neutral-neutral-3);
18
+ background-color: var(--secondary-main-light-5);
19
+ margin-bottom: 1.5rem;
20
+
21
+ .image-container {
22
+ width: 70%;
23
+ }
24
+
25
+ @media (min-width: ${size.xs}) {
26
+ width: 400px;
27
+ max-width: inherit;
28
+ }
29
+
30
+ @media (min-width: ${size.md}) {
31
+ width: 543px;
32
+ height: 364px;
33
+ min-height: 380px;
34
+ align-items: flex-start;
35
+ flex-direction: row;
4
36
 
5
- import { SubtypeDocumentCardFormat } from './SubtypeDocumentCardProps.types'
37
+ .image-container {
38
+ width: 40%;
39
+
40
+ @media (min-width: ${size.lg}) {
41
+ width: 30%;
42
+ }
43
+ }
44
+ }
6
45
 
7
- interface SubtypeDocumentCardStyledProps {
8
- $format: SubtypeDocumentCardFormat
9
- }
46
+ @media (min-width: ${size.lg}) {
47
+ width: 715px;
48
+ height: 307px;
49
+ min-height: 335px;
50
+ }
10
51
 
11
- export const SubtypeDocumentCardStyled = styled.div<SubtypeDocumentCardStyledProps>`
12
- /* Default format styles (original styles) */
13
- ${({ $format }) =>
14
- $format === 'Default' &&
15
- `
52
+ .content {
16
53
  display: flex;
17
54
  flex-direction: column;
55
+ height: 100%;
18
56
  width: 100%;
19
- align-items: center;
20
- justify-content: center;
21
- width: 100%;
22
- max-width: 376px;
23
- min-height: 600px;
24
- padding: 2rem 1.5rem 2rem 1.5rem;
25
- gap: 24px;
26
- border-radius: var(--s-border-radius) 0 0 0;
27
- opacity: 0px;
28
- box-shadow: 0px 2px 6px 0px var(--neutral-neutral-3);
29
- background-color: var(--secondary-main-light-5);
30
- margin-bottom: 1.5rem;
31
-
32
- .image-container {
33
- width: 70%;
34
- }
57
+ justify-content: flex-start;
35
58
 
36
- @media (min-width: ${size.xs}) {
37
- width: 400px;
38
- max-width: inherit;
59
+ @media ${device['landscape-tablets']} {
60
+ margin-left: 1rem;
39
61
  }
40
62
 
41
63
  @media (min-width: ${size.md}) {
42
- width: 543px;
43
- height: 364px;
44
- min-height: 380px;
45
- align-items: flex-start;
46
- flex-direction: row;
47
-
48
- .image-container {
49
- width: 40%;
50
-
51
- @media (min-width: ${size.lg}) {
52
- width: 30%;
53
- }
54
- }
64
+ width: 65%;
55
65
  }
66
+ }
67
+
68
+ .title {
69
+ font-family: Inter;
70
+ font-size: 18px;
71
+ font-weight: 700;
72
+ line-height: 24px;
73
+ letter-spacing: -0.3px;
74
+ text-align: left;
75
+ text-decoration-line: underline;
76
+ text-decoration-style: solid;
77
+ text-underline-position: from-font;
78
+ text-decoration-skip-ink: none;
79
+ }
80
+
81
+ .description {
82
+ margin: 1rem 0;
83
+ }
84
+
85
+ .buttons-container {
86
+ display: flex;
87
+ justify-content: space-between;
88
+ align-items: center;
89
+ flex-direction: column;
56
90
 
57
- @media (min-width: ${size.lg}) {
58
- width: 715px;
59
- height: 307px;
60
- min-height: 335px;
91
+ @media ${device.desktop} {
92
+ flex-direction: row;
93
+ align-self: flex-start;
94
+ gap: var(--global-gap);
95
+ align-items: center;
61
96
  }
62
97
 
63
- .content {
64
- display: flex;
65
- flex-direction: column;
66
- height: 100%;
98
+ .create-doc-button {
67
99
  width: 100%;
68
- justify-content: flex-start;
69
100
 
70
- @media ${device['landscape-tablets']} {
71
- margin-left: 1rem;
101
+ @media ${device.laptop} {
102
+ align-self: flex-start;
103
+ width: auto;
104
+ margin-top: 0.5rem;
72
105
  }
73
106
 
74
- @media (min-width: ${size.md}) {
75
- width: 65%;
107
+ @media ${device.desktop} {
108
+ width: 100%;
109
+ height: auto;
76
110
  }
77
111
  }
78
112
 
79
- .title {
80
- font-family: Inter;
81
- font-size: 18px;
82
- font-weight: 700;
83
- line-height: 24px;
84
- letter-spacing: -0.3px;
85
- text-align: left;
86
- text-decoration-line: underline;
87
- text-decoration-style: solid;
88
- text-underline-position: from-font;
89
- text-decoration-skip-ink: none;
90
- }
91
-
92
- .description {
93
- margin: 1rem 0;
94
- }
95
-
96
- .buttons-container {
113
+ .downloadable-buttons {
97
114
  display: flex;
115
+ flex-wrap: wrap;
116
+ gap: var(--global-gap);
117
+ width: 100%;
98
118
  justify-content: space-between;
99
- align-items: center;
100
- flex-direction: column;
101
119
 
102
- @media ${device.desktop} {
103
- flex-direction: row;
104
- align-self: flex-start;
105
- gap: var(--global-gap);
106
- align-items: center;
120
+ a {
121
+ min-width: 46.5%;
122
+ max-width: 46.5%;
123
+ margin-top: 0.75rem;
107
124
  }
108
125
 
109
- .create-doc-button {
126
+ @media ${device.laptop} {
127
+ justify-content: flex-start;
110
128
  width: 100%;
111
129
 
112
- @media ${device.laptop} {
113
- align-self: flex-start;
114
- width: auto;
115
- margin-top: 0.5rem;
116
- }
117
-
118
- @media ${device.desktop} {
119
- width: 100%;
120
- height: auto;
121
- }
122
- }
123
-
124
- .downloadable-buttons {
125
- display: flex;
126
- flex-wrap: wrap;
127
- gap: var(--global-gap);
128
- width: 100%;
129
- justify-content: space-between;
130
-
131
130
  a {
132
131
  min-width: 46.5%;
133
- max-width: 46.5%;
134
- margin-top: 0.75rem;
135
- }
136
-
137
- @media ${device.laptop} {
138
- justify-content: flex-start;
139
- width: 100%;
140
-
141
- a {
142
- min-width: 46.5%;
143
- max-width: fit-content;
144
- margin-top: 0.5rem;
145
- }
146
- }
147
-
148
- @media (min-width: ${size.lg}) {
149
- a {
150
- min-width: auto;
151
- max-width: fit-content;
152
- }
153
- }
154
-
155
- @media ${device.desktop} {
156
- display: flex;
157
- gap: var(--global-gap);
158
- flex-wrap: nowrap;
159
- margin-top: 0;
132
+ max-width: fit-content;
133
+ margin-top: 0.5rem;
160
134
  }
161
135
  }
162
- }
163
-
164
- &.download-icon {
165
- &::before {
166
- content: '';
167
- width: 1rem;
168
- height: 1rem;
169
- background-image: url('../../../assets/images/svg/icon-save-24-px.svg');
170
- margin-right: 0.5rem;
171
- }
172
- }
173
- `}
174
-
175
- /* Alternative format styles */
176
- ${({ $format }) =>
177
- $format === 'Alternative' &&
178
- `
179
- display: flex;
180
- flex-direction: row;
181
- width: 100%;
182
- align-items: center;
183
- justify-content: center;
184
- padding: 2rem 1.5rem 2rem 1.5rem;
185
- gap: 1rem;
186
- border-radius: 1rem;
187
- background-color: var(--neutral-neutral-6);
188
- margin-bottom: 1.5rem;
189
-
190
- .image-container {
191
- width: 70%;
192
- }
193
-
194
- @media (min-width: ${size.xs}) {
195
- width: 400px;
196
- max-width: inherit;
197
- }
198
-
199
- @media (min-width: ${size.md}) {
200
- align-items: center;
201
- flex-direction: column;
202
- width: 100%;
203
- max-width: 300px;
204
- .image-container {
205
- width: 40%;
206
136
 
207
- @media (min-width: ${size.lg}) {
208
- width: 30%;
137
+ @media (min-width: ${size.lg}) {
138
+ a {
139
+ min-width: auto;
140
+ max-width: fit-content;
209
141
  }
210
142
  }
211
- }
212
-
213
- @media (min-width: ${size.lg}) {
214
- height: 310px;
215
- }
216
-
217
- .title {
218
- font-family: Inter;
219
- font-size: 18px;
220
- font-weight: 700;
221
- line-height: 24px;
222
- margin-bottom: 24px;
223
- letter-spacing: -0.3px;
224
- text-align: left;
225
- text-decoration-line: underline;
226
- text-decoration-style: solid;
227
- text-underline-position: from-font;
228
- text-decoration-skip-ink: none;
229
- }
230
-
231
- .buttons-container {
232
- display: flex;
233
- justify-content: space-between;
234
- align-items: center;
235
- flex-direction: column;
236
143
 
237
144
  @media ${device.desktop} {
238
- flex-direction: row;
239
- align-self: flex-start;
240
- gap: var(--global-gap);
241
- align-items: center;
242
- }
243
-
244
- .downloadable-buttons {
245
145
  display: flex;
246
- flex-wrap: wrap;
247
- width: 100%;
248
- justify-content: space-between;
249
-
250
- a {
251
- margin-top: 0.75rem;
252
- width: 100%;
253
- }
254
-
255
- @media ${device.laptop} {
256
- justify-content: space-between;
257
- width: 95%;
258
- a {
259
- min-width: 46.5%;
260
- max-width: fit-content;
261
- margin-top: 0.5rem;
262
- }
263
- }
264
-
265
- @media (min-width: ${size.lg}) {
266
- a {
267
- min-width: auto;
268
- max-width: fit-content;
269
- }
270
- }
271
-
272
- @media ${device.desktop} {
273
- display: flex;
274
- gap: var(--global-gap);
275
- flex-wrap: nowrap;
276
- margin-top: 0;
277
- }
146
+ gap: var(--global-gap);
147
+ flex-wrap: nowrap;
148
+ margin-top: 0;
278
149
  }
279
150
  }
280
- `}
151
+ }
152
+
153
+ &.download-icon {
154
+ &::before {
155
+ content: '';
156
+ width: 1rem;
157
+ height: 1rem;
158
+ background-image: url('../../../assets/images/svg/icon-save-24-px.svg');
159
+ margin-right: 0.5rem;
160
+ }
161
+ }
281
162
  `
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
1
2
  import React, { type FC } from 'react'
2
3
 
3
4
  import { Button } from '../../atoms'
@@ -11,19 +12,18 @@ const SubtypeDocumentCard: FC<SubtypeDocumentCardProps> = ({
11
12
  children,
12
13
  pdfButton,
13
14
  wordButton,
14
- createDocButton,
15
- format = 'Default'
15
+ createDocButton
16
16
  }) => {
17
17
  return (
18
- <SubtypeDocumentCardStyled className='subtype-document-card' $format={format}>
18
+ <SubtypeDocumentCardStyled className='subtype-document-card'>
19
19
  <div className='image-container'>{children}</div>
20
20
  <div className='content'>
21
21
  <a href={productUrl}>
22
22
  <h3 className='title'>{title}</h3>
23
23
  </a>
24
- {format === 'Default' && <p className='description'>{description}</p>}
24
+ <p className='description'>{description}</p>
25
25
  <div className='buttons-container'>
26
- {format === 'Default' && <Button {...createDocButton} />}
26
+ <Button {...createDocButton} />
27
27
  <div className='downloadable-buttons'>
28
28
  <Button {...pdfButton} />
29
29
  <Button {...wordButton} />
@@ -1,5 +1,4 @@
1
1
  import { ButtonProps } from 'src/components/atoms';
2
- export type SubtypeDocumentCardFormat = 'Default' | 'Alternative';
3
2
  export interface SubtypeDocumentCardProps {
4
3
  title: string;
5
4
  productUrl: string;
@@ -8,5 +7,4 @@ export interface SubtypeDocumentCardProps {
8
7
  pdfButton: ButtonProps;
9
8
  wordButton: ButtonProps;
10
9
  createDocButton: ButtonProps;
11
- format?: SubtypeDocumentCardFormat;
12
10
  }
@@ -1,7 +1,5 @@
1
1
  import { ButtonProps } from 'src/components/atoms'
2
2
 
3
- export type SubtypeDocumentCardFormat = 'Default' | 'Alternative'
4
-
5
3
  export interface SubtypeDocumentCardProps {
6
4
  title: string
7
5
  productUrl: string
@@ -10,5 +8,4 @@ export interface SubtypeDocumentCardProps {
10
8
  pdfButton: ButtonProps
11
9
  wordButton: ButtonProps
12
10
  createDocButton: ButtonProps
13
- format?: SubtypeDocumentCardFormat
14
11
  }
@@ -1,2 +1,2 @@
1
1
  export { default as SubtypeDocumentCard } from './SubtypeDocumentCard';
2
- export { type SubtypeDocumentCardProps, type SubtypeDocumentCardFormat } from './SubtypeDocumentCardProps.types';
2
+ export { type SubtypeDocumentCardProps } from './SubtypeDocumentCardProps.types';
@@ -1,2 +1,2 @@
1
1
  export { default as SubtypeDocumentCard } from './SubtypeDocumentCard'
2
- export { type SubtypeDocumentCardProps, type SubtypeDocumentCardFormat } from './SubtypeDocumentCardProps.types'
2
+ export { type SubtypeDocumentCardProps } from './SubtypeDocumentCardProps.types'
@@ -3,7 +3,7 @@ interface InputProps {
3
3
  name: string;
4
4
  placeholder: string;
5
5
  prefix: string;
6
- maxLength: number;
6
+ maxLength?: number;
7
7
  value: string;
8
8
  type: 'password' | 'text' | 'number' | 'tel';
9
9
  disabled: boolean;
@@ -4,6 +4,7 @@ import eyeCloseIcon from '../../../../images/svg/eye-close.svg';
4
4
  import eyeIcon from '../../../../images/svg/eye-24-px.svg';
5
5
  import percent from '../../../../images/svg/percent.svg';
6
6
  export const Input = React.forwardRef(({ value, name, placeholder, className, onChange, onClick, onBlur, onKeyDown, onKeyUp, disabled, type = 'text', maxLength, country, prefix, currrencySymbol }, ref) => {
7
+ const isShortInput = Boolean(maxLength && maxLength <= 5);
7
8
  const [hidden, setHidden] = useState(true);
8
9
  const showPassword = () => {
9
10
  if (value !== null)
@@ -23,7 +24,7 @@ export const Input = React.forwardRef(({ value, name, placeholder, className, on
23
24
  else if (isPercent) {
24
25
  finalClassName += ' has-percent-suffix';
25
26
  }
26
- return (_jsxs(_Fragment, { children: [isCurrency && !!prefix && otherCurrency && currrencySymbol && (_jsx("div", { className: 'input-icon-currency-prefix', children: _jsx("span", { children: currrencySymbol }) })), _jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: finalClassName, maxLength: maxLength, placeholder: placeholder, onChange: onChange, onClick: onClick, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onBlur: onBlur, value: value, "data-qa": name, disabled: disabled, ref: ref }), type === 'password' && (_jsx("button", { type: 'button', className: 'input-icon-password-button', onClick: showPassword, onKeyDown: (e) => {
27
+ return (_jsxs(_Fragment, { children: [isCurrency && !!prefix && otherCurrency && currrencySymbol && (_jsx("div", { className: 'input-icon-currency-prefix', children: _jsx("span", { children: currrencySymbol }) })), _jsx("input", { type: !hidden && type === 'password' ? 'text' : type, name: name, id: name, className: `${finalClassName} ${isShortInput ? 'e-text-input__short' : ''}`, maxLength: maxLength, placeholder: placeholder, onChange: onChange, onClick: onClick, onKeyDown: onKeyDown, onKeyUp: onKeyUp, onBlur: onBlur, value: value, "data-qa": name, disabled: disabled, ref: ref }), type === 'password' && (_jsx("button", { type: 'button', className: 'input-icon-password-button', onClick: showPassword, onKeyDown: (e) => {
27
28
  if (e.key === 'Enter')
28
29
  showPassword();
29
30
  }, children: _jsx("img", { src: hidden ? eyeIcon : eyeCloseIcon, alt: '' }) })), isCurrency
@@ -8,7 +8,7 @@ interface InputProps {
8
8
  name: string
9
9
  placeholder: string
10
10
  prefix: string
11
- maxLength: number
11
+ maxLength?: number
12
12
  value: string
13
13
  type: 'password' | 'text' | 'number' | 'tel'
14
14
  disabled: boolean
@@ -43,6 +43,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
43
43
  }: InputProps,
44
44
  ref
45
45
  ) => {
46
+ const isShortInput = Boolean(maxLength && maxLength <= 5)
46
47
  const [hidden, setHidden] = useState(true)
47
48
 
48
49
  const showPassword = (): void => {
@@ -75,7 +76,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
75
76
  type={!hidden && type === 'password' ? 'text' : type}
76
77
  name={name}
77
78
  id={name}
78
- className={finalClassName}
79
+ className={`${finalClassName} ${isShortInput ? 'e-text-input__short' : ''}`}
79
80
  maxLength={maxLength}
80
81
  placeholder={placeholder}
81
82
  onChange={onChange}
@@ -10,6 +10,10 @@
10
10
  margin-bottom: 1rem;
11
11
  position: relative;
12
12
 
13
+ .e-text-input__short {
14
+ width: 50%;
15
+ }
16
+
13
17
  input {
14
18
  -webkit-appearance: none;
15
19
  -moz-appearance: none;
@@ -9,7 +9,7 @@ export interface TextInputProps {
9
9
  mask?: string;
10
10
  format?: string;
11
11
  notes?: string;
12
- maxLength?: any;
12
+ maxLength?: number;
13
13
  value?: any;
14
14
  type?: 'password' | 'text' | 'number' | 'tel';
15
15
  validate?: boolean;
@@ -10,7 +10,7 @@ export interface TextInputProps {
10
10
  mask?: string
11
11
  format?: string
12
12
  notes?: string
13
- maxLength?: any
13
+ maxLength?: number
14
14
  value?: any
15
15
  type?: 'password' | 'text' | 'number' | 'tel'
16
16
  validate?: boolean
@@ -167,3 +167,13 @@ export const WithPrefixPercent: Story = {
167
167
  country: 'CA'
168
168
  }
169
169
  }
170
+
171
+ export const SmallMaxLength: Story = {
172
+ args: {
173
+ value: '',
174
+ name: 'Type of property',
175
+ label: 'Type of property',
176
+ type: 'text',
177
+ maxLength: 5
178
+ }
179
+ }
@@ -3,11 +3,14 @@ import { TryOurFreeLegalBlogsContentType } from './TryOurFreeLegalBlogsContentPr
3
3
  import { RichTextInner } from '../../atoms';
4
4
  import { TryOurFreeLegalBlogsContentStyled } from './TryOurFreeLegalBlogsContent.styled';
5
5
  import classNames from 'classnames';
6
- const TryOurFreeLegalBlogsContent = ({ title, image, children, type = TryOurFreeLegalBlogsContentType.default }) => {
6
+ const TryOurFreeLegalBlogsContent = ({ title, image, children, type = TryOurFreeLegalBlogsContentType.default, imageFirstOnMobile = false }) => {
7
7
  const classTry = classNames({
8
8
  'try-our-free-legal-blogs-section-content': true,
9
9
  'try-our-free-legal-blogs-section-content--our-mission': TryOurFreeLegalBlogsContentType.ourMission === type,
10
- 'try-our-free-legal-blogs-section-content--our-mission-first-image': TryOurFreeLegalBlogsContentType.ourMissionFirstImage === type
10
+ 'try-our-free-legal-blogs-section-content--our-mission-first-image': TryOurFreeLegalBlogsContentType.ourMissionFirstImage === type,
11
+ 'try-our-free-legal-blogs-section-content--how-it-works': TryOurFreeLegalBlogsContentType.howItWorks === type,
12
+ 'try-our-free-legal-blogs-section-content--how-it-works-first-image': TryOurFreeLegalBlogsContentType.howItWorksFirstImage === type,
13
+ 'try-our-free-legal-blogs-section-content--image-first-mobile': imageFirstOnMobile
11
14
  });
12
15
  return (_jsxs(TryOurFreeLegalBlogsContentStyled, { className: classTry, children: [_jsxs("div", { className: 'try-our-free-legal-blogs-section__texts', children: [_jsx("h2", { className: 'try-our-free-legal-blogs-section__texts__title', children: title }), _jsx(RichTextInner, { customClass: 'try-our-free-legal-blogs-section__texts__body', children: children })] }), _jsx("div", { className: 'try-our-free-legal-blogs-section__image', children: image })] }));
13
16
  };
@@ -7,7 +7,8 @@ export const TryOurFreeLegalBlogsContentStyled = styled.div `
7
7
  flex-direction: row;
8
8
  }
9
9
 
10
- &.try-our-free-legal-blogs-section-content--our-mission {
10
+ &.try-our-free-legal-blogs-section-content--our-mission,
11
+ &.try-our-free-legal-blogs-section-content--how-it-works {
11
12
  margin-top: 1.5rem;
12
13
  margin-bottom: 1.5rem;
13
14
  align-items: center;
@@ -30,7 +31,8 @@ export const TryOurFreeLegalBlogsContentStyled = styled.div `
30
31
  }
31
32
  }
32
33
 
33
- &.try-our-free-legal-blogs-section-content--our-mission-first-image {
34
+ &.try-our-free-legal-blogs-section-content--our-mission-first-image,
35
+ &.try-our-free-legal-blogs-section-content--how-it-works-first-image {
34
36
  margin-top: 1.5rem;
35
37
  margin-bottom: 1.5rem;
36
38
  align-items: center;
@@ -101,4 +103,35 @@ export const TryOurFreeLegalBlogsContentStyled = styled.div `
101
103
  .try-our-free-legal-blogs-section__image {
102
104
  flex-basis: 50%;
103
105
  }
106
+
107
+ &.try-our-free-legal-blogs-section-content--image-first-mobile {
108
+ .try-our-free-legal-blogs-section__texts {
109
+ order: 2;
110
+ @media ${device['landscape-tablets']} {
111
+ order: 1;
112
+ }
113
+ }
114
+
115
+ .try-our-free-legal-blogs-section__image {
116
+ order: 1;
117
+ margin-bottom: 2rem;
118
+ @media ${device['landscape-tablets']} {
119
+ order: 2;
120
+ margin-bottom: 0;
121
+ }
122
+ }
123
+ }
124
+
125
+ &.try-our-free-legal-blogs-section-content--how-it-works {
126
+ ul {
127
+ list-style-type: disc;
128
+ padding-left: 1.2rem;
129
+ li {
130
+ margin-bottom: 0;
131
+ a {
132
+ text-decoration: underline;
133
+ }
134
+ }
135
+ }
136
+ }
104
137
  `;