@pareto-engineering/design-system 4.0.0-alpha.4 → 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 (235) 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 +2 -2
  9. package/dist/cjs/a/Conversation/Conversation.js +1 -1
  10. package/dist/cjs/a/DotInfo/DotInfo.js +1 -1
  11. package/dist/cjs/a/Figure/Figure.js +1 -1
  12. package/dist/cjs/a/HamburgerButton/HamburgerButton.js +1 -1
  13. package/dist/cjs/a/IconList/IconList.js +1 -1
  14. package/dist/cjs/a/Label/Label.js +13 -5
  15. package/dist/cjs/a/Label/styles.scss +1 -1
  16. package/dist/cjs/a/LoadingCircle/LoadingCircle.js +1 -1
  17. package/dist/cjs/a/MetaCard/MetaCard.js +60 -0
  18. package/dist/cjs/a/MetaCard/index.js +13 -0
  19. package/dist/cjs/a/MetaCard/styles.scss +28 -0
  20. package/dist/cjs/a/People/People.js +1 -1
  21. package/dist/cjs/a/Popover/Popover.js +2 -2
  22. package/dist/cjs/a/ProgressBar/ProgressBar.js +1 -1
  23. package/dist/cjs/a/Quote/Quote.js +1 -1
  24. package/dist/cjs/a/SVG/SVG.js +1 -1
  25. package/dist/cjs/a/SnapScroller/SnapScroller.js +1 -1
  26. package/dist/cjs/a/SnapScroller/styles.scss +18 -10
  27. package/dist/cjs/a/Spinner/Spinner.js +1 -1
  28. package/dist/cjs/a/TextSteps/TextSteps.js +70 -0
  29. package/dist/cjs/a/TextSteps/index.js +13 -0
  30. package/dist/cjs/a/TextSteps/styles.scss +29 -0
  31. package/dist/cjs/a/Timestamp/Timestamp.js +1 -1
  32. package/dist/cjs/a/Tip/Tip.js +72 -0
  33. package/dist/cjs/a/Tip/index.js +13 -0
  34. package/dist/cjs/a/Tip/styles.scss +22 -0
  35. package/dist/cjs/a/index.js +36 -1
  36. package/dist/cjs/b/Button/Button.js +2 -1
  37. package/dist/cjs/b/Button/styles.scss +2 -0
  38. package/dist/cjs/b/Card/Card.js +74 -0
  39. package/dist/cjs/b/Card/common/Group/Group.js +73 -0
  40. package/dist/cjs/b/Card/common/Group/index.js +13 -0
  41. package/dist/cjs/b/Card/common/Group/styles.scss +42 -0
  42. package/dist/cjs/b/Card/common/Section/Section.js +59 -0
  43. package/dist/cjs/b/Card/common/Section/index.js +13 -0
  44. package/dist/cjs/b/Card/common/index.js +19 -0
  45. package/dist/cjs/b/Card/index.js +13 -0
  46. package/dist/cjs/b/Card/styles.scss +46 -0
  47. package/dist/cjs/b/Logo/Logo.js +1 -1
  48. package/dist/cjs/b/Page/Page.js +10 -3
  49. package/dist/cjs/b/Page/common/Section/Section.js +6 -1
  50. package/dist/cjs/b/Page/styles.scss +22 -4
  51. package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +1 -1
  52. package/dist/cjs/b/SocialMediaButton/styles.scss +1 -1
  53. package/dist/cjs/b/ThemeSelector/ThemeSelector.js +1 -1
  54. package/dist/cjs/b/Title/Title.js +4 -1
  55. package/dist/cjs/b/index.js +8 -1
  56. package/dist/cjs/c/ContentSlides/ContentSlides.js +2 -2
  57. package/dist/cjs/c/Modal/Modal.js +1 -1
  58. package/dist/cjs/c/Modal/styles.scss +2 -1
  59. package/dist/cjs/c/Shortener/Shortener.js +1 -1
  60. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +1 -1
  61. package/dist/cjs/f/FormInput/FormInput.js +1 -1
  62. package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
  63. package/dist/cjs/f/common/Description/Description.js +1 -1
  64. package/dist/cjs/f/common/Label/Label.js +1 -1
  65. package/dist/cjs/f/fields/Checkbox/Checkbox.js +1 -1
  66. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +16 -8
  67. package/dist/cjs/f/fields/ChoicesInput/styles.scss +21 -33
  68. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +1 -1
  69. package/dist/cjs/f/fields/QueryCombobox/styles.scss +5 -4
  70. package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +1 -1
  71. package/dist/cjs/f/fields/SelectInput/SelectInput.js +3 -3
  72. package/dist/cjs/f/fields/SelectInput/styles.scss +31 -21
  73. package/dist/cjs/f/fields/TextInput/TextInput.js +5 -3
  74. package/dist/cjs/f/fields/TextInput/styles.scss +26 -17
  75. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
  76. package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +82 -0
  77. package/dist/es/a/AnimatedBlobs/index.js +1 -0
  78. package/dist/es/a/AnimatedBlobs/styles.scss +87 -0
  79. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +48 -0
  80. package/dist/es/a/AnimatedGradient/index.js +1 -0
  81. package/dist/es/a/AnimatedGradient/styles.scss +14 -0
  82. package/dist/es/a/AnimatedGradient/webGIRenderer.js +492 -0
  83. package/dist/es/a/ContentTree/ContentTree.js +3 -3
  84. package/dist/es/a/Conversation/Conversation.js +2 -2
  85. package/dist/es/a/DotInfo/DotInfo.js +2 -2
  86. package/dist/es/a/Figure/Figure.js +2 -2
  87. package/dist/es/a/HamburgerButton/HamburgerButton.js +2 -2
  88. package/dist/es/a/IconList/IconList.js +2 -2
  89. package/dist/es/a/Label/Label.js +14 -6
  90. package/dist/es/a/Label/styles.scss +1 -1
  91. package/dist/es/a/LoadingCircle/LoadingCircle.js +2 -2
  92. package/dist/es/a/MetaCard/MetaCard.js +52 -0
  93. package/dist/es/a/MetaCard/index.js +1 -0
  94. package/dist/es/a/MetaCard/styles.scss +28 -0
  95. package/dist/es/a/People/People.js +2 -2
  96. package/dist/es/a/Popover/Popover.js +3 -3
  97. package/dist/es/a/ProgressBar/ProgressBar.js +2 -2
  98. package/dist/es/a/Quote/Quote.js +2 -2
  99. package/dist/es/a/SVG/SVG.js +2 -2
  100. package/dist/es/a/SnapScroller/SnapScroller.js +2 -2
  101. package/dist/es/a/SnapScroller/styles.scss +18 -10
  102. package/dist/es/a/Spinner/Spinner.js +2 -2
  103. package/dist/es/a/TextSteps/TextSteps.js +61 -0
  104. package/dist/es/a/TextSteps/index.js +1 -0
  105. package/dist/es/a/TextSteps/styles.scss +29 -0
  106. package/dist/es/a/Timestamp/Timestamp.js +2 -2
  107. package/dist/es/a/Tip/Tip.js +64 -0
  108. package/dist/es/a/Tip/index.js +2 -0
  109. package/dist/es/a/Tip/styles.scss +22 -0
  110. package/dist/es/a/index.js +6 -1
  111. package/dist/es/b/Button/Button.js +2 -1
  112. package/dist/es/b/Button/styles.scss +2 -0
  113. package/dist/es/b/Card/Card.js +66 -0
  114. package/dist/es/b/Card/common/Group/Group.js +65 -0
  115. package/dist/es/b/Card/common/Group/index.js +1 -0
  116. package/dist/es/b/Card/common/Group/styles.scss +42 -0
  117. package/dist/es/b/Card/common/Section/Section.js +48 -0
  118. package/dist/es/b/Card/common/Section/index.js +1 -0
  119. package/dist/es/b/Card/common/index.js +2 -0
  120. package/dist/es/b/Card/index.js +1 -0
  121. package/dist/es/b/Card/styles.scss +46 -0
  122. package/dist/es/b/Logo/Logo.js +2 -2
  123. package/dist/es/b/Page/Page.js +11 -4
  124. package/dist/es/b/Page/common/Section/Section.js +6 -1
  125. package/dist/es/b/Page/styles.scss +22 -4
  126. package/dist/es/b/SocialMediaButton/SocialMediaButton.js +2 -2
  127. package/dist/es/b/SocialMediaButton/styles.scss +1 -1
  128. package/dist/es/b/ThemeSelector/ThemeSelector.js +2 -2
  129. package/dist/es/b/Title/Title.js +18 -12
  130. package/dist/es/b/index.js +2 -1
  131. package/dist/es/c/ContentSlides/ContentSlides.js +3 -3
  132. package/dist/es/c/Modal/Modal.js +2 -2
  133. package/dist/es/c/Modal/styles.scss +2 -1
  134. package/dist/es/c/Shortener/Shortener.js +2 -2
  135. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +2 -2
  136. package/dist/es/f/FormInput/FormInput.js +2 -2
  137. package/dist/es/f/common/Debugger/Debugger.js +2 -2
  138. package/dist/es/f/common/Description/Description.js +2 -2
  139. package/dist/es/f/common/Label/Label.js +2 -2
  140. package/dist/es/f/fields/Checkbox/Checkbox.js +2 -2
  141. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +18 -10
  142. package/dist/es/f/fields/ChoicesInput/styles.scss +21 -33
  143. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +2 -2
  144. package/dist/es/f/fields/QueryCombobox/styles.scss +5 -4
  145. package/dist/es/f/fields/RatingsInput/RatingsInput.js +2 -2
  146. package/dist/es/f/fields/SelectInput/SelectInput.js +4 -4
  147. package/dist/es/f/fields/SelectInput/styles.scss +31 -21
  148. package/dist/es/f/fields/TextInput/TextInput.js +6 -4
  149. package/dist/es/f/fields/TextInput/styles.scss +26 -17
  150. package/dist/es/f/fields/TextareaInput/TextareaInput.js +2 -2
  151. package/package.json +16 -16
  152. package/src/stories/a/MetaCard.stories.jsx +35 -0
  153. package/src/stories/a/TextSteps.stories.jsx +19 -0
  154. package/src/stories/a/Tip.stories.jsx +28 -0
  155. package/src/stories/b/Card/Card.stories.jsx +59 -0
  156. package/src/stories/b/Card/Group.stories.jsx +59 -0
  157. package/src/stories/b/Page.stories.jsx +19 -3
  158. package/src/stories/f/SelectInput.stories.jsx +7 -0
  159. package/src/stories/f/TextInput.stories.jsx +4 -4
  160. package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +102 -0
  161. package/src/ui/a/AnimatedBlobs/index.js +1 -0
  162. package/src/ui/a/AnimatedBlobs/styles.scss +87 -0
  163. package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +69 -0
  164. package/src/ui/a/AnimatedGradient/index.js +1 -0
  165. package/src/ui/a/AnimatedGradient/styles.scss +14 -0
  166. package/src/ui/a/AnimatedGradient/webGIRenderer.js +541 -0
  167. package/src/ui/a/ContentTree/ContentTree.jsx +3 -3
  168. package/src/ui/a/Conversation/Conversation.jsx +2 -2
  169. package/src/ui/a/DotInfo/DotInfo.jsx +2 -2
  170. package/src/ui/a/Figure/Figure.jsx +2 -2
  171. package/src/ui/a/HamburgerButton/HamburgerButton.jsx +2 -2
  172. package/src/ui/a/IconList/IconList.jsx +2 -2
  173. package/src/ui/a/Label/Label.jsx +13 -4
  174. package/src/ui/a/Label/styles.scss +1 -1
  175. package/src/ui/a/LoadingCircle/LoadingCircle.jsx +2 -2
  176. package/src/ui/a/MetaCard/MetaCard.jsx +74 -0
  177. package/src/ui/a/MetaCard/index.js +1 -0
  178. package/src/ui/a/MetaCard/styles.scss +28 -0
  179. package/src/ui/a/People/People.jsx +2 -2
  180. package/src/ui/a/Popover/Popover.jsx +3 -3
  181. package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -2
  182. package/src/ui/a/Quote/Quote.jsx +2 -2
  183. package/src/ui/a/SVG/SVG.jsx +2 -2
  184. package/src/ui/a/SnapScroller/SnapScroller.jsx +2 -2
  185. package/src/ui/a/SnapScroller/styles.scss +18 -10
  186. package/src/ui/a/Spinner/Spinner.jsx +2 -2
  187. package/src/ui/a/TextSteps/TextSteps.jsx +87 -0
  188. package/src/ui/a/TextSteps/index.js +1 -0
  189. package/src/ui/a/TextSteps/styles.scss +29 -0
  190. package/src/ui/a/Timestamp/Timestamp.jsx +2 -2
  191. package/src/ui/a/Tip/Tip.jsx +88 -0
  192. package/src/ui/a/Tip/index.js +2 -0
  193. package/src/ui/a/Tip/styles.scss +22 -0
  194. package/src/ui/a/index.js +5 -0
  195. package/src/ui/b/Button/Button.jsx +2 -1
  196. package/src/ui/b/Button/styles.scss +2 -0
  197. package/src/ui/b/Card/Card.jsx +94 -0
  198. package/src/ui/b/Card/common/Group/Group.jsx +91 -0
  199. package/src/ui/b/Card/common/Group/index.js +1 -0
  200. package/src/ui/b/Card/common/Group/styles.scss +42 -0
  201. package/src/ui/b/Card/common/Section/Section.jsx +70 -0
  202. package/src/ui/b/Card/common/Section/index.js +1 -0
  203. package/src/ui/b/Card/common/index.js +2 -0
  204. package/src/ui/b/Card/index.js +1 -0
  205. package/src/ui/b/Card/styles.scss +46 -0
  206. package/src/ui/b/Logo/Logo.jsx +2 -2
  207. package/src/ui/b/Page/Page.jsx +9 -3
  208. package/src/ui/b/Page/common/Section/Section.jsx +8 -0
  209. package/src/ui/b/Page/styles.scss +22 -4
  210. package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +2 -2
  211. package/src/ui/b/SocialMediaButton/styles.scss +1 -1
  212. package/src/ui/b/ThemeSelector/ThemeSelector.jsx +2 -2
  213. package/src/ui/b/Title/Title.jsx +30 -23
  214. package/src/ui/b/index.js +1 -0
  215. package/src/ui/c/ContentSlides/ContentSlides.jsx +3 -3
  216. package/src/ui/c/Modal/Modal.jsx +2 -2
  217. package/src/ui/c/Modal/styles.scss +2 -1
  218. package/src/ui/c/Shortener/Shortener.jsx +2 -2
  219. package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +2 -2
  220. package/src/ui/f/FormInput/FormInput.jsx +2 -2
  221. package/src/ui/f/common/Debugger/Debugger.jsx +2 -2
  222. package/src/ui/f/common/Description/Description.jsx +2 -2
  223. package/src/ui/f/common/Label/Label.jsx +2 -2
  224. package/src/ui/f/fields/Checkbox/Checkbox.jsx +2 -2
  225. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +12 -7
  226. package/src/ui/f/fields/ChoicesInput/styles.scss +21 -33
  227. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +2 -2
  228. package/src/ui/f/fields/QueryCombobox/styles.scss +5 -4
  229. package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +2 -2
  230. package/src/ui/f/fields/SelectInput/SelectInput.jsx +4 -4
  231. package/src/ui/f/fields/SelectInput/styles.scss +31 -21
  232. package/src/ui/f/fields/TextInput/TextInput.jsx +13 -11
  233. package/src/ui/f/fields/TextInput/styles.scss +26 -17
  234. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +2 -2
  235. package/tests/__snapshots__/Storyshots.test.js.snap +1049 -485
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useMemo, useLayoutEffect } from 'react';
3
+ import { useMemo, useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
  import { SVG } from "../../a";
@@ -50,7 +50,7 @@ const Logo = ({
50
50
  square
51
51
  // ...otherProps
52
52
  }) => {
53
- useLayoutEffect(() => {
53
+ useInsertionEffect(() => {
54
54
  import("./styles.scss");
55
55
  }, []);
56
56
  const contentMap = square ? contentMapSquare : contentMapWithName;
@@ -1,7 +1,7 @@
1
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
2
  /* @pareto-engineering/generator-front 1.0.0 */
3
3
  import * as React from 'react';
4
- import { useLayoutEffect, useEffect } from 'react';
4
+ import { useInsertionEffect, useEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
7
7
 
@@ -27,9 +27,10 @@ const Page = ({
27
27
  itemType,
28
28
  as: Wrapper,
29
29
  helmetProps,
30
+ Background,
30
31
  ...otherProps
31
32
  }) => {
32
- useLayoutEffect(() => {
33
+ useInsertionEffect(() => {
33
34
  import("./styles.scss");
34
35
  }, []);
35
36
  useEffect(() => {
@@ -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
+ }
@@ -1,7 +1,7 @@
1
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
2
  /* @pareto-engineering/generator-front 1.0.12 */
3
3
  import * as React from 'react';
4
- import { useLayoutEffect } from 'react';
4
+ import { useInsertionEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
7
7
  import { useApp } from "../../a";
@@ -46,7 +46,7 @@ const SocialMediaButton = ({
46
46
  ...otherProps
47
47
  }) => {
48
48
  const applicationContext = useApp();
49
- useLayoutEffect(() => {
49
+ useInsertionEffect(() => {
50
50
  import("./styles.scss");
51
51
  }, []);
52
52
  const content = type && defaultsMap[type];
@@ -32,7 +32,7 @@ $mobile-dimensions: 2.75em;
32
32
  background: var(--soft-x);
33
33
  }
34
34
 
35
- &.#{bem.$modifier-transparent} {
35
+ &.#{bem.$modifier-clear} {
36
36
  background: transparent;
37
37
  color: var(--y, var(--heading));
38
38
 
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useCallback } from 'react';
3
+ import { useInsertionEffect, useCallback } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
  import { useApp } from "../../a";
@@ -26,7 +26,7 @@ const ThemeSelector = ({
26
26
  userTheme,
27
27
  setPreferredTheme
28
28
  } = useApp();
29
- useLayoutEffect(() => {
29
+ useInsertionEffect(() => {
30
30
  import("./styles.scss");
31
31
  }, []);
32
32
  const loopThemes = useCallback(() => {
@@ -1,13 +1,14 @@
1
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
2
  /* @pareto-engineering/generator-front 0.3.1 */
3
3
  import * as React from 'react';
4
+ import { useInsertionEffect } from 'react';
4
5
  import PropTypes from 'prop-types';
5
6
 
6
7
  // Package-level Imports
7
8
  import styleNames from '@pareto-engineering/bem/exports';
8
9
 
9
10
  // Component-level imports
10
- import("./styles.scss");
11
+ // import('./styles.scss')
11
12
 
12
13
  // Helper Definition
13
14
  const baseClassName = styleNames.base;
@@ -28,17 +29,22 @@ const Title = ({
28
29
  subtitleStyle,
29
30
  subtitleProps
30
31
  // ...otherProps
31
- }) => /*#__PURE__*/React.createElement("div", {
32
- id: id,
33
- className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
34
- style: style
35
- }, /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
36
- className: [headingClassName, styleNames.heading].filter(e => e).join(' '),
37
- style: headingStyle
38
- }, headingProps), heading), subtitle && /*#__PURE__*/React.createElement(SubtitleWrapper, _extends({
39
- className: [subtitleClassName, styleNames.subtitle].filter(e => e).join(' '),
40
- style: subtitleStyle
41
- }, subtitleProps), subtitle));
32
+ }) => {
33
+ useInsertionEffect(() => {
34
+ import("./styles.scss");
35
+ }, []);
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ id: id,
38
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
39
+ style: style
40
+ }, /*#__PURE__*/React.createElement(HeadingWrapper, _extends({
41
+ className: [headingClassName, styleNames.heading].filter(e => e).join(' '),
42
+ style: headingStyle
43
+ }, headingProps), heading), subtitle && /*#__PURE__*/React.createElement(SubtitleWrapper, _extends({
44
+ className: [subtitleClassName, styleNames.subtitle].filter(e => e).join(' '),
45
+ style: subtitleStyle
46
+ }, subtitleProps), subtitle));
47
+ };
42
48
  Title.propTypes = {
43
49
  /**
44
50
  * The HTML id for this element
@@ -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";
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useReducer } from 'react';
3
+ import { useInsertionEffect, useReducer } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { useHistory } from 'react-router-dom';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
@@ -48,7 +48,7 @@ const ContentSlides = ({
48
48
  isDebug
49
49
  // ...otherProps
50
50
  }) => {
51
- useLayoutEffect(() => {
51
+ useInsertionEffect(() => {
52
52
  import("./styles.scss");
53
53
  }, []);
54
54
  const history = useHistory();
@@ -97,7 +97,7 @@ const ContentSlides = ({
97
97
  }
98
98
  });
99
99
  };
100
- useLayoutEffect(() => {
100
+ useInsertionEffect(() => {
101
101
  setCurrentStep(currentStepIndex);
102
102
  }, [currentStepIndex]);
103
103
  return /*#__PURE__*/React.createElement(ContentSlidesContext.Provider, {
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
  import { ModalHeader } from "./common";
@@ -23,7 +23,7 @@ const Modal = ({
23
23
  close
24
24
  // ...otherProps
25
25
  }) => {
26
- useLayoutEffect(() => {
26
+ useInsertionEffect(() => {
27
27
  import("./styles.scss");
28
28
  }, []);
29
29
  return /*#__PURE__*/React.createElement("div", {
@@ -1,11 +1,12 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
+ @use "sass:math";
4
5
 
5
6
  $default-background: var(--background1);
6
7
  /* stylelint-disable-next-line color-named -- needed for rgba function */
7
8
  $default-box-shadow: 0 10px 20px rgba(black, .2);
8
- $default-padding: 1em / 2;
9
+ $default-padding: math.div(1em, 2);
9
10
  $default-margin: 2em;
10
11
  $default-max-height: 75vh;
11
12
  $default-max-width: 90%;
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect, useState } from 'react';
3
+ import { useInsertionEffect, useState } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -24,7 +24,7 @@ const Shortener = ({
24
24
  separator,
25
25
  countLetters
26
26
  }) => {
27
- useLayoutEffect(() => {
27
+ useInsertionEffect(() => {
28
28
  import("./styles.scss");
29
29
  }, []);
30
30
  const [displayFull, setDisplayFull] = useState(false);
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -21,7 +21,7 @@ const SocialMediaShareButton = ({
21
21
  type,
22
22
  color
23
23
  }) => {
24
- useLayoutEffect(() => {
24
+ useInsertionEffect(() => {
25
25
  import("./styles.scss");
26
26
  }, []);
27
27
  const isServer = typeof window === 'undefined';
@@ -1,7 +1,7 @@
1
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
2
  /* @pareto-engineering/generator-front 1.0.12 */
3
3
  import * as React from 'react';
4
- import { memo, useLayoutEffect } from 'react';
4
+ import { memo, useInsertionEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { TextInput, TextareaInput, ChoicesInput, SelectInput, QueryCombobox, QuerySelect, RatingsInput, Checkbox, QueryChoices } from "../fields";
7
7
 
@@ -21,7 +21,7 @@ const FormInput = ({
21
21
  disabled,
22
22
  ...otherProps
23
23
  }) => {
24
- useLayoutEffect(() => {
24
+ useInsertionEffect(() => {
25
25
  import("./styles.scss");
26
26
  }, []);
27
27
  const newClassName = [className, componentClassName].filter(Boolean).join(' ');
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useState, useLayoutEffect, useContext } from 'react';
3
+ import { useState, useInsertionEffect, useContext } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { Button } from "../../../b";
6
6
  import { FormikContext } from 'formik';
@@ -19,7 +19,7 @@ const Debugger = ({
19
19
  initialIsOpen
20
20
  // ...otherProps
21
21
  }) => {
22
- useLayoutEffect(() => {
22
+ useInsertionEffect(() => {
23
23
  import("./styles.scss");
24
24
  }, []);
25
25
  const [isOpen, setIsOpen] = useState(initialIsOpen);
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import { useField } from 'formik';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
@@ -22,7 +22,7 @@ const Description = ({
22
22
  color
23
23
  // ...otherProps
24
24
  }) => {
25
- useLayoutEffect(() => {
25
+ useInsertionEffect(() => {
26
26
  import("./styles.scss");
27
27
  }, []);
28
28
  const [field, meta] = useField(name);
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react';
3
- import { useLayoutEffect } from 'react';
3
+ import { useInsertionEffect } from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import styleNames from '@pareto-engineering/bem/exports';
6
6
 
@@ -23,7 +23,7 @@ const Label = ({
23
23
  as: Wrapper
24
24
  // ...otherProps
25
25
  }) => {
26
- useLayoutEffect(() => {
26
+ useInsertionEffect(() => {
27
27
  import("./styles.scss");
28
28
  }, []);
29
29
  return /*#__PURE__*/React.createElement(Wrapper, {
@@ -1,7 +1,7 @@
1
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
2
  /* @pareto-engineering/generator-front 1.0.12 */
3
3
  import * as React from 'react';
4
- import { useLayoutEffect } from 'react';
4
+ import { useInsertionEffect } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import styleNames from '@pareto-engineering/bem/exports';
7
7
  import { useField } from 'formik';
@@ -26,7 +26,7 @@ const Checkbox = ({
26
26
  optional
27
27
  // ...otherProps
28
28
  }) => {
29
- useLayoutEffect(() => {
29
+ useInsertionEffect(() => {
30
30
  import("./styles.scss");
31
31
  }, []);
32
32
  const [field] = useField({