imbric-theme 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.babelrc.json +3 -0
- package/.commitlintrc.json +3 -0
- package/.editorconfig +13 -0
- package/.eslintcache +1 -0
- package/.eslintrc.json +36 -0
- package/.huskyrc.json +6 -0
- package/.lintstagedrc.json +5 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +4 -0
- package/.releaserc.json +13 -0
- package/.storybook/main.js +9 -0
- package/.storybook/preview-head.html +2 -0
- package/.storybook/preview.js +32 -0
- package/.stylelintrc.json +14 -0
- package/.vscode/launch.json +15 -0
- package/CHANGELOG.md +0 -0
- package/README.md +69 -0
- package/atoms/Avatar/Avatar.js +36 -0
- package/atoms/Avatar/Avatar.module.css +3 -0
- package/atoms/Avatar/Avatar.stories.js +29 -0
- package/atoms/Avatar/__snapshots__/Avatar.stories.js.snap +105 -0
- package/atoms/Avatar/constants.js +3 -0
- package/atoms/Avatar/helpers.js +7 -0
- package/atoms/Avatar/index.js +3 -0
- package/atoms/Button/Button.js +68 -0
- package/atoms/Button/Button.module.css +63 -0
- package/atoms/Button/Button.stories.js +47 -0
- package/atoms/Button/Button.test.js +60 -0
- package/atoms/Button/__snapshots__/Button.stories.js.snap +191 -0
- package/atoms/Button/constants.js +3 -0
- package/atoms/Button/index.js +3 -0
- package/atoms/Card/Card.js +48 -0
- package/atoms/Card/Card.module.css +52 -0
- package/atoms/Card/Card.stories.js +41 -0
- package/atoms/Card/__snapshots__/Card.stories.js.snap +136 -0
- package/atoms/Card/constants.js +4 -0
- package/atoms/Card/index.js +3 -0
- package/atoms/Check/Check.js +26 -0
- package/atoms/Check/Check.module.css +11 -0
- package/atoms/Check/Check.stories.js +15 -0
- package/atoms/Check/__snapshots__/Check.stories.js.snap +67 -0
- package/atoms/Check/index.js +2 -0
- package/atoms/Divider/Divider.js +19 -0
- package/atoms/Divider/Divider.module.css +5 -0
- package/atoms/Divider/Divider.stories.js +12 -0
- package/atoms/Divider/__snapshots__/Divider.stories.js.snap +22 -0
- package/atoms/Divider/index.js +2 -0
- package/atoms/Heading/Heading.js +37 -0
- package/atoms/Heading/Heading.module.css +66 -0
- package/atoms/Heading/Heading.stories.js +46 -0
- package/atoms/Heading/__snapshots__/Heading.stories.js.snap +189 -0
- package/atoms/Heading/constants.js +5 -0
- package/atoms/Heading/index.js +3 -0
- package/atoms/Icon/Icon.js +66 -0
- package/atoms/Icon/Icon.module.css +112 -0
- package/atoms/Icon/Icon.stories.js +48 -0
- package/atoms/Icon/__snapshots__/Icon.stories.js.snap +1311 -0
- package/atoms/Icon/constants.js +486 -0
- package/atoms/Icon/helpers.js +9 -0
- package/atoms/Icon/index.js +3 -0
- package/atoms/Input/Input.js +49 -0
- package/atoms/Input/Input.module.css +27 -0
- package/atoms/Input/Input.stories.js +32 -0
- package/atoms/Input/__snapshots__/Input.stories.js.snap +101 -0
- package/atoms/Input/constants.js +3 -0
- package/atoms/Input/index.js +3 -0
- package/atoms/Link/Link.js +33 -0
- package/atoms/Link/Link.module.css +14 -0
- package/atoms/Link/Link.stories.js +30 -0
- package/atoms/Link/__snapshots__/Link.stories.js.snap +118 -0
- package/atoms/Link/constants.js +5 -0
- package/atoms/Link/index.js +3 -0
- package/atoms/Loading/Loading.js +30 -0
- package/atoms/Loading/Loading.module.css +51 -0
- package/atoms/Loading/Loading.stories.js +17 -0
- package/atoms/Loading/__snapshots__/Loading.stories.js.snap +26 -0
- package/atoms/Loading/index.js +2 -0
- package/atoms/Modal/Modal.js +98 -0
- package/atoms/Modal/Modal.module.css +85 -0
- package/atoms/Modal/Modal.stories.js +43 -0
- package/atoms/Modal/__snapshots__/Modal.stories.js.snap +239 -0
- package/atoms/Modal/constants.js +1 -0
- package/atoms/Modal/index.js +3 -0
- package/atoms/Paragraph/Paragraph.js +56 -0
- package/atoms/Paragraph/Paragraph.module.css +68 -0
- package/atoms/Paragraph/Paragraph.stories.js +52 -0
- package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +230 -0
- package/atoms/Paragraph/constants.js +5 -0
- package/atoms/Paragraph/index.js +3 -0
- package/atoms/Picture/Picture.js +40 -0
- package/atoms/Picture/Picture.module.css +16 -0
- package/atoms/Picture/Picture.stories.js +32 -0
- package/atoms/Picture/__snapshots__/Picture.stories.js.snap +156 -0
- package/atoms/Picture/index.js +2 -0
- package/atoms/Textarea/Textarea.js +46 -0
- package/atoms/Textarea/Textarea.module.css +25 -0
- package/atoms/Textarea/Textarea.stories.js +16 -0
- package/atoms/Textarea/__snapshots__/Textarea.stories.js.snap +25 -0
- package/atoms/Textarea/index.js +2 -0
- package/codecov.yml +2 -0
- package/helpers/storybook.js +29 -0
- package/helpers/storybook.test.js +40 -0
- package/helpers/styles.js +37 -0
- package/helpers/styles.test.js +222 -0
- package/hocs/withStyles.js +17 -0
- package/hook/useMedia.js +22 -0
- package/index.js +31 -0
- package/jest.config.js +23 -0
- package/jest.setup.js +13 -0
- package/layout/CenteredContent/CenteredContent.js +30 -0
- package/layout/CenteredContent/CenteredContent.module.css +12 -0
- package/layout/CenteredContent/CenteredContent.stories.js +22 -0
- package/layout/CenteredContent/__snapshots__/CenteredContent.stories.js.snap +27 -0
- package/layout/CenteredContent/index.js +2 -0
- package/layout/Container/Container.js +29 -0
- package/layout/Container/Container.module.css +14 -0
- package/layout/Container/Container.stories.js +22 -0
- package/layout/Container/__snapshots__/Container.stories.js.snap +27 -0
- package/layout/Container/index.js +2 -0
- package/layout/FullHeightContent/FullHeightContent.js +40 -0
- package/layout/FullHeightContent/FullHeightContent.module.css +21 -0
- package/layout/FullHeightContent/FullHeightContent.stories.js +22 -0
- package/layout/FullHeightContent/__snapshots__/FullHeightContent.stories.js.snap +41 -0
- package/layout/FullHeightContent/index.js +2 -0
- package/layout/Spacer/Spacer.js +40 -0
- package/layout/Spacer/Spacer.module.css +12 -0
- package/layout/Spacer/Spacer.stories.js +25 -0
- package/layout/Spacer/__snapshots__/Spacer.stories.js.snap +97 -0
- package/layout/Spacer/components/Horizontal/Horizontal.js +43 -0
- package/layout/Spacer/components/Horizontal/Horizontal.stories.js +32 -0
- package/layout/Spacer/components/Horizontal/__snapshots__/Horizontal.stories.js.snap +97 -0
- package/layout/Spacer/components/Horizontal/index.js +1 -0
- package/layout/Spacer/components/Vertical/Vertical.js +31 -0
- package/layout/Spacer/components/Vertical/Vertical.stories.js +25 -0
- package/layout/Spacer/components/Vertical/__snapshots__/Vertical.stories.js.snap +85 -0
- package/layout/Spacer/components/Vertical/index.js +1 -0
- package/layout/Spacer/components/index.js +2 -0
- package/layout/Spacer/constants.js +5 -0
- package/layout/Spacer/helpers.js +3 -0
- package/layout/Spacer/index.js +3 -0
- package/molecules/Accordion/Accordion.js +70 -0
- package/molecules/Accordion/Accordion.module.css +12 -0
- package/molecules/Accordion/Accordion.stories.js +31 -0
- package/molecules/Accordion/__snapshots__/Accordion.stories.js.snap +228 -0
- package/molecules/Accordion/index.js +2 -0
- package/molecules/AddButton/AddButton.js +137 -0
- package/molecules/AddButton/AddButton.module.css +128 -0
- package/molecules/AddButton/AddButton.stories.js +47 -0
- package/molecules/AddButton/__snapshots__/AddButton.stories.js.snap +326 -0
- package/molecules/AddButton/constants.js +6 -0
- package/molecules/AddButton/handlers.js +58 -0
- package/molecules/AddButton/handlers.test.js +19 -0
- package/molecules/AddButton/helpers.js +6 -0
- package/molecules/AddButton/helpers.test.js +41 -0
- package/molecules/AddButton/hooks.js +14 -0
- package/molecules/AddButton/index.js +3 -0
- package/molecules/ButtonIcon/ButtonIcon.js +41 -0
- package/molecules/ButtonIcon/ButtonIcon.stories.js +27 -0
- package/molecules/ButtonIcon/__snapshots__/ButtonIcon.stories.js.snap +178 -0
- package/molecules/ButtonIcon/constants.js +6 -0
- package/molecules/ButtonIcon/index.js +2 -0
- package/molecules/Dropdown/Dropdown.js +59 -0
- package/molecules/Dropdown/Dropdown.module.css +34 -0
- package/molecules/Dropdown/Dropdown.stories.js +41 -0
- package/molecules/Dropdown/__snapshots__/Dropdown.stories.js.snap +181 -0
- package/molecules/Dropdown/index.js +2 -0
- package/molecules/Error/Error.js +35 -0
- package/molecules/Error/Error.module.css +11 -0
- package/molecules/Error/Error.stories.js +18 -0
- package/molecules/Error/__snapshots__/Error.stories.js.snap +134 -0
- package/molecules/Error/index.js +2 -0
- package/molecules/IconLabel/IconLabel.js +83 -0
- package/molecules/IconLabel/IconLabel.module.css +16 -0
- package/molecules/IconLabel/IconLabel.stories.js +25 -0
- package/molecules/IconLabel/__snapshots__/IconLabel.stories.js.snap +211 -0
- package/molecules/IconLabel/constants.js +6 -0
- package/molecules/IconLabel/index.js +3 -0
- package/molecules/LoadingError/LoadingError.js +31 -0
- package/molecules/LoadingError/LoadingError.stories.js +24 -0
- package/molecules/LoadingError/__snapshots__/LoadingError.stories.js.snap +109 -0
- package/molecules/LoadingError/index.js +1 -0
- package/molecules/Score/Score.js +61 -0
- package/molecules/Score/Score.module.css +11 -0
- package/molecules/Score/Score.stories.js +13 -0
- package/molecules/Score/__snapshots__/Score.stories.js.snap +100 -0
- package/molecules/Score/faces/happy.svg +7 -0
- package/molecules/Score/faces/normal.svg +6 -0
- package/molecules/Score/faces/sad.svg +6 -0
- package/molecules/Score/index.js +2 -0
- package/molecules/Task/Task.js +114 -0
- package/molecules/Task/Task.module.css +47 -0
- package/molecules/Task/Task.stories.js +47 -0
- package/molecules/Task/__snapshots__/Task.stories.js.snap +953 -0
- package/molecules/Task/constants.js +1 -0
- package/molecules/Task/index.js +3 -0
- package/molecules/TaskCounter/TaskCounter.js +74 -0
- package/molecules/TaskCounter/TaskCounter.module.css +11 -0
- package/molecules/TaskCounter/TaskCounter.stories.js +26 -0
- package/molecules/TaskCounter/__snapshots__/TaskCounter.stories.js.snap +177 -0
- package/molecules/TaskCounter/index.js +2 -0
- package/package.json +102 -0
- package/scripts/build-tokens.js +40 -0
- package/scripts/create-component.js +127 -0
- package/storybook.test.js +13 -0
- package/styles/globals.css +10 -0
- package/styles/tokens.css +390 -0
- package/templates/component/Component.js +22 -0
- package/templates/component/Component.module.css +3 -0
- package/templates/component/Component.stories.js +23 -0
- package/templates/component/constants.js +1 -0
- package/templates/component/index.js +3 -0
- package/tokens/Token/Helper.js +30 -0
- package/tokens/Token/Token.js +13 -0
- package/tokens/Token/Token.module.css +64 -0
- package/tokens/Token/components/Color.js +21 -0
- package/tokens/Token/components/Color.stories.js +126 -0
- package/tokens/Token/components/FontFamily.js +24 -0
- package/tokens/Token/components/FontFamily.stories.js +32 -0
- package/tokens/Token/components/FontSize.js +24 -0
- package/tokens/Token/components/FontSize.stories.js +31 -0
- package/tokens/Token/components/FontWeight.js +24 -0
- package/tokens/Token/components/FontWeight.stories.js +31 -0
- package/tokens/Token/components/Spacing.js +24 -0
- package/tokens/Token/components/Spacing.stories.js +29 -0
- package/tokens/Token/components/__snapshots__/Color.stories.js.snap +7169 -0
- package/tokens/Token/components/__snapshots__/FontFamily.stories.js.snap +133 -0
- package/tokens/Token/components/__snapshots__/FontSize.stories.js.snap +261 -0
- package/tokens/Token/components/__snapshots__/FontWeight.stories.js.snap +317 -0
- package/tokens/Token/components/__snapshots__/Spacing.stories.js.snap +229 -0
- package/tokens/Token/components/index.js +5 -0
- package/tokens/Token/helpers.js +17 -0
- package/tokens/Token/index.js +1 -0
- package/tokens/index.js +471 -0
- package/utils/isEmpty.js +28 -0
- package/utils/isEmpty.test.js +125 -0
- package/utils/isObject.js +4 -0
- package/utils/keyboardCodes.js +6 -0
- package/utils/testUtils/matchMediaMock.js +14 -0
- package/utils/testUtils/svgrMock.js +2 -0
- package/utils/toCapitalize.js +4 -0
- package/utils/toKebabCase.js +8 -0
- package/utils/toPascalCase.js +20 -0
- package/webpack/cssModules.js +30 -0
- package/webpack/loadConfigs.js +6 -0
- package/webpack/reactInlineSvg.js +22 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Card Clickable 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<div
|
19
|
+
className="card color-base size-sm is-clickable"
|
20
|
+
>
|
21
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
`;
|
25
|
+
|
26
|
+
exports[`Storyshots Atoms/Card Colors 1`] = `
|
27
|
+
<div
|
28
|
+
style={
|
29
|
+
Object {
|
30
|
+
"alignContent": "flex-start",
|
31
|
+
"display": "flex",
|
32
|
+
"flexDirection": "column",
|
33
|
+
"flexWrap": "wrap",
|
34
|
+
"gap": "10px 30px",
|
35
|
+
"height": "100%",
|
36
|
+
"justifyContent": "flex-start",
|
37
|
+
"maxHeight": "auto",
|
38
|
+
}
|
39
|
+
}
|
40
|
+
>
|
41
|
+
<div
|
42
|
+
className="card color-base size-sm"
|
43
|
+
>
|
44
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
45
|
+
</div>
|
46
|
+
<div
|
47
|
+
className="card color-primary size-sm"
|
48
|
+
>
|
49
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
50
|
+
</div>
|
51
|
+
<div
|
52
|
+
className="card color-secondary size-sm"
|
53
|
+
>
|
54
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
`;
|
58
|
+
|
59
|
+
exports[`Storyshots Atoms/Card Default 1`] = `
|
60
|
+
<div
|
61
|
+
style={
|
62
|
+
Object {
|
63
|
+
"alignContent": "flex-start",
|
64
|
+
"display": "flex",
|
65
|
+
"flexDirection": "column",
|
66
|
+
"flexWrap": "wrap",
|
67
|
+
"gap": "10px 30px",
|
68
|
+
"height": "100%",
|
69
|
+
"justifyContent": "flex-start",
|
70
|
+
"maxHeight": "auto",
|
71
|
+
}
|
72
|
+
}
|
73
|
+
>
|
74
|
+
<div
|
75
|
+
className="card color-base size-sm"
|
76
|
+
>
|
77
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
`;
|
81
|
+
|
82
|
+
exports[`Storyshots Atoms/Card Dragabble 1`] = `
|
83
|
+
<div
|
84
|
+
style={
|
85
|
+
Object {
|
86
|
+
"alignContent": "flex-start",
|
87
|
+
"display": "flex",
|
88
|
+
"flexDirection": "column",
|
89
|
+
"flexWrap": "wrap",
|
90
|
+
"gap": "10px 30px",
|
91
|
+
"height": "100%",
|
92
|
+
"justifyContent": "flex-start",
|
93
|
+
"maxHeight": "auto",
|
94
|
+
}
|
95
|
+
}
|
96
|
+
>
|
97
|
+
<div
|
98
|
+
className="card color-base size-sm is-draggable"
|
99
|
+
>
|
100
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
`;
|
104
|
+
|
105
|
+
exports[`Storyshots Atoms/Card Sizes 1`] = `
|
106
|
+
<div
|
107
|
+
style={
|
108
|
+
Object {
|
109
|
+
"alignContent": "flex-start",
|
110
|
+
"display": "flex",
|
111
|
+
"flexDirection": "column",
|
112
|
+
"flexWrap": "wrap",
|
113
|
+
"gap": "10px 30px",
|
114
|
+
"height": "100%",
|
115
|
+
"justifyContent": "flex-start",
|
116
|
+
"maxHeight": "auto",
|
117
|
+
}
|
118
|
+
}
|
119
|
+
>
|
120
|
+
<div
|
121
|
+
className="card color-base size-sm"
|
122
|
+
>
|
123
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
124
|
+
</div>
|
125
|
+
<div
|
126
|
+
className="card color-base size-md"
|
127
|
+
>
|
128
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
129
|
+
</div>
|
130
|
+
<div
|
131
|
+
className="card color-base size-lg"
|
132
|
+
>
|
133
|
+
Lacerations coaster sort comings windlance happily EIf-witch handful unbefitting? Decide rising startled Aragorn invitations midnight deserves fortunes innards. You cannot hide. I see you. There is no life in the void. Only death. Mirror Emyn dreamed!
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
`;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import Icon from '../Icon'
|
5
|
+
|
6
|
+
import styles from './Check.module.css'
|
7
|
+
import withStyles from '../../hocs/withStyles'
|
8
|
+
|
9
|
+
export const Check = ({ isChecked, getStyles }) => {
|
10
|
+
return isChecked ? (
|
11
|
+
<Icon name="checkCircle" color="muted" isClickable />
|
12
|
+
) : (
|
13
|
+
<span className={getStyles('check')} />
|
14
|
+
)
|
15
|
+
}
|
16
|
+
|
17
|
+
Check.propTypes = {
|
18
|
+
getStyles: PropTypes.func.isRequired,
|
19
|
+
isChecked: PropTypes.bool,
|
20
|
+
}
|
21
|
+
|
22
|
+
Check.defaultProps = {
|
23
|
+
getStyles: () => {},
|
24
|
+
}
|
25
|
+
|
26
|
+
export default withStyles(styles)(Check)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Check, styles } from '.'
|
2
|
+
|
3
|
+
import { getTemplate } from '../../helpers/storybook'
|
4
|
+
|
5
|
+
const Template = getTemplate(Check, styles)
|
6
|
+
|
7
|
+
export default {
|
8
|
+
title: 'Atoms/Check',
|
9
|
+
component: Check,
|
10
|
+
}
|
11
|
+
|
12
|
+
export const Default = Template.bind({})
|
13
|
+
|
14
|
+
export const Checked = Template.bind({})
|
15
|
+
Checked.args = { isChecked: true }
|
@@ -0,0 +1,67 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Check Checked 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<div
|
19
|
+
className="icon color-muted size-md background-transparent is-clickable"
|
20
|
+
style={
|
21
|
+
Object {
|
22
|
+
"height": 35,
|
23
|
+
"width": 35,
|
24
|
+
}
|
25
|
+
}
|
26
|
+
>
|
27
|
+
<svg
|
28
|
+
height={35}
|
29
|
+
viewBox="5 1 20 20"
|
30
|
+
width={35}
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
32
|
+
>
|
33
|
+
<path
|
34
|
+
clipRule="evenodd"
|
35
|
+
d="M14.93 20.86C9.45472 20.86 5 16.4053 5 10.93C5 5.45472 9.45472 1 14.93 1C20.4053 1 24.86 5.45472 24.86 10.93C24.86 16.4053 20.4053 20.86 14.93 20.86ZM14.93 2.09095C10.0559 2.09095 6.09095 6.05591 6.09095 10.93C6.09095 15.8041 10.0559 19.769 14.93 19.769C19.8041 19.769 23.769 15.8041 23.769 10.93C23.769 6.05591 19.8041 2.09095 14.93 2.09095Z"
|
36
|
+
fillRule="evenodd"
|
37
|
+
/>
|
38
|
+
<path
|
39
|
+
clipRule="evenodd"
|
40
|
+
d="M13.744 15.221L8.67871 10.1423L9.45059 9.37155L13.7458 13.6773L20.41 7.01251L21.1807 7.78439L13.744 15.221Z"
|
41
|
+
fillRule="evenodd"
|
42
|
+
/>
|
43
|
+
</svg>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
`;
|
47
|
+
|
48
|
+
exports[`Storyshots Atoms/Check Default 1`] = `
|
49
|
+
<div
|
50
|
+
style={
|
51
|
+
Object {
|
52
|
+
"alignContent": "flex-start",
|
53
|
+
"display": "flex",
|
54
|
+
"flexDirection": "column",
|
55
|
+
"flexWrap": "wrap",
|
56
|
+
"gap": "10px 30px",
|
57
|
+
"height": "100%",
|
58
|
+
"justifyContent": "flex-start",
|
59
|
+
"maxHeight": "auto",
|
60
|
+
}
|
61
|
+
}
|
62
|
+
>
|
63
|
+
<span
|
64
|
+
className="check"
|
65
|
+
/>
|
66
|
+
</div>
|
67
|
+
`;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Divider.module.css'
|
5
|
+
import withStyles from '../../hocs/withStyles'
|
6
|
+
|
7
|
+
export const Divider = ({ getStyles }) => {
|
8
|
+
return <div className={getStyles('divider')} />
|
9
|
+
}
|
10
|
+
|
11
|
+
Divider.propTypes = {
|
12
|
+
getStyles: PropTypes.func.isRequired,
|
13
|
+
}
|
14
|
+
|
15
|
+
Divider.defaultProps = {
|
16
|
+
getStyles: () => {},
|
17
|
+
}
|
18
|
+
|
19
|
+
export default withStyles(styles)(Divider)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Divider, styles } from '.'
|
2
|
+
|
3
|
+
import { getTemplate } from '../../helpers/storybook'
|
4
|
+
|
5
|
+
const Template = getTemplate(Divider, styles)
|
6
|
+
|
7
|
+
export default {
|
8
|
+
title: 'Atoms/Divider',
|
9
|
+
component: Divider,
|
10
|
+
}
|
11
|
+
|
12
|
+
export const Default = Template.bind({})
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Divider Default 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<div
|
19
|
+
className="divider"
|
20
|
+
/>
|
21
|
+
</div>
|
22
|
+
`;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Heading.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
export const Heading = ({ children, isCentered, isInline, getStyles }) => {
|
9
|
+
return (
|
10
|
+
<h1
|
11
|
+
className={getStyles('heading', ['color', 'size', 'weight'], {
|
12
|
+
'is-centered': isCentered,
|
13
|
+
'is-inline': isInline,
|
14
|
+
})}
|
15
|
+
>
|
16
|
+
{children}
|
17
|
+
</h1>
|
18
|
+
)
|
19
|
+
}
|
20
|
+
|
21
|
+
Heading.propTypes = {
|
22
|
+
children: PropTypes.string.isRequired,
|
23
|
+
getStyles: PropTypes.func.isRequired,
|
24
|
+
isInline: PropTypes.bool,
|
25
|
+
isCentered: PropTypes.bool,
|
26
|
+
color: PropTypes.oneOf(options.colors),
|
27
|
+
size: PropTypes.oneOf(options.sizes),
|
28
|
+
weight: PropTypes.oneOf(options.weights),
|
29
|
+
}
|
30
|
+
|
31
|
+
Heading.defaultProps = {
|
32
|
+
color: 'base',
|
33
|
+
size: 'md',
|
34
|
+
weight: 'bold',
|
35
|
+
}
|
36
|
+
|
37
|
+
export default withStyles(styles)(Heading)
|
@@ -0,0 +1,66 @@
|
|
1
|
+
.heading {
|
2
|
+
width: 100%;
|
3
|
+
font-family: var(--font-family-sans);
|
4
|
+
line-height: var(--line-height-tight);
|
5
|
+
}
|
6
|
+
|
7
|
+
.color-base {
|
8
|
+
color: var(--color-font-base);
|
9
|
+
}
|
10
|
+
|
11
|
+
.color-inverted {
|
12
|
+
color: var(--color-primary-inverted);
|
13
|
+
}
|
14
|
+
|
15
|
+
.color-primary {
|
16
|
+
color: var(--color-primary);
|
17
|
+
}
|
18
|
+
|
19
|
+
.color-tertiary {
|
20
|
+
color: var(--color-tertiary);
|
21
|
+
}
|
22
|
+
|
23
|
+
.size-xs {
|
24
|
+
font-size: var(--font-size-xs);
|
25
|
+
}
|
26
|
+
|
27
|
+
.size-sm {
|
28
|
+
font-size: var(--font-size-sm);
|
29
|
+
}
|
30
|
+
|
31
|
+
.size-md {
|
32
|
+
font-size: var(--font-size-md);
|
33
|
+
}
|
34
|
+
|
35
|
+
.size-lg {
|
36
|
+
font-size: var(--font-size-lg);
|
37
|
+
}
|
38
|
+
|
39
|
+
.size-xl {
|
40
|
+
font-size: var(--font-size-xl);
|
41
|
+
}
|
42
|
+
|
43
|
+
.size-2xl {
|
44
|
+
font-size: var(--font-size-2xl);
|
45
|
+
}
|
46
|
+
|
47
|
+
.weight-light {
|
48
|
+
font-weight: var(--font-weight-light);
|
49
|
+
}
|
50
|
+
|
51
|
+
.weight-normal {
|
52
|
+
font-weight: var(--font-weight-normal);
|
53
|
+
}
|
54
|
+
|
55
|
+
.weight-bold {
|
56
|
+
font-weight: var(--font-weight-bold);
|
57
|
+
}
|
58
|
+
|
59
|
+
.is-centered {
|
60
|
+
text-align: center;
|
61
|
+
}
|
62
|
+
|
63
|
+
.is-inline {
|
64
|
+
display: inline-block;
|
65
|
+
max-width: max-content;
|
66
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Heading, styles, options } from '.'
|
2
|
+
import {
|
3
|
+
getTemplate,
|
4
|
+
getListTemplate,
|
5
|
+
getOptionsArgTypes,
|
6
|
+
} from '../../helpers/storybook'
|
7
|
+
|
8
|
+
const Template = getTemplate(Heading, styles)
|
9
|
+
const ListTemplate = getListTemplate(Heading, styles)
|
10
|
+
|
11
|
+
export default {
|
12
|
+
title: 'Atoms/Heading',
|
13
|
+
component: Heading,
|
14
|
+
args: {
|
15
|
+
children: 'Consent doubt Tuckborough challenge destroying.',
|
16
|
+
},
|
17
|
+
argTypes: {
|
18
|
+
color: getOptionsArgTypes(options.colors),
|
19
|
+
size: getOptionsArgTypes(options.sizes),
|
20
|
+
weight: getOptionsArgTypes(options.weights),
|
21
|
+
children: { control: 'text' },
|
22
|
+
},
|
23
|
+
}
|
24
|
+
|
25
|
+
export const Default = Template.bind({})
|
26
|
+
|
27
|
+
export const Inline = Template.bind({})
|
28
|
+
Inline.args = {
|
29
|
+
isInline: true,
|
30
|
+
}
|
31
|
+
|
32
|
+
export const Centered = Template.bind({})
|
33
|
+
Centered.args = {
|
34
|
+
isCentered: true,
|
35
|
+
children:
|
36
|
+
'Lose consequence night studies Wolves should wizards destruction burglar? All right, then. Keep your secrets.',
|
37
|
+
}
|
38
|
+
|
39
|
+
export const Colors = ListTemplate.bind({})
|
40
|
+
Colors.args = { items: options.colors.map((color) => ({ color })) }
|
41
|
+
|
42
|
+
export const Sizes = ListTemplate.bind({})
|
43
|
+
Sizes.args = { items: options.sizes.map((size) => ({ size })) }
|
44
|
+
|
45
|
+
export const Weights = ListTemplate.bind({})
|
46
|
+
Weights.args = { items: options.weights.map((weight) => ({ weight })) }
|
@@ -0,0 +1,189 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`Storyshots Atoms/Heading Centered 1`] = `
|
4
|
+
<div
|
5
|
+
style={
|
6
|
+
Object {
|
7
|
+
"alignContent": "flex-start",
|
8
|
+
"display": "flex",
|
9
|
+
"flexDirection": "column",
|
10
|
+
"flexWrap": "wrap",
|
11
|
+
"gap": "10px 30px",
|
12
|
+
"height": "100%",
|
13
|
+
"justifyContent": "flex-start",
|
14
|
+
"maxHeight": "auto",
|
15
|
+
}
|
16
|
+
}
|
17
|
+
>
|
18
|
+
<h1
|
19
|
+
className="heading color-base size-md weight-bold is-centered"
|
20
|
+
>
|
21
|
+
Lose consequence night studies Wolves should wizards destruction burglar? All right, then. Keep your secrets.
|
22
|
+
</h1>
|
23
|
+
</div>
|
24
|
+
`;
|
25
|
+
|
26
|
+
exports[`Storyshots Atoms/Heading Colors 1`] = `
|
27
|
+
<div
|
28
|
+
style={
|
29
|
+
Object {
|
30
|
+
"alignContent": "flex-start",
|
31
|
+
"display": "flex",
|
32
|
+
"flexDirection": "column",
|
33
|
+
"flexWrap": "wrap",
|
34
|
+
"gap": "10px 30px",
|
35
|
+
"height": "100%",
|
36
|
+
"justifyContent": "flex-start",
|
37
|
+
"maxHeight": "auto",
|
38
|
+
}
|
39
|
+
}
|
40
|
+
>
|
41
|
+
<h1
|
42
|
+
className="heading color-base size-md weight-bold"
|
43
|
+
>
|
44
|
+
Consent doubt Tuckborough challenge destroying.
|
45
|
+
</h1>
|
46
|
+
<h1
|
47
|
+
className="heading color-primary size-md weight-bold"
|
48
|
+
>
|
49
|
+
Consent doubt Tuckborough challenge destroying.
|
50
|
+
</h1>
|
51
|
+
<h1
|
52
|
+
className="heading color-tertiary size-md weight-bold"
|
53
|
+
>
|
54
|
+
Consent doubt Tuckborough challenge destroying.
|
55
|
+
</h1>
|
56
|
+
<h1
|
57
|
+
className="heading color-inverted size-md weight-bold"
|
58
|
+
>
|
59
|
+
Consent doubt Tuckborough challenge destroying.
|
60
|
+
</h1>
|
61
|
+
</div>
|
62
|
+
`;
|
63
|
+
|
64
|
+
exports[`Storyshots Atoms/Heading Default 1`] = `
|
65
|
+
<div
|
66
|
+
style={
|
67
|
+
Object {
|
68
|
+
"alignContent": "flex-start",
|
69
|
+
"display": "flex",
|
70
|
+
"flexDirection": "column",
|
71
|
+
"flexWrap": "wrap",
|
72
|
+
"gap": "10px 30px",
|
73
|
+
"height": "100%",
|
74
|
+
"justifyContent": "flex-start",
|
75
|
+
"maxHeight": "auto",
|
76
|
+
}
|
77
|
+
}
|
78
|
+
>
|
79
|
+
<h1
|
80
|
+
className="heading color-base size-md weight-bold"
|
81
|
+
>
|
82
|
+
Consent doubt Tuckborough challenge destroying.
|
83
|
+
</h1>
|
84
|
+
</div>
|
85
|
+
`;
|
86
|
+
|
87
|
+
exports[`Storyshots Atoms/Heading Inline 1`] = `
|
88
|
+
<div
|
89
|
+
style={
|
90
|
+
Object {
|
91
|
+
"alignContent": "flex-start",
|
92
|
+
"display": "flex",
|
93
|
+
"flexDirection": "column",
|
94
|
+
"flexWrap": "wrap",
|
95
|
+
"gap": "10px 30px",
|
96
|
+
"height": "100%",
|
97
|
+
"justifyContent": "flex-start",
|
98
|
+
"maxHeight": "auto",
|
99
|
+
}
|
100
|
+
}
|
101
|
+
>
|
102
|
+
<h1
|
103
|
+
className="heading color-base size-md weight-bold is-inline"
|
104
|
+
>
|
105
|
+
Consent doubt Tuckborough challenge destroying.
|
106
|
+
</h1>
|
107
|
+
</div>
|
108
|
+
`;
|
109
|
+
|
110
|
+
exports[`Storyshots Atoms/Heading Sizes 1`] = `
|
111
|
+
<div
|
112
|
+
style={
|
113
|
+
Object {
|
114
|
+
"alignContent": "flex-start",
|
115
|
+
"display": "flex",
|
116
|
+
"flexDirection": "column",
|
117
|
+
"flexWrap": "wrap",
|
118
|
+
"gap": "10px 30px",
|
119
|
+
"height": "100%",
|
120
|
+
"justifyContent": "flex-start",
|
121
|
+
"maxHeight": "auto",
|
122
|
+
}
|
123
|
+
}
|
124
|
+
>
|
125
|
+
<h1
|
126
|
+
className="heading color-base size-xs weight-bold"
|
127
|
+
>
|
128
|
+
Consent doubt Tuckborough challenge destroying.
|
129
|
+
</h1>
|
130
|
+
<h1
|
131
|
+
className="heading color-base size-sm weight-bold"
|
132
|
+
>
|
133
|
+
Consent doubt Tuckborough challenge destroying.
|
134
|
+
</h1>
|
135
|
+
<h1
|
136
|
+
className="heading color-base size-md weight-bold"
|
137
|
+
>
|
138
|
+
Consent doubt Tuckborough challenge destroying.
|
139
|
+
</h1>
|
140
|
+
<h1
|
141
|
+
className="heading color-base size-lg weight-bold"
|
142
|
+
>
|
143
|
+
Consent doubt Tuckborough challenge destroying.
|
144
|
+
</h1>
|
145
|
+
<h1
|
146
|
+
className="heading color-base size-xl weight-bold"
|
147
|
+
>
|
148
|
+
Consent doubt Tuckborough challenge destroying.
|
149
|
+
</h1>
|
150
|
+
<h1
|
151
|
+
className="heading color-base size-2xl weight-bold"
|
152
|
+
>
|
153
|
+
Consent doubt Tuckborough challenge destroying.
|
154
|
+
</h1>
|
155
|
+
</div>
|
156
|
+
`;
|
157
|
+
|
158
|
+
exports[`Storyshots Atoms/Heading Weights 1`] = `
|
159
|
+
<div
|
160
|
+
style={
|
161
|
+
Object {
|
162
|
+
"alignContent": "flex-start",
|
163
|
+
"display": "flex",
|
164
|
+
"flexDirection": "column",
|
165
|
+
"flexWrap": "wrap",
|
166
|
+
"gap": "10px 30px",
|
167
|
+
"height": "100%",
|
168
|
+
"justifyContent": "flex-start",
|
169
|
+
"maxHeight": "auto",
|
170
|
+
}
|
171
|
+
}
|
172
|
+
>
|
173
|
+
<h1
|
174
|
+
className="heading color-base size-md weight-light"
|
175
|
+
>
|
176
|
+
Consent doubt Tuckborough challenge destroying.
|
177
|
+
</h1>
|
178
|
+
<h1
|
179
|
+
className="heading color-base size-md weight-normal"
|
180
|
+
>
|
181
|
+
Consent doubt Tuckborough challenge destroying.
|
182
|
+
</h1>
|
183
|
+
<h1
|
184
|
+
className="heading color-base size-md weight-bold"
|
185
|
+
>
|
186
|
+
Consent doubt Tuckborough challenge destroying.
|
187
|
+
</h1>
|
188
|
+
</div>
|
189
|
+
`;
|