@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.20

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 (181) hide show
  1. package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +16 -29
  2. package/dist/cjs/a/AnimatedCounter/styles.scss +3 -11
  3. package/dist/cjs/a/{RatingsInput/common/Rating/Rating.js → BackgroundGradient/BackgroundGradient.js} +22 -65
  4. package/dist/cjs/a/BackgroundGradient/index.js +15 -0
  5. package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
  6. package/dist/cjs/a/Conversation/Conversation.js +15 -8
  7. package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
  8. package/dist/cjs/a/Conversation/styles.scss +129 -32
  9. package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
  10. package/dist/cjs/a/GradientBackground/index.js +15 -0
  11. package/dist/cjs/a/GradientBackground/styles.scss +191 -0
  12. package/dist/cjs/a/OvalIllustration/OvalIllustration.js +133 -0
  13. package/dist/cjs/a/OvalIllustration/index.js +15 -0
  14. package/dist/cjs/a/OvalIllustration/styles.scss +102 -0
  15. package/dist/cjs/a/People/People.js +15 -7
  16. package/dist/cjs/a/People/common/Person/Person.js +11 -4
  17. package/dist/cjs/a/People/styles.scss +13 -15
  18. package/dist/cjs/a/Shapes/Shapes.js +171 -0
  19. package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
  20. package/dist/cjs/a/Shapes/styles.scss +255 -0
  21. package/dist/cjs/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
  22. package/dist/cjs/a/{RatingsInput → SnapScroller}/index.js +3 -3
  23. package/dist/cjs/a/SnapScroller/styles.scss +38 -0
  24. package/dist/cjs/a/TeamInfo/styles.scss +2 -2
  25. package/dist/cjs/a/index.js +33 -1
  26. package/dist/cjs/b/Button/Button.js +10 -4
  27. package/dist/cjs/b/Button/styles.scss +82 -18
  28. package/dist/cjs/b/Metrics/Metrics.js +89 -0
  29. package/dist/cjs/b/Metrics/index.js +15 -0
  30. package/dist/cjs/b/Metrics/styles.scss +91 -0
  31. package/dist/cjs/b/Page/common/Section/Section.js +56 -5
  32. package/dist/cjs/b/Page/styles.scss +8 -2
  33. package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
  34. package/dist/cjs/b/index.js +9 -1
  35. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  36. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  37. package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
  38. package/dist/cjs/experimental/GradientBackground/index.js +15 -0
  39. package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
  40. package/dist/cjs/experimental/index.js +13 -0
  41. package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
  42. package/dist/cjs/f/common/Label/Label.js +1 -1
  43. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
  44. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  45. package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
  46. package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
  47. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  48. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
  49. package/dist/cjs/f/fields/TextInput/TextInput.js +19 -5
  50. package/dist/cjs/f/fields/TextInput/styles.scss +3 -7
  51. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +14 -7
  52. package/dist/cjs/form.scss +1 -1
  53. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
  54. package/dist/es/a/AnimatedCounter/styles.scss +3 -11
  55. package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
  56. package/dist/es/a/BackgroundGradient/index.js +2 -0
  57. package/dist/es/a/BackgroundGradient/styles.scss +16 -0
  58. package/dist/es/a/Conversation/Conversation.js +15 -8
  59. package/dist/es/a/Conversation/common/Message/Message.js +33 -6
  60. package/dist/es/a/Conversation/styles.scss +129 -32
  61. package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
  62. package/dist/es/a/GradientBackground/index.js +2 -0
  63. package/dist/es/a/GradientBackground/styles.scss +191 -0
  64. package/dist/es/a/OvalIllustration/OvalIllustration.js +111 -0
  65. package/dist/es/a/OvalIllustration/index.js +2 -0
  66. package/dist/es/a/OvalIllustration/styles.scss +102 -0
  67. package/dist/es/a/People/People.js +14 -7
  68. package/dist/es/a/People/common/Person/Person.js +11 -4
  69. package/dist/es/a/People/styles.scss +13 -15
  70. package/dist/es/a/Shapes/Shapes.js +149 -0
  71. package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
  72. package/dist/es/a/Shapes/styles.scss +255 -0
  73. package/dist/es/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
  74. package/dist/es/a/SnapScroller/index.js +2 -0
  75. package/dist/es/a/SnapScroller/styles.scss +38 -0
  76. package/dist/es/a/TeamInfo/styles.scss +2 -2
  77. package/dist/es/a/index.js +5 -1
  78. package/dist/es/b/Button/Button.js +8 -2
  79. package/dist/es/b/Button/styles.scss +82 -18
  80. package/dist/es/b/Metrics/Metrics.js +72 -0
  81. package/dist/es/b/Metrics/index.js +2 -0
  82. package/dist/es/b/Metrics/styles.scss +91 -0
  83. package/dist/es/b/Page/common/Section/Section.js +55 -4
  84. package/dist/es/b/Page/styles.scss +8 -2
  85. package/dist/es/b/QuestionDropdown/styles.scss +1 -1
  86. package/dist/es/b/index.js +2 -1
  87. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  88. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  89. package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
  90. package/dist/es/experimental/GradientBackground/index.js +2 -0
  91. package/dist/es/experimental/GradientBackground/styles.scss +64 -0
  92. package/dist/es/experimental/index.js +1 -0
  93. package/dist/es/f/common/Debugger/Debugger.js +1 -1
  94. package/dist/es/f/common/Label/Label.js +1 -1
  95. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
  96. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  97. package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
  98. package/dist/es/f/fields/SelectInput/styles.scss +4 -4
  99. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  100. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
  101. package/dist/es/f/fields/TextInput/TextInput.js +19 -5
  102. package/dist/es/f/fields/TextInput/styles.scss +3 -7
  103. package/dist/es/f/fields/TextareaInput/TextareaInput.js +14 -7
  104. package/dist/es/form.scss +1 -1
  105. package/package.json +3 -3
  106. package/src/__snapshots__/Storyshots.test.js.snap +5662 -449
  107. package/src/local.scss +4 -0
  108. package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
  109. package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
  110. package/src/stories/a/ContentCard.stories.jsx +1 -1
  111. package/src/stories/a/Conversation.stories.jsx +78 -1
  112. package/src/stories/a/OvalIllustration.stories.jsx +59 -0
  113. package/src/stories/a/People.stories.jsx +25 -1
  114. package/src/stories/a/ProgressBar.stories.jsx +1 -1
  115. package/src/stories/a/Quote.stories.jsx +1 -1
  116. package/src/stories/a/Shapes.stories.jsx +143 -0
  117. package/src/stories/a/SnapScroller.stories.jsx +98 -0
  118. package/src/stories/a/Spinner.stories.jsx +1 -1
  119. package/src/stories/b/Button.stories.jsx +83 -54
  120. package/src/stories/b/Metrics.stories.jsx +62 -0
  121. package/src/stories/b/Page.stories.jsx +51 -1
  122. package/src/stories/b/ThemeSelector.stories.jsx +1 -1
  123. package/src/stories/b/Title.stories.jsx +1 -1
  124. package/src/stories/c/ContentSlides.stories.jsx +2 -2
  125. package/src/stories/colors.js +5 -3
  126. package/src/stories/f/CheckboxInput.stories.jsx +1 -1
  127. package/src/stories/f/SelectInput.stories.jsx +29 -0
  128. package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
  129. package/src/stories/f/TextInput.stories.jsx +14 -4
  130. package/src/stories/f/TextareaInput.stories.jsx +42 -6
  131. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
  132. package/src/ui/a/AnimatedCounter/styles.scss +3 -11
  133. package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
  134. package/src/ui/a/BackgroundGradient/index.js +2 -0
  135. package/src/ui/a/BackgroundGradient/styles.scss +16 -0
  136. package/src/ui/a/Conversation/Conversation.jsx +15 -7
  137. package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
  138. package/src/ui/a/Conversation/styles.scss +129 -32
  139. package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
  140. package/src/ui/a/OvalIllustration/index.js +2 -0
  141. package/src/ui/a/OvalIllustration/styles.scss +102 -0
  142. package/src/ui/a/People/People.jsx +12 -4
  143. package/src/ui/a/People/common/Person/Person.jsx +7 -1
  144. package/src/ui/a/People/styles.scss +13 -15
  145. package/src/ui/a/Shapes/Shapes.jsx +191 -0
  146. package/src/ui/a/Shapes/index.js +2 -0
  147. package/src/ui/a/Shapes/styles.scss +255 -0
  148. package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
  149. package/src/ui/a/SnapScroller/index.js +2 -0
  150. package/src/ui/a/SnapScroller/styles.scss +38 -0
  151. package/src/ui/a/TeamInfo/styles.scss +2 -2
  152. package/src/ui/a/index.js +4 -0
  153. package/src/ui/b/Button/Button.jsx +9 -1
  154. package/src/ui/b/Button/styles.scss +82 -18
  155. package/src/ui/b/Metrics/Metrics.jsx +93 -0
  156. package/src/ui/b/Metrics/index.js +2 -0
  157. package/src/ui/b/Metrics/styles.scss +91 -0
  158. package/src/ui/b/Page/common/Section/Section.jsx +68 -2
  159. package/src/ui/b/Page/styles.scss +8 -2
  160. package/src/ui/b/QuestionDropdown/styles.scss +1 -1
  161. package/src/ui/b/index.js +1 -0
  162. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
  163. package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
  164. package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
  165. package/src/ui/f/common/Label/Label.jsx +1 -1
  166. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
  167. package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
  168. package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
  169. package/src/ui/f/fields/SelectInput/styles.scss +4 -4
  170. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
  171. package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
  172. package/src/ui/f/fields/TextInput/TextInput.jsx +15 -2
  173. package/src/ui/f/fields/TextInput/styles.scss +3 -7
  174. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +22 -11
  175. package/src/ui/form.scss +1 -1
  176. package/dist/cjs/a/RatingsInput/common/index.js +0 -13
  177. package/dist/cjs/a/RatingsInput/styles.scss +0 -35
  178. package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
  179. package/dist/es/a/RatingsInput/common/index.js +0 -1
  180. package/dist/es/a/RatingsInput/index.js +0 -2
  181. package/dist/es/a/RatingsInput/styles.scss +0 -35
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var React = _interopRequireWildcard(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
+
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
22
+ 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); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ // Local Definitions
27
+ var baseClassName = _bem.default.base;
28
+ var componentClassName = 'gradient-background';
29
+ /**
30
+ * This is the component description.
31
+ */
32
+
33
+ var GradientBackground = _ref => {
34
+ var {
35
+ id,
36
+ className: userClassName,
37
+ style,
38
+ pin,
39
+ shape // ...otherProps
40
+
41
+ } = _ref;
42
+ (0, React.useLayoutEffect)(() => {
43
+ Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
44
+ }, []);
45
+ return /*#__PURE__*/React.createElement("div", {
46
+ id: id,
47
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
48
+ style: _objectSpread(_objectSpread({}, style), {}, {
49
+ '--pin': pin
50
+ }) // {...otherProps}
51
+
52
+ }, /*#__PURE__*/React.createElement("div", {
53
+ className: "shapes"
54
+ }, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
55
+ className: "triangle"
56
+ }), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
57
+ className: "ellipses"
58
+ }, /*#__PURE__*/React.createElement("div", {
59
+ className: "up"
60
+ }), /*#__PURE__*/React.createElement("div", {
61
+ className: "down"
62
+ })), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
63
+ className: "ellipse"
64
+ })));
65
+ };
66
+
67
+ GradientBackground.propTypes = {
68
+ /**
69
+ * The HTML id for this element
70
+ */
71
+ id: _propTypes.default.string,
72
+
73
+ /**
74
+ * The HTML class names for this element
75
+ */
76
+ className: _propTypes.default.string,
77
+
78
+ /**
79
+ * The React-written, css properties for this element.
80
+ */
81
+ style: _propTypes.default.objectOf(_propTypes.default.string),
82
+
83
+ /**
84
+ * Where to pin the shapes
85
+ */
86
+ pin: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
87
+
88
+ /**
89
+ *
90
+ */
91
+ shape: _propTypes.default.oneOf(['triangle', 'ellipse', 'spiral', 'diamonds', 'circles', 'ellipses'])
92
+ };
93
+ GradientBackground.defaultProps = {
94
+ pin: 'center',
95
+ shape: 'triangle'
96
+ };
97
+ var _default = GradientBackground;
98
+ exports.default = _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "GradientBackground", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _GradientBackground.default;
10
+ }
11
+ });
12
+
13
+ var _GradientBackground = _interopRequireDefault(require("./GradientBackground"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,64 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+
5
+ $default-triangle-dimension:30em;
6
+ $default-ellipses-dimension:50em;
7
+ $default-ellipse-dimension:80em;
8
+ $default-shapes-opacity:.8;
9
+
10
+ .#{bem.$base}.gradient-background {
11
+ align-items: center;
12
+ background: var(--light-y);
13
+ display: flex;
14
+ flex-direction: column;
15
+ height: 100%;
16
+ justify-content: var(--pin);
17
+ position: absolute;
18
+ width: 100%;
19
+
20
+ .shapes {
21
+ display: flex;
22
+ justify-content: center;
23
+
24
+ .triangle {
25
+ background-image: linear-gradient(var(--light-y), var(--dark-y));
26
+ clip-path: polygon(0 0, 50% 100%, 100% 0);
27
+ height: $default-triangle-dimension * .86;
28
+ opacity: $default-shapes-opacity;
29
+ width: $default-triangle-dimension;
30
+ }
31
+
32
+ .ellipses {
33
+
34
+ height: $default-ellipses-dimension / 2;
35
+ width: $default-ellipses-dimension;
36
+ opacity: $default-shapes-opacity;
37
+
38
+ .up {
39
+ background-image: linear-gradient(var(--light-y), var(--y));
40
+ clip-path: ellipse(40% 100% at 50% 0%);
41
+ height:50%;
42
+ }
43
+
44
+ .down {
45
+ background-image: linear-gradient(to top, var(--light-y), var(--y));
46
+ clip-path: ellipse(40% 100% at 50% 100%);
47
+ height:50%;
48
+ }
49
+
50
+ }
51
+
52
+ .ellipse {
53
+ height: $default-ellipse-dimension / 1.5;
54
+ width: $default-ellipse-dimension;
55
+ background-image: linear-gradient( to top left, var(--dark-y), var(--light-y),var(--dark-y));
56
+ clip-path: ellipse(50% 25% at 50% 50%);
57
+ opacity: $default-shapes-opacity;
58
+ transform: rotate3d(0, 0, -1, 10deg);
59
+ }
60
+
61
+ }
62
+ }
63
+
64
+
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "GradientBackground", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _GradientBackground.GradientBackground;
10
+ }
11
+ });
12
+
13
+ var _GradientBackground = require("./GradientBackground");
@@ -47,7 +47,7 @@ var Debugger = _ref => {
47
47
  style: style
48
48
  }, /*#__PURE__*/React.createElement(_b.Button, {
49
49
  onClick: toggleDebugger,
50
- color: "main1"
50
+ color: "main2"
51
51
  }, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
52
52
  className: "debuger-content"
53
53
  }, JSON.stringify(formikContext, null, 2)));
@@ -86,7 +86,7 @@ Label.propTypes = {
86
86
  Label.defaultProps = {
87
87
  // someProp:false
88
88
  as: 'label',
89
- color: 'main1'
89
+ color: 'main2'
90
90
  };
91
91
  var _default = Label;
92
92
  exports.default = _default;
@@ -149,8 +149,8 @@ ChoicesInput.propTypes = {
149
149
  ChoicesInput.defaultProps = {
150
150
  gridColumnsMobile: 2,
151
151
  gridColumnsDesktop: 3,
152
- color: 'background',
153
- colorChecked: 'main1',
152
+ color: 'background2',
153
+ colorChecked: 'main2',
154
154
  disabled: false
155
155
  };
156
156
 
@@ -121,8 +121,8 @@ Rating.propTypes = {
121
121
  showRatingValue: _propTypes.default.bool
122
122
  };
123
123
  Rating.defaultProps = {
124
- activeBackgroundColor: 'secondary2',
125
- inactiveBackgroundColor: 'background',
124
+ activeBackgroundColor: 'main1',
125
+ inactiveBackgroundColor: 'background2',
126
126
  showRatingValue: false
127
127
  };
128
128
  var _default = Rating;
@@ -38,13 +38,18 @@ var SelectInput = _ref => {
38
38
  name,
39
39
  label,
40
40
  options,
41
+ validate,
42
+ description,
41
43
  disabled // ...otherProps
42
44
 
43
45
  } = _ref;
44
46
  (0, React.useLayoutEffect)(() => {
45
47
  Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
46
48
  }, []);
47
- var [field, meta] = (0, _formik.useField)(name);
49
+ var [field, meta] = (0, _formik.useField)({
50
+ name,
51
+ validate
52
+ });
48
53
  return /*#__PURE__*/React.createElement("div", {
49
54
  id: id,
50
55
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
@@ -56,6 +61,7 @@ var SelectInput = _ref => {
56
61
  }, label), /*#__PURE__*/React.createElement("select", _extends({
57
62
  className: "input v25 pv-v"
58
63
  }, field, {
64
+ value: field.value || '',
59
65
  id: name,
60
66
  disabled: disabled
61
67
  }), options.map(option => {
@@ -66,11 +72,13 @@ var SelectInput = _ref => {
66
72
  } : option;
67
73
  return /*#__PURE__*/React.createElement("option", {
68
74
  key: newOption.value,
69
- value: newOption.value
75
+ value: newOption.value,
76
+ disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
70
77
  }, newOption.label);
71
- })), meta.error && meta.touched && /*#__PURE__*/React.createElement(_common.FormDescription, {
72
- error: true
73
- }, meta.error));
78
+ })), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
79
+ isError: !!meta.error,
80
+ className: "v50 mt-v s-1"
81
+ }, meta.error || description));
74
82
  };
75
83
 
76
84
  SelectInput.propTypes = {
@@ -99,12 +107,23 @@ SelectInput.propTypes = {
99
107
  */
100
108
  label: _propTypes.default.string,
101
109
 
110
+ /**
111
+ * The input field validator function
112
+ */
113
+ validate: _propTypes.default.func,
114
+
115
+ /**
116
+ * The select input description
117
+ */
118
+ description: _propTypes.default.string,
119
+
102
120
  /**
103
121
  * The options of the select input
104
122
  */
105
123
  options: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
106
124
  value: _propTypes.default.string,
107
- label: _propTypes.default.string
125
+ label: _propTypes.default.string,
126
+ disabled: _propTypes.default.bool
108
127
  })])),
109
128
 
110
129
  /**
@@ -14,16 +14,16 @@ $default-padding: 0.75em 0.75em 0.55em;
14
14
 
15
15
 
16
16
  .input-label {
17
- color: var(--main1);
17
+ color: var(--main2);
18
18
  }
19
19
 
20
20
  .input {
21
- background: var(--light-background);
22
- color: var(--on-background);
21
+ background: var(--light-background2);
22
+ color: var(--on-background2);
23
23
  padding: $default-padding;
24
24
 
25
25
  &:focus {
26
- background: var(--dark-background);
26
+ background: var(--dark-background2);
27
27
  }
28
28
  }
29
29
  }
@@ -60,7 +60,7 @@ var TaskRecommendationInput = _ref => {
60
60
  }, /*#__PURE__*/React.createElement("div", {
61
61
  className: "v1 p-v task"
62
62
  }, /*#__PURE__*/React.createElement(_common.FormLabel, {
63
- className: "uc mb-v ".concat(isOptionSelected ? 'c-on-x' : 'c-x'),
63
+ className: "uc mb-v ".concat(isOptionSelected ? _bem.default.modifierActive : ''),
64
64
  name: name
65
65
  }, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
66
66
  value: value,
@@ -16,6 +16,10 @@
16
16
  align-items: center;
17
17
  height: 100%;
18
18
 
19
+ .#{bem.$modifier-active} {
20
+ color: var(--on-x);
21
+ }
22
+
19
23
  .input {
20
24
  appearance: none;
21
25
  position: absolute;
@@ -38,10 +38,12 @@ var TextInput = _ref => {
38
38
  type,
39
39
  name,
40
40
  label,
41
+ labelColor,
41
42
  validate,
42
43
  oneInputLabel,
43
44
  description,
44
- disabled // ...otherProps
45
+ disabled,
46
+ placeholder // ...otherProps
45
47
 
46
48
  } = _ref;
47
49
  (0, React.useLayoutEffect)(() => {
@@ -57,13 +59,15 @@ var TextInput = _ref => {
57
59
  style: style // {...otherProps}
58
60
 
59
61
  }, /*#__PURE__*/React.createElement(_common.FormLabel, {
60
- className: ['input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
61
- name: name
62
+ className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
63
+ name: name,
64
+ color: labelColor
62
65
  }, label), /*#__PURE__*/React.createElement("input", _extends({
63
66
  id: name,
64
67
  className: "input ".concat(meta.touched && meta.error ? 'input-border-error' : 'input-border'),
65
68
  type: type,
66
- disabled: disabled
69
+ disabled: disabled,
70
+ placeholder: placeholder
67
71
  }, field)), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
68
72
  isError: !!meta.error,
69
73
  className: "v50 mt-v s-1"
@@ -96,6 +100,11 @@ TextInput.propTypes = {
96
100
  */
97
101
  label: _propTypes.default.string.isRequired,
98
102
 
103
+ /**
104
+ * The input label color
105
+ */
106
+ labelColor: _propTypes.default.string,
107
+
99
108
  /**
100
109
  * The type of the input (html)
101
110
  */
@@ -119,7 +128,12 @@ TextInput.propTypes = {
119
128
  /**
120
129
  * Whether the text input should be disabled
121
130
  */
122
- disabled: _propTypes.default.bool
131
+ disabled: _propTypes.default.bool,
132
+
133
+ /**
134
+ * The placeholder text for the input
135
+ */
136
+ placeholder: _propTypes.default.string
123
137
  };
124
138
  TextInput.defaultProps = {
125
139
  type: 'text',
@@ -9,17 +9,13 @@ $default-padding: 0.75em 0.75em 0.55em;
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
 
12
- .input-label {
13
- color: var(--main1);
14
- }
15
-
16
12
  .input {
17
- background: var(--light-background);
18
- color: var(--on-background);
13
+ background: var(--light-background2);
14
+ color: var(--on-background2);
19
15
  padding: $default-padding;
20
16
 
21
17
  &:focus {
22
- background: var(--dark-background);
18
+ background: var(--dark-background2);
23
19
  }
24
20
  }
25
21
  }
@@ -43,7 +43,8 @@ var TextareaInput = _ref => {
43
43
  textAreaColor,
44
44
  labelColor,
45
45
  description,
46
- disabled // ...otherProps
46
+ disabled,
47
+ placeholder // ...otherProps
47
48
 
48
49
  } = _ref;
49
50
  (0, React.useLayoutEffect)(() => {
@@ -55,16 +56,18 @@ var TextareaInput = _ref => {
55
56
  });
56
57
  return /*#__PURE__*/React.createElement("div", {
57
58
  id: id,
58
- className: [baseClassName, componentClassName, userClassName, "x-".concat(textAreaColor), "y-".concat(labelColor)].filter(e => e).join(' '),
59
+ className: [baseClassName, componentClassName, userClassName, "x-".concat(textAreaColor)].filter(e => e).join(' '),
59
60
  style: style // {...otherProps}
60
61
 
61
62
  }, /*#__PURE__*/React.createElement(_common.FormLabel, {
62
- className: ['c-y', labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
63
- name: name
63
+ className: [labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
64
+ name: name,
65
+ color: labelColor
64
66
  }, label), /*#__PURE__*/React.createElement("textarea", _extends({
65
67
  id: textAreaId,
66
68
  className: "textarea v50 pv-v ".concat(meta.touched && meta.error ? 'input-border-error' : 'input-border')
67
69
  }, field, {
70
+ placeholder: placeholder,
68
71
  rows: rows,
69
72
  disabled: disabled
70
73
  })), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
@@ -137,12 +140,16 @@ TextareaInput.propTypes = {
137
140
  /**
138
141
  * Whether the text area should be disabled
139
142
  */
140
- disabled: _propTypes.default.bool
143
+ disabled: _propTypes.default.bool,
144
+
145
+ /**
146
+ * The textarea placeholder text
147
+ */
148
+ placeholder: _propTypes.default.string
141
149
  };
142
150
  TextareaInput.defaultProps = {
143
151
  rows: 3,
144
- textAreaColor: 'background',
145
- labelColor: 'main1',
152
+ textAreaColor: 'background1',
146
153
  disabled: false
147
154
  };
148
155
 
@@ -1,6 +1,6 @@
1
1
  @use "form-reset.scss";
2
2
 
3
- $form-input-border-bottom: 1px solid var(--dark-background);
3
+ $form-input-border-bottom: 1px solid var(--dark-background1);
4
4
  $form-input-on-focus-border-bottom: 1px solid var(--light-main1);
5
5
  $form-input-on-error-border-bottom: 1px solid var(--error);
6
6
  $label-input-heigth-width: 100%;
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useLayoutEffect, useCallback } from 'react';
4
4
  import CountUp from 'react-countup';
5
5
  import VisibilitySensor from 'react-visibility-sensor';
6
6
  import PropTypes from 'prop-types';
@@ -18,28 +18,29 @@ const AnimatedCounter = ({
18
18
  style,
19
19
  color,
20
20
  number,
21
- unit,
22
- description,
23
- descriptionPosition,
24
- unitPosition,
21
+ before,
22
+ after,
25
23
  delay // ...otherProps
26
24
 
27
25
  }) => {
28
26
  useLayoutEffect(() => {
29
27
  import("./styles.scss");
30
28
  }, []);
29
+ const countDecimals = useCallback(value => {
30
+ if (value % 1 !== 0) return value.toString().split('.')[1].length;
31
+ return 0;
32
+ }, []);
31
33
  return /*#__PURE__*/React.createElement("div", {
32
34
  id: id,
33
35
  className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
34
36
  style: style // {...otherProps}
35
37
 
36
- }, descriptionPosition === 'top' && /*#__PURE__*/React.createElement("p", {
37
- className: "info top-description uc s-1 md-s0"
38
- }, description), /*#__PURE__*/React.createElement("div", {
38
+ }, /*#__PURE__*/React.createElement("div", {
39
39
  className: "count s3"
40
- }, unitPosition === 'before' && /*#__PURE__*/React.createElement("span", null, unit), /*#__PURE__*/React.createElement(CountUp, {
40
+ }, before && /*#__PURE__*/React.createElement("span", null, before), /*#__PURE__*/React.createElement(CountUp, {
41
41
  end: number,
42
42
  delay: delay,
43
+ decimals: countDecimals(number),
43
44
  redraw: true
44
45
  }, ({
45
46
  countUpRef,
@@ -49,9 +50,7 @@ const AnimatedCounter = ({
49
50
  delayedCall: true
50
51
  }, /*#__PURE__*/React.createElement("span", {
51
52
  ref: countUpRef
52
- }))), unitPosition === 'after' && /*#__PURE__*/React.createElement("span", null, unit)), descriptionPosition === 'bottom' && /*#__PURE__*/React.createElement("p", {
53
- className: "info uc s-1 md-s0 v50 mt-v"
54
- }, description));
53
+ }))), after && /*#__PURE__*/React.createElement("span", null, after)));
55
54
  };
56
55
 
57
56
  AnimatedCounter.propTypes = {
@@ -81,33 +80,21 @@ AnimatedCounter.propTypes = {
81
80
  number: PropTypes.number,
82
81
 
83
82
  /**
84
- * The review count unit
83
+ * The unit before the number
85
84
  */
86
- unit: PropTypes.string,
85
+ before: PropTypes.string,
87
86
 
88
87
  /**
89
- * The review description
88
+ * The unit after the number
90
89
  */
91
- description: PropTypes.string,
90
+ after: PropTypes.string,
92
91
 
93
92
  /**
94
93
  * react counter delay
95
94
  */
96
- delay: PropTypes.number,
97
-
98
- /**
99
- * If the animated counter description should be at the top
100
- */
101
- descriptionPosition: PropTypes.oneOf(['top', 'bottom']),
102
-
103
- /**
104
- * If the unit should be before or after the animated numbers
105
- */
106
- unitPosition: PropTypes.string
95
+ delay: PropTypes.number
107
96
  };
108
97
  AnimatedCounter.defaultProps = {
109
- color: 'main1',
110
- descriptionPosition: 'bottom',
111
- unitPosition: 'after'
98
+ color: 'main1'
112
99
  };
113
100
  export default AnimatedCounter;
@@ -1,24 +1,16 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
-
4
+ //@use "@aztlan/stylebook/src/mixins";
5
+ //@use "@aztlan/stylebook/src/globals" as *;
5
6
 
6
7
  .#{bem.$base}.animated-counter {
7
- align-items: center;
8
8
  display: flex;
9
- flex-direction: column;
9
+ justify-content: center;
10
10
 
11
11
  .count {
12
12
  color: var(--x);
13
13
  }
14
-
15
- .top-description {
16
- margin-bottom: .5em;
17
- }
18
-
19
- .info {
20
- color: var(--metadata);
21
- }
22
14
  }
23
15
 
24
16
 
@@ -0,0 +1,55 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useLayoutEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem'; // Local Definitions
6
+
7
+ const baseClassName = styleNames.base;
8
+ const componentClassName = 'background-gradient';
9
+ /**
10
+ * This is the component description.
11
+ */
12
+
13
+ const BackgroundGradient = ({
14
+ id,
15
+ className: userClassName,
16
+ style,
17
+ height // ...otherProps
18
+
19
+ }) => {
20
+ useLayoutEffect(() => {
21
+ import("./styles.scss");
22
+ }, []);
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ id: id,
25
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
26
+ style: { ...style,
27
+ '--gradient-height': height
28
+ }
29
+ });
30
+ };
31
+
32
+ BackgroundGradient.propTypes = {
33
+ /**
34
+ * The HTML id for this element
35
+ */
36
+ id: PropTypes.string,
37
+
38
+ /**
39
+ * The HTML class names for this element
40
+ */
41
+ className: PropTypes.string,
42
+
43
+ /**
44
+ * The React-written, css properties for this element.
45
+ */
46
+ style: PropTypes.objectOf(PropTypes.string),
47
+
48
+ /**
49
+ * The height of the shape.
50
+ */
51
+ height: PropTypes.string
52
+ };
53
+ BackgroundGradient.defaultProps = {// someProp: false,
54
+ };
55
+ export default BackgroundGradient;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as BackgroundGradient } from "./BackgroundGradient";