imbric-theme 1.1.5 → 1.1.6

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.
@@ -7,7 +7,6 @@ import withStyles from '../../hocs/withStyles'
7
7
  import Icon from '../Icon'
8
8
  import { Horizontal } from '../../layout/Spacer/components'
9
9
 
10
-
11
10
  // const handleChange = ({ onChange }) => () => {
12
11
  // onChange()
13
12
  // }
@@ -52,7 +51,6 @@ export const Input = ({
52
51
  inputExtra,
53
52
  cleanSelected,
54
53
  }) => {
55
-
56
54
  const onClickDeleteInput = (results, id) => {
57
55
  console.log('hola')
58
56
  console.log(id)
@@ -67,7 +65,6 @@ export const Input = ({
67
65
  if (cleanSelected) {
68
66
  cleanSelected()
69
67
  }
70
-
71
68
  }
72
69
 
73
70
  const pulsar = (e, id) => {
@@ -80,11 +77,8 @@ export const Input = ({
80
77
 
81
78
  return (
82
79
  <>
83
-
84
- {isViewIcon ?
85
-
80
+ {isViewIcon ? (
86
81
  <div className={getStyles('box-icon-input')}>
87
-
88
82
  <Icon
89
83
  id={idIcon}
90
84
  name={nameIcon}
@@ -120,123 +114,125 @@ export const Input = ({
120
114
  min={min}
121
115
  accept={accept}
122
116
  ></input>
117
+ </div>
118
+ ) : type === 'password' ? (
119
+ <div className={getStyles('box-icon-input')}>
120
+ <input
121
+ className={getStyles('input', {
122
+ 'is-inline': isInline,
123
+ 'is-inline-code': isInlineCode,
124
+ 'is-input-filter': isInputFilter,
125
+ 'is-input-secondary': isInputSecondary,
126
+ 'is-date': isDate,
127
+ })}
128
+ readOnly={readonly}
129
+ type={type}
130
+ id={id}
131
+ value={value}
132
+ placeholder={placeholder}
133
+ onChange={onChange}
134
+ onFocus={onFocus}
135
+ onBlur={onBlur}
136
+ onClick={onClick}
137
+ onKeyDown={onKeyDown}
138
+ autoComplete={autoComplete}
139
+ disabled={disabled}
140
+ min={min}
141
+ onInput={onInput}
142
+ accept={accept}
143
+ ></input>
123
144
 
124
- </div> :
125
-
126
- type === 'password' ?
127
-
128
- <div className={getStyles('box-icon-input')}>
129
-
130
- <input
131
- className={getStyles('input', {
132
- 'is-inline': isInline,
133
- 'is-inline-code': isInlineCode,
134
- 'is-input-filter': isInputFilter,
135
- 'is-input-secondary': isInputSecondary,
136
- 'is-date': isDate,
137
- })}
138
- readOnly={readonly}
139
- type={type}
140
- id={id}
141
- value={value}
142
- placeholder={placeholder}
143
- onChange={onChange}
144
- onFocus={onFocus}
145
- onBlur={onBlur}
146
- onClick={onClick}
147
- onKeyDown={onKeyDown}
148
- autoComplete={autoComplete}
149
- disabled={disabled}
150
- min={min}
151
- onInput={onInput}
152
- accept={accept}
153
- ></input>
154
-
155
- <Horizontal size="xs" />
156
-
157
- <Icon
158
- background={!viewPass ? "inverted" : "success"}
159
- color={!viewPass ? "base" : "inverted"}
160
- isClickable
161
- name="userView"
162
- onClick={onClickViewPass}
163
- size="sm"
164
- />
165
-
166
-
167
- </div>
168
-
169
- : isOpenModal
145
+ <Horizontal size="xs" />
170
146
 
171
- ?
172
- <div style={{ pointerEvents: disabled ? 'none' : 'all' }} id="onClickModalDynamicSelect_dynamic" className={getStyles('DynamicSelect_dynamic-select__oduOS')}>
173
- <div className={getStyles('css-1mfv3n-container')}>
174
- <div style={{ zIndex: 1, background: disabled ? '#eeeeee' : 'hsl(0, 0%, 100%)' }} className={getStyles('css-mlo5or-control')}>
175
- <div onClick={(op) => onClickModal(op, id)} style={{ height: '36px' }} className={getStyles('css-1huup54-ValueContainer')}>
176
- <div className={getStyles('css-qc6sy-singleValue')}>{value}</div>
177
- </div>
178
- <div className={getStyles('css-1hb7zxy-IndicatorsContainer')}>
179
- {value !== '' ? <div onClick={(op) => onClickDeleteInput(op, id)} className={getStyles('css-tlfecz-indicatorContainer')} aria-hidden="true">
180
- <svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" className={getStyles('css-tj5bde-Svg')} >
181
- <path d="M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"></path>
182
- </svg>
183
- </div> : null}
184
- <span className={getStyles('css-1okebmr-indicatorSeparator')}>
185
- </span>
186
- <div onClick={(op) => onClickModal(op, id)} className={getStyles('css-tlfecz-indicatorContainer')} aria-hidden="true">
187
- <svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" className={getStyles('css-tj5bde-Svg')}>
188
- <path
189
- fillRule="evenodd"
190
- clipRule="evenodd"
191
- d="M10 20C4.48612 20 0 15.5139 0 10C0 4.48612 4.48612 0 10 0C15.5139 0 20 4.48612 20 10C20 15.5139 15.5139 20 10 20ZM10 1.09864C5.09155 1.09864 1.09864 5.09155 1.09864 10C1.09864 14.9084 5.09155 18.9014 10 18.9014C14.9084 18.9014 18.9014 14.9084 18.9014 10C18.9014 5.09155 14.9084 1.09864 10 1.09864Z"
192
- />
193
- <path
194
- fillRule="evenodd"
195
- clipRule="evenodd"
196
- d="M4.68396 9.4093H15.316V10.5906H4.68396V9.4093Z"
197
- />
198
- <path
199
- fillRule="evenodd"
200
- clipRule="evenodd"
201
- d="M9.40942 4.68396H10.5908V15.316H9.40942V4.68396Z"
202
- />
203
- </svg>
204
- </div>
147
+ <Icon
148
+ background={!viewPass ? 'inverted' : 'success'}
149
+ color={!viewPass ? 'base' : 'inverted'}
150
+ isClickable
151
+ name="userView"
152
+ onClick={onClickViewPass}
153
+ size="sm"
154
+ />
155
+ </div>
156
+ ) : isOpenModal ? (
157
+ <div
158
+ style={{ pointerEvents: disabled ? 'none' : 'all' }}
159
+ id="onClickModalDynamicSelect_dynamic"
160
+ className={getStyles('DynamicSelect_dynamic-select__oduOS')}
161
+ >
162
+ <div className={getStyles('css-1mfv3n-container')}>
163
+ <div
164
+ style={{
165
+ zIndex: 1,
166
+ background: disabled ? '#eeeeee' : 'hsl(0, 0%, 100%)',
167
+ }}
168
+ className={getStyles('css-mlo5or-control')}
169
+ >
170
+ <div
171
+ onClick={(op) => onClickModal(op, id)}
172
+ style={{ height: '36px' }}
173
+ className={getStyles('css-1huup54-ValueContainer')}
174
+ >
175
+ <div className={getStyles('css-qc6sy-singleValue')}>
176
+ {value}
177
+ </div>
178
+ </div>
179
+ <div className={getStyles('css-1hb7zxy-IndicatorsContainer')}>
180
+ {value !== '' ? (
181
+ <div
182
+ onClick={(op) => onClickDeleteInput(op, id)}
183
+ className={getStyles('css-tlfecz-indicatorContainer')}
184
+ aria-hidden="true"
185
+ >
186
+ <svg
187
+ height="20"
188
+ width="20"
189
+ viewBox="0 0 20 20"
190
+ aria-hidden="true"
191
+ focusable="false"
192
+ className={getStyles('css-tj5bde-Svg')}
193
+ >
194
+ <path d="M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"></path>
195
+ </svg>
205
196
  </div>
197
+ ) : null}
198
+ <span
199
+ className={getStyles('css-1okebmr-indicatorSeparator')}
200
+ ></span>
201
+ <div
202
+ onClick={(op) => onClickModal(op, id)}
203
+ className={getStyles('css-tlfecz-indicatorContainer')}
204
+ aria-hidden="true"
205
+ >
206
+ <svg
207
+ height="20"
208
+ width="20"
209
+ viewBox="0 0 20 20"
210
+ aria-hidden="true"
211
+ focusable="false"
212
+ className={getStyles('css-tj5bde-Svg')}
213
+ >
214
+ <path
215
+ fillRule="evenodd"
216
+ clipRule="evenodd"
217
+ d="M10 20C4.48612 20 0 15.5139 0 10C0 4.48612 4.48612 0 10 0C15.5139 0 20 4.48612 20 10C20 15.5139 15.5139 20 10 20ZM10 1.09864C5.09155 1.09864 1.09864 5.09155 1.09864 10C1.09864 14.9084 5.09155 18.9014 10 18.9014C14.9084 18.9014 18.9014 14.9084 18.9014 10C18.9014 5.09155 14.9084 1.09864 10 1.09864Z"
218
+ />
219
+ <path
220
+ fillRule="evenodd"
221
+ clipRule="evenodd"
222
+ d="M4.68396 9.4093H15.316V10.5906H4.68396V9.4093Z"
223
+ />
224
+ <path
225
+ fillRule="evenodd"
226
+ clipRule="evenodd"
227
+ d="M9.40942 4.68396H10.5908V15.316H9.40942V4.68396Z"
228
+ />
229
+ </svg>
206
230
  </div>
207
- <input
208
- inputmode="none"
209
- style={{ top: '0px', position: 'absolute', zIndex: 0 }}
210
- className={getStyles('input', {
211
- 'is-inline': isInline,
212
- 'is-inline-code': isInlineCode,
213
- 'is-input-filter': isInputFilter,
214
- 'is-input-secondary': isInputSecondary,
215
- 'is-date': isDate,
216
- })}
217
- readOnly={'true'}
218
- // type={'hidden'}
219
- id={id}
220
- value={value}
221
- placeholder={placeholder}
222
- onChange={onChange}
223
- onFocus={onFocus}
224
- onBlur={onBlur}
225
- onClick={onClick}
226
- // onKeyDown={onKeyDown}
227
- maxLength={maxLength}
228
- autoComplete={autoComplete}
229
- disabled={disabled}
230
- min={min}
231
- autoFocus={autoFocus}
232
- onInput={onInput}
233
- accept={accept}
234
- onKeyDown={(op) => pulsar(op, id)}
235
- ></input>
236
231
  </div>
237
232
  </div>
238
-
239
- : <input
233
+ <input
234
+ inputmode="none"
235
+ style={{ top: '0px', position: 'absolute', zIndex: 0 }}
240
236
  className={getStyles('input', {
241
237
  'is-inline': isInline,
242
238
  'is-inline-code': isInlineCode,
@@ -244,8 +240,8 @@ export const Input = ({
244
240
  'is-input-secondary': isInputSecondary,
245
241
  'is-date': isDate,
246
242
  })}
247
- readOnly={readonly}
248
- type={type}
243
+ readOnly={'true'}
244
+ // type={'hidden'}
249
245
  id={id}
250
246
  value={value}
251
247
  placeholder={placeholder}
@@ -253,7 +249,7 @@ export const Input = ({
253
249
  onFocus={onFocus}
254
250
  onBlur={onBlur}
255
251
  onClick={onClick}
256
- onKeyDown={onKeyDown}
252
+ // onKeyDown={onKeyDown}
257
253
  maxLength={maxLength}
258
254
  autoComplete={autoComplete}
259
255
  disabled={disabled}
@@ -261,9 +257,38 @@ export const Input = ({
261
257
  autoFocus={autoFocus}
262
258
  onInput={onInput}
263
259
  accept={accept}
260
+ onKeyDown={(op) => pulsar(op, id)}
264
261
  ></input>
265
- }
266
-
262
+ </div>
263
+ </div>
264
+ ) : (
265
+ <input
266
+ className={getStyles('input', {
267
+ 'is-inline': isInline,
268
+ 'is-inline-code': isInlineCode,
269
+ 'is-input-filter': isInputFilter,
270
+ 'is-input-secondary': isInputSecondary,
271
+ 'is-date': isDate,
272
+ })}
273
+ readOnly={readonly}
274
+ type={type}
275
+ id={id}
276
+ value={value}
277
+ placeholder={placeholder}
278
+ onChange={onChange}
279
+ onFocus={onFocus}
280
+ onBlur={onBlur}
281
+ onClick={onClick}
282
+ onKeyDown={onKeyDown}
283
+ maxLength={maxLength}
284
+ autoComplete={autoComplete}
285
+ disabled={disabled}
286
+ min={min}
287
+ autoFocus={autoFocus}
288
+ onInput={onInput}
289
+ accept={accept}
290
+ ></input>
291
+ )}
267
292
  </>
268
293
  )
269
294
  }
@@ -316,15 +341,15 @@ Input.defaultProps = {
316
341
  isInputFilter: false,
317
342
  isInputSecondary: false,
318
343
  isDate: false,
319
- onChange: () => { },
320
- onFocus: () => { },
321
- onBlur: () => { },
322
- onClick: () => { },
323
- onClickModal: () => { },
324
- onKeyDown: () => { },
325
- onKeyUp: () => { },
326
- onInput: () => { },
327
- getStyles: () => { },
344
+ onChange: () => {},
345
+ onFocus: () => {},
346
+ onBlur: () => {},
347
+ onClick: () => {},
348
+ onClickModal: () => {},
349
+ onKeyDown: () => {},
350
+ onKeyUp: () => {},
351
+ onInput: () => {},
352
+ getStyles: () => {},
328
353
  isViewIcon: false,
329
354
  idIcon: 'Ejemplo',
330
355
  nameIcon: 'user',
@@ -334,7 +359,7 @@ Input.defaultProps = {
334
359
  autoComplete: 'on',
335
360
  disabled: false,
336
361
  readonly: false,
337
- onClickViewPass: () => { },
362
+ onClickViewPass: () => {},
338
363
  viewPass: false,
339
364
  accept: '',
340
365
  isOpenModal: false,
@@ -7,9 +7,15 @@ import withStyles from '../../hocs/withStyles'
7
7
 
8
8
  export const Label = ({ children, getStyles, isHint, isPointer, onClick }) => {
9
9
  return (
10
-
11
- <label onClick={onClick} className={getStyles('label', ['color'], { 'is-hint': isHint, 'is-pointer': isPointer })}>{children}</label>
12
-
10
+ <label
11
+ onClick={onClick}
12
+ className={getStyles('label', ['color'], {
13
+ 'is-hint': isHint,
14
+ 'is-pointer': isPointer,
15
+ })}
16
+ >
17
+ {children}
18
+ </label>
13
19
  )
14
20
  }
15
21
 
@@ -22,11 +28,11 @@ Label.propTypes = {
22
28
  }
23
29
 
24
30
  Label.defaultProps = {
25
- getStyles: () => { },
31
+ getStyles: () => {},
26
32
  children: ' ',
27
33
  isHint: false,
28
34
  color: 'label',
29
- onClick: () => { },
35
+ onClick: () => {},
30
36
  }
31
37
 
32
38
  export default withStyles(styles)(Label)
@@ -67,13 +67,20 @@ export const Modal = ({
67
67
  onClick={handleClose}
68
68
  >
69
69
  <div
70
- className={getStyles(isFullWidth ? 'modal-full' : isFullWidthSoft ? 'modal-full-soft' : 'modal', ['type'])}
70
+ className={getStyles(
71
+ isFullWidth
72
+ ? 'modal-full'
73
+ : isFullWidthSoft
74
+ ? 'modal-full-soft'
75
+ : 'modal',
76
+ ['type']
77
+ )}
71
78
  onClick={createHandlerClick()}
72
79
  >
73
80
  <div className={getStyles('heading')}>
74
81
  {!!onClose && (
75
82
  <Icon
76
- id='btnColsedModal'
83
+ id="btnColsedModal"
77
84
  color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
78
85
  name={isDesktop ? 'cross' : 'angleLeft'}
79
86
  background={isDesktop ? 'transparent' : 'muted'}
@@ -84,7 +91,9 @@ export const Modal = ({
84
91
  {viewSecondaryAction && secondaryAction && !isEmpty(secondaryAction) && (
85
92
  <>
86
93
  <Icon
87
- color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
94
+ color={
95
+ isDesktop && type === 'secondary' ? 'primary' : 'primary'
96
+ }
88
97
  name={secondaryAction?.icon}
89
98
  background={isDesktop ? 'transparent' : 'muted'}
90
99
  onClick={handleSecondaryAction({
@@ -94,73 +103,76 @@ export const Modal = ({
94
103
  />
95
104
 
96
105
  <Horizontal size="xs" />
97
-
98
- </>
99
-
100
- )}
101
-
102
-
103
-
104
- {viewArrowsAction && arrowsActionLeft && arrowsActionRight && !isEmpty(arrowsActionLeft) && !isEmpty(arrowsActionRight) && (
105
- <>
106
-
107
- {arrowsActionRight.view ? <Icon
108
- color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
109
- name={arrowsActionRight?.icon}
110
- background={isDesktop ? 'transparent' : 'muted'}
111
- onClick={handleArrowsActionRight({
112
- onArrowsActionRight: arrowsActionRight?.handler,
113
- })}
114
- size={isDesktop ? 'lg' : 'md'}
115
- /> : null}
116
-
117
- {arrowsActionLeft.view ? <Icon
118
- color={isDesktop && type === 'secondary' ? 'primary' : 'primary'}
119
- name={arrowsActionLeft?.icon}
120
- background={isDesktop ? 'transparent' : 'muted'}
121
- onClick={handleArrowsActionLeft({
122
- onArrowsActionLeft: arrowsActionLeft?.handler,
123
- })}
124
- size={isDesktop ? 'lg' : 'md'}
125
- /> : null}
126
-
127
- <Horizontal size="xs" />
128
-
129
106
  </>
130
-
131
107
  )}
132
108
 
133
-
134
-
135
-
136
- {isClickTitle ?
137
-
138
- <span style={{ cursor: 'pointer', textDecoration: 'underline', color: 'var(--color-primary)' }} onClick={onClickTitle}>
139
- <Heading color='primary' size='lg' weight='light'>
109
+ {viewArrowsAction &&
110
+ arrowsActionLeft &&
111
+ arrowsActionRight &&
112
+ !isEmpty(arrowsActionLeft) &&
113
+ !isEmpty(arrowsActionRight) && (
114
+ <>
115
+ {arrowsActionRight.view ? (
116
+ <Icon
117
+ color={
118
+ isDesktop && type === 'secondary' ? 'primary' : 'primary'
119
+ }
120
+ name={arrowsActionRight?.icon}
121
+ background={isDesktop ? 'transparent' : 'muted'}
122
+ onClick={handleArrowsActionRight({
123
+ onArrowsActionRight: arrowsActionRight?.handler,
124
+ })}
125
+ size={isDesktop ? 'lg' : 'md'}
126
+ />
127
+ ) : null}
128
+
129
+ {arrowsActionLeft.view ? (
130
+ <Icon
131
+ color={
132
+ isDesktop && type === 'secondary' ? 'primary' : 'primary'
133
+ }
134
+ name={arrowsActionLeft?.icon}
135
+ background={isDesktop ? 'transparent' : 'muted'}
136
+ onClick={handleArrowsActionLeft({
137
+ onArrowsActionLeft: arrowsActionLeft?.handler,
138
+ })}
139
+ size={isDesktop ? 'lg' : 'md'}
140
+ />
141
+ ) : null}
142
+
143
+ <Horizontal size="xs" />
144
+ </>
145
+ )}
146
+
147
+ {isClickTitle ? (
148
+ <span
149
+ style={{
150
+ cursor: 'pointer',
151
+ textDecoration: 'underline',
152
+ color: 'var(--color-primary)',
153
+ }}
154
+ onClick={onClickTitle}
155
+ >
156
+ <Heading color="primary" size="lg" weight="light">
140
157
  {titleModal}
141
158
  </Heading>
142
159
  </span>
143
-
144
- :
145
-
146
- <Heading color='black' size='lg' weight='light'>
160
+ ) : (
161
+ <Heading color="black" size="lg" weight="light">
147
162
  {titleModal}
148
163
  </Heading>
149
-
150
- }
151
-
152
-
153
-
164
+ )}
154
165
  </div>
155
166
 
156
- {isFullWidth ?
167
+ {isFullWidth ? (
157
168
  <div className={getStyles('container-full')}>{children}</div>
158
- :
159
- isFullWidthSoft ? <div className={getStyles('container-full-soft')}>{children}</div>
160
- :
161
- <Container><div className={getStyles('container')}>{children}</div></Container>
162
- }
163
-
169
+ ) : isFullWidthSoft ? (
170
+ <div className={getStyles('container-full-soft')}>{children}</div>
171
+ ) : (
172
+ <Container>
173
+ <div className={getStyles('container')}>{children}</div>
174
+ </Container>
175
+ )}
164
176
  </div>
165
177
  </div>
166
178
  )
@@ -185,14 +197,14 @@ Modal.propTypes = {
185
197
  }
186
198
 
187
199
  Modal.defaultProps = {
188
- getStyles: () => { },
200
+ getStyles: () => {},
189
201
  type: 'primary',
190
202
  titleModal: 'Ejemplo titulo',
191
203
  isFullWidth: false,
192
204
  isFullWidthSoft: false,
193
205
  isClickTitle: false,
194
206
  viewSecondaryAction: false,
195
- viewArrowsAction: false
207
+ viewArrowsAction: false,
196
208
  }
197
209
 
198
210
  export default withStyles(styles)(Modal)