imbric-theme 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,7 @@ export const Modal = ({
37
37
  isPlayground,
38
38
  titleModal,
39
39
  isFullWidth,
40
+ isFullWidthSoft,
40
41
  }) => {
41
42
  const isDesktop = useMedia(['(min-width: 992px)'], [true])
42
43
  const [onFadeOut, setOnFadeOut] = useState(false)
@@ -52,13 +53,13 @@ export const Modal = ({
52
53
  onClick={handleClose}
53
54
  >
54
55
  <div
55
- className={getStyles(isFullWidth ? 'modal-full' : 'modal', ['type'])}
56
+ className={getStyles(isFullWidth ? 'modal-full' : isFullWidthSoft ? 'modal-full-soft' : 'modal', ['type'])}
56
57
  onClick={createHandlerClick()}
57
58
  >
58
59
  <div className={getStyles('heading')}>
59
60
  {!!onClose && (
60
61
  <Icon
61
- id='btnColsedModal'
62
+ id='btnColsedModal'
62
63
  color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
63
64
  name={isDesktop ? 'cross' : 'angleLeft'}
64
65
  background={isDesktop ? 'transparent' : 'muted'}
@@ -76,13 +77,19 @@ export const Modal = ({
76
77
  })}
77
78
  />
78
79
  )}
79
- <Heading color='black' size='lg' weight='light'>
80
- {titleModal}
81
- </Heading>
80
+ <Heading color='black' size='lg' weight='light'>
81
+ {titleModal}
82
+ </Heading>
82
83
  </div>
83
84
 
84
- {isFullWidth ? <div className={getStyles('container-full')}>{children}</div> : <Container><div className={getStyles('container')}>{children}</div></Container>}
85
-
85
+ {isFullWidth ?
86
+ <div className={getStyles('container-full')}>{children}</div>
87
+ :
88
+ isFullWidthSoft ? <div className={getStyles('container-full-soft')}>{children}</div>
89
+ :
90
+ <Container><div className={getStyles('container')}>{children}</div></Container>
91
+ }
92
+
86
93
  </div>
87
94
  </div>
88
95
  )
@@ -99,14 +106,16 @@ Modal.propTypes = {
99
106
  type: PropTypes.oneOf(options.types),
100
107
  isPlayground: PropTypes.bool,
101
108
  isFullWidth: PropTypes.bool,
109
+ isFullWidthSoft: PropTypes.bool,
102
110
  titleModal: PropTypes.string,
103
111
  }
104
112
 
105
113
  Modal.defaultProps = {
106
- getStyles: () => {},
114
+ getStyles: () => { },
107
115
  type: 'primary',
108
116
  titleModal: 'Ejemplo titulo',
109
- isFullWidth: false
117
+ isFullWidth: false,
118
+ isFullWidthSoft: false
110
119
  }
111
120
 
112
121
  export default withStyles(styles)(Modal)
@@ -32,6 +32,14 @@
32
32
  padding: 16px 32px;
33
33
  }
34
34
 
35
+ .modal-full-soft {
36
+ display: flex;
37
+ width: 100%;
38
+ height: 100%;
39
+ flex-direction: column;
40
+ padding: 16px 32px;
41
+ }
42
+
35
43
  :not(.is-playground)>.modal {
36
44
  animation: fadeInModal 0.4s ease-in forwards;
37
45
  opacity: 0;
@@ -71,7 +79,7 @@
71
79
 
72
80
  @media (min-width: 992px) {
73
81
  .modal {
74
- max-width: 465px;
82
+ max-width: 520px;
75
83
  height: auto;
76
84
  border-radius: var(--border-radius-sm);
77
85
  /* max-height: 100%;
@@ -84,6 +92,12 @@
84
92
  padding: 16px 32px;
85
93
  }
86
94
 
95
+ .modal-full-soft {
96
+ width: 90%;
97
+ height: auto;
98
+ border-radius: var(--border-radius-sm);
99
+ }
100
+
87
101
  .heading {
88
102
  flex-direction: row-reverse;
89
103
  }
@@ -98,6 +112,13 @@
98
112
  overflow: auto;
99
113
  min-width: 100%;
100
114
  }
115
+
116
+ .container-full-soft {
117
+ max-height: 600px;
118
+ overflow: auto;
119
+ min-width: 100%;
120
+ }
121
+
101
122
  }
102
123
 
103
124
  @keyframes fadeInModal {
@@ -9,8 +9,25 @@ import Heading from '../../atoms/Heading/Heading'
9
9
  import Tabs from '../../molecules/Tabs/Tabs'
10
10
  import Icon from '../../atoms/Icon'
11
11
 
12
- export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, linkLegal, linkInfo, linkProfile, txtTootipLegal, txtTootipInfo, txtTootipProfile, languageSwitchLink }) => {
13
-
12
+ export const Navbar = ({
13
+ getStyles,
14
+ viewTabsNav,
15
+ viewOptionsNav,
16
+ isViewLegal,
17
+ isViewInfo,
18
+ isViewProfile,
19
+ isViewLogout,
20
+ children,
21
+ linkLogout,
22
+ linkLegal,
23
+ linkInfo,
24
+ linkProfile,
25
+ txtTootipLegal,
26
+ txtTootipInfo,
27
+ txtTootipProfile,
28
+ languageSwitchLink,
29
+
30
+ }) => {
14
31
 
15
32
  const router = useRouter();
16
33
 
@@ -87,114 +104,97 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
87
104
  {viewOptionsNav ? (
88
105
  <div className={getStyles('navbar__actions')}>
89
106
 
90
-
91
- <span
92
- data-tip
93
- data-for='legal'
94
- onMouseEnter={handleMouseEnter}
95
- onMouseLeave={handleMouseLeave}
96
- >
97
- <Icon
98
- size='lg'
99
- name='legal'
100
- color='highlight'
101
- background='transparent'
102
- onClick={linkLegal}
103
- />
104
-
105
- </span>
106
-
107
- {isToolTipMounted ? (
108
- <ReactTooltip id='legal' type='error'>
109
- <span>{txtTootipLegal}</span>
110
- </ReactTooltip>
107
+ {isViewLegal ? (
108
+ <>
109
+ <span
110
+ data-tip
111
+ data-for='legal'
112
+ onMouseEnter={handleMouseEnter}
113
+ onMouseLeave={handleMouseLeave}
114
+ >
115
+ <Icon
116
+ size='lg'
117
+ name='legal'
118
+ color='highlight'
119
+ background='transparent'
120
+ onClick={linkLegal}
121
+ />
122
+
123
+ </span>
124
+
125
+ {isToolTipMounted ? (
126
+ <ReactTooltip id='legal' type='error'>
127
+ <span>{txtTootipLegal}</span>
128
+ </ReactTooltip>
129
+ ) : null}
130
+ </>
111
131
  ) : null}
112
132
 
113
-
114
-
115
-
116
- <span
117
- data-tip
118
- data-for='info'
119
- onMouseEnter={handleMouseEnter}
120
- onMouseLeave={handleMouseLeave}
121
- >
122
- <Icon
123
- size='lg'
124
- name='info'
125
- color='highlight'
126
- background='transparent'
127
- onClick={linkInfo}
128
- />
129
-
130
- </span>
131
-
132
- {isToolTipMounted ? (
133
- <ReactTooltip id='info' type='error'>
134
- <span>{txtTootipInfo}</span>
135
- </ReactTooltip>
133
+ {isViewInfo ? (
134
+ <>
135
+ <span
136
+ data-tip
137
+ data-for='info'
138
+ onMouseEnter={handleMouseEnter}
139
+ onMouseLeave={handleMouseLeave}
140
+ >
141
+ <Icon
142
+ size='lg'
143
+ name='info'
144
+ color='highlight'
145
+ background='transparent'
146
+ onClick={linkInfo}
147
+ />
148
+
149
+ </span>
150
+
151
+ {isToolTipMounted ? (
152
+ <ReactTooltip id='info' type='error'>
153
+ <span>{txtTootipInfo}</span>
154
+ </ReactTooltip>
155
+ ) : null}
156
+ </>
136
157
  ) : null}
137
158
 
159
+ {isViewProfile ? (
160
+ <>
161
+ <span
162
+ data-tip
163
+ data-for='profile'
164
+ onMouseEnter={handleMouseEnter}
165
+ onMouseLeave={handleMouseLeave}
166
+ >
167
+ <Icon
168
+ size='lg'
169
+ name='profile'
170
+ color='highlight'
171
+ background='transparent'
172
+ onClick={linkProfile}
173
+ />
174
+
175
+ </span>
176
+
177
+ {isToolTipMounted ? (
178
+ <ReactTooltip id='profile' type='error'>
179
+ <span>{txtTootipProfile}</span>
180
+ </ReactTooltip>
181
+ ) : null}
182
+ </>
183
+ ) : null}
138
184
 
185
+ {languageSwitchLink}
139
186
 
140
- <span
141
- data-tip
142
- data-for='profile'
143
- onMouseEnter={handleMouseEnter}
144
- onMouseLeave={handleMouseLeave}
145
- >
187
+ {isViewLogout ? (
146
188
  <Icon
147
189
  size='lg'
148
- name='profile'
190
+ name='logout'
149
191
  color='highlight'
150
192
  background='transparent'
151
- onClick={linkProfile}
193
+ onClick={linkLogout}
152
194
  />
153
-
154
- </span>
155
-
156
- {isToolTipMounted ? (
157
- <ReactTooltip id='profile' type='error'>
158
- <span>{txtTootipProfile}</span>
159
- </ReactTooltip>
160
195
  ) : null}
161
196
 
162
197
 
163
-
164
-
165
- {/* <DynamicSelect
166
- isClearable={false}
167
- // defaultValue={{
168
- // label: 'ES',
169
- // value: 'es'
170
- // }}
171
- defaultValue={defaultValueLanguage}
172
- onChange={handleChangeLanguage}
173
- optionsSelect={optionsSelectLanguage}
174
- // optionsSelect={[
175
- // {
176
- // label: 'ES',
177
- // value: 'es'
178
- // },
179
- // {
180
- // label: 'EN',
181
- // value: 'en'
182
- // }
183
- // ]}
184
- /> */}
185
-
186
- {languageSwitchLink}
187
-
188
- <Icon
189
- size='lg'
190
- name='logout'
191
- color='highlight'
192
- background='transparent'
193
- onClick={linkLogout}
194
- />
195
-
196
-
197
-
198
198
  </div>
199
199
 
200
200
  ) : null}
@@ -224,12 +224,20 @@ Navbar.propTypes = {
224
224
  linkProfile: PropTypes.func,
225
225
  handleChange: PropTypes.func,
226
226
  languageSwitchLink: PropTypes.any.isRequired,
227
+ isViewLegal: PropTypes.bool,
228
+ isViewInfo: PropTypes.bool,
229
+ isViewProfile: PropTypes.bool,
230
+ isViewLogout: PropTypes.bool,
227
231
  }
228
232
 
229
233
  Navbar.defaultProps = {
230
234
  viewTabsNav: false,
231
235
  viewOptionsNav: true,
232
236
  getStyles: () => { },
237
+ isViewLegal: true,
238
+ isViewInfo: true,
239
+ isViewProfile: true,
240
+ isViewLogout: true,
233
241
  }
234
242
 
235
243
  export default withStyles(styles)(Navbar)
@@ -679,12 +679,22 @@ export const RowTable = ({
679
679
 
680
680
  ?
681
681
 
682
- <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
683
- <Moment format="DD/MM/YYYY hh:mm:ss">
684
- {item[itemTd.accessor]}
685
- </Moment>
686
- </td>
682
+ itemTd.typeFilterSub === 'date_only' ?
687
683
 
684
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
685
+ <Moment format="DD/MM/YYYY">
686
+ {item[itemTd.accessor]}
687
+ </Moment>
688
+ </td>
689
+
690
+ :
691
+
692
+ <td className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
693
+ {/* <Moment format="DD/MM/YYYY hh:mm:ss"> */}
694
+ <Moment format="DD/MM/YYYY HH:mm">
695
+ {item[itemTd.accessor]}
696
+ </Moment>
697
+ </td>
688
698
  :
689
699
 
690
700
  itemTd.typeFilter === 'select'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",