@pareto-engineering/design-system 4.0.0-alpha.5 → 4.0.0-alpha.9

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 (136) hide show
  1. package/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +90 -0
  2. package/dist/cjs/a/AnimatedBlobs/index.js +13 -0
  3. package/dist/cjs/a/AnimatedBlobs/styles.scss +87 -0
  4. package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +56 -0
  5. package/dist/cjs/a/AnimatedGradient/index.js +13 -0
  6. package/dist/cjs/a/AnimatedGradient/styles.scss +14 -0
  7. package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +528 -0
  8. package/dist/cjs/a/ContentTree/ContentTree.js +1 -1
  9. package/dist/cjs/a/Label/Label.js +12 -4
  10. package/dist/cjs/a/Label/styles.scss +1 -1
  11. package/dist/cjs/a/MetaCard/MetaCard.js +60 -0
  12. package/dist/cjs/a/MetaCard/index.js +13 -0
  13. package/dist/cjs/a/MetaCard/styles.scss +28 -0
  14. package/dist/cjs/a/Popover/Popover.js +1 -1
  15. package/dist/cjs/a/SnapScroller/styles.scss +18 -10
  16. package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
  17. package/dist/cjs/a/TextSteps/index.js +13 -0
  18. package/dist/cjs/a/TextSteps/styles.scss +29 -0
  19. package/dist/cjs/a/Tip/Tip.js +72 -0
  20. package/dist/cjs/a/Tip/index.js +13 -0
  21. package/dist/cjs/a/Tip/styles.scss +22 -0
  22. package/dist/cjs/a/index.js +36 -1
  23. package/dist/cjs/b/Button/styles.scss +2 -0
  24. package/dist/cjs/b/Card/Card.js +74 -0
  25. package/dist/cjs/b/Card/common/Group/Group.js +73 -0
  26. package/dist/cjs/b/Card/common/Group/index.js +13 -0
  27. package/dist/cjs/b/Card/common/Group/styles.scss +42 -0
  28. package/dist/cjs/b/Card/common/Section/Section.js +59 -0
  29. package/dist/cjs/b/Card/common/Section/index.js +13 -0
  30. package/dist/cjs/b/Card/common/index.js +19 -0
  31. package/dist/cjs/b/Card/index.js +13 -0
  32. package/dist/cjs/b/Card/styles.scss +46 -0
  33. package/dist/cjs/b/Page/Page.js +9 -2
  34. package/dist/cjs/b/Page/common/Section/Section.js +6 -1
  35. package/dist/cjs/b/Page/styles.scss +22 -4
  36. package/dist/cjs/b/index.js +8 -1
  37. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +15 -7
  38. package/dist/cjs/f/fields/ChoicesInput/styles.scss +21 -33
  39. package/dist/cjs/f/fields/SelectInput/SelectInput.js +2 -2
  40. package/dist/cjs/f/fields/SelectInput/styles.scss +31 -21
  41. package/dist/cjs/f/fields/TextInput/TextInput.js +4 -2
  42. package/dist/cjs/f/fields/TextInput/styles.scss +26 -17
  43. package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
  44. package/dist/es/a/AnimatedBlobs/index.js +1 -0
  45. package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
  46. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +48 -0
  47. package/dist/es/a/AnimatedGradient/index.js +1 -0
  48. package/dist/es/a/AnimatedGradient/styles.scss +14 -0
  49. package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
  50. package/dist/es/a/ContentTree/ContentTree.js +1 -1
  51. package/dist/es/a/Label/Label.js +12 -4
  52. package/dist/es/a/Label/styles.scss +1 -1
  53. package/dist/es/a/MetaCard/MetaCard.js +52 -0
  54. package/dist/es/a/MetaCard/index.js +1 -0
  55. package/dist/es/a/MetaCard/styles.scss +28 -0
  56. package/dist/es/a/Popover/Popover.js +1 -1
  57. package/dist/es/a/SnapScroller/styles.scss +18 -10
  58. package/dist/es/a/TextSteps/TextSteps.js +61 -0
  59. package/dist/es/a/TextSteps/index.js +1 -0
  60. package/dist/es/a/TextSteps/styles.scss +29 -0
  61. package/dist/es/a/Tip/Tip.js +64 -0
  62. package/dist/es/a/Tip/index.js +2 -0
  63. package/dist/es/a/Tip/styles.scss +22 -0
  64. package/dist/es/a/index.js +6 -1
  65. package/dist/es/b/Button/styles.scss +2 -0
  66. package/dist/es/b/Card/Card.js +66 -0
  67. package/dist/es/b/Card/common/Group/Group.js +65 -0
  68. package/dist/es/b/Card/common/Group/index.js +1 -0
  69. package/dist/es/b/Card/common/Group/styles.scss +42 -0
  70. package/dist/es/b/Card/common/Section/Section.js +48 -0
  71. package/dist/es/b/Card/common/Section/index.js +1 -0
  72. package/dist/es/b/Card/common/index.js +2 -0
  73. package/dist/es/b/Card/index.js +1 -0
  74. package/dist/es/b/Card/styles.scss +46 -0
  75. package/dist/es/b/Page/Page.js +9 -2
  76. package/dist/es/b/Page/common/Section/Section.js +6 -1
  77. package/dist/es/b/Page/styles.scss +22 -4
  78. package/dist/es/b/index.js +2 -1
  79. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +16 -8
  80. package/dist/es/f/fields/ChoicesInput/styles.scss +21 -33
  81. package/dist/es/f/fields/SelectInput/SelectInput.js +2 -2
  82. package/dist/es/f/fields/SelectInput/styles.scss +31 -21
  83. package/dist/es/f/fields/TextInput/TextInput.js +4 -2
  84. package/dist/es/f/fields/TextInput/styles.scss +26 -17
  85. package/package.json +15 -15
  86. package/src/stories/a/MetaCard.stories.jsx +35 -0
  87. package/src/stories/a/TextSteps.stories.jsx +19 -0
  88. package/src/stories/a/Tip.stories.jsx +28 -0
  89. package/src/stories/b/Card/Card.stories.jsx +59 -0
  90. package/src/stories/b/Card/Group.stories.jsx +59 -0
  91. package/src/stories/b/Page.stories.jsx +19 -3
  92. package/src/stories/f/SelectInput.stories.jsx +7 -0
  93. package/src/stories/f/TextInput.stories.jsx +4 -4
  94. package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
  95. package/src/ui/a/AnimatedBlobs/index.js +1 -0
  96. package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
  97. package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +69 -0
  98. package/src/ui/a/AnimatedGradient/index.js +1 -0
  99. package/src/ui/a/AnimatedGradient/styles.scss +14 -0
  100. package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
  101. package/src/ui/a/ContentTree/ContentTree.jsx +1 -1
  102. package/src/ui/a/Label/Label.jsx +11 -2
  103. package/src/ui/a/Label/styles.scss +1 -1
  104. package/src/ui/a/MetaCard/MetaCard.jsx +74 -0
  105. package/src/ui/a/MetaCard/index.js +1 -0
  106. package/src/ui/a/MetaCard/styles.scss +28 -0
  107. package/src/ui/a/Popover/Popover.jsx +1 -1
  108. package/src/ui/a/SnapScroller/styles.scss +18 -10
  109. package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
  110. package/src/ui/a/TextSteps/index.js +1 -0
  111. package/src/ui/a/TextSteps/styles.scss +29 -0
  112. package/src/ui/a/Tip/Tip.jsx +88 -0
  113. package/src/ui/a/Tip/index.js +2 -0
  114. package/src/ui/a/Tip/styles.scss +22 -0
  115. package/src/ui/a/index.js +5 -0
  116. package/src/ui/b/Button/styles.scss +2 -0
  117. package/src/ui/b/Card/Card.jsx +94 -0
  118. package/src/ui/b/Card/common/Group/Group.jsx +91 -0
  119. package/src/ui/b/Card/common/Group/index.js +1 -0
  120. package/src/ui/b/Card/common/Group/styles.scss +42 -0
  121. package/src/ui/b/Card/common/Section/Section.jsx +70 -0
  122. package/src/ui/b/Card/common/Section/index.js +1 -0
  123. package/src/ui/b/Card/common/index.js +2 -0
  124. package/src/ui/b/Card/index.js +1 -0
  125. package/src/ui/b/Card/styles.scss +46 -0
  126. package/src/ui/b/Page/Page.jsx +7 -1
  127. package/src/ui/b/Page/common/Section/Section.jsx +8 -0
  128. package/src/ui/b/Page/styles.scss +22 -4
  129. package/src/ui/b/index.js +1 -0
  130. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +10 -5
  131. package/src/ui/f/fields/ChoicesInput/styles.scss +21 -33
  132. package/src/ui/f/fields/SelectInput/SelectInput.jsx +2 -2
  133. package/src/ui/f/fields/SelectInput/styles.scss +31 -21
  134. package/src/ui/f/fields/TextInput/TextInput.jsx +11 -9
  135. package/src/ui/f/fields/TextInput/styles.scss +26 -17
  136. package/tests/__snapshots__/Storyshots.test.js.snap +1049 -485
@@ -94,7 +94,7 @@ Popover.propTypes = {
94
94
  * The reference to the parent element
95
95
  */
96
96
  parentRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
97
- current: PropTypes.instanceOf(React.Element)
97
+ current: PropTypes.node
98
98
  })])
99
99
  };
100
100
  Popover.defaultProps = {
@@ -5,20 +5,23 @@
5
5
  @use "@pareto-engineering/styles/src/mixins";
6
6
  @use "@pareto-engineering/styles/src/globals" as *;
7
7
 
8
- $default-spacing:var(--spacing, var(--u));
8
+ $default-spacing: var(--gap, 1em);
9
9
 
10
10
  .#{bem.$base}.snap-scroller {
11
11
  display: flex;
12
- -ms-overflow-style: none; /* for Internet Explorer, Edge */
12
+ gap: $default-spacing;
13
+ -ms-overflow-style: none;
13
14
  overflow-x: auto;
14
- scroll-padding: calc(#{$default-spacing} * 2);
15
+ scroll-padding: calc($default-spacing * 2);
15
16
  scroll-snap-type: x mandatory;
16
17
  scrollbar-width: none;
17
18
 
19
+ &::-webkit-scrollbar {
20
+ display: none;
21
+ }
18
22
 
19
- > * {
23
+ >* {
20
24
  display: inline-block;
21
- margin-right: $default-spacing;
22
25
  scroll-snap-align: start;
23
26
 
24
27
  &:first-child {
@@ -26,15 +29,20 @@ $default-spacing:var(--spacing, var(--u));
26
29
  }
27
30
  }
28
31
 
29
-
30
- @include mixins.media($from:$sm-md) {
32
+ @include mixins.media($from: $sm-md) {
31
33
  &.desktop-no-scroll {
32
34
  overflow: auto;
33
- -ms-overflow-style: unset; /* for Internet Explorer, Edge */
35
+ -ms-overflow-style: unset;
34
36
  scroll-snap-type: none;
35
37
  scrollbar-width: unset;
38
+
39
+ >* {
40
+ min-width: unset;
41
+
42
+ &:first-child {
43
+ margin-left: unset;
44
+ }
45
+ }
36
46
  }
37
47
  }
38
48
  }
39
-
40
-
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import { useLayoutEffect } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import styleNames from '@pareto-engineering/bem/exports';
5
+
6
+ // Local Definitions
7
+
8
+ const baseClassName = styleNames.base;
9
+ const componentClassName = 'steps';
10
+
11
+ /**
12
+ * This is the component description.
13
+ */
14
+ const Steps = ({
15
+ id,
16
+ className: userClassName,
17
+ style,
18
+ items,
19
+ title
20
+ }) => {
21
+ useLayoutEffect(() => {
22
+ import("./styles.scss");
23
+ }, []);
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ id: id,
26
+ className: [baseClassName, componentClassName, userClassName, 'grid'].filter(e => e).join(' '),
27
+ style: style
28
+ }, title && /*#__PURE__*/React.createElement("p", {
29
+ className: "title h4"
30
+ }, title), items.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
31
+ className: " number h3 start-1 span-2 md-start-1 md-span-2"
32
+ }, /*#__PURE__*/React.createElement("p", null, i + 1)), /*#__PURE__*/React.createElement("div", {
33
+ className: " description"
34
+ }, /*#__PURE__*/React.createElement("p", null, item)))));
35
+ };
36
+ Steps.propTypes = {
37
+ /**
38
+ * The HTML id for this element
39
+ */
40
+ id: PropTypes.string,
41
+ /**
42
+ * The HTML class names for this element
43
+ */
44
+ className: PropTypes.string,
45
+ /**
46
+ * The React-written, css properties for this element.
47
+ */
48
+ style: PropTypes.objectOf(PropTypes.string),
49
+ /**
50
+ * The steps to iterate
51
+ */
52
+ items: PropTypes.arrayOf(PropTypes.shape({
53
+ title: PropTypes.string,
54
+ description: PropTypes.node
55
+ })).isRequired,
56
+ /**
57
+ * The title to pass to the component
58
+ */
59
+ title: PropTypes.string
60
+ };
61
+ export default Steps;
@@ -0,0 +1 @@
1
+ export { default as TextSteps } from "./TextSteps";
@@ -0,0 +1,29 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ $default-padding: 1em;
8
+
9
+ .#{bem.$base}.steps {
10
+ grid-column: 1 / -1;
11
+ grid-template-columns: repeat(var(--columns), 1fr);
12
+ padding: $default-padding 0;
13
+
14
+ .description {
15
+ grid-column: 2 / -1;
16
+
17
+ > p {
18
+ color: var(--metadata);
19
+ }
20
+ }
21
+
22
+ .number {
23
+ grid-column: 1 / span 1;
24
+ }
25
+
26
+ .title {
27
+ grid-column: 1 / -1;
28
+ }
29
+ }
@@ -0,0 +1,64 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useInsertionEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem/exports';
6
+
7
+ // Local Definitions
8
+
9
+ const baseClassName = styleNames.base;
10
+ const componentClassName = 'tip';
11
+
12
+ /**
13
+ * This is the component description.
14
+ */
15
+ const Tip = ({
16
+ id,
17
+ className: userClassName,
18
+ style,
19
+ children,
20
+ as: Wrapper,
21
+ color
22
+ // ...otherProps
23
+ }) => {
24
+ useInsertionEffect(() => {
25
+ import("./styles.scss");
26
+ }, []);
27
+ return /*#__PURE__*/React.createElement(Wrapper, {
28
+ id: id,
29
+ className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
30
+ style: style
31
+ // {...otherProps}
32
+ }, children);
33
+ };
34
+ Tip.propTypes = {
35
+ /**
36
+ * The HTML id for this element
37
+ */
38
+ id: PropTypes.string,
39
+ /**
40
+ * The HTML class names for this element
41
+ */
42
+ className: PropTypes.string,
43
+ /**
44
+ * The React-written, css properties for this element.
45
+ */
46
+ style: PropTypes.objectOf(PropTypes.string),
47
+ /**
48
+ * The children jsx
49
+ */
50
+ children: PropTypes.node.isRequired,
51
+ /**
52
+ * The color of the bar
53
+ */
54
+ color: PropTypes.string,
55
+ /**
56
+ * The wrapper html type
57
+ */
58
+ as: PropTypes.string
59
+ };
60
+ Tip.defaultProps = {
61
+ as: 'p',
62
+ color: 'main'
63
+ };
64
+ export default Tip;
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Tip } from "./Tip";
@@ -0,0 +1,22 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ $default-bar-width: 2px;
8
+ $default-padding: 1em;
9
+
10
+ .#{bem.$base}.tip {
11
+ padding-left: $default-padding;
12
+ position: relative;
13
+
14
+ &::before {
15
+ background: var(--x);
16
+ content: "";
17
+ height: 100%;
18
+ left: 0;
19
+ position: absolute;
20
+ width: $default-bar-width;
21
+ }
22
+ }
@@ -14,4 +14,9 @@ export { Quote } from "./Quote";
14
14
  export { SVG } from "./SVG";
15
15
  export { SnapScroller } from "./SnapScroller";
16
16
  export { Spinner } from "./Spinner";
17
- export { Timestamp } from "./Timestamp";
17
+ export { Timestamp } from "./Timestamp";
18
+ export { MetaCard } from "./MetaCard";
19
+ export { AnimatedBlobs } from "./AnimatedBlobs";
20
+ export { Tip } from "./Tip";
21
+ export { AnimatedGradient } from "./AnimatedGradient";
22
+ export { TextSteps } from "./TextSteps";
@@ -24,6 +24,7 @@ $default-animation-time: .31s;
24
24
 
25
25
  &.arrow-right {
26
26
  &::after {
27
+ align-self: center;
27
28
  content: "-->";
28
29
  margin-left: $default-margin;
29
30
  vertical-align: middle;
@@ -39,6 +40,7 @@ $default-animation-time: .31s;
39
40
 
40
41
  &.arrow-left {
41
42
  &::before {
43
+ align-self: center;
42
44
  content: "<--";
43
45
  margin-right: $default-margin;
44
46
  vertical-align: middle;
@@ -0,0 +1,66 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react';
3
+ import { useInsertionEffect } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem/exports';
6
+ import { ProgressBar } from "../..";
7
+ import { Group, Section } from "./common";
8
+
9
+ // Local Definitions
10
+
11
+ const baseClassName = styleNames.base;
12
+ const componentClassName = 'card';
13
+
14
+ /**
15
+ * This is the component description.
16
+ */
17
+ const Card = ({
18
+ id,
19
+ className: userClassName,
20
+ style,
21
+ children,
22
+ progress,
23
+ progressBarColor
24
+ }) => {
25
+ useInsertionEffect(() => {
26
+ import("./styles.scss");
27
+ }, []);
28
+ return /*#__PURE__*/React.createElement("div", {
29
+ id: id,
30
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
31
+ style: style
32
+ }, progress && /*#__PURE__*/React.createElement(ProgressBar, {
33
+ attached: true,
34
+ color: progressBarColor,
35
+ progress: progress,
36
+ height: ".5em"
37
+ }), children);
38
+ };
39
+ Card.propTypes = {
40
+ /**
41
+ * The HTML id for this element
42
+ */
43
+ id: PropTypes.string,
44
+ /**
45
+ * The HTML class names for this element
46
+ */
47
+ className: PropTypes.string,
48
+ /**
49
+ * The React-written, css properties for this element.
50
+ */
51
+ style: PropTypes.objectOf(PropTypes.string),
52
+ /**
53
+ * The progress bar percentage
54
+ */
55
+ progress: PropTypes.number,
56
+ /**
57
+ * The progress bar color
58
+ */
59
+ progressBarColor: PropTypes.string
60
+ };
61
+ Card.defaultProps = {
62
+ progressBarColor: 'main'
63
+ };
64
+ Card.Section = Section;
65
+ Card.Group = Group;
66
+ export default Card;
@@ -0,0 +1,65 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+ /* @pareto-engineering/generator-front 1.0.12 */
3
+ import * as React from 'react';
4
+ import { useInsertionEffect } from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import styleNames from '@pareto-engineering/bem/exports';
7
+ import { SnapScroller } from "../../../..";
8
+
9
+ // Local Definitions
10
+
11
+ const baseClassName = styleNames.base;
12
+ const componentClassName = 'group';
13
+ const Group = ({
14
+ id,
15
+ className: userClassName,
16
+ style,
17
+ children,
18
+ type,
19
+ desktopType,
20
+ ...otherProps
21
+ }) => {
22
+ useInsertionEffect(() => {
23
+ import("./styles.scss");
24
+ }, []);
25
+ const Wrapper = type === 'snap-scroller' ? SnapScroller : 'div';
26
+ const wrapperProps = type === 'snap-scroller' ? {
27
+ noScrollOnDesktop: true
28
+ } : {};
29
+ return /*#__PURE__*/React.createElement(Wrapper, _extends({
30
+ id: id,
31
+ className: [baseClassName, componentClassName, userClassName, type === 'grid' ? 'grid' : type, `desktop-${desktopType}`].filter(e => e).join(' '),
32
+ style: style
33
+ }, otherProps, wrapperProps), children);
34
+ };
35
+ Group.propTypes = {
36
+ /**
37
+ * The HTML id for this element
38
+ */
39
+ id: PropTypes.string,
40
+ /**
41
+ * The HTML class names for this element
42
+ */
43
+ className: PropTypes.string,
44
+ /**
45
+ * The React-written, css properties for this element.
46
+ */
47
+ style: PropTypes.objectOf(PropTypes.string),
48
+ /**
49
+ * The children JSX
50
+ */
51
+ children: PropTypes.node,
52
+ /**
53
+ * Type of container by default
54
+ */
55
+ type: PropTypes.oneOf(['grid', 'vertical-flexbox', 'snap-scroller']),
56
+ /**
57
+ * Type of container for desktop
58
+ */
59
+ desktopType: PropTypes.oneOf(['grid', 'vertical-flexbox'])
60
+ };
61
+ Group.defaultProps = {
62
+ type: 'snap-scroller',
63
+ desktopType: 'vertical-flexbox'
64
+ };
65
+ export default Group;
@@ -0,0 +1 @@
1
+ export { default as Group } from "./Group";
@@ -0,0 +1,42 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@pareto-engineering/styles/src/mixins";
5
+ @use "@pareto-engineering/styles/src/globals" as *;
6
+
7
+ $default-spacing: var(--gap);
8
+
9
+ .#{bem.$base}.group {
10
+ gap: $default-spacing;
11
+
12
+ &.snap-scroller {
13
+ margin-left: calc($default-spacing * -1);
14
+ margin-right: calc($default-spacing * -1);
15
+
16
+ > .#{bem.$base}.card {
17
+ height: 100%;
18
+ }
19
+ }
20
+
21
+ &.vertical-flexbox {
22
+ display: flex;
23
+ flex-direction: column;
24
+ }
25
+
26
+ @include mixins.media($from: $sm-md) {
27
+ &.desktop-grid {
28
+ display: grid;
29
+ grid-template-columns: repeat(var(--columns), 1fr);
30
+ }
31
+
32
+ &.snap-scroller {
33
+ margin-left: unset;
34
+ margin-right: unset;
35
+ }
36
+
37
+ &.desktop-vertical-flexbox {
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,48 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+ /* @pareto-engineering/generator-front 1.0.12 */
3
+ import * as React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styleNames from '@pareto-engineering/bem/exports';
6
+
7
+ // Local Definitions
8
+
9
+ const baseClassName = styleNames.base;
10
+ const componentClassName = 'section';
11
+ const Section = ({
12
+ id,
13
+ className: userClassName,
14
+ style,
15
+ children,
16
+ isImage,
17
+ ...otherProps
18
+ }) => /*#__PURE__*/React.createElement("div", _extends({
19
+ id: id,
20
+ className: [baseClassName, componentClassName, userClassName, isImage && styleNames.modifierImage].filter(e => e).join(' '),
21
+ style: style
22
+ }, otherProps), children);
23
+ Section.propTypes = {
24
+ /**
25
+ * The HTML id for this element
26
+ */
27
+ id: PropTypes.string,
28
+ /**
29
+ * The HTML class names for this element
30
+ */
31
+ className: PropTypes.string,
32
+ /**
33
+ * The React-written, css properties for this element.
34
+ */
35
+ style: PropTypes.objectOf(PropTypes.string),
36
+ /**
37
+ * The children JSX
38
+ */
39
+ children: PropTypes.node,
40
+ /**
41
+ * Whether to use the image modifier class
42
+ */
43
+ isImage: PropTypes.bool
44
+ };
45
+ Section.defaultProps = {
46
+ // someProp:false
47
+ };
48
+ export default Section;
@@ -0,0 +1 @@
1
+ export { default as Section } from "./Section";
@@ -0,0 +1,2 @@
1
+ export { Section } from "./Section";
2
+ export { Group } from "./Group";
@@ -0,0 +1 @@
1
+ export { default as Card } from "./Card";
@@ -0,0 +1,46 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+
5
+ $default-border-radius: var(--theme-default-border-radius);
6
+ $default-border-color: var(--hard-background-cards);
7
+ $default-background: var(--background-cards-80);
8
+ $default-padding: 1.5em;
9
+
10
+ .#{bem.$base}.card {
11
+ background: $default-background;
12
+ border: 1px solid $default-border-color;
13
+ border-radius: $default-border-radius;
14
+ display: flex;
15
+ flex-direction: column;
16
+ overflow: hidden;
17
+ position: relative;
18
+
19
+ > .progress-bar {
20
+ left: 0;
21
+ position: absolute;
22
+ top: 0;
23
+ width: 100%;
24
+ }
25
+
26
+ > .#{bem.$base}.section:nth-last-child(2) {
27
+ flex-grow: 1;
28
+ }
29
+
30
+ > .#{bem.$base}.section {
31
+ padding: $default-padding;
32
+
33
+ &.#{bem.$modifier-image} {
34
+ padding: 0;
35
+
36
+ img {
37
+ border-radius: $default-border-radius;
38
+ width: 100%;
39
+ }
40
+ }
41
+ }
42
+
43
+ > .#{bem.$base}.section + .#{bem.$base}.section {
44
+ padding-top: 0;
45
+ }
46
+ }
@@ -27,6 +27,7 @@ const Page = ({
27
27
  itemType,
28
28
  as: Wrapper,
29
29
  helmetProps,
30
+ Background,
30
31
  ...otherProps
31
32
  }) => {
32
33
  useInsertionEffect(() => {
@@ -53,7 +54,9 @@ const Page = ({
53
54
  }, otherProps), itemType && /*#__PURE__*/React.createElement("meta", {
54
55
  itemProp: "mainEntityOfPage",
55
56
  content: helmetProps?.canonical
56
- }), helmetProps && /*#__PURE__*/React.createElement(PageHelmet, helmetProps), children));
57
+ }), helmetProps && /*#__PURE__*/React.createElement(PageHelmet, helmetProps), children, Background && /*#__PURE__*/React.createElement(Background, {
58
+ className: "background"
59
+ })));
57
60
  };
58
61
  Page.propTypes = {
59
62
  /**
@@ -83,7 +86,11 @@ Page.propTypes = {
83
86
  /**
84
87
  * The props to pass to `Page.Helmet`. Refer to the corresponding section of the docs.
85
88
  */
86
- helmetProps: PropTypes.objectOf(PropTypes.string)
89
+ helmetProps: PropTypes.objectOf(PropTypes.string),
90
+ /**
91
+ * The component to use as background
92
+ */
93
+ Background: PropTypes.node
87
94
  };
88
95
  Page.defaultProps = {
89
96
  as: 'main'
@@ -13,6 +13,7 @@ const Section = ({
13
13
  className: userClassName,
14
14
  style,
15
15
  children,
16
+ spaced,
16
17
  ...otherProps
17
18
  }) => {
18
19
  const {
@@ -21,7 +22,7 @@ const Section = ({
21
22
  const sectionId = userId && `${pageId}_${userId}`;
22
23
  return /*#__PURE__*/React.createElement("section", _extends({
23
24
  id: sectionId,
24
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
25
+ className: [baseClassName, componentClassName, userClassName, spaced && styleNames.modifierSpaced, 'grid'].filter(e => e).join(' '),
25
26
  style: style
26
27
  }, otherProps), children);
27
28
  };
@@ -38,6 +39,10 @@ Section.propTypes = {
38
39
  * The React-written, css properties for this element.
39
40
  */
40
41
  style: PropTypes.objectOf(PropTypes.string),
42
+ /**
43
+ * Whether the section contains the theme spacing
44
+ */
45
+ spaced: PropTypes.bool,
41
46
  /**
42
47
  * The children JSX
43
48
  */
@@ -2,16 +2,34 @@
2
2
  /* stylelint-disable selector-max-universal -- exception */
3
3
 
4
4
  @use "@pareto-engineering/bem";
5
-
5
+ @use "@pareto-engineering/styles/src/mixins";
6
+ @use "@pareto-engineering/styles/src/globals" as *;
6
7
 
7
8
  .#{bem.$base}.page {
8
- .#{bem.$base}.section {
9
+ position: relative;
10
+
11
+ > .background {
12
+ position: fixed;
13
+ z-index: -1;
14
+ }
15
+
16
+ > .#{bem.$base}.section {
17
+ padding-left: var(--gap);
18
+ padding-right: var(--gap);
9
19
  position: relative;
10
20
 
11
21
  > *:not(:last-child) {
12
22
  z-index: 1;
13
23
  }
14
- }
15
- }
16
24
 
25
+ &.#{bem.$modifier-spaced} {
26
+ padding-bottom: var(--theme-default-section-spacing);
27
+ padding-top: var(--theme-default-section-spacing);
17
28
 
29
+ @include mixins.media($from: $sm-md) {
30
+ padding-bottom: var(--theme-desktop-section-spacing);
31
+ padding-top: var(--theme-desktop-section-spacing);
32
+ }
33
+ }
34
+ }
35
+ }
@@ -3,4 +3,5 @@ export { Logo } from "./Logo";
3
3
  export { Page } from "./Page";
4
4
  export { SocialMediaButton } from "./SocialMediaButton";
5
5
  export { ThemeSelector } from "./ThemeSelector";
6
- export { Title } from "./Title";
6
+ export { Title } from "./Title";
7
+ export { Card } from "./Card";