imbric-theme 0.4.6 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/.dockerignore +14 -0
- package/.eslintignore +1 -0
- package/.prettierignore +1 -0
- package/atoms/Button/Button.js +8 -0
- package/atoms/Button/Button.module.css +8 -0
- package/atoms/Icon/constants.js +29 -0
- package/index.js +1 -0
- package/molecules/Accordion/Accordion.js +2 -0
- package/molecules/CardDefault/CardDefault.module.css +1 -0
- package/molecules/CardServiceDetail/CardServiceDetail.module.css +1 -1
- package/molecules/CardServices/CardServices.js +1 -1
- package/molecules/CardServices/CardServices.module.css +8 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.js +363 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
- package/molecules/CardServicesFinalized/constants.js +1 -0
- package/molecules/CardServicesFinalized/index.js +3 -0
- package/molecules/RowTable/RowTable.js +158 -136
- package/molecules/RowTable/constants.js +383 -0
- package/package.json +1 -1
- package/public/static/images/second-page-svgrepo-com copia.svg +18 -0
- package/public/static/images/second-page-svgrepo-com.svg +17 -0
package/.dockerignore
ADDED
package/.eslintignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
node_modules
|
package/.prettierignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
node_modules
|
package/atoms/Button/Button.js
CHANGED
@@ -20,6 +20,8 @@ export const Button = ({
|
|
20
20
|
addons,
|
21
21
|
isMuted,
|
22
22
|
isInline,
|
23
|
+
isFloatRight,
|
24
|
+
isFloatLeft,
|
23
25
|
onClick,
|
24
26
|
getStyles,
|
25
27
|
}) => (
|
@@ -29,6 +31,8 @@ export const Button = ({
|
|
29
31
|
className={getStyles('button', ['type'], {
|
30
32
|
'is-inline': isInline || type === 'tertiary',
|
31
33
|
'is-muted': isMuted && type === 'primary',
|
34
|
+
'is-float-right': isFloatRight,
|
35
|
+
'is-float-left': isFloatLeft,
|
32
36
|
})}
|
33
37
|
onClick={onClick && handleClick({ onClick })}
|
34
38
|
>
|
@@ -59,6 +63,8 @@ Button.propTypes = {
|
|
59
63
|
onClick: PropTypes.func,
|
60
64
|
isInline: PropTypes.bool,
|
61
65
|
isMuted: PropTypes.bool,
|
66
|
+
isFloatRight: PropTypes.bool,
|
67
|
+
isFloatLeft: PropTypes.bool,
|
62
68
|
}
|
63
69
|
|
64
70
|
Button.defaultProps = {
|
@@ -66,6 +72,8 @@ Button.defaultProps = {
|
|
66
72
|
getStyles: () => { },
|
67
73
|
onClick: () => { },
|
68
74
|
isInline: false,
|
75
|
+
isFloatRight: false,
|
76
|
+
isFloatLeft: false,
|
69
77
|
}
|
70
78
|
|
71
79
|
export default withStyles(styles)(Button)
|
package/atoms/Icon/constants.js
CHANGED
@@ -934,6 +934,35 @@ export const iconsMap = {
|
|
934
934
|
</>
|
935
935
|
),
|
936
936
|
},
|
937
|
+
firstElement: {
|
938
|
+
viewBox: '0 0 24 24',
|
939
|
+
svg: (
|
940
|
+
<>
|
941
|
+
<path class="st0" d="M20.4,0H3.6C3.2,0,2.9,0.3,2.9,0.6v22.7c0,0.4,0.3,0.6,0.6,0.6h12.6c0.2,0,0.4-0.1,0.5-0.2l4.3-4.8
|
942
|
+
c0.1-0.1,0.2-0.3,0.2-0.4V0.6C21.1,0.3,20.8,0,20.4,0z M19,16.8l-3.8,0l0,0c-0.2,0-0.4,0.1-0.5,0.2c-0.1,0.1-0.2,0.3-0.2,0.5
|
943
|
+
l0,4.8H4.9V1.6H19C19,1.6,19,16.8,19,16.8z"/>
|
944
|
+
<path class="st0" d="M15.8,13.2h-4v0l1-0.8c1.6-1.4,2.9-2.8,2.9-4.6c0-1.9-1.3-3.4-3.8-3.4c-1.5,0-2.7,0.5-3.5,1.1L9,7.2
|
945
|
+
c0.6-0.4,1.4-0.9,2.3-0.9c1.2,0,1.8,0.7,1.8,1.6c0,1.3-1.2,2.5-3.5,4.6l-1.4,1.3v1.5h7.6V13.2z"/>
|
946
|
+
</>
|
947
|
+
),
|
948
|
+
},
|
949
|
+
secondElement: {
|
950
|
+
viewBox: '0 0 24 24',
|
951
|
+
svg: (
|
952
|
+
<>
|
953
|
+
<g>
|
954
|
+
<g>
|
955
|
+
<path class="st0" d="M20.4,0H3.6C3.2,0,2.9,0.3,2.9,0.6v22.7c0,0.4,0.3,0.6,0.6,0.6h12.6c0.2,0,0.4-0.1,0.5-0.2l4.3-4.8
|
956
|
+
c0.1-0.1,0.2-0.3,0.2-0.4V0.6C21.1,0.3,20.8,0,20.4,0z M19,16.8h-3.8l0,0c-0.2,0-0.4,0.1-0.5,0.2s-0.2,0.3-0.2,0.5v4.8H4.9V1.6H19
|
957
|
+
V16.8z"/>
|
958
|
+
</g>
|
959
|
+
</g>
|
960
|
+
<g>
|
961
|
+
<path d="M13.4,15.3h-2.1V7.6c-0.8,0.7-1.6,1.2-2.7,1.6V7.3c0.5-0.2,1.1-0.5,1.8-1c0.6-0.5,1.1-1.1,1.3-1.7h1.7V15.3z" />
|
962
|
+
</g>
|
963
|
+
</>
|
964
|
+
),
|
965
|
+
},
|
937
966
|
|
938
967
|
}
|
939
968
|
|
package/index.js
CHANGED
@@ -41,6 +41,7 @@ export { default as AddButton } from './molecules/AddButton'
|
|
41
41
|
export { default as ButtonIcon } from './molecules/ButtonIcon'
|
42
42
|
export { default as CardServiceDetail } from './molecules/CardServiceDetail'
|
43
43
|
export { default as CardServices } from './molecules/CardServices'
|
44
|
+
export { default as CardServicesFinalized } from './molecules/CardServicesFinalized'
|
44
45
|
export { default as CardProductTypesBooking } from './molecules/CardProductTypesBooking'
|
45
46
|
export { default as Dropdown } from './molecules/Dropdown'
|
46
47
|
export { default as LoadingError } from './molecules/LoadingError'
|
@@ -20,6 +20,7 @@ export const Accordion = ({
|
|
20
20
|
onToggle,
|
21
21
|
getStyles,
|
22
22
|
defaultIsCollapsed,
|
23
|
+
idAccordion,
|
23
24
|
addons,
|
24
25
|
}) => {
|
25
26
|
const [isCollapsed, setIsCollapsed] = useState(defaultIsCollapsed)
|
@@ -27,6 +28,7 @@ export const Accordion = ({
|
|
27
28
|
return (
|
28
29
|
<div className={getStyles('accordion')}>
|
29
30
|
<div
|
31
|
+
id={idAccordion}
|
30
32
|
className={getStyles('container')}
|
31
33
|
onClick={handleToggle({ onToggle, isCollapsed, setIsCollapsed })}
|
32
34
|
>
|
@@ -29,9 +29,17 @@
|
|
29
29
|
border-top: 1px solid #dfe8f2;
|
30
30
|
}
|
31
31
|
|
32
|
+
.card-content-p-box {
|
33
|
+
padding: 6px;
|
34
|
+
}
|
35
|
+
|
32
36
|
.card-content-action {
|
33
37
|
padding-left: 10px;
|
34
38
|
border-left: 1px solid #dfe8f2;
|
39
|
+
height: 100%;
|
40
|
+
display: flex;
|
41
|
+
flex-direction: column;
|
42
|
+
justify-content: space-around;
|
35
43
|
}
|
36
44
|
|
37
45
|
.card-content-p {
|
@@ -0,0 +1,363 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
import ReactTooltip from 'react-tooltip'
|
4
|
+
import { Horizontal, Vertical } from '../../layout/Spacer/components'
|
5
|
+
import Label from '../../atoms/Label'
|
6
|
+
import Icon from '../../atoms/Icon'
|
7
|
+
|
8
|
+
import styles from './CardServicesFinalized.module.css'
|
9
|
+
import { options } from './constants'
|
10
|
+
import withStyles from '../../hocs/withStyles'
|
11
|
+
|
12
|
+
export const handleClick = ({ onClick }) => (event) => {
|
13
|
+
onClick(event)
|
14
|
+
}
|
15
|
+
|
16
|
+
export const CardServicesFinalized = ({
|
17
|
+
getStyles,
|
18
|
+
onClick,
|
19
|
+
isClickable,
|
20
|
+
txtDateService,
|
21
|
+
txtOriginService,
|
22
|
+
txtDestinationService,
|
23
|
+
txtPriceService,
|
24
|
+
txtUserService,
|
25
|
+
txtRefService,
|
26
|
+
txtUserNumberService,
|
27
|
+
onClickUserView,
|
28
|
+
txtTootipUserView,
|
29
|
+
onClickReturnOrder,
|
30
|
+
txtTootipReturnOrder,
|
31
|
+
onClickRepeatOrder,
|
32
|
+
txtTootipRepeatOrder,
|
33
|
+
onClickEdit,
|
34
|
+
txtTootipEdit,
|
35
|
+
onClickTrash,
|
36
|
+
txtTootipTrash,
|
37
|
+
selectCard,
|
38
|
+
statusService,
|
39
|
+
}) => {
|
40
|
+
|
41
|
+
// STATE TOOLTIP
|
42
|
+
const [isToolTipMounted, setIsToolTipMounted] = useState(false)
|
43
|
+
|
44
|
+
// TOOLTIP
|
45
|
+
const handleMouseEnter = () => {
|
46
|
+
setIsToolTipMounted(true)
|
47
|
+
}
|
48
|
+
const handleMouseLeave = () => {
|
49
|
+
setIsToolTipMounted(false)
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
return (
|
54
|
+
<div
|
55
|
+
onClick={onClick && handleClick({ onClick })}
|
56
|
+
className={getStyles('card-services-finalized',
|
57
|
+
{ 'is-clickable': isClickable, },
|
58
|
+
{ 'selectCard': selectCard },
|
59
|
+
// { 'flip-out-hor-bottom': selectCard }
|
60
|
+
)}
|
61
|
+
>
|
62
|
+
|
63
|
+
<div className={getStyles('card-content-p-box')}>
|
64
|
+
|
65
|
+
<p className={getStyles('card-content-p')}>
|
66
|
+
<Icon
|
67
|
+
name="clock"
|
68
|
+
size="xs"
|
69
|
+
/>
|
70
|
+
|
71
|
+
{txtDateService}
|
72
|
+
</p>
|
73
|
+
<Vertical size="xs" />
|
74
|
+
|
75
|
+
<div className={getStyles('card-content')}>
|
76
|
+
|
77
|
+
<div className={getStyles('card-subcontent')}>
|
78
|
+
|
79
|
+
<Vertical size="xs" />
|
80
|
+
|
81
|
+
<Label >
|
82
|
+
<Icon
|
83
|
+
name="originOrder"
|
84
|
+
size="xs"
|
85
|
+
color="highlight"
|
86
|
+
/>
|
87
|
+
|
88
|
+
Origen
|
89
|
+
</Label>
|
90
|
+
|
91
|
+
<p className={getStyles('card-content-p')}>{txtOriginService}</p>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<Horizontal size="sm" />
|
96
|
+
|
97
|
+
<div className={getStyles('card-subcontent')}>
|
98
|
+
|
99
|
+
<Vertical size="xs" />
|
100
|
+
|
101
|
+
<Label >
|
102
|
+
<Icon
|
103
|
+
name="destinationOrder"
|
104
|
+
size="xs"
|
105
|
+
color="highlight"
|
106
|
+
/>
|
107
|
+
|
108
|
+
Destino
|
109
|
+
</Label>
|
110
|
+
|
111
|
+
<p className={getStyles('card-content-p')}>{txtDestinationService}</p>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<Vertical size="xs" />
|
118
|
+
|
119
|
+
<div className={getStyles('card-content')}>
|
120
|
+
|
121
|
+
<div className={getStyles('card-subcontent')}>
|
122
|
+
|
123
|
+
<Vertical size="xs" />
|
124
|
+
|
125
|
+
<Label >
|
126
|
+
<Icon
|
127
|
+
name="price"
|
128
|
+
size="xs"
|
129
|
+
color="highlight"
|
130
|
+
/>
|
131
|
+
|
132
|
+
Precio
|
133
|
+
</Label>
|
134
|
+
|
135
|
+
<p className={getStyles('card-content-p')}>{txtPriceService}</p>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<Horizontal size="sm" />
|
140
|
+
|
141
|
+
<div className={getStyles('card-subcontent')}>
|
142
|
+
|
143
|
+
<Vertical size="xs" />
|
144
|
+
|
145
|
+
<Label >
|
146
|
+
<Icon
|
147
|
+
name="user"
|
148
|
+
size="xs"
|
149
|
+
color="highlight"
|
150
|
+
/>
|
151
|
+
|
152
|
+
Pasajero
|
153
|
+
</Label>
|
154
|
+
|
155
|
+
<p className={getStyles('card-content-p')}>{txtUserService}</p>
|
156
|
+
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<Vertical size="xs" />
|
162
|
+
|
163
|
+
<div className={getStyles('card-content')}>
|
164
|
+
|
165
|
+
<div className={getStyles('card-subcontent')}>
|
166
|
+
|
167
|
+
<Vertical size="xs" />
|
168
|
+
|
169
|
+
<Label >
|
170
|
+
<Icon
|
171
|
+
name="reference"
|
172
|
+
size="xs"
|
173
|
+
color="highlight"
|
174
|
+
/>
|
175
|
+
|
176
|
+
REF
|
177
|
+
</Label>
|
178
|
+
|
179
|
+
<p className={getStyles('card-content-p')}>{txtRefService}</p>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<Horizontal size="sm" />
|
184
|
+
|
185
|
+
<div className={getStyles('card-subcontent')}>
|
186
|
+
|
187
|
+
<Vertical size="xs" />
|
188
|
+
|
189
|
+
<Label >
|
190
|
+
<Icon
|
191
|
+
name="userNumber"
|
192
|
+
size="xs"
|
193
|
+
color="highlight"
|
194
|
+
/>
|
195
|
+
|
196
|
+
Usuario
|
197
|
+
</Label>
|
198
|
+
|
199
|
+
<p className={getStyles('card-content-p')}>{txtUserNumberService}</p>
|
200
|
+
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div className={getStyles('card-content-action')}>
|
208
|
+
|
209
|
+
<div className={getStyles('card-subcontent-action')}>
|
210
|
+
|
211
|
+
<span
|
212
|
+
data-tip
|
213
|
+
data-for='userView'
|
214
|
+
onMouseEnter={handleMouseEnter}
|
215
|
+
onMouseLeave={handleMouseLeave}
|
216
|
+
>
|
217
|
+
<Icon
|
218
|
+
color="highlight"
|
219
|
+
id='userViewIcon'
|
220
|
+
isClickable
|
221
|
+
name="userView"
|
222
|
+
onClick={onClickUserView}
|
223
|
+
size="sm"
|
224
|
+
className={getStyles('icon-view')}
|
225
|
+
/>
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
{isToolTipMounted ? (
|
230
|
+
<ReactTooltip id='userView' type='error'>
|
231
|
+
<span>{txtTootipUserView}</span>
|
232
|
+
</ReactTooltip>
|
233
|
+
) : null}
|
234
|
+
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div className={getStyles('card-subcontent-action')}>
|
238
|
+
|
239
|
+
<span
|
240
|
+
data-tip
|
241
|
+
data-for='returnOrder'
|
242
|
+
onMouseEnter={handleMouseEnter}
|
243
|
+
onMouseLeave={handleMouseLeave}
|
244
|
+
>
|
245
|
+
<Icon
|
246
|
+
color="highlight"
|
247
|
+
id='returnOrderIcon'
|
248
|
+
isClickable
|
249
|
+
name="returnOrder"
|
250
|
+
onClick={onClickReturnOrder}
|
251
|
+
size="sm"
|
252
|
+
className={getStyles('icon-view')}
|
253
|
+
/>
|
254
|
+
|
255
|
+
</span>
|
256
|
+
|
257
|
+
{isToolTipMounted ? (
|
258
|
+
<ReactTooltip id='returnOrder' type='error'>
|
259
|
+
<span>{txtTootipReturnOrder}</span>
|
260
|
+
</ReactTooltip>
|
261
|
+
) : null}
|
262
|
+
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<div className={getStyles('card-subcontent-action')}>
|
266
|
+
|
267
|
+
<span
|
268
|
+
data-tip
|
269
|
+
data-for='repeatOrder'
|
270
|
+
onMouseEnter={handleMouseEnter}
|
271
|
+
onMouseLeave={handleMouseLeave}
|
272
|
+
>
|
273
|
+
<Icon
|
274
|
+
color="highlight"
|
275
|
+
id='repeatOrderIcon'
|
276
|
+
isClickable
|
277
|
+
name="repeatOrder"
|
278
|
+
onClick={onClickRepeatOrder}
|
279
|
+
size="sm"
|
280
|
+
className={getStyles('icon-view')}
|
281
|
+
/>
|
282
|
+
|
283
|
+
</span>
|
284
|
+
|
285
|
+
{isToolTipMounted ? (
|
286
|
+
<ReactTooltip id='repeatOrder' type='error'>
|
287
|
+
<span>{txtTootipRepeatOrder}</span>
|
288
|
+
</ReactTooltip>
|
289
|
+
) : null}
|
290
|
+
|
291
|
+
|
292
|
+
</div>
|
293
|
+
|
294
|
+
<div className={getStyles('card-subcontent-action')}>
|
295
|
+
|
296
|
+
<Icon
|
297
|
+
className={getStyles(
|
298
|
+
// { 'icon-view-status10': statusService === 10 || -30 },
|
299
|
+
// { 'icon-view-status20': statusService === 20 },
|
300
|
+
{ 'icon-view-status30': statusService === 30 || -20 || -40 },
|
301
|
+
)}
|
302
|
+
name="circleStatus"
|
303
|
+
size="sm"
|
304
|
+
/>
|
305
|
+
|
306
|
+
</div>
|
307
|
+
|
308
|
+
</div>
|
309
|
+
|
310
|
+
{/* {children} */}
|
311
|
+
</div>
|
312
|
+
)
|
313
|
+
}
|
314
|
+
|
315
|
+
CardServicesFinalized.propTypes = {
|
316
|
+
getStyles: PropTypes.func.isRequired,
|
317
|
+
onClick: PropTypes.func,
|
318
|
+
isClickable: PropTypes.bool,
|
319
|
+
txtDateService: PropTypes.any,
|
320
|
+
txtOriginService: PropTypes.string,
|
321
|
+
txtDestinationService: PropTypes.string,
|
322
|
+
txtPriceService: PropTypes.string,
|
323
|
+
txtUserService: PropTypes.string,
|
324
|
+
txtRefService: PropTypes.string,
|
325
|
+
txtUserNumberService: PropTypes.string,
|
326
|
+
onClickUserView: PropTypes.func,
|
327
|
+
txtTootipUserView: PropTypes.string,
|
328
|
+
onClickReturnOrder: PropTypes.func,
|
329
|
+
txtTootipReturnOrder: PropTypes.string,
|
330
|
+
onClickRepeatOrder: PropTypes.func,
|
331
|
+
txtTootipRepeatOrder: PropTypes.string,
|
332
|
+
onClickEdit: PropTypes.func,
|
333
|
+
txtTootipEdit: PropTypes.string,
|
334
|
+
onClickTrash: PropTypes.func,
|
335
|
+
txtTootipTrash: PropTypes.string,
|
336
|
+
selectCard: PropTypes.bool,
|
337
|
+
statusService: PropTypes.number,
|
338
|
+
}
|
339
|
+
|
340
|
+
CardServicesFinalized.defaultProps = {
|
341
|
+
getStyles: () => { },
|
342
|
+
txtDateService: '31/08/2022 13:21',
|
343
|
+
txtOriginService: 'Aeropuerto Barajas T4, Madrid, España',
|
344
|
+
txtDestinationService: 'Estación de Chamartín, Madrid, España',
|
345
|
+
txtPriceService: '15,50 €',
|
346
|
+
txtUserService: 'Alberto Alvarez',
|
347
|
+
txtRefService: '1946980768',
|
348
|
+
txtUserNumberService: 'WF3941',
|
349
|
+
onClickUserView: () => { },
|
350
|
+
txtTootipUserView: 'Ver detalle del servicio',
|
351
|
+
onClickReturnOrder: () => { },
|
352
|
+
txtTootipReturnOrder: 'Crear retorno del servicio',
|
353
|
+
onClickRepeatOrder: () => { },
|
354
|
+
txtTootipRepeatOrder: 'Repetir servicio',
|
355
|
+
onClickEdit: () => { },
|
356
|
+
txtTootipEdit: 'Editar servicio (solo se puede editar 60min. antes)',
|
357
|
+
onClickTrash: () => { },
|
358
|
+
txtTootipTrash: 'Cancelar servicio',
|
359
|
+
selectCard: false,
|
360
|
+
statusService: 10,
|
361
|
+
}
|
362
|
+
|
363
|
+
export default withStyles(styles)(CardServicesFinalized)
|