@pareto-engineering/design-system 2.0.0-alpha.14 → 2.0.0-alpha.18
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/b/Button/styles.scss +27 -2
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -5
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +13 -6
- package/dist/es/b/Button/styles.scss +27 -2
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/es/f/fields/SelectInput/styles.scss +4 -4
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TextInput/TextInput.js +19 -5
- package/dist/es/f/fields/TextInput/styles.scss +3 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +13 -6
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +284 -79
- package/src/stories/b/Button.stories.jsx +5 -4
- package/src/stories/f/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TextInput.stories.jsx +10 -0
- package/src/stories/f/TextareaInput.stories.jsx +40 -4
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +27 -2
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
- package/src/ui/f/fields/SelectInput/styles.scss +4 -4
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
- package/src/ui/f/fields/TextInput/TextInput.jsx +15 -2
- package/src/ui/f/fields/TextInput/styles.scss +3 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +21 -10
|
@@ -27,7 +27,8 @@ const TextareaInput = ({
|
|
|
27
27
|
textAreaColor,
|
|
28
28
|
labelColor,
|
|
29
29
|
description,
|
|
30
|
-
disabled
|
|
30
|
+
disabled,
|
|
31
|
+
placeholder // ...otherProps
|
|
31
32
|
|
|
32
33
|
}) => {
|
|
33
34
|
useLayoutEffect(() => {
|
|
@@ -39,16 +40,18 @@ const TextareaInput = ({
|
|
|
39
40
|
});
|
|
40
41
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
42
|
id: id,
|
|
42
|
-
className: [baseClassName, componentClassName, userClassName, `x-${textAreaColor}
|
|
43
|
+
className: [baseClassName, componentClassName, userClassName, `x-${textAreaColor}`].filter(e => e).join(' '),
|
|
43
44
|
style: style // {...otherProps}
|
|
44
45
|
|
|
45
46
|
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
46
|
-
className: [
|
|
47
|
-
name: name
|
|
47
|
+
className: [labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
48
|
+
name: name,
|
|
49
|
+
color: labelColor
|
|
48
50
|
}, label), /*#__PURE__*/React.createElement("textarea", _extends({
|
|
49
51
|
id: textAreaId,
|
|
50
52
|
className: `textarea v50 pv-v ${meta.touched && meta.error ? 'input-border-error' : 'input-border'}`
|
|
51
53
|
}, field, {
|
|
54
|
+
placeholder: placeholder,
|
|
52
55
|
rows: rows,
|
|
53
56
|
disabled: disabled
|
|
54
57
|
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
|
|
@@ -121,12 +124,16 @@ TextareaInput.propTypes = {
|
|
|
121
124
|
/**
|
|
122
125
|
* Whether the text area should be disabled
|
|
123
126
|
*/
|
|
124
|
-
disabled: PropTypes.bool
|
|
127
|
+
disabled: PropTypes.bool,
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The textarea placeholder text
|
|
131
|
+
*/
|
|
132
|
+
placeholder: PropTypes.string
|
|
125
133
|
};
|
|
126
134
|
TextareaInput.defaultProps = {
|
|
127
135
|
rows: 3,
|
|
128
136
|
textAreaColor: 'background1',
|
|
129
|
-
labelColor: 'main1',
|
|
130
137
|
disabled: false
|
|
131
138
|
};
|
|
132
139
|
export default /*#__PURE__*/memo(TextareaInput);
|