@pareto-engineering/design-system 4.0.0-alpha.63 → 4.0.0-alpha.64
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/Description/Description.js +6 -5
- package/dist/cjs/f/common/Label/Label.js +9 -22
- 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 +16 -21
- package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +13 -23
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -39
- package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +14 -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 +4 -30
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +7 -16
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +9 -17
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +14 -38
- package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -37
- package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -37
- 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 +4 -1
- package/dist/es/f/common/Label/Label.js +15 -24
- 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 +14 -19
- package/dist/es/f/fields/Checkbox/styles.scss +7 -5
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +31 -39
- package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/es/f/fields/EditorInput/EditorInput.js +12 -35
- package/dist/es/f/fields/EditorInput/styles.scss +92 -90
- package/dist/es/f/fields/LinkInput/LinkInput.js +14 -20
- 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 +4 -26
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +8 -17
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +10 -18
- package/dist/es/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +15 -35
- package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/es/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/es/f/fields/SelectInput/styles.scss +5 -2
- package/dist/es/f/fields/TextInput/TextInput.js +19 -37
- package/dist/es/f/fields/TextInput/styles.scss +37 -30
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -37
- package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/es/f/fields/index.js +1 -2
- package/package.json +2 -2
- 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 +6 -2
- package/src/ui/f/common/Label/Label.jsx +27 -37
- 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 +27 -33
- package/src/ui/f/fields/Checkbox/styles.scss +7 -5
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +29 -38
- package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -41
- package/src/ui/f/fields/EditorInput/styles.scss +92 -90
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +38 -45
- 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 +5 -31
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +35 -46
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +63 -73
- package/src/ui/f/fields/QueryCombobox/styles.scss +38 -37
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +20 -47
- package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +33 -61
- package/src/ui/f/fields/SelectInput/styles.scss +5 -2
- package/src/ui/f/fields/TextInput/TextInput.jsx +27 -50
- package/src/ui/f/fields/TextInput/styles.scss +37 -30
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +32 -59
- package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
- package/src/ui/f/fields/index.js +0 -1
- 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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
|
+
|
|
4
6
|
import { useField } from 'formik'
|
|
5
7
|
|
|
6
8
|
import PropTypes from 'prop-types'
|
|
7
9
|
|
|
8
10
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
9
11
|
|
|
10
|
-
import './styles.scss'
|
|
11
|
-
|
|
12
12
|
// Local Definitions
|
|
13
13
|
|
|
14
14
|
const baseClassName = styleNames.base
|
|
@@ -27,6 +27,10 @@ const Description = ({
|
|
|
27
27
|
color,
|
|
28
28
|
// ...otherProps
|
|
29
29
|
}) => {
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
|
+
import('./styles.scss')
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
30
34
|
const [, meta] = useField(name)
|
|
31
35
|
const hasError = meta.touched && meta.error
|
|
32
36
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
|
+
|
|
4
6
|
import PropTypes from 'prop-types'
|
|
5
7
|
|
|
6
8
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
9
|
|
|
8
|
-
import './styles.scss'
|
|
9
|
-
|
|
10
10
|
// Local Definitions
|
|
11
11
|
|
|
12
12
|
const baseClassName = styleNames.base
|
|
@@ -25,32 +25,32 @@ const Label = ({
|
|
|
25
25
|
color,
|
|
26
26
|
optional,
|
|
27
27
|
as:Wrapper,
|
|
28
|
-
columnSpan,
|
|
29
|
-
desktopColumnSpan,
|
|
30
28
|
// ...otherProps
|
|
31
|
-
}) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
29
|
+
}) => {
|
|
30
|
+
useInsertionEffect(() => {
|
|
31
|
+
import('./styles.scss')
|
|
32
|
+
}, [])
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Wrapper
|
|
36
|
+
htmlFor={Wrapper === 'label' ? name : undefined}
|
|
37
|
+
id={id}
|
|
38
|
+
className={[
|
|
39
|
+
baseClassName,
|
|
40
|
+
componentClassName,
|
|
41
|
+
userClassName,
|
|
42
|
+
`x-${color}`,
|
|
43
|
+
]
|
|
44
|
+
.filter((e) => e)
|
|
45
|
+
.join(' ')}
|
|
46
|
+
style={style}
|
|
47
|
+
// {...otherProps}
|
|
48
|
+
>
|
|
49
|
+
{children}
|
|
50
|
+
{optional && ' (Optional)'}
|
|
51
|
+
</Wrapper>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
Label.propTypes = {
|
|
56
56
|
/**
|
|
@@ -91,16 +91,6 @@ Label.propTypes = {
|
|
|
91
91
|
* Whether the input should have an optional tag
|
|
92
92
|
*/
|
|
93
93
|
optional:PropTypes.bool,
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* How many columns the input should span
|
|
97
|
-
*/
|
|
98
|
-
columnSpan:PropTypes.number,
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* How many columns the input should span on desktop
|
|
102
|
-
*/
|
|
103
|
-
desktopColumnSpan:PropTypes.number,
|
|
104
94
|
}
|
|
105
95
|
|
|
106
96
|
Label.defaultProps = {
|
package/src/ui/f/common/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
+
import { useInsertionEffect } from 'react'
|
|
5
|
+
|
|
4
6
|
import PropTypes from 'prop-types'
|
|
5
7
|
|
|
6
8
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
7
9
|
|
|
8
10
|
import { useField } from 'formik'
|
|
9
11
|
|
|
10
|
-
import { FormLabel, FormDescription
|
|
11
|
-
|
|
12
|
-
import './styles.scss'
|
|
12
|
+
import { FormLabel, FormDescription } from '../../common'
|
|
13
13
|
|
|
14
14
|
// Local Definitions
|
|
15
15
|
|
|
@@ -30,51 +30,45 @@ const Checkbox = ({
|
|
|
30
30
|
disabled,
|
|
31
31
|
optional,
|
|
32
32
|
labelColor,
|
|
33
|
-
labelSpan,
|
|
34
|
-
desktopLabelSpan,
|
|
35
|
-
inputSpan,
|
|
36
|
-
desktopInputSpan,
|
|
37
33
|
// ...otherProps
|
|
38
34
|
}) => {
|
|
35
|
+
useInsertionEffect(() => {
|
|
36
|
+
import('./styles.scss')
|
|
37
|
+
}, [])
|
|
38
|
+
|
|
39
39
|
const [field] = useField({ name, type: 'checkbox' })
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
|
-
|
|
42
|
+
<div
|
|
43
|
+
id={id}
|
|
44
|
+
className={[
|
|
45
|
+
baseClassName,
|
|
46
|
+
componentClassName,
|
|
47
|
+
userClassName,
|
|
48
|
+
]
|
|
49
|
+
.filter((e) => e)
|
|
50
|
+
.join(' ')}
|
|
51
|
+
style={style}
|
|
52
|
+
>
|
|
43
53
|
{label && (
|
|
44
54
|
<FormLabel
|
|
45
55
|
name={name}
|
|
46
56
|
color={labelColor}
|
|
47
57
|
optional={optional}
|
|
48
|
-
columnSpan={labelSpan}
|
|
49
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
50
58
|
// {...otherProps}
|
|
51
59
|
>
|
|
52
60
|
{label}
|
|
53
61
|
</FormLabel>
|
|
54
62
|
)}
|
|
55
|
-
<
|
|
56
|
-
id={
|
|
57
|
-
className=
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
style={style}
|
|
65
|
-
columnSpan={inputSpan}
|
|
66
|
-
desktopColumnSpan={desktopInputSpan}
|
|
67
|
-
>
|
|
68
|
-
<input
|
|
69
|
-
id={name}
|
|
70
|
-
className="input"
|
|
71
|
-
type="checkbox"
|
|
72
|
-
disabled={disabled}
|
|
73
|
-
{...field}
|
|
74
|
-
/>
|
|
75
|
-
<FormDescription className="s-1" description={description} name={name} />
|
|
76
|
-
</InputWrapper>
|
|
77
|
-
</>
|
|
63
|
+
<input
|
|
64
|
+
id={name}
|
|
65
|
+
className="input"
|
|
66
|
+
type="checkbox"
|
|
67
|
+
disabled={disabled}
|
|
68
|
+
{...field}
|
|
69
|
+
/>
|
|
70
|
+
<FormDescription className="s-1" description={description} name={name} />
|
|
71
|
+
</div>
|
|
78
72
|
)
|
|
79
73
|
}
|
|
80
74
|
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
6
|
|
|
7
7
|
.#{bem.$base}.checkbox {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
|
|
13
|
+
> .#{bem.$base}.form-label {
|
|
14
|
+
margin-bottom: var(--gap);
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { memo } from 'react'
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
|
|
6
6
|
import PropTypes from 'prop-types'
|
|
7
7
|
|
|
@@ -11,9 +11,7 @@ import styleNames from '@pareto-engineering/bem/exports'
|
|
|
11
11
|
|
|
12
12
|
import { Choice } from './common'
|
|
13
13
|
|
|
14
|
-
import { FormDescription, FormLabel
|
|
15
|
-
|
|
16
|
-
import './styles.scss'
|
|
14
|
+
import { FormDescription, FormLabel } from '../../common'
|
|
17
15
|
|
|
18
16
|
const baseClassName = styleNames.base
|
|
19
17
|
|
|
@@ -37,26 +35,14 @@ const ChoicesInput = ({
|
|
|
37
35
|
disabled,
|
|
38
36
|
description,
|
|
39
37
|
spaceBetween,
|
|
40
|
-
labelSpan,
|
|
41
|
-
desktopLabelSpan,
|
|
42
|
-
inputSpan,
|
|
43
|
-
desktopInputSpan,
|
|
44
38
|
...otherProps
|
|
45
|
-
}) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
columnSpan={labelSpan}
|
|
53
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
54
|
-
// {...otherProps}
|
|
55
|
-
>
|
|
56
|
-
{label}
|
|
57
|
-
</FormLabel>
|
|
58
|
-
)}
|
|
59
|
-
<InputWrapper
|
|
39
|
+
}) => {
|
|
40
|
+
useInsertionEffect(() => {
|
|
41
|
+
import('./styles.scss')
|
|
42
|
+
}, [])
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
60
46
|
id={id}
|
|
61
47
|
className={[
|
|
62
48
|
baseClassName,
|
|
@@ -66,9 +52,17 @@ const ChoicesInput = ({
|
|
|
66
52
|
.filter((e) => e)
|
|
67
53
|
.join(' ')}
|
|
68
54
|
style={style}
|
|
69
|
-
columnSpan={inputSpan}
|
|
70
|
-
desktopColumnSpan={desktopInputSpan}
|
|
71
55
|
>
|
|
56
|
+
{label && (
|
|
57
|
+
<FormLabel
|
|
58
|
+
name={name}
|
|
59
|
+
color={labelColor}
|
|
60
|
+
optional={optional}
|
|
61
|
+
// {...otherProps}
|
|
62
|
+
>
|
|
63
|
+
{label}
|
|
64
|
+
</FormLabel>
|
|
65
|
+
)}
|
|
72
66
|
<div className={['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')}>
|
|
73
67
|
{ options.map((choice) => (
|
|
74
68
|
<Choice
|
|
@@ -85,9 +79,9 @@ const ChoicesInput = ({
|
|
|
85
79
|
))}
|
|
86
80
|
</div>
|
|
87
81
|
<FormDescription className="s-1" description={description} name={name} />
|
|
88
|
-
</
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
</div>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
91
85
|
|
|
92
86
|
ChoicesInput.propTypes = {
|
|
93
87
|
/**
|
|
@@ -122,31 +116,28 @@ ChoicesInput.propTypes = {
|
|
|
122
116
|
/**
|
|
123
117
|
* If the input should be multiple - checkbox
|
|
124
118
|
*/
|
|
125
|
-
multiple
|
|
119
|
+
multiple :PropTypes.bool,
|
|
126
120
|
/**
|
|
127
121
|
* how many columns should be displayed on the mobile grid
|
|
128
122
|
*/
|
|
129
|
-
gridColumnsMobile
|
|
130
|
-
|
|
131
|
-
* how many columns should be displayed on the desktop grid
|
|
132
|
-
*/
|
|
133
|
-
gridColumnsDesktop:PropTypes.number,
|
|
123
|
+
gridColumnsMobile:PropTypes.number,
|
|
124
|
+
|
|
134
125
|
/**
|
|
135
126
|
* The choice color
|
|
136
127
|
*/
|
|
137
|
-
color
|
|
128
|
+
color :PropTypes.string,
|
|
138
129
|
/**
|
|
139
130
|
* The selected choice color
|
|
140
131
|
*/
|
|
141
|
-
colorChecked
|
|
132
|
+
colorChecked:PropTypes.string,
|
|
142
133
|
/**
|
|
143
134
|
* The label of the choices input
|
|
144
135
|
*/
|
|
145
|
-
label
|
|
136
|
+
label :PropTypes.string,
|
|
146
137
|
/**
|
|
147
138
|
* Whether all the Choices inputs should be disabled
|
|
148
139
|
*/
|
|
149
|
-
disabled
|
|
140
|
+
disabled :PropTypes.bool,
|
|
150
141
|
|
|
151
142
|
/**
|
|
152
143
|
* Whether the input is optional or not
|
|
@@ -18,59 +18,62 @@ $default-background: var(--background-inputs);
|
|
|
18
18
|
$disabled-background: var(--background-inputs-30);
|
|
19
19
|
|
|
20
20
|
.#{bem.$base}.choices-input {
|
|
21
|
-
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
|
|
24
|
+
> .#{bem.$base}.form-label {
|
|
25
|
+
margin-bottom: var(--gap);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> .choices {
|
|
22
29
|
display: flex;
|
|
23
|
-
flex-
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
gap: $default-flex-separator;
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
&.space-between {
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
>.choice {
|
|
26
38
|
display: flex;
|
|
27
|
-
flex-wrap: wrap;
|
|
28
|
-
gap: $default-flex-separator;
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
input {
|
|
41
|
+
opacity: 0;
|
|
42
|
+
position: fixed;
|
|
43
|
+
visibility: none;
|
|
44
|
+
z-index: -1;
|
|
32
45
|
}
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
input {
|
|
38
|
-
opacity: 0;
|
|
39
|
-
position: fixed;
|
|
40
|
-
visibility: none;
|
|
41
|
-
z-index: -1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
input:disabled + label {
|
|
45
|
-
background-color: $disabled-background;
|
|
46
|
-
}
|
|
47
|
+
input:disabled + label {
|
|
48
|
+
background-color: $disabled-background;
|
|
49
|
+
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
> label {
|
|
52
|
+
background-color: $default-background;
|
|
53
|
+
border: $default-border;
|
|
54
|
+
border-radius: $default-input-border-radius;
|
|
55
|
+
color: var(--paragraph);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
display: block;
|
|
58
|
+
height: $default-label-height;
|
|
59
|
+
max-width: 100%;
|
|
60
|
+
padding: $default-label-padding;
|
|
61
|
+
position: relative;
|
|
62
|
+
transition: $default-transition;
|
|
63
|
+
white-space: nowrap;
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
65
|
+
&:not(.disabled) {
|
|
66
|
+
&:hover {
|
|
67
|
+
border: $hover-border;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
70
|
+
}
|
|
68
71
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
72
|
+
input:checked + label {
|
|
73
|
+
background: var(--x);
|
|
74
|
+
color: var(--on-x);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
}
|
|
79
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
3
3
|
import * as React from 'react'
|
|
4
|
-
import { memo } from 'react'
|
|
4
|
+
import { useInsertionEffect, memo } from 'react'
|
|
5
5
|
import { useFormikContext } from 'formik'
|
|
6
6
|
import { LexicalComposer } from '@lexical/react/LexicalComposer'
|
|
7
7
|
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
|
|
@@ -16,11 +16,10 @@ import { ListItemNode, ListNode } from '@lexical/list'
|
|
|
16
16
|
|
|
17
17
|
import PropTypes from 'prop-types'
|
|
18
18
|
import styleNames from '@pareto-engineering/bem/exports'
|
|
19
|
-
import './styles.scss'
|
|
20
19
|
|
|
21
20
|
// Local Definitions
|
|
22
21
|
|
|
23
|
-
import { FormLabel, FormDescription
|
|
22
|
+
import { FormLabel, FormDescription } from '../../common'
|
|
24
23
|
import { Toolbar, TreeViewPlugin } from './common'
|
|
25
24
|
|
|
26
25
|
const baseClassName = styleNames.base
|
|
@@ -43,13 +42,13 @@ const EditorInput = ({
|
|
|
43
42
|
labelColor,
|
|
44
43
|
description,
|
|
45
44
|
disabled,
|
|
46
|
-
labelSpan,
|
|
47
|
-
desktopLabelSpan,
|
|
48
|
-
inputSpan,
|
|
49
|
-
desktopInputSpan,
|
|
50
45
|
showDebugger,
|
|
51
46
|
// ...otherProps
|
|
52
47
|
}) => {
|
|
48
|
+
useInsertionEffect(() => {
|
|
49
|
+
import('./styles.scss')
|
|
50
|
+
}, [])
|
|
51
|
+
|
|
53
52
|
const formik = useFormikContext()
|
|
54
53
|
|
|
55
54
|
const setInitialValue = () => {
|
|
@@ -122,17 +121,7 @@ const EditorInput = ({
|
|
|
122
121
|
<LexicalComposer
|
|
123
122
|
initialConfig={initialConfig}
|
|
124
123
|
>
|
|
125
|
-
<
|
|
126
|
-
name={name}
|
|
127
|
-
color={labelColor}
|
|
128
|
-
optional={optional}
|
|
129
|
-
columnSpan={labelSpan}
|
|
130
|
-
desktopColumnSpan={desktopLabelSpan}
|
|
131
|
-
// {...otherProps}
|
|
132
|
-
>
|
|
133
|
-
{label}
|
|
134
|
-
</FormLabel>
|
|
135
|
-
<InputWrapper
|
|
124
|
+
<div
|
|
136
125
|
id={id}
|
|
137
126
|
className={[
|
|
138
127
|
baseClassName,
|
|
@@ -148,9 +137,15 @@ const EditorInput = ({
|
|
|
148
137
|
'--resize':resize,
|
|
149
138
|
'--rows' :`${rows}em`,
|
|
150
139
|
}}
|
|
151
|
-
columnSpan={inputSpan}
|
|
152
|
-
desktopColumnSpan={desktopInputSpan}
|
|
153
140
|
>
|
|
141
|
+
<FormLabel
|
|
142
|
+
name={name}
|
|
143
|
+
color={labelColor}
|
|
144
|
+
optional={optional}
|
|
145
|
+
>
|
|
146
|
+
{label}
|
|
147
|
+
</FormLabel>
|
|
148
|
+
|
|
154
149
|
{ !disabled && <Toolbar /> }
|
|
155
150
|
<RichTextPlugin
|
|
156
151
|
contentEditable={(
|
|
@@ -167,7 +162,7 @@ const EditorInput = ({
|
|
|
167
162
|
<HistoryPlugin />
|
|
168
163
|
<FormDescription className="s-1" description={description} name={name} />
|
|
169
164
|
{ showDebugger && <TreeViewPlugin />}
|
|
170
|
-
</
|
|
165
|
+
</div>
|
|
171
166
|
</LexicalComposer>
|
|
172
167
|
)
|
|
173
168
|
}
|
|
@@ -233,26 +228,6 @@ EditorInput.propTypes = {
|
|
|
233
228
|
*/
|
|
234
229
|
optional:PropTypes.bool,
|
|
235
230
|
|
|
236
|
-
/**
|
|
237
|
-
* The number of columns the label should span
|
|
238
|
-
*/
|
|
239
|
-
labelSpan:PropTypes.number,
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* The number of columns the input should span
|
|
243
|
-
*/
|
|
244
|
-
inputSpan:PropTypes.number,
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* The number of columns the label should span on desktop
|
|
248
|
-
*/
|
|
249
|
-
desktopLabelSpan:PropTypes.number,
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* The number of columns the input should span on desktop
|
|
253
|
-
*/
|
|
254
|
-
desktopInputSpan:PropTypes.number,
|
|
255
|
-
|
|
256
231
|
/**
|
|
257
232
|
* The resize property of the text area
|
|
258
233
|
*/
|