@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
@@ -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,94 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useInsertionEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem/exports'
9
+
10
+ import { ProgressBar } from 'ui'
11
+
12
+ import { Group, Section } from './common'
13
+
14
+ // Local Definitions
15
+
16
+ const baseClassName = styleNames.base
17
+
18
+ const componentClassName = 'card'
19
+
20
+ /**
21
+ * This is the component description.
22
+ */
23
+ const Card = ({
24
+ id,
25
+ className: userClassName,
26
+ style,
27
+ children,
28
+ progress,
29
+ progressBarColor,
30
+ }) => {
31
+ useInsertionEffect(() => {
32
+ import('./styles.scss')
33
+ }, [])
34
+
35
+ return (
36
+ <div
37
+ id={id}
38
+ className={[
39
+ baseClassName,
40
+ componentClassName,
41
+ userClassName,
42
+ ]
43
+ .filter((e) => e)
44
+ .join(' ')}
45
+ style={style}
46
+ >
47
+ {progress && (
48
+ <ProgressBar
49
+ attached
50
+ color={progressBarColor}
51
+ progress={progress}
52
+ height=".5em"
53
+ />
54
+ )}
55
+ {children}
56
+ </div>
57
+ )
58
+ }
59
+
60
+ Card.propTypes = {
61
+ /**
62
+ * The HTML id for this element
63
+ */
64
+ id:PropTypes.string,
65
+
66
+ /**
67
+ * The HTML class names for this element
68
+ */
69
+ className:PropTypes.string,
70
+
71
+ /**
72
+ * The React-written, css properties for this element.
73
+ */
74
+ style:PropTypes.objectOf(PropTypes.string),
75
+
76
+ /**
77
+ * The progress bar percentage
78
+ */
79
+ progress:PropTypes.number,
80
+
81
+ /**
82
+ * The progress bar color
83
+ */
84
+ progressBarColor:PropTypes.string,
85
+ }
86
+
87
+ Card.defaultProps = {
88
+ progressBarColor:'main',
89
+ }
90
+
91
+ Card.Section = Section
92
+ Card.Group = Group
93
+
94
+ export default Card
@@ -0,0 +1,91 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useInsertionEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem/exports'
9
+
10
+ import { SnapScroller } from 'ui'
11
+
12
+ // Local Definitions
13
+
14
+ const baseClassName = styleNames.base
15
+
16
+ const componentClassName = 'group'
17
+
18
+ const Group = ({
19
+ id,
20
+ className: userClassName,
21
+ style,
22
+ children,
23
+ type,
24
+ desktopType,
25
+ ...otherProps
26
+ }) => {
27
+ useInsertionEffect(() => {
28
+ import('./styles.scss')
29
+ }, [])
30
+ const Wrapper = type === 'snap-scroller' ? SnapScroller : 'div'
31
+ const wrapperProps = type === 'snap-scroller' ? { noScrollOnDesktop: true } : {}
32
+
33
+ return (
34
+ <Wrapper
35
+ id={id}
36
+ className={[
37
+ baseClassName,
38
+ componentClassName,
39
+ userClassName,
40
+ type === 'grid' ? 'grid' : type,
41
+ `desktop-${desktopType}`,
42
+ ]
43
+ .filter((e) => e)
44
+ .join(' ')}
45
+ style={style}
46
+ {...otherProps}
47
+ {...wrapperProps}
48
+ >
49
+ {children}
50
+ </Wrapper>
51
+ )
52
+ }
53
+
54
+ Group.propTypes = {
55
+ /**
56
+ * The HTML id for this element
57
+ */
58
+ id:PropTypes.string,
59
+
60
+ /**
61
+ * The HTML class names for this element
62
+ */
63
+ className:PropTypes.string,
64
+
65
+ /**
66
+ * The React-written, css properties for this element.
67
+ */
68
+ style:PropTypes.objectOf(PropTypes.string),
69
+
70
+ /**
71
+ * The children JSX
72
+ */
73
+ children:PropTypes.node,
74
+
75
+ /**
76
+ * Type of container by default
77
+ */
78
+ type:PropTypes.oneOf(['grid', 'vertical-flexbox', 'snap-scroller']),
79
+
80
+ /**
81
+ * Type of container for desktop
82
+ */
83
+ desktopType:PropTypes.oneOf(['grid', 'vertical-flexbox']),
84
+ }
85
+
86
+ Group.defaultProps = {
87
+ type :'snap-scroller',
88
+ desktopType:'vertical-flexbox',
89
+ }
90
+
91
+ 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,70 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import PropTypes from 'prop-types'
5
+
6
+ import styleNames from '@pareto-engineering/bem/exports'
7
+
8
+ // Local Definitions
9
+
10
+ const baseClassName = styleNames.base
11
+
12
+ const componentClassName = 'section'
13
+
14
+ const Section = ({
15
+ id,
16
+ className:userClassName,
17
+ style,
18
+ children,
19
+ isImage,
20
+ ...otherProps
21
+ }) => (
22
+ <div
23
+ id={id}
24
+ className={[
25
+ baseClassName,
26
+ componentClassName,
27
+ userClassName,
28
+ isImage && styleNames.modifierImage,
29
+ ]
30
+ .filter((e) => e)
31
+ .join(' ')}
32
+ style={style}
33
+ {...otherProps}
34
+ >
35
+ {children}
36
+ </div>
37
+ )
38
+
39
+ Section.propTypes = {
40
+ /**
41
+ * The HTML id for this element
42
+ */
43
+ id:PropTypes.string,
44
+
45
+ /**
46
+ * The HTML class names for this element
47
+ */
48
+ className:PropTypes.string,
49
+
50
+ /**
51
+ * The React-written, css properties for this element.
52
+ */
53
+ style:PropTypes.objectOf(PropTypes.string),
54
+
55
+ /**
56
+ * The children JSX
57
+ */
58
+ children:PropTypes.node,
59
+
60
+ /**
61
+ * Whether to use the image modifier class
62
+ */
63
+ isImage:PropTypes.bool,
64
+ }
65
+
66
+ Section.defaultProps = {
67
+ // someProp:false
68
+ }
69
+
70
+ 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,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useMemo, useLayoutEffect } from 'react'
4
+ import { useMemo, useInsertionEffect } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -64,7 +64,7 @@ const Logo = ({
64
64
  square,
65
65
  // ...otherProps
66
66
  }) => {
67
- useLayoutEffect(() => {
67
+ useInsertionEffect(() => {
68
68
  import('./styles.scss')
69
69
  }, [])
70
70
 
@@ -1,6 +1,6 @@
1
1
  /* @pareto-engineering/generator-front 1.0.0 */
2
2
  import * as React from 'react'
3
- import { useLayoutEffect, useEffect } from 'react'
3
+ import { useInsertionEffect, useEffect } from 'react'
4
4
  import PropTypes from 'prop-types'
5
5
  import styleNames from '@pareto-engineering/bem/exports'
6
6
 
@@ -23,13 +23,13 @@ const Page = ({
23
23
  className:userClassName,
24
24
  style,
25
25
  children,
26
-
27
26
  itemType,
28
27
  as:Wrapper,
29
28
  helmetProps,
29
+ Background,
30
30
  ...otherProps
31
31
  }) => {
32
- useLayoutEffect(() => {
32
+ useInsertionEffect(() => {
33
33
  import('./styles.scss')
34
34
  }, [])
35
35
 
@@ -70,6 +70,7 @@ const Page = ({
70
70
  )}
71
71
  { helmetProps && <PageHelmet {...helmetProps} /> }
72
72
  {children}
73
+ {Background && <Background className="background" />}
73
74
  </Wrapper>
74
75
  </Context.Provider>
75
76
  )
@@ -110,6 +111,11 @@ Page.propTypes = {
110
111
  * The props to pass to `Page.Helmet`. Refer to the corresponding section of the docs.
111
112
  */
112
113
  helmetProps:PropTypes.objectOf(PropTypes.string),
114
+
115
+ /**
116
+ * The component to use as background
117
+ */
118
+ Background:PropTypes.node,
113
119
  }
114
120
 
115
121
  Page.defaultProps = {
@@ -14,6 +14,7 @@ const Section = ({
14
14
  className:userClassName,
15
15
  style,
16
16
  children,
17
+ spaced,
17
18
  ...otherProps
18
19
  }) => {
19
20
  const {
@@ -28,6 +29,8 @@ const Section = ({
28
29
  baseClassName,
29
30
  componentClassName,
30
31
  userClassName,
32
+ spaced && styleNames.modifierSpaced,
33
+ 'grid',
31
34
  ]
32
35
  .filter((e) => e)
33
36
  .join(' ')}
@@ -55,6 +58,11 @@ Section.propTypes = {
55
58
  */
56
59
  style:PropTypes.objectOf(PropTypes.string),
57
60
 
61
+ /**
62
+ * Whether the section contains the theme spacing
63
+ */
64
+ spaced:PropTypes.bool,
65
+
58
66
  /**
59
67
  * The children JSX
60
68
  */
@@ -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
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useLayoutEffect } from 'react'
4
+ import { useInsertionEffect } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -52,7 +52,7 @@ const SocialMediaButton = ({
52
52
  }) => {
53
53
  const applicationContext = useApp()
54
54
 
55
- useLayoutEffect(() => {
55
+ useInsertionEffect(() => {
56
56
  import('./styles.scss')
57
57
  }, [])
58
58
 
@@ -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
 
@@ -29,7 +29,7 @@ const ThemeSelector = ({
29
29
  setPreferredTheme,
30
30
  } = useApp()
31
31
 
32
- useLayoutEffect(() => {
32
+ useInsertionEffect(() => {
33
33
  import('./styles.scss')
34
34
  }, [])
35
35
 
@@ -1,12 +1,13 @@
1
1
  /* @pareto-engineering/generator-front 0.3.1 */
2
2
  import * as React from 'react'
3
+ import { useInsertionEffect } from 'react'
3
4
  import PropTypes from 'prop-types'
4
5
 
5
6
  // Package-level Imports
6
7
  import styleNames from '@pareto-engineering/bem/exports'
7
8
 
8
9
  // Component-level imports
9
- import('./styles.scss')
10
+ // import('./styles.scss')
10
11
 
11
12
  // Helper Definition
12
13
  const baseClassName = styleNames.base
@@ -28,31 +29,36 @@ const Title = ({
28
29
  subtitleStyle,
29
30
  subtitleProps,
30
31
  // ...otherProps
31
- }) => (
32
- <div
33
- id={id}
34
- className={[
35
- baseClassName,
36
- componentClassName,
37
- userClassName,
38
- ]
39
- .filter((e) => e)
40
- .join(' ')}
41
- style={style}
42
- >
43
- <HeadingWrapper
32
+ }) => {
33
+ useInsertionEffect(() => {
34
+ import('./styles.scss')
35
+ }, [])
36
+
37
+ return (
38
+ <div
39
+ id={id}
44
40
  className={[
45
- headingClassName,
46
- styleNames.heading,
41
+ baseClassName,
42
+ componentClassName,
43
+ userClassName,
47
44
  ]
48
45
  .filter((e) => e)
49
46
  .join(' ')}
50
- style={headingStyle}
51
- {...headingProps}
47
+ style={style}
52
48
  >
53
- { heading }
54
- </HeadingWrapper>
55
- { subtitle
49
+ <HeadingWrapper
50
+ className={[
51
+ headingClassName,
52
+ styleNames.heading,
53
+ ]
54
+ .filter((e) => e)
55
+ .join(' ')}
56
+ style={headingStyle}
57
+ {...headingProps}
58
+ >
59
+ { heading }
60
+ </HeadingWrapper>
61
+ { subtitle
56
62
  && (
57
63
  <SubtitleWrapper
58
64
  className={[
@@ -67,8 +73,9 @@ const Title = ({
67
73
  { subtitle }
68
74
  </SubtitleWrapper>
69
75
  )}
70
- </div>
71
- )
76
+ </div>
77
+ )
78
+ }
72
79
 
73
80
  Title.propTypes = {
74
81
  /**
package/src/ui/b/index.js CHANGED
@@ -4,3 +4,4 @@ export { Page } from './Page'
4
4
  export { SocialMediaButton } from './SocialMediaButton'
5
5
  export { ThemeSelector } from './ThemeSelector'
6
6
  export { Title } from './Title'
7
+ export { Card } from './Card'
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useLayoutEffect, useReducer } from 'react'
4
+ import { useInsertionEffect, useReducer } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -64,7 +64,7 @@ const ContentSlides = ({
64
64
  isDebug,
65
65
  // ...otherProps
66
66
  }) => {
67
- useLayoutEffect(() => {
67
+ useInsertionEffect(() => {
68
68
  import('./styles.scss')
69
69
  }, [])
70
70
 
@@ -123,7 +123,7 @@ const ContentSlides = ({
123
123
  })
124
124
  }
125
125
 
126
- useLayoutEffect(() => {
126
+ useInsertionEffect(() => {
127
127
  setCurrentStep(currentStepIndex)
128
128
  },
129
129
  [currentStepIndex])
@@ -1,7 +1,7 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
2
  import * as React from 'react'
3
3
 
4
- import { useLayoutEffect } from 'react'
4
+ import { useInsertionEffect } from 'react'
5
5
 
6
6
  import PropTypes from 'prop-types'
7
7
 
@@ -28,7 +28,7 @@ const Modal = ({
28
28
  close,
29
29
  // ...otherProps
30
30
  }) => {
31
- useLayoutEffect(() => {
31
+ useInsertionEffect(() => {
32
32
  import('./styles.scss')
33
33
  }, [])
34
34