@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
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
|
-
require("./styles.scss");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
15
|
-
|
|
16
|
-
// Local Definitions
|
|
17
|
-
|
|
18
|
-
const baseClassName = _exports.default.base;
|
|
19
|
-
const componentClassName = 'input-wrapper';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* This is the component description.
|
|
23
|
-
*/
|
|
24
|
-
const InputWrapper = _ref => {
|
|
25
|
-
let {
|
|
26
|
-
id,
|
|
27
|
-
className: userClassName,
|
|
28
|
-
style,
|
|
29
|
-
children,
|
|
30
|
-
columnSpan,
|
|
31
|
-
desktopColumnSpan
|
|
32
|
-
// ...otherProps
|
|
33
|
-
} = _ref;
|
|
34
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
id: id,
|
|
36
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
37
|
-
style: {
|
|
38
|
-
...style,
|
|
39
|
-
'--column-span': columnSpan || 'var(--columns)',
|
|
40
|
-
'--column-span-md': desktopColumnSpan || 'var(--columns)'
|
|
41
|
-
}
|
|
42
|
-
}, children);
|
|
43
|
-
};
|
|
44
|
-
InputWrapper.propTypes = {
|
|
45
|
-
/**
|
|
46
|
-
* The HTML id for this element
|
|
47
|
-
*/
|
|
48
|
-
id: _propTypes.default.string,
|
|
49
|
-
/**
|
|
50
|
-
* The HTML class names for this element
|
|
51
|
-
*/
|
|
52
|
-
className: _propTypes.default.string,
|
|
53
|
-
/**
|
|
54
|
-
* The React-written, css properties for this element.
|
|
55
|
-
*/
|
|
56
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
57
|
-
/**
|
|
58
|
-
* The children JSX
|
|
59
|
-
*/
|
|
60
|
-
children: _propTypes.default.node,
|
|
61
|
-
/**
|
|
62
|
-
* How many columns the input should span
|
|
63
|
-
*/
|
|
64
|
-
columnSpan: _propTypes.default.number,
|
|
65
|
-
/**
|
|
66
|
-
* How many columns the input should span on desktop
|
|
67
|
-
*/
|
|
68
|
-
desktopColumnSpan: _propTypes.default.number
|
|
69
|
-
};
|
|
70
|
-
InputWrapper.defaultProps = {
|
|
71
|
-
// as :'label',
|
|
72
|
-
};
|
|
73
|
-
var _default = exports.default = InputWrapper;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "InputWrapper", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _InputWrapper.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _InputWrapper = _interopRequireDefault(require("./InputWrapper"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
|
|
3
|
-
@use "@pareto-engineering/bem";
|
|
4
|
-
@use "@pareto-engineering/styles/src/mixins";
|
|
5
|
-
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
|
-
|
|
7
|
-
.#{bem.$base}.input-wrapper {
|
|
8
|
-
grid-column: span var(--column-span);
|
|
9
|
-
|
|
10
|
-
@include mixins.media($from: $sm-md) {
|
|
11
|
-
grid-column: span var(--column-span-md);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var React = _react;
|
|
9
|
-
var _formik = require("formik");
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* @pareto-engineering/generator-front 1.0.12 */
|
|
15
|
-
// Local Definitions
|
|
16
|
-
|
|
17
|
-
const baseClassName = _exports.default.base;
|
|
18
|
-
const componentClassName = 'description';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* This is the component description.
|
|
22
|
-
*/
|
|
23
|
-
const Description = _ref => {
|
|
24
|
-
let {
|
|
25
|
-
id,
|
|
26
|
-
className: userClassName,
|
|
27
|
-
style,
|
|
28
|
-
description,
|
|
29
|
-
name,
|
|
30
|
-
color
|
|
31
|
-
// ...otherProps
|
|
32
|
-
} = _ref;
|
|
33
|
-
(0, _react.useInsertionEffect)(() => {
|
|
34
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
35
|
-
}, []);
|
|
36
|
-
const [, meta] = (0, _formik.useField)(name);
|
|
37
|
-
const hasError = meta.touched && meta.error;
|
|
38
|
-
if (hasError || description) {
|
|
39
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
id: id,
|
|
41
|
-
className: [baseClassName, componentClassName, userClassName, hasError ? 'x-error' : `x-${color}`].filter(e => e).join(' '),
|
|
42
|
-
style: style
|
|
43
|
-
}, hasError ? meta.error : description);
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
};
|
|
47
|
-
Description.propTypes = {
|
|
48
|
-
/**
|
|
49
|
-
* The HTML id for this element
|
|
50
|
-
*/
|
|
51
|
-
id: _propTypes.default.string,
|
|
52
|
-
/**
|
|
53
|
-
* The HTML class names for this element
|
|
54
|
-
*/
|
|
55
|
-
className: _propTypes.default.string,
|
|
56
|
-
/**
|
|
57
|
-
* The React-written, css properties for this element.
|
|
58
|
-
*/
|
|
59
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
60
|
-
/**
|
|
61
|
-
* The base color for the description
|
|
62
|
-
*/
|
|
63
|
-
color: _propTypes.default.string,
|
|
64
|
-
/**
|
|
65
|
-
* Input description - extra description to guide a use in filling the input
|
|
66
|
-
*/
|
|
67
|
-
description: _propTypes.default.string,
|
|
68
|
-
/**
|
|
69
|
-
* The input name (html - and Formik state)
|
|
70
|
-
*/
|
|
71
|
-
name: _propTypes.default.string.isRequired
|
|
72
|
-
};
|
|
73
|
-
Description.defaultProps = {
|
|
74
|
-
color: 'metadata'
|
|
75
|
-
};
|
|
76
|
-
var _default = exports.default = Description;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Description", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Description.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Description = _interopRequireDefault(require("./Description"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var React = _react;
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* @pareto-engineering/generator-front 1.0.12 */
|
|
14
|
-
// Local Definitions
|
|
15
|
-
|
|
16
|
-
const baseClassName = _exports.default.base;
|
|
17
|
-
const componentClassName = 'form-label';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* This is the component description.
|
|
21
|
-
*/
|
|
22
|
-
const Label = _ref => {
|
|
23
|
-
let {
|
|
24
|
-
id,
|
|
25
|
-
className: userClassName,
|
|
26
|
-
style,
|
|
27
|
-
children,
|
|
28
|
-
name,
|
|
29
|
-
color,
|
|
30
|
-
optional,
|
|
31
|
-
as: Wrapper
|
|
32
|
-
// ...otherProps
|
|
33
|
-
} = _ref;
|
|
34
|
-
(0, _react.useInsertionEffect)(() => {
|
|
35
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
36
|
-
}, []);
|
|
37
|
-
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
38
|
-
htmlFor: Wrapper === 'label' ? name : undefined,
|
|
39
|
-
id: id,
|
|
40
|
-
className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
|
|
41
|
-
style: style
|
|
42
|
-
// {...otherProps}
|
|
43
|
-
}, children, optional && ' (Optional)');
|
|
44
|
-
};
|
|
45
|
-
Label.propTypes = {
|
|
46
|
-
/**
|
|
47
|
-
* The HTML id for this element
|
|
48
|
-
*/
|
|
49
|
-
id: _propTypes.default.string,
|
|
50
|
-
/**
|
|
51
|
-
* The HTML class names for this element
|
|
52
|
-
*/
|
|
53
|
-
className: _propTypes.default.string,
|
|
54
|
-
/**
|
|
55
|
-
* The React-written, css properties for this element.
|
|
56
|
-
*/
|
|
57
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
58
|
-
/**
|
|
59
|
-
* The children JSX
|
|
60
|
-
*/
|
|
61
|
-
children: _propTypes.default.node,
|
|
62
|
-
/**
|
|
63
|
-
* The name of the input label
|
|
64
|
-
*/
|
|
65
|
-
name: _propTypes.default.string,
|
|
66
|
-
/**
|
|
67
|
-
* The html tag that acts as an input label
|
|
68
|
-
*/
|
|
69
|
-
as: _propTypes.default.node,
|
|
70
|
-
/**
|
|
71
|
-
* The default color of the label
|
|
72
|
-
*/
|
|
73
|
-
color: _propTypes.default.string,
|
|
74
|
-
/**
|
|
75
|
-
* Whether the input should have an optional tag
|
|
76
|
-
*/
|
|
77
|
-
optional: _propTypes.default.bool
|
|
78
|
-
};
|
|
79
|
-
Label.defaultProps = {
|
|
80
|
-
as: 'label',
|
|
81
|
-
color: 'paragraph',
|
|
82
|
-
optional: false
|
|
83
|
-
};
|
|
84
|
-
var _default = exports.default = Label;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Label", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Label.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Label = _interopRequireDefault(require("./Label"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "FormDescriptionV2", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Description.Description;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "FormLabelV2", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _Label.Label;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _Label = require("./Label");
|
|
19
|
-
var _Description = require("./Description");
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var React = _react;
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
-
var _formik = require("formik");
|
|
12
|
-
var _common = require("../../../common");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* @pareto-engineering/generator-front 1.0.12 */
|
|
17
|
-
// Local Definitions
|
|
18
|
-
|
|
19
|
-
const baseClassName = _exports.default.base;
|
|
20
|
-
const componentClassName = 'checkbox';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* This is the component description.
|
|
24
|
-
*/
|
|
25
|
-
const Checkbox = _ref => {
|
|
26
|
-
let {
|
|
27
|
-
id,
|
|
28
|
-
className: userClassName,
|
|
29
|
-
style,
|
|
30
|
-
name,
|
|
31
|
-
label,
|
|
32
|
-
description,
|
|
33
|
-
disabled,
|
|
34
|
-
optional,
|
|
35
|
-
labelColor
|
|
36
|
-
// ...otherProps
|
|
37
|
-
} = _ref;
|
|
38
|
-
(0, _react.useInsertionEffect)(() => {
|
|
39
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
40
|
-
}, []);
|
|
41
|
-
const [field] = (0, _formik.useField)({
|
|
42
|
-
name,
|
|
43
|
-
type: 'checkbox'
|
|
44
|
-
});
|
|
45
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
id: id,
|
|
47
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
48
|
-
style: style
|
|
49
|
-
}, label && /*#__PURE__*/React.createElement(_common.FormLabelV2, {
|
|
50
|
-
name: name,
|
|
51
|
-
color: labelColor,
|
|
52
|
-
optional: optional
|
|
53
|
-
// {...otherProps}
|
|
54
|
-
}, label), /*#__PURE__*/React.createElement("input", _extends({
|
|
55
|
-
id: name,
|
|
56
|
-
className: "input",
|
|
57
|
-
type: "checkbox",
|
|
58
|
-
disabled: disabled
|
|
59
|
-
}, field)), /*#__PURE__*/React.createElement(_common.FormDescriptionV2, {
|
|
60
|
-
className: "s-1",
|
|
61
|
-
description: description,
|
|
62
|
-
name: name
|
|
63
|
-
}));
|
|
64
|
-
};
|
|
65
|
-
Checkbox.propTypes = {
|
|
66
|
-
/**
|
|
67
|
-
* The HTML id for this element
|
|
68
|
-
*/
|
|
69
|
-
id: _propTypes.default.string,
|
|
70
|
-
/**
|
|
71
|
-
* The HTML class names for this element
|
|
72
|
-
*/
|
|
73
|
-
className: _propTypes.default.string,
|
|
74
|
-
/**
|
|
75
|
-
* The React-written, css properties for this element.
|
|
76
|
-
*/
|
|
77
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
78
|
-
/**
|
|
79
|
-
* The input name (html - and Formik state)
|
|
80
|
-
*/
|
|
81
|
-
name: _propTypes.default.string.isRequired,
|
|
82
|
-
/**
|
|
83
|
-
* The Input description to guide the user if it's not obvious
|
|
84
|
-
*/
|
|
85
|
-
description: _propTypes.default.string,
|
|
86
|
-
/**
|
|
87
|
-
* Whether the input should be disabled
|
|
88
|
-
*/
|
|
89
|
-
disabled: _propTypes.default.bool,
|
|
90
|
-
/**
|
|
91
|
-
* The color of the label
|
|
92
|
-
*/
|
|
93
|
-
labelColor: _propTypes.default.string,
|
|
94
|
-
/**
|
|
95
|
-
* The input label
|
|
96
|
-
*/
|
|
97
|
-
label: _propTypes.default.string,
|
|
98
|
-
/**
|
|
99
|
-
* The number of columns the label should span
|
|
100
|
-
*/
|
|
101
|
-
labelSpan: _propTypes.default.number,
|
|
102
|
-
/**
|
|
103
|
-
* The number of columns the input should span
|
|
104
|
-
*/
|
|
105
|
-
inputSpan: _propTypes.default.number,
|
|
106
|
-
/**
|
|
107
|
-
* The number of columns the label should span on desktop
|
|
108
|
-
*/
|
|
109
|
-
desktopLabelSpan: _propTypes.default.number,
|
|
110
|
-
/**
|
|
111
|
-
* The number of columns the input should span on desktop
|
|
112
|
-
*/
|
|
113
|
-
desktopInputSpan: _propTypes.default.number,
|
|
114
|
-
/**
|
|
115
|
-
* Whether the input should have an optional tag
|
|
116
|
-
*/
|
|
117
|
-
optional: _propTypes.default.bool
|
|
118
|
-
};
|
|
119
|
-
Checkbox.defaultProps = {
|
|
120
|
-
disabled: false
|
|
121
|
-
};
|
|
122
|
-
var _default = exports.default = Checkbox;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Checkbox", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Checkbox.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
|
|
3
|
-
@use "@pareto-engineering/bem";
|
|
4
|
-
@use "@pareto-engineering/styles/src/mixins";
|
|
5
|
-
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
|
-
|
|
7
|
-
.#{bem.$base}.checkbox {
|
|
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);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var React = _react;
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
|
-
var _common = require("./common");
|
|
12
|
-
var _common2 = require("../../../common");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* @pareto-engineering/generator-front 1.0.12 */ // Local Definitions
|
|
17
|
-
const baseClassName = _exports.default.base;
|
|
18
|
-
const componentClassName = 'choices-input';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* This is the component description.
|
|
22
|
-
*/
|
|
23
|
-
const ChoicesInput = _ref => {
|
|
24
|
-
let {
|
|
25
|
-
id,
|
|
26
|
-
className: userClassName,
|
|
27
|
-
style,
|
|
28
|
-
name,
|
|
29
|
-
validate,
|
|
30
|
-
options,
|
|
31
|
-
multiple,
|
|
32
|
-
color,
|
|
33
|
-
label,
|
|
34
|
-
labelColor,
|
|
35
|
-
optional,
|
|
36
|
-
disabled,
|
|
37
|
-
description,
|
|
38
|
-
spaceBetween,
|
|
39
|
-
...otherProps
|
|
40
|
-
} = _ref;
|
|
41
|
-
(0, _react.useInsertionEffect)(() => {
|
|
42
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
43
|
-
}, []);
|
|
44
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
id: id,
|
|
46
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
47
|
-
style: style
|
|
48
|
-
}, label && /*#__PURE__*/React.createElement(_common2.FormLabelV2, {
|
|
49
|
-
name: name,
|
|
50
|
-
color: labelColor,
|
|
51
|
-
optional: optional
|
|
52
|
-
// {...otherProps}
|
|
53
|
-
}, label), /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: ['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')
|
|
55
|
-
}, options.map(choice => /*#__PURE__*/React.createElement(_common.Choice, _extends({
|
|
56
|
-
className: `x-${color}`,
|
|
57
|
-
key: choice.value,
|
|
58
|
-
name: name,
|
|
59
|
-
id: `${name}-${choice.value}`,
|
|
60
|
-
multiple: multiple,
|
|
61
|
-
validate: validate,
|
|
62
|
-
disabled: disabled
|
|
63
|
-
}, otherProps, choice)))), /*#__PURE__*/React.createElement(_common2.FormDescriptionV2, {
|
|
64
|
-
className: "s-1",
|
|
65
|
-
description: description,
|
|
66
|
-
name: name
|
|
67
|
-
}));
|
|
68
|
-
};
|
|
69
|
-
ChoicesInput.propTypes = {
|
|
70
|
-
/**
|
|
71
|
-
* The HTML id for this element
|
|
72
|
-
*/
|
|
73
|
-
id: _propTypes.default.string,
|
|
74
|
-
/**
|
|
75
|
-
* The HTML class names for this element
|
|
76
|
-
*/
|
|
77
|
-
className: _propTypes.default.string,
|
|
78
|
-
/**
|
|
79
|
-
* The React-written, css properties for this element.
|
|
80
|
-
*/
|
|
81
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
82
|
-
/**
|
|
83
|
-
* The choices name
|
|
84
|
-
*/
|
|
85
|
-
name: _propTypes.default.string.isRequired,
|
|
86
|
-
/**
|
|
87
|
-
* The input field validator function
|
|
88
|
-
*/
|
|
89
|
-
validate: _propTypes.default.string,
|
|
90
|
-
/**
|
|
91
|
-
* The choices input options
|
|
92
|
-
*/
|
|
93
|
-
options: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
94
|
-
value: _propTypes.default.string,
|
|
95
|
-
label: _propTypes.default.string
|
|
96
|
-
})),
|
|
97
|
-
/**
|
|
98
|
-
* If the input should be multiple - checkbox
|
|
99
|
-
*/
|
|
100
|
-
multiple: _propTypes.default.bool,
|
|
101
|
-
/**
|
|
102
|
-
* how many columns should be displayed on the mobile grid
|
|
103
|
-
*/
|
|
104
|
-
gridColumnsMobile: _propTypes.default.number,
|
|
105
|
-
/**
|
|
106
|
-
* The choice color
|
|
107
|
-
*/
|
|
108
|
-
color: _propTypes.default.string,
|
|
109
|
-
/**
|
|
110
|
-
* The selected choice color
|
|
111
|
-
*/
|
|
112
|
-
colorChecked: _propTypes.default.string,
|
|
113
|
-
/**
|
|
114
|
-
* The label of the choices input
|
|
115
|
-
*/
|
|
116
|
-
label: _propTypes.default.string,
|
|
117
|
-
/**
|
|
118
|
-
* Whether all the Choices inputs should be disabled
|
|
119
|
-
*/
|
|
120
|
-
disabled: _propTypes.default.bool,
|
|
121
|
-
/**
|
|
122
|
-
* Whether the input is optional or not
|
|
123
|
-
*/
|
|
124
|
-
optional: _propTypes.default.bool,
|
|
125
|
-
/**
|
|
126
|
-
* The select input description
|
|
127
|
-
*/
|
|
128
|
-
description: _propTypes.default.string,
|
|
129
|
-
/**
|
|
130
|
-
* The number of columns the label should span
|
|
131
|
-
*/
|
|
132
|
-
labelSpan: _propTypes.default.number,
|
|
133
|
-
/**
|
|
134
|
-
* The number of columns the input should span
|
|
135
|
-
*/
|
|
136
|
-
inputSpan: _propTypes.default.number,
|
|
137
|
-
/**
|
|
138
|
-
* The number of columns the label should span on desktop
|
|
139
|
-
*/
|
|
140
|
-
desktopLabelSpan: _propTypes.default.number,
|
|
141
|
-
/**
|
|
142
|
-
* The number of columns the input should span on desktop
|
|
143
|
-
*/
|
|
144
|
-
desktopInputSpan: _propTypes.default.number,
|
|
145
|
-
/**
|
|
146
|
-
* The color of the label
|
|
147
|
-
*/
|
|
148
|
-
labelColor: _propTypes.default.string
|
|
149
|
-
};
|
|
150
|
-
ChoicesInput.defaultProps = {
|
|
151
|
-
color: 'interactive',
|
|
152
|
-
disabled: false
|
|
153
|
-
};
|
|
154
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(ChoicesInput);
|