imbric-theme 0.3.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/atoms/Button/Button.stories.js +1 -1
  2. package/atoms/Button/__snapshots__/Button.stories.js.snap +8 -8
  3. package/atoms/Heading/Heading.stories.js +2 -2
  4. package/atoms/Heading/__snapshots__/Heading.stories.js.snap +16 -16
  5. package/atoms/Paragraph/Paragraph.stories.js +2 -2
  6. package/atoms/Paragraph/__snapshots__/Paragraph.stories.js.snap +16 -16
  7. package/atoms/Tab/Tab.js +41 -0
  8. package/atoms/Tab/Tab.module.css +17 -0
  9. package/atoms/Tab/Tab.stories.js +27 -0
  10. package/atoms/Tab/constants.js +1 -0
  11. package/atoms/Tab/index.js +3 -0
  12. package/index.js +3 -0
  13. package/layout/FlexColumnContent/FlexColumnContent.js +26 -0
  14. package/layout/FlexColumnContent/FlexColumnContent.module.css +5 -0
  15. package/layout/FlexColumnContent/FlexColumnContent.stories.js +28 -0
  16. package/layout/FlexColumnContent/constants.js +1 -0
  17. package/layout/FlexColumnContent/index.js +3 -0
  18. package/layout/Navbar/Navbar.js +55 -10
  19. package/layout/Navbar/Navbar.module.css +3 -2
  20. package/layout/Navbar/Navbar.stories.js +1 -4
  21. package/layout/Sidebar/Sidebar.js +19 -22
  22. package/layout/Sidebar/Sidebar.module.css +32 -6
  23. package/layout/Sidebar/Sidebar.stories.js +3 -2
  24. package/layout/Sidebar/constants.js +228 -217
  25. package/layout/Sidebar/index.js +1 -2
  26. package/molecules/ItemMenu/ItemMenu.js +36 -25
  27. package/molecules/ItemMenu/ItemMenu.module.css +14 -29
  28. package/molecules/ItemMenu/ItemMenu.stories.js +2 -0
  29. package/molecules/ItemMenu/constants.js +3 -0
  30. package/molecules/Tabs/Tabs.js +53 -0
  31. package/molecules/Tabs/Tabs.module.css +12 -0
  32. package/molecules/Tabs/Tabs.stories.js +34 -0
  33. package/molecules/Tabs/constants.js +29 -0
  34. package/molecules/Tabs/index.js +3 -0
  35. package/package.json +6 -2
  36. package/layout/Sidebar/Sidebar.css +0 -90
  37. package/storybook-static/0.89e7d77f4d365594e982.manager.bundle.js +0 -1
  38. package/storybook-static/0.e189f835.iframe.bundle.js +0 -3
  39. package/storybook-static/0.e189f835.iframe.bundle.js.LICENSE.txt +0 -8
  40. package/storybook-static/0.e189f835.iframe.bundle.js.map +0 -1
  41. package/storybook-static/1.45d0d6aa.iframe.bundle.js +0 -3
  42. package/storybook-static/1.45d0d6aa.iframe.bundle.js.LICENSE.txt +0 -8
  43. package/storybook-static/1.45d0d6aa.iframe.bundle.js.map +0 -1
  44. package/storybook-static/2.75691da5.iframe.bundle.js +0 -1
  45. package/storybook-static/3.08d15cf4.iframe.bundle.js +0 -1
  46. package/storybook-static/4.cbd8fb943995f84e5583.manager.bundle.js +0 -2
  47. package/storybook-static/4.cbd8fb943995f84e5583.manager.bundle.js.LICENSE.txt +0 -8
  48. package/storybook-static/5.d02ab9a798461caeb506.manager.bundle.js +0 -1
  49. package/storybook-static/6.4deac86378225189a26c.manager.bundle.js +0 -2
  50. package/storybook-static/6.4deac86378225189a26c.manager.bundle.js.LICENSE.txt +0 -12
  51. package/storybook-static/7.20dbe97831bee4cf4ce4.manager.bundle.js +0 -1
  52. package/storybook-static/7.53d57a3d.iframe.bundle.js +0 -1
  53. package/storybook-static/8.33a6bfc3865ab87fcc57.manager.bundle.js +0 -1
  54. package/storybook-static/8.9b339902.iframe.bundle.js +0 -3
  55. package/storybook-static/8.9b339902.iframe.bundle.js.LICENSE.txt +0 -12
  56. package/storybook-static/8.9b339902.iframe.bundle.js.map +0 -1
  57. package/storybook-static/9.f9389e45.iframe.bundle.js +0 -1
  58. package/storybook-static/favicon.ico +0 -0
  59. package/storybook-static/iframe.html +0 -348
  60. package/storybook-static/index.html +0 -59
  61. package/storybook-static/main.45162e1b.iframe.bundle.js +0 -1
  62. package/storybook-static/main.e8773e46a6d316c46694.manager.bundle.js +0 -1
  63. package/storybook-static/runtime~main.9b3271f5.iframe.bundle.js +0 -1
  64. package/storybook-static/runtime~main.d0af9adf44459dbc718a.manager.bundle.js +0 -1
  65. package/storybook-static/static/logo.svg +0 -19
  66. package/storybook-static/static/logotipo.svg +0 -50
  67. package/storybook-static/static/logotipoS.svg +0 -26
  68. package/storybook-static/vendors~main.02332eca.iframe.bundle.js +0 -3
  69. package/storybook-static/vendors~main.02332eca.iframe.bundle.js.LICENSE.txt +0 -107
  70. package/storybook-static/vendors~main.02332eca.iframe.bundle.js.map +0 -1
  71. package/storybook-static/vendors~main.29dce51cb06d0354d6c9.manager.bundle.js +0 -2
  72. 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: 9px 16px;
21
+ padding: 0.67em 1.5em;
21
22
  }
22
23
 
23
24
  .navbar__item {
24
- padding: 9px 16px;
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: `Farthings pulled strain? Half they'll greater land sordid Elessar. Glamdring um 17 13 motion? Creaked fate spawning chief lords loved loveliest ashes Elfs witness. Brook born Caradhras dining raining! Seeing-stones taking unlost working. A wizard is never late, Frodo Baggins. Nor is he early. He arrives precisely when he means to. Oakenshield despite distinct prosperous wields relight dark weighed leader reaches rid honor. Moments poison Sackville-Bagginses echoes dozens fend get. Scales exist apple Gundabad retaken bunch agreeable mantle cannot name's seasoning private.
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,7 +2,7 @@ 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 { options } from './constants'
5
+ // import { options } from './constants'
6
6
 
7
7
  import styles from './Sidebar.module.css'
8
8
 
@@ -11,21 +11,13 @@ import Icon from '../../atoms/Icon'
11
11
  import Divider from '../../atoms/Divider'
12
12
  import ItemMenu from '../../molecules/ItemMenu/ItemMenu'
13
13
 
14
- export const Sidebar = ({ getStyles }) => {
14
+ export const Sidebar = ({ getStyles, menuCollapseView, options }) => {
15
15
 
16
- //create initial menuCollapse state using useState hook
17
- const [menuCollapse, setMenuCollapse] = useState(false)
18
-
19
- //create a custom function that will change menucollapse state from false to true and true to false
20
- const menuIconClick = () => {
21
- //condition checking to change state from true to false and vice versa
22
- menuCollapse ? setMenuCollapse(false) : setMenuCollapse(true);
23
- };
24
16
 
25
17
  return (
26
18
  <>
27
19
  <div className={getStyles('header', {
28
- 'collapsed': menuCollapse,
20
+ 'collapsed': menuCollapseView,
29
21
  })}>
30
22
 
31
23
  <div className={getStyles('pro-sidebar')}>
@@ -37,25 +29,25 @@ export const Sidebar = ({ getStyles }) => {
37
29
  <div className={getStyles('pro-sidebar-header')}>
38
30
 
39
31
  <div className={getStyles('logotext')}>
40
- {/* small and big change using menucollapse state */}
41
- {menuCollapse ? <Picture src="/static/logotipoS.svg" width={30}></Picture> : <Picture src="/static/logotipo.svg" width={120}></Picture>}
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>}
42
34
  </div>
43
- <div className={getStyles('closemenu')} onClick={menuIconClick}>
44
- {/* changing menu collapse icon on click */}
45
- {menuCollapse ? (
35
+ {/* <div className={getStyles('closemenu')}>
36
+
37
+ {menuCollapseView ? (
46
38
 
47
39
  <Icon
48
40
  name="angleRight"
49
- onClick={function noRefCheck() { }}
41
+ onClick={menuIconClick}
50
42
  />
51
43
 
52
44
  ) : (
53
45
  <Icon
54
46
  name="angleLeft"
55
- onClick={function noRefCheck() { }}
47
+ onClick={menuIconClick}
56
48
  />
57
49
  )}
58
- </div>
50
+ </div> */}
59
51
 
60
52
  </div>
61
53
 
@@ -65,17 +57,21 @@ export const Sidebar = ({ getStyles }) => {
65
57
 
66
58
  <ul>
67
59
 
68
- {options.itemsMenu.map((item) => (
60
+ {options.map((item, index) => (
69
61
  item.view ?
70
62
  <ItemMenu
63
+ key={index}
71
64
  icon={item.icon}
72
- subMenu={item.submenu}
65
+ subMenu={item.viewSubMenu}
73
66
  itemSubmenu={item.submenu}
67
+ itemHref={item.href}
68
+ itemActive={item.active}
74
69
  >
75
70
  {item.text}
76
71
  </ItemMenu>
72
+
77
73
  : null
78
-
74
+
79
75
  ))}
80
76
 
81
77
  </ul>
@@ -107,6 +103,7 @@ Sidebar.propTypes = {
107
103
 
108
104
  Sidebar.defaultProps = {
109
105
  getStyles: () => { },
106
+ menuCollapseView: false,
110
107
  }
111
108
 
112
109
  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: 8px 20px;
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: 8px;
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>.pro-sidebar-inner>.pro-sidebar-layout .pro-sidebar-header {
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,31 @@
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:hover {
181
+ color: #d8d8d8;
182
+ }
183
+
158
184
  @media (max-width: 480px) {
159
185
  .pro-sidebar.xs {
160
186
  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,
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
  },