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

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 (128) 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/Conversation/styles.scss +2 -0
  4. package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
  5. package/dist/cjs/a/GradientBackground/index.js +15 -0
  6. package/dist/cjs/a/GradientBackground/styles.scss +191 -0
  7. package/dist/cjs/a/People/People.js +15 -7
  8. package/dist/cjs/a/People/common/Person/Person.js +11 -4
  9. package/dist/cjs/a/People/styles.scss +13 -15
  10. package/dist/cjs/a/Shapes/Shapes.js +163 -0
  11. package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
  12. package/dist/cjs/a/Shapes/styles.scss +222 -0
  13. package/dist/cjs/a/TeamInfo/styles.scss +2 -2
  14. package/dist/cjs/a/index.js +9 -1
  15. package/dist/cjs/b/Button/styles.scss +38 -19
  16. package/dist/cjs/{a/RatingsInput/RatingsInput.js → b/Metrics/Metrics.js} +30 -29
  17. package/dist/cjs/{a/RatingsInput → b/Metrics}/index.js +3 -3
  18. package/dist/cjs/b/Metrics/styles.scss +91 -0
  19. package/dist/cjs/b/Page/common/Section/Section.js +42 -5
  20. package/dist/cjs/b/Page/styles.scss +8 -2
  21. package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
  22. package/dist/cjs/b/index.js +9 -1
  23. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  24. package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
  25. package/dist/cjs/experimental/GradientBackground/index.js +15 -0
  26. package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
  27. package/dist/cjs/experimental/index.js +13 -0
  28. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  29. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  30. package/dist/cjs/f/fields/SelectInput/styles.scss +3 -3
  31. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
  32. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
  33. package/dist/cjs/f/fields/TextInput/styles.scss +3 -3
  34. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
  35. package/dist/cjs/form.scss +1 -1
  36. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
  37. package/dist/es/a/AnimatedCounter/styles.scss +3 -11
  38. package/dist/es/a/Conversation/styles.scss +2 -0
  39. package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
  40. package/dist/es/a/GradientBackground/index.js +2 -0
  41. package/dist/es/a/GradientBackground/styles.scss +191 -0
  42. package/dist/es/a/People/People.js +14 -7
  43. package/dist/es/a/People/common/Person/Person.js +11 -4
  44. package/dist/es/a/People/styles.scss +13 -15
  45. package/dist/es/a/Shapes/Shapes.js +141 -0
  46. package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
  47. package/dist/es/a/Shapes/styles.scss +222 -0
  48. package/dist/es/a/TeamInfo/styles.scss +2 -2
  49. package/dist/es/a/index.js +2 -1
  50. package/dist/es/b/Button/styles.scss +38 -19
  51. package/dist/es/b/Metrics/Metrics.js +72 -0
  52. package/dist/es/b/Metrics/index.js +2 -0
  53. package/dist/es/b/Metrics/styles.scss +91 -0
  54. package/dist/es/b/Page/common/Section/Section.js +41 -4
  55. package/dist/es/b/Page/styles.scss +8 -2
  56. package/dist/es/b/QuestionDropdown/styles.scss +1 -1
  57. package/dist/es/b/index.js +2 -1
  58. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  59. package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
  60. package/dist/es/experimental/GradientBackground/index.js +2 -0
  61. package/dist/es/experimental/GradientBackground/styles.scss +64 -0
  62. package/dist/es/experimental/index.js +1 -0
  63. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  64. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  65. package/dist/es/f/fields/SelectInput/styles.scss +3 -3
  66. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
  67. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
  68. package/dist/es/f/fields/TextInput/styles.scss +3 -3
  69. package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
  70. package/dist/es/form.scss +1 -1
  71. package/package.json +3 -3
  72. package/src/__snapshots__/Storyshots.test.js.snap +3654 -339
  73. package/src/local.scss +3 -0
  74. package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
  75. package/src/stories/a/ContentCard.stories.jsx +1 -1
  76. package/src/stories/a/Conversation.stories.jsx +1 -1
  77. package/src/stories/a/People.stories.jsx +25 -1
  78. package/src/stories/a/ProgressBar.stories.jsx +1 -1
  79. package/src/stories/a/Quote.stories.jsx +1 -1
  80. package/src/stories/a/Shapes.stories.jsx +125 -0
  81. package/src/stories/a/Spinner.stories.jsx +1 -1
  82. package/src/stories/b/Button.stories.jsx +57 -51
  83. package/src/stories/b/Metrics.stories.jsx +62 -0
  84. package/src/stories/b/Page.stories.jsx +27 -1
  85. package/src/stories/b/ThemeSelector.stories.jsx +1 -1
  86. package/src/stories/b/Title.stories.jsx +1 -1
  87. package/src/stories/c/ContentSlides.stories.jsx +2 -2
  88. package/src/stories/colors.js +5 -3
  89. package/src/stories/f/CheckboxInput.stories.jsx +1 -1
  90. package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
  91. package/src/stories/f/TextInput.stories.jsx +4 -4
  92. package/src/stories/f/TextareaInput.stories.jsx +2 -2
  93. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
  94. package/src/ui/a/AnimatedCounter/styles.scss +3 -11
  95. package/src/ui/a/Conversation/styles.scss +2 -0
  96. package/src/ui/a/People/People.jsx +12 -4
  97. package/src/ui/a/People/common/Person/Person.jsx +7 -1
  98. package/src/ui/a/People/styles.scss +13 -15
  99. package/src/ui/a/Shapes/Shapes.jsx +181 -0
  100. package/src/ui/a/Shapes/index.js +2 -0
  101. package/src/ui/a/Shapes/styles.scss +222 -0
  102. package/src/ui/a/TeamInfo/styles.scss +2 -2
  103. package/src/ui/a/index.js +1 -0
  104. package/src/ui/b/Button/styles.scss +38 -19
  105. package/src/ui/b/Metrics/Metrics.jsx +93 -0
  106. package/src/ui/b/Metrics/index.js +2 -0
  107. package/src/ui/b/Metrics/styles.scss +91 -0
  108. package/src/ui/b/Page/common/Section/Section.jsx +51 -2
  109. package/src/ui/b/Page/styles.scss +8 -2
  110. package/src/ui/b/QuestionDropdown/styles.scss +1 -1
  111. package/src/ui/b/index.js +1 -0
  112. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
  113. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
  114. package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
  115. package/src/ui/f/fields/SelectInput/styles.scss +3 -3
  116. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +2 -2
  117. package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
  118. package/src/ui/f/fields/TextInput/styles.scss +3 -3
  119. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
  120. package/src/ui/form.scss +1 -1
  121. package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
  122. package/dist/cjs/a/RatingsInput/common/index.js +0 -13
  123. package/dist/cjs/a/RatingsInput/styles.scss +0 -35
  124. package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
  125. package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
  126. package/dist/es/a/RatingsInput/common/index.js +0 -1
  127. package/dist/es/a/RatingsInput/index.js +0 -2
  128. package/dist/es/a/RatingsInput/styles.scss +0 -35
@@ -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";
@@ -128,7 +128,7 @@ ChoicesInput.propTypes = {
128
128
  ChoicesInput.defaultProps = {
129
129
  gridColumnsMobile: 2,
130
130
  gridColumnsDesktop: 3,
131
- color: 'background',
131
+ color: 'background2',
132
132
  colorChecked: 'main1',
133
133
  disabled: false
134
134
  };
@@ -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;
@@ -18,12 +18,12 @@ $default-padding: 0.75em 0.75em 0.55em;
18
18
  }
19
19
 
20
20
  .input {
21
- background: var(--light-background);
22
- color: var(--on-background);
21
+ background: var(--light-background1);
22
+ color: var(--on-background1);
23
23
  padding: $default-padding;
24
24
 
25
25
  &:focus {
26
- background: var(--dark-background);
26
+ background: var(--dark-background1);
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,
@@ -106,6 +106,6 @@ TaskRecommendationInput.propTypes = {
106
106
  image: PropTypes.string.isRequired
107
107
  };
108
108
  TaskRecommendationInput.defaultProps = {
109
- color: 'main2'
109
+ color: 'main1'
110
110
  };
111
111
  export default /*#__PURE__*/memo(TaskRecommendationInput);
@@ -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;
@@ -14,12 +14,12 @@ $default-padding: 0.75em 0.75em 0.55em;
14
14
  }
15
15
 
16
16
  .input {
17
- background: var(--light-background);
18
- color: var(--on-background);
17
+ background: var(--light-background1);
18
+ color: var(--on-background1);
19
19
  padding: $default-padding;
20
20
 
21
21
  &:focus {
22
- background: var(--dark-background);
22
+ background: var(--dark-background1);
23
23
  }
24
24
  }
25
25
  }
@@ -125,7 +125,7 @@ TextareaInput.propTypes = {
125
125
  };
126
126
  TextareaInput.defaultProps = {
127
127
  rows: 3,
128
- textAreaColor: 'background',
128
+ textAreaColor: 'background1',
129
129
  labelColor: 'main1',
130
130
  disabled: false
131
131
  };
package/dist/es/form.scss CHANGED
@@ -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%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.6",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -79,9 +79,9 @@
79
79
  "stylelint-config-palantir": "^5.1.0"
80
80
  },
81
81
  "dependencies": {
82
- "@pareto-engineering/assets": "^2.0.0-alpha.2",
82
+ "@pareto-engineering/assets": "^2.0.0-alpha.3",
83
83
  "@pareto-engineering/bem": "^0.1.5",
84
- "@pareto-engineering/styles": "^2.0.0-alpha.2",
84
+ "@pareto-engineering/styles": "^2.0.0-alpha.4",
85
85
  "date-fns": "^2.22.1",
86
86
  "formik": "^2.2.9",
87
87
  "hamburgers": "^1.1.3",