@pareto-engineering/design-system 0.0.1-alpha.60 → 0.0.1-alpha.64

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 (98) hide show
  1. package/dist/cjs/a/TeamInfo/TeamInfo.js +1 -1
  2. package/dist/cjs/a/TeamInfo/styles.scss +3 -2
  3. package/dist/cjs/b/QuestionDropdown/QuestionDropdown.js +11 -4
  4. package/dist/cjs/c/index.js +1 -125
  5. package/dist/cjs/f/fields/SelectInput/styles.scss +7 -3
  6. package/dist/es/a/TeamInfo/TeamInfo.js +1 -1
  7. package/dist/es/a/TeamInfo/styles.scss +3 -2
  8. package/dist/es/b/QuestionDropdown/QuestionDropdown.js +11 -4
  9. package/dist/es/c/index.js +1 -15
  10. package/dist/es/f/fields/SelectInput/styles.scss +7 -3
  11. package/package.json +3 -3
  12. package/src/__snapshots__/Storyshots.test.js.snap +251 -1831
  13. package/src/stories/b/QuestionDropdown.stories.jsx +15 -0
  14. package/src/stories/colors.js +1 -1
  15. package/src/stories/f/SelectInput.stories.jsx +3 -7
  16. package/src/ui/a/TeamInfo/TeamInfo.jsx +1 -1
  17. package/src/ui/a/TeamInfo/styles.scss +3 -2
  18. package/src/ui/b/QuestionDropdown/QuestionDropdown.jsx +8 -3
  19. package/src/ui/c/index.js +0 -18
  20. package/src/ui/f/fields/SelectInput/styles.scss +7 -3
  21. package/dist/cjs/a/RatingsInput/RatingsInput.js +0 -88
  22. package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
  23. package/dist/cjs/a/RatingsInput/common/Rating/index.js +0 -15
  24. package/dist/cjs/a/RatingsInput/common/index.js +0 -13
  25. package/dist/cjs/a/RatingsInput/index.js +0 -15
  26. package/dist/cjs/a/RatingsInput/styles.scss +0 -35
  27. package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
  28. package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
  29. package/dist/es/a/RatingsInput/common/Rating/index.js +0 -2
  30. package/dist/es/a/RatingsInput/common/index.js +0 -1
  31. package/dist/es/a/RatingsInput/index.js +0 -2
  32. package/dist/es/a/RatingsInput/styles.scss +0 -35
  33. package/src/stories/c/AcceptCookies.stories.jsx +0 -27
  34. package/src/stories/c/BlogCategoryButton.stories.jsx +0 -33
  35. package/src/stories/c/BlogPost.stories.jsx +0 -68
  36. package/src/stories/c/BlogPostsList.stories.jsx +0 -91
  37. package/src/stories/c/SiteFooter.stories.jsx +0 -33
  38. package/src/stories/c/SiteHeaderCTA.stories.jsx +0 -28
  39. package/src/stories/c/SiteMission.stories.jsx +0 -78
  40. package/src/stories/c/SiteNavigation.stories.jsx +0 -79
  41. package/src/stories/c/SiteOnboardingStep.stories.jsx +0 -46
  42. package/src/stories/c/SitePricing.stories.jsx +0 -48
  43. package/src/stories/c/SiteServices.stories.jsx +0 -170
  44. package/src/stories/c/TeamGallery.stories.jsx +0 -52
  45. package/src/stories/c/Testimonials.stories.jsx +0 -43
  46. package/src/stories/c/blogUrlMap.js +0 -13
  47. package/src/ui/c/AcceptCookies/AcceptCookies.jsx +0 -133
  48. package/src/ui/c/AcceptCookies/index.js +0 -2
  49. package/src/ui/c/AcceptCookies/styles.scss +0 -49
  50. package/src/ui/c/BlogCategoryButton/BlogCategoryButton.jsx +0 -96
  51. package/src/ui/c/BlogCategoryButton/index.js +0 -2
  52. package/src/ui/c/BlogContext/BlogContextProvider.jsx +0 -60
  53. package/src/ui/c/BlogContext/Context.js +0 -3
  54. package/src/ui/c/BlogContext/ContextProvider.jsx +0 -60
  55. package/src/ui/c/BlogContext/index.js +0 -4
  56. package/src/ui/c/BlogContext/useBlog.js +0 -4
  57. package/src/ui/c/BlogPost/BlogPost.jsx +0 -161
  58. package/src/ui/c/BlogPost/index.js +0 -2
  59. package/src/ui/c/BlogPost/styles.scss +0 -33
  60. package/src/ui/c/BlogPostsList/BlogPostsList.jsx +0 -81
  61. package/src/ui/c/BlogPostsList/common/Card/Card.jsx +0 -195
  62. package/src/ui/c/BlogPostsList/common/Card/index.js +0 -2
  63. package/src/ui/c/BlogPostsList/common/index.js +0 -1
  64. package/src/ui/c/BlogPostsList/index.js +0 -2
  65. package/src/ui/c/BlogPostsList/styles.scss +0 -72
  66. package/src/ui/c/SiteFooter/SiteFooter.jsx +0 -79
  67. package/src/ui/c/SiteFooter/common/Section/Section.jsx +0 -95
  68. package/src/ui/c/SiteFooter/common/Section/index.js +0 -2
  69. package/src/ui/c/SiteFooter/common/index.js +0 -1
  70. package/src/ui/c/SiteFooter/index.js +0 -2
  71. package/src/ui/c/SiteFooter/styles.scss +0 -34
  72. package/src/ui/c/SiteHeaderCTA/SiteHeaderCTA.jsx +0 -107
  73. package/src/ui/c/SiteHeaderCTA/index.js +0 -2
  74. package/src/ui/c/SiteHeaderCTA/styles.scss +0 -44
  75. package/src/ui/c/SiteMission/SiteMission.jsx +0 -114
  76. package/src/ui/c/SiteMission/index.js +0 -2
  77. package/src/ui/c/SiteMission/styles.scss +0 -30
  78. package/src/ui/c/SiteNavigation/SiteNavigation.jsx +0 -142
  79. package/src/ui/c/SiteNavigation/index.js +0 -2
  80. package/src/ui/c/SiteNavigation/styles.scss +0 -118
  81. package/src/ui/c/SiteOnboardingStep/SiteOnboardingStep.jsx +0 -107
  82. package/src/ui/c/SiteOnboardingStep/index.js +0 -2
  83. package/src/ui/c/SiteOnboardingStep/styles.scss +0 -51
  84. package/src/ui/c/SitePricing/SitePricing.jsx +0 -120
  85. package/src/ui/c/SitePricing/index.js +0 -2
  86. package/src/ui/c/SitePricing/styles.scss +0 -73
  87. package/src/ui/c/SiteServices/SiteServices.jsx +0 -222
  88. package/src/ui/c/SiteServices/index.js +0 -2
  89. package/src/ui/c/SiteServices/styles.scss +0 -138
  90. package/src/ui/c/TeamGallery/TeamGallery.jsx +0 -87
  91. package/src/ui/c/TeamGallery/common/PersonCard/PersonCard.jsx +0 -86
  92. package/src/ui/c/TeamGallery/common/PersonCard/index.js +0 -2
  93. package/src/ui/c/TeamGallery/common/index.js +0 -1
  94. package/src/ui/c/TeamGallery/index.js +0 -2
  95. package/src/ui/c/TeamGallery/styles.scss +0 -100
  96. package/src/ui/c/Testimonials/Testimonials.jsx +0 -124
  97. package/src/ui/c/Testimonials/index.js +0 -2
  98. package/src/ui/c/Testimonials/styles.scss +0 -112
@@ -45,3 +45,18 @@ export const withSEO = () => (
45
45
  </p>
46
46
  </QuestionDropdown>
47
47
  )
48
+
49
+ export const OpenQuestionDropdown = () => (
50
+ <QuestionDropdown question="What is Pareto?" defaultIsOpen>
51
+ <p>
52
+ Pareto is a female-owned and operated virtual workforce helping startups and
53
+ small businesses automate day-to-day data processing, sales outreach,
54
+ product research, and admin operations. We combine the quality and care of
55
+ real people with the efficiency of machine automation to get the job done.
56
+ </p>
57
+ <p>
58
+ At the same time, we’re a WBENC-certified business,
59
+ empowering women in developing countries with meaningful economic opportunities.
60
+ </p>
61
+ </QuestionDropdown>
62
+ )
@@ -30,7 +30,7 @@ const UI = [
30
30
  'background',
31
31
  'background2',
32
32
  'background3',
33
- // 'background4',
33
+ 'background4',
34
34
  'heading',
35
35
  'paragraph',
36
36
  'subtitle',
@@ -30,13 +30,9 @@ export default {
30
30
  export const Base = () => (
31
31
  <>
32
32
  <SelectInput
33
- name="companySize"
34
- label="Company size"
35
- options={['1-10',
36
- '11-50',
37
- '51-200',
38
- '201-1000',
39
- '1001-5000']}
33
+ name="workType"
34
+ label="Work Type"
35
+ options={['Work', 'Managing', 'Training']}
40
36
  />
41
37
  <FormDebugger />
42
38
  </>
@@ -70,7 +70,7 @@ SiteTeamInfo.propTypes = {
70
70
  className:PropTypes.string,
71
71
 
72
72
  /**
73
- * The React-written, css properties for this element.
73
+ * The react-written, css properties for this element.
74
74
  */
75
75
  style:PropTypes.objectOf(PropTypes.string),
76
76
 
@@ -8,7 +8,8 @@ $team-info-padding:var(--u);
8
8
  $img-height-width: 3.5em;
9
9
  $img-border-radius: var(--theme-border-radius);
10
10
  $p-h4-color:var(--subtitle);
11
- $role-color:var(-grey);
11
+ $role-color:var(--metadata);
12
+ $default-name-color:var(--main1);
12
13
  $box-shadow:0 .45em 1em 0 var(--background);
13
14
 
14
15
  .#{bem.$base}.team-info {
@@ -43,7 +44,7 @@ $box-shadow:0 .45em 1em 0 var(--background);
43
44
  justify-content: space-around;
44
45
 
45
46
  .name {
46
- color: $p-h4-color;
47
+ color: $default-name-color;
47
48
  }
48
49
 
49
50
  .role {
@@ -25,13 +25,14 @@ const QuestionDropdown = ({
25
25
  question,
26
26
  children,
27
27
  isFAQSchema,
28
+ defaultIsOpen,
28
29
  // ...otherProps
29
30
  }) => {
30
31
  useLayoutEffect(() => {
31
32
  import('./styles.scss')
32
33
  }, [])
33
34
 
34
- const [isOpen, setIsOpen] = useState(false)
35
+ const [isOpen, setIsOpen] = useState(defaultIsOpen)
35
36
  const toggleOpen = () => setIsOpen(!isOpen)
36
37
 
37
38
  return (
@@ -97,11 +98,15 @@ QuestionDropdown.propTypes = {
97
98
  /**
98
99
  * Whether element is part of SEO schema
99
100
  */
100
- isFAQSchema:PropTypes.bool,
101
+ isFAQSchema :PropTypes.bool,
102
+ /**
103
+ * Whether the question drop down should be opened by default
104
+ */
105
+ defaultIsOpen:PropTypes.bool,
101
106
  }
102
107
 
103
108
  QuestionDropdown.defaultProps = {
104
- // someProp:false
109
+ defaultIsOpen:false,
105
110
  }
106
111
 
107
112
  export default QuestionDropdown
package/src/ui/c/index.js CHANGED
@@ -1,20 +1,2 @@
1
- export { TeamGallery } from './TeamGallery'
2
1
  export { Hero } from './Hero'
3
- export { Testimonials } from './Testimonials'
4
- export { SiteNavigation } from './SiteNavigation'
5
2
  export { ContentSlides, useContentSlides } from './ContentSlides'
6
- export { SiteFooter } from './SiteFooter'
7
- export { SiteServices } from './SiteServices'
8
- export { SiteOnboardingStep } from './SiteOnboardingStep'
9
- export { SitePricing } from './SitePricing'
10
- export { SiteMission } from './SiteMission'
11
- export { SiteHeaderCTA } from './SiteHeaderCTA'
12
- export { BlogPostsList } from './BlogPostsList'
13
- export { BlogPost } from './BlogPost'
14
- export {
15
- BlogContext,
16
- BlogContextProvider,
17
- useBlog,
18
- } from './BlogContext'
19
- export { BlogCategoryButton } from './BlogCategoryButton'
20
- export { AcceptCookies } from './AcceptCookies'
@@ -5,18 +5,22 @@
5
5
  @use "../../../form.scss";
6
6
 
7
7
 
8
- $label-input-width: 100%;
8
+ $default-padding: 0.75em 0.75em 0.55em;
9
9
 
10
10
 
11
11
  .#{bem.$base}.select-input {
12
+ display: flex;
13
+ flex-direction: column;
14
+
15
+
12
16
  .input-label {
13
17
  color: var(--main1);
14
18
  }
15
19
 
16
20
  .input {
17
- background: var(--background);
21
+ background: var(--light-background);
18
22
  color: var(--on-background);
19
- width: $label-input-width;
23
+ padding: $default-padding;
20
24
 
21
25
  &:focus {
22
26
  background: var(--dark-background);
@@ -1,88 +0,0 @@
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
- var _common = require("./common");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- 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); }
19
-
20
- 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; }
21
-
22
- var baseClassName = _bem.default.base;
23
- var componentClassName = 'ratings-input';
24
- /**
25
- * This is the component description.
26
- */
27
-
28
- var RatingsInput = _ref => {
29
- var {
30
- id,
31
- className: userClassName,
32
- style,
33
- name,
34
- ratingCount // ...otherProps
35
-
36
- } = _ref;
37
- (0, React.useLayoutEffect)(() => {
38
- Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
39
- }, []);
40
- var [hover, setHover] = (0, React.useState)(null);
41
- return /*#__PURE__*/React.createElement("div", {
42
- id: id,
43
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
44
- style: style // {...otherProps}
45
-
46
- }, [...Array(ratingCount)].map((_, index) => {
47
- var ratingValue = index + 1;
48
- return /*#__PURE__*/React.createElement(_common.Rating, {
49
- key: ratingValue,
50
- ratingId: "".concat(name, "-").concat(ratingValue),
51
- value: ratingValue,
52
- name: name,
53
- hover: hover,
54
- setHover: setHover
55
- });
56
- }));
57
- };
58
-
59
- RatingsInput.propTypes = {
60
- /**
61
- * The HTML id for this element
62
- */
63
- id: _propTypes.default.string,
64
-
65
- /**
66
- * The HTML class names for this element
67
- */
68
- className: _propTypes.default.string,
69
-
70
- /**
71
- * The React-written, css properties for this element.
72
- */
73
- style: _propTypes.default.objectOf(_propTypes.default.string),
74
-
75
- /**
76
- * The number of ratings input stars to be displayed
77
- */
78
- ratingCount: _propTypes.default.number,
79
-
80
- /**
81
- * Name of the rating input
82
- */
83
- name: _propTypes.default.string
84
- };
85
- RatingsInput.defaultProps = {// someProp:false
86
- };
87
- var _default = RatingsInput;
88
- exports.default = _default;
@@ -1,120 +0,0 @@
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 _formik = require("formik");
13
-
14
- var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- 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); }
19
-
20
- 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; }
21
-
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
24
- // Local Definitions
25
- var baseClassName = _bem.default.base;
26
- var componentClassName = 'rating';
27
- /**
28
- * This is the component description.
29
- */
30
-
31
- var Rating = _ref => {
32
- var {
33
- id,
34
- className: userClassName,
35
- style,
36
- value,
37
- name,
38
- ratingId,
39
- hover,
40
- setHover,
41
- activeBackgroundColor,
42
- inactiveBackgroundColor // ...otherProps
43
-
44
- } = _ref;
45
- var [field] = (0, _formik.useField)(name);
46
- return /*#__PURE__*/React.createElement("div", {
47
- id: id,
48
- className: [baseClassName, componentClassName, userClassName, "x-".concat(activeBackgroundColor), "y-".concat(inactiveBackgroundColor)].filter(e => e).join(' '),
49
- style: style
50
- }, /*#__PURE__*/React.createElement("label", {
51
- htmlFor: ratingId,
52
- onMouseEnter: () => setHover(value),
53
- onMouseLeave: () => setHover(null)
54
- }, ' ', /*#__PURE__*/React.createElement("span", {
55
- className: ['f-icons', value <= (hover || Number(field.value)) ? 'c-x' : 'c-dark-y'].filter(e => e).join(' ')
56
- }, "[")), /*#__PURE__*/React.createElement("input", _extends({}, field, {
57
- type: "radio",
58
- id: ratingId,
59
- name: name,
60
- value: value
61
- })));
62
- };
63
-
64
- Rating.propTypes = {
65
- /**
66
- * The HTML id for this element
67
- */
68
- id: _propTypes.default.string,
69
-
70
- /**
71
- * The HTML class names for this element
72
- */
73
- className: _propTypes.default.string,
74
-
75
- /**
76
- * The React-written, css properties for this element.
77
- */
78
- style: _propTypes.default.objectOf(_propTypes.default.string),
79
-
80
- /**
81
- * The value of each an every rating star
82
- */
83
- value: _propTypes.default.number,
84
-
85
- /**
86
- * The current hover value
87
- */
88
- hover: _propTypes.default.number,
89
-
90
- /**
91
- * Function to update the hover value
92
- */
93
- setHover: _propTypes.default.func,
94
-
95
- /**
96
- * Unique Id for each rating star
97
- */
98
- ratingId: _propTypes.default.string,
99
-
100
- /**
101
- * Name of the rating input
102
- */
103
- name: _propTypes.default.string,
104
-
105
- /**
106
- * The start rating backgriund color when hovered or clicked
107
- */
108
- activeBackgroundColor: _propTypes.default.string,
109
-
110
- /**
111
- * The start rating backgriund color when not hovered and not clicked
112
- */
113
- inactiveBackgroundColor: _propTypes.default.string
114
- };
115
- Rating.defaultProps = {
116
- activeBackgroundColor: 'secondary2',
117
- inactiveBackgroundColor: 'background'
118
- };
119
- var _default = Rating;
120
- exports.default = _default;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Rating", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Rating.default;
10
- }
11
- });
12
-
13
- var _Rating = _interopRequireDefault(require("./Rating"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Rating", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Rating.Rating;
10
- }
11
- });
12
-
13
- var _Rating = require("./Rating");
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "RatingsInput", {
7
- enumerable: true,
8
- get: function get() {
9
- return _RatingsInput.default;
10
- }
11
- });
12
-
13
- var _RatingsInput = _interopRequireDefault(require("./RatingsInput"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,35 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- @use "@pareto-engineering/bem";
3
-
4
- $default-rating-icon-margin: .5em;
5
- $default-padding: .2em;
6
- $default-transition: all .2s;
7
-
8
- .#{bem.$base}.ratings-input {
9
- display: flex;
10
-
11
- >:not(:first-child) {
12
- margin-left: $default-rating-icon-margin;
13
- }
14
-
15
- .#{bem.$base}.rating {
16
- display: flex;
17
-
18
- input {
19
- opacity: 0;
20
- position: absolute;
21
- visibility: none;
22
- z-index: -1;
23
- }
24
-
25
- label {
26
- padding: $default-padding;
27
- transition: $default-transition;
28
- cursor: pointer;
29
- }
30
- }
31
- }
32
-
33
-
34
-
35
-