@pareto-engineering/design-system 2.0.0-alpha.53 → 2.0.0-alpha.56

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 (225) hide show
  1. package/dist/cjs/a/Alert/Alert.js +141 -0
  2. package/dist/cjs/a/Alert/index.js +15 -0
  3. package/dist/cjs/a/Alert/styles.scss +74 -0
  4. package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
  5. package/dist/cjs/a/GradientBackground/index.js +15 -0
  6. package/dist/cjs/a/GradientBackground/styles.scss +191 -0
  7. package/dist/cjs/a/Popover/common/Divider/Divider.js +67 -0
  8. package/dist/cjs/a/Popover/common/Divider/index.js +15 -0
  9. package/dist/cjs/a/Popover/common/Item/Item.js +67 -0
  10. package/dist/cjs/a/Popover/common/Item/index.js +15 -0
  11. package/dist/cjs/a/Popover/common/index.js +21 -0
  12. package/dist/cjs/a/index.js +9 -1
  13. package/dist/cjs/c/AcceptCookies/AcceptCookies.js +134 -0
  14. package/dist/cjs/c/AcceptCookies/index.js +15 -0
  15. package/dist/cjs/c/AcceptCookies/styles.scss +49 -0
  16. package/dist/cjs/c/BlogCategoryButton/BlogCategoryButton.js +95 -0
  17. package/dist/cjs/c/BlogCategoryButton/index.js +15 -0
  18. package/dist/cjs/c/BlogContext/BlogContextProvider.js +63 -0
  19. package/dist/cjs/c/BlogContext/Context.js +16 -0
  20. package/dist/cjs/c/BlogContext/ContextProvider.js +63 -0
  21. package/dist/cjs/c/BlogContext/index.js +31 -0
  22. package/dist/cjs/c/BlogContext/useBlog.js +16 -0
  23. package/dist/cjs/c/BlogPost/BlogPost.js +147 -0
  24. package/dist/cjs/c/BlogPost/index.js +15 -0
  25. package/dist/cjs/c/BlogPost/styles.scss +33 -0
  26. package/dist/cjs/c/BlogPostsList/BlogPostsList.js +73 -0
  27. package/dist/cjs/c/BlogPostsList/common/Card/Card.js +170 -0
  28. package/dist/cjs/c/BlogPostsList/common/Card/index.js +15 -0
  29. package/dist/cjs/c/BlogPostsList/common/index.js +13 -0
  30. package/dist/cjs/c/BlogPostsList/index.js +15 -0
  31. package/dist/cjs/c/BlogPostsList/styles.scss +72 -0
  32. package/dist/cjs/c/SiteFooter/SiteFooter.js +73 -0
  33. package/dist/cjs/c/SiteFooter/common/Section/Section.js +95 -0
  34. package/dist/cjs/c/SiteFooter/common/Section/index.js +15 -0
  35. package/dist/cjs/c/SiteFooter/common/index.js +13 -0
  36. package/dist/cjs/c/SiteFooter/index.js +15 -0
  37. package/dist/cjs/c/SiteFooter/styles.scss +34 -0
  38. package/dist/cjs/c/SiteHeaderCTA/SiteHeaderCTA.js +108 -0
  39. package/dist/cjs/c/SiteHeaderCTA/index.js +15 -0
  40. package/dist/cjs/c/SiteHeaderCTA/styles.scss +44 -0
  41. package/dist/cjs/c/SiteMission/SiteMission.js +113 -0
  42. package/dist/cjs/c/SiteMission/index.js +15 -0
  43. package/dist/cjs/c/SiteMission/styles.scss +30 -0
  44. package/dist/cjs/c/SiteNavigation/SiteNavigation.js +130 -0
  45. package/dist/cjs/c/SiteNavigation/index.js +15 -0
  46. package/dist/cjs/c/SiteNavigation/styles.scss +118 -0
  47. package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +98 -0
  48. package/dist/cjs/c/SiteOnboardingStep/index.js +15 -0
  49. package/dist/cjs/c/SiteOnboardingStep/styles.scss +51 -0
  50. package/dist/cjs/c/SitePricing/SitePricing.js +108 -0
  51. package/dist/cjs/c/SitePricing/index.js +15 -0
  52. package/dist/cjs/c/SitePricing/styles.scss +73 -0
  53. package/dist/cjs/c/SiteServices/SiteServices.js +211 -0
  54. package/dist/cjs/c/SiteServices/index.js +15 -0
  55. package/dist/cjs/c/SiteServices/styles.scss +138 -0
  56. package/dist/cjs/c/TeamGallery/TeamGallery.js +80 -0
  57. package/dist/cjs/c/TeamGallery/common/PersonCard/PersonCard.js +84 -0
  58. package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +15 -0
  59. package/dist/cjs/c/TeamGallery/common/index.js +13 -0
  60. package/dist/cjs/c/TeamGallery/index.js +15 -0
  61. package/dist/cjs/c/TeamGallery/styles.scss +100 -0
  62. package/dist/cjs/c/Testimonials/Testimonials.js +119 -0
  63. package/dist/cjs/c/Testimonials/index.js +15 -0
  64. package/dist/cjs/c/Testimonials/styles.scss +112 -0
  65. package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
  66. package/dist/cjs/experimental/GradientBackground/index.js +15 -0
  67. package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
  68. package/dist/cjs/experimental/index.js +13 -0
  69. package/dist/cjs/f/FormInput/FormInput.js +1 -1
  70. package/dist/cjs/f/common/Description/Description.js +20 -14
  71. package/dist/cjs/f/fields/CheckboxInput/CheckboxInput.js +105 -0
  72. package/dist/cjs/f/fields/CheckboxInput/index.js +15 -0
  73. package/dist/cjs/f/fields/CheckboxInput/styles.scss +28 -0
  74. package/dist/cjs/f/fields/IntlTelInput/IntlTelInput.js +170 -0
  75. package/dist/cjs/f/fields/IntlTelInput/index.js +15 -0
  76. package/dist/cjs/f/fields/IntlTelInput/styles.scss +37 -0
  77. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +0 -2
  78. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +5 -9
  79. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +5 -9
  80. package/dist/cjs/f/fields/QuerySelect/styles.scss +21 -0
  81. package/dist/cjs/f/fields/RadioInput/RadioInput.js +110 -0
  82. package/dist/cjs/f/fields/RadioInput/index.js +15 -0
  83. package/dist/cjs/f/fields/RadioInput/styles.scss +26 -0
  84. package/dist/cjs/f/fields/SelectInput/SelectInput.js +16 -8
  85. package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +129 -0
  86. package/dist/cjs/f/fields/TaskRecommendation/index.js +15 -0
  87. package/dist/cjs/f/fields/TaskRecommendation/styles.scss +37 -0
  88. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +131 -0
  89. package/dist/cjs/f/fields/TaskRecommendationInput/index.js +15 -0
  90. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +41 -0
  91. package/dist/cjs/f/fields/TextArea/TextArea.js +141 -0
  92. package/dist/cjs/f/fields/TextArea/index.js +15 -0
  93. package/dist/cjs/f/fields/TextArea/styles.scss +19 -0
  94. package/dist/cjs/f/fields/TextInput/TextInput.js +18 -9
  95. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +16 -8
  96. package/dist/cjs/test/QueryLoader/styles.scss +9 -0
  97. package/dist/es/a/Alert/Alert.js +118 -0
  98. package/dist/es/a/Alert/index.js +2 -0
  99. package/dist/es/a/Alert/styles.scss +74 -0
  100. package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
  101. package/dist/es/a/GradientBackground/index.js +2 -0
  102. package/dist/es/a/GradientBackground/styles.scss +191 -0
  103. package/dist/es/a/Popover/common/Divider/Divider.js +47 -0
  104. package/dist/es/a/Popover/common/Divider/index.js +2 -0
  105. package/dist/es/a/Popover/common/Item/Item.js +47 -0
  106. package/dist/es/a/Popover/common/Item/index.js +2 -0
  107. package/dist/es/a/Popover/common/index.js +2 -0
  108. package/dist/es/a/index.js +2 -1
  109. package/dist/es/c/AcceptCookies/AcceptCookies.js +117 -0
  110. package/dist/es/c/AcceptCookies/index.js +2 -0
  111. package/dist/es/c/AcceptCookies/styles.scss +49 -0
  112. package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +68 -0
  113. package/dist/es/c/BlogCategoryButton/index.js +2 -0
  114. package/dist/es/c/BlogContext/BlogContextProvider.js +45 -0
  115. package/dist/es/c/BlogContext/Context.js +2 -0
  116. package/dist/es/c/BlogContext/ContextProvider.js +45 -0
  117. package/dist/es/c/BlogContext/index.js +4 -0
  118. package/dist/es/c/BlogContext/useBlog.js +3 -0
  119. package/dist/es/c/BlogPost/BlogPost.js +128 -0
  120. package/dist/es/c/BlogPost/index.js +2 -0
  121. package/dist/es/c/BlogPost/styles.scss +33 -0
  122. package/dist/es/c/BlogPostsList/BlogPostsList.js +56 -0
  123. package/dist/es/c/BlogPostsList/common/Card/Card.js +143 -0
  124. package/dist/es/c/BlogPostsList/common/Card/index.js +2 -0
  125. package/dist/es/c/BlogPostsList/common/index.js +1 -0
  126. package/dist/es/c/BlogPostsList/index.js +2 -0
  127. package/dist/es/c/BlogPostsList/styles.scss +72 -0
  128. package/dist/es/c/SiteFooter/SiteFooter.js +56 -0
  129. package/dist/es/c/SiteFooter/common/Section/Section.js +73 -0
  130. package/dist/es/c/SiteFooter/common/Section/index.js +2 -0
  131. package/dist/es/c/SiteFooter/common/index.js +1 -0
  132. package/dist/es/c/SiteFooter/index.js +2 -0
  133. package/dist/es/c/SiteFooter/styles.scss +34 -0
  134. package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +92 -0
  135. package/dist/es/c/SiteHeaderCTA/index.js +2 -0
  136. package/dist/es/c/SiteHeaderCTA/styles.scss +44 -0
  137. package/dist/es/c/SiteMission/SiteMission.js +96 -0
  138. package/dist/es/c/SiteMission/index.js +2 -0
  139. package/dist/es/c/SiteMission/styles.scss +30 -0
  140. package/dist/es/c/SiteNavigation/SiteNavigation.js +111 -0
  141. package/dist/es/c/SiteNavigation/index.js +2 -0
  142. package/dist/es/c/SiteNavigation/styles.scss +118 -0
  143. package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +81 -0
  144. package/dist/es/c/SiteOnboardingStep/index.js +2 -0
  145. package/dist/es/c/SiteOnboardingStep/styles.scss +51 -0
  146. package/dist/es/c/SitePricing/SitePricing.js +91 -0
  147. package/dist/es/c/SitePricing/index.js +2 -0
  148. package/dist/es/c/SitePricing/styles.scss +73 -0
  149. package/dist/es/c/SiteServices/SiteServices.js +195 -0
  150. package/dist/es/c/SiteServices/index.js +2 -0
  151. package/dist/es/c/SiteServices/styles.scss +138 -0
  152. package/dist/es/c/TeamGallery/TeamGallery.js +64 -0
  153. package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +64 -0
  154. package/dist/es/c/TeamGallery/common/PersonCard/index.js +2 -0
  155. package/dist/es/c/TeamGallery/common/index.js +1 -0
  156. package/dist/es/c/TeamGallery/index.js +2 -0
  157. package/dist/es/c/TeamGallery/styles.scss +100 -0
  158. package/dist/es/c/Testimonials/Testimonials.js +99 -0
  159. package/dist/es/c/Testimonials/index.js +2 -0
  160. package/dist/es/c/Testimonials/styles.scss +112 -0
  161. package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
  162. package/dist/es/experimental/GradientBackground/index.js +2 -0
  163. package/dist/es/experimental/GradientBackground/styles.scss +64 -0
  164. package/dist/es/experimental/index.js +1 -0
  165. package/dist/es/f/FormInput/FormInput.js +1 -1
  166. package/dist/es/f/common/Description/Description.js +19 -14
  167. package/dist/es/f/fields/CheckboxInput/CheckboxInput.js +85 -0
  168. package/dist/es/f/fields/CheckboxInput/index.js +2 -0
  169. package/dist/es/f/fields/CheckboxInput/styles.scss +28 -0
  170. package/dist/es/f/fields/IntlTelInput/IntlTelInput.js +152 -0
  171. package/dist/es/f/fields/IntlTelInput/index.js +2 -0
  172. package/dist/es/f/fields/IntlTelInput/styles.scss +37 -0
  173. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +0 -2
  174. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +5 -9
  175. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +5 -9
  176. package/dist/es/f/fields/QuerySelect/styles.scss +21 -0
  177. package/dist/es/f/fields/RadioInput/RadioInput.js +90 -0
  178. package/dist/es/f/fields/RadioInput/index.js +2 -0
  179. package/dist/es/f/fields/RadioInput/styles.scss +26 -0
  180. package/dist/es/f/fields/SelectInput/SelectInput.js +16 -8
  181. package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +111 -0
  182. package/dist/es/f/fields/TaskRecommendation/index.js +2 -0
  183. package/dist/es/f/fields/TaskRecommendation/styles.scss +37 -0
  184. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +111 -0
  185. package/dist/es/f/fields/TaskRecommendationInput/index.js +2 -0
  186. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +41 -0
  187. package/dist/es/f/fields/TextArea/TextArea.js +124 -0
  188. package/dist/es/f/fields/TextArea/index.js +2 -0
  189. package/dist/es/f/fields/TextArea/styles.scss +19 -0
  190. package/dist/es/f/fields/TextInput/TextInput.js +18 -9
  191. package/dist/es/f/fields/TextareaInput/TextareaInput.js +16 -8
  192. package/dist/es/test/QueryLoader/styles.scss +9 -0
  193. package/package.json +2 -2
  194. package/src/__snapshots__/Storyshots.test.js.snap +1864 -1423
  195. package/src/stories/a/Alert.stories.jsx +75 -0
  196. package/src/stories/a/DotInfo.stories.jsx +14 -13
  197. package/src/stories/a/ProgressBar.stories.jsx +16 -7
  198. package/src/stories/a/Timestamp.stories.jsx +35 -39
  199. package/src/stories/b/Logo.stories.jsx +13 -12
  200. package/src/stories/b/QuestionDropdown.stories.jsx +20 -30
  201. package/src/stories/b/SocialMediaButton.stories.jsx +34 -51
  202. package/src/stories/b/Title.stories.jsx +13 -15
  203. package/src/stories/c/ContentSlides.stories.jsx +27 -295
  204. package/src/stories/c/Shortener.stories.jsx +9 -3
  205. package/src/stories/c/SocialMediaShareButton.stories.jsx +14 -6
  206. package/src/stories/f/ChoicesInput.stories.jsx +66 -130
  207. package/src/stories/f/Description.stories.jsx +22 -4
  208. package/src/stories/f/QueryCombobox.stories.jsx +2 -1
  209. package/src/stories/f/QuerySelect.stories.jsx +2 -1
  210. package/src/stories/f/RatingsInput.stories.jsx +29 -23
  211. package/src/stories/f/SelectInput.stories.jsx +37 -76
  212. package/src/stories/f/TextInput.stories.jsx +62 -53
  213. package/src/stories/f/TextareaInput.stories.jsx +37 -47
  214. package/src/ui/a/Alert/Alert.jsx +144 -0
  215. package/src/ui/a/Alert/index.js +2 -0
  216. package/src/ui/a/Alert/styles.scss +74 -0
  217. package/src/ui/a/index.js +1 -0
  218. package/src/ui/f/FormInput/FormInput.jsx +1 -0
  219. package/src/ui/f/common/Description/Description.jsx +34 -29
  220. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +1 -2
  221. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +1 -11
  222. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +1 -11
  223. package/src/ui/f/fields/SelectInput/SelectInput.jsx +16 -9
  224. package/src/ui/f/fields/TextInput/TextInput.jsx +13 -7
  225. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +9 -8
@@ -3,6 +3,8 @@ import * as React from 'react'
3
3
 
4
4
  import { useLayoutEffect } from 'react'
5
5
 
6
+ import { useField } from 'formik'
7
+
6
8
  import PropTypes from 'prop-types'
7
9
 
8
10
  import styleNames from '@pareto-engineering/bem'
@@ -20,8 +22,8 @@ const Description = ({
20
22
  id,
21
23
  className:userClassName,
22
24
  style,
23
- children,
24
- isError,
25
+ description,
26
+ name,
25
27
  color,
26
28
  // ...otherProps
27
29
  }) => {
@@ -29,25 +31,27 @@ const Description = ({
29
31
  import('./styles.scss')
30
32
  }, [])
31
33
 
32
- return (
33
- <div
34
- id={id}
35
- className={[
36
-
37
- baseClassName,
38
-
39
- componentClassName,
40
- userClassName,
41
- isError ? 'x-error' : `x-${color}`,
42
- ]
43
- .filter((e) => e)
44
- .join(' ')}
45
- style={style}
46
- // {...otherProps}
47
- >
48
- {children}
49
- </div>
50
- )
34
+ const [field, meta] = useField(name)
35
+
36
+ if (description || ((meta.touched || field.value) && meta.error)) {
37
+ return (
38
+ <div
39
+ id={id}
40
+ className={[
41
+ baseClassName,
42
+ componentClassName,
43
+ userClassName,
44
+ meta.error ? 'x-error' : `x-${color}`,
45
+ ]
46
+ .filter((e) => e)
47
+ .join(' ')}
48
+ style={style}
49
+ >
50
+ { meta.error || description}
51
+ </div>
52
+ )
53
+ }
54
+ return null
51
55
  }
52
56
 
53
57
  Description.propTypes = {
@@ -67,22 +71,23 @@ Description.propTypes = {
67
71
  style:PropTypes.objectOf(PropTypes.string),
68
72
 
69
73
  /**
70
- * The children JSX
74
+ * The base color for the description
71
75
  */
72
- children:PropTypes.node,
76
+ color:PropTypes.string,
77
+
73
78
  /**
74
- * The base color for the description
79
+ * Input description - extra description to guide a use in filling the input
75
80
  */
76
- color :PropTypes.string,
81
+ description:PropTypes.string,
82
+
77
83
  /**
78
- * isError
84
+ * The input name (html - and Formik state)
79
85
  */
80
- isError :PropTypes.bool,
86
+ name:PropTypes.string.isRequired,
81
87
  }
82
88
 
83
89
  Description.defaultProps = {
84
- isError:false,
85
- color :'metadata',
90
+ color:'metadata',
86
91
  }
87
92
 
88
93
  export default Description
@@ -43,7 +43,7 @@ const QueryCombobox = ({
43
43
 
44
44
  const { setValue, setError } = helpers
45
45
 
46
- const { error, value } = meta
46
+ const { value } = meta
47
47
 
48
48
  const environment = useRelayEnvironment()
49
49
 
@@ -101,7 +101,6 @@ const QueryCombobox = ({
101
101
  label,
102
102
  description,
103
103
  setValue,
104
- error,
105
104
  value,
106
105
  color,
107
106
  isFetching,
@@ -33,7 +33,6 @@ const Combobox = ({
33
33
  options:items,
34
34
  getOptions,
35
35
  setValue,
36
- error,
37
36
  description,
38
37
  value,
39
38
  color,
@@ -121,11 +120,7 @@ const Combobox = ({
121
120
  />
122
121
  </Popover>
123
122
 
124
- {(description || error) && (
125
- <FormDescription isError={!!error}>
126
- { error || description }
127
- </FormDescription>
128
- )}
123
+ <FormDescription className="v50 mt-v s-1" description={description} name={name} />
129
124
  </div>
130
125
  )
131
126
  }
@@ -181,11 +176,6 @@ Combobox.propTypes = {
181
176
  */
182
177
  description:PropTypes.string,
183
178
 
184
- /**
185
- * The error object
186
- */
187
- error:PropTypes.objectOf(PropTypes.string),
188
-
189
179
  /**
190
180
  * The value of the custom select input
191
181
  */
@@ -46,7 +46,6 @@ const MultipleCombobox = ({
46
46
  options:items,
47
47
  getOptions,
48
48
  setValue,
49
- error,
50
49
  description,
51
50
  value,
52
51
  color,
@@ -213,11 +212,7 @@ const MultipleCombobox = ({
213
212
  />
214
213
  </Popover>
215
214
 
216
- {(description || error) && (
217
- <FormDescription isError={!!error}>
218
- { error || description }
219
- </FormDescription>
220
- )}
215
+ <FormDescription className="v50 mt-v s-1" description={description} name={name} />
221
216
 
222
217
  </div>
223
218
  )
@@ -274,11 +269,6 @@ MultipleCombobox.propTypes = {
274
269
  */
275
270
  description:PropTypes.string,
276
271
 
277
- /**
278
- * The error object
279
- */
280
- error:PropTypes.objectOf(PropTypes.string),
281
-
282
272
  /**
283
273
  * The value of the custom select input
284
274
  */
@@ -34,13 +34,14 @@ const SelectInput = ({
34
34
  description,
35
35
  disabled,
36
36
  isLoading,
37
+ autoComplete,
37
38
  // ...otherProps
38
39
  }) => {
39
40
  useLayoutEffect(() => {
40
41
  import('./styles.scss')
41
42
  }, [])
42
43
 
43
- const [field, meta] = useField({ name, validate })
44
+ const [field] = useField({ name, validate })
44
45
 
45
46
  return (
46
47
  <div
@@ -60,7 +61,14 @@ const SelectInput = ({
60
61
  >
61
62
  <FormLabel name={name}>{label}</FormLabel>
62
63
  <div className="select-wrapper">
63
- <select className="input" {...field} value={field.value || ''} id={name} disabled={disabled}>
64
+ <select
65
+ className="input"
66
+ {...field}
67
+ value={field.value || ''}
68
+ id={name}
69
+ disabled={disabled}
70
+ autoComplete={autoComplete}
71
+ >
64
72
  {
65
73
  options.map((option) => {
66
74
  // i.e if option is a string like "blah", return { value: "blah", label: "blah" }
@@ -82,12 +90,7 @@ const SelectInput = ({
82
90
  <LoadingCircle className="x-main2" />
83
91
  )}
84
92
  </div>
85
- {(description || (meta.touched && meta.error))
86
- && (
87
- <FormDescription isError={!!meta.error} className="v50 mt-v s-1">
88
- { meta.error || description }
89
- </FormDescription>
90
- )}
93
+ <FormDescription className="v50 mt-v s-1" description={description} name={name} />
91
94
  </div>
92
95
  )
93
96
  }
@@ -154,7 +157,11 @@ SelectInput.propTypes = {
154
157
  /*
155
158
  * Whether the query that is fetching the select options is still in flight
156
159
  */
157
- isLoading:PropTypes.bool,
160
+ isLoading :PropTypes.bool,
161
+ /**
162
+ * The autoComplete value that the browser should watch for the input
163
+ */
164
+ autoComplete:PropTypes.string,
158
165
  }
159
166
 
160
167
  SelectInput.defaultProps = {
@@ -35,13 +35,14 @@ const TextInput = ({
35
35
  disabled,
36
36
  placeholder,
37
37
  optional,
38
+ autoComplete,
38
39
  // ...otherProps
39
40
  }) => {
40
41
  useLayoutEffect(() => {
41
42
  import('./styles.scss')
42
43
  }, [])
43
44
 
44
- const [field, meta] = useField({ name, validate })
45
+ const [field] = useField({ name, validate })
45
46
 
46
47
  return (
47
48
  <div
@@ -73,14 +74,12 @@ const TextInput = ({
73
74
  type={type}
74
75
  disabled={disabled}
75
76
  placeholder={placeholder}
77
+ autoComplete={autoComplete}
76
78
  {...field}
77
79
  />
78
- {(description || (meta.touched && meta.error))
79
- && (
80
- <FormDescription isError={!!meta.error} className="v50 mt-v s-1">
81
- { meta.error || description }
82
- </FormDescription>
83
- )}
80
+
81
+ <FormDescription className="v50 mt-v s-1" description={description} name={name} />
82
+
84
83
  </div>
85
84
  )
86
85
  }
@@ -130,6 +129,7 @@ TextInput.propTypes = {
130
129
  'month',
131
130
  'tel',
132
131
  'hidden',
132
+ 'url',
133
133
  ]),
134
134
 
135
135
  /**
@@ -163,6 +163,12 @@ TextInput.propTypes = {
163
163
  * Whether the input is optional or not
164
164
  */
165
165
  optional:PropTypes.bool,
166
+
167
+ /**
168
+ * The autoComplete value that the browser should watch for the input
169
+ * `https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete`
170
+ */
171
+ autoComplete:PropTypes.string,
166
172
  }
167
173
 
168
174
  TextInput.defaultProps = {
@@ -35,13 +35,14 @@ const TextareaInput = ({
35
35
  description,
36
36
  disabled,
37
37
  placeholder,
38
+ autoComplete,
38
39
  // ...otherProps
39
40
  }) => {
40
41
  useLayoutEffect(() => {
41
42
  import('./styles.scss')
42
43
  }, [])
43
44
 
44
- const [field, meta] = useField({ name, validate })
45
+ const [field] = useField({ name, validate })
45
46
 
46
47
  return (
47
48
  <div
@@ -75,17 +76,12 @@ const TextareaInput = ({
75
76
  placeholder={placeholder}
76
77
  rows={rows}
77
78
  disabled={disabled}
79
+ autoComplete={autoComplete}
78
80
  >
79
81
  {/* It was a dark and stormy night... */}
80
82
  </textarea>
81
83
 
82
- {(description || (meta.touched && meta.error))
83
- && (
84
- <FormDescription isError={!!meta.error} className="v50 mt-v s-1">
85
- { meta.error || description }
86
- </FormDescription>
87
- )}
88
- {' '}
84
+ <FormDescription className="v50 mt-v s-1" description={description} name={name} />
89
85
  </div>
90
86
  )
91
87
  }
@@ -159,6 +155,11 @@ TextareaInput.propTypes = {
159
155
  * The textarea placeholder text
160
156
  */
161
157
  placeholder:PropTypes.string,
158
+
159
+ /**
160
+ * The autoComplete value that the browser should watch for the input
161
+ */
162
+ autoComplete:PropTypes.string,
162
163
  }
163
164
 
164
165
  TextareaInput.defaultProps = {