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.
Files changed (123) hide show
  1. package/.storybook/main.js +1 -1
  2. package/atoms/AlertModal/AlertModal.js +77 -0
  3. package/atoms/AlertModal/AlertModal.module.css +3 -0
  4. package/atoms/AlertModal/AlertModal.stories.js +30 -0
  5. package/atoms/AlertModal/constants.js +4 -0
  6. package/atoms/AlertModal/index.js +3 -0
  7. package/atoms/Button/Button.js +5 -2
  8. package/atoms/Button/Button.module.css +6 -3
  9. package/atoms/Checkbox/Checkbox.js +49 -0
  10. package/atoms/Checkbox/Checkbox.module.css +3 -0
  11. package/atoms/Checkbox/Checkbox.stories.js +28 -0
  12. package/atoms/Checkbox/constants.js +1 -0
  13. package/atoms/Checkbox/index.js +3 -0
  14. package/atoms/Heading/Heading.js +1 -1
  15. package/atoms/Heading/Heading.module.css +4 -0
  16. package/atoms/Heading/constants.js +1 -1
  17. package/atoms/Icon/constants.js +30 -6
  18. package/atoms/Icon/file-download-svgrepo-com.svg +13 -0
  19. package/atoms/Input/Input.js +21 -5
  20. package/atoms/Input/Input.module.css +26 -6
  21. package/atoms/Input/Input.stories.js +8 -2
  22. package/atoms/Input/__snapshots__/Input.stories.js.snap +5 -5
  23. package/atoms/Input/constants.js +1 -1
  24. package/atoms/Label/Label.js +31 -0
  25. package/atoms/Label/Label.module.css +38 -0
  26. package/atoms/Label/Label.stories.js +26 -0
  27. package/atoms/Label/constants.js +1 -0
  28. package/atoms/Label/index.js +3 -0
  29. package/atoms/Paragraph/Paragraph.module.css +4 -0
  30. package/index.js +20 -1
  31. package/jest.config.js +1 -1
  32. package/layout/DynamicTable/DynamicTable.js +207 -0
  33. package/layout/DynamicTable/DynamicTable.module.css +62 -0
  34. package/layout/DynamicTable/DynamicTable.stories.js +30 -0
  35. package/layout/DynamicTable/constants.js +840 -0
  36. package/layout/DynamicTable/index.js +3 -0
  37. package/layout/Navbar/Navbar.js +19 -11
  38. package/layout/Navbar/Navbar.module.css +4 -2
  39. package/layout/Navbar/Navbar.stories.js +2 -1
  40. package/layout/Sidebar/Sidebar.js +5 -3
  41. package/layout/Sidebar/Sidebar.module.css +1 -10
  42. package/layout/Sidebar/Sidebar.stories.js +1 -1
  43. package/layout/Sidebar/constants.js +228 -205
  44. package/molecules/CheckList/CheckList.js +135 -0
  45. package/molecules/CheckList/CheckList.module.css +94 -0
  46. package/molecules/CheckList/CheckList.stories.js +25 -0
  47. package/molecules/CheckList/constants.js +23 -0
  48. package/molecules/CheckList/index.js +3 -0
  49. package/molecules/ColumnTable/ColumnTable.js +123 -0
  50. package/molecules/ColumnTable/ColumnTable.module.css +9 -0
  51. package/molecules/ColumnTable/ColumnTable.stories.js +29 -0
  52. package/molecules/ColumnTable/constants.js +1 -0
  53. package/molecules/ColumnTable/index.js +3 -0
  54. package/molecules/DatePicker/DatePicker.js +223 -0
  55. package/molecules/DatePicker/DatePicker.module.css +38 -0
  56. package/molecules/DatePicker/DatePicker.stories.js +23 -0
  57. package/molecules/DatePicker/constants.js +3 -0
  58. package/molecules/DatePicker/index.js +3 -0
  59. package/molecules/Dropdown/Dropdown.js +25 -22
  60. package/molecules/Dropdown/Dropdown.module.css +21 -3
  61. package/molecules/DynamicSelect/DynamicSelect.js +109 -0
  62. package/molecules/DynamicSelect/DynamicSelect.module.css +10 -0
  63. package/molecules/DynamicSelect/DynamicSelect.stories.js +32 -0
  64. package/molecules/DynamicSelect/constants.js +7 -0
  65. package/molecules/DynamicSelect/index.js +3 -0
  66. package/molecules/Error/Error.js +2 -2
  67. package/molecules/Error/Error.module.css +3 -2
  68. package/molecules/ItemMenu/ItemMenu.js +34 -31
  69. package/molecules/ItemMenu/ItemMenu.module.css +13 -4
  70. package/molecules/ItemMenu/ItemMenu.stories.js +2 -1
  71. package/molecules/ItemMenu/constants.js +3 -0
  72. package/molecules/RowTable/RowTable.js +22 -0
  73. package/molecules/RowTable/RowTable.module.css +3 -0
  74. package/molecules/RowTable/RowTable.stories.js +23 -0
  75. package/molecules/RowTable/constants.js +1 -0
  76. package/molecules/RowTable/index.js +3 -0
  77. package/package.json +11 -2
  78. package/pages/Login/Login.js +102 -0
  79. package/pages/Login/Login.module.css +5 -0
  80. package/pages/Login/Login.stories.js +23 -0
  81. package/pages/Login/constants.js +1 -0
  82. package/pages/Login/index.js +3 -0
  83. package/pages/Login/validation/loginSchema.js +5 -0
  84. package/public/static/logologin.svg +16 -0
  85. package/scripts/create-component.js +2 -1
  86. package/storybook-static/0.263f852f.iframe.bundle.js +1 -0
  87. package/storybook-static/0.91dbd3f3aa2099d25061.manager.bundle.js +1 -0
  88. package/storybook-static/1.17e9ac7e.iframe.bundle.js +3 -0
  89. package/storybook-static/1.17e9ac7e.iframe.bundle.js.LICENSE.txt +8 -0
  90. package/storybook-static/1.17e9ac7e.iframe.bundle.js.map +1 -0
  91. package/storybook-static/2.cc4000c2.iframe.bundle.js +1 -0
  92. package/storybook-static/3.e9f95d01.iframe.bundle.js +1 -0
  93. package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js +2 -0
  94. package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js.LICENSE.txt +8 -0
  95. package/storybook-static/5.8efdde123acaf8fbb100.manager.bundle.js +1 -0
  96. package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js +2 -0
  97. package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js.LICENSE.txt +12 -0
  98. package/storybook-static/7.97068037.iframe.bundle.js +1 -0
  99. package/storybook-static/7.fa9452d2609e8a00f314.manager.bundle.js +1 -0
  100. package/storybook-static/8.66f5ef1c66fc4628f127.manager.bundle.js +1 -0
  101. package/storybook-static/8.b545d602.iframe.bundle.js +3 -0
  102. package/storybook-static/8.b545d602.iframe.bundle.js.LICENSE.txt +12 -0
  103. package/storybook-static/8.b545d602.iframe.bundle.js.map +1 -0
  104. package/storybook-static/9.269ed917.iframe.bundle.js +1 -0
  105. package/storybook-static/favicon.ico +0 -0
  106. package/storybook-static/iframe.html +348 -0
  107. package/storybook-static/index.html +59 -0
  108. package/storybook-static/main.157061c9.iframe.bundle.js +1 -0
  109. package/storybook-static/main.5a07347846ccf2d7e5dc.manager.bundle.js +1 -0
  110. package/storybook-static/runtime~main.a14e6e62.iframe.bundle.js +1 -0
  111. package/storybook-static/runtime~main.f78c3fae275fc212c109.manager.bundle.js +1 -0
  112. package/storybook-static/static/logo.svg +19 -0
  113. package/storybook-static/static/logologin.svg +16 -0
  114. package/storybook-static/static/logotipo.svg +50 -0
  115. package/storybook-static/static/logotipoS.svg +26 -0
  116. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js +3 -0
  117. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.LICENSE.txt +110 -0
  118. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.map +1 -0
  119. package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js +2 -0
  120. package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js.LICENSE.txt +101 -0
  121. package/styles/globals.css +590 -3
  122. package/styles/tokens.css +2 -1
  123. 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 })) }
@@ -0,0 +1,3 @@
1
+ export const options = {
2
+ typeLayoutDate: ['Calendar', 'DateRange', 'DateRangePicker']
3
+ }
@@ -0,0 +1,3 @@
1
+ export { default, DatePicker } from './DatePicker'
2
+ export { options } from './constants'
3
+ export { default as styles } from './DatePicker.module.css'
@@ -13,27 +13,30 @@ export const Dropdown = ({
13
13
  value,
14
14
  isInline,
15
15
  onChange,
16
- }) => (
17
- <div
18
- id={id}
19
- className={getStyles('dropdown', {
20
- 'is-inline': isInline,
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
- {options.map(({ text, value }) => (
30
- <option key={value} value={value}>
31
- {text}
32
- </option>
33
- ))}
34
- </select>
35
- </div>
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: 10px 30px 10px 20px;
20
- border: var(--border-width-thin) solid var(--color-primary);
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,10 @@
1
+ .dynamic-select {
2
+ position: relative;
3
+ display: inline-block;
4
+ width: 100%;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .is-inline {
9
+ max-width: max-content;
10
+ }
@@ -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({})
@@ -0,0 +1,7 @@
1
+ export const options = {
2
+ optionsSelect: [
3
+ { value: 'chocolate', label: 'Chocolate' },
4
+ { value: 'strawberry', label: 'Strawberry' },
5
+ { value: 'vanilla', label: 'Vanilla' }
6
+ ]
7
+ }
@@ -0,0 +1,3 @@
1
+ export { default, DynamicSelect } from './DynamicSelect'
2
+ export { options } from './constants'
3
+ export { default as styles } from './DynamicSelect.module.css'
@@ -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="md" />
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: 4px solid var(--color-red-500);
5
- background: var(--color-red-200);
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
- <BrowserRouter>
29
- <Link to={toHref}>
30
- <li className={getStyles('pro-menu-item')}>
26
+ <Link href={itemHref} passHref>
27
+ <li className={getStyles('pro-menu-item', { 'active': itemActive })}>
31
28
 
32
- <div className={getStyles('pro-inner-item')}>
29
+ <div className={getStyles('pro-inner-item')}>
33
30
 
34
- <span className={getStyles('pro-icon-wrapper')}>
31
+ <span className={getStyles('pro-icon-wrapper')}>
35
32
 
36
- <span className={getStyles('pro-icon')}>
37
- <Icon
38
- size={size}
39
- name={icon}
40
- color={color}
41
- background={background}
42
- onClick={function noRefCheck() { }}
43
- />
44
- </span>
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
- <span className={getStyles('pro-item-content', { 'color': color })}>{children}</span>
45
+ </span>
49
46
 
50
- </div>
47
+ <span className={getStyles('pro-item-content', { 'color': color })}>{children}</span>
51
48
 
52
- </li>
53
- </Link>
54
- </BrowserRouter>
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
- <li key={index} className={getStyles('pro-menu-item')} href={item.href}>
92
- <div className={getStyles('pro-inner-item')} role="button">
93
- <span className={getStyles('pro-item-content')}>{item.text}</span></div>
94
- </li>
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
- toHref: '/',
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.active {
97
- color: #d8d8d8;
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: 14px 30px 14px 15px;
202
+ padding: 10px 30px 10px 15px;
194
203
  margin: 0;
195
204
  }
196
205
 
@@ -16,7 +16,8 @@ export default {
16
16
  children: 'Home',
17
17
  subMenu: false,
18
18
  itemSubmenu: options.itemSubmenu,
19
- toHref: '/',
19
+ itemActive: false,
20
+ itemHref: '/'
20
21
  },
21
22
  argTypes: {
22
23
  itemSubmenu: {
@@ -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,3 @@
1
+ .row-table {
2
+ display: flex;
3
+ }
@@ -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: [] }
@@ -0,0 +1,3 @@
1
+ export { default, RowTable } from './RowTable'
2
+ export { options } from './constants'
3
+ export { default as styles } from './RowTable.module.css'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.3.1",
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",