@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.23

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 (187) hide show
  1. package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +16 -29
  2. package/dist/cjs/a/AnimatedCounter/styles.scss +3 -11
  3. package/dist/cjs/a/BackgroundGradient/BackgroundGradient.js +77 -0
  4. package/dist/cjs/a/BackgroundGradient/index.js +15 -0
  5. package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
  6. package/dist/cjs/a/Conversation/Conversation.js +15 -8
  7. package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
  8. package/dist/cjs/a/Conversation/styles.scss +129 -32
  9. package/dist/cjs/a/OvalIllustration/OvalIllustration.js +133 -0
  10. package/dist/cjs/a/OvalIllustration/index.js +15 -0
  11. package/dist/cjs/a/OvalIllustration/styles.scss +102 -0
  12. package/dist/cjs/a/People/People.js +15 -7
  13. package/dist/cjs/a/People/common/Person/Person.js +11 -4
  14. package/dist/cjs/a/People/styles.scss +13 -15
  15. package/dist/cjs/a/Shapes/Shapes.js +171 -0
  16. package/dist/cjs/a/Shapes/index.js +15 -0
  17. package/dist/cjs/a/Shapes/styles.scss +255 -0
  18. package/dist/cjs/a/SnapScroller/SnapScroller.js +77 -0
  19. package/dist/cjs/a/SnapScroller/index.js +15 -0
  20. package/dist/cjs/a/SnapScroller/styles.scss +38 -0
  21. package/dist/cjs/a/TeamInfo/styles.scss +2 -2
  22. package/dist/cjs/a/index.js +33 -1
  23. package/dist/cjs/b/Button/Button.js +10 -4
  24. package/dist/cjs/b/Button/styles.scss +83 -19
  25. package/dist/cjs/b/Metrics/Metrics.js +89 -0
  26. package/dist/cjs/b/Metrics/index.js +15 -0
  27. package/dist/cjs/b/Metrics/styles.scss +91 -0
  28. package/dist/cjs/b/Page/common/Section/Section.js +56 -5
  29. package/dist/cjs/b/Page/styles.scss +8 -2
  30. package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
  31. package/dist/cjs/b/index.js +9 -1
  32. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +4 -4
  33. package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  34. package/dist/cjs/c/ContentSlides/styles.scss +10 -4
  35. package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
  36. package/dist/cjs/f/common/Label/Label.js +1 -1
  37. package/dist/cjs/f/common/Label/styles.scss +1 -1
  38. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
  39. package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
  40. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  41. package/dist/cjs/f/fields/SelectInput/SelectInput.js +37 -10
  42. package/dist/cjs/f/fields/SelectInput/styles.scss +13 -8
  43. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  44. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
  45. package/dist/cjs/f/fields/TextInput/TextInput.js +28 -7
  46. package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
  47. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -8
  48. package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
  49. package/dist/cjs/f/fields/index.js +0 -24
  50. package/dist/cjs/form-reset.scss +1 -1
  51. package/dist/cjs/form.scss +1 -1
  52. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
  53. package/dist/es/a/AnimatedCounter/styles.scss +3 -11
  54. package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
  55. package/dist/es/a/BackgroundGradient/index.js +2 -0
  56. package/dist/es/a/BackgroundGradient/styles.scss +16 -0
  57. package/dist/es/a/Conversation/Conversation.js +15 -8
  58. package/dist/es/a/Conversation/common/Message/Message.js +33 -6
  59. package/dist/es/a/Conversation/styles.scss +129 -32
  60. package/dist/es/a/OvalIllustration/OvalIllustration.js +111 -0
  61. package/dist/es/a/OvalIllustration/index.js +2 -0
  62. package/dist/es/a/OvalIllustration/styles.scss +102 -0
  63. package/dist/es/a/People/People.js +14 -7
  64. package/dist/es/a/People/common/Person/Person.js +11 -4
  65. package/dist/es/a/People/styles.scss +13 -15
  66. package/dist/es/a/Shapes/Shapes.js +149 -0
  67. package/dist/es/a/Shapes/index.js +2 -0
  68. package/dist/es/a/Shapes/styles.scss +255 -0
  69. package/dist/es/a/SnapScroller/SnapScroller.js +61 -0
  70. package/dist/es/a/SnapScroller/index.js +2 -0
  71. package/dist/es/a/SnapScroller/styles.scss +38 -0
  72. package/dist/es/a/TeamInfo/styles.scss +2 -2
  73. package/dist/es/a/index.js +5 -1
  74. package/dist/es/b/Button/Button.js +8 -2
  75. package/dist/es/b/Button/styles.scss +83 -19
  76. package/dist/es/b/Metrics/Metrics.js +72 -0
  77. package/dist/es/b/Metrics/index.js +2 -0
  78. package/dist/es/b/Metrics/styles.scss +91 -0
  79. package/dist/es/b/Page/common/Section/Section.js +55 -4
  80. package/dist/es/b/Page/styles.scss +8 -2
  81. package/dist/es/b/QuestionDropdown/styles.scss +1 -1
  82. package/dist/es/b/index.js +2 -1
  83. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +4 -4
  84. package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
  85. package/dist/es/c/ContentSlides/styles.scss +10 -4
  86. package/dist/es/f/common/Debugger/Debugger.js +1 -1
  87. package/dist/es/f/common/Label/Label.js +1 -1
  88. package/dist/es/f/common/Label/styles.scss +1 -1
  89. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
  90. package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
  91. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  92. package/dist/es/f/fields/SelectInput/SelectInput.js +37 -10
  93. package/dist/es/f/fields/SelectInput/styles.scss +13 -8
  94. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
  95. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
  96. package/dist/es/f/fields/TextInput/TextInput.js +28 -7
  97. package/dist/es/f/fields/TextInput/styles.scss +16 -7
  98. package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -8
  99. package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
  100. package/dist/es/f/fields/index.js +0 -3
  101. package/dist/es/form-reset.scss +1 -1
  102. package/dist/es/form.scss +1 -1
  103. package/package.json +3 -3
  104. package/src/__snapshots__/Storyshots.test.js.snap +6050 -812
  105. package/src/local.scss +4 -0
  106. package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
  107. package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
  108. package/src/stories/a/ContentCard.stories.jsx +1 -1
  109. package/src/stories/a/Conversation.stories.jsx +78 -1
  110. package/src/stories/a/OvalIllustration.stories.jsx +59 -0
  111. package/src/stories/a/People.stories.jsx +25 -1
  112. package/src/stories/a/ProgressBar.stories.jsx +1 -1
  113. package/src/stories/a/Quote.stories.jsx +1 -1
  114. package/src/stories/a/Shapes.stories.jsx +143 -0
  115. package/src/stories/a/SnapScroller.stories.jsx +98 -0
  116. package/src/stories/a/Spinner.stories.jsx +1 -1
  117. package/src/stories/b/Button.stories.jsx +83 -54
  118. package/src/stories/b/Metrics.stories.jsx +62 -0
  119. package/src/stories/b/Page.stories.jsx +51 -1
  120. package/src/stories/b/ThemeSelector.stories.jsx +1 -1
  121. package/src/stories/b/Title.stories.jsx +1 -1
  122. package/src/stories/c/ContentSlides.stories.jsx +154 -2
  123. package/src/stories/colors.js +5 -3
  124. package/src/stories/f/SelectInput.stories.jsx +36 -5
  125. package/src/stories/f/TextInput.stories.jsx +16 -5
  126. package/src/stories/f/TextareaInput.stories.jsx +42 -6
  127. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
  128. package/src/ui/a/AnimatedCounter/styles.scss +3 -11
  129. package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
  130. package/src/ui/a/BackgroundGradient/index.js +2 -0
  131. package/src/ui/a/BackgroundGradient/styles.scss +16 -0
  132. package/src/ui/a/Conversation/Conversation.jsx +15 -7
  133. package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
  134. package/src/ui/a/Conversation/styles.scss +129 -32
  135. package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
  136. package/src/ui/a/OvalIllustration/index.js +2 -0
  137. package/src/ui/a/OvalIllustration/styles.scss +102 -0
  138. package/src/ui/a/People/People.jsx +12 -4
  139. package/src/ui/a/People/common/Person/Person.jsx +7 -1
  140. package/src/ui/a/People/styles.scss +13 -15
  141. package/src/ui/a/Shapes/Shapes.jsx +191 -0
  142. package/src/ui/a/Shapes/index.js +2 -0
  143. package/src/ui/a/Shapes/styles.scss +255 -0
  144. package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
  145. package/src/ui/a/SnapScroller/index.js +2 -0
  146. package/src/ui/a/SnapScroller/styles.scss +38 -0
  147. package/src/ui/a/TeamInfo/styles.scss +2 -2
  148. package/src/ui/a/index.js +4 -0
  149. package/src/ui/b/Button/Button.jsx +9 -1
  150. package/src/ui/b/Button/styles.scss +83 -19
  151. package/src/ui/b/Metrics/Metrics.jsx +93 -0
  152. package/src/ui/b/Metrics/index.js +2 -0
  153. package/src/ui/b/Metrics/styles.scss +91 -0
  154. package/src/ui/b/Page/common/Section/Section.jsx +68 -2
  155. package/src/ui/b/Page/styles.scss +8 -2
  156. package/src/ui/b/QuestionDropdown/styles.scss +1 -1
  157. package/src/ui/b/index.js +1 -0
  158. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +4 -4
  159. package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
  160. package/src/ui/c/ContentSlides/styles.scss +10 -4
  161. package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
  162. package/src/ui/f/common/Label/Label.jsx +1 -1
  163. package/src/ui/f/common/Label/styles.scss +1 -1
  164. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
  165. package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
  166. package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
  167. package/src/ui/f/fields/SelectInput/SelectInput.jsx +44 -5
  168. package/src/ui/f/fields/SelectInput/styles.scss +13 -8
  169. package/src/ui/f/fields/TextInput/TextInput.jsx +24 -3
  170. package/src/ui/f/fields/TextInput/styles.scss +16 -7
  171. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +24 -13
  172. package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
  173. package/src/ui/f/fields/index.js +0 -3
  174. package/src/ui/form-reset.scss +1 -1
  175. package/src/ui/form.scss +1 -1
  176. package/src/stories/f/CheckboxInput.stories.jsx +0 -37
  177. package/src/stories/f/RadioInput.stories.jsx +0 -37
  178. package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
  179. package/src/ui/f/fields/CheckboxInput/CheckboxInput.jsx +0 -107
  180. package/src/ui/f/fields/CheckboxInput/index.js +0 -2
  181. package/src/ui/f/fields/CheckboxInput/styles.scss +0 -28
  182. package/src/ui/f/fields/RadioInput/RadioInput.jsx +0 -112
  183. package/src/ui/f/fields/RadioInput/index.js +0 -2
  184. package/src/ui/f/fields/RadioInput/styles.scss +0 -26
  185. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +0 -130
  186. package/src/ui/f/fields/TaskRecommendationInput/index.js +0 -2
  187. package/src/ui/f/fields/TaskRecommendationInput/styles.scss +0 -37
@@ -0,0 +1,83 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useLayoutEffect } from 'react'
5
+
6
+ import PropTypes from 'prop-types'
7
+
8
+ import styleNames from '@pareto-engineering/bem'
9
+
10
+ // Local Definitions
11
+
12
+ const baseClassName = styleNames.base
13
+
14
+ const componentClassName = 'snap-scroller'
15
+
16
+ /**
17
+ * This is the component description.
18
+ */
19
+ const SnapScroller = ({
20
+ id,
21
+ className:userClassName,
22
+ style,
23
+ children,
24
+ noScrollOnDesktop,
25
+ // ...otherProps
26
+ }) => {
27
+ useLayoutEffect(() => {
28
+ import('./styles.scss')
29
+ }, [])
30
+
31
+ return (
32
+ <div
33
+ id={id}
34
+ className={[
35
+
36
+ baseClassName,
37
+
38
+ componentClassName,
39
+ userClassName,
40
+ noScrollOnDesktop && 'desktop-no-scroll',
41
+ ]
42
+ .filter((e) => e)
43
+ .join(' ')}
44
+ style={style}
45
+ // {...otherProps}
46
+ >
47
+ {children}
48
+ </div>
49
+ )
50
+ }
51
+
52
+ SnapScroller.propTypes = {
53
+ /**
54
+ * The HTML id for this element
55
+ */
56
+ id:PropTypes.string,
57
+
58
+ /**
59
+ * The HTML class names for this element
60
+ */
61
+ className:PropTypes.string,
62
+
63
+ /**
64
+ * The React-written, css properties for this element.
65
+ */
66
+ style:PropTypes.objectOf(PropTypes.string),
67
+
68
+ /**
69
+ * The children JSX
70
+ */
71
+ children:PropTypes.node,
72
+
73
+ /**
74
+ * Whether to snap scroll on desktop (false will enable a flexbox)
75
+ */
76
+ noScrollOnDesktop:PropTypes.bool,
77
+ }
78
+
79
+ SnapScroller.defaultProps = {
80
+ noScrollOnDesktop:false,
81
+ }
82
+
83
+ export default SnapScroller
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as SnapScroller } from './SnapScroller'
@@ -0,0 +1,38 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@aztlan/stylebook/src/mixins";
5
+ @use "@aztlan/stylebook/src/globals" as *;
6
+
7
+ $default-spacing:var(--spacing, var(--u));
8
+
9
+ .#{bem.$base}.snap-scroller {
10
+ display: flex;
11
+ -ms-overflow-style: none; /* for Internet Explorer, Edge */
12
+ overflow-x: auto;
13
+ scroll-padding: calc(#{$default-spacing} *2);
14
+ scroll-snap-type: x mandatory;
15
+ scrollbar-width: none;
16
+
17
+
18
+ > * {
19
+ &:first-child {
20
+ margin-left: $default-spacing;
21
+ }
22
+ display: inline-block;
23
+ margin-right: $default-spacing;
24
+ scroll-snap-align: start;
25
+ }
26
+
27
+
28
+ @include mixins.media($from:$sm-md) {
29
+ &.desktop-no-scroll {
30
+ overflow: auto;
31
+ -ms-overflow-style: unset; /* for Internet Explorer, Edge */
32
+ scroll-snap-type: none;
33
+ scrollbar-width: unset;
34
+ }
35
+ }
36
+ }
37
+
38
+
@@ -10,11 +10,11 @@ $img-border-radius: var(--theme-border-radius);
10
10
  $p-h4-color:var(--subtitle);
11
11
  $role-color:var(--metadata);
12
12
  $default-name-color:var(--main1);
13
- $box-shadow:0 .45em 1em 0 var(--background);
13
+ $box-shadow:0 .45em 1em 0 var(--background1);
14
14
 
15
15
  .#{bem.$base}.team-info {
16
16
  align-items: flex-start;
17
- background: var(--light-y, var(--light-background));
17
+ background: var(--light-y, var(--light-background1));
18
18
  box-shadow: $box-shadow;
19
19
  display: flex;
20
20
  flex-direction: column;
package/src/ui/a/index.js CHANGED
@@ -23,3 +23,7 @@ export { Quote } from './Quote'
23
23
  export { ContentCard } from './ContentCard'
24
24
  export { DotInfo } from './DotInfo'
25
25
  export { Timestamp } from './Timestamp'
26
+ export { Shapes } from './Shapes'
27
+ export { OvalIllustration } from './OvalIllustration'
28
+ export { SnapScroller } from './SnapScroller'
29
+ export { BackgroundGradient } from './BackgroundGradient'
@@ -23,6 +23,7 @@ const Button = ({
23
23
  isCompact,
24
24
  isGhost,
25
25
  isSimple,
26
+ arrowDirection,
26
27
  ...otherProps
27
28
  }) => {
28
29
  useLayoutEffect(() => {
@@ -40,6 +41,7 @@ const Button = ({
40
41
  isGhost && styleNames.modifierGhost,
41
42
  isCompact && styleNames.modifierCompact,
42
43
  isSimple && styleNames.modifierSimple,
44
+ arrowDirection && `arrow-${arrowDirection}`,
43
45
  ]
44
46
  .filter((e) => e)
45
47
  .join(' ')}
@@ -98,11 +100,17 @@ Button.propTypes = {
98
100
  /**
99
101
  * The button color
100
102
  */
101
- color :PropTypes.string,
103
+ color:PropTypes.string,
104
+
102
105
  /**
103
106
  * Button loading state
104
107
  */
105
108
  isLoading:PropTypes.bool,
109
+
110
+ /**
111
+ * The direction of the arrow if the button has one
112
+ */
113
+ arrowDirection:PropTypes.string,
106
114
  }
107
115
 
108
116
  Button.defaultProps = {
@@ -4,28 +4,64 @@
4
4
 
5
5
  $default-padding: 1em 1em .84em;
6
6
  $compact-padding: .6em .6em .48em;
7
- $default-border-radius:2em;
8
7
  $default-color:primary;
9
8
  $font-weight:bold;
9
+ $default-margin:.5em;
10
+ $default-animation-time: .3s;
10
11
 
11
12
  .#{bem.$base}.button {
12
13
  background: var(--x, var(--#{$default-color}));
13
14
  border: transparent;
14
- //border-radius: var(--theme-border-radius);
15
- border-radius: $default-border-radius;
15
+ border-radius: var(--theme-border-radius);
16
16
  color: var(--on-x, var(--on-#{$default-color}));
17
- font-weight: 600;
17
+ display: inline-flex;
18
+ font-family: var(--theme-default-paragraph);
19
+ font-weight: 400;
20
+ justify-content: space-between;
18
21
  padding: $default-padding;
19
22
  transition: all .25s;
20
23
 
24
+ &.arrow-right {
25
+ &::after {
26
+ content: "-->";
27
+ margin-left: $default-margin;
28
+ vertical-align: middle;
29
+ }
30
+
31
+ &:hover {
32
+ &::after {
33
+ --final-position: 50%;
34
+ animation: animateArrow $default-animation-time forwards;
35
+ }
36
+ }
37
+ }
38
+
39
+ &.arrow-left {
40
+ &::before {
41
+ content: "<--";
42
+ margin-right: $default-margin;
43
+ vertical-align: middle;
44
+ }
45
+
46
+ &:hover {
47
+ &::before {
48
+ --final-position: -50%;
49
+ animation: animateArrow $default-animation-time forwards;
50
+ }
51
+ }
52
+ }
53
+
21
54
  &:not(:disabled) {
22
55
  cursor: pointer;
23
56
 
24
57
  &:hover {
25
58
  background: var(--light-x, var(--light-#{$default-color}));
26
59
  }
27
- }
28
60
 
61
+ &:focus {
62
+ background: var(--dark-x, var(--dark-#{$default-color}));
63
+ }
64
+ }
29
65
 
30
66
  &.#{bem.$modifier-compact} {
31
67
  padding: $compact-padding;
@@ -36,42 +72,70 @@ $font-weight:bold;
36
72
  border: 1px solid var(--x, var(--#{$default-color}));
37
73
  color: var(--x, var(--#{$default-color}));
38
74
 
39
- &:not(:disabled) {
40
- &:hover,
41
- &:focus {
42
- border: 1px solid transparent;
43
- color: var(--on-x, var(--on-#{$default-color}));
44
- }
75
+ &:hover,
76
+ &:focus,
77
+ &:disabled {
78
+ background: transparent;
79
+ }
45
80
 
81
+ &:not(:disabled) {
46
82
  &:hover {
47
- background: var(--x, var(--#{$default-color}));
83
+ border: 1px solid var(--light-x, var(--light-#{$default-color}));
84
+ color: var(--light-x, var(--light-#{$default-color}));
48
85
  }
49
86
 
50
87
  &:focus {
51
- background: var(--dark-x, var(--#{$default-color}));
88
+ border: 1px solid var(--dark-x, var(--dark-#{$default-color}));
89
+ color: var(--dark-x, var(--dark-#{$default-color}));
52
90
  }
53
91
  }
92
+
93
+ &:disabled {
94
+ border: 1px solid var(--x, var(--#{$default-color}));
95
+ color: var(--x, var(--#{$default-color}));
96
+ }
54
97
  }
55
98
 
56
99
  &.#{bem.$modifier-simple} {
57
100
  background: transparent;
58
101
  border: 1px solid transparent;
59
102
  color: var(--x, var(--#{$default-color}));
103
+ padding: 0;
104
+
105
+ &:disabled,
106
+ &:hover,
107
+ &:focus {
108
+ background: transparent;
109
+ }
60
110
 
61
111
  &:not(:disabled) {
62
- &:hover,
112
+ &:hover {
113
+ color: var(--light-x, var(--light-#{$default-color}));
114
+ }
115
+
63
116
  &:focus {
64
- background:transparent;
65
- border: 1px solid transparent;
66
- color: var(--dark-x, var(--on-#{$default-color}));
117
+ color: var(--dark-x, var(--dark-#{$default-color}));
67
118
  }
68
119
  }
120
+
121
+ &:disabled {
122
+ color: var(--x, var(--#{$default-color}));
123
+ }
69
124
  }
70
125
 
71
126
  &:disabled {
72
- background: var(--light-x);
73
- filter: brightness(150%);
127
+ background: var(--x);
128
+ filter: brightness(125%);
74
129
  }
75
130
  }
76
131
 
77
132
 
133
+ @keyframes animateArrow {
134
+ from {
135
+ transform: translateX(0);
136
+ }
137
+
138
+ to {
139
+ transform: translateX(var(--final-position));
140
+ }
141
+ }
@@ -0,0 +1,93 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ import * as React from 'react'
3
+
4
+ import { useLayoutEffect } from 'react'
5
+
6
+ import { AnimatedCounter } from 'ui'
7
+
8
+ import PropTypes from 'prop-types'
9
+
10
+ import styleNames from '@pareto-engineering/bem'
11
+
12
+ // Local Definitions
13
+
14
+ const baseClassName = styleNames.base
15
+
16
+ const componentClassName = 'metrics'
17
+
18
+ /**
19
+ * This is the component description.
20
+ */
21
+ const Metrics = ({
22
+ id,
23
+ className:userClassName,
24
+ style,
25
+ items,
26
+ // ...otherProps
27
+ }) => {
28
+ useLayoutEffect(() => {
29
+ import('./styles.scss')
30
+ }, [])
31
+
32
+ return (
33
+ <div
34
+ id={id}
35
+ className={[
36
+
37
+ baseClassName,
38
+
39
+ componentClassName,
40
+ userClassName,
41
+ ]
42
+ .filter((e) => e)
43
+ .join(' ')}
44
+ style={style}
45
+ // {...otherProps}
46
+ >
47
+ {items.map((counter) => (
48
+ <div className="metric">
49
+ <div className={`circle y-${counter.circleColor}`}>
50
+ <AnimatedCounter
51
+ color={counter.color}
52
+ delay={counter.delay}
53
+ number={counter.number}
54
+ before={counter.before}
55
+ after={counter.after}
56
+ />
57
+ <p className="description-md sm-h xs-h md-s1">{counter.description}</p>
58
+ </div>
59
+ <p className="description-sm md-h lg-h sm-s-2">{counter.description}</p>
60
+ </div>
61
+ ))}
62
+ </div>
63
+ )
64
+ }
65
+
66
+ Metrics.propTypes = {
67
+ /**
68
+ * The HTML id for this element
69
+ */
70
+ id:PropTypes.string,
71
+
72
+ /**
73
+ * The HTML class names for this element
74
+ */
75
+ className:PropTypes.string,
76
+
77
+ /**
78
+ * The React-written, css properties for this element.
79
+ */
80
+ style:PropTypes.objectOf(PropTypes.string),
81
+
82
+ /**
83
+ * The array of details
84
+ */
85
+ items:PropTypes.node,
86
+ }
87
+
88
+ /*
89
+ Metrics.defaultProps = {
90
+ }
91
+ */
92
+
93
+ export default Metrics
@@ -0,0 +1,2 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+ export { default as Metrics } from './Metrics'
@@ -0,0 +1,91 @@
1
+ /* @pareto-engineering/generator-front 1.0.12 */
2
+
3
+ @use "@pareto-engineering/bem";
4
+ @use "@aztlan/stylebook/src/mixins";
5
+ @use "@aztlan/stylebook/src/globals" as *;
6
+
7
+ $default-mobile-row-gap: 1em;
8
+ $default-desktop-row-gap: 3em;
9
+ $default-border-radius: 50%;
10
+ $default-mobile-circle-size: 8em;
11
+ $default-desktop-circle-size: 10em;
12
+ $default-translateY:3em;
13
+ $default-desktop-description-width:12em;
14
+
15
+
16
+ $default-mobile-description-width:9em;
17
+
18
+ .#{bem.$base}.metrics {
19
+ display: grid;
20
+ row-gap: 1em;
21
+
22
+ .metric {
23
+ align-items: center;
24
+ display: flex;
25
+ row-gap: $default-mobile-row-gap;
26
+
27
+ .circle {
28
+ align-items: center;
29
+ background: var(--light-y);
30
+ border-radius: $default-border-radius;
31
+ display: flex;
32
+ height: $default-mobile-circle-size;
33
+ justify-content: center;
34
+ width: $default-mobile-circle-size;
35
+
36
+ .description-md {
37
+ color: var(--subtitle);
38
+ font-style: italic;
39
+ }
40
+ }
41
+
42
+ .description-sm {
43
+ color: var(--subtitle);
44
+ font-style: italic;
45
+ }
46
+ }
47
+
48
+ // mobile style
49
+ @include mixins.media($to:$sm-md) {
50
+ .metric {
51
+ column-gap: $default-mobile-row-gap;
52
+
53
+ .description-sm {
54
+ width: 50%;
55
+ }
56
+ }
57
+ }
58
+
59
+ // tablet style
60
+ @include mixins.media($from:$xs-sm,$to:$sm-md) {
61
+ .metric {
62
+ .description-sm {
63
+ width: 30%;
64
+ }
65
+ }
66
+ }
67
+
68
+ // desktop style
69
+ @include mixins.media($from:$sm-md) {
70
+ grid-template-columns: repeat(2, 1fr);
71
+ row-gap: 2em;
72
+
73
+ .metric {
74
+ .circle {
75
+ display: flex;
76
+ flex-direction: column;
77
+ height: $default-desktop-circle-size;
78
+ justify-content: center;
79
+ position: relative;
80
+ width: $default-desktop-circle-size;
81
+
82
+ .description-md {
83
+ left: 40%;
84
+ position: absolute;
85
+ top: 70%;
86
+ width: $default-desktop-description-width;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
@@ -3,9 +3,10 @@ import * as React from 'react'
3
3
  import PropTypes from 'prop-types'
4
4
  import styleNames from '@pareto-engineering/bem'
5
5
 
6
+ // Local Definitions
7
+ import { Shapes, BackgroundGradient } from 'ui/a'
6
8
  import usePage from '../../usePage'
7
9
 
8
- // Local Definitions
9
10
  const baseClassName = styleNames.base
10
11
  const componentClassName = 'section'
11
12
 
@@ -14,6 +15,13 @@ const Section = ({
14
15
  className:userClassName,
15
16
  style,
16
17
  children,
18
+ backgroundShape,
19
+ backgroundGradient,
20
+ backgroundGradientHeight,
21
+ backgroundVerticalAlign,
22
+ backgroundHorizontalAlign,
23
+ backgroundHeight,
24
+ backgroundOverflow,
17
25
  ...otherProps
18
26
  }) => {
19
27
  const {
@@ -21,7 +29,6 @@ const Section = ({
21
29
  } = usePage()
22
30
 
23
31
  const sectionId = userId && `${pageId}_${userId}`
24
-
25
32
  return (
26
33
  <section
27
34
  id={sectionId}
@@ -36,6 +43,20 @@ const Section = ({
36
43
  {...otherProps}
37
44
  >
38
45
  {children}
46
+ {backgroundShape && (
47
+ <Shapes
48
+ verticalAlign={backgroundVerticalAlign}
49
+ horizontalAlign={backgroundHorizontalAlign}
50
+ overflow={backgroundOverflow}
51
+ height={backgroundHeight}
52
+ shape={backgroundShape}
53
+ />
54
+ )}
55
+ {backgroundGradient && (
56
+ <BackgroundGradient
57
+ height={backgroundGradientHeight}
58
+ />
59
+ )}
39
60
  </section>
40
61
  )
41
62
  }
@@ -60,6 +81,51 @@ Section.propTypes = {
60
81
  * The children JSX
61
82
  */
62
83
  children:PropTypes.node,
84
+
85
+ /**
86
+ * The background shape to use for this section.
87
+ */
88
+ backgroundShape:PropTypes.oneOf([
89
+ 'triangle',
90
+ 'ellipse',
91
+ 'half-ellipse',
92
+ 'half-ellipses',
93
+ 'spiral',
94
+ 'diamonds',
95
+ 'circle',
96
+ 'half-circle',
97
+ 'ellipses',
98
+ 'rectangles',
99
+ ]),
100
+
101
+ /**
102
+ * The background vertical alingment to use for if the background shape is set.
103
+ */
104
+ backgroundVerticalAlign :PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
105
+ /**
106
+ * The background horizontal alingment to use for if the background shape is set.
107
+ */
108
+ backgroundHorizontalAlign:PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
109
+
110
+ /**
111
+ * The background height to use for if the background shape is set.
112
+ */
113
+ backgroundHeight:PropTypes.string,
114
+
115
+ /**
116
+ * The background overflow to use for if the background shape is set.
117
+ */
118
+ backgroundOverflow:PropTypes.oneOf(['visible', 'hidden', 'scroll']),
119
+
120
+ /**
121
+ * The background gradient to use for if the background gradient is set.
122
+ */
123
+ backgroundGradient:PropTypes.bool,
124
+
125
+ /**
126
+ * The background gradient height to use for if the background gradient is set.
127
+ */
128
+ backgroundGradientHeight:PropTypes.string,
63
129
  }
64
130
 
65
131
  Section.defaultProps = {
@@ -2,9 +2,15 @@
2
2
 
3
3
  @use "@pareto-engineering/bem";
4
4
 
5
- /*
5
+
6
6
  .#{bem.$base}.page{
7
+ .#{bem.$base}.section {
8
+ position: relative;
7
9
 
8
- } */
10
+ > *:not(:last-child) {
11
+ z-index: 1;
12
+ }
13
+ }
14
+ }
9
15
 
10
16
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  //make all colors as vars
6
6
 
7
- $border-color: var(--dark-background);
7
+ $border-color: var(--dark-background1);
8
8
  $border-width: 2px;
9
9
  $button-background-color: transparent;
10
10
  $button-background-color-hover: var(--light-accent3);
package/src/ui/b/index.js CHANGED
@@ -7,3 +7,4 @@ export { QuestionDropdown } from './QuestionDropdown'
7
7
  export { ThemeSelector } from './ThemeSelector'
8
8
  export { Logo } from './Logo'
9
9
  export { SocialMediaButton } from './SocialMediaButton'
10
+ export { Metrics } from './Metrics'
@@ -59,19 +59,19 @@ const HorizontalMenu = ({
59
59
  >
60
60
  {
61
61
  (currentStep?.progress > 0)
62
- && <ProgressBar progress={currentStep.progress} attached height=".4em" color="main2" className="y-background b-dark-y" />
62
+ && <ProgressBar progress={currentStep.progress} attached height=".4em" color="main2" className="y-background1 b-dark-y" />
63
63
  }
64
64
  <div className={styleNames.elementContent}>
65
65
  <div className="left">
66
66
  {(!isFirstStep && !hideBackIcon) && (
67
67
  <span
68
- className="f-icons pointer"
68
+ className="prev-button pointer"
69
69
  onClick={mobilePreviousStep}
70
70
  role="button"
71
71
  onKeyDown={mobilePreviousStep}
72
72
  tabIndex={0}
73
73
  >
74
- H
74
+ {'<--'}
75
75
  </span>
76
76
  )}
77
77
  </div>
@@ -131,7 +131,7 @@ HorizontalMenu.propTypes = {
131
131
  }
132
132
 
133
133
  HorizontalMenu.defaultProps = {
134
- logoColor :'main2',
134
+ logoColor :'paragraph',
135
135
  stepsBackwards:1,
136
136
  }
137
137