@pareto-engineering/design-system 4.0.0-alpha.63 → 4.0.0-alpha.65
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.
- package/dist/cjs/f/FormInput/FormInput.js +13 -43
- package/dist/cjs/f/common/Label/Label.js +3 -18
- package/dist/cjs/f/common/Label/styles.scss +0 -5
- package/dist/cjs/f/common/index.js +1 -21
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +10 -20
- package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +8 -21
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +8 -33
- package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +10 -20
- package/dist/cjs/f/fields/LinkInput/styles.scss +52 -51
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +0 -24
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +10 -17
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +13 -19
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +11 -4
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +11 -33
- package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +9 -33
- package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
- package/dist/cjs/f/fields/TextInput/TextInput.js +15 -37
- package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +11 -35
- package/dist/cjs/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/cjs/f/fields/index.js +1 -26
- package/dist/es/f/FormInput/FormInput.js +3 -33
- package/dist/es/f/common/Description/Description.js +1 -1
- package/dist/es/f/common/Label/Label.js +4 -20
- package/dist/es/f/common/Label/styles.scss +0 -5
- package/dist/es/f/common/index.js +1 -3
- package/dist/es/f/fields/Checkbox/Checkbox.js +11 -20
- package/dist/es/f/fields/Checkbox/styles.scss +7 -5
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +9 -22
- package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/es/f/fields/EditorInput/EditorInput.js +9 -34
- package/dist/es/f/fields/EditorInput/styles.scss +92 -90
- package/dist/es/f/fields/LinkInput/LinkInput.js +11 -19
- package/dist/es/f/fields/LinkInput/styles.scss +52 -51
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +1 -25
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +11 -18
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +14 -20
- package/dist/es/f/fields/QueryCombobox/styles.scss +11 -4
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +12 -35
- package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/es/f/fields/SelectInput/SelectInput.js +10 -34
- package/dist/es/f/fields/SelectInput/styles.scss +5 -2
- package/dist/es/f/fields/TextInput/TextInput.js +16 -36
- package/dist/es/f/fields/TextInput/styles.scss +37 -30
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +11 -35
- package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/es/f/fields/index.js +1 -2
- package/package.json +3 -3
- package/src/stories/f/Checkbox.stories.jsx +13 -21
- package/src/stories/f/ChoicesInput.stories.jsx +12 -27
- package/src/stories/f/EditorInput.stories.jsx +7 -14
- package/src/stories/f/LinkInput.stories.jsx +15 -22
- package/src/stories/f/QueryChoices.stories.jsx +12 -19
- package/src/stories/f/QueryCombobox.stories.jsx +16 -24
- package/src/stories/f/QuerySelect.stories.jsx +12 -19
- package/src/stories/f/RatingsInput.stories.jsx +7 -14
- package/src/stories/f/SelectInput.stories.jsx +12 -19
- package/src/stories/f/TextInput.stories.jsx +16 -23
- package/src/stories/f/TextareaInput.stories.jsx +7 -14
- package/src/ui/f/FormInput/FormInput.jsx +12 -57
- package/src/ui/f/common/Description/Description.jsx +2 -2
- package/src/ui/f/common/Label/Label.jsx +2 -20
- package/src/ui/f/common/Label/styles.scss +0 -5
- package/src/ui/f/common/index.js +0 -2
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +22 -33
- package/src/ui/f/fields/Checkbox/styles.scss +7 -5
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +43 -57
- package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +13 -40
- package/src/ui/f/fields/EditorInput/styles.scss +92 -90
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +35 -44
- package/src/ui/f/fields/LinkInput/styles.scss +52 -51
- package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -28
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +2 -30
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +32 -41
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +55 -62
- package/src/ui/f/fields/QueryCombobox/styles.scss +11 -4
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +16 -46
- package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +28 -58
- package/src/ui/f/fields/SelectInput/styles.scss +5 -2
- package/src/ui/f/fields/TextInput/TextInput.jsx +24 -49
- package/src/ui/f/fields/TextInput/styles.scss +37 -30
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +28 -57
- package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
- package/src/ui/f/fields/index.js +0 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +609 -8434
- package/dist/cjs/f/common/InputWrapper/InputWrapper.js +0 -73
- package/dist/cjs/f/common/InputWrapper/index.js +0 -13
- package/dist/cjs/f/common/InputWrapper/styles.scss +0 -13
- package/dist/cjs/f/common/V2/Description/Description.js +0 -76
- package/dist/cjs/f/common/V2/Description/index.js +0 -13
- package/dist/cjs/f/common/V2/Description/styles.scss +0 -10
- package/dist/cjs/f/common/V2/Label/Label.js +0 -84
- package/dist/cjs/f/common/V2/Label/index.js +0 -13
- package/dist/cjs/f/common/V2/Label/styles.scss +0 -9
- package/dist/cjs/f/common/V2/index.js +0 -19
- package/dist/cjs/f/fields/V2/Checkbox/Checkbox.js +0 -122
- package/dist/cjs/f/fields/V2/Checkbox/index.js +0 -13
- package/dist/cjs/f/fields/V2/Checkbox/styles.scss +0 -16
- package/dist/cjs/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -154
- package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -104
- package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -13
- package/dist/cjs/f/fields/V2/ChoicesInput/common/index.js +0 -12
- package/dist/cjs/f/fields/V2/ChoicesInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/dist/cjs/f/fields/V2/EditorInput/EditorInput.js +0 -197
- package/dist/cjs/f/fields/V2/EditorInput/common/Toolbar.js +0 -257
- package/dist/cjs/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -18
- package/dist/cjs/f/fields/V2/EditorInput/common/index.js +0 -20
- package/dist/cjs/f/fields/V2/EditorInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/EditorInput/styles.scss +0 -149
- package/dist/cjs/f/fields/V2/LinkInput/LinkInput.js +0 -156
- package/dist/cjs/f/fields/V2/LinkInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/LinkInput/styles.scss +0 -90
- package/dist/cjs/f/fields/V2/QueryChoices/QueryChoices.js +0 -137
- package/dist/cjs/f/fields/V2/QueryChoices/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -229
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -236
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -83
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -300
- package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/index.js +0 -26
- package/dist/cjs/f/fields/V2/QueryCombobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/dist/cjs/f/fields/V2/QuerySelect/QuerySelect.js +0 -198
- package/dist/cjs/f/fields/V2/QuerySelect/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/RatingsInput.js +0 -130
- package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -117
- package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/common/index.js +0 -12
- package/dist/cjs/f/fields/V2/RatingsInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/dist/cjs/f/fields/V2/SelectInput/SelectInput.js +0 -154
- package/dist/cjs/f/fields/V2/SelectInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/SelectInput/styles.scss +0 -87
- package/dist/cjs/f/fields/V2/TextInput/TextInput.js +0 -155
- package/dist/cjs/f/fields/V2/TextInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/TextInput/styles.scss +0 -78
- package/dist/cjs/f/fields/V2/TextareaInput/TextareaInput.js +0 -152
- package/dist/cjs/f/fields/V2/TextareaInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/dist/cjs/f/fields/V2/index.js +0 -82
- package/dist/es/f/common/InputWrapper/InputWrapper.js +0 -61
- package/dist/es/f/common/InputWrapper/index.js +0 -2
- package/dist/es/f/common/InputWrapper/styles.scss +0 -13
- package/dist/es/f/common/V2/Description/Description.js +0 -68
- package/dist/es/f/common/V2/Description/index.js +0 -2
- package/dist/es/f/common/V2/Description/styles.scss +0 -10
- package/dist/es/f/common/V2/Label/Label.js +0 -76
- package/dist/es/f/common/V2/Label/index.js +0 -2
- package/dist/es/f/common/V2/Label/styles.scss +0 -9
- package/dist/es/f/common/V2/index.js +0 -2
- package/dist/es/f/fields/V2/Checkbox/Checkbox.js +0 -114
- package/dist/es/f/fields/V2/Checkbox/index.js +0 -2
- package/dist/es/f/fields/V2/Checkbox/styles.scss +0 -16
- package/dist/es/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -148
- package/dist/es/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -97
- package/dist/es/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
- package/dist/es/f/fields/V2/ChoicesInput/common/index.js +0 -1
- package/dist/es/f/fields/V2/ChoicesInput/index.js +0 -2
- package/dist/es/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/dist/es/f/fields/V2/EditorInput/EditorInput.js +0 -192
- package/dist/es/f/fields/V2/EditorInput/common/Toolbar.js +0 -246
- package/dist/es/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -11
- package/dist/es/f/fields/V2/EditorInput/common/index.js +0 -2
- package/dist/es/f/fields/V2/EditorInput/index.js +0 -2
- package/dist/es/f/fields/V2/EditorInput/styles.scss +0 -149
- package/dist/es/f/fields/V2/LinkInput/LinkInput.js +0 -148
- package/dist/es/f/fields/V2/LinkInput/index.js +0 -2
- package/dist/es/f/fields/V2/LinkInput/styles.scss +0 -90
- package/dist/es/f/fields/V2/QueryChoices/QueryChoices.js +0 -126
- package/dist/es/f/fields/V2/QueryChoices/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -221
- package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -229
- package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -73
- package/dist/es/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -293
- package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/index.js +0 -3
- package/dist/es/f/fields/V2/QueryCombobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/dist/es/f/fields/V2/QuerySelect/QuerySelect.js +0 -186
- package/dist/es/f/fields/V2/QuerySelect/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/RatingsInput.js +0 -124
- package/dist/es/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -109
- package/dist/es/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/common/index.js +0 -1
- package/dist/es/f/fields/V2/RatingsInput/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/dist/es/f/fields/V2/SelectInput/SelectInput.js +0 -146
- package/dist/es/f/fields/V2/SelectInput/index.js +0 -2
- package/dist/es/f/fields/V2/SelectInput/styles.scss +0 -87
- package/dist/es/f/fields/V2/TextInput/TextInput.js +0 -147
- package/dist/es/f/fields/V2/TextInput/index.js +0 -2
- package/dist/es/f/fields/V2/TextInput/styles.scss +0 -78
- package/dist/es/f/fields/V2/TextareaInput/TextareaInput.js +0 -146
- package/dist/es/f/fields/V2/TextareaInput/index.js +0 -2
- package/dist/es/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/dist/es/f/fields/V2/index.js +0 -11
- package/src/stories/f/v2/Checkbox.stories.jsx +0 -102
- package/src/stories/f/v2/ChoicesInput.stories.jsx +0 -139
- package/src/stories/f/v2/EditorInput.stories.jsx +0 -81
- package/src/stories/f/v2/LinkInput.stories.jsx +0 -93
- package/src/stories/f/v2/QueryChoices.stories.jsx +0 -144
- package/src/stories/f/v2/QueryCombobox.stories.jsx +0 -301
- package/src/stories/f/v2/QuerySelect.stories.jsx +0 -150
- package/src/stories/f/v2/RatingsInput.stories.jsx +0 -77
- package/src/stories/f/v2/SelectInput.stories.jsx +0 -95
- package/src/stories/f/v2/TextInput.stories.jsx +0 -120
- package/src/stories/f/v2/TextareaInput.stories.jsx +0 -107
- package/src/stories/f/v2/__generated__/FormInputAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/v2/__generated__/FormInputAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/v2/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/v2/__generated__/QueryComboboxAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/v2/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +0 -122
- package/src/ui/f/common/InputWrapper/InputWrapper.jsx +0 -83
- package/src/ui/f/common/InputWrapper/index.js +0 -2
- package/src/ui/f/common/InputWrapper/styles.scss +0 -13
- package/src/ui/f/common/V2/Description/Description.jsx +0 -94
- package/src/ui/f/common/V2/Description/index.js +0 -2
- package/src/ui/f/common/V2/Description/styles.scss +0 -10
- package/src/ui/f/common/V2/Label/Label.jsx +0 -102
- package/src/ui/f/common/V2/Label/index.js +0 -2
- package/src/ui/f/common/V2/Label/styles.scss +0 -9
- package/src/ui/f/common/V2/index.js +0 -2
- package/src/ui/f/fields/V2/Checkbox/Checkbox.jsx +0 -146
- package/src/ui/f/fields/V2/Checkbox/index.js +0 -2
- package/src/ui/f/fields/V2/Checkbox/styles.scss +0 -16
- package/src/ui/f/fields/V2/ChoicesInput/ChoicesInput.jsx +0 -183
- package/src/ui/f/fields/V2/ChoicesInput/common/Choice/Choice.jsx +0 -125
- package/src/ui/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
- package/src/ui/f/fields/V2/ChoicesInput/common/index.js +0 -1
- package/src/ui/f/fields/V2/ChoicesInput/index.js +0 -2
- package/src/ui/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/src/ui/f/fields/V2/EditorInput/EditorInput.jsx +0 -244
- package/src/ui/f/fields/V2/EditorInput/common/Toolbar.jsx +0 -356
- package/src/ui/f/fields/V2/EditorInput/common/TreeViewPlugin.jsx +0 -16
- package/src/ui/f/fields/V2/EditorInput/common/index.jsx +0 -2
- package/src/ui/f/fields/V2/EditorInput/index.js +0 -2
- package/src/ui/f/fields/V2/EditorInput/styles.scss +0 -149
- package/src/ui/f/fields/V2/LinkInput/LinkInput.jsx +0 -187
- package/src/ui/f/fields/V2/LinkInput/index.js +0 -2
- package/src/ui/f/fields/V2/LinkInput/styles.scss +0 -90
- package/src/ui/f/fields/V2/QueryChoices/QueryChoices.jsx +0 -153
- package/src/ui/f/fields/V2/QueryChoices/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/QueryCombobox.jsx +0 -254
- package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/Combobox.jsx +0 -276
- package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/Menu/Menu.jsx +0 -103
- package/src/ui/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +0 -362
- package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/index.js +0 -3
- package/src/ui/f/fields/V2/QueryCombobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/src/ui/f/fields/V2/QuerySelect/QuerySelect.jsx +0 -220
- package/src/ui/f/fields/V2/QuerySelect/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/RatingsInput.jsx +0 -152
- package/src/ui/f/fields/V2/RatingsInput/common/Rating/Rating.jsx +0 -142
- package/src/ui/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/common/index.js +0 -1
- package/src/ui/f/fields/V2/RatingsInput/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/src/ui/f/fields/V2/SelectInput/SelectInput.jsx +0 -187
- package/src/ui/f/fields/V2/SelectInput/index.js +0 -2
- package/src/ui/f/fields/V2/SelectInput/styles.scss +0 -87
- package/src/ui/f/fields/V2/TextInput/TextInput.jsx +0 -192
- package/src/ui/f/fields/V2/TextInput/index.js +0 -2
- package/src/ui/f/fields/V2/TextInput/styles.scss +0 -78
- package/src/ui/f/fields/V2/TextareaInput/TextareaInput.jsx +0 -180
- package/src/ui/f/fields/V2/TextareaInput/index.js +0 -2
- package/src/ui/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/src/ui/f/fields/V2/index.js +0 -11
|
@@ -22,10 +22,6 @@ const QueryChoices = ({
|
|
|
22
22
|
validate,
|
|
23
23
|
loadingOption,
|
|
24
24
|
extraVariables,
|
|
25
|
-
labelSpan,
|
|
26
|
-
desktopLabelSpan,
|
|
27
|
-
inputSpan,
|
|
28
|
-
desktopInputSpan,
|
|
29
25
|
...otherProps
|
|
30
26
|
}) => {
|
|
31
27
|
const [, , helpers] = useField({ name, validate })
|
|
@@ -88,10 +84,6 @@ const QueryChoices = ({
|
|
|
88
84
|
name={name}
|
|
89
85
|
validate={validate}
|
|
90
86
|
options={options}
|
|
91
|
-
labelSpan={labelSpan}
|
|
92
|
-
desktopLabelSpan={desktopLabelSpan}
|
|
93
|
-
inputSpan={inputSpan}
|
|
94
|
-
desktopInputSpan={desktopInputSpan}
|
|
95
87
|
{...otherProps}
|
|
96
88
|
/>
|
|
97
89
|
)
|
|
@@ -148,26 +140,6 @@ QueryChoices.propTypes = {
|
|
|
148
140
|
* select options.
|
|
149
141
|
*/
|
|
150
142
|
extraVariables:PropTypes.objectOf(PropTypes.string),
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* The number of columns the label should span
|
|
154
|
-
*/
|
|
155
|
-
labelSpan:PropTypes.number,
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The number of columns the input should span
|
|
159
|
-
*/
|
|
160
|
-
inputSpan:PropTypes.number,
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* The number of columns the label should span on desktop
|
|
164
|
-
*/
|
|
165
|
-
desktopLabelSpan:PropTypes.number,
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The number of columns the input should span on desktop
|
|
169
|
-
*/
|
|
170
|
-
desktopInputSpan:PropTypes.number,
|
|
171
143
|
}
|
|
172
144
|
|
|
173
145
|
QueryChoices.defaultProps = {
|
|
@@ -9,10 +9,10 @@ import { useRelayEnvironment, fetchQuery } from 'react-relay'
|
|
|
9
9
|
|
|
10
10
|
import PropTypes from 'prop-types'
|
|
11
11
|
|
|
12
|
-
import './styles.scss'
|
|
13
|
-
|
|
14
12
|
// Local Definitions
|
|
15
13
|
|
|
14
|
+
import './styles.scss'
|
|
15
|
+
|
|
16
16
|
import { Combobox, MultipleCombobox } from './common'
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -38,10 +38,6 @@ const QueryCombobox = ({
|
|
|
38
38
|
minLength,
|
|
39
39
|
transformSearch,
|
|
40
40
|
validate,
|
|
41
|
-
labelSpan,
|
|
42
|
-
desktopLabelSpan,
|
|
43
|
-
inputSpan,
|
|
44
|
-
desktopInputSpan,
|
|
45
41
|
placeholder,
|
|
46
42
|
promptCreateNewOption,
|
|
47
43
|
// ...otherProps
|
|
@@ -117,10 +113,6 @@ const QueryCombobox = ({
|
|
|
117
113
|
className,
|
|
118
114
|
minLength,
|
|
119
115
|
transformSearch,
|
|
120
|
-
labelSpan,
|
|
121
|
-
desktopLabelSpan,
|
|
122
|
-
inputSpan,
|
|
123
|
-
desktopInputSpan,
|
|
124
116
|
placeholder,
|
|
125
117
|
promptCreateNewOption,
|
|
126
118
|
}
|
|
@@ -236,26 +228,6 @@ QueryCombobox.propTypes = {
|
|
|
236
228
|
*/
|
|
237
229
|
optional:PropTypes.bool,
|
|
238
230
|
|
|
239
|
-
/**
|
|
240
|
-
* The number of columns the label should span
|
|
241
|
-
*/
|
|
242
|
-
labelSpan:PropTypes.number,
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* The number of columns the input should span
|
|
246
|
-
*/
|
|
247
|
-
inputSpan:PropTypes.number,
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* The number of columns the label should span on desktop
|
|
251
|
-
*/
|
|
252
|
-
desktopLabelSpan:PropTypes.number,
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* The number of columns the input should span on desktop
|
|
256
|
-
*/
|
|
257
|
-
desktopInputSpan:PropTypes.number,
|
|
258
|
-
|
|
259
231
|
/**
|
|
260
232
|
* Whether to prompt the user to create a new option if the search input
|
|
261
233
|
* does not match any of the options
|
|
@@ -15,7 +15,7 @@ import { Popover, LoadingCircle } from 'ui/a'
|
|
|
15
15
|
|
|
16
16
|
import { Button } from 'ui/b'
|
|
17
17
|
|
|
18
|
-
import {
|
|
18
|
+
import { lookUpInputValueFromFetchedOptions } from '../../../../common'
|
|
19
19
|
|
|
20
20
|
// Local Definitions
|
|
21
21
|
|
|
@@ -47,10 +47,6 @@ const Combobox = ({
|
|
|
47
47
|
transformSearch,
|
|
48
48
|
disabled,
|
|
49
49
|
optional,
|
|
50
|
-
labelSpan,
|
|
51
|
-
desktopLabelSpan,
|
|
52
|
-
inputSpan,
|
|
53
|
-
desktopInputSpan,
|
|
54
50
|
placeholder,
|
|
55
51
|
promptCreateNewOption,
|
|
56
52
|
// ...otherProps
|
|
@@ -107,37 +103,32 @@ const Combobox = ({
|
|
|
107
103
|
const resetInputValue = () => setInputValue('')
|
|
108
104
|
|
|
109
105
|
return (
|
|
110
|
-
|
|
106
|
+
<div
|
|
107
|
+
id={id}
|
|
108
|
+
className={[
|
|
109
|
+
baseClassName,
|
|
110
|
+
componentClassName,
|
|
111
|
+
userClassName,
|
|
112
|
+
`y-${color}`,
|
|
113
|
+
]
|
|
114
|
+
.filter((e) => e)
|
|
115
|
+
.join(' ')}
|
|
116
|
+
style={style}
|
|
117
|
+
ref={parentRef}
|
|
118
|
+
{...getComboboxProps()}
|
|
119
|
+
>
|
|
111
120
|
<FormLabel
|
|
112
121
|
{...getLabelProps()}
|
|
113
122
|
name={name}
|
|
114
123
|
optional={optional}
|
|
115
124
|
color={labelColor}
|
|
116
|
-
columnSpan={labelSpan}
|
|
117
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
118
125
|
>
|
|
119
126
|
{label}
|
|
120
127
|
</FormLabel>
|
|
121
|
-
|
|
122
|
-
<InputWrapper
|
|
123
|
-
id={id}
|
|
124
|
-
className={[
|
|
125
|
-
baseClassName,
|
|
126
|
-
componentClassName,
|
|
127
|
-
userClassName,
|
|
128
|
-
`y-${color}`,
|
|
129
|
-
]
|
|
130
|
-
.filter((e) => e)
|
|
131
|
-
.join(' ')}
|
|
132
|
-
style={style}
|
|
133
|
-
ref={parentRef}
|
|
134
|
-
{...getComboboxProps()}
|
|
135
|
-
columnSpan={inputSpan}
|
|
136
|
-
desktopColumnSpan={desktopInputSpan}
|
|
137
|
-
>
|
|
128
|
+
<div className="input-container">
|
|
138
129
|
<input {...getInputProps()} className="input" disabled={disabled} placeholder={placeholder} />
|
|
139
130
|
{isFetching && (
|
|
140
|
-
|
|
131
|
+
<LoadingCircle className="x-main" />
|
|
141
132
|
)}
|
|
142
133
|
{inputValue.length > minLength && !isFetching && (
|
|
143
134
|
<Button isSimple isCompact color="heading" onClick={resetInputValue}>
|
|
@@ -146,22 +137,22 @@ const Combobox = ({
|
|
|
146
137
|
</span>
|
|
147
138
|
</Button>
|
|
148
139
|
)}
|
|
149
|
-
|
|
150
|
-
|
|
140
|
+
</div>
|
|
141
|
+
<FormDescription className="s-1" description={description} name={name} />
|
|
142
|
+
<Popover
|
|
143
|
+
isOpen={isOpen}
|
|
144
|
+
parentRef={parentRef}
|
|
145
|
+
>
|
|
146
|
+
<Menu
|
|
147
|
+
className={`y-${color}`}
|
|
151
148
|
isOpen={isOpen}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
items={items}
|
|
160
|
-
{...getMenuProps()}
|
|
161
|
-
/>
|
|
162
|
-
</Popover>
|
|
163
|
-
</InputWrapper>
|
|
164
|
-
</>
|
|
149
|
+
getItemProps={getItemProps}
|
|
150
|
+
highlightedIndex={highlightedIndex}
|
|
151
|
+
items={items}
|
|
152
|
+
{...getMenuProps()}
|
|
153
|
+
/>
|
|
154
|
+
</Popover>
|
|
155
|
+
</div>
|
|
165
156
|
)
|
|
166
157
|
}
|
|
167
158
|
|
|
@@ -15,7 +15,7 @@ import { Popover, LoadingCircle } from 'ui/a'
|
|
|
15
15
|
|
|
16
16
|
import { FormDescription, FormLabel } from 'ui/f'
|
|
17
17
|
|
|
18
|
-
import {
|
|
18
|
+
import { lookUpInputValueFromFetchedOptions } from '../../../../common'
|
|
19
19
|
|
|
20
20
|
// Local Definitions
|
|
21
21
|
|
|
@@ -57,11 +57,7 @@ const MultipleCombobox = ({
|
|
|
57
57
|
minLength,
|
|
58
58
|
transformSearch,
|
|
59
59
|
disabled,
|
|
60
|
-
labelSpan,
|
|
61
|
-
desktopLabelSpan,
|
|
62
|
-
inputSpan,
|
|
63
60
|
placeholder,
|
|
64
|
-
desktopInputSpan,
|
|
65
61
|
setOptions,
|
|
66
62
|
promptCreateNewOption,
|
|
67
63
|
// ...otherProps
|
|
@@ -168,7 +164,19 @@ const MultipleCombobox = ({
|
|
|
168
164
|
const resetInputValue = () => setInputValue('')
|
|
169
165
|
|
|
170
166
|
return (
|
|
171
|
-
|
|
167
|
+
<div
|
|
168
|
+
id={id}
|
|
169
|
+
className={[
|
|
170
|
+
baseClassName,
|
|
171
|
+
componentClassName,
|
|
172
|
+
userClassName,
|
|
173
|
+
]
|
|
174
|
+
.filter((e) => e)
|
|
175
|
+
.join(' ')}
|
|
176
|
+
style={style}
|
|
177
|
+
ref={parentRef}
|
|
178
|
+
{...getComboboxProps()}
|
|
179
|
+
>
|
|
172
180
|
<FormLabel
|
|
173
181
|
className={[
|
|
174
182
|
baseClassName,
|
|
@@ -180,51 +188,35 @@ const MultipleCombobox = ({
|
|
|
180
188
|
name={name}
|
|
181
189
|
optional={optional}
|
|
182
190
|
color={labelColor}
|
|
183
|
-
columnSpan={labelSpan}
|
|
184
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
185
191
|
>
|
|
186
192
|
{label}
|
|
187
193
|
</FormLabel>
|
|
188
194
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
{selectedItems?.length > 0 && (
|
|
205
|
-
<div className="selected-items">
|
|
206
|
-
{selectedItems.map((selectedItem, index) => (
|
|
207
|
-
<div
|
|
208
|
-
key={selectedItem.label}
|
|
209
|
-
{...getSelectedItemProps({ selectedItem, index })}
|
|
210
|
-
className="item"
|
|
195
|
+
{selectedItems?.length > 0 && (
|
|
196
|
+
<div className="selected-items">
|
|
197
|
+
{selectedItems.map((selectedItem, index) => (
|
|
198
|
+
<div
|
|
199
|
+
key={selectedItem.label}
|
|
200
|
+
{...getSelectedItemProps({ selectedItem, index })}
|
|
201
|
+
className="item"
|
|
202
|
+
>
|
|
203
|
+
<Button
|
|
204
|
+
onClick={(e) => {
|
|
205
|
+
e.stopPropagation()
|
|
206
|
+
removeSelectedItem(selectedItem)
|
|
207
|
+
}}
|
|
208
|
+
isCompact
|
|
209
|
+
color={color}
|
|
211
210
|
>
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<span className="icon close">Y</span>
|
|
222
|
-
</Button>
|
|
223
|
-
</div>
|
|
224
|
-
))}
|
|
225
|
-
</div>
|
|
226
|
-
)}
|
|
227
|
-
|
|
211
|
+
<span>{selectedItem.label}</span>
|
|
212
|
+
<span className="icon close">Y</span>
|
|
213
|
+
</Button>
|
|
214
|
+
</div>
|
|
215
|
+
))}
|
|
216
|
+
</div>
|
|
217
|
+
)}
|
|
218
|
+
|
|
219
|
+
<div className="input-container">
|
|
228
220
|
<input
|
|
229
221
|
{...getInputProps(
|
|
230
222
|
getDropdownProps({ preventKeyAction: isOpen }),
|
|
@@ -234,7 +226,7 @@ const MultipleCombobox = ({
|
|
|
234
226
|
placeholder={placeholder}
|
|
235
227
|
/>
|
|
236
228
|
{isFetching && (
|
|
237
|
-
|
|
229
|
+
<LoadingCircle className="x-main" />
|
|
238
230
|
)}
|
|
239
231
|
{inputValue.length > minLength && !isFetching && (
|
|
240
232
|
<Button
|
|
@@ -248,23 +240,24 @@ const MultipleCombobox = ({
|
|
|
248
240
|
</span>
|
|
249
241
|
</Button>
|
|
250
242
|
)}
|
|
243
|
+
</div>
|
|
251
244
|
|
|
252
|
-
|
|
253
|
-
|
|
245
|
+
<FormDescription className="s-1" description={description} name={name} />
|
|
246
|
+
<Popover
|
|
247
|
+
isOpen={isOpen}
|
|
248
|
+
parentRef={parentRef}
|
|
249
|
+
>
|
|
250
|
+
<Menu
|
|
251
|
+
className={`y-${color}`}
|
|
254
252
|
isOpen={isOpen}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
{...getMenuProps()}
|
|
264
|
-
/>
|
|
265
|
-
</Popover>
|
|
266
|
-
</InputWrapper>
|
|
267
|
-
</>
|
|
253
|
+
getItemProps={getItemProps}
|
|
254
|
+
highlightedIndex={highlightedIndex}
|
|
255
|
+
items={getFilteredItems()}
|
|
256
|
+
{...getMenuProps()}
|
|
257
|
+
/>
|
|
258
|
+
</Popover>
|
|
259
|
+
|
|
260
|
+
</div>
|
|
268
261
|
)
|
|
269
262
|
}
|
|
270
263
|
|
|
@@ -20,8 +20,14 @@ $on-disabled-background: var(--on-background-inputs-30);
|
|
|
20
20
|
|
|
21
21
|
.#{bem.$base}.combobox,
|
|
22
22
|
.#{bem.$base}.multiple-combobox {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
23
25
|
outline: none;
|
|
24
|
-
|
|
26
|
+
|
|
27
|
+
> .#{bem.$base}.form-label {
|
|
28
|
+
margin-bottom: var(--gap);
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
|
|
26
32
|
.#{bem.$base}.popover {
|
|
27
33
|
border: $default-border;
|
|
@@ -53,9 +59,8 @@ $on-disabled-background: var(--on-background-inputs-30);
|
|
|
53
59
|
}
|
|
54
60
|
}
|
|
55
61
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
flex-direction: column;
|
|
62
|
+
|
|
63
|
+
> .input-container {
|
|
59
64
|
position: relative;
|
|
60
65
|
|
|
61
66
|
>.#{bem.$base}.loading-circle,
|
|
@@ -72,6 +77,7 @@ $on-disabled-background: var(--on-background-inputs-30);
|
|
|
72
77
|
top: $default-loading-circle-displacement;
|
|
73
78
|
}
|
|
74
79
|
|
|
80
|
+
|
|
75
81
|
> .input {
|
|
76
82
|
background: $default-background;
|
|
77
83
|
border: $default-border;
|
|
@@ -79,6 +85,7 @@ $on-disabled-background: var(--on-background-inputs-30);
|
|
|
79
85
|
color: $on-default-background;
|
|
80
86
|
outline: none;
|
|
81
87
|
padding: $default-input-padding;
|
|
88
|
+
width: 100%;
|
|
82
89
|
|
|
83
90
|
&::placeholder {
|
|
84
91
|
color: var(--metadata);
|
|
@@ -33,10 +33,6 @@ const QuerySelect = ({
|
|
|
33
33
|
loadingOption,
|
|
34
34
|
defaultOption,
|
|
35
35
|
validate,
|
|
36
|
-
labelSpan,
|
|
37
|
-
desktopLabelSpan,
|
|
38
|
-
inputSpan,
|
|
39
|
-
desktopInputSpan,
|
|
40
36
|
// ...otherProps
|
|
41
37
|
}) => {
|
|
42
38
|
const [, , helpers] = useField({ name, validate })
|
|
@@ -101,10 +97,6 @@ const QuerySelect = ({
|
|
|
101
97
|
disabled={isFetching || disabled}
|
|
102
98
|
options={options}
|
|
103
99
|
isLoading={isFetching}
|
|
104
|
-
labelSpan={labelSpan}
|
|
105
|
-
desktopLabelSpan={desktopLabelSpan}
|
|
106
|
-
inputSpan={inputSpan}
|
|
107
|
-
desktopInputSpan={desktopInputSpan}
|
|
108
100
|
/>
|
|
109
101
|
)
|
|
110
102
|
}
|
|
@@ -8,11 +8,10 @@ import PropTypes from 'prop-types'
|
|
|
8
8
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
9
|
|
|
10
10
|
// Local Definitions
|
|
11
|
+
import './styles.scss'
|
|
11
12
|
|
|
12
13
|
import { Rating } from './common'
|
|
13
|
-
import { FormLabel
|
|
14
|
-
|
|
15
|
-
import './styles.scss'
|
|
14
|
+
import { FormLabel } from '../../common'
|
|
16
15
|
|
|
17
16
|
const baseClassName = styleNames.base
|
|
18
17
|
|
|
@@ -35,40 +34,31 @@ const RatingsInput = ({
|
|
|
35
34
|
labelMin,
|
|
36
35
|
displayRatingsLabel,
|
|
37
36
|
optional,
|
|
38
|
-
labelSpan,
|
|
39
|
-
desktopLabelSpan,
|
|
40
|
-
inputSpan,
|
|
41
|
-
desktopInputSpan,
|
|
42
37
|
// ...otherProps
|
|
43
38
|
}) => {
|
|
44
39
|
const [hover, setHover] = useState(null)
|
|
45
40
|
|
|
46
41
|
return (
|
|
47
|
-
|
|
42
|
+
<div
|
|
43
|
+
id={id}
|
|
44
|
+
className={[
|
|
45
|
+
baseClassName,
|
|
46
|
+
componentClassName,
|
|
47
|
+
userClassName,
|
|
48
|
+
]
|
|
49
|
+
.filter((e) => e)
|
|
50
|
+
.join(' ')}
|
|
51
|
+
style={style}
|
|
52
|
+
>
|
|
48
53
|
<FormLabel
|
|
49
54
|
name={name}
|
|
50
55
|
color={labelColor}
|
|
51
56
|
optional={optional}
|
|
52
|
-
columnSpan={labelSpan}
|
|
53
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
54
57
|
// {...otherProps}
|
|
55
58
|
>
|
|
56
59
|
{label}
|
|
57
60
|
</FormLabel>
|
|
58
|
-
<
|
|
59
|
-
id={id}
|
|
60
|
-
className={[
|
|
61
|
-
baseClassName,
|
|
62
|
-
componentClassName,
|
|
63
|
-
userClassName,
|
|
64
|
-
'stars',
|
|
65
|
-
]
|
|
66
|
-
.filter((e) => e)
|
|
67
|
-
.join(' ')}
|
|
68
|
-
style={style}
|
|
69
|
-
columnSpan={inputSpan}
|
|
70
|
-
desktopColumnSpan={desktopInputSpan}
|
|
71
|
-
>
|
|
61
|
+
<div className="stars">
|
|
72
62
|
{displayRatingsLabel && <p className="label-text s-2 x-metadata c-x">{labelMin}</p>}
|
|
73
63
|
{[...Array(ratingCount)].map((_, index) => {
|
|
74
64
|
const ratingValue = index + 1
|
|
@@ -86,8 +76,8 @@ const RatingsInput = ({
|
|
|
86
76
|
)
|
|
87
77
|
})}
|
|
88
78
|
{displayRatingsLabel && <p className="label-text s-2 x-metadata c-x">{labelMax}</p>}
|
|
89
|
-
</
|
|
90
|
-
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
91
81
|
)
|
|
92
82
|
}
|
|
93
83
|
|
|
@@ -149,26 +139,6 @@ RatingsInput.propTypes = {
|
|
|
149
139
|
* String that will represent color for the label
|
|
150
140
|
*/
|
|
151
141
|
labelColor:PropTypes.string,
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The number of columns the label should span
|
|
155
|
-
*/
|
|
156
|
-
labelSpan:PropTypes.number,
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* The number of columns the input should span
|
|
160
|
-
*/
|
|
161
|
-
inputSpan:PropTypes.number,
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* The number of columns the label should span on desktop
|
|
165
|
-
*/
|
|
166
|
-
desktopLabelSpan:PropTypes.number,
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The number of columns the input should span on desktop
|
|
170
|
-
*/
|
|
171
|
-
desktopInputSpan:PropTypes.number,
|
|
172
142
|
}
|
|
173
143
|
|
|
174
144
|
RatingsInput.defaultProps = {
|
|
@@ -11,7 +11,7 @@ import styleNames from '@pareto-engineering/bem/exports'
|
|
|
11
11
|
|
|
12
12
|
import { LoadingCircle } from 'ui/a'
|
|
13
13
|
|
|
14
|
-
import { FormLabel, FormDescription
|
|
14
|
+
import { FormLabel, FormDescription } from '../../common'
|
|
15
15
|
|
|
16
16
|
import './styles.scss'
|
|
17
17
|
|
|
@@ -39,49 +39,40 @@ const SelectInput = ({
|
|
|
39
39
|
disabled,
|
|
40
40
|
isLoading,
|
|
41
41
|
autoComplete,
|
|
42
|
-
labelSpan,
|
|
43
|
-
desktopLabelSpan,
|
|
44
|
-
inputSpan,
|
|
45
|
-
desktopInputSpan,
|
|
46
42
|
// ...otherProps
|
|
47
43
|
}) => {
|
|
48
44
|
const [field] = useField({ name, validate })
|
|
49
45
|
|
|
50
46
|
return (
|
|
51
|
-
|
|
47
|
+
<div
|
|
48
|
+
id={id}
|
|
49
|
+
className={[
|
|
50
|
+
baseClassName,
|
|
51
|
+
componentClassName,
|
|
52
|
+
userClassName,
|
|
53
|
+
]
|
|
54
|
+
.filter((e) => e)
|
|
55
|
+
.join(' ')}
|
|
56
|
+
style={style}
|
|
57
|
+
>
|
|
52
58
|
<FormLabel
|
|
53
59
|
name={name}
|
|
54
60
|
color={labelColor}
|
|
55
61
|
optional={optional}
|
|
56
|
-
columnSpan={labelSpan}
|
|
57
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
58
62
|
// {...otherProps}
|
|
59
63
|
>
|
|
60
64
|
{label}
|
|
61
65
|
</FormLabel>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
columnSpan={inputSpan}
|
|
73
|
-
desktopColumnSpan={desktopInputSpan}
|
|
74
|
-
>
|
|
75
|
-
<div className={`select-wrapper${disabled ? ' disabled' : ''}`}>
|
|
76
|
-
<select
|
|
77
|
-
className={`input y-${color}`}
|
|
78
|
-
{...field}
|
|
79
|
-
value={field.value || ''}
|
|
80
|
-
id={name}
|
|
81
|
-
disabled={disabled}
|
|
82
|
-
autoComplete={autoComplete}
|
|
83
|
-
>
|
|
84
|
-
{
|
|
66
|
+
<div className={`select-wrapper${disabled ? ' disabled' : ''}`}>
|
|
67
|
+
<select
|
|
68
|
+
className={`input y-${color}`}
|
|
69
|
+
{...field}
|
|
70
|
+
value={field.value || ''}
|
|
71
|
+
id={name}
|
|
72
|
+
disabled={disabled}
|
|
73
|
+
autoComplete={autoComplete}
|
|
74
|
+
>
|
|
75
|
+
{
|
|
85
76
|
options.map((option) => {
|
|
86
77
|
// i.e if option is a string like "blah", return { value: "blah", label: "blah" }
|
|
87
78
|
const newOption = typeof option === 'string' ? { value: option, label: option } : option
|
|
@@ -97,14 +88,13 @@ const SelectInput = ({
|
|
|
97
88
|
)
|
|
98
89
|
})
|
|
99
90
|
}
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
</select>
|
|
92
|
+
{isLoading && (
|
|
102
93
|
<LoadingCircle className="x-main" />
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
</>
|
|
94
|
+
)}
|
|
95
|
+
</div>
|
|
96
|
+
<FormDescription className="s-1" description={description} name={name} />
|
|
97
|
+
</div>
|
|
108
98
|
)
|
|
109
99
|
}
|
|
110
100
|
|
|
@@ -181,26 +171,6 @@ SelectInput.propTypes = {
|
|
|
181
171
|
*/
|
|
182
172
|
autoComplete:PropTypes.string,
|
|
183
173
|
|
|
184
|
-
/**
|
|
185
|
-
* The number of columns the label should span
|
|
186
|
-
*/
|
|
187
|
-
labelSpan:PropTypes.number,
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The number of columns the input should span
|
|
191
|
-
*/
|
|
192
|
-
inputSpan:PropTypes.number,
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* The number of columns the label should span on desktop
|
|
196
|
-
*/
|
|
197
|
-
desktopLabelSpan:PropTypes.number,
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* The number of columns the input should span on desktop
|
|
201
|
-
*/
|
|
202
|
-
desktopInputSpan:PropTypes.number,
|
|
203
|
-
|
|
204
174
|
/**
|
|
205
175
|
* Whether the input is optional or not
|
|
206
176
|
*/
|