@pareto-engineering/design-system 2.0.0-alpha.12 → 2.0.0-alpha.16
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/a/BackgroundGradient/styles.scss +2 -4
- package/dist/cjs/a/Conversation/Conversation.js +15 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
- package/dist/cjs/a/Conversation/styles.scss +139 -32
- package/dist/cjs/b/Button/styles.scss +43 -18
- package/dist/cjs/b/Page/common/Section/Section.js +16 -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 +10 -3
- package/dist/cjs/f/fields/TextInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/a/BackgroundGradient/styles.scss +2 -4
- package/dist/es/a/Conversation/Conversation.js +15 -8
- package/dist/es/a/Conversation/common/Message/Message.js +33 -6
- package/dist/es/a/Conversation/styles.scss +139 -32
- package/dist/es/b/Button/styles.scss +43 -18
- package/dist/es/b/Page/common/Section/Section.js +16 -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 +10 -3
- package/dist/es/f/fields/TextInput/styles.scss +4 -4
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/package.json +2 -2
- package/src/__snapshots__/Storyshots.test.js.snap +452 -93
- package/src/local.scss +1 -0
- package/src/stories/a/BackgroundGradient.stories.jsx +4 -6
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/b/Button.stories.jsx +5 -4
- package/src/stories/b/Page.stories.jsx +25 -1
- package/src/stories/f/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TextInput.stories.jsx +10 -0
- package/src/ui/a/BackgroundGradient/styles.scss +2 -4
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
- package/src/ui/a/Conversation/styles.scss +139 -32
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/styles.scss +43 -18
- package/src/ui/b/Page/common/Section/Section.jsx +18 -1
- 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 +7 -0
- package/src/ui/f/fields/TextInput/styles.scss +4 -4
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
|
@@ -24,7 +24,8 @@ const TextInput = ({
|
|
|
24
24
|
validate,
|
|
25
25
|
oneInputLabel,
|
|
26
26
|
description,
|
|
27
|
-
disabled
|
|
27
|
+
disabled,
|
|
28
|
+
placeholder // ...otherProps
|
|
28
29
|
|
|
29
30
|
}) => {
|
|
30
31
|
useLayoutEffect(() => {
|
|
@@ -46,7 +47,8 @@ const TextInput = ({
|
|
|
46
47
|
id: name,
|
|
47
48
|
className: `input ${meta.touched && meta.error ? 'input-border-error' : 'input-border'}`,
|
|
48
49
|
type: type,
|
|
49
|
-
disabled: disabled
|
|
50
|
+
disabled: disabled,
|
|
51
|
+
placeholder: placeholder
|
|
50
52
|
}, field)), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
|
|
51
53
|
isError: !!meta.error,
|
|
52
54
|
className: "v50 mt-v s-1"
|
|
@@ -102,7 +104,12 @@ TextInput.propTypes = {
|
|
|
102
104
|
/**
|
|
103
105
|
* Whether the text input should be disabled
|
|
104
106
|
*/
|
|
105
|
-
disabled: PropTypes.bool
|
|
107
|
+
disabled: PropTypes.bool,
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The placeholder text for the input
|
|
111
|
+
*/
|
|
112
|
+
placeholder: PropTypes.string
|
|
106
113
|
};
|
|
107
114
|
TextInput.defaultProps = {
|
|
108
115
|
type: 'text',
|
|
@@ -10,16 +10,16 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
|
|
12
12
|
.input-label {
|
|
13
|
-
color: var(--
|
|
13
|
+
color: var(--main2);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.input {
|
|
17
|
-
background: var(--light-
|
|
18
|
-
color: var(--on-
|
|
17
|
+
background: var(--light-background2);
|
|
18
|
+
color: var(--on-background2);
|
|
19
19
|
padding: $default-padding;
|
|
20
20
|
|
|
21
21
|
&:focus {
|
|
22
|
-
background: var(--dark-
|
|
22
|
+
background: var(--dark-background2);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pareto-engineering/design-system",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"stylelint-config-palantir": "^5.1.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@pareto-engineering/assets": "^2.0.0-alpha.
|
|
82
|
+
"@pareto-engineering/assets": "^2.0.0-alpha.8",
|
|
83
83
|
"@pareto-engineering/bem": "^0.1.5",
|
|
84
84
|
"@pareto-engineering/styles": "^2.0.0-alpha.8",
|
|
85
85
|
"date-fns": "^2.22.1",
|