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

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 (128) 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/Conversation/styles.scss +2 -0
  4. package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
  5. package/dist/cjs/a/GradientBackground/index.js +15 -0
  6. package/dist/cjs/a/GradientBackground/styles.scss +191 -0
  7. package/dist/cjs/a/People/People.js +15 -7
  8. package/dist/cjs/a/People/common/Person/Person.js +11 -4
  9. package/dist/cjs/a/People/styles.scss +13 -15
  10. package/dist/cjs/a/Shapes/Shapes.js +163 -0
  11. package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
  12. package/dist/cjs/a/Shapes/styles.scss +222 -0
  13. package/dist/cjs/a/TeamInfo/styles.scss +2 -2
  14. package/dist/cjs/a/index.js +9 -1
  15. package/dist/cjs/b/Button/styles.scss +38 -19
  16. package/dist/cjs/{a/RatingsInput/RatingsInput.js → b/Metrics/Metrics.js} +30 -29
  17. package/dist/cjs/{a/RatingsInput → b/Metrics}/index.js +3 -3
  18. package/dist/cjs/b/Metrics/styles.scss +91 -0
  19. package/dist/cjs/b/Page/common/Section/Section.js +42 -5
  20. package/dist/cjs/b/Page/styles.scss +8 -2
  21. package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
  22. package/dist/cjs/b/index.js +9 -1
  23. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  24. package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
  25. package/dist/cjs/experimental/GradientBackground/index.js +15 -0
  26. package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
  27. package/dist/cjs/experimental/index.js +13 -0
  28. package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  29. package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  30. package/dist/cjs/f/fields/SelectInput/styles.scss +3 -3
  31. package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
  32. package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
  33. package/dist/cjs/f/fields/TextInput/styles.scss +3 -3
  34. package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
  35. package/dist/cjs/form.scss +1 -1
  36. package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
  37. package/dist/es/a/AnimatedCounter/styles.scss +3 -11
  38. package/dist/es/a/Conversation/styles.scss +2 -0
  39. package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
  40. package/dist/es/a/GradientBackground/index.js +2 -0
  41. package/dist/es/a/GradientBackground/styles.scss +191 -0
  42. package/dist/es/a/People/People.js +14 -7
  43. package/dist/es/a/People/common/Person/Person.js +11 -4
  44. package/dist/es/a/People/styles.scss +13 -15
  45. package/dist/es/a/Shapes/Shapes.js +141 -0
  46. package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
  47. package/dist/es/a/Shapes/styles.scss +222 -0
  48. package/dist/es/a/TeamInfo/styles.scss +2 -2
  49. package/dist/es/a/index.js +2 -1
  50. package/dist/es/b/Button/styles.scss +38 -19
  51. package/dist/es/b/Metrics/Metrics.js +72 -0
  52. package/dist/es/b/Metrics/index.js +2 -0
  53. package/dist/es/b/Metrics/styles.scss +91 -0
  54. package/dist/es/b/Page/common/Section/Section.js +41 -4
  55. package/dist/es/b/Page/styles.scss +8 -2
  56. package/dist/es/b/QuestionDropdown/styles.scss +1 -1
  57. package/dist/es/b/index.js +2 -1
  58. package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
  59. package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
  60. package/dist/es/experimental/GradientBackground/index.js +2 -0
  61. package/dist/es/experimental/GradientBackground/styles.scss +64 -0
  62. package/dist/es/experimental/index.js +1 -0
  63. package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
  64. package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
  65. package/dist/es/f/fields/SelectInput/styles.scss +3 -3
  66. package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
  67. package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
  68. package/dist/es/f/fields/TextInput/styles.scss +3 -3
  69. package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
  70. package/dist/es/form.scss +1 -1
  71. package/package.json +3 -3
  72. package/src/__snapshots__/Storyshots.test.js.snap +3654 -339
  73. package/src/local.scss +3 -0
  74. package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
  75. package/src/stories/a/ContentCard.stories.jsx +1 -1
  76. package/src/stories/a/Conversation.stories.jsx +1 -1
  77. package/src/stories/a/People.stories.jsx +25 -1
  78. package/src/stories/a/ProgressBar.stories.jsx +1 -1
  79. package/src/stories/a/Quote.stories.jsx +1 -1
  80. package/src/stories/a/Shapes.stories.jsx +125 -0
  81. package/src/stories/a/Spinner.stories.jsx +1 -1
  82. package/src/stories/b/Button.stories.jsx +57 -51
  83. package/src/stories/b/Metrics.stories.jsx +62 -0
  84. package/src/stories/b/Page.stories.jsx +27 -1
  85. package/src/stories/b/ThemeSelector.stories.jsx +1 -1
  86. package/src/stories/b/Title.stories.jsx +1 -1
  87. package/src/stories/c/ContentSlides.stories.jsx +2 -2
  88. package/src/stories/colors.js +5 -3
  89. package/src/stories/f/CheckboxInput.stories.jsx +1 -1
  90. package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
  91. package/src/stories/f/TextInput.stories.jsx +4 -4
  92. package/src/stories/f/TextareaInput.stories.jsx +2 -2
  93. package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
  94. package/src/ui/a/AnimatedCounter/styles.scss +3 -11
  95. package/src/ui/a/Conversation/styles.scss +2 -0
  96. package/src/ui/a/People/People.jsx +12 -4
  97. package/src/ui/a/People/common/Person/Person.jsx +7 -1
  98. package/src/ui/a/People/styles.scss +13 -15
  99. package/src/ui/a/Shapes/Shapes.jsx +181 -0
  100. package/src/ui/a/Shapes/index.js +2 -0
  101. package/src/ui/a/Shapes/styles.scss +222 -0
  102. package/src/ui/a/TeamInfo/styles.scss +2 -2
  103. package/src/ui/a/index.js +1 -0
  104. package/src/ui/b/Button/styles.scss +38 -19
  105. package/src/ui/b/Metrics/Metrics.jsx +93 -0
  106. package/src/ui/b/Metrics/index.js +2 -0
  107. package/src/ui/b/Metrics/styles.scss +91 -0
  108. package/src/ui/b/Page/common/Section/Section.jsx +51 -2
  109. package/src/ui/b/Page/styles.scss +8 -2
  110. package/src/ui/b/QuestionDropdown/styles.scss +1 -1
  111. package/src/ui/b/index.js +1 -0
  112. package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
  113. package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
  114. package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
  115. package/src/ui/f/fields/SelectInput/styles.scss +3 -3
  116. package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +2 -2
  117. package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
  118. package/src/ui/f/fields/TextInput/styles.scss +3 -3
  119. package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
  120. package/src/ui/form.scss +1 -1
  121. package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
  122. package/dist/cjs/a/RatingsInput/common/index.js +0 -13
  123. package/dist/cjs/a/RatingsInput/styles.scss +0 -35
  124. package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
  125. package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
  126. package/dist/es/a/RatingsInput/common/index.js +0 -1
  127. package/dist/es/a/RatingsInput/index.js +0 -2
  128. package/dist/es/a/RatingsInput/styles.scss +0 -35
@@ -4,15 +4,13 @@
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;
10
9
 
11
10
  .#{bem.$base}.button {
12
11
  background: var(--x, var(--#{$default-color}));
13
12
  border: transparent;
14
- //border-radius: var(--theme-border-radius);
15
- border-radius: $default-border-radius;
13
+ border-radius: var(--theme-border-radius);
16
14
  color: var(--on-x, var(--on-#{$default-color}));
17
15
  font-weight: 600;
18
16
  padding: $default-padding;
@@ -24,6 +22,9 @@ $font-weight:bold;
24
22
  &:hover {
25
23
  background: var(--light-x, var(--light-#{$default-color}));
26
24
  }
25
+ &:focus {
26
+ background: var(--dark-x, var(--dark-#{$default-color}));
27
+ }
27
28
  }
28
29
 
29
30
 
@@ -36,21 +37,28 @@ $font-weight:bold;
36
37
  border: 1px solid var(--x, var(--#{$default-color}));
37
38
  color: var(--x, var(--#{$default-color}));
38
39
 
39
- &:not(:disabled) {
40
- &:hover,
41
- &:focus {
42
- border: 1px solid transparent;
43
- color: var(--on-x, var(--on-#{$default-color}));
44
- }
40
+ &:hover,
41
+ &:focus,
42
+ &:disabled{
43
+ background: transparent;
44
+ }
45
45
 
46
+ &:not(:disabled) {
46
47
  &:hover {
47
- background: var(--x, var(--#{$default-color}));
48
+ border: 1px solid var(--light-x, var(--light-#{$default-color}));
49
+ color: var(--light-x, var(--light-#{$default-color}));
48
50
  }
49
51
 
50
52
  &:focus {
51
- background: var(--dark-x, var(--#{$default-color}));
53
+ border: 1px solid var(--dark-x, var(--dark-#{$default-color}));
54
+ color: var(--dark-x, var(--dark-#{$default-color}));
52
55
  }
53
56
  }
57
+
58
+ &:disabled{
59
+ border: 1px solid var(--x, var(--#{$default-color}));
60
+ color: var(--x, var(--#{$default-color}));
61
+ }
54
62
  }
55
63
 
56
64
  &.#{bem.$modifier-simple} {
@@ -58,19 +66,30 @@ $font-weight:bold;
58
66
  border: 1px solid transparent;
59
67
  color: var(--x, var(--#{$default-color}));
60
68
 
69
+ &:disabled,
70
+ &:hover,
71
+ &:focus {
72
+ background: transparent;
73
+ }
74
+
61
75
  &:not(:disabled) {
62
- &:hover,
63
- &:focus {
64
- background:transparent;
65
- border: 1px solid transparent;
66
- color: var(--dark-x, var(--on-#{$default-color}));
67
- }
76
+ &:hover {
77
+ color: var(--light-x, var(--light-#{$default-color}));
78
+ }
79
+
80
+ &:focus {
81
+ color: var(--dark-x, var(--dark-#{$default-color}));
82
+ }
83
+ }
84
+
85
+ &:disabled {
86
+ color: var(--x, var(--#{$default-color}));
68
87
  }
69
88
  }
70
89
 
71
90
  &:disabled {
72
- background: var(--light-x);
73
- filter: brightness(150%);
91
+ background: var(--x);
92
+ filter: brightness(125%);
74
93
  }
75
94
  }
76
95
 
@@ -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 } 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,11 @@ const Section = ({
14
15
  className:userClassName,
15
16
  style,
16
17
  children,
18
+ backgroundShape,
19
+ backgroundVerticalAlign,
20
+ backgroundHorizontalAlign,
21
+ backgroundHeight,
22
+ backgroundOverflow,
17
23
  ...otherProps
18
24
  }) => {
19
25
  const {
@@ -21,7 +27,6 @@ const Section = ({
21
27
  } = usePage()
22
28
 
23
29
  const sectionId = userId && `${pageId}_${userId}`
24
-
25
30
  return (
26
31
  <section
27
32
  id={sectionId}
@@ -36,6 +41,15 @@ const Section = ({
36
41
  {...otherProps}
37
42
  >
38
43
  {children}
44
+ {backgroundShape && (
45
+ <Shapes
46
+ verticalAlign={backgroundVerticalAlign}
47
+ horizontalAlign={backgroundHorizontalAlign}
48
+ backgroundOverflow={backgroundOverflow}
49
+ height={backgroundHeight}
50
+ shape={backgroundShape}
51
+ />
52
+ )}
39
53
  </section>
40
54
  )
41
55
  }
@@ -60,6 +74,41 @@ Section.propTypes = {
60
74
  * The children JSX
61
75
  */
62
76
  children:PropTypes.node,
77
+
78
+ /**
79
+ * The background shape to use for this section.
80
+ */
81
+ backgroundShape:PropTypes.oneOf([
82
+ 'triangle',
83
+ 'ellipse',
84
+ 'half-ellipse',
85
+ 'half-ellipses',
86
+ 'spiral',
87
+ 'diamonds',
88
+ 'circle',
89
+ 'half-circle',
90
+ 'ellipses',
91
+ 'rectangles',
92
+ ]),
93
+
94
+ /**
95
+ * The background vertical alingment to use for if the background shape is set.
96
+ */
97
+ backgroundVerticalAlign :PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
98
+ /**
99
+ * The background horizontal alingment to use for if the background shape is set.
100
+ */
101
+ backgroundHorizontalAlign:PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
102
+
103
+ /**
104
+ * The background height to use for if the background shape is set.
105
+ */
106
+ backgroundHeight:PropTypes.string,
107
+
108
+ /**
109
+ * The background overflow to use for if the background shape is set.
110
+ */
111
+ backgroundOverflow:PropTypes.oneOf(['visible', 'hidden', 'scroll']),
63
112
  }
64
113
 
65
114
  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,7 +59,7 @@ 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">
@@ -147,7 +147,7 @@ ChoicesInput.propTypes = {
147
147
  ChoicesInput.defaultProps = {
148
148
  gridColumnsMobile :2,
149
149
  gridColumnsDesktop:3,
150
- color :'background',
150
+ color :'background2',
151
151
  colorChecked :'main1',
152
152
  disabled :false,
153
153
  }
@@ -128,8 +128,8 @@ Rating.propTypes = {
128
128
  }
129
129
 
130
130
  Rating.defaultProps = {
131
- activeBackgroundColor :'secondary2',
132
- inactiveBackgroundColor:'background',
131
+ activeBackgroundColor :'main1',
132
+ inactiveBackgroundColor:'background2',
133
133
  showRatingValue :false,
134
134
  }
135
135
 
@@ -18,12 +18,12 @@ $default-padding: 0.75em 0.75em 0.55em;
18
18
  }
19
19
 
20
20
  .input {
21
- background: var(--light-background);
22
- color: var(--on-background);
21
+ background: var(--light-background1);
22
+ color: var(--on-background1);
23
23
  padding: $default-padding;
24
24
 
25
25
  &:focus {
26
- background: var(--dark-background);
26
+ background: var(--dark-background1);
27
27
  }
28
28
  }
29
29
  }
@@ -57,7 +57,7 @@ const TaskRecommendationInput = ({
57
57
  <div className={`task-content ${isOptionSelected ? 'b-x' : 'b-on-x'}`}>
58
58
  <div className="v1 p-v task">
59
59
  <FormLabel
60
- className={`uc mb-v ${isOptionSelected ? 'c-on-x' : 'c-x'}`}
60
+ className={`uc mb-v ${isOptionSelected ? styleNames.modifierActive : ''}`}
61
61
  name={name}
62
62
  >
63
63
  {label}
@@ -124,7 +124,7 @@ TaskRecommendationInput.propTypes = {
124
124
  }
125
125
 
126
126
  TaskRecommendationInput.defaultProps = {
127
- color:'main2',
127
+ color:'main1',
128
128
  }
129
129
 
130
130
  export default memo(TaskRecommendationInput)
@@ -16,6 +16,10 @@
16
16
  align-items: center;
17
17
  height: 100%;
18
18
 
19
+ .#{bem.$modifier-active} {
20
+ color: var(--on-x);
21
+ }
22
+
19
23
  .input {
20
24
  appearance: none;
21
25
  position: absolute;
@@ -14,12 +14,12 @@ $default-padding: 0.75em 0.75em 0.55em;
14
14
  }
15
15
 
16
16
  .input {
17
- background: var(--light-background);
18
- color: var(--on-background);
17
+ background: var(--light-background1);
18
+ color: var(--on-background1);
19
19
  padding: $default-padding;
20
20
 
21
21
  &:focus {
22
- background: var(--dark-background);
22
+ background: var(--dark-background1);
23
23
  }
24
24
  }
25
25
  }
@@ -151,7 +151,7 @@ TextareaInput.propTypes = {
151
151
 
152
152
  TextareaInput.defaultProps = {
153
153
  rows :3,
154
- textAreaColor:'background',
154
+ textAreaColor:'background1',
155
155
  labelColor :'main1',
156
156
  disabled :false,
157
157
  }
package/src/ui/form.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  @use "form-reset.scss";
2
2
 
3
- $form-input-border-bottom: 1px solid var(--dark-background);
3
+ $form-input-border-bottom: 1px solid var(--dark-background1);
4
4
  $form-input-on-focus-border-bottom: 1px solid var(--light-main1);
5
5
  $form-input-on-error-border-bottom: 1px solid var(--error);
6
6
  $label-input-heigth-width: 100%;
@@ -1,120 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var React = _interopRequireWildcard(require("react"));
9
-
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
- var _formik = require("formik");
13
-
14
- var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- function _extends() { _extends = Object.assign || 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); }
23
-
24
- // Local Definitions
25
- var baseClassName = _bem.default.base;
26
- var componentClassName = 'rating';
27
- /**
28
- * This is the component description.
29
- */
30
-
31
- var Rating = _ref => {
32
- var {
33
- id,
34
- className: userClassName,
35
- style,
36
- value,
37
- name,
38
- ratingId,
39
- hover,
40
- setHover,
41
- activeBackgroundColor,
42
- inactiveBackgroundColor // ...otherProps
43
-
44
- } = _ref;
45
- var [field] = (0, _formik.useField)(name);
46
- return /*#__PURE__*/React.createElement("div", {
47
- id: id,
48
- className: [baseClassName, componentClassName, userClassName, "x-".concat(activeBackgroundColor), "y-".concat(inactiveBackgroundColor)].filter(e => e).join(' '),
49
- style: style
50
- }, /*#__PURE__*/React.createElement("label", {
51
- htmlFor: ratingId,
52
- onMouseEnter: () => setHover(value),
53
- onMouseLeave: () => setHover(null)
54
- }, ' ', /*#__PURE__*/React.createElement("span", {
55
- className: ['f-icons', value <= (hover || Number(field.value)) ? 'c-x' : 'c-dark-y'].filter(e => e).join(' ')
56
- }, "[")), /*#__PURE__*/React.createElement("input", _extends({}, field, {
57
- type: "radio",
58
- id: ratingId,
59
- name: name,
60
- value: value
61
- })));
62
- };
63
-
64
- Rating.propTypes = {
65
- /**
66
- * The HTML id for this element
67
- */
68
- id: _propTypes.default.string,
69
-
70
- /**
71
- * The HTML class names for this element
72
- */
73
- className: _propTypes.default.string,
74
-
75
- /**
76
- * The React-written, css properties for this element.
77
- */
78
- style: _propTypes.default.objectOf(_propTypes.default.string),
79
-
80
- /**
81
- * The value of each an every rating star
82
- */
83
- value: _propTypes.default.number,
84
-
85
- /**
86
- * The current hover value
87
- */
88
- hover: _propTypes.default.number,
89
-
90
- /**
91
- * Function to update the hover value
92
- */
93
- setHover: _propTypes.default.func,
94
-
95
- /**
96
- * Unique Id for each rating star
97
- */
98
- ratingId: _propTypes.default.string,
99
-
100
- /**
101
- * Name of the rating input
102
- */
103
- name: _propTypes.default.string,
104
-
105
- /**
106
- * The start rating backgriund color when hovered or clicked
107
- */
108
- activeBackgroundColor: _propTypes.default.string,
109
-
110
- /**
111
- * The start rating backgriund color when not hovered and not clicked
112
- */
113
- inactiveBackgroundColor: _propTypes.default.string
114
- };
115
- Rating.defaultProps = {
116
- activeBackgroundColor: 'secondary2',
117
- inactiveBackgroundColor: 'background'
118
- };
119
- var _default = Rating;
120
- exports.default = _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Rating", {
7
- enumerable: true,
8
- get: function get() {
9
- return _Rating.Rating;
10
- }
11
- });
12
-
13
- var _Rating = require("./Rating");