@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.
- package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +16 -29
- package/dist/cjs/a/AnimatedCounter/styles.scss +3 -11
- package/dist/cjs/a/Conversation/styles.scss +2 -0
- package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
- package/dist/cjs/a/GradientBackground/index.js +15 -0
- package/dist/cjs/a/GradientBackground/styles.scss +191 -0
- package/dist/cjs/a/People/People.js +15 -7
- package/dist/cjs/a/People/common/Person/Person.js +11 -4
- package/dist/cjs/a/People/styles.scss +13 -15
- package/dist/cjs/a/Shapes/Shapes.js +163 -0
- package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
- package/dist/cjs/a/Shapes/styles.scss +222 -0
- package/dist/cjs/a/TeamInfo/styles.scss +2 -2
- package/dist/cjs/a/index.js +9 -1
- package/dist/cjs/b/Button/styles.scss +38 -19
- package/dist/cjs/{a/RatingsInput/RatingsInput.js → b/Metrics/Metrics.js} +30 -29
- package/dist/cjs/{a/RatingsInput → b/Metrics}/index.js +3 -3
- package/dist/cjs/b/Metrics/styles.scss +91 -0
- package/dist/cjs/b/Page/common/Section/Section.js +42 -5
- package/dist/cjs/b/Page/styles.scss +8 -2
- package/dist/cjs/b/QuestionDropdown/styles.scss +1 -1
- package/dist/cjs/b/index.js +9 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
- package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
- package/dist/cjs/experimental/GradientBackground/index.js +15 -0
- package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
- package/dist/cjs/experimental/index.js +13 -0
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/styles.scss +3 -3
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -3
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/cjs/form.scss +1 -1
- package/dist/es/a/AnimatedCounter/AnimatedCounter.js +17 -30
- package/dist/es/a/AnimatedCounter/styles.scss +3 -11
- package/dist/es/a/Conversation/styles.scss +2 -0
- package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
- package/dist/es/a/GradientBackground/index.js +2 -0
- package/dist/es/a/GradientBackground/styles.scss +191 -0
- package/dist/es/a/People/People.js +14 -7
- package/dist/es/a/People/common/Person/Person.js +11 -4
- package/dist/es/a/People/styles.scss +13 -15
- package/dist/es/a/Shapes/Shapes.js +141 -0
- package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
- package/dist/es/a/Shapes/styles.scss +222 -0
- package/dist/es/a/TeamInfo/styles.scss +2 -2
- package/dist/es/a/index.js +2 -1
- package/dist/es/b/Button/styles.scss +38 -19
- package/dist/es/b/Metrics/Metrics.js +72 -0
- package/dist/es/b/Metrics/index.js +2 -0
- package/dist/es/b/Metrics/styles.scss +91 -0
- package/dist/es/b/Page/common/Section/Section.js +41 -4
- package/dist/es/b/Page/styles.scss +8 -2
- package/dist/es/b/QuestionDropdown/styles.scss +1 -1
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +1 -1
- package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
- package/dist/es/experimental/GradientBackground/index.js +2 -0
- package/dist/es/experimental/GradientBackground/styles.scss +64 -0
- package/dist/es/experimental/index.js +1 -0
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/styles.scss +3 -3
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +2 -2
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/es/f/fields/TextInput/styles.scss +3 -3
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +1 -1
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +3654 -339
- package/src/local.scss +3 -0
- package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
- package/src/stories/a/ContentCard.stories.jsx +1 -1
- package/src/stories/a/Conversation.stories.jsx +1 -1
- package/src/stories/a/People.stories.jsx +25 -1
- package/src/stories/a/ProgressBar.stories.jsx +1 -1
- package/src/stories/a/Quote.stories.jsx +1 -1
- package/src/stories/a/Shapes.stories.jsx +125 -0
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/b/Button.stories.jsx +57 -51
- package/src/stories/b/Metrics.stories.jsx +62 -0
- package/src/stories/b/Page.stories.jsx +27 -1
- package/src/stories/b/ThemeSelector.stories.jsx +1 -1
- package/src/stories/b/Title.stories.jsx +1 -1
- package/src/stories/c/ContentSlides.stories.jsx +2 -2
- package/src/stories/colors.js +5 -3
- package/src/stories/f/CheckboxInput.stories.jsx +1 -1
- package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
- package/src/stories/f/TextInput.stories.jsx +4 -4
- package/src/stories/f/TextareaInput.stories.jsx +2 -2
- package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
- package/src/ui/a/AnimatedCounter/styles.scss +3 -11
- package/src/ui/a/Conversation/styles.scss +2 -0
- package/src/ui/a/People/People.jsx +12 -4
- package/src/ui/a/People/common/Person/Person.jsx +7 -1
- package/src/ui/a/People/styles.scss +13 -15
- package/src/ui/a/Shapes/Shapes.jsx +181 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +222 -0
- package/src/ui/a/TeamInfo/styles.scss +2 -2
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Button/styles.scss +38 -19
- package/src/ui/b/Metrics/Metrics.jsx +93 -0
- package/src/ui/b/Metrics/index.js +2 -0
- package/src/ui/b/Metrics/styles.scss +91 -0
- package/src/ui/b/Page/common/Section/Section.jsx +51 -2
- package/src/ui/b/Page/styles.scss +8 -2
- package/src/ui/b/QuestionDropdown/styles.scss +1 -1
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/styles.scss +3 -3
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +2 -2
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/src/ui/f/fields/TextInput/styles.scss +3 -3
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +1 -1
- package/src/ui/form.scss +1 -1
- package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
- package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
- package/dist/es/a/RatingsInput/common/index.js +0 -1
- package/dist/es/a/RatingsInput/index.js +0 -2
- 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
|
-
|
|
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
|
-
&:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
40
|
+
&:hover,
|
|
41
|
+
&:focus,
|
|
42
|
+
&:disabled{
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
+
&:not(:disabled) {
|
|
46
47
|
&:hover {
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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(--
|
|
73
|
-
filter: brightness(
|
|
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,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 = {
|
package/src/ui/b/index.js
CHANGED
|
@@ -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-
|
|
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">
|
|
@@ -128,8 +128,8 @@ Rating.propTypes = {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
Rating.defaultProps = {
|
|
131
|
-
activeBackgroundColor :'
|
|
132
|
-
inactiveBackgroundColor:'
|
|
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-
|
|
22
|
-
color: var(--on-
|
|
21
|
+
background: var(--light-background1);
|
|
22
|
+
color: var(--on-background1);
|
|
23
23
|
padding: $default-padding;
|
|
24
24
|
|
|
25
25
|
&:focus {
|
|
26
|
-
background: var(--dark-
|
|
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 ?
|
|
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:'
|
|
127
|
+
color:'main1',
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export default memo(TaskRecommendationInput)
|
|
@@ -14,12 +14,12 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.input {
|
|
17
|
-
background: var(--light-
|
|
18
|
-
color: var(--on-
|
|
17
|
+
background: var(--light-background1);
|
|
18
|
+
color: var(--on-background1);
|
|
19
19
|
padding: $default-padding;
|
|
20
20
|
|
|
21
21
|
&:focus {
|
|
22
|
-
background: var(--dark-
|
|
22
|
+
background: var(--dark-background1);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
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-
|
|
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;
|