@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.
Files changed (58) hide show
  1. package/dist/cjs/a/BackgroundGradient/styles.scss +2 -4
  2. package/dist/cjs/a/Conversation/Conversation.js +15 -8
  3. package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
  4. package/dist/cjs/a/Conversation/styles.scss +139 -32
  5. package/dist/cjs/b/Button/styles.scss +43 -18
  6. package/dist/cjs/b/Page/common/Section/Section.js +16 -2
  7. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  8. package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
  9. package/dist/cjs/f/common/Label/Label.js +1 -1
  10. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  11. package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
  12. package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
  13. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  14. package/dist/cjs/f/fields/TextInput/TextInput.js +10 -3
  15. package/dist/cjs/f/fields/TextInput/styles.scss +4 -4
  16. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
  17. package/dist/es/a/BackgroundGradient/styles.scss +2 -4
  18. package/dist/es/a/Conversation/Conversation.js +15 -8
  19. package/dist/es/a/Conversation/common/Message/Message.js +33 -6
  20. package/dist/es/a/Conversation/styles.scss +139 -32
  21. package/dist/es/b/Button/styles.scss +43 -18
  22. package/dist/es/b/Page/common/Section/Section.js +16 -2
  23. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  24. package/dist/es/f/common/Debugger/Debugger.js +1 -1
  25. package/dist/es/f/common/Label/Label.js +1 -1
  26. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  27. package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
  28. package/dist/es/f/fields/SelectInput/styles.scss +4 -4
  29. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  30. package/dist/es/f/fields/TextInput/TextInput.js +10 -3
  31. package/dist/es/f/fields/TextInput/styles.scss +4 -4
  32. package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
  33. package/package.json +2 -2
  34. package/src/__snapshots__/Storyshots.test.js.snap +452 -93
  35. package/src/local.scss +1 -0
  36. package/src/stories/a/BackgroundGradient.stories.jsx +4 -6
  37. package/src/stories/a/Conversation.stories.jsx +78 -1
  38. package/src/stories/b/Button.stories.jsx +5 -4
  39. package/src/stories/b/Page.stories.jsx +25 -1
  40. package/src/stories/f/SelectInput.stories.jsx +29 -0
  41. package/src/stories/f/TextInput.stories.jsx +10 -0
  42. package/src/ui/a/BackgroundGradient/styles.scss +2 -4
  43. package/src/ui/a/Conversation/Conversation.jsx +15 -7
  44. package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
  45. package/src/ui/a/Conversation/styles.scss +139 -32
  46. package/src/ui/b/Button/Button.jsx +2 -1
  47. package/src/ui/b/Button/styles.scss +43 -18
  48. package/src/ui/b/Page/common/Section/Section.jsx +18 -1
  49. package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
  50. package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
  51. package/src/ui/f/common/Label/Label.jsx +1 -1
  52. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
  53. package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
  54. package/src/ui/f/fields/SelectInput/styles.scss +4 -4
  55. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
  56. package/src/ui/f/fields/TextInput/TextInput.jsx +7 -0
  57. package/src/ui/f/fields/TextInput/styles.scss +4 -4
  58. 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 // ...otherProps
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(--main1);
13
+ color: var(--main2);
14
14
  }
15
15
 
16
16
  .input {
17
- background: var(--light-background1);
18
- color: var(--on-background1);
17
+ background: var(--light-background2);
18
+ color: var(--on-background2);
19
19
  padding: $default-padding;
20
20
 
21
21
  &:focus {
22
- background: var(--dark-background1);
22
+ background: var(--dark-background2);
23
23
  }
24
24
  }
25
25
  }
@@ -126,7 +126,7 @@ TextareaInput.propTypes = {
126
126
  TextareaInput.defaultProps = {
127
127
  rows: 3,
128
128
  textAreaColor: 'background1',
129
- labelColor: 'main1',
129
+ labelColor: 'main2',
130
130
  disabled: false
131
131
  };
132
132
  export default /*#__PURE__*/memo(TextareaInput);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "2.0.0-alpha.12",
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.5",
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",