imbric-theme 0.2.9 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/atoms/Button/Button.stories.js +1 -1
- package/atoms/Button/__snapshots__/Button.stories.js.snap +8 -8
- package/atoms/Heading/Heading.stories.js +2 -2
- package/atoms/Heading/__snapshots__/Heading.stories.js.snap +16 -16
- package/atoms/Paragraph/Paragraph.stories.js +2 -2
- package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +16 -16
- package/atoms/Tab/Tab.js +41 -0
- package/atoms/Tab/Tab.module.css +17 -0
- package/atoms/Tab/Tab.stories.js +27 -0
- package/atoms/Tab/constants.js +1 -0
- package/atoms/Tab/index.js +3 -0
- package/index.js +5 -0
- package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
- package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
- package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
- package/layout/FlexColumnContent/constants.js +1 -0
- package/layout/FlexColumnContent/index.js +3 -0
- package/layout/Navbar/Navbar.js +55 -10
- package/layout/Navbar/Navbar.module.css +3 -2
- package/layout/Navbar/Navbar.stories.js +1 -4
- package/layout/Sidebar/Sidebar.js +17 -79
- package/layout/Sidebar/Sidebar.module.css +42 -6
- package/layout/Sidebar/Sidebar.stories.js +3 -2
- package/layout/Sidebar/constants.js +14 -26
- package/layout/Sidebar/index.js +1 -2
- package/molecules/ItemMenu/ItemMenu.js +2 -2
- package/molecules/ItemMenu/ItemMenu.module.css +1 -25
- package/molecules/Tabs/Tabs.js +53 -0
- package/molecules/Tabs/Tabs.module.css +12 -0
- package/molecules/Tabs/Tabs.stories.js +34 -0
- package/molecules/Tabs/constants.js +29 -0
- package/molecules/Tabs/index.js +3 -0
- package/package.json +4 -2
- package/layout/Sidebar/Sidebar.css +0 -90
- package/storybook-static/0.89e7d77f4d365594e982.manager.bundle.js +0 -1
- package/storybook-static/0.e189f835.iframe.bundle.js +0 -3
- package/storybook-static/0.e189f835.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.e189f835.iframe.bundle.js.map +0 -1
- package/storybook-static/1.45d0d6aa.iframe.bundle.js +0 -3
- package/storybook-static/1.45d0d6aa.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.45d0d6aa.iframe.bundle.js.map +0 -1
- package/storybook-static/2.75691da5.iframe.bundle.js +0 -1
- package/storybook-static/3.08d15cf4.iframe.bundle.js +0 -1
- package/storybook-static/4.cbd8fb943995f84e5583.manager.bundle.js +0 -2
- package/storybook-static/4.cbd8fb943995f84e5583.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/5.d02ab9a798461caeb506.manager.bundle.js +0 -1
- package/storybook-static/6.4deac86378225189a26c.manager.bundle.js +0 -2
- package/storybook-static/6.4deac86378225189a26c.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/7.20dbe97831bee4cf4ce4.manager.bundle.js +0 -1
- package/storybook-static/7.53d57a3d.iframe.bundle.js +0 -1
- package/storybook-static/8.33a6bfc3865ab87fcc57.manager.bundle.js +0 -1
- package/storybook-static/8.9b339902.iframe.bundle.js +0 -3
- package/storybook-static/8.9b339902.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/8.9b339902.iframe.bundle.js.map +0 -1
- package/storybook-static/9.f9389e45.iframe.bundle.js +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -348
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.45162e1b.iframe.bundle.js +0 -1
- package/storybook-static/main.e8773e46a6d316c46694.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.9b3271f5.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.d0af9adf44459dbc718a.manager.bundle.js +0 -1
- package/storybook-static/static/logo.svg +0 -19
- package/storybook-static/static/logotipo.svg +0 -50
- package/storybook-static/static/logotipoS.svg +0 -26
- package/storybook-static/vendors~main.02332eca.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.02332eca.iframe.bundle.js.LICENSE.txt +0 -107
- package/storybook-static/vendors~main.02332eca.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.29dce51cb06d0354d6c9.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.29dce51cb06d0354d6c9.manager.bundle.js.LICENSE.txt +0 -101
@@ -12,16 +12,17 @@
|
|
12
12
|
background-color: #FFFFFF;
|
13
13
|
box-shadow: 0px 1px 4px rgb(100 116 139 / 12%);
|
14
14
|
width: calc(100%);
|
15
|
+
padding-left: 18px;
|
15
16
|
}
|
16
17
|
|
17
18
|
.navbar__title {
|
18
19
|
margin-right: auto;
|
19
20
|
font-size: 150%;
|
20
|
-
padding:
|
21
|
+
padding: 0.67em 1.5em;
|
21
22
|
}
|
22
23
|
|
23
24
|
.navbar__item {
|
24
|
-
padding:
|
25
|
+
padding: 0.67em 1.5em;
|
25
26
|
cursor: pointer;
|
26
27
|
vertical-align: middle;
|
27
28
|
}
|
@@ -9,10 +9,7 @@ export default {
|
|
9
9
|
component: Navbar,
|
10
10
|
args: {
|
11
11
|
isPlayground: true,
|
12
|
-
children:
|
13
|
-
Brave dry defeats? Remembered unleashed Denethor niceties legacy. Streets cares pretty Brandybucks ostler. Intact dispatch their expenses suffered flaming bacon should Fili? Jacksie begins hallway needed tracked Gondor's wonderful popularity. Seemed ears perfectly Oakenshield's pale fall animals stabs betrayed grumbling? Stuff awake Brandybuck large done. Curse you and all the halflings!
|
14
|
-
Dared sit torment goes Anárion forgiven west. Summon Bucklebury ship. Terms none Farthings. Tea choose Dwarvish! Leagues gracious carpet payment Brandywine senses very thousand! Don't you leave him, Samwise Gamgee. Firestorm raising Shire reaction mud morninged shines death should! It'll Halflings nab pot drove start. Carpet Lasgalen seen sleepies!
|
15
|
-
Seeing renown knocked battered contend World shepherd. Roof sautéed kingdom agree curtain lived preparing down material Galion appearance! Faramir one-fourteenth study talked amongst fisherman barren recoil responsible. There is one Dwarf yet in Moria who still draws breath. Boats wait exaggerate guessed Muil usurper suffice. Unspoken swears stands serpent depart Mithril. Ugly threat Dwarf possessions yours homage long-term unmade. Well-earned suffice tapestry tongue piled smoke lacerations talisman helps Dragon-Slayer crown? Blanket shan't dare appearances hours grave Muil.`,
|
12
|
+
children: 'Taksee',
|
16
13
|
},
|
17
14
|
argTypes: {
|
18
15
|
children: { control: 'text' },
|
@@ -2,86 +2,22 @@ import React, { ReactNode, useRef, useState, useEffect } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
3
3
|
import withStyles from '../../hocs/withStyles'
|
4
4
|
|
5
|
-
import {
|
6
|
-
|
7
|
-
//import react pro sidebar components
|
8
|
-
// import {
|
9
|
-
// ProSidebar,
|
10
|
-
// Menu,
|
11
|
-
// MenuItem,
|
12
|
-
// SubMenu,
|
13
|
-
// SidebarHeader,
|
14
|
-
// SidebarFooter,
|
15
|
-
// SidebarContent,
|
16
|
-
// } from "react-pro-sidebar"
|
5
|
+
import { options } from './constants'
|
17
6
|
|
18
7
|
import styles from './Sidebar.module.css'
|
19
|
-
//import sidebar css from react-pro-sidebar module and our custom css
|
20
|
-
// import "react-pro-sidebar/dist/css/styles.css"
|
21
8
|
|
22
9
|
import Picture from '../../atoms/Picture'
|
23
10
|
import Icon from '../../atoms/Icon'
|
24
11
|
import Divider from '../../atoms/Divider'
|
25
12
|
import ItemMenu from '../../molecules/ItemMenu/ItemMenu'
|
26
13
|
|
27
|
-
const
|
28
|
-
|
29
|
-
href: '/',
|
30
|
-
icon: 'home',
|
31
|
-
title: 'Dashboard'
|
32
|
-
},
|
33
|
-
{
|
34
|
-
href: '/customers',
|
35
|
-
icon: 'home',
|
36
|
-
title: 'Customers'
|
37
|
-
},
|
38
|
-
{
|
39
|
-
href: '/products',
|
40
|
-
icon: 'home',
|
41
|
-
title: 'Products'
|
42
|
-
},
|
43
|
-
{
|
44
|
-
href: '/account',
|
45
|
-
icon: 'home',
|
46
|
-
title: 'Account'
|
47
|
-
},
|
48
|
-
{
|
49
|
-
href: '/settings',
|
50
|
-
icon: 'home',
|
51
|
-
title: 'Settings'
|
52
|
-
},
|
53
|
-
{
|
54
|
-
href: '/login',
|
55
|
-
icon: 'home',
|
56
|
-
title: 'Login'
|
57
|
-
},
|
58
|
-
{
|
59
|
-
href: '/register',
|
60
|
-
icon: 'home',
|
61
|
-
title: 'Register'
|
62
|
-
},
|
63
|
-
{
|
64
|
-
href: '/404',
|
65
|
-
icon: 'home',
|
66
|
-
title: 'Error'
|
67
|
-
}
|
68
|
-
];
|
69
|
-
|
70
|
-
export const Sidebar = ({ getStyles }) => {
|
71
|
-
|
72
|
-
//create initial menuCollapse state using useState hook
|
73
|
-
const [menuCollapse, setMenuCollapse] = useState(false)
|
74
|
-
|
75
|
-
//create a custom function that will change menucollapse state from false to true and true to false
|
76
|
-
const menuIconClick = () => {
|
77
|
-
//condition checking to change state from true to false and vice versa
|
78
|
-
menuCollapse ? setMenuCollapse(false) : setMenuCollapse(true);
|
79
|
-
};
|
14
|
+
export const Sidebar = ({ getStyles, menuCollapseView }) => {
|
15
|
+
|
80
16
|
|
81
17
|
return (
|
82
18
|
<>
|
83
19
|
<div className={getStyles('header', {
|
84
|
-
'collapsed':
|
20
|
+
'collapsed': menuCollapseView,
|
85
21
|
})}>
|
86
22
|
|
87
23
|
<div className={getStyles('pro-sidebar')}>
|
@@ -93,25 +29,25 @@ export const Sidebar = ({ getStyles }) => {
|
|
93
29
|
<div className={getStyles('pro-sidebar-header')}>
|
94
30
|
|
95
31
|
<div className={getStyles('logotext')}>
|
96
|
-
{/* small and big change using
|
97
|
-
{
|
32
|
+
{/* small and big change using menuCollapseView state */}
|
33
|
+
{menuCollapseView ? <Picture src="/static/logotipoS.svg" width={19}></Picture> : <Picture src="/static/logotipo.svg" width={100}></Picture>}
|
98
34
|
</div>
|
99
|
-
<div className={getStyles('closemenu')}
|
100
|
-
|
101
|
-
{
|
35
|
+
{/* <div className={getStyles('closemenu')}>
|
36
|
+
|
37
|
+
{menuCollapseView ? (
|
102
38
|
|
103
39
|
<Icon
|
104
40
|
name="angleRight"
|
105
|
-
onClick={
|
41
|
+
onClick={menuIconClick}
|
106
42
|
/>
|
107
43
|
|
108
44
|
) : (
|
109
45
|
<Icon
|
110
46
|
name="angleLeft"
|
111
|
-
onClick={
|
47
|
+
onClick={menuIconClick}
|
112
48
|
/>
|
113
49
|
)}
|
114
|
-
</div>
|
50
|
+
</div> */}
|
115
51
|
|
116
52
|
</div>
|
117
53
|
|
@@ -121,17 +57,18 @@ export const Sidebar = ({ getStyles }) => {
|
|
121
57
|
|
122
58
|
<ul>
|
123
59
|
|
124
|
-
{options.itemsMenu.map((item) => (
|
60
|
+
{options.itemsMenu.map((item, index) => (
|
125
61
|
item.view ?
|
126
62
|
<ItemMenu
|
63
|
+
key={index}
|
127
64
|
icon={item.icon}
|
128
|
-
subMenu={item.
|
65
|
+
subMenu={item.viewSubMenu}
|
129
66
|
itemSubmenu={item.submenu}
|
130
67
|
>
|
131
68
|
{item.text}
|
132
69
|
</ItemMenu>
|
133
70
|
: null
|
134
|
-
|
71
|
+
|
135
72
|
))}
|
136
73
|
|
137
74
|
</ul>
|
@@ -163,6 +100,7 @@ Sidebar.propTypes = {
|
|
163
100
|
|
164
101
|
Sidebar.defaultProps = {
|
165
102
|
getStyles: () => { },
|
103
|
+
menuCollapseView: false,
|
166
104
|
}
|
167
105
|
|
168
106
|
export default withStyles(styles)(Sidebar)
|
@@ -34,8 +34,9 @@
|
|
34
34
|
}
|
35
35
|
|
36
36
|
.header {
|
37
|
-
position: absolute;
|
38
37
|
width: 220px;
|
38
|
+
/* position: fixed;
|
39
|
+
padding-top: 43px; */
|
39
40
|
}
|
40
41
|
|
41
42
|
.pro-sidebar {
|
@@ -67,7 +68,7 @@
|
|
67
68
|
}
|
68
69
|
|
69
70
|
.logotext {
|
70
|
-
padding:
|
71
|
+
padding: 13px 20px;
|
71
72
|
}
|
72
73
|
|
73
74
|
.closemenu {
|
@@ -79,7 +80,7 @@
|
|
79
80
|
border-radius: 50%;
|
80
81
|
font-weight: bold;
|
81
82
|
font-size: 22px;
|
82
|
-
top:
|
83
|
+
top: 4px;
|
83
84
|
cursor: pointer;
|
84
85
|
}
|
85
86
|
|
@@ -93,6 +94,7 @@
|
|
93
94
|
|
94
95
|
.pro-sidebar-content {
|
95
96
|
flex-grow: 1;
|
97
|
+
margin-top: 38px;
|
96
98
|
}
|
97
99
|
|
98
100
|
.pro-sidebar-inner .pro-sidebar-layout ul {
|
@@ -107,11 +109,11 @@
|
|
107
109
|
padding: 20px;
|
108
110
|
}
|
109
111
|
|
110
|
-
@media only screen and (max-width: 720px) {
|
112
|
+
/* @media only screen and (max-width: 720px) {
|
111
113
|
html {
|
112
114
|
overflow: hidden;
|
113
115
|
}
|
114
|
-
}
|
116
|
+
} */
|
115
117
|
|
116
118
|
/* /////////// */
|
117
119
|
|
@@ -125,8 +127,12 @@
|
|
125
127
|
z-index: 101;
|
126
128
|
}
|
127
129
|
|
128
|
-
.pro-sidebar
|
130
|
+
.pro-sidebar-header {
|
129
131
|
border-bottom: 1px solid rgba(173, 173, 173, 0.2);
|
132
|
+
position: fixed;
|
133
|
+
background-color: #fff;
|
134
|
+
width: 220px;
|
135
|
+
z-index: 1;
|
130
136
|
}
|
131
137
|
|
132
138
|
.pro-sidebar>.pro-sidebar-inner>.pro-sidebar-layout .pro-sidebar-footer {
|
@@ -150,11 +156,41 @@
|
|
150
156
|
display: none;
|
151
157
|
}
|
152
158
|
|
159
|
+
.header.collapsed>.pro-sidebar>.pro-sidebar-inner>.pro-sidebar-layout >.pro-sidebar-header {
|
160
|
+
width: 80px;
|
161
|
+
min-width: 80px;
|
162
|
+
}
|
163
|
+
|
153
164
|
.pro-sidebar.collapsed {
|
154
165
|
width: 80px;
|
155
166
|
min-width: 80px;
|
156
167
|
}
|
157
168
|
|
169
|
+
|
170
|
+
.pro-menu {
|
171
|
+
padding-top: 10px;
|
172
|
+
padding-bottom: 40px;
|
173
|
+
}
|
174
|
+
|
175
|
+
.pro-menu a {
|
176
|
+
text-decoration: none;
|
177
|
+
color: #adadad;
|
178
|
+
}
|
179
|
+
|
180
|
+
.pro-menu a:before {
|
181
|
+
content: '';
|
182
|
+
position: absolute;
|
183
|
+
top: 0;
|
184
|
+
right: 0;
|
185
|
+
bottom: 0;
|
186
|
+
left: 0;
|
187
|
+
background-color: transparent;
|
188
|
+
}
|
189
|
+
|
190
|
+
.pro-menu a:hover {
|
191
|
+
color: #d8d8d8;
|
192
|
+
}
|
193
|
+
|
158
194
|
@media (max-width: 480px) {
|
159
195
|
.pro-sidebar.xs {
|
160
196
|
position: fixed;
|
@@ -9,7 +9,8 @@ export default {
|
|
9
9
|
title: 'Layout/Sidebar',
|
10
10
|
component: Sidebar,
|
11
11
|
args: {
|
12
|
-
options: options.itemsMenu
|
12
|
+
options: options.itemsMenu,
|
13
|
+
menuCollapseView: false,
|
13
14
|
},
|
14
15
|
argTypes: {
|
15
16
|
options: {
|
@@ -17,7 +18,7 @@ export default {
|
|
17
18
|
table: {
|
18
19
|
type: {
|
19
20
|
summary: 'object',
|
20
|
-
detail: "{ text: 'string', view: 'bool'}",
|
21
|
+
detail: "{ text: 'string', icon: 'string', href: 'string', view: 'bool', viewSubMenu: 'bool'}",
|
21
22
|
},
|
22
23
|
},
|
23
24
|
},
|
@@ -1,22 +1,3 @@
|
|
1
|
-
export const subItems = {
|
2
|
-
|
3
|
-
subItemsLegal: [
|
4
|
-
{
|
5
|
-
href: 'https://www.imbric.com/privacypolicy/',
|
6
|
-
title: 'Privacy policy',
|
7
|
-
},
|
8
|
-
{
|
9
|
-
href: 'https://www.imbric.com/general-terms/',
|
10
|
-
title: 'General terms',
|
11
|
-
},
|
12
|
-
{
|
13
|
-
href: 'https://www.imbric.com/particular-terms/',
|
14
|
-
title: 'Particular terms',
|
15
|
-
},
|
16
|
-
],
|
17
|
-
|
18
|
-
}
|
19
|
-
|
20
1
|
export const options = {
|
21
2
|
itemsMenu: [
|
22
3
|
{
|
@@ -24,12 +5,14 @@ export const options = {
|
|
24
5
|
icon: "home",
|
25
6
|
href: "/home",
|
26
7
|
view: true,
|
8
|
+
viewSubMenu: false,
|
27
9
|
},
|
28
10
|
{
|
29
11
|
text: "Activity",
|
30
12
|
icon: "activity",
|
31
13
|
href: "/home",
|
32
14
|
view: true,
|
15
|
+
viewSubMenu: true,
|
33
16
|
submenu: [
|
34
17
|
{
|
35
18
|
text: "Taxi",
|
@@ -63,6 +46,7 @@ export const options = {
|
|
63
46
|
icon: "staff",
|
64
47
|
href: "/home",
|
65
48
|
view: true,
|
49
|
+
viewSubMenu: true,
|
66
50
|
submenu: [
|
67
51
|
{
|
68
52
|
text: "People Add",
|
@@ -87,20 +71,21 @@ export const options = {
|
|
87
71
|
icon: "travelPrograms",
|
88
72
|
href: "/home",
|
89
73
|
view: true,
|
90
|
-
|
74
|
+
viewSubMenu: false,
|
91
75
|
},
|
92
76
|
{
|
93
77
|
text: "Billing",
|
94
78
|
icon: "billing",
|
95
79
|
href: "/home",
|
96
80
|
view: true,
|
97
|
-
|
81
|
+
viewSubMenu: false,
|
98
82
|
},
|
99
83
|
{
|
100
84
|
text: "Setting",
|
101
85
|
icon: "setting",
|
102
86
|
href: "/home",
|
103
87
|
view: true,
|
88
|
+
viewSubMenu: true,
|
104
89
|
submenu: [
|
105
90
|
{
|
106
91
|
text: "Company",
|
@@ -121,27 +106,28 @@ export const options = {
|
|
121
106
|
icon: "orderTaxi",
|
122
107
|
href: "/home",
|
123
108
|
view: true,
|
124
|
-
|
109
|
+
viewSubMenu: false,
|
125
110
|
},
|
126
111
|
{
|
127
112
|
text: "Dashboards",
|
128
113
|
icon: "dashboardsUwa",
|
129
114
|
href: "/home",
|
130
115
|
view: true,
|
131
|
-
|
116
|
+
viewSubMenu: false,
|
132
117
|
},
|
133
118
|
{
|
134
119
|
text: "Projects",
|
135
120
|
icon: "projectsUwa",
|
136
121
|
href: "/home",
|
137
122
|
view: true,
|
138
|
-
|
123
|
+
viewSubMenu: false,
|
139
124
|
},
|
140
125
|
{
|
141
126
|
text: "Permissions",
|
142
127
|
icon: "permissions",
|
143
128
|
href: "/home",
|
144
129
|
view: true,
|
130
|
+
viewSubMenu: true,
|
145
131
|
submenu: [
|
146
132
|
{
|
147
133
|
text: "Permissions",
|
@@ -156,6 +142,7 @@ export const options = {
|
|
156
142
|
icon: "analytics",
|
157
143
|
href: "/home",
|
158
144
|
view: true,
|
145
|
+
viewSubMenu: true,
|
159
146
|
submenu: [
|
160
147
|
{
|
161
148
|
text: "Dashboard",
|
@@ -179,6 +166,7 @@ export const options = {
|
|
179
166
|
icon: "legal",
|
180
167
|
href: "/home",
|
181
168
|
view: true,
|
169
|
+
viewSubMenu: true,
|
182
170
|
submenu: [
|
183
171
|
{
|
184
172
|
text: "Privacy policy",
|
@@ -203,14 +191,14 @@ export const options = {
|
|
203
191
|
icon: "info",
|
204
192
|
href: "/home",
|
205
193
|
view: true,
|
206
|
-
|
194
|
+
viewSubMenu: false,
|
207
195
|
},
|
208
196
|
{
|
209
197
|
text: "My profile",
|
210
198
|
icon: "profile",
|
211
199
|
href: "/home",
|
212
200
|
view: true,
|
213
|
-
|
201
|
+
viewSubMenu: false,
|
214
202
|
},
|
215
203
|
],
|
216
204
|
|
package/layout/Sidebar/index.js
CHANGED
@@ -80,8 +80,8 @@ export const ItemMenu = ({ children, getStyles, size, icon, color, background, s
|
|
80
80
|
<div>
|
81
81
|
<ul>
|
82
82
|
|
83
|
-
{itemSubmenu.map((item) => (
|
84
|
-
<li className={getStyles('pro-menu-item')} href={item.href}>
|
83
|
+
{itemSubmenu.map((item, index) => (
|
84
|
+
<li key={index} className={getStyles('pro-menu-item')} href={item.href}>
|
85
85
|
<div className={getStyles('pro-inner-item')} role="button">
|
86
86
|
<span className={getStyles('pro-item-content')}>{item.text}</span></div>
|
87
87
|
</li>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
}
|
31
31
|
|
32
32
|
.pro-menu-item {
|
33
|
-
font-size:
|
33
|
+
font-size: var(--font-size-base);
|
34
34
|
list-style: none;
|
35
35
|
}
|
36
36
|
|
@@ -324,11 +324,6 @@
|
|
324
324
|
transition-property: none;
|
325
325
|
}
|
326
326
|
|
327
|
-
.pro-menu {
|
328
|
-
padding-top: 10px;
|
329
|
-
padding-bottom: 10px;
|
330
|
-
}
|
331
|
-
|
332
327
|
.pro-sub-menu>.pro-inner-list-item {
|
333
328
|
position: relative;
|
334
329
|
background-color: hsl(0deg 0% 0% / 2%);
|
@@ -339,25 +334,6 @@
|
|
339
334
|
padding-bottom: 15px;
|
340
335
|
}
|
341
336
|
|
342
|
-
.pro-menu a {
|
343
|
-
text-decoration: none;
|
344
|
-
color: #adadad;
|
345
|
-
}
|
346
|
-
|
347
|
-
.pro-menu a:before {
|
348
|
-
content: '';
|
349
|
-
position: absolute;
|
350
|
-
top: 0;
|
351
|
-
right: 0;
|
352
|
-
bottom: 0;
|
353
|
-
left: 0;
|
354
|
-
background-color: transparent;
|
355
|
-
}
|
356
|
-
|
357
|
-
.pro-menu a:hover {
|
358
|
-
color: #d8d8d8;
|
359
|
-
}
|
360
|
-
|
361
337
|
.popper-arrow {
|
362
338
|
position: absolute;
|
363
339
|
z-index: -1;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
import styles from './Tabs.module.css'
|
5
|
+
import { options } from './constants'
|
6
|
+
import withStyles from '../../hocs/withStyles'
|
7
|
+
|
8
|
+
import Tab from '../../atoms/Tab/Tab'
|
9
|
+
|
10
|
+
export const Tabs = ({ getStyles, viewTabs }) => {
|
11
|
+
|
12
|
+
if (viewTabs) {
|
13
|
+
return (
|
14
|
+
|
15
|
+
<div className={getStyles('tabs')}>
|
16
|
+
|
17
|
+
<nav className={getStyles('pro-nav')}>
|
18
|
+
|
19
|
+
<ul>
|
20
|
+
|
21
|
+
{options.itemTabs.map((item, index) => (
|
22
|
+
|
23
|
+
<Tab
|
24
|
+
key={index}
|
25
|
+
activeTab={false}
|
26
|
+
onClick={function noRefCheck() { }}
|
27
|
+
viewTab={item.view}
|
28
|
+
>
|
29
|
+
{item.text}
|
30
|
+
</Tab>
|
31
|
+
|
32
|
+
))}
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
|
36
|
+
</nav>
|
37
|
+
|
38
|
+
</div>
|
39
|
+
)
|
40
|
+
} else {
|
41
|
+
null
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
Tabs.propTypes = {
|
46
|
+
getStyles: PropTypes.func.isRequired,
|
47
|
+
}
|
48
|
+
|
49
|
+
Tabs.defaultProps = {
|
50
|
+
getStyles: () => { },
|
51
|
+
}
|
52
|
+
|
53
|
+
export default withStyles(styles)(Tabs)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { Tabs, styles, options } from '.'
|
2
|
+
|
3
|
+
import {
|
4
|
+
getTemplate,
|
5
|
+
getListTemplate,
|
6
|
+
getOptionsArgTypes,
|
7
|
+
} from '../../helpers/storybook'
|
8
|
+
|
9
|
+
const Template = getTemplate(Tabs, styles)
|
10
|
+
const ListTemplate = getListTemplate(Tabs, styles)
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: 'Molecules/Tabs',
|
14
|
+
component: Tabs,
|
15
|
+
args: {
|
16
|
+
options: options.itemTabs,
|
17
|
+
viewTabs: true,
|
18
|
+
},
|
19
|
+
argTypes: {
|
20
|
+
options: {
|
21
|
+
description: '**array of shaped objects:**',
|
22
|
+
table: {
|
23
|
+
type: {
|
24
|
+
summary: 'object',
|
25
|
+
detail: "{ text: 'string', icon: 'string', href: 'string', view: 'bool', viewSubMenu: 'bool'}",
|
26
|
+
},
|
27
|
+
},
|
28
|
+
},
|
29
|
+
},
|
30
|
+
}
|
31
|
+
|
32
|
+
export const Default = Template.bind({})
|
33
|
+
// export const List = ListTemplate.bind({})
|
34
|
+
// List.args = { items: options.types.map((type) => ({ type })) }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
export const options = {
|
2
|
+
itemTabs: [
|
3
|
+
{
|
4
|
+
text: "Taxi",
|
5
|
+
href: "/taxi",
|
6
|
+
view: true,
|
7
|
+
},
|
8
|
+
{
|
9
|
+
text: "Parking",
|
10
|
+
href: "/parking",
|
11
|
+
view: true,
|
12
|
+
},
|
13
|
+
{
|
14
|
+
text: "Sharing",
|
15
|
+
href: "/sharing",
|
16
|
+
view: true,
|
17
|
+
},
|
18
|
+
{
|
19
|
+
text: "T. Publico",
|
20
|
+
href: "/sharing",
|
21
|
+
view: true,
|
22
|
+
},
|
23
|
+
{
|
24
|
+
text: "Hoja de Km",
|
25
|
+
href: "/sharing",
|
26
|
+
view: true,
|
27
|
+
},
|
28
|
+
],
|
29
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "imbric-theme",
|
3
|
-
"version": "0.2
|
3
|
+
"version": "0.3.2",
|
4
4
|
"description": "Components library IMBRIC",
|
5
5
|
"private": false,
|
6
6
|
"main": "index.js",
|
@@ -51,7 +51,9 @@
|
|
51
51
|
"license": "MIT",
|
52
52
|
"dependencies": {
|
53
53
|
"classnames": "2.3.1",
|
54
|
-
"react-icons": "4.3.1"
|
54
|
+
"react-icons": "4.3.1",
|
55
|
+
"react-router": "6.3.0",
|
56
|
+
"react-router-dom": "6.3.0"
|
55
57
|
},
|
56
58
|
"devDependencies": {
|
57
59
|
"@babel/core": "7.11.6",
|