@pareto-engineering/design-system 2.0.0-alpha.39 → 2.0.0-alpha.41

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 (163) hide show
  1. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -4
  2. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +39 -6
  3. package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
  4. package/dist/cjs/f/fields/TextInput/TextInput.js +10 -3
  5. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +11 -4
  6. package/dist/es/f/fields/RatingsInput/RatingsInput.js +38 -6
  7. package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
  8. package/dist/es/f/fields/TextInput/TextInput.js +10 -3
  9. package/package.json +1 -1
  10. package/src/__snapshots__/Storyshots.test.js.snap +655 -625
  11. package/src/stories/f/RatingsInput.stories.jsx +3 -2
  12. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +8 -1
  13. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +54 -19
  14. package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
  15. package/src/ui/f/fields/TextInput/TextInput.jsx +7 -0
  16. package/dist/cjs/a/GradientBackground/GradientBackground.js +0 -140
  17. package/dist/cjs/a/GradientBackground/index.js +0 -15
  18. package/dist/cjs/a/GradientBackground/styles.scss +0 -191
  19. package/dist/cjs/c/AcceptCookies/AcceptCookies.js +0 -134
  20. package/dist/cjs/c/AcceptCookies/index.js +0 -15
  21. package/dist/cjs/c/AcceptCookies/styles.scss +0 -49
  22. package/dist/cjs/c/BlogCategoryButton/BlogCategoryButton.js +0 -95
  23. package/dist/cjs/c/BlogCategoryButton/index.js +0 -15
  24. package/dist/cjs/c/BlogContext/BlogContextProvider.js +0 -63
  25. package/dist/cjs/c/BlogContext/Context.js +0 -16
  26. package/dist/cjs/c/BlogContext/ContextProvider.js +0 -63
  27. package/dist/cjs/c/BlogContext/index.js +0 -31
  28. package/dist/cjs/c/BlogContext/useBlog.js +0 -16
  29. package/dist/cjs/c/BlogPost/BlogPost.js +0 -147
  30. package/dist/cjs/c/BlogPost/index.js +0 -15
  31. package/dist/cjs/c/BlogPost/styles.scss +0 -33
  32. package/dist/cjs/c/BlogPostsList/BlogPostsList.js +0 -73
  33. package/dist/cjs/c/BlogPostsList/common/Card/Card.js +0 -170
  34. package/dist/cjs/c/BlogPostsList/common/Card/index.js +0 -15
  35. package/dist/cjs/c/BlogPostsList/common/index.js +0 -13
  36. package/dist/cjs/c/BlogPostsList/index.js +0 -15
  37. package/dist/cjs/c/BlogPostsList/styles.scss +0 -72
  38. package/dist/cjs/c/SiteFooter/SiteFooter.js +0 -73
  39. package/dist/cjs/c/SiteFooter/common/Section/Section.js +0 -95
  40. package/dist/cjs/c/SiteFooter/common/Section/index.js +0 -15
  41. package/dist/cjs/c/SiteFooter/common/index.js +0 -13
  42. package/dist/cjs/c/SiteFooter/index.js +0 -15
  43. package/dist/cjs/c/SiteFooter/styles.scss +0 -34
  44. package/dist/cjs/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -108
  45. package/dist/cjs/c/SiteHeaderCTA/index.js +0 -15
  46. package/dist/cjs/c/SiteHeaderCTA/styles.scss +0 -44
  47. package/dist/cjs/c/SiteMission/SiteMission.js +0 -113
  48. package/dist/cjs/c/SiteMission/index.js +0 -15
  49. package/dist/cjs/c/SiteMission/styles.scss +0 -30
  50. package/dist/cjs/c/SiteNavigation/SiteNavigation.js +0 -130
  51. package/dist/cjs/c/SiteNavigation/index.js +0 -15
  52. package/dist/cjs/c/SiteNavigation/styles.scss +0 -118
  53. package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -98
  54. package/dist/cjs/c/SiteOnboardingStep/index.js +0 -15
  55. package/dist/cjs/c/SiteOnboardingStep/styles.scss +0 -51
  56. package/dist/cjs/c/SitePricing/SitePricing.js +0 -108
  57. package/dist/cjs/c/SitePricing/index.js +0 -15
  58. package/dist/cjs/c/SitePricing/styles.scss +0 -73
  59. package/dist/cjs/c/SiteServices/SiteServices.js +0 -211
  60. package/dist/cjs/c/SiteServices/index.js +0 -15
  61. package/dist/cjs/c/SiteServices/styles.scss +0 -138
  62. package/dist/cjs/c/TeamGallery/TeamGallery.js +0 -80
  63. package/dist/cjs/c/TeamGallery/common/PersonCard/PersonCard.js +0 -84
  64. package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +0 -15
  65. package/dist/cjs/c/TeamGallery/common/index.js +0 -13
  66. package/dist/cjs/c/TeamGallery/index.js +0 -15
  67. package/dist/cjs/c/TeamGallery/styles.scss +0 -100
  68. package/dist/cjs/c/Testimonials/Testimonials.js +0 -119
  69. package/dist/cjs/c/Testimonials/index.js +0 -15
  70. package/dist/cjs/c/Testimonials/styles.scss +0 -112
  71. package/dist/cjs/experimental/GradientBackground/GradientBackground.js +0 -98
  72. package/dist/cjs/experimental/GradientBackground/index.js +0 -15
  73. package/dist/cjs/experimental/GradientBackground/styles.scss +0 -64
  74. package/dist/cjs/experimental/index.js +0 -13
  75. package/dist/cjs/f/fields/CheckboxInput/CheckboxInput.js +0 -105
  76. package/dist/cjs/f/fields/CheckboxInput/index.js +0 -15
  77. package/dist/cjs/f/fields/CheckboxInput/styles.scss +0 -28
  78. package/dist/cjs/f/fields/RadioInput/RadioInput.js +0 -110
  79. package/dist/cjs/f/fields/RadioInput/index.js +0 -15
  80. package/dist/cjs/f/fields/RadioInput/styles.scss +0 -26
  81. package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +0 -129
  82. package/dist/cjs/f/fields/TaskRecommendation/index.js +0 -15
  83. package/dist/cjs/f/fields/TaskRecommendation/styles.scss +0 -37
  84. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +0 -131
  85. package/dist/cjs/f/fields/TaskRecommendationInput/index.js +0 -15
  86. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +0 -41
  87. package/dist/cjs/f/fields/TextArea/TextArea.js +0 -141
  88. package/dist/cjs/f/fields/TextArea/index.js +0 -15
  89. package/dist/cjs/f/fields/TextArea/styles.scss +0 -19
  90. package/dist/es/a/GradientBackground/GradientBackground.js +0 -118
  91. package/dist/es/a/GradientBackground/index.js +0 -2
  92. package/dist/es/a/GradientBackground/styles.scss +0 -191
  93. package/dist/es/c/AcceptCookies/AcceptCookies.js +0 -117
  94. package/dist/es/c/AcceptCookies/index.js +0 -2
  95. package/dist/es/c/AcceptCookies/styles.scss +0 -49
  96. package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +0 -68
  97. package/dist/es/c/BlogCategoryButton/index.js +0 -2
  98. package/dist/es/c/BlogContext/BlogContextProvider.js +0 -45
  99. package/dist/es/c/BlogContext/Context.js +0 -2
  100. package/dist/es/c/BlogContext/ContextProvider.js +0 -45
  101. package/dist/es/c/BlogContext/index.js +0 -4
  102. package/dist/es/c/BlogContext/useBlog.js +0 -3
  103. package/dist/es/c/BlogPost/BlogPost.js +0 -128
  104. package/dist/es/c/BlogPost/index.js +0 -2
  105. package/dist/es/c/BlogPost/styles.scss +0 -33
  106. package/dist/es/c/BlogPostsList/BlogPostsList.js +0 -56
  107. package/dist/es/c/BlogPostsList/common/Card/Card.js +0 -143
  108. package/dist/es/c/BlogPostsList/common/Card/index.js +0 -2
  109. package/dist/es/c/BlogPostsList/common/index.js +0 -1
  110. package/dist/es/c/BlogPostsList/index.js +0 -2
  111. package/dist/es/c/BlogPostsList/styles.scss +0 -72
  112. package/dist/es/c/SiteFooter/SiteFooter.js +0 -56
  113. package/dist/es/c/SiteFooter/common/Section/Section.js +0 -73
  114. package/dist/es/c/SiteFooter/common/Section/index.js +0 -2
  115. package/dist/es/c/SiteFooter/common/index.js +0 -1
  116. package/dist/es/c/SiteFooter/index.js +0 -2
  117. package/dist/es/c/SiteFooter/styles.scss +0 -34
  118. package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -92
  119. package/dist/es/c/SiteHeaderCTA/index.js +0 -2
  120. package/dist/es/c/SiteHeaderCTA/styles.scss +0 -44
  121. package/dist/es/c/SiteMission/SiteMission.js +0 -96
  122. package/dist/es/c/SiteMission/index.js +0 -2
  123. package/dist/es/c/SiteMission/styles.scss +0 -30
  124. package/dist/es/c/SiteNavigation/SiteNavigation.js +0 -111
  125. package/dist/es/c/SiteNavigation/index.js +0 -2
  126. package/dist/es/c/SiteNavigation/styles.scss +0 -118
  127. package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -81
  128. package/dist/es/c/SiteOnboardingStep/index.js +0 -2
  129. package/dist/es/c/SiteOnboardingStep/styles.scss +0 -51
  130. package/dist/es/c/SitePricing/SitePricing.js +0 -91
  131. package/dist/es/c/SitePricing/index.js +0 -2
  132. package/dist/es/c/SitePricing/styles.scss +0 -73
  133. package/dist/es/c/SiteServices/SiteServices.js +0 -195
  134. package/dist/es/c/SiteServices/index.js +0 -2
  135. package/dist/es/c/SiteServices/styles.scss +0 -138
  136. package/dist/es/c/TeamGallery/TeamGallery.js +0 -64
  137. package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +0 -64
  138. package/dist/es/c/TeamGallery/common/PersonCard/index.js +0 -2
  139. package/dist/es/c/TeamGallery/common/index.js +0 -1
  140. package/dist/es/c/TeamGallery/index.js +0 -2
  141. package/dist/es/c/TeamGallery/styles.scss +0 -100
  142. package/dist/es/c/Testimonials/Testimonials.js +0 -99
  143. package/dist/es/c/Testimonials/index.js +0 -2
  144. package/dist/es/c/Testimonials/styles.scss +0 -112
  145. package/dist/es/experimental/GradientBackground/GradientBackground.js +0 -76
  146. package/dist/es/experimental/GradientBackground/index.js +0 -2
  147. package/dist/es/experimental/GradientBackground/styles.scss +0 -64
  148. package/dist/es/experimental/index.js +0 -1
  149. package/dist/es/f/fields/CheckboxInput/CheckboxInput.js +0 -85
  150. package/dist/es/f/fields/CheckboxInput/index.js +0 -2
  151. package/dist/es/f/fields/CheckboxInput/styles.scss +0 -28
  152. package/dist/es/f/fields/RadioInput/RadioInput.js +0 -90
  153. package/dist/es/f/fields/RadioInput/index.js +0 -2
  154. package/dist/es/f/fields/RadioInput/styles.scss +0 -26
  155. package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +0 -111
  156. package/dist/es/f/fields/TaskRecommendation/index.js +0 -2
  157. package/dist/es/f/fields/TaskRecommendation/styles.scss +0 -37
  158. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +0 -111
  159. package/dist/es/f/fields/TaskRecommendationInput/index.js +0 -2
  160. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +0 -41
  161. package/dist/es/f/fields/TextArea/TextArea.js +0 -124
  162. package/dist/es/f/fields/TextArea/index.js +0 -2
  163. package/dist/es/f/fields/TextArea/styles.scss +0 -19
@@ -39,7 +39,8 @@ var HorizontalMenu = _ref => {
39
39
  logoColor,
40
40
  hideBackIcon,
41
41
  stepsBackwards,
42
- customPrevStep // ...otherProps
42
+ customPrevStep,
43
+ color // ...otherProps
43
44
 
44
45
  } = _ref;
45
46
  var {
@@ -68,7 +69,7 @@ var HorizontalMenu = _ref => {
68
69
  progress: currentStep.progress,
69
70
  attached: true,
70
71
  height: ".4em",
71
- color: "main2",
72
+ color: color,
72
73
  className: "y-background1 b-dark-y"
73
74
  }), /*#__PURE__*/React.createElement("div", {
74
75
  className: _bem.default.elementContent
@@ -125,11 +126,17 @@ HorizontalMenu.propTypes = {
125
126
  /**
126
127
  * Hide back icon boolean
127
128
  */
128
- hideBackIcon: _propTypes.default.bool
129
+ hideBackIcon: _propTypes.default.bool,
130
+
131
+ /**
132
+ * String that will represent color for Progress bar
133
+ */
134
+ color: _propTypes.default.string
129
135
  };
130
136
  HorizontalMenu.defaultProps = {
131
137
  logoColor: 'paragraph',
132
- stepsBackwards: 1
138
+ stepsBackwards: 1,
139
+ color: 'main2'
133
140
  };
134
141
  var _default = HorizontalMenu;
135
142
  exports.default = _default;
@@ -13,6 +13,8 @@ var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
13
13
 
14
14
  var _common = require("./common");
15
15
 
16
+ var _common2 = require("../../common");
17
+
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -33,9 +35,13 @@ var RatingsInput = _ref => {
33
35
  name,
34
36
  ratingCount,
35
37
  showRatingValue,
38
+ oneInputLabel,
39
+ label,
40
+ labelColor,
36
41
  labelMax,
37
42
  labelMin,
38
- displayRatingsLabel // ...otherProps
43
+ displayRatingsLabel,
44
+ optional // ...otherProps
39
45
 
40
46
  } = _ref;
41
47
  (0, React.useLayoutEffect)(() => {
@@ -45,8 +51,14 @@ var RatingsInput = _ref => {
45
51
  return /*#__PURE__*/React.createElement("div", {
46
52
  id: id,
47
53
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
48
- style: style // {...otherProps}
49
-
54
+ style: style
55
+ }, /*#__PURE__*/React.createElement(_common2.FormLabel, {
56
+ className: ['input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
57
+ name: name,
58
+ color: labelColor,
59
+ optional: optional
60
+ }, label), /*#__PURE__*/React.createElement("div", {
61
+ className: "stars"
50
62
  }, displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
51
63
  className: "label-text md-s-1 s-2 x-metadata c-x"
52
64
  }, labelMin), [...Array(ratingCount)].map((_, index) => {
@@ -62,7 +74,7 @@ var RatingsInput = _ref => {
62
74
  });
63
75
  }), displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
64
76
  className: "label-text md-s-1 s-2 x-metadata c-x"
65
- }, labelMax));
77
+ }, labelMax)));
66
78
  };
67
79
 
68
80
  RatingsInput.propTypes = {
@@ -96,6 +108,11 @@ RatingsInput.propTypes = {
96
108
  */
97
109
  showRatingValue: _propTypes.default.bool,
98
110
 
111
+ /**
112
+ * The label of the ratings input
113
+ */
114
+ label: _propTypes.default.string.isRequired,
115
+
99
116
  /**
100
117
  * description for the highest rating value
101
118
  */
@@ -109,11 +126,27 @@ RatingsInput.propTypes = {
109
126
  /**
110
127
  * If the rating lables should be shown
111
128
  */
112
- displayRatingsLabel: _propTypes.default.bool
129
+ displayRatingsLabel: _propTypes.default.bool,
130
+
131
+ /**
132
+ * Whether the input is optional or not
133
+ */
134
+ optional: _propTypes.default.bool,
135
+
136
+ /**
137
+ * If the slide will only have one input
138
+ */
139
+ oneInputLabel: _propTypes.default.bool,
140
+
141
+ /**
142
+ * String that will represent color for the label
143
+ */
144
+ labelColor: _propTypes.default.string
113
145
  };
114
146
  RatingsInput.defaultProps = {
115
147
  labelMin: 'not satisfied.',
116
- labelMax: 'very satisfied.'
148
+ labelMax: 'very satisfied.',
149
+ labelColor: 'main2'
117
150
  };
118
151
 
119
152
  var _default = /*#__PURE__*/(0, React.memo)(RatingsInput);
@@ -7,34 +7,43 @@ $default-transition: all .2s;
7
7
 
8
8
  .#{bem.$base}.ratings-input {
9
9
  display: flex;
10
+ flex-direction: column;
10
11
 
11
- >:not(:last-child) {
12
- margin-right: $default-rating-icon-margin;
12
+ p {
13
+ padding: $default-padding;
13
14
  }
14
15
 
15
- .#{bem.$base}.rating {
16
+ .stars {
16
17
  display: flex;
17
18
 
18
- input {
19
- opacity: 0;
20
- position: absolute;
21
- visibility: none;
22
- z-index: -1;
19
+ >:not(:last-child) {
20
+ margin-right: $default-rating-icon-margin;
23
21
  }
24
-
25
- label {
22
+
23
+ .#{bem.$base}.rating {
26
24
  display: flex;
27
- flex-direction: column;
28
- align-items: center;
29
- padding: $default-padding;
30
- transition: $default-transition;
31
- cursor: pointer;
25
+
26
+ input {
27
+ opacity: 0;
28
+ position: absolute;
29
+ visibility: none;
30
+ z-index: -1;
31
+ }
32
+
33
+ label {
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ padding: $default-padding;
38
+ transition: $default-transition;
39
+ cursor: pointer;
40
+ }
41
+ }
42
+
43
+ .label-text {
44
+ margin-bottom: 0;
45
+ align-self: flex-end;
32
46
  }
33
- }
34
-
35
- .label-text {
36
- margin-bottom: 0;
37
- align-self: flex-end;
38
47
  }
39
48
  }
40
49
 
@@ -44,7 +44,8 @@ var TextInput = _ref => {
44
44
  oneInputLabel,
45
45
  description,
46
46
  disabled,
47
- placeholder // ...otherProps
47
+ placeholder,
48
+ optional // ...otherProps
48
49
 
49
50
  } = _ref;
50
51
  (0, React.useLayoutEffect)(() => {
@@ -62,7 +63,8 @@ var TextInput = _ref => {
62
63
  }, /*#__PURE__*/React.createElement(_common.FormLabel, {
63
64
  className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
64
65
  name: name,
65
- color: labelColor
66
+ color: labelColor,
67
+ optional: optional
66
68
  }, label), /*#__PURE__*/React.createElement("input", _extends({
67
69
  id: name,
68
70
  className: "input",
@@ -139,7 +141,12 @@ TextInput.propTypes = {
139
141
  /**
140
142
  * The text input color
141
143
  */
142
- color: _propTypes.default.string
144
+ color: _propTypes.default.string,
145
+
146
+ /**
147
+ * Whether the input is optional or not
148
+ */
149
+ optional: _propTypes.default.bool
143
150
  };
144
151
  TextInput.defaultProps = {
145
152
  type: 'text',
@@ -19,7 +19,8 @@ const HorizontalMenu = ({
19
19
  logoColor,
20
20
  hideBackIcon,
21
21
  stepsBackwards,
22
- customPrevStep // ...otherProps
22
+ customPrevStep,
23
+ color // ...otherProps
23
24
 
24
25
  }) => {
25
26
  const {
@@ -48,7 +49,7 @@ const HorizontalMenu = ({
48
49
  progress: currentStep.progress,
49
50
  attached: true,
50
51
  height: ".4em",
51
- color: "main2",
52
+ color: color,
52
53
  className: "y-background1 b-dark-y"
53
54
  }), /*#__PURE__*/React.createElement("div", {
54
55
  className: styleNames.elementContent
@@ -105,10 +106,16 @@ HorizontalMenu.propTypes = {
105
106
  /**
106
107
  * Hide back icon boolean
107
108
  */
108
- hideBackIcon: PropTypes.bool
109
+ hideBackIcon: PropTypes.bool,
110
+
111
+ /**
112
+ * String that will represent color for Progress bar
113
+ */
114
+ color: PropTypes.string
109
115
  };
110
116
  HorizontalMenu.defaultProps = {
111
117
  logoColor: 'paragraph',
112
- stepsBackwards: 1
118
+ stepsBackwards: 1,
119
+ color: 'main2'
113
120
  };
114
121
  export default HorizontalMenu;
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem'; // Local Definitions
6
6
 
7
7
  import { Rating } from "./common";
8
+ import { FormLabel } from "../../common";
8
9
  const baseClassName = styleNames.base;
9
10
  const componentClassName = 'ratings-input';
10
11
  /**
@@ -18,9 +19,13 @@ const RatingsInput = ({
18
19
  name,
19
20
  ratingCount,
20
21
  showRatingValue,
22
+ oneInputLabel,
23
+ label,
24
+ labelColor,
21
25
  labelMax,
22
26
  labelMin,
23
- displayRatingsLabel // ...otherProps
27
+ displayRatingsLabel,
28
+ optional // ...otherProps
24
29
 
25
30
  }) => {
26
31
  useLayoutEffect(() => {
@@ -30,8 +35,14 @@ const RatingsInput = ({
30
35
  return /*#__PURE__*/React.createElement("div", {
31
36
  id: id,
32
37
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
33
- style: style // {...otherProps}
34
-
38
+ style: style
39
+ }, /*#__PURE__*/React.createElement(FormLabel, {
40
+ className: ['input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
41
+ name: name,
42
+ color: labelColor,
43
+ optional: optional
44
+ }, label), /*#__PURE__*/React.createElement("div", {
45
+ className: "stars"
35
46
  }, displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
36
47
  className: "label-text md-s-1 s-2 x-metadata c-x"
37
48
  }, labelMin), [...Array(ratingCount)].map((_, index) => {
@@ -47,7 +58,7 @@ const RatingsInput = ({
47
58
  });
48
59
  }), displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
49
60
  className: "label-text md-s-1 s-2 x-metadata c-x"
50
- }, labelMax));
61
+ }, labelMax)));
51
62
  };
52
63
 
53
64
  RatingsInput.propTypes = {
@@ -81,6 +92,11 @@ RatingsInput.propTypes = {
81
92
  */
82
93
  showRatingValue: PropTypes.bool,
83
94
 
95
+ /**
96
+ * The label of the ratings input
97
+ */
98
+ label: PropTypes.string.isRequired,
99
+
84
100
  /**
85
101
  * description for the highest rating value
86
102
  */
@@ -94,10 +110,26 @@ RatingsInput.propTypes = {
94
110
  /**
95
111
  * If the rating lables should be shown
96
112
  */
97
- displayRatingsLabel: PropTypes.bool
113
+ displayRatingsLabel: PropTypes.bool,
114
+
115
+ /**
116
+ * Whether the input is optional or not
117
+ */
118
+ optional: PropTypes.bool,
119
+
120
+ /**
121
+ * If the slide will only have one input
122
+ */
123
+ oneInputLabel: PropTypes.bool,
124
+
125
+ /**
126
+ * String that will represent color for the label
127
+ */
128
+ labelColor: PropTypes.string
98
129
  };
99
130
  RatingsInput.defaultProps = {
100
131
  labelMin: 'not satisfied.',
101
- labelMax: 'very satisfied.'
132
+ labelMax: 'very satisfied.',
133
+ labelColor: 'main2'
102
134
  };
103
135
  export default /*#__PURE__*/memo(RatingsInput);
@@ -7,34 +7,43 @@ $default-transition: all .2s;
7
7
 
8
8
  .#{bem.$base}.ratings-input {
9
9
  display: flex;
10
+ flex-direction: column;
10
11
 
11
- >:not(:last-child) {
12
- margin-right: $default-rating-icon-margin;
12
+ p {
13
+ padding: $default-padding;
13
14
  }
14
15
 
15
- .#{bem.$base}.rating {
16
+ .stars {
16
17
  display: flex;
17
18
 
18
- input {
19
- opacity: 0;
20
- position: absolute;
21
- visibility: none;
22
- z-index: -1;
19
+ >:not(:last-child) {
20
+ margin-right: $default-rating-icon-margin;
23
21
  }
24
-
25
- label {
22
+
23
+ .#{bem.$base}.rating {
26
24
  display: flex;
27
- flex-direction: column;
28
- align-items: center;
29
- padding: $default-padding;
30
- transition: $default-transition;
31
- cursor: pointer;
25
+
26
+ input {
27
+ opacity: 0;
28
+ position: absolute;
29
+ visibility: none;
30
+ z-index: -1;
31
+ }
32
+
33
+ label {
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ padding: $default-padding;
38
+ transition: $default-transition;
39
+ cursor: pointer;
40
+ }
41
+ }
42
+
43
+ .label-text {
44
+ margin-bottom: 0;
45
+ align-self: flex-end;
32
46
  }
33
- }
34
-
35
- .label-text {
36
- margin-bottom: 0;
37
- align-self: flex-end;
38
47
  }
39
48
  }
40
49
 
@@ -27,7 +27,8 @@ const TextInput = ({
27
27
  oneInputLabel,
28
28
  description,
29
29
  disabled,
30
- placeholder // ...otherProps
30
+ placeholder,
31
+ optional // ...otherProps
31
32
 
32
33
  }) => {
33
34
  useLayoutEffect(() => {
@@ -45,7 +46,8 @@ const TextInput = ({
45
46
  }, /*#__PURE__*/React.createElement(FormLabel, {
46
47
  className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
47
48
  name: name,
48
- color: labelColor
49
+ color: labelColor,
50
+ optional: optional
49
51
  }, label), /*#__PURE__*/React.createElement("input", _extends({
50
52
  id: name,
51
53
  className: "input",
@@ -122,7 +124,12 @@ TextInput.propTypes = {
122
124
  /**
123
125
  * The text input color
124
126
  */
125
- color: PropTypes.string
127
+ color: PropTypes.string,
128
+
129
+ /**
130
+ * Whether the input is optional or not
131
+ */
132
+ optional: PropTypes.bool
126
133
  };
127
134
  TextInput.defaultProps = {
128
135
  type: 'text',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "2.0.0-alpha.39",
3
+ "version": "2.0.0-alpha.41",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",