@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.
- package/dist/cjs/a/AnimatedCounter/AnimatedCounter.js +16 -29
- package/dist/cjs/a/AnimatedCounter/styles.scss +3 -11
- package/dist/cjs/a/BackgroundGradient/BackgroundGradient.js +77 -0
- 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/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/Shapes/index.js +15 -0
- package/dist/cjs/a/Shapes/styles.scss +255 -0
- package/dist/cjs/a/SnapScroller/SnapScroller.js +77 -0
- package/dist/cjs/a/SnapScroller/index.js +15 -0
- 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 +83 -19
- 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 +4 -4
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/c/ContentSlides/styles.scss +10 -4
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +37 -10
- package/dist/cjs/f/fields/SelectInput/styles.scss +13 -8
- 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 +28 -7
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +0 -24
- package/dist/cjs/form-reset.scss +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/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/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/Shapes/index.js +2 -0
- package/dist/es/a/Shapes/styles.scss +255 -0
- package/dist/es/a/SnapScroller/SnapScroller.js +61 -0
- 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 +83 -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 +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 +4 -4
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/c/ContentSlides/styles.scss +10 -4
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/common/Label/styles.scss +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +2 -2
- package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +2 -2
- package/dist/es/f/fields/SelectInput/SelectInput.js +37 -10
- package/dist/es/f/fields/SelectInput/styles.scss +13 -8
- 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 +28 -7
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/es/f/fields/index.js +0 -3
- package/dist/es/form-reset.scss +1 -1
- package/dist/es/form.scss +1 -1
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +6050 -812
- 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 +154 -2
- package/src/stories/colors.js +5 -3
- package/src/stories/f/SelectInput.stories.jsx +36 -5
- package/src/stories/f/TextInput.stories.jsx +16 -5
- 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 +83 -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 +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 +4 -4
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/styles.scss +10 -4
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/common/Label/styles.scss +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +2 -2
- package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +2 -2
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +44 -5
- package/src/ui/f/fields/SelectInput/styles.scss +13 -8
- package/src/ui/f/fields/TextInput/TextInput.jsx +24 -3
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +24 -13
- package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
- package/src/ui/f/fields/index.js +0 -3
- package/src/ui/form-reset.scss +1 -1
- package/src/ui/form.scss +1 -1
- package/src/stories/f/CheckboxInput.stories.jsx +0 -37
- package/src/stories/f/RadioInput.stories.jsx +0 -37
- package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
- package/src/ui/f/fields/CheckboxInput/CheckboxInput.jsx +0 -107
- package/src/ui/f/fields/CheckboxInput/index.js +0 -2
- package/src/ui/f/fields/CheckboxInput/styles.scss +0 -28
- package/src/ui/f/fields/RadioInput/RadioInput.jsx +0 -112
- package/src/ui/f/fields/RadioInput/index.js +0 -2
- package/src/ui/f/fields/RadioInput/styles.scss +0 -26
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +0 -130
- package/src/ui/f/fields/TaskRecommendationInput/index.js +0 -2
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +0 -37
|
@@ -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}
|
|
@@ -4,6 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import {
|
|
5
5
|
ContentSlides,
|
|
6
6
|
SiteContextProvider,
|
|
7
|
+
Shapes,
|
|
7
8
|
useContentSlides,
|
|
8
9
|
Title,
|
|
9
10
|
Logo,
|
|
@@ -74,7 +75,7 @@ export const Base = () => {
|
|
|
74
75
|
|
|
75
76
|
return (
|
|
76
77
|
<div className={`ui-${userTheme}`} style={{ height: '100%' }}>
|
|
77
|
-
<ContentSlides className="y-
|
|
78
|
+
<ContentSlides className="y-background1 b-dark-y" steps={steps}>
|
|
78
79
|
<ContentSlides.Sidebar
|
|
79
80
|
header={(
|
|
80
81
|
<Logo color="paragraph" />
|
|
@@ -341,7 +342,158 @@ export const Simple = () => {
|
|
|
341
342
|
)
|
|
342
343
|
}
|
|
343
344
|
return (
|
|
344
|
-
<ContentSlides className="y-
|
|
345
|
+
<ContentSlides className="y-background1 b-dark-y" steps={steps} simple>
|
|
346
|
+
<Main />
|
|
347
|
+
</ContentSlides>
|
|
348
|
+
)
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export const WithBackgroundShape = () => {
|
|
352
|
+
const steps = [
|
|
353
|
+
{
|
|
354
|
+
id :'welcome',
|
|
355
|
+
title :'Welcome',
|
|
356
|
+
progress:40,
|
|
357
|
+
location:'welcome',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id :'plan',
|
|
361
|
+
title :'Choose your plan',
|
|
362
|
+
progress:60,
|
|
363
|
+
location:'select-plan',
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id :'details',
|
|
367
|
+
title :'Personal details',
|
|
368
|
+
progress:70,
|
|
369
|
+
location:'personal-details',
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id :'payment',
|
|
373
|
+
title :'Payment',
|
|
374
|
+
progress:90,
|
|
375
|
+
location:'payment',
|
|
376
|
+
},
|
|
377
|
+
]
|
|
378
|
+
|
|
379
|
+
const Main = () => {
|
|
380
|
+
const { isLastStep } = useContentSlides()
|
|
381
|
+
|
|
382
|
+
return (
|
|
383
|
+
<>
|
|
384
|
+
<ContentSlides.HorizontalMenu hideBackIcon={isLastStep} />
|
|
385
|
+
{' '}
|
|
386
|
+
<main>
|
|
387
|
+
<ContentSlides.Slide
|
|
388
|
+
index={0}
|
|
389
|
+
>
|
|
390
|
+
<Title
|
|
391
|
+
heading="Welcome"
|
|
392
|
+
headingAs="h1"
|
|
393
|
+
headingClassName="small"
|
|
394
|
+
subtitle="Welcome to this site. We hope you will have an amazing experience here."
|
|
395
|
+
/>
|
|
396
|
+
<ContentSlides.Navigator />
|
|
397
|
+
</ContentSlides.Slide
|
|
398
|
+
>
|
|
399
|
+
<ContentSlides.Slide
|
|
400
|
+
index={1}
|
|
401
|
+
>
|
|
402
|
+
<Title
|
|
403
|
+
heading="Part 2"
|
|
404
|
+
headingAs="h1"
|
|
405
|
+
headingClassName="small"
|
|
406
|
+
subtitle="Welcome to this site. We hope you will have an amazing experience here."
|
|
407
|
+
/>
|
|
408
|
+
<p>
|
|
409
|
+
In ut sollicitudin elit. Maecenas tempor ex aliquet enim egestas,
|
|
410
|
+
non sollicitudin mi tempor. Pellentesque fermentum, massa in cursus faucibus,
|
|
411
|
+
enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
|
|
412
|
+
Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
|
|
413
|
+
porta placerat leo.
|
|
414
|
+
Donec scelerisque enim risus, in pharetra purus fringilla eu.
|
|
415
|
+
Cras placerat ac enim viverra rhoncus.
|
|
416
|
+
Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
|
|
417
|
+
Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
|
|
418
|
+
Nullam vel porttitor mi, ut vestibulum arcu.
|
|
419
|
+
{' '}
|
|
420
|
+
</p>
|
|
421
|
+
<p>
|
|
422
|
+
In ut sollicitudin elit. Maecenas tempor ex aliquet enim egestas,
|
|
423
|
+
non sollicitudin mi tempor. Pellentesque fermentum, massa in cursus faucibus,
|
|
424
|
+
enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
|
|
425
|
+
Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
|
|
426
|
+
porta placerat leo.
|
|
427
|
+
Donec scelerisque enim risus, in pharetra purus fringilla eu.
|
|
428
|
+
Cras placerat ac enim viverra rhoncus.
|
|
429
|
+
Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
|
|
430
|
+
Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
|
|
431
|
+
Nullam vel porttitor mi, ut vestibulum arcu.
|
|
432
|
+
{' '}
|
|
433
|
+
</p>
|
|
434
|
+
<p>
|
|
435
|
+
In ut sollicitudin elit. Maecenas tempor ex aliquet enim egestas,
|
|
436
|
+
non sollicitudin mi tempor. Pellentesque fermentum, massa in cursus faucibus,
|
|
437
|
+
enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
|
|
438
|
+
Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
|
|
439
|
+
porta placerat leo.
|
|
440
|
+
Donec scelerisque enim risus, in pharetra purus fringilla eu.
|
|
441
|
+
Cras placerat ac enim viverra rhoncus.
|
|
442
|
+
Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
|
|
443
|
+
Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
|
|
444
|
+
Nullam vel porttitor mi, ut vestibulum arcu.
|
|
445
|
+
{' '}
|
|
446
|
+
</p>
|
|
447
|
+
<p>
|
|
448
|
+
In ut sollicitudin elit. Maecenas tempor ex aliquet enim egestas,
|
|
449
|
+
non sollicitudin mi tempor. Pellentesque fermentum, massa in cursus faucibus,
|
|
450
|
+
enim tortor fringilla ligula, sit amet tincidunt neque orci et tellus.
|
|
451
|
+
Nam dignissim tristique justo. Cras nulla sem, dictum pellentesque libero eget,
|
|
452
|
+
porta placerat leo.
|
|
453
|
+
Donec scelerisque enim risus, in pharetra purus fringilla eu.
|
|
454
|
+
Cras placerat ac enim viverra rhoncus.
|
|
455
|
+
Cras sagittis euismod orci eget aliquam. Nulla et mi non enim aliquam consequat.
|
|
456
|
+
Cras volutpat porta convallis. Mauris ullamcorper vitae sapien ac rhoncus.
|
|
457
|
+
Nullam vel porttitor mi, ut vestibulum arcu.
|
|
458
|
+
{' '}
|
|
459
|
+
</p>
|
|
460
|
+
|
|
461
|
+
<ContentSlides.Navigator />
|
|
462
|
+
</ContentSlides.Slide>
|
|
463
|
+
<ContentSlides.Slide
|
|
464
|
+
index={2}
|
|
465
|
+
>
|
|
466
|
+
<Title
|
|
467
|
+
heading="Part 3"
|
|
468
|
+
headingAs="h1"
|
|
469
|
+
headingClassName="small"
|
|
470
|
+
subtitle="Welcome to this site. We hope you will have an amazing experience here."
|
|
471
|
+
/>
|
|
472
|
+
<ContentSlides.Navigator />
|
|
473
|
+
</ContentSlides.Slide>
|
|
474
|
+
<ContentSlides.Slide
|
|
475
|
+
index={3}
|
|
476
|
+
>
|
|
477
|
+
<Title
|
|
478
|
+
heading="Part 4"
|
|
479
|
+
headingAs="h1"
|
|
480
|
+
headingClassName="small"
|
|
481
|
+
subtitle="Welcome to this site. We hope you will have an amazing experience here."
|
|
482
|
+
/>
|
|
483
|
+
<ContentSlides.Navigator />
|
|
484
|
+
</ContentSlides.Slide>
|
|
485
|
+
</main>
|
|
486
|
+
</>
|
|
487
|
+
)
|
|
488
|
+
}
|
|
489
|
+
return (
|
|
490
|
+
<ContentSlides className="y-background4 b-light-y" steps={steps} simple>
|
|
491
|
+
<Shapes
|
|
492
|
+
height="65em"
|
|
493
|
+
verticalAlign="center"
|
|
494
|
+
horizontalAlign="flex-start"
|
|
495
|
+
shape="spiral"
|
|
496
|
+
/>
|
|
345
497
|
<Main />
|
|
346
498
|
</ContentSlides>
|
|
347
499
|
)
|
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',
|
|
@@ -13,10 +13,9 @@ export default {
|
|
|
13
13
|
decorators:[
|
|
14
14
|
(storyfn) => (
|
|
15
15
|
<Formik
|
|
16
|
-
initialValues={{ workType: '
|
|
16
|
+
initialValues={{ workType: '' }}
|
|
17
17
|
>
|
|
18
18
|
<Form>
|
|
19
|
-
|
|
20
19
|
{ storyfn() }
|
|
21
20
|
</Form>
|
|
22
21
|
</Formik>
|
|
@@ -32,18 +31,46 @@ export const Base = () => (
|
|
|
32
31
|
<SelectInput
|
|
33
32
|
name="workType"
|
|
34
33
|
label="Work Type"
|
|
35
|
-
options={['Work', 'Managing', 'Training']}
|
|
34
|
+
options={[{ value: '', label: 'Select an option', disabled: true }, 'Work', 'Managing', 'Training']}
|
|
36
35
|
/>
|
|
37
36
|
<FormDebugger />
|
|
38
37
|
</>
|
|
39
38
|
)
|
|
40
39
|
|
|
40
|
+
export const RequiredSelect = () => {
|
|
41
|
+
const requiredInput = (inputValue) => {
|
|
42
|
+
let error = ''
|
|
43
|
+
|
|
44
|
+
if (!inputValue || !inputValue?.length === 0) {
|
|
45
|
+
error = 'This information is required'
|
|
46
|
+
}
|
|
47
|
+
return error
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<SelectInput
|
|
53
|
+
validate={requiredInput}
|
|
54
|
+
name="activity"
|
|
55
|
+
label="Activity Type"
|
|
56
|
+
options={[
|
|
57
|
+
{ value: '', label: 'Select an option', disabled: true },
|
|
58
|
+
{ value: 'review', label: 'Review' },
|
|
59
|
+
{ value: 'Approve', label: 'Approve' },
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
62
|
+
<FormDebugger />
|
|
63
|
+
</>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
41
67
|
export const Objects = () => (
|
|
42
68
|
<>
|
|
43
69
|
<SelectInput
|
|
44
70
|
name="workType"
|
|
45
71
|
label="Work Type"
|
|
46
72
|
options={[
|
|
73
|
+
{ value: '', label: 'Select an option', disabled: true },
|
|
47
74
|
{ value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
|
|
48
75
|
{ value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
|
|
49
76
|
]}
|
|
@@ -57,7 +84,9 @@ export const StringAndObjects = () => (
|
|
|
57
84
|
<SelectInput
|
|
58
85
|
name="workType"
|
|
59
86
|
label="Work Type"
|
|
60
|
-
options={[
|
|
87
|
+
options={[
|
|
88
|
+
{ value: '', label: 'Select an option', disabled: true },
|
|
89
|
+
'Work', 'Managing', 'Training',
|
|
61
90
|
{ value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
|
|
62
91
|
{ value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
|
|
63
92
|
]}
|
|
@@ -70,7 +99,9 @@ export const DisabledSelectInput = () => (
|
|
|
70
99
|
<SelectInput
|
|
71
100
|
name="workType"
|
|
72
101
|
label="Work Type"
|
|
73
|
-
options={[
|
|
102
|
+
options={[
|
|
103
|
+
{ value: '', label: 'Select an option', disabled: true },
|
|
104
|
+
'Work', 'Managing', 'Training',
|
|
74
105
|
{ value: '20th Aug 2020 to 19th Sept, 2020', label: '20th Aug 2020 to 19th Sept, 2020' },
|
|
75
106
|
{ value: '20th Sept 2020 to 19th Oct, 2020', label: '20th Sept 2020 to 19th Oct, 2020' },
|
|
76
107
|
]}
|
|
@@ -41,19 +41,30 @@ export const Base = () => {
|
|
|
41
41
|
return errorMessage
|
|
42
42
|
}
|
|
43
43
|
return (
|
|
44
|
-
|
|
44
|
+
<div className=" 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
|
|
56
|
-
<div className="
|
|
55
|
+
export const Placeholder = () => (
|
|
56
|
+
<div className="u2 pb-u">
|
|
57
|
+
<TextInput
|
|
58
|
+
name="firstName"
|
|
59
|
+
label="What's your first name ?"
|
|
60
|
+
placeholder="First Name"
|
|
61
|
+
/>
|
|
62
|
+
<FormDebugger />
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
export const Disabled = () => (
|
|
67
|
+
<div className="u2 pb-u">
|
|
57
68
|
<TextInput
|
|
58
69
|
name="firstName"
|
|
59
70
|
label="What's your first name ?"
|
|
@@ -63,7 +74,7 @@ export const DisabledTextInput = () => (
|
|
|
63
74
|
)
|
|
64
75
|
|
|
65
76
|
export const DateTime = () => (
|
|
66
|
-
<div
|
|
77
|
+
<div>
|
|
67
78
|
<TextInput
|
|
68
79
|
name="date"
|
|
69
80
|
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
|
|
32
|
+
<div>
|
|
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>
|
|
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>
|
|
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>
|
|
42
78
|
<TextareaInput
|
|
43
|
-
name="
|
|
79
|
+
name="feedback"
|
|
44
80
|
label="What can we improve on?"
|
|
45
81
|
disabled
|
|
46
82
|
/>
|