imbric-theme 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- package/.storybook/main.js +1 -1
- package/atoms/AlertModal/AlertModal.js +77 -0
- package/atoms/AlertModal/AlertModal.module.css +3 -0
- package/atoms/AlertModal/AlertModal.stories.js +30 -0
- package/atoms/AlertModal/constants.js +4 -0
- package/atoms/AlertModal/index.js +3 -0
- package/atoms/Button/Button.js +5 -2
- package/atoms/Button/Button.module.css +6 -3
- package/atoms/Checkbox/Checkbox.js +49 -0
- package/atoms/Checkbox/Checkbox.module.css +3 -0
- package/atoms/Checkbox/Checkbox.stories.js +28 -0
- package/atoms/Checkbox/constants.js +1 -0
- package/atoms/Checkbox/index.js +3 -0
- package/atoms/Heading/Heading.js +1 -1
- package/atoms/Heading/Heading.module.css +4 -0
- package/atoms/Heading/constants.js +1 -1
- package/atoms/Icon/constants.js +30 -6
- package/atoms/Icon/file-download-svgrepo-com.svg +13 -0
- package/atoms/Input/Input.js +21 -5
- package/atoms/Input/Input.module.css +26 -6
- package/atoms/Input/Input.stories.js +8 -2
- package/atoms/Input/__snapshots__/Input.stories.js.snap +5 -5
- package/atoms/Input/constants.js +1 -1
- package/atoms/Label/Label.js +31 -0
- package/atoms/Label/Label.module.css +38 -0
- package/atoms/Label/Label.stories.js +26 -0
- package/atoms/Label/constants.js +1 -0
- package/atoms/Label/index.js +3 -0
- package/atoms/Paragraph/Paragraph.module.css +4 -0
- package/index.js +20 -1
- package/jest.config.js +1 -1
- package/layout/DynamicTable/DynamicTable.js +207 -0
- package/layout/DynamicTable/DynamicTable.module.css +62 -0
- package/layout/DynamicTable/DynamicTable.stories.js +30 -0
- package/layout/DynamicTable/constants.js +840 -0
- package/layout/DynamicTable/index.js +3 -0
- package/layout/Navbar/Navbar.js +19 -11
- package/layout/Navbar/Navbar.module.css +4 -2
- package/layout/Navbar/Navbar.stories.js +2 -1
- package/layout/Sidebar/Sidebar.js +5 -3
- package/layout/Sidebar/Sidebar.module.css +1 -10
- package/layout/Sidebar/Sidebar.stories.js +1 -1
- package/layout/Sidebar/constants.js +228 -205
- package/molecules/CheckList/CheckList.js +135 -0
- package/molecules/CheckList/CheckList.module.css +94 -0
- package/molecules/CheckList/CheckList.stories.js +25 -0
- package/molecules/CheckList/constants.js +23 -0
- package/molecules/CheckList/index.js +3 -0
- package/molecules/ColumnTable/ColumnTable.js +123 -0
- package/molecules/ColumnTable/ColumnTable.module.css +9 -0
- package/molecules/ColumnTable/ColumnTable.stories.js +29 -0
- package/molecules/ColumnTable/constants.js +1 -0
- package/molecules/ColumnTable/index.js +3 -0
- package/molecules/DatePicker/DatePicker.js +223 -0
- package/molecules/DatePicker/DatePicker.module.css +38 -0
- package/molecules/DatePicker/DatePicker.stories.js +23 -0
- package/molecules/DatePicker/constants.js +3 -0
- package/molecules/DatePicker/index.js +3 -0
- package/molecules/Dropdown/Dropdown.js +25 -22
- package/molecules/Dropdown/Dropdown.module.css +21 -3
- package/molecules/DynamicSelect/DynamicSelect.js +109 -0
- package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
- package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
- package/molecules/DynamicSelect/constants.js +7 -0
- package/molecules/DynamicSelect/index.js +3 -0
- package/molecules/Error/Error.js +2 -2
- package/molecules/Error/Error.module.css +3 -2
- package/molecules/ItemMenu/ItemMenu.js +34 -31
- package/molecules/ItemMenu/ItemMenu.module.css +13 -4
- package/molecules/ItemMenu/ItemMenu.stories.js +2 -1
- package/molecules/ItemMenu/constants.js +3 -0
- package/molecules/RowTable/RowTable.js +22 -0
- package/molecules/RowTable/RowTable.module.css +3 -0
- package/molecules/RowTable/RowTable.stories.js +23 -0
- package/molecules/RowTable/constants.js +1 -0
- package/molecules/RowTable/index.js +3 -0
- package/package.json +11 -2
- package/pages/Login/Login.js +102 -0
- package/pages/Login/Login.module.css +5 -0
- package/pages/Login/Login.stories.js +23 -0
- package/pages/Login/constants.js +1 -0
- package/pages/Login/index.js +3 -0
- package/pages/Login/validation/loginSchema.js +5 -0
- package/public/static/logologin.svg +16 -0
- package/scripts/create-component.js +2 -1
- package/storybook-static/0.263f852f.iframe.bundle.js +1 -0
- package/storybook-static/0.91dbd3f3aa2099d25061.manager.bundle.js +1 -0
- package/storybook-static/1.17e9ac7e.iframe.bundle.js +3 -0
- package/storybook-static/1.17e9ac7e.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/1.17e9ac7e.iframe.bundle.js.map +1 -0
- package/storybook-static/2.cc4000c2.iframe.bundle.js +1 -0
- package/storybook-static/3.e9f95d01.iframe.bundle.js +1 -0
- package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js +2 -0
- package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/5.8efdde123acaf8fbb100.manager.bundle.js +1 -0
- package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js +2 -0
- package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/7.97068037.iframe.bundle.js +1 -0
- package/storybook-static/7.fa9452d2609e8a00f314.manager.bundle.js +1 -0
- package/storybook-static/8.66f5ef1c66fc4628f127.manager.bundle.js +1 -0
- package/storybook-static/8.b545d602.iframe.bundle.js +3 -0
- package/storybook-static/8.b545d602.iframe.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/8.b545d602.iframe.bundle.js.map +1 -0
- package/storybook-static/9.269ed917.iframe.bundle.js +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +348 -0
- package/storybook-static/index.html +59 -0
- package/storybook-static/main.157061c9.iframe.bundle.js +1 -0
- package/storybook-static/main.5a07347846ccf2d7e5dc.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.a14e6e62.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.f78c3fae275fc212c109.manager.bundle.js +1 -0
- package/storybook-static/static/logo.svg +19 -0
- package/storybook-static/static/logologin.svg +16 -0
- package/storybook-static/static/logotipo.svg +50 -0
- package/storybook-static/static/logotipoS.svg +26 -0
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js +3 -0
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.LICENSE.txt +110 -0
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js +2 -0
- package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js.LICENSE.txt +101 -0
- package/styles/globals.css +590 -3
- package/styles/tokens.css +2 -1
- package/tokens/index.js +2 -1
@@ -0,0 +1,102 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Login.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
import Picture from '../../atoms/Picture'
|
8
|
+
import Divider from '../../atoms/Divider'
|
9
|
+
import Button from '../../atoms/Button'
|
10
|
+
import Input from '../../atoms/Input'
|
11
|
+
import Label from '../../atoms/Label'
|
12
|
+
import Spacer from '../../layout/Spacer'
|
13
|
+
import CenteredContent from '../../layout/CenteredContent'
|
14
|
+
import { loginSchema } from './validation/loginSchema'
|
15
|
+
|
16
|
+
|
17
|
+
export const Login = ({ children, getStyles }) => {
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
// const [formValues, setFormValues] = useState({})
|
22
|
+
|
23
|
+
// const onChange = (key) => (event) => {
|
24
|
+
// const { value } = event.target
|
25
|
+
// setFormValues({ ...formValues, [key]: value })
|
26
|
+
// }
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
return (
|
31
|
+
|
32
|
+
<div className={getStyles('login')}>
|
33
|
+
|
34
|
+
<CenteredContent >
|
35
|
+
|
36
|
+
<Picture
|
37
|
+
src="./static/logologin.svg"
|
38
|
+
width={170}
|
39
|
+
/>
|
40
|
+
|
41
|
+
<Spacer.Vertical size="md" />
|
42
|
+
<Divider color="highlight" />
|
43
|
+
<Spacer.Vertical size="md" />
|
44
|
+
|
45
|
+
<form id='loginform' onSubmit={handleSubmit}>
|
46
|
+
|
47
|
+
<Label >Email</Label>
|
48
|
+
|
49
|
+
<Input
|
50
|
+
id='email'
|
51
|
+
// value={formValues.email}
|
52
|
+
type="text"
|
53
|
+
name='email'
|
54
|
+
// onChange={formik.handleChange}
|
55
|
+
placeholder="Introduce tu email"
|
56
|
+
/>
|
57
|
+
|
58
|
+
{/* <Label color="muted" isHint> {formik.errors.email}</Label> */}
|
59
|
+
|
60
|
+
<Spacer.Vertical size="md" />
|
61
|
+
|
62
|
+
<Label >Contraseña</Label>
|
63
|
+
|
64
|
+
<Input
|
65
|
+
id='password'
|
66
|
+
// value={formValues.password}
|
67
|
+
type="password"
|
68
|
+
name='password'
|
69
|
+
// onChange={formik.handleChange}
|
70
|
+
placeholder="Introduce tu contraseña"
|
71
|
+
/>
|
72
|
+
|
73
|
+
{/* <Label color="muted" isHint> {formik.errors.password}</Label> */}
|
74
|
+
|
75
|
+
<Spacer.Vertical size="md" />
|
76
|
+
|
77
|
+
{/* <Button type='primary' isMuted={!(formik.isValid && formik.dirty)}> Acceder </Button> */}
|
78
|
+
|
79
|
+
</form>
|
80
|
+
|
81
|
+
{children}
|
82
|
+
|
83
|
+
</CenteredContent>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
)
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
}
|
91
|
+
|
92
|
+
Login.propTypes = {
|
93
|
+
children: PropTypes.node,
|
94
|
+
getStyles: PropTypes.func.isRequired,
|
95
|
+
// type: PropTypes.oneOf(options.types),
|
96
|
+
}
|
97
|
+
|
98
|
+
Login.defaultProps = {
|
99
|
+
getStyles: () => { },
|
100
|
+
}
|
101
|
+
|
102
|
+
export default withStyles(styles)(Login)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Login, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(Login, styles)
|
10
|
+
const ListTemplate = getListTemplate(Login, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Pages/Login',
|
14
|
+
component: Login,
|
15
|
+
args: {},
|
16
|
+
argTypes: {
|
17
|
+
// types: getOptionsArgTypes(options.types),
|
18
|
+
},
|
19
|
+
}
|
20
|
+
|
21
|
+
export const Default = Template.bind({})
|
22
|
+
// export const List = ListTemplate.bind({})
|
23
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1 @@
|
|
1
|
+
export const options = { types: [] }
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="170px" height="42px" viewBox="0 0 170 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<title>logotipo</title>
|
4
|
+
<defs>
|
5
|
+
<linearGradient x1="0%" y1="50.0030427%" x2="100%" y2="50.0030427%" id="linearGradient-1">
|
6
|
+
<stop stop-color="#ED495E" offset="0%"></stop>
|
7
|
+
<stop stop-color="#39B54A" offset="52.6050465%"></stop>
|
8
|
+
<stop stop-color="#00A3FF" offset="100%"></stop>
|
9
|
+
</linearGradient>
|
10
|
+
</defs>
|
11
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
12
|
+
<g id="fullcolor_positivo" transform="translate(-70.000000, -46.000000)" fill="url(#linearGradient-1)">
|
13
|
+
<path d="M175.713077,67.7540277 L175.713077,87.0631181 L182.139472,87.0631181 L182.139472,67.7540277 C182.139472,64.9417213 184.426502,62.6529572 187.239242,62.6529572 L206.049494,62.6529572 L206.049494,56.725834 L186.73997,56.725834 C180.650323,56.725834 175.713077,61.6630808 175.713077,67.7540277 L175.713077,67.7540277 Z M199.623532,87.0631181 L206.049494,87.0631181 L206.049494,65.4973349 L199.623532,65.4973349 L199.623532,87.0631181 Z M224.479224,62.6529572 L240,62.6529572 L240,56.725834 L223.979952,56.725834 C217.889872,56.725834 212.952191,61.6630808 212.952191,67.7540277 L212.952191,76.0349244 C212.952191,82.1258712 217.889872,87.0631181 223.979952,87.0631181 L240,87.0631181 L240,81.1355615 L224.479224,81.1355615 C221.666051,81.1355615 219.378587,78.8472308 219.378587,76.0349244 L219.378587,67.7540277 C219.378587,64.9417213 221.666051,62.6529572 224.479224,62.6529572 L224.479224,62.6529572 Z M158.104632,56.725834 L147.764238,56.725834 C144.951498,56.725834 142.663167,54.4379367 142.663167,51.6260637 L142.663167,46.5718 L136.237639,46.5718 L136.237639,51.6260637 C136.237639,57.7157104 141.175319,62.6529572 147.264966,62.6529572 L157.606227,62.6529572 C160.418966,62.6529572 162.705997,64.9417213 162.705997,67.7540277 L162.705997,76.0349244 C162.705997,78.8472308 160.418966,81.1355615 157.606227,81.1355615 L146.015052,81.1355615 L146.015052,87.0631181 L158.104632,87.0631181 C164.195579,87.0631181 169.132392,82.1258712 169.132392,76.0349244 L169.132392,67.7540277 C169.132392,61.6630808 164.195579,56.725834 158.104632,56.725834 L158.104632,56.725834 Z M199.623532,53.8823231 L206.049494,53.8823231 L206.049494,46.5718 L199.623532,46.5718 L199.623532,53.8823231 Z M84.2140874,87.0631181 L90.639616,87.0631181 L90.639616,65.4973349 L84.2140874,65.4973349 L84.2140874,87.0631181 Z M136.237639,60.0278779 L136.237639,87.0631181 L142.663167,87.0631181 L142.663167,64.7107213 C140.090962,63.8018899 137.86374,62.1575856 136.237639,60.0278779 L136.237639,60.0278779 Z M70,53.8823231 L76.4263953,53.8823231 L76.4263953,46.5718 L70,46.5718 L70,53.8823231 Z M70,87.0631181 L76.4263953,87.0631181 L76.4263953,56.725834 L70,56.725834 L70,87.0631181 Z M98.7714244,56.725834 L84.2140874,56.725834 L84.2140874,62.6529572 L98.2725857,62.6529572 C101.084459,62.6529572 103.371923,64.9417213 103.371923,67.7540277 L103.371923,87.0631181 L109.798318,87.0631181 L109.798318,67.7540277 C109.798318,61.6630808 104.861504,56.725834 98.7714244,56.725834 L98.7714244,56.725834 Z M117.930126,56.725834 L107.173672,56.725834 C109.163393,58.2457537 110.730119,60.291816 111.667555,62.6529572 L117.430854,62.6529572 C120.244027,62.6529572 122.531925,64.9417213 122.531925,67.7540277 L122.531925,87.0631181 L128.957453,87.0631181 L128.957453,67.7540277 C128.957453,61.6630808 124.02064,56.725834 117.930126,56.725834 L117.930126,56.725834 Z" id="logotipo"></path>
|
14
|
+
</g>
|
15
|
+
</g>
|
16
|
+
</svg>
|
@@ -10,6 +10,7 @@ const ATOMIC_DESIGN_TYPES = {
|
|
10
10
|
atom: 'atoms',
|
11
11
|
molecule: 'molecules',
|
12
12
|
layout: 'layout',
|
13
|
+
pages: 'pages',
|
13
14
|
}
|
14
15
|
const COMPONENT_TEMPLATE_PATH = 'templates/component'
|
15
16
|
|
@@ -88,7 +89,7 @@ async function getPromptParams() {
|
|
88
89
|
type: 'select',
|
89
90
|
name: 'type',
|
90
91
|
message: 'What kind of component would you like to create?',
|
91
|
-
choices: ['atom', 'molecule', 'layout'],
|
92
|
+
choices: ['atom', 'molecule', 'layout', 'pages'],
|
92
93
|
initial: 'atom',
|
93
94
|
})
|
94
95
|
|