@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
@@ -0,0 +1,74 @@
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
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base
13
+
14
+ const componentClassName = 'meta-card'
15
+
16
+ /**
17
+ * This is the component description.
18
+ */
19
+ const MetaCard = ({
20
+ id,
21
+ className: userClassName,
22
+ style,
23
+ children,
24
+ hasBackgroundBlur,
25
+ }) => {
26
+ useInsertionEffect(() => {
27
+ import('./styles.scss')
28
+ }, [])
29
+
30
+ return (
31
+ <div
32
+ id={id}
33
+ className={[
34
+ baseClassName,
35
+ componentClassName,
36
+ userClassName,
37
+ hasBackgroundBlur && styleNames.modifierBlur,
38
+ ]
39
+ .filter((e) => e)
40
+ .join(' ')}
41
+ style={style}
42
+ >
43
+ {children}
44
+ </div>
45
+ )
46
+ }
47
+
48
+ MetaCard.propTypes = {
49
+ /**
50
+ * The HTML id for this element
51
+ */
52
+ id:PropTypes.string,
53
+
54
+ /**
55
+ * The HTML class names for this element
56
+ */
57
+ className:PropTypes.string,
58
+
59
+ /**
60
+ * The React-written, css properties for this element.
61
+ */
62
+ style:PropTypes.objectOf(PropTypes.string),
63
+
64
+ /**
65
+ * Whether the card has a background blur
66
+ * */
67
+ hasBackgroundBlur:PropTypes.bool,
68
+ }
69
+
70
+ MetaCard.defaultProps = {
71
+ // someProp:false
72
+ }
73
+
74
+ export default MetaCard
@@ -0,0 +1 @@
1
+ export { default as MetaCard } from './MetaCard'
@@ -0,0 +1,28 @@
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-border-radius: 2.25rem;
8
+ $default-border-color: var(--hard-background-cards);
9
+ $default-background: var(--background-cards-50);
10
+
11
+ $default-blur: var(--theme-default-blur);
12
+
13
+ .#{bem.$base}.meta-card {
14
+ background: $default-background;
15
+ border: 1px solid $default-border-color;
16
+ border-radius: $default-border-radius;
17
+
18
+ &.#{bem.$modifier-blur} {
19
+ backdrop-filter: $default-blur;
20
+ }
21
+
22
+ @include mixins.media($to: $sm-md) {
23
+ // Temporary solution
24
+ margin-left: calc((var(--gap)) * -1);
25
+ margin-right: calc((var(--gap)) * -1);
26
+ padding: var(--gap);
27
+ }
28
+ }
@@ -141,7 +141,7 @@ Popover.propTypes = {
141
141
  */
142
142
  parentRef:PropTypes.oneOfType([
143
143
  PropTypes.func,
144
- PropTypes.shape({ current: PropTypes.instanceOf(React.Element) }),
144
+ PropTypes.shape({ current: PropTypes.node }),
145
145
  ]),
146
146
  }
147
147
 
@@ -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,87 @@
1
+ import * as React from 'react'
2
+
3
+ import { useLayoutEffect } from 'react'
4
+
5
+ import PropTypes from 'prop-types'
6
+
7
+ import styleNames from '@pareto-engineering/bem/exports'
8
+
9
+ // Local Definitions
10
+
11
+ const baseClassName = styleNames.base
12
+
13
+ const componentClassName = 'steps'
14
+
15
+ /**
16
+ * This is the component description.
17
+ */
18
+ const Steps = ({
19
+ id,
20
+ className:userClassName,
21
+ style,
22
+ items,
23
+ title,
24
+ }) => {
25
+ useLayoutEffect(() => {
26
+ import('./styles.scss')
27
+ }, [])
28
+
29
+ return (
30
+ <div
31
+ id={id}
32
+ className={[
33
+ baseClassName,
34
+ componentClassName,
35
+ userClassName,
36
+ 'grid',
37
+ ]
38
+ .filter((e) => e)
39
+ .join(' ')}
40
+ style={style}
41
+ >
42
+ {title && (
43
+ <p className="title h4">
44
+ {title}
45
+ </p>
46
+ )}
47
+ {items.map((item, i) => (
48
+ <>
49
+ <div className=" number h3 start-1 span-2 md-start-1 md-span-2"><p>{i + 1}</p></div>
50
+ <div className=" description"><p>{item}</p></div>
51
+ </>
52
+ ))}
53
+ </div>
54
+ )
55
+ }
56
+
57
+ Steps.propTypes = {
58
+ /**
59
+ * The HTML id for this element
60
+ */
61
+ id:PropTypes.string,
62
+
63
+ /**
64
+ * The HTML class names for this element
65
+ */
66
+ className:PropTypes.string,
67
+
68
+ /**
69
+ * The React-written, css properties for this element.
70
+ */
71
+ style:PropTypes.objectOf(PropTypes.string),
72
+
73
+ /**
74
+ * The steps to iterate
75
+ */
76
+ items:PropTypes.arrayOf(PropTypes.shape({
77
+ title :PropTypes.string,
78
+ description:PropTypes.node,
79
+ })).isRequired,
80
+
81
+ /**
82
+ * The title to pass to the component
83
+ */
84
+ title:PropTypes.string,
85
+ }
86
+
87
+ 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,88 @@
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
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base
13
+
14
+ const componentClassName = 'tip'
15
+
16
+ /**
17
+ * This is the component description.
18
+ */
19
+ const Tip = ({
20
+ id,
21
+ className:userClassName,
22
+ style,
23
+ children,
24
+ as:Wrapper,
25
+ color,
26
+ // ...otherProps
27
+ }) => {
28
+ useInsertionEffect(() => {
29
+ import('./styles.scss')
30
+ }, [])
31
+
32
+ return (
33
+ <Wrapper
34
+ id={id}
35
+ className={[
36
+ baseClassName,
37
+ componentClassName,
38
+ userClassName,
39
+ `x-${color}`,
40
+ ]
41
+ .filter((e) => e)
42
+ .join(' ')}
43
+ style={style}
44
+ // {...otherProps}
45
+ >
46
+ {children}
47
+ </Wrapper>
48
+ )
49
+ }
50
+
51
+ Tip.propTypes = {
52
+ /**
53
+ * The HTML id for this element
54
+ */
55
+ id:PropTypes.string,
56
+
57
+ /**
58
+ * The HTML class names for this element
59
+ */
60
+ className:PropTypes.string,
61
+
62
+ /**
63
+ * The React-written, css properties for this element.
64
+ */
65
+ style:PropTypes.objectOf(PropTypes.string),
66
+
67
+ /**
68
+ * The children jsx
69
+ */
70
+ children:PropTypes.node.isRequired,
71
+
72
+ /**
73
+ * The color of the bar
74
+ */
75
+ color:PropTypes.string,
76
+
77
+ /**
78
+ * The wrapper html type
79
+ */
80
+ as:PropTypes.string,
81
+ }
82
+
83
+ Tip.defaultProps = {
84
+ as :'p',
85
+ color:'main',
86
+ }
87
+
88
+ 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
+ }
package/src/ui/a/index.js CHANGED
@@ -17,3 +17,8 @@ export { SVG } from './SVG'
17
17
  export { SnapScroller } from './SnapScroller'
18
18
  export { Spinner } from './Spinner'
19
19
  export { Timestamp } from './Timestamp'
20
+ export { MetaCard } from './MetaCard'
21
+ export { AnimatedBlobs } from './AnimatedBlobs'
22
+ export { Tip } from './Tip'
23
+ export { AnimatedGradient } from './AnimatedGradient'
24
+ 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,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
+ }