@pareto-engineering/design-system 2.0.0-alpha.2 → 2.0.0-alpha.20
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/{RatingsInput/common/Rating/Rating.js → BackgroundGradient/BackgroundGradient.js} +22 -65
- package/dist/cjs/a/BackgroundGradient/index.js +15 -0
- package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
- package/dist/cjs/a/Conversation/Conversation.js +15 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +33 -6
- package/dist/cjs/a/Conversation/styles.scss +129 -32
- 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/OvalIllustration/OvalIllustration.js +133 -0
- package/dist/cjs/a/OvalIllustration/index.js +15 -0
- package/dist/cjs/a/OvalIllustration/styles.scss +102 -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 +171 -0
- package/dist/cjs/a/{RatingsInput/common/Rating → Shapes}/index.js +3 -3
- package/dist/cjs/a/Shapes/styles.scss +255 -0
- package/dist/cjs/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
- package/dist/cjs/a/{RatingsInput → SnapScroller}/index.js +3 -3
- package/dist/cjs/a/SnapScroller/styles.scss +38 -0
- package/dist/cjs/a/TeamInfo/styles.scss +2 -2
- package/dist/cjs/a/index.js +33 -1
- package/dist/cjs/b/Button/Button.js +10 -4
- package/dist/cjs/b/Button/styles.scss +82 -18
- package/dist/cjs/b/Metrics/Metrics.js +89 -0
- package/dist/cjs/b/Metrics/index.js +15 -0
- package/dist/cjs/b/Metrics/styles.scss +91 -0
- package/dist/cjs/b/Page/common/Section/Section.js +56 -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/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- 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/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/cjs/f/fields/SelectInput/styles.scss +4 -4
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -5
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +14 -7
- 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/BackgroundGradient/BackgroundGradient.js +55 -0
- package/dist/es/a/BackgroundGradient/index.js +2 -0
- package/dist/es/a/BackgroundGradient/styles.scss +16 -0
- package/dist/es/a/Conversation/Conversation.js +15 -8
- package/dist/es/a/Conversation/common/Message/Message.js +33 -6
- package/dist/es/a/Conversation/styles.scss +129 -32
- 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/OvalIllustration/OvalIllustration.js +111 -0
- package/dist/es/a/OvalIllustration/index.js +2 -0
- package/dist/es/a/OvalIllustration/styles.scss +102 -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 +149 -0
- package/dist/es/a/{RatingsInput/common/Rating → Shapes}/index.js +1 -1
- package/dist/es/a/Shapes/styles.scss +255 -0
- package/dist/es/a/{RatingsInput/RatingsInput.js → SnapScroller/SnapScroller.js} +15 -26
- package/dist/es/a/SnapScroller/index.js +2 -0
- package/dist/es/a/SnapScroller/styles.scss +38 -0
- package/dist/es/a/TeamInfo/styles.scss +2 -2
- package/dist/es/a/index.js +5 -1
- package/dist/es/b/Button/Button.js +8 -2
- package/dist/es/b/Button/styles.scss +82 -18
- 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 +55 -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/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- 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/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +25 -6
- package/dist/es/f/fields/SelectInput/styles.scss +4 -4
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/dist/es/f/fields/TextInput/TextInput.js +19 -5
- package/dist/es/f/fields/TextInput/styles.scss +3 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +14 -7
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +5662 -449
- package/src/local.scss +4 -0
- package/src/stories/a/AnimatedCounter.stories.jsx +9 -5
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/ContentCard.stories.jsx +1 -1
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/OvalIllustration.stories.jsx +59 -0
- 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 +143 -0
- package/src/stories/a/SnapScroller.stories.jsx +98 -0
- package/src/stories/a/Spinner.stories.jsx +1 -1
- package/src/stories/b/Button.stories.jsx +83 -54
- package/src/stories/b/Metrics.stories.jsx +62 -0
- package/src/stories/b/Page.stories.jsx +51 -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/SelectInput.stories.jsx +29 -0
- package/src/stories/f/TaskRecommendationInput.stories.jsx +1 -1
- package/src/stories/f/TextInput.stories.jsx +14 -4
- package/src/stories/f/TextareaInput.stories.jsx +42 -6
- package/src/ui/a/AnimatedCounter/AnimatedCounter.jsx +21 -27
- package/src/ui/a/AnimatedCounter/styles.scss +3 -11
- package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
- package/src/ui/a/BackgroundGradient/index.js +2 -0
- package/src/ui/a/BackgroundGradient/styles.scss +16 -0
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +40 -7
- package/src/ui/a/Conversation/styles.scss +129 -32
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
- package/src/ui/a/OvalIllustration/index.js +2 -0
- package/src/ui/a/OvalIllustration/styles.scss +102 -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 +191 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +255 -0
- package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
- package/src/ui/a/SnapScroller/index.js +2 -0
- package/src/ui/a/SnapScroller/styles.scss +38 -0
- package/src/ui/a/TeamInfo/styles.scss +2 -2
- package/src/ui/a/index.js +4 -0
- package/src/ui/b/Button/Button.jsx +9 -1
- package/src/ui/b/Button/styles.scss +82 -18
- 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 +68 -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/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +35 -5
- package/src/ui/f/fields/SelectInput/styles.scss +4 -4
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +1 -1
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +4 -0
- package/src/ui/f/fields/TextInput/TextInput.jsx +15 -2
- package/src/ui/f/fields/TextInput/styles.scss +3 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +22 -11
- package/src/ui/form.scss +1 -1
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- 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
|
@@ -14,65 +14,94 @@ export default {
|
|
|
14
14
|
// storyfn => <div className="">{ storyfn() }</div>,
|
|
15
15
|
],
|
|
16
16
|
argTypes:{
|
|
17
|
-
|
|
18
|
-
disabled:{ control: 'boolean' },
|
|
17
|
+
color :{ control: { type: 'select', options: ALL_COLORS } },
|
|
18
|
+
disabled :{ control: { type: 'boolean' } },
|
|
19
|
+
isGhost :{ control: { type: 'boolean' } },
|
|
20
|
+
isSimple :{ control: { type: 'boolean' } },
|
|
21
|
+
isAnimated:{ control: { type: 'boolean' } },
|
|
19
22
|
},
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
const SingleTemplate = (args) => <Button {...args} />
|
|
23
26
|
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
)
|
|
27
|
+
export const Base = SingleTemplate.bind({})
|
|
28
|
+
Base.args = {
|
|
29
|
+
children:'Sample Button',
|
|
30
|
+
}
|
|
29
31
|
|
|
30
|
-
export const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export const Colors = (props) => (
|
|
37
|
-
<>
|
|
38
|
-
{ALL_COLORS.map((colorName) => (
|
|
39
|
-
<Button {...props} color={colorName} key={colorName}>
|
|
40
|
-
This is a
|
|
41
|
-
{' '}
|
|
42
|
-
{colorName}
|
|
43
|
-
{' '}
|
|
44
|
-
button
|
|
45
|
-
</Button>
|
|
46
|
-
))}
|
|
47
|
-
</>
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
export const GhostColors = (props) => (
|
|
51
|
-
<>
|
|
52
|
-
{ALL_COLORS.map((colorName) => (
|
|
53
|
-
<Button {...props} color={colorName} key={colorName} isGhost>
|
|
54
|
-
This is a
|
|
55
|
-
{' '}
|
|
56
|
-
{colorName}
|
|
57
|
-
{' '}
|
|
58
|
-
button
|
|
59
|
-
</Button>
|
|
60
|
-
))}
|
|
61
|
-
</>
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
export const Compact = (props) => (
|
|
65
|
-
<Button isCompact {...props}>
|
|
66
|
-
Sample Button
|
|
67
|
-
</Button>
|
|
68
|
-
)
|
|
32
|
+
export const Ghost = SingleTemplate.bind({})
|
|
33
|
+
Ghost.args = {
|
|
34
|
+
isGhost :true,
|
|
35
|
+
children:'Sample Button',
|
|
36
|
+
}
|
|
69
37
|
|
|
70
|
-
|
|
71
|
-
<Button
|
|
72
|
-
|
|
38
|
+
const MultipleTemplate = (args) => ALL_COLORS.map((colorName) => (
|
|
39
|
+
<Button {...args} color={colorName} key={colorName}>
|
|
40
|
+
This is a
|
|
41
|
+
{' '}
|
|
42
|
+
{colorName}
|
|
43
|
+
{' '}
|
|
44
|
+
button
|
|
73
45
|
</Button>
|
|
74
|
-
)
|
|
46
|
+
))
|
|
47
|
+
|
|
48
|
+
export const Normal = MultipleTemplate.bind({})
|
|
49
|
+
|
|
50
|
+
export const Ghosts = MultipleTemplate.bind({})
|
|
51
|
+
Ghosts.args = {
|
|
52
|
+
isGhost:true,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const Simple = MultipleTemplate.bind({})
|
|
56
|
+
Simple.args = {
|
|
57
|
+
isSimple:true,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const Compact = MultipleTemplate.bind({})
|
|
61
|
+
Compact.args = {
|
|
62
|
+
isCompact:true,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const Disabled = MultipleTemplate.bind({})
|
|
66
|
+
Disabled.args = {
|
|
67
|
+
disabled:true,
|
|
68
|
+
}
|
|
75
69
|
|
|
76
|
-
export const
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
export const GhostDisabled = MultipleTemplate.bind({})
|
|
71
|
+
GhostDisabled.args = {
|
|
72
|
+
isGhost :true,
|
|
73
|
+
disabled:true,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const SimpleDisabled = MultipleTemplate.bind({})
|
|
77
|
+
SimpleDisabled.args = {
|
|
78
|
+
isSimple:true,
|
|
79
|
+
disabled:true,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Loading = MultipleTemplate.bind({})
|
|
83
|
+
Loading.args = {
|
|
84
|
+
isLoading:true,
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const ArrowLeft = MultipleTemplate.bind({})
|
|
88
|
+
ArrowLeft.args = {
|
|
89
|
+
arrowDirection:'left',
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export const ArrowRight = MultipleTemplate.bind({})
|
|
93
|
+
ArrowRight.args = {
|
|
94
|
+
arrowDirection:'right',
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const ArrowLeftSimple = MultipleTemplate.bind({})
|
|
98
|
+
ArrowLeftSimple.args = {
|
|
99
|
+
arrowDirection:'left',
|
|
100
|
+
isSimple :true,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const ArrowRightSimple = MultipleTemplate.bind({})
|
|
104
|
+
ArrowRightSimple.args = {
|
|
105
|
+
arrowDirection:'right',
|
|
106
|
+
isSimple :true,
|
|
107
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
|
|
4
|
+
import { Metrics } from 'ui'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title :'b/Metrics',
|
|
8
|
+
component :Metrics,
|
|
9
|
+
subcomponents:{
|
|
10
|
+
// Item:Metrics.Item
|
|
11
|
+
},
|
|
12
|
+
decorators:[
|
|
13
|
+
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
|
+
],
|
|
15
|
+
argTypes:{
|
|
16
|
+
backgroundColor:{ control: 'color' },
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Base = () => {
|
|
21
|
+
const items = [
|
|
22
|
+
{
|
|
23
|
+
circleColor:'success',
|
|
24
|
+
color :'black',
|
|
25
|
+
delay :'2',
|
|
26
|
+
number :'75',
|
|
27
|
+
after :'%',
|
|
28
|
+
before :'+',
|
|
29
|
+
description:'Merchandise sell-though rate during tour',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
circleColor:'warning',
|
|
33
|
+
color :'black',
|
|
34
|
+
delay :'2',
|
|
35
|
+
number :'250',
|
|
36
|
+
after :'K',
|
|
37
|
+
description:'Stat or metric growth',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
circleColor:'navlink',
|
|
41
|
+
color :'black',
|
|
42
|
+
delay :'2',
|
|
43
|
+
number :'11710',
|
|
44
|
+
before :'+',
|
|
45
|
+
description:'Stat or metric growth',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
circleColor:'error',
|
|
49
|
+
color :'black',
|
|
50
|
+
delay :'2',
|
|
51
|
+
number :'0.28',
|
|
52
|
+
before :'$',
|
|
53
|
+
description:'Merchandise sell-though rate during tour',
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Metrics
|
|
59
|
+
items={items}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.0 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { Page } from 'ui'
|
|
4
|
+
import { Page, Quote } from 'ui'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title :'b/Page',
|
|
@@ -57,3 +57,53 @@ export const WithSections = () => (
|
|
|
57
57
|
</Page.Section>
|
|
58
58
|
</Page>
|
|
59
59
|
)
|
|
60
|
+
|
|
61
|
+
export const SectionsWithBackground = () => (
|
|
62
|
+
<Page
|
|
63
|
+
id="with-background"
|
|
64
|
+
>
|
|
65
|
+
<Page.Section
|
|
66
|
+
id="s1"
|
|
67
|
+
backgroundShape="triangle"
|
|
68
|
+
backgroundHeight="30em"
|
|
69
|
+
backgroundVerticalAlign="flex-end"
|
|
70
|
+
backgroundHorizontalAlign="center"
|
|
71
|
+
className="y-success b-light-y"
|
|
72
|
+
style={{
|
|
73
|
+
height :'30em',
|
|
74
|
+
display :'flex',
|
|
75
|
+
justifyContent:'center',
|
|
76
|
+
alignItems :'center',
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
<Quote author="Austen Spoonts" color="paragraph">
|
|
80
|
+
Pareto was like having a full-time employee without having to hire somebody.
|
|
81
|
+
That’s how I would explain it. An on-call, on-demand full-time employee.
|
|
82
|
+
</Quote>
|
|
83
|
+
</Page.Section>
|
|
84
|
+
</Page>
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
export const SectionsWithBackgroundGradient = () => (
|
|
88
|
+
<Page
|
|
89
|
+
id="with-background-gradient"
|
|
90
|
+
>
|
|
91
|
+
<Page.Section
|
|
92
|
+
id="s1"
|
|
93
|
+
backgroundGradient
|
|
94
|
+
backgroundGradientHeight="50em"
|
|
95
|
+
className="y-success"
|
|
96
|
+
style={{
|
|
97
|
+
height :'30em',
|
|
98
|
+
display :'flex',
|
|
99
|
+
justifyContent:'center',
|
|
100
|
+
alignItems :'center',
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
<Quote author="Austen Spoonts" color="paragraph">
|
|
104
|
+
Pareto was like having a full-time employee without having to hire somebody.
|
|
105
|
+
That’s how I would explain it. An on-call, on-demand full-time employee.
|
|
106
|
+
</Quote>
|
|
107
|
+
</Page.Section>
|
|
108
|
+
</Page>
|
|
109
|
+
)
|
|
@@ -36,7 +36,7 @@ export const WithSubtitle = (props) => (
|
|
|
36
36
|
export const Sizes = (props) => (
|
|
37
37
|
['h1', 'h2', 'h3', 'h4', 'h5'].map((size) => (
|
|
38
38
|
<div className="u2 pv-u" key={size}>
|
|
39
|
-
<div className="y-
|
|
39
|
+
<div className="y-background2 b-dark-y">
|
|
40
40
|
<Title
|
|
41
41
|
heading={`This is a title in ${size}`}
|
|
42
42
|
headingAs={size}
|
|
@@ -74,7 +74,7 @@ export const Base = () => {
|
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
76
|
<div className={`ui-${userTheme}`} style={{ height: '100%' }}>
|
|
77
|
-
<ContentSlides className="y-
|
|
77
|
+
<ContentSlides className="y-background1" steps={steps}>
|
|
78
78
|
<ContentSlides.Sidebar
|
|
79
79
|
header={(
|
|
80
80
|
<Logo color="paragraph" />
|
|
@@ -341,7 +341,7 @@ export const Simple = () => {
|
|
|
341
341
|
)
|
|
342
342
|
}
|
|
343
343
|
return (
|
|
344
|
-
<ContentSlides className="y-
|
|
344
|
+
<ContentSlides className="y-background1" steps={steps} simple>
|
|
345
345
|
<Main />
|
|
346
346
|
</ContentSlides>
|
|
347
347
|
)
|
package/src/stories/colors.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const THEME = [
|
|
2
2
|
'main1',
|
|
3
3
|
'main2',
|
|
4
|
-
'
|
|
5
|
-
'
|
|
4
|
+
'main3',
|
|
5
|
+
'main4',
|
|
6
6
|
]
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -27,10 +27,12 @@ const MODALS = [
|
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
const UI = [
|
|
30
|
-
'
|
|
30
|
+
'background1',
|
|
31
31
|
'background2',
|
|
32
32
|
'background3',
|
|
33
33
|
'background4',
|
|
34
|
+
'background5',
|
|
35
|
+
'background6',
|
|
34
36
|
'heading',
|
|
35
37
|
'paragraph',
|
|
36
38
|
'subtitle',
|
|
@@ -27,7 +27,7 @@ export default {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export const Base = () => (
|
|
30
|
-
<div className="y-
|
|
30
|
+
<div className="y-background1 b-y">
|
|
31
31
|
<CheckboxInput value="Business to customer" name="businessTypes">Business to customer</CheckboxInput>
|
|
32
32
|
<CheckboxInput value="Business to business" name="businessTypes">Business to business</CheckboxInput>
|
|
33
33
|
<CheckboxInput value="E-commerce" name="businessTypes">E-commerce</CheckboxInput>
|
|
@@ -38,6 +38,35 @@ export const Base = () => (
|
|
|
38
38
|
</>
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
+
export const RequiredSelect = () => {
|
|
42
|
+
const requiredInput = (inputValue) => {
|
|
43
|
+
let error = ''
|
|
44
|
+
|
|
45
|
+
if (!inputValue || !inputValue?.length === 0) {
|
|
46
|
+
error = 'This information is required'
|
|
47
|
+
}
|
|
48
|
+
return error
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
<SelectInput
|
|
54
|
+
validate={requiredInput}
|
|
55
|
+
name="activity"
|
|
56
|
+
label="Activity Type"
|
|
57
|
+
options={[
|
|
58
|
+
{
|
|
59
|
+
value:'', label:'Select activity type', disabled:true,
|
|
60
|
+
},
|
|
61
|
+
{ value: 'review', label: 'Review' },
|
|
62
|
+
{ value: 'Approve', label: 'Approve' },
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
<FormDebugger />
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
41
70
|
export const Objects = () => (
|
|
42
71
|
<>
|
|
43
72
|
<SelectInput
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const Base = () => (
|
|
29
|
-
<div className="y-
|
|
29
|
+
<div className="y-background1 b-y v2 p-v" style={{ height: '100%' }}>
|
|
30
30
|
<TaskRecommendationInput
|
|
31
31
|
name="taskRecommendations"
|
|
32
32
|
value="businessTypes"
|
|
@@ -41,19 +41,29 @@ export const Base = () => {
|
|
|
41
41
|
return errorMessage
|
|
42
42
|
}
|
|
43
43
|
return (
|
|
44
|
-
|
|
44
|
+
<div className="y-background1 b-dark-y u2 pb-u">
|
|
45
45
|
<TextInput
|
|
46
46
|
name="firstName"
|
|
47
47
|
label="What's your first name ?"
|
|
48
48
|
validate={validate}
|
|
49
49
|
/>
|
|
50
50
|
<FormDebugger />
|
|
51
|
-
|
|
51
|
+
</div>
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export const TextInputWithPlaceHolder = () => (
|
|
56
|
+
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
|
+
<TextInput
|
|
58
|
+
name="firstName"
|
|
59
|
+
label="What's your first name ?"
|
|
60
|
+
placeholder="First Name"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
)
|
|
64
|
+
|
|
55
65
|
export const DisabledTextInput = () => (
|
|
56
|
-
<div className="y-
|
|
66
|
+
<div className="y-background1 b-dark-y u2 pb-u">
|
|
57
67
|
<TextInput
|
|
58
68
|
name="firstName"
|
|
59
69
|
label="What's your first name ?"
|
|
@@ -63,7 +73,7 @@ export const DisabledTextInput = () => (
|
|
|
63
73
|
)
|
|
64
74
|
|
|
65
75
|
export const DateTime = () => (
|
|
66
|
-
<div className="y-
|
|
76
|
+
<div className="y-background1 b-dark-y">
|
|
67
77
|
<TextInput
|
|
68
78
|
name="date"
|
|
69
79
|
label="Select date"
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
decorators:[
|
|
15
15
|
(storyfn) => (
|
|
16
16
|
<Formik
|
|
17
|
-
initialValues={{
|
|
17
|
+
initialValues={{ feedback: '' }}
|
|
18
18
|
>
|
|
19
19
|
<Form>
|
|
20
20
|
|
|
@@ -29,18 +29,54 @@ export default {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export const Base = () => (
|
|
32
|
-
<div className="y-
|
|
32
|
+
<div className="y-background1 b-dark-y">
|
|
33
33
|
<TextareaInput
|
|
34
|
-
name="
|
|
34
|
+
name="feedback"
|
|
35
35
|
label="What can we improve on?"
|
|
36
36
|
/>
|
|
37
37
|
<FormDebugger />
|
|
38
38
|
</div>
|
|
39
39
|
)
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
|
|
41
|
+
export const Placeholder = () => (
|
|
42
|
+
<div className="y-background1 b-dark-y">
|
|
43
|
+
<TextareaInput
|
|
44
|
+
name="feedback"
|
|
45
|
+
label="What can we improve on?"
|
|
46
|
+
placeholder="Type your feedback here..."
|
|
47
|
+
/>
|
|
48
|
+
<FormDebugger />
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
export const Validation = () => {
|
|
53
|
+
const validate = (value) => {
|
|
54
|
+
let errorMessage = ''
|
|
55
|
+
const isValid = value.length > 3
|
|
56
|
+
|
|
57
|
+
if (!isValid) {
|
|
58
|
+
errorMessage = 'Value should be greater than 3 characters'
|
|
59
|
+
}
|
|
60
|
+
return errorMessage
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="y-background1 b-dark-y">
|
|
65
|
+
<TextareaInput
|
|
66
|
+
name="feedback"
|
|
67
|
+
label="What can we improve on?"
|
|
68
|
+
placeholder="Type your feedback here..."
|
|
69
|
+
validate={validate}
|
|
70
|
+
/>
|
|
71
|
+
<FormDebugger />
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const Disabled = () => (
|
|
77
|
+
<div className="y-background1 b-dark-y">
|
|
42
78
|
<TextareaInput
|
|
43
|
-
name="
|
|
79
|
+
name="feedback"
|
|
44
80
|
label="What can we improve on?"
|
|
45
81
|
disabled
|
|
46
82
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
import * as React from 'react'
|
|
3
3
|
|
|
4
|
-
import { useLayoutEffect } from 'react'
|
|
4
|
+
import { useLayoutEffect, useCallback } from 'react'
|
|
5
5
|
|
|
6
6
|
import CountUp from 'react-countup'
|
|
7
7
|
|
|
@@ -26,10 +26,8 @@ const AnimatedCounter = ({
|
|
|
26
26
|
style,
|
|
27
27
|
color,
|
|
28
28
|
number,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
descriptionPosition,
|
|
32
|
-
unitPosition,
|
|
29
|
+
before,
|
|
30
|
+
after,
|
|
33
31
|
delay,
|
|
34
32
|
// ...otherProps
|
|
35
33
|
}) => {
|
|
@@ -37,6 +35,11 @@ const AnimatedCounter = ({
|
|
|
37
35
|
import('./styles.scss')
|
|
38
36
|
}, [])
|
|
39
37
|
|
|
38
|
+
const countDecimals = useCallback((value) => {
|
|
39
|
+
if ((value % 1) !== 0) return value.toString().split('.')[1].length
|
|
40
|
+
return 0
|
|
41
|
+
}, [])
|
|
42
|
+
|
|
40
43
|
return (
|
|
41
44
|
<div
|
|
42
45
|
id={id}
|
|
@@ -51,19 +54,17 @@ const AnimatedCounter = ({
|
|
|
51
54
|
style={style}
|
|
52
55
|
// {...otherProps}
|
|
53
56
|
>
|
|
54
|
-
{descriptionPosition === 'top' && <p className="info top-description uc s-1 md-s0">{description}</p>}
|
|
55
57
|
<div className="count s3">
|
|
56
|
-
{
|
|
57
|
-
<CountUp end={number} delay={delay} redraw>
|
|
58
|
+
{before && <span>{before}</span>}
|
|
59
|
+
<CountUp end={number} delay={delay} decimals={countDecimals(number)} redraw>
|
|
58
60
|
{({ countUpRef, start }) => (
|
|
59
61
|
<VisibilitySensor onChange={start} delayedCall>
|
|
60
62
|
<span ref={countUpRef} />
|
|
61
63
|
</VisibilitySensor>
|
|
62
64
|
)}
|
|
63
65
|
</CountUp>
|
|
64
|
-
{
|
|
66
|
+
{after && <span>{after}</span>}
|
|
65
67
|
</div>
|
|
66
|
-
{descriptionPosition === 'bottom' && <p className="info uc s-1 md-s0 v50 mt-v">{description}</p>}
|
|
67
68
|
</div>
|
|
68
69
|
)
|
|
69
70
|
}
|
|
@@ -92,33 +93,26 @@ AnimatedCounter.propTypes = {
|
|
|
92
93
|
/**
|
|
93
94
|
* The review count value
|
|
94
95
|
*/
|
|
95
|
-
number
|
|
96
|
+
number:PropTypes.number,
|
|
97
|
+
|
|
96
98
|
/**
|
|
97
|
-
* The
|
|
99
|
+
* The unit before the number
|
|
98
100
|
*/
|
|
99
|
-
|
|
101
|
+
before:PropTypes.string,
|
|
102
|
+
|
|
100
103
|
/**
|
|
101
|
-
* The
|
|
104
|
+
* The unit after the number
|
|
102
105
|
*/
|
|
103
|
-
|
|
106
|
+
after:PropTypes.string,
|
|
107
|
+
|
|
104
108
|
/**
|
|
105
109
|
* react counter delay
|
|
106
110
|
*/
|
|
107
|
-
delay
|
|
108
|
-
/**
|
|
109
|
-
* If the animated counter description should be at the top
|
|
110
|
-
*/
|
|
111
|
-
descriptionPosition:PropTypes.oneOf(['top', 'bottom']),
|
|
112
|
-
/**
|
|
113
|
-
* If the unit should be before or after the animated numbers
|
|
114
|
-
*/
|
|
115
|
-
unitPosition :PropTypes.string,
|
|
111
|
+
delay:PropTypes.number,
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
AnimatedCounter.defaultProps = {
|
|
119
|
-
color
|
|
120
|
-
descriptionPosition:'bottom',
|
|
121
|
-
unitPosition :'after',
|
|
115
|
+
color:'main1',
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
export default AnimatedCounter
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
|
-
|
|
4
|
+
//@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
//@use "@aztlan/stylebook/src/globals" as *;
|
|
5
6
|
|
|
6
7
|
.#{bem.$base}.animated-counter {
|
|
7
|
-
align-items: center;
|
|
8
8
|
display: flex;
|
|
9
|
-
|
|
9
|
+
justify-content: center;
|
|
10
10
|
|
|
11
11
|
.count {
|
|
12
12
|
color: var(--x);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
.top-description {
|
|
16
|
-
margin-bottom: .5em;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.info {
|
|
20
|
-
color: var(--metadata);
|
|
21
|
-
}
|
|
22
14
|
}
|
|
23
15
|
|
|
24
16
|
|