@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,91 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@aztlan/stylebook/src/mixins";
5
+ @use "@aztlan/stylebook/src/globals" as *;
6
+
7
+ $default-mobile-row-gap: 1em;
8
+ $default-desktop-row-gap: 3em;
9
+ $default-border-radius: 50%;
10
+ $default-mobile-circle-size: 8em;
11
+ $default-desktop-circle-size: 10em;
12
+ $default-translateY:3em;
13
+ $default-desktop-description-width:12em;
14
+
15
+
16
+ $default-mobile-description-width:9em;
17
+
18
+ .#{bem.$base}.metrics {
19
+ display: grid;
20
+ row-gap: 1em;
21
+
22
+ .metric {
23
+ align-items: center;
24
+ display: flex;
25
+ row-gap: $default-mobile-row-gap;
26
+
27
+ .circle {
28
+ align-items: center;
29
+ background: var(--light-y);
30
+ border-radius: $default-border-radius;
31
+ display: flex;
32
+ height: $default-mobile-circle-size;
33
+ justify-content: center;
34
+ width: $default-mobile-circle-size;
35
+
36
+ .description-md {
37
+ color: var(--subtitle);
38
+ font-style: italic;
39
+ }
40
+ }
41
+
42
+ .description-sm {
43
+ color: var(--subtitle);
44
+ font-style: italic;
45
+ }
46
+ }
47
+
48
+ // mobile style
49
+ @include mixins.media($to:$sm-md) {
50
+ .metric {
51
+ column-gap: $default-mobile-row-gap;
52
+
53
+ .description-sm {
54
+ width: 50%;
55
+ }
56
+ }
57
+ }
58
+
59
+ // tablet style
60
+ @include mixins.media($from:$xs-sm,$to:$sm-md) {
61
+ .metric {
62
+ .description-sm {
63
+ width: 30%;
64
+ }
65
+ }
66
+ }
67
+
68
+ // desktop style
69
+ @include mixins.media($from:$sm-md) {
70
+ grid-template-columns: repeat(2, 1fr);
71
+ row-gap: 2em;
72
+
73
+ .metric {
74
+ .circle {
75
+ display: flex;
76
+ flex-direction: column;
77
+ height: $default-desktop-circle-size;
78
+ justify-content: center;
79
+ position: relative;
80
+ width: $default-desktop-circle-size;
81
+
82
+ .description-md {
83
+ left: 40%;
84
+ position: absolute;
85
+ top: 70%;
86
+ width: $default-desktop-description-width;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
@@ -3,9 +3,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  /* @pareto-engineering/generator-front 1.0.0 */
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import styleNames from '@pareto-engineering/bem';
7
- import usePage from "../../usePage"; // Local Definitions
6
+ import styleNames from '@pareto-engineering/bem'; // Local Definitions
8
7
 
8
+ import { Shapes, BackgroundGradient } from "../../../../a";
9
+ import usePage from "../../usePage";
9
10
  const baseClassName = styleNames.base;
10
11
  const componentClassName = 'section';
11
12
 
@@ -14,6 +15,13 @@ const Section = ({
14
15
  className: userClassName,
15
16
  style,
16
17
  children,
18
+ backgroundShape,
19
+ backgroundGradient,
20
+ backgroundGradientHeight,
21
+ backgroundVerticalAlign,
22
+ backgroundHorizontalAlign,
23
+ backgroundHeight,
24
+ backgroundOverflow,
17
25
  ...otherProps
18
26
  }) => {
19
27
  const {
@@ -24,7 +32,15 @@ const Section = ({
24
32
  id: sectionId,
25
33
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
26
34
  style: style
27
- }, otherProps), children);
35
+ }, otherProps), children, backgroundShape && /*#__PURE__*/React.createElement(Shapes, {
36
+ verticalAlign: backgroundVerticalAlign,
37
+ horizontalAlign: backgroundHorizontalAlign,
38
+ overflow: backgroundOverflow,
39
+ height: backgroundHeight,
40
+ shape: backgroundShape
41
+ }), backgroundGradient && /*#__PURE__*/React.createElement(BackgroundGradient, {
42
+ height: backgroundGradientHeight
43
+ }));
28
44
  };
29
45
 
30
46
  Section.propTypes = {
@@ -46,7 +62,42 @@ Section.propTypes = {
46
62
  /**
47
63
  * The children JSX
48
64
  */
49
- children: PropTypes.node
65
+ children: PropTypes.node,
66
+
67
+ /**
68
+ * The background shape to use for this section.
69
+ */
70
+ backgroundShape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles']),
71
+
72
+ /**
73
+ * The background vertical alingment to use for if the background shape is set.
74
+ */
75
+ backgroundVerticalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
76
+
77
+ /**
78
+ * The background horizontal alingment to use for if the background shape is set.
79
+ */
80
+ backgroundHorizontalAlign: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
81
+
82
+ /**
83
+ * The background height to use for if the background shape is set.
84
+ */
85
+ backgroundHeight: PropTypes.string,
86
+
87
+ /**
88
+ * The background overflow to use for if the background shape is set.
89
+ */
90
+ backgroundOverflow: PropTypes.oneOf(['visible', 'hidden', 'scroll']),
91
+
92
+ /**
93
+ * The background gradient to use for if the background gradient is set.
94
+ */
95
+ backgroundGradient: PropTypes.bool,
96
+
97
+ /**
98
+ * The background gradient height to use for if the background gradient is set.
99
+ */
100
+ backgroundGradientHeight: PropTypes.string
50
101
  };
51
102
  Section.defaultProps = {// someProp:false
52
103
  };
@@ -2,9 +2,15 @@
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
4
 
5
- /*
5
+
6
6
  .#{bem.$base}.page{
7
+ .#{bem.$base}.section {
8
+ position: relative;
7
9
 
8
- } */
10
+ > *:not(:last-child) {
11
+ z-index: 1;
12
+ }
13
+ }
14
+ }
9
15
 
10
16
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  //make all colors as vars
6
6
 
7
- $border-color: var(--dark-background);
7
+ $border-color: var(--dark-background1);
8
8
  $border-width: 2px;
9
9
  $button-background-color: transparent;
10
10
  $button-background-color-hover: var(--light-accent3);
@@ -6,4 +6,5 @@ export { Page } from "./Page";
6
6
  export { QuestionDropdown } from "./QuestionDropdown";
7
7
  export { ThemeSelector } from "./ThemeSelector";
8
8
  export { Logo } from "./Logo";
9
- export { SocialMediaButton } from "./SocialMediaButton";
9
+ export { SocialMediaButton } from "./SocialMediaButton";
10
+ export { Metrics } from "./Metrics";
@@ -49,7 +49,7 @@ const HorizontalMenu = ({
49
49
  attached: true,
50
50
  height: ".4em",
51
51
  color: "main2",
52
- className: "y-background b-dark-y"
52
+ className: "y-background1 b-dark-y"
53
53
  }), /*#__PURE__*/React.createElement("div", {
54
54
  className: styleNames.elementContent
55
55
  }, /*#__PURE__*/React.createElement("div", {
@@ -56,7 +56,8 @@ const Navigator = ({
56
56
  } else {
57
57
  setNextStepIndex(stepsForward);
58
58
  }
59
- }
59
+ },
60
+ isCompact: true
60
61
  }, "Next") : /*#__PURE__*/React.createElement("span", null));
61
62
  };
62
63
 
@@ -118,8 +119,8 @@ Navigator.propTypes = {
118
119
  };
119
120
  Navigator.defaultProps = {
120
121
  canMoveForward: true,
121
- previousColor: 'main1',
122
- nextColor: 'main1',
122
+ previousColor: 'main2',
123
+ nextColor: 'main2',
123
124
  stepsForward: 1,
124
125
  stepsBackwards: 1
125
126
  };
@@ -0,0 +1,76 @@
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 = 'gradient-background';
9
+ /**
10
+ * This is the component description.
11
+ */
12
+
13
+ const GradientBackground = ({
14
+ id,
15
+ className: userClassName,
16
+ style,
17
+ pin,
18
+ shape // ...otherProps
19
+
20
+ }) => {
21
+ useLayoutEffect(() => {
22
+ import("./styles.scss");
23
+ }, []);
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ id: id,
26
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
27
+ style: { ...style,
28
+ '--pin': pin
29
+ } // {...otherProps}
30
+
31
+ }, /*#__PURE__*/React.createElement("div", {
32
+ className: "shapes"
33
+ }, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
34
+ className: "triangle"
35
+ }), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
36
+ className: "ellipses"
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: "up"
39
+ }), /*#__PURE__*/React.createElement("div", {
40
+ className: "down"
41
+ })), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
42
+ className: "ellipse"
43
+ })));
44
+ };
45
+
46
+ GradientBackground.propTypes = {
47
+ /**
48
+ * The HTML id for this element
49
+ */
50
+ id: PropTypes.string,
51
+
52
+ /**
53
+ * The HTML class names for this element
54
+ */
55
+ className: PropTypes.string,
56
+
57
+ /**
58
+ * The React-written, css properties for this element.
59
+ */
60
+ style: PropTypes.objectOf(PropTypes.string),
61
+
62
+ /**
63
+ * Where to pin the shapes
64
+ */
65
+ pin: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
66
+
67
+ /**
68
+ *
69
+ */
70
+ shape: PropTypes.oneOf(['triangle', 'ellipse', 'spiral', 'diamonds', 'circles', 'ellipses'])
71
+ };
72
+ GradientBackground.defaultProps = {
73
+ pin: 'center',
74
+ shape: 'triangle'
75
+ };
76
+ export default GradientBackground;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as GradientBackground } from "./GradientBackground";
@@ -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 @@
1
+ export { GradientBackground } from "./GradientBackground";
@@ -31,7 +31,7 @@ const Debugger = ({
31
31
  style: style
32
32
  }, /*#__PURE__*/React.createElement(Button, {
33
33
  onClick: toggleDebugger,
34
- color: "main1"
34
+ color: "main2"
35
35
  }, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
36
36
  className: "debuger-content"
37
37
  }, JSON.stringify(formikContext, null, 2)));
@@ -71,6 +71,6 @@ Label.propTypes = {
71
71
  Label.defaultProps = {
72
72
  // someProp:false
73
73
  as: 'label',
74
- color: 'main1'
74
+ color: 'main2'
75
75
  };
76
76
  export default Label;
@@ -128,8 +128,8 @@ ChoicesInput.propTypes = {
128
128
  ChoicesInput.defaultProps = {
129
129
  gridColumnsMobile: 2,
130
130
  gridColumnsDesktop: 3,
131
- color: 'background',
132
- colorChecked: 'main1',
131
+ color: 'background2',
132
+ colorChecked: 'main2',
133
133
  disabled: false
134
134
  };
135
135
  export default /*#__PURE__*/memo(ChoicesInput);
@@ -104,8 +104,8 @@ Rating.propTypes = {
104
104
  showRatingValue: PropTypes.bool
105
105
  };
106
106
  Rating.defaultProps = {
107
- activeBackgroundColor: 'secondary2',
108
- inactiveBackgroundColor: 'background',
107
+ activeBackgroundColor: 'main1',
108
+ inactiveBackgroundColor: 'background2',
109
109
  showRatingValue: false
110
110
  };
111
111
  export default Rating;
@@ -21,13 +21,18 @@ const SelectInput = ({
21
21
  name,
22
22
  label,
23
23
  options,
24
+ validate,
25
+ description,
24
26
  disabled // ...otherProps
25
27
 
26
28
  }) => {
27
29
  useLayoutEffect(() => {
28
30
  import("./styles.scss");
29
31
  }, []);
30
- const [field, meta] = useField(name);
32
+ const [field, meta] = useField({
33
+ name,
34
+ validate
35
+ });
31
36
  return /*#__PURE__*/React.createElement("div", {
32
37
  id: id,
33
38
  className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
@@ -39,6 +44,7 @@ const SelectInput = ({
39
44
  }, label), /*#__PURE__*/React.createElement("select", _extends({
40
45
  className: "input v25 pv-v"
41
46
  }, field, {
47
+ value: field.value || '',
42
48
  id: name,
43
49
  disabled: disabled
44
50
  }), options.map(option => {
@@ -49,11 +55,13 @@ const SelectInput = ({
49
55
  } : option;
50
56
  return /*#__PURE__*/React.createElement("option", {
51
57
  key: newOption.value,
52
- value: newOption.value
58
+ value: newOption.value,
59
+ disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
53
60
  }, newOption.label);
54
- })), meta.error && meta.touched && /*#__PURE__*/React.createElement(FormDescription, {
55
- error: true
56
- }, meta.error));
61
+ })), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
62
+ isError: !!meta.error,
63
+ className: "v50 mt-v s-1"
64
+ }, meta.error || description));
57
65
  };
58
66
 
59
67
  SelectInput.propTypes = {
@@ -82,12 +90,23 @@ SelectInput.propTypes = {
82
90
  */
83
91
  label: PropTypes.string,
84
92
 
93
+ /**
94
+ * The input field validator function
95
+ */
96
+ validate: PropTypes.func,
97
+
98
+ /**
99
+ * The select input description
100
+ */
101
+ description: PropTypes.string,
102
+
85
103
  /**
86
104
  * The options of the select input
87
105
  */
88
106
  options: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
89
107
  value: PropTypes.string,
90
- label: PropTypes.string
108
+ label: PropTypes.string,
109
+ disabled: PropTypes.bool
91
110
  })])),
92
111
 
93
112
  /**
@@ -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
  }
@@ -43,7 +43,7 @@ const TaskRecommendationInput = ({
43
43
  }, /*#__PURE__*/React.createElement("div", {
44
44
  className: "v1 p-v task"
45
45
  }, /*#__PURE__*/React.createElement(FormLabel, {
46
- className: `uc mb-v ${isOptionSelected ? 'c-on-x' : 'c-x'}`,
46
+ className: `uc mb-v ${isOptionSelected ? styleNames.modifierActive : ''}`,
47
47
  name: name
48
48
  }, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
49
49
  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;
@@ -21,10 +21,12 @@ const TextInput = ({
21
21
  type,
22
22
  name,
23
23
  label,
24
+ labelColor,
24
25
  validate,
25
26
  oneInputLabel,
26
27
  description,
27
- disabled // ...otherProps
28
+ disabled,
29
+ placeholder // ...otherProps
28
30
 
29
31
  }) => {
30
32
  useLayoutEffect(() => {
@@ -40,13 +42,15 @@ const TextInput = ({
40
42
  style: style // {...otherProps}
41
43
 
42
44
  }, /*#__PURE__*/React.createElement(FormLabel, {
43
- className: ['input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
44
- name: name
45
+ className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
46
+ name: name,
47
+ color: labelColor
45
48
  }, label), /*#__PURE__*/React.createElement("input", _extends({
46
49
  id: name,
47
50
  className: `input ${meta.touched && meta.error ? 'input-border-error' : 'input-border'}`,
48
51
  type: type,
49
- disabled: disabled
52
+ disabled: disabled,
53
+ placeholder: placeholder
50
54
  }, field)), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
51
55
  isError: !!meta.error,
52
56
  className: "v50 mt-v s-1"
@@ -79,6 +83,11 @@ TextInput.propTypes = {
79
83
  */
80
84
  label: PropTypes.string.isRequired,
81
85
 
86
+ /**
87
+ * The input label color
88
+ */
89
+ labelColor: PropTypes.string,
90
+
82
91
  /**
83
92
  * The type of the input (html)
84
93
  */
@@ -102,7 +111,12 @@ TextInput.propTypes = {
102
111
  /**
103
112
  * Whether the text input should be disabled
104
113
  */
105
- disabled: PropTypes.bool
114
+ disabled: PropTypes.bool,
115
+
116
+ /**
117
+ * The placeholder text for the input
118
+ */
119
+ placeholder: PropTypes.string
106
120
  };
107
121
  TextInput.defaultProps = {
108
122
  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
  }
@@ -27,7 +27,8 @@ const TextareaInput = ({
27
27
  textAreaColor,
28
28
  labelColor,
29
29
  description,
30
- disabled // ...otherProps
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}`, `y-${labelColor}`].filter(e => e).join(' '),
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: ['c-y', labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
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
- textAreaColor: 'background',
129
- labelColor: 'main1',
136
+ textAreaColor: 'background1',
130
137
  disabled: false
131
138
  };
132
139
  export default /*#__PURE__*/memo(TextareaInput);