@pareto-engineering/design-system 2.0.0-alpha.52 → 2.0.0-alpha.55

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 (70) hide show
  1. package/dist/cjs/a/AppContext/Context.js +16 -0
  2. package/dist/cjs/a/AppContext/ContextProvider.js +96 -0
  3. package/dist/cjs/a/AppContext/index.js +39 -0
  4. package/dist/cjs/a/AppContext/useApp.js +16 -0
  5. package/dist/cjs/a/AppContext/useTheme.js +45 -0
  6. package/dist/cjs/a/index.js +8 -8
  7. package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +1 -1
  8. package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +4 -4
  9. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
  10. package/dist/cjs/f/FormInput/FormInput.js +1 -1
  11. package/dist/cjs/f/common/Description/Description.js +20 -14
  12. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +0 -2
  13. package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +5 -9
  14. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +5 -9
  15. package/dist/cjs/f/fields/SelectInput/SelectInput.js +16 -8
  16. package/dist/cjs/f/fields/TextInput/TextInput.js +18 -9
  17. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +16 -8
  18. package/dist/es/a/AppContext/Context.js +2 -0
  19. package/dist/es/a/AppContext/ContextProvider.js +78 -0
  20. package/dist/es/a/AppContext/index.js +5 -0
  21. package/dist/es/a/AppContext/useApp.js +3 -0
  22. package/dist/es/a/AppContext/useTheme.js +34 -0
  23. package/dist/es/a/index.js +1 -1
  24. package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +2 -2
  25. package/dist/es/b/SocialMediaButton/SocialMediaButton.js +5 -5
  26. package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
  27. package/dist/es/f/FormInput/FormInput.js +1 -1
  28. package/dist/es/f/common/Description/Description.js +19 -14
  29. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +0 -2
  30. package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +5 -9
  31. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +5 -9
  32. package/dist/es/f/fields/SelectInput/SelectInput.js +16 -8
  33. package/dist/es/f/fields/TextInput/TextInput.js +18 -9
  34. package/dist/es/f/fields/TextareaInput/TextareaInput.js +16 -8
  35. package/package.json +1 -1
  36. package/src/__snapshots__/Storyshots.test.js.snap +1528 -1385
  37. package/src/stories/a/{SiteContext.stories.jsx → AppContext.stories.jsx} +8 -8
  38. package/src/stories/a/DotInfo.stories.jsx +12 -12
  39. package/src/stories/a/ProgressBar.stories.jsx +12 -6
  40. package/src/stories/a/Timestamp.stories.jsx +32 -38
  41. package/src/stories/b/Logo.stories.jsx +13 -13
  42. package/src/stories/b/QuestionDropdown.stories.jsx +17 -30
  43. package/src/stories/b/SocialMediaButton.stories.jsx +34 -52
  44. package/src/stories/b/ThemeSelector.stories.jsx +5 -5
  45. package/src/stories/b/Title.stories.jsx +11 -13
  46. package/src/stories/c/ContentSlides.stories.jsx +30 -300
  47. package/src/stories/f/ChoicesInput.stories.jsx +62 -129
  48. package/src/stories/f/Description.stories.jsx +12 -2
  49. package/src/stories/f/RatingsInput.stories.jsx +21 -22
  50. package/src/stories/f/SelectInput.stories.jsx +35 -75
  51. package/src/stories/f/TextInput.stories.jsx +55 -52
  52. package/src/stories/f/TextareaInput.stories.jsx +31 -46
  53. package/src/ui/a/{SiteContext → AppContext}/Context.js +0 -0
  54. package/src/ui/a/{SiteContext → AppContext}/ContextProvider.jsx +8 -7
  55. package/src/ui/a/AppContext/index.js +5 -0
  56. package/src/ui/a/{SiteContext/useSite.js → AppContext/useApp.js} +0 -0
  57. package/src/ui/a/{SiteContext → AppContext}/useTheme.js +0 -0
  58. package/src/ui/a/index.js +4 -4
  59. package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +2 -2
  60. package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +4 -4
  61. package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
  62. package/src/ui/f/FormInput/FormInput.jsx +1 -0
  63. package/src/ui/f/common/Description/Description.jsx +34 -29
  64. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +1 -2
  65. package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +1 -11
  66. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +1 -11
  67. package/src/ui/f/fields/SelectInput/SelectInput.jsx +16 -9
  68. package/src/ui/f/fields/TextInput/TextInput.jsx +13 -7
  69. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +9 -8
  70. package/src/ui/a/SiteContext/index.js +0 -5
@@ -26,87 +26,47 @@ export default {
26
26
  },
27
27
  }
28
28
 
29
- export const Base = () => (
29
+ const Template = (args) => (
30
30
  <>
31
- <SelectInput
32
- name="workType"
33
- label="Work Type"
34
- options={[{ value: '', label: 'Select an option', disabled: true }, 'Work', 'Managing', 'Training']}
35
- />
31
+ <SelectInput {...args} />
36
32
  <FormDebugger />
37
33
  </>
38
34
  )
39
35
 
40
- export const RequiredSelect = () => {
41
- const requiredInput = (inputValue) => {
42
- let error = ''
43
-
44
- if (!inputValue || !inputValue?.length === 0) {
45
- error = 'This information is required'
46
- }
47
- return error
48
- }
36
+ export const Base = Template.bind({})
37
+ Base.args = {
38
+ name :'workType',
39
+ label :'Work Type',
40
+ options:[
41
+ { value: '', label: 'Select an option', disabled: true },
42
+ { value: 'Work', label: 'Work' },
43
+ { value: 'Managing', label: 'Managing' },
44
+ { value: 'Training', label: 'Training' },
45
+ ],
46
+ }
49
47
 
50
- return (
51
- <>
52
- <SelectInput
53
- validate={requiredInput}
54
- name="activity"
55
- label="Activity Type"
56
- options={[
57
- { value: '', label: 'Select an option', disabled: true },
58
- { value: 'review', label: 'Review' },
59
- { value: 'Approve', label: 'Approve' },
60
- ]}
61
- />
62
- <FormDebugger />
63
- </>
64
- )
48
+ export const StringAndObjects = Template.bind({})
49
+ StringAndObjects.args = {
50
+ ...Base.args,
51
+ options:[...Base.args.options, 'Option1', 'Option2', 'Option3'],
65
52
  }
66
53
 
67
- export const Objects = () => (
68
- <>
69
- <SelectInput
70
- name="workType"
71
- label="Work Type"
72
- options={[
73
- { value: '', label: 'Select an option', disabled: true },
74
- { value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
75
- { value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
76
- ]}
77
- />
78
- <FormDebugger />
79
- </>
80
- )
54
+ const requiredInput = (inputValue) => {
55
+ let error = ''
81
56
 
82
- export const StringAndObjects = () => (
83
- <>
84
- <SelectInput
85
- name="workType"
86
- label="Work Type"
87
- options={[
88
- { value: '', label: 'Select an option', disabled: true },
89
- 'Work', 'Managing', 'Training',
90
- { value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
91
- { value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
92
- ]}
93
- />
94
- <FormDebugger />
95
- </>
96
- )
97
- export const DisabledSelectInput = () => (
98
- <>
99
- <SelectInput
100
- name="workType"
101
- label="Work Type"
102
- options={[
103
- { value: '', label: 'Select an option', disabled: true },
104
- 'Work', 'Managing', 'Training',
105
- { value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
106
- { value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
107
- ]}
108
- disabled
109
- />
110
- <FormDebugger />
111
- </>
112
- )
57
+ if (!inputValue || !inputValue?.length === 0) {
58
+ error = 'This information is required'
59
+ }
60
+ return error
61
+ }
62
+ export const Required = Template.bind({})
63
+ Required.args = {
64
+ ...Base.args,
65
+ validate:requiredInput,
66
+ }
67
+
68
+ export const DisabledSelectInput = Template.bind({})
69
+ DisabledSelectInput.args = {
70
+ ...Base.args,
71
+ disabled:true,
72
+ }
@@ -30,61 +30,64 @@ export default {
30
30
  },
31
31
  }
32
32
 
33
- export const Base = () => {
34
- const validate = (value) => {
35
- let errorMessage = ''
36
- const isValid = value.length > 3
33
+ // eslint-disable-next-line react/prop-types
34
+ const Template = (args) => (
35
+ <div className=" u2 pb-u">
36
+ <TextInput {...args} />
37
+ <FormDebugger />
38
+ </div>
39
+ )
40
+
41
+ export const Base = Template.bind({})
42
+ Base.args = {
43
+ name :'firstName',
44
+ label:"What's your first name ?",
45
+ }
46
+
47
+ const validate = (value) => {
48
+ let errorMessage = ''
49
+ const isValid = value.length > 3
37
50
 
38
- if (!isValid) {
39
- errorMessage = 'Value should be greater than 3 characters'
40
- }
41
- return errorMessage
51
+ if (!isValid) {
52
+ errorMessage = 'Value should be greater than 3 characters'
42
53
  }
43
- return (
44
- <div className=" u2 pb-u">
45
- <TextInput
46
- name="firstName"
47
- label="What's your first name ?"
48
- validate={validate}
49
- />
50
- <FormDebugger />
51
- </div>
52
- )
54
+ return errorMessage
53
55
  }
54
56
 
55
- export const Placeholder = () => (
56
- <div className="u2 pb-u">
57
- <TextInput
58
- name="firstName"
59
- label="What's your first name ?"
60
- placeholder="First Name"
61
- />
62
- <FormDebugger />
63
- </div>
64
- )
57
+ export const WithValidation = Template.bind({})
58
+ WithValidation.args = {
59
+ ...Base.args,
60
+ validate,
61
+ }
65
62
 
66
- export const Disabled = () => (
67
- <div className="u2 pb-u">
68
- <TextInput
69
- name="firstName"
70
- label="What's your first name ?"
71
- disabled
72
- />
73
- </div>
74
- )
63
+ export const WithPlaceholder = Template.bind({})
64
+ WithPlaceholder.args = {
65
+ ...Base.args,
66
+ placeholder:'First Name',
67
+ }
75
68
 
76
- export const DateTime = () => (
77
- <div>
78
- <TextInput
79
- name="date"
80
- label="Select date"
81
- type="date"
82
- />
83
- <TextInput
84
- name="time"
85
- label="Select time"
86
- type="time"
87
- />
88
- <FormDebugger />
89
- </div>
90
- )
69
+ export const WithAutoCompleteOff = Template.bind({})
70
+ WithAutoCompleteOff.args = {
71
+ ...Base.args,
72
+ autoComplete:'off',
73
+ }
74
+
75
+ export const WithDisabled = Template.bind({})
76
+ WithDisabled.args = {
77
+ ...Base.args,
78
+ disabled:true,
79
+ }
80
+
81
+ export const Date = Template.bind({})
82
+ Date.args = {
83
+ type :'date',
84
+ name :'date',
85
+ label:'Select date',
86
+ }
87
+
88
+ export const Time = Template.bind({})
89
+ Time.args = {
90
+ type :'time',
91
+ name :'time',
92
+ label:'Select time',
93
+ }
@@ -28,58 +28,43 @@ export default {
28
28
  },
29
29
  }
30
30
 
31
- export const Base = () => (
32
- <div>
33
- <TextareaInput
34
- name="feedback"
35
- label="What can we improve on?"
36
- />
31
+ const Template = (args) => (
32
+ <>
33
+ <TextareaInput {...args} />
37
34
  <FormDebugger />
38
- </div>
35
+ </>
39
36
  )
40
37
 
41
- export const Placeholder = () => (
42
- <div>
43
- <TextareaInput
44
- name="feedback"
45
- label="What can we improve on?"
46
- placeholder="Type your feedback here..."
47
- />
48
- <FormDebugger />
49
- </div>
50
- )
38
+ export const Base = Template.bind({})
39
+ Base.args = {
40
+ name :'feedback',
41
+ label:'What can we improve on?',
42
+ }
43
+
44
+ export const Placeholder = Template.bind({})
45
+ Placeholder.args = {
46
+ ...Base.args,
47
+ placeholder:'Type your feedback here...',
48
+ }
51
49
 
52
- export const Validation = () => {
53
- const validate = (value) => {
54
- let errorMessage = ''
55
- const isValid = value.length > 3
50
+ const validate = (value) => {
51
+ let errorMessage = ''
52
+ const isValid = value.length > 3
56
53
 
57
- if (!isValid) {
58
- errorMessage = 'Value should be greater than 3 characters'
59
- }
60
- return errorMessage
54
+ if (!isValid) {
55
+ errorMessage = 'Value should be greater than 3 characters'
61
56
  }
57
+ return errorMessage
58
+ }
62
59
 
63
- return (
64
- <div>
65
- <TextareaInput
66
- name="feedback"
67
- label="What can we improve on?"
68
- placeholder="Type your feedback here..."
69
- validate={validate}
70
- />
71
- <FormDebugger />
72
- </div>
73
- )
60
+ export const Validation = Template.bind({})
61
+ Validation.args = {
62
+ ...Base.args,
63
+ validate,
74
64
  }
75
65
 
76
- export const Disabled = () => (
77
- <div>
78
- <TextareaInput
79
- name="feedback"
80
- label="What can we improve on?"
81
- disabled
82
- />
83
- <FormDebugger />
84
- </div>
85
- )
66
+ export const Disabled = Template.bind({})
67
+ Disabled.args = {
68
+ ...Base.args,
69
+ disabled:true,
70
+ }
File without changes
@@ -24,7 +24,7 @@ const reducer = (state, action) => {
24
24
  }
25
25
  }
26
26
 
27
- const SiteContextProvider = ({
27
+ const AppContextProvider = ({
28
28
  children,
29
29
  initialTheme,
30
30
  config,
@@ -48,7 +48,7 @@ const SiteContextProvider = ({
48
48
  )
49
49
  }
50
50
 
51
- SiteContextProvider.propTypes = {
51
+ AppContextProvider.propTypes = {
52
52
  /**
53
53
  * The children JSX
54
54
  */
@@ -60,10 +60,10 @@ SiteContextProvider.propTypes = {
60
60
  initialTheme:PropTypes.string,
61
61
 
62
62
  /**
63
- * A dictionnary containing settings and preferences to be used site-wide
63
+ * A dictionnary containing settings and preferences to be used application-wide
64
64
  */
65
65
  config:PropTypes.shape({
66
- SITE:PropTypes.shape({
66
+ APP:PropTypes.shape({
67
67
  NAME :PropTypes.string.isRequired,
68
68
  CANONICAL :PropTypes.string.isRequired,
69
69
  SUPPORT_EMAIL:PropTypes.string,
@@ -74,16 +74,17 @@ SiteContextProvider.propTypes = {
74
74
  INSTAGRAM:PropTypes.string,
75
75
  YOUTUBE :PropTypes.string,
76
76
  }),
77
+ CONSTANTS:PropTypes.shape({}),
77
78
  }).isRequired,
78
79
 
79
80
  /**
80
- * Site context initial state
81
+ * Application context initial state
81
82
  */
82
83
  initialState:PropTypes.objectOf(PropTypes.string),
83
84
  }
84
85
 
85
- SiteContextProvider.defaultProps = {
86
+ AppContextProvider.defaultProps = {
86
87
  initialState:{},
87
88
  }
88
89
 
89
- export default SiteContextProvider
90
+ export default AppContextProvider
@@ -0,0 +1,5 @@
1
+ /* @pareto-engineering/generator-front 0.2.3 */
2
+ export { default as AppContext } from './Context'
3
+ export { default as AppContextProvider } from './ContextProvider'
4
+ export { default as useApp } from './useApp'
5
+ export { default as useTheme } from './useTheme'
File without changes
package/src/ui/a/index.js CHANGED
@@ -2,11 +2,11 @@ export { SVG } from './SVG'
2
2
  export { DashboardNavbar } from './DashboardNavbar'
3
3
  export { IconList } from './IconList'
4
4
  export {
5
- SiteContext,
6
- SiteContextProvider,
7
- useSite,
5
+ AppContext,
6
+ AppContextProvider,
7
+ useApp,
8
8
  useTheme,
9
- } from './SiteContext'
9
+ } from './AppContext'
10
10
  export { ProgressBar } from './ProgressBar'
11
11
  export { TeamInfo } from './TeamInfo'
12
12
  export { AnimatedCounter } from './AnimatedCounter'
@@ -3,7 +3,7 @@ import * as React from 'react'
3
3
  import { useMemo } from 'react'
4
4
  import PropTypes from 'prop-types'
5
5
  import { Helmet } from 'react-helmet'
6
- import { useSite } from 'ui/a'
6
+ import { useApp } from 'ui/a'
7
7
 
8
8
  const helmetMap = [
9
9
  {
@@ -163,7 +163,7 @@ const PageHelmet = ({
163
163
  ...props
164
164
  }) => {
165
165
  // const intl = useIntl()
166
- const context = useSite()
166
+ const context = useApp()
167
167
 
168
168
  const HelmetContent = useMemo(() => helmetMap.reduce(
169
169
  /* eslint-disable no-unused-vars -- TODO add test or ssr mode */
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types'
7
7
 
8
8
  import styleNames from '@pareto-engineering/bem'
9
9
 
10
- import { useSite } from 'ui/a'
10
+ import { useApp } from 'ui/a'
11
11
 
12
12
  // Local Definitions
13
13
 
@@ -37,7 +37,7 @@ const defaultsMap = {
37
37
  /**
38
38
  * This is the component description.
39
39
  * This component takes `y` as the default color and `x` as the hover color.
40
- * This components needs to be wrapped within a `SiteContextProvider`.
40
+ * This components needs to be wrapped within a `AppContextProvider`.
41
41
  */
42
42
  const SocialMediaButton = ({
43
43
  id,
@@ -50,14 +50,14 @@ const SocialMediaButton = ({
50
50
  isTransparent,
51
51
  ...otherProps
52
52
  }) => {
53
- const siteContext = useSite()
53
+ const applicationContext = useApp()
54
54
 
55
55
  useLayoutEffect(() => {
56
56
  import('./styles.scss')
57
57
  }, [])
58
58
 
59
59
  const content = type && defaultsMap[type]
60
- const href = link || siteContext?.SOCIAL?.[content.link]
60
+ const href = link || applicationContext?.SOCIAL?.[content.link]
61
61
 
62
62
  return (
63
63
  <a href={href} target="_blank" rel="noreferrer">
@@ -4,7 +4,7 @@ import { useLayoutEffect, useCallback } from 'react'
4
4
  import PropTypes from 'prop-types'
5
5
  import styleNames from '@pareto-engineering/bem'
6
6
 
7
- import { useSite } from 'ui/a'
7
+ import { useApp } from 'ui/a'
8
8
 
9
9
  // Local Definitions
10
10
 
@@ -27,7 +27,7 @@ const ThemeSelector = ({
27
27
  const {
28
28
  userTheme,
29
29
  setPreferredTheme,
30
- } = useSite()
30
+ } = useApp()
31
31
 
32
32
  useLayoutEffect(() => {
33
33
  import('./styles.scss')
@@ -127,6 +127,7 @@ FormInput.propTypes = {
127
127
  'choices',
128
128
  'textarea',
129
129
  'query-combobox',
130
+ 'url',
130
131
  // to be removed
131
132
  'extendedTypeInput',
132
133
  ]),
@@ -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
  */