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,38 @@
|
|
1
|
+
.date-picker {
|
2
|
+
display: block;
|
3
|
+
}
|
4
|
+
|
5
|
+
.date-picker-input {
|
6
|
+
display: flex;
|
7
|
+
width: 70%;
|
8
|
+
}
|
9
|
+
|
10
|
+
.modalDatePickerRange {
|
11
|
+
display: flex;
|
12
|
+
position: absolute;
|
13
|
+
align-items: center;
|
14
|
+
justify-content: center;
|
15
|
+
width: 100%;
|
16
|
+
height: 100%;
|
17
|
+
top: 0;
|
18
|
+
left: 0;
|
19
|
+
background-color: rgb(0 0 0 / 60%);
|
20
|
+
z-index: 1;
|
21
|
+
}
|
22
|
+
|
23
|
+
.btnSave {
|
24
|
+
cursor: pointer;
|
25
|
+
width: 30px;
|
26
|
+
background-color: var(--color-tertiary-muted);
|
27
|
+
height: 420px;
|
28
|
+
align-items: center;
|
29
|
+
justify-content: center;
|
30
|
+
display: inline-flex;
|
31
|
+
height: inherit;
|
32
|
+
max-height: 383px;
|
33
|
+
height: 100%;
|
34
|
+
}
|
35
|
+
|
36
|
+
.btnSave:hover {
|
37
|
+
opacity: .8;
|
38
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { DatePicker, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(DatePicker, styles)
|
10
|
+
const ListTemplate = getListTemplate(DatePicker, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/DatePicker',
|
14
|
+
component: DatePicker,
|
15
|
+
args: {},
|
16
|
+
argTypes: {
|
17
|
+
isLayoutDate: getOptionsArgTypes(options.typeLayoutDate),
|
18
|
+
},
|
19
|
+
}
|
20
|
+
|
21
|
+
export const Default = Template.bind({})
|
22
|
+
// export const List = ListTemplate.bind({})
|
23
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -13,27 +13,30 @@ export const Dropdown = ({
|
|
13
13
|
value,
|
14
14
|
isInline,
|
15
15
|
onChange,
|
16
|
-
}) =>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
'
|
21
|
-
|
22
|
-
|
23
|
-
<Icon className="dropdown-icon" name="angleDown" background="highlight" />
|
24
|
-
<select
|
25
|
-
className={getStyles('dropdown-select')}
|
26
|
-
onChange={(event) => onChange(event?.currentTarget?.value)}
|
27
|
-
value={value}
|
16
|
+
}) => {
|
17
|
+
return (
|
18
|
+
<div
|
19
|
+
id={id}
|
20
|
+
className={getStyles('dropdown', {
|
21
|
+
'is-inline': isInline,
|
22
|
+
})}
|
28
23
|
>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
24
|
+
<Icon className="dropdown-icon" name="angleDown" background="transparent" />
|
25
|
+
<select
|
26
|
+
className={getStyles('dropdown-select')}
|
27
|
+
onChange={(event) => onChange(event?.currentTarget?.value)}
|
28
|
+
value={value}
|
29
|
+
>
|
30
|
+
{options.map(({ text, value }) => (
|
31
|
+
<option key={value} value={value}>
|
32
|
+
{text}
|
33
|
+
</option>
|
34
|
+
))}
|
35
|
+
</select>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
)
|
39
|
+
}
|
37
40
|
|
38
41
|
Dropdown.propTypes = {
|
39
42
|
onChange: PropTypes.func.isRequired,
|
@@ -52,8 +55,8 @@ Dropdown.propTypes = {
|
|
52
55
|
Dropdown.defaultProps = {
|
53
56
|
value: '',
|
54
57
|
isInline: false,
|
55
|
-
onChange: () => {},
|
56
|
-
getStyles: () => {},
|
58
|
+
onChange: () => { },
|
59
|
+
getStyles: () => { },
|
57
60
|
}
|
58
61
|
|
59
62
|
export default withStyles(styles)(Dropdown)
|
@@ -16,14 +16,32 @@
|
|
16
16
|
.dropdown-select {
|
17
17
|
width: 100%;
|
18
18
|
height: var(--input-height);
|
19
|
-
padding:
|
20
|
-
border: var(--border-width-thin) solid var(--color-
|
19
|
+
padding: 8px 30px 8px 20px;
|
20
|
+
border: var(--border-width-thin) solid var(--color-brand-white-lilac);
|
21
21
|
background: var(--input-background);
|
22
|
-
border-radius: var(--input-border-radius);
|
22
|
+
/* border-radius: var(--input-border-radius); */
|
23
23
|
color: var(--color-font-base);
|
24
|
+
font-family: var(--font-family-sans);
|
25
|
+
font-size: var(--input-font-base);
|
26
|
+
font-weight: var(--font-weight-medium);
|
27
|
+
line-height: var(--line-height-relaxed);
|
24
28
|
transition: box-shadow 0.2s ease;
|
29
|
+
-moz-appearance: none; /* Firefox */
|
30
|
+
-webkit-appearance: none; /* Safari and Chrome */
|
31
|
+
appearance: none;
|
25
32
|
}
|
26
33
|
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
/* padding: 12px 17px; */
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
27
45
|
.dropdown-select:focus {
|
28
46
|
box-shadow: 0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary);
|
29
47
|
outline: none;
|
@@ -0,0 +1,109 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Select from 'react-select'
|
3
|
+
import PropTypes from 'prop-types'
|
4
|
+
import styles from './DynamicSelect.module.css'
|
5
|
+
import withStyles from '../../hocs/withStyles'
|
6
|
+
|
7
|
+
|
8
|
+
export const DynamicSelect = ({ getStyles, optionsSelect, defaultValue, placeholder, isMulti, isClearable, isDisabled, isLoading, isRtl, isSearchable, isInline, onChange }) => {
|
9
|
+
|
10
|
+
|
11
|
+
const customStyles = {
|
12
|
+
|
13
|
+
option: (base, state) => ({
|
14
|
+
...base,
|
15
|
+
cursor: 'pointer',
|
16
|
+
height: '100%',
|
17
|
+
backgroundColor: state.isSelected ? 'var(--color-primary)' : 'transparent',
|
18
|
+
"&:hover": {
|
19
|
+
backgroundColor: "var(--color-primary-highlight)",
|
20
|
+
color: 'var(--color-primary)',
|
21
|
+
},
|
22
|
+
// "&:active": {
|
23
|
+
// backgroundColor: "var(--color-primary)"
|
24
|
+
// }
|
25
|
+
}),
|
26
|
+
control: (base, state) => ({
|
27
|
+
...base,
|
28
|
+
cursor: 'pointer',
|
29
|
+
width: '100%',
|
30
|
+
borderRadius: 0,
|
31
|
+
border: 'var(--border-width-thin) solid var(--color-brand-white-lilac)',
|
32
|
+
// border: state.isFocused ? "var(--border-width-thin) solid var(--color-brand-white-lilac)" : "var(--border-width-thin) solid var(--color-brand-white-lilac)",
|
33
|
+
boxShadow: state.isFocused ? "0 0 0 1px var(--color-primary), 0 0 10px 0 var(--color-primary)" : "none",
|
34
|
+
"&:hover": {
|
35
|
+
borderColor: "var(--color-primary)"
|
36
|
+
}
|
37
|
+
}),
|
38
|
+
input: (base) => ({
|
39
|
+
...base,
|
40
|
+
cursor: 'pointer',
|
41
|
+
margin: '2px',
|
42
|
+
paddingBottom: '2px',
|
43
|
+
paddingTop: '2px',
|
44
|
+
}),
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
// const handleChange = (value) => {
|
49
|
+
// console.group('Value Changed');
|
50
|
+
// console.log(value);
|
51
|
+
// // console.log(`action: ${actionMeta.action}`);
|
52
|
+
// console.groupEnd();
|
53
|
+
// };
|
54
|
+
|
55
|
+
return (
|
56
|
+
|
57
|
+
<div className={getStyles('dynamic-select', {
|
58
|
+
'is-inline': isInline,
|
59
|
+
})}>
|
60
|
+
<Select
|
61
|
+
name="basic"
|
62
|
+
// className="basic-single"
|
63
|
+
// classNamePrefix="select"
|
64
|
+
placeholder={placeholder}
|
65
|
+
styles={customStyles}
|
66
|
+
options={optionsSelect}
|
67
|
+
defaultValue={defaultValue}
|
68
|
+
isMulti={isMulti}
|
69
|
+
isClearable={isClearable}
|
70
|
+
isDisabled={isDisabled}
|
71
|
+
isLoading={isLoading}
|
72
|
+
isRtl={isRtl}
|
73
|
+
isSearchable={isSearchable}
|
74
|
+
onChange={onChange}
|
75
|
+
/>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
)
|
79
|
+
}
|
80
|
+
|
81
|
+
DynamicSelect.propTypes = {
|
82
|
+
getStyles: PropTypes.func.isRequired,
|
83
|
+
defaultValue: PropTypes.string,
|
84
|
+
placeholder: PropTypes.string,
|
85
|
+
isMulti: PropTypes.bool,
|
86
|
+
isClearable: PropTypes.bool,
|
87
|
+
isDisabled: PropTypes.bool,
|
88
|
+
isLoading: PropTypes.bool,
|
89
|
+
isRtl: PropTypes.bool,
|
90
|
+
isSearchable: PropTypes.bool,
|
91
|
+
isInline: PropTypes.bool,
|
92
|
+
onChange: PropTypes.func
|
93
|
+
}
|
94
|
+
|
95
|
+
DynamicSelect.defaultProps = {
|
96
|
+
getStyles: () => { },
|
97
|
+
defaultValue: '',
|
98
|
+
placeholder: 'seleccionar',
|
99
|
+
isMulti: false,
|
100
|
+
isClearable: true,
|
101
|
+
isDisabled: false,
|
102
|
+
isLoading: false,
|
103
|
+
isRtl: false,
|
104
|
+
isSearchable: false,
|
105
|
+
isInline: false,
|
106
|
+
onChange: () => { },
|
107
|
+
}
|
108
|
+
|
109
|
+
export default withStyles(styles)(DynamicSelect)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { DynamicSelect, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(DynamicSelect, styles)
|
10
|
+
const ListTemplate = getListTemplate(DynamicSelect, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/DynamicSelect',
|
14
|
+
component: DynamicSelect,
|
15
|
+
args: {
|
16
|
+
optionsSelect: options.optionsSelect,
|
17
|
+
defaultValue: '',
|
18
|
+
placeholder: 'seleccionar',
|
19
|
+
isMulti: false,
|
20
|
+
isClearable: true,
|
21
|
+
isDisabled: false,
|
22
|
+
isLoading: false,
|
23
|
+
isRtl: false,
|
24
|
+
isSearchable: false,
|
25
|
+
isInline: false,
|
26
|
+
},
|
27
|
+
argTypes: {
|
28
|
+
// types: getOptionsArgTypes(options.types),
|
29
|
+
},
|
30
|
+
}
|
31
|
+
|
32
|
+
export const Default = Template.bind({})
|
package/molecules/Error/Error.js
CHANGED
@@ -12,11 +12,11 @@ import Icon from '../../atoms/Icon'
|
|
12
12
|
export const Error = ({ title, children, getStyles }) => {
|
13
13
|
return (
|
14
14
|
<div className={getStyles('error')}>
|
15
|
-
<Icon className="icon-warning" name="warning" size="
|
15
|
+
<Icon className="icon-warning" name="warning" size="lg" />
|
16
16
|
<Spacer.Horizontal size="sm" />
|
17
17
|
<div>
|
18
18
|
{title && <Heading>{title}</Heading>}
|
19
|
-
<Paragraph>{children}</Paragraph>
|
19
|
+
<Paragraph size="sm">{children}</Paragraph>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
.error {
|
2
2
|
display: flex;
|
3
3
|
padding: 10px 20px;
|
4
|
-
border-top:
|
5
|
-
background: var(--color-red-
|
4
|
+
border-top: 2px solid var(--color-red-500);
|
5
|
+
background: var(--color-red-100);
|
6
6
|
color: var(--color-red-800);
|
7
|
+
border-radius: var(--border-radius-sm);
|
7
8
|
}
|
8
9
|
|
9
10
|
.error :global(.icon-warning) {
|
@@ -1,16 +1,14 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import PropTypes from 'prop-types'
|
3
|
+
import Link from 'next/link'
|
3
4
|
|
4
5
|
import styles from './ItemMenu.module.css'
|
5
6
|
import { options } from './constants'
|
6
7
|
import withStyles from '../../hocs/withStyles'
|
7
8
|
|
8
|
-
import { Link, Route, BrowserRouter } from 'react-router-dom'
|
9
|
-
|
10
9
|
import Icon from '../../atoms/Icon'
|
11
10
|
|
12
|
-
|
13
|
-
export const ItemMenu = ({ children, getStyles, size, icon, color, background, subMenu, itemSubmenu, toHref }) => {
|
11
|
+
export const ItemMenu = ({ children, getStyles, size, icon, color, background, subMenu, itemSubmenu, itemHref, itemActive }) => {
|
14
12
|
|
15
13
|
//create initial menuCollapse state using useState hook
|
16
14
|
const [subMenuCollapse, setSubMenuCollapse] = useState(false)
|
@@ -25,49 +23,50 @@ export const ItemMenu = ({ children, getStyles, size, icon, color, background, s
|
|
25
23
|
if (!subMenu) {
|
26
24
|
return (
|
27
25
|
<>
|
28
|
-
<
|
29
|
-
<
|
30
|
-
<li className={getStyles('pro-menu-item')}>
|
26
|
+
<Link href={itemHref} passHref>
|
27
|
+
<li className={getStyles('pro-menu-item', { 'active': itemActive })}>
|
31
28
|
|
32
|
-
|
29
|
+
<div className={getStyles('pro-inner-item')}>
|
33
30
|
|
34
|
-
|
31
|
+
<span className={getStyles('pro-icon-wrapper')}>
|
35
32
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
<span className={getStyles('pro-icon')}>
|
34
|
+
|
35
|
+
<Icon
|
36
|
+
size={size}
|
37
|
+
name={icon}
|
38
|
+
color={ itemActive ? 'primary' : color}
|
39
|
+
background={background}
|
40
|
+
onClick={function noRefCheck() { }}
|
41
|
+
/>
|
45
42
|
|
46
43
|
</span>
|
47
44
|
|
48
|
-
|
45
|
+
</span>
|
49
46
|
|
50
|
-
</
|
47
|
+
<span className={getStyles('pro-item-content', { 'color': color })}>{children}</span>
|
51
48
|
|
52
|
-
</
|
53
|
-
|
54
|
-
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</li>
|
52
|
+
</Link>
|
55
53
|
</>
|
56
54
|
)
|
57
55
|
} else {
|
58
56
|
return (
|
59
57
|
<>
|
60
|
-
<li className={getStyles('pro-menu-item', 'pro-sub-menu', { 'open': subMenuCollapse })} title="Home" href="/">
|
58
|
+
<li className={getStyles('pro-menu-item', 'pro-sub-menu', { 'open': subMenuCollapse }, { 'activesubtxt': itemActive })} title="Home" href="/">
|
61
59
|
|
62
60
|
<div className={getStyles('pro-inner-item')} onClick={subMenuIconClick}>
|
63
61
|
|
64
62
|
<span className={getStyles('pro-icon-wrapper')}>
|
65
63
|
|
66
64
|
<span className={getStyles('pro-icon')}>
|
65
|
+
|
67
66
|
<Icon
|
68
67
|
size={size}
|
69
68
|
name={icon}
|
70
|
-
color={color}
|
69
|
+
color={ itemActive ? 'primary' : color}
|
71
70
|
background={background}
|
72
71
|
onClick={function noRefCheck() { }}
|
73
72
|
/>
|
@@ -75,7 +74,7 @@ export const ItemMenu = ({ children, getStyles, size, icon, color, background, s
|
|
75
74
|
|
76
75
|
</span>
|
77
76
|
|
78
|
-
<span className={getStyles('pro-item-content', { 'color': color })}>{children}</span>
|
77
|
+
<span className={getStyles('pro-item-content', 'title', { 'color': color })}>{children}</span>
|
79
78
|
|
80
79
|
<span className={getStyles('pro-arrow-wrapper')}>
|
81
80
|
<span className={getStyles('pro-arrow')}></span>
|
@@ -88,10 +87,12 @@ export const ItemMenu = ({ children, getStyles, size, icon, color, background, s
|
|
88
87
|
<ul>
|
89
88
|
|
90
89
|
{itemSubmenu.map((item, index) => (
|
91
|
-
<
|
92
|
-
<
|
93
|
-
<
|
94
|
-
|
90
|
+
<Link key={index} href={item.href} passHref>
|
91
|
+
<li className={getStyles('pro-menu-item', { 'activesub': item.active })}>
|
92
|
+
<div className={getStyles('pro-inner-item')} role="button">
|
93
|
+
<span className={getStyles('pro-item-content')}>{item.text}</span></div>
|
94
|
+
</li>
|
95
|
+
</Link>
|
95
96
|
))}
|
96
97
|
</ul>
|
97
98
|
</div>
|
@@ -109,6 +110,7 @@ ItemMenu.propTypes = {
|
|
109
110
|
children: PropTypes.node.isRequired,
|
110
111
|
getStyles: PropTypes.func.isRequired,
|
111
112
|
subMenu: PropTypes.bool.isRequired,
|
113
|
+
itemActive: PropTypes.bool,
|
112
114
|
icon: PropTypes.oneOf(options.icons),
|
113
115
|
size: PropTypes.oneOf(options.sizes),
|
114
116
|
color: PropTypes.oneOf(options.colors),
|
@@ -117,11 +119,12 @@ ItemMenu.propTypes = {
|
|
117
119
|
|
118
120
|
ItemMenu.defaultProps = {
|
119
121
|
subMenu: false,
|
120
|
-
|
122
|
+
itemActive: false,
|
121
123
|
icon: 'home',
|
122
124
|
size: 'lg',
|
123
125
|
color: 'highlight',
|
124
126
|
background: 'transparent',
|
127
|
+
itemHref: '/',
|
125
128
|
getStyles: () => { },
|
126
129
|
}
|
127
130
|
|
@@ -89,14 +89,23 @@
|
|
89
89
|
color: var(--color-primary);
|
90
90
|
}
|
91
91
|
|
92
|
-
|
93
92
|
/* ////////////////////// */
|
94
93
|
|
94
|
+
.pro-menu-item.active .pro-item-content {
|
95
|
+
color: var(--color-primary);
|
96
|
+
}
|
95
97
|
|
96
|
-
.pro-menu-item.
|
97
|
-
color:
|
98
|
+
.pro-sub-menu .pro-menu-item.activesub .pro-item-content {
|
99
|
+
color: var(--color-primary);
|
98
100
|
}
|
99
101
|
|
102
|
+
.pro-menu-item.pro-sub-menu.activesubtxt .pro-inner-item .pro-item-content.title {
|
103
|
+
color: var(--color-primary);
|
104
|
+
/* font-size: 32px; */
|
105
|
+
}
|
106
|
+
|
107
|
+
/* ////////////////////// */
|
108
|
+
|
100
109
|
.pro-menu-item .suffix-wrapper {
|
101
110
|
opacity: 1;
|
102
111
|
transition: opacity 0.2s;
|
@@ -190,7 +199,7 @@
|
|
190
199
|
}
|
191
200
|
|
192
201
|
.pro-menu-item.pro-sub-menu .pro-inner-list-item .pro-inner-item {
|
193
|
-
padding:
|
202
|
+
padding: 10px 30px 10px 15px;
|
194
203
|
margin: 0;
|
195
204
|
}
|
196
205
|
|
@@ -18,16 +18,19 @@ export const options = {
|
|
18
18
|
text: "Taxi",
|
19
19
|
href: "/taxi",
|
20
20
|
view: true,
|
21
|
+
active: false,
|
21
22
|
},
|
22
23
|
{
|
23
24
|
text: "Parking",
|
24
25
|
href: "/parking",
|
25
26
|
view: true,
|
27
|
+
active: false,
|
26
28
|
},
|
27
29
|
{
|
28
30
|
text: "Sharing",
|
29
31
|
href: "/sharing",
|
30
32
|
view: true,
|
33
|
+
active: false,
|
31
34
|
},
|
32
35
|
],
|
33
36
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './RowTable.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
export const RowTable = ({ children, getStyles }) => {
|
9
|
+
return <div className={getStyles('row-table')}>{children}</div>
|
10
|
+
}
|
11
|
+
|
12
|
+
RowTable.propTypes = {
|
13
|
+
children: PropTypes.node.isRequired,
|
14
|
+
getStyles: PropTypes.func.isRequired,
|
15
|
+
type: PropTypes.oneOf(options.types),
|
16
|
+
}
|
17
|
+
|
18
|
+
RowTable.defaultProps = {
|
19
|
+
getStyles: () => {},
|
20
|
+
}
|
21
|
+
|
22
|
+
export default withStyles(styles)(RowTable)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { RowTable, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(RowTable, styles)
|
10
|
+
const ListTemplate = getListTemplate(RowTable, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/RowTable',
|
14
|
+
component: RowTable,
|
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: [] }
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "imbric-theme",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.4",
|
4
4
|
"description": "Components library IMBRIC",
|
5
5
|
"private": false,
|
6
6
|
"main": "index.js",
|
@@ -51,9 +51,18 @@
|
|
51
51
|
"license": "MIT",
|
52
52
|
"dependencies": {
|
53
53
|
"classnames": "2.3.1",
|
54
|
+
"formik": "2.2.9",
|
55
|
+
"moment": "2.29.3",
|
56
|
+
"moment-timezone": "0.5.34",
|
57
|
+
"react-date-range": "1.4.0",
|
54
58
|
"react-icons": "4.3.1",
|
59
|
+
"react-moment": "1.1.2",
|
55
60
|
"react-router": "6.3.0",
|
56
|
-
"react-router-dom": "6.3.0"
|
61
|
+
"react-router-dom": "6.3.0",
|
62
|
+
"react-select": "5.3.2",
|
63
|
+
"sweetalert2": "11.4.14",
|
64
|
+
"sweetalert2-react-content": "5.0.0",
|
65
|
+
"yup": "0.32.11"
|
57
66
|
},
|
58
67
|
"devDependencies": {
|
59
68
|
"@babel/core": "7.11.6",
|