imbric-theme 0.5.8 → 0.6.0

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "editor.formatOnSave": true
3
+ }
package/Dockerfile CHANGED
@@ -8,7 +8,6 @@ COPY . /app/
8
8
 
9
9
  ## build app stage
10
10
  RUN yarn install --network-timeout 200000 \
11
- && yarn add next@11 react@18 react-dom@18 --network-timeout 200000 \
12
11
  && yarn build
13
12
 
14
13
  ## final image stage
@@ -20,8 +20,8 @@ export const getListTemplate = (Component, styles) => ({ items, ...args }) =>
20
20
  )
21
21
  })
22
22
 
23
- export const getOptionsArgTypes = (options) => ({
24
- description: '**options:**',
23
+ export const getOptionsArgTypes = (options, description = '**Options:**') => ({
24
+ description: description,
25
25
  table: {
26
26
  type: { summary: options.map((option) => `'${option}'`).join('|') },
27
27
  },
package/index.js CHANGED
@@ -58,6 +58,7 @@ export { default as FooterTable } from './molecules/FooterTable'
58
58
  export { default as DynamicSelect } from './molecules/DynamicSelect'
59
59
  export { default as DatePicker } from './molecules/DynamicSelect'
60
60
  export { default as CardDefault } from './molecules/CardDefault'
61
+ export { default as Tabs } from './molecules/Tabs'
61
62
 
62
63
 
63
64
 
@@ -33,7 +33,18 @@ export const CardServiceDetail = ({
33
33
  txtSmsDriverService,
34
34
  onClickCross,
35
35
  txtTootipCross,
36
- selectCard,
36
+ labelUserService,
37
+ labelZoneService,
38
+ labelTimeTotalService,
39
+ labelDistanceService,
40
+ labelServiceService,
41
+ labelPayService,
42
+ labelPriceService,
43
+ labelRefService,
44
+ labelModelCarService,
45
+ labelCarNumberService,
46
+ labelNumberDriverService,
47
+ labelSmsDriverService,
37
48
  }) => {
38
49
 
39
50
  // STATE TOOLTIP
@@ -81,7 +92,7 @@ export const CardServiceDetail = ({
81
92
  color="highlight"
82
93
  />
83
94
   
84
- Creado por:
95
+ {labelUserService}
85
96
  </Label>
86
97
 
87
98
  <p className={getStyles('card-content-p')}>&nbsp; {txtUserService}</p>
@@ -101,7 +112,7 @@ export const CardServiceDetail = ({
101
112
  color="highlight"
102
113
  />
103
114
  &nbsp;
104
- Recogida
115
+ {labelZoneService}
105
116
  </Label>
106
117
 
107
118
  <p className={getStyles('card-content-p')}>{txtZoneService}</p>
@@ -117,7 +128,7 @@ export const CardServiceDetail = ({
117
128
  color="highlight"
118
129
  />
119
130
  &nbsp;
120
- Tiempo estimado
131
+ {labelTimeTotalService}
121
132
  </Label>
122
133
 
123
134
  <p className={getStyles('card-content-p')}>{txtTimeTotalService}</p>
@@ -133,7 +144,7 @@ export const CardServiceDetail = ({
133
144
  color="highlight"
134
145
  />
135
146
  &nbsp;
136
- Distancia
147
+ {labelDistanceService}
137
148
  </Label>
138
149
 
139
150
  <p className={getStyles('card-content-p')}>{txtDistanceService}</p>
@@ -142,7 +153,6 @@ export const CardServiceDetail = ({
142
153
 
143
154
  </div>
144
155
 
145
-
146
156
  <div className={getStyles('card-content')}>
147
157
 
148
158
  <div className={getStyles('card-subcontent')}>
@@ -154,7 +164,7 @@ export const CardServiceDetail = ({
154
164
  color="highlight"
155
165
  />
156
166
  &nbsp;
157
- Servicio
167
+ {labelServiceService}
158
168
  </Label>
159
169
 
160
170
  <p className={getStyles('card-content-p')}>{txtServiceService}</p>
@@ -170,7 +180,7 @@ export const CardServiceDetail = ({
170
180
  color="highlight"
171
181
  />
172
182
  &nbsp;
173
- Método de pago
183
+ {labelPayService}
174
184
  </Label>
175
185
 
176
186
  <p className={getStyles('card-content-p')}>{txtPayService}</p>
@@ -186,7 +196,7 @@ export const CardServiceDetail = ({
186
196
  color="highlight"
187
197
  />
188
198
  &nbsp;
189
- Precio estimado
199
+ {labelPriceService}
190
200
  </Label>
191
201
 
192
202
  <p className={getStyles('card-content-p')}>{txtPriceService}</p>
@@ -195,7 +205,6 @@ export const CardServiceDetail = ({
195
205
 
196
206
  </div>
197
207
 
198
-
199
208
  <div className={getStyles('card-content')}>
200
209
 
201
210
  <div className={getStyles('card-subcontent')}>
@@ -207,7 +216,7 @@ export const CardServiceDetail = ({
207
216
  color="highlight"
208
217
  />
209
218
  &nbsp;
210
- Proveedor
219
+ {labelRefService}
211
220
  </Label>
212
221
 
213
222
  <p className={getStyles('card-content-p')}>{txtRefService}</p>
@@ -223,7 +232,7 @@ export const CardServiceDetail = ({
223
232
  color="highlight"
224
233
  />
225
234
  &nbsp;
226
- Modelo
235
+ {labelModelCarService}
227
236
  </Label>
228
237
 
229
238
  <p className={getStyles('card-content-p')}>{txtModelCarService}</p>
@@ -239,7 +248,7 @@ export const CardServiceDetail = ({
239
248
  color="highlight"
240
249
  />
241
250
  &nbsp;
242
- Matrícula
251
+ {labelCarNumberService}
243
252
  </Label>
244
253
 
245
254
  <p className={getStyles('card-content-p')}>{txtCarNumberService}</p>
@@ -259,7 +268,7 @@ export const CardServiceDetail = ({
259
268
  color="highlight"
260
269
  />
261
270
  &nbsp;
262
- Telefono conductor
271
+ {labelNumberDriverService}
263
272
  </Label>
264
273
 
265
274
  <p className={getStyles('card-content-p')}>{txtNumberDriverService}</p>
@@ -275,7 +284,7 @@ export const CardServiceDetail = ({
275
284
  color="highlight"
276
285
  />
277
286
  &nbsp;
278
- Mensaje al conductor
287
+ {labelSmsDriverService}
279
288
  </Label>
280
289
 
281
290
  <p className={getStyles('card-content-p')}>{txtSmsDriverService}</p>
@@ -341,6 +350,18 @@ CardServiceDetail.propTypes = {
341
350
  onClickCross: PropTypes.func,
342
351
  txtTootipCross: PropTypes.string,
343
352
  selectCard: PropTypes.bool,
353
+ labelUserService: PropTypes.string,
354
+ labelZoneService: PropTypes.string,
355
+ labelTimeTotalService: PropTypes.string,
356
+ labelDistanceService: PropTypes.string,
357
+ labelServiceService: PropTypes.string,
358
+ labelPayService: PropTypes.string,
359
+ labelPriceService: PropTypes.string,
360
+ labelRefService: PropTypes.string,
361
+ labelModelCarService: PropTypes.string,
362
+ labelCarNumberService: PropTypes.string,
363
+ labelNumberDriverService: PropTypes.string,
364
+ labelSmsDriverService: PropTypes.string,
344
365
  }
345
366
 
346
367
  CardServiceDetail.defaultProps = {
@@ -362,6 +383,18 @@ CardServiceDetail.defaultProps = {
362
383
  onClickCross: () => { },
363
384
  txtTootipCross: 'Cerrar',
364
385
  selectCard: false,
386
+ labelUserService: 'Creado por:',
387
+ labelZoneService: 'Recogida',
388
+ labelTimeTotalService: 'Tiempo estimado',
389
+ labelDistanceService: 'Distancia',
390
+ labelServiceService: 'Servicio',
391
+ labelPayService: 'Método de pago',
392
+ labelPriceService: 'Precio estimado',
393
+ labelRefService: 'Proveedor',
394
+ labelModelCarService: ' Modelo',
395
+ labelCarNumberService: ' Matrícula',
396
+ labelNumberDriverService: ' Telefono conductor',
397
+ labelSmsDriverService: 'Mensaje al conductor',
365
398
  }
366
399
 
367
400
  export default withStyles(styles)(CardServiceDetail)
@@ -36,6 +36,12 @@ export const CardServices = ({
36
36
  txtTootipTrash,
37
37
  selectCard,
38
38
  statusService,
39
+ labelOriginService,
40
+ labelDestinationService,
41
+ labelServiceService,
42
+ labelUserService,
43
+ labelRefService,
44
+ labelUserNumberService,
39
45
  }) => {
40
46
 
41
47
  // STATE TOOLTIP
@@ -85,7 +91,7 @@ export const CardServices = ({
85
91
  color="highlight"
86
92
  />
87
93
  &nbsp;
88
- Origen
94
+ {labelOriginService}
89
95
  </Label>
90
96
 
91
97
  <p className={getStyles('card-content-p')}>{txtOriginService}</p>
@@ -105,7 +111,7 @@ export const CardServices = ({
105
111
  color="highlight"
106
112
  />
107
113
  &nbsp;
108
- Destino
114
+ {labelDestinationService}
109
115
  </Label>
110
116
 
111
117
  <p className={getStyles('card-content-p')}>{txtDestinationService}</p>
@@ -129,7 +135,7 @@ export const CardServices = ({
129
135
  color="highlight"
130
136
  />
131
137
  &nbsp;
132
- Servicio
138
+ {labelServiceService}
133
139
  </Label>
134
140
 
135
141
  <p className={getStyles('card-content-p')}>{txtServiceService}</p>
@@ -149,7 +155,7 @@ export const CardServices = ({
149
155
  color="highlight"
150
156
  />
151
157
  &nbsp;
152
- Pasajero
158
+ {labelUserService}
153
159
  </Label>
154
160
 
155
161
  <p className={getStyles('card-content-p')}>{txtUserService}</p>
@@ -173,7 +179,7 @@ export const CardServices = ({
173
179
  color="highlight"
174
180
  />
175
181
  &nbsp;
176
- REF
182
+ {labelRefService}
177
183
  </Label>
178
184
 
179
185
  <p className={getStyles('card-content-p')}>{txtRefService}</p>
@@ -193,7 +199,7 @@ export const CardServices = ({
193
199
  color="highlight"
194
200
  />
195
201
  &nbsp;
196
- Usuario
202
+ {labelUserNumberService}
197
203
  </Label>
198
204
 
199
205
  <p className={getStyles('card-content-p')}>{txtUserNumberService}</p>
@@ -215,7 +221,7 @@ export const CardServices = ({
215
221
  onMouseLeave={handleMouseLeave}
216
222
  >
217
223
  <Icon
218
- color="highlight"
224
+ color="highlight"
219
225
  id='userViewIcon'
220
226
  isClickable
221
227
  name="userView"
@@ -243,7 +249,7 @@ export const CardServices = ({
243
249
  onMouseLeave={handleMouseLeave}
244
250
  >
245
251
  <Icon
246
- color="highlight"
252
+ color="highlight"
247
253
  id='returnOrderIcon'
248
254
  isClickable
249
255
  name="returnOrder"
@@ -271,7 +277,7 @@ export const CardServices = ({
271
277
  onMouseLeave={handleMouseLeave}
272
278
  >
273
279
  <Icon
274
- color="highlight"
280
+ color="highlight"
275
281
  id='repeatOrderIcon'
276
282
  isClickable
277
283
  name="repeatOrder"
@@ -300,7 +306,7 @@ export const CardServices = ({
300
306
  onMouseLeave={handleMouseLeave}
301
307
  >
302
308
  <Icon
303
- color="highlight"
309
+ color="highlight"
304
310
  id='editIcon'
305
311
  isClickable
306
312
  name="edit"
@@ -329,7 +335,7 @@ export const CardServices = ({
329
335
  onMouseLeave={handleMouseLeave}
330
336
  >
331
337
  <Icon
332
- color="highlight"
338
+ color="highlight"
333
339
  id='trashIcon'
334
340
  isClickable
335
341
  name="trash"
@@ -351,11 +357,11 @@ export const CardServices = ({
351
357
  <div className={getStyles('card-subcontent-action')}>
352
358
 
353
359
  <Icon
354
- className={getStyles(
355
- { 'icon-view-status10': statusService === 10 || -30 },
356
- { 'icon-view-status20': statusService === 20 },
357
- // { 'icon-view-status30': statusService === 30 || -20 || -40 },
358
- )}
360
+ className={getStyles(
361
+ { 'icon-view-status10': statusService === 10 || -30 },
362
+ { 'icon-view-status20': statusService === 20 },
363
+ // { 'icon-view-status30': statusService === 30 || -20 || -40 },
364
+ )}
359
365
  name="circleStatus"
360
366
  size="sm"
361
367
  />
@@ -392,6 +398,12 @@ CardServices.propTypes = {
392
398
  txtTootipTrash: PropTypes.string,
393
399
  selectCard: PropTypes.bool,
394
400
  statusService: PropTypes.number,
401
+ labelOriginService: PropTypes.string,
402
+ labelDestinationService: PropTypes.string,
403
+ labelServiceService: PropTypes.string,
404
+ labelUserService: PropTypes.string,
405
+ labelRefService: PropTypes.string,
406
+ labelUserNumberService: PropTypes.string,
395
407
  }
396
408
 
397
409
  CardServices.defaultProps = {
@@ -415,6 +427,12 @@ CardServices.defaultProps = {
415
427
  txtTootipTrash: 'Cancelar servicio',
416
428
  selectCard: false,
417
429
  statusService: 10,
430
+ labelOriginService: 'Origen',
431
+ labelDestinationService: 'Destino',
432
+ labelServiceService: 'Servicio',
433
+ labelUserService: 'Pasajero',
434
+ labelRefService: 'REF',
435
+ labelUserNumberService: 'Usuario',
418
436
  }
419
437
 
420
438
  export default withStyles(styles)(CardServices)
@@ -7,7 +7,11 @@ import withStyles from '../../hocs/withStyles'
7
7
 
8
8
  import Tab from '../../atoms/Tab/Tab'
9
9
 
10
- export const Tabs = ({ getStyles, viewTabs }) => {
10
+ export const handleClick = ({ onClickTab }) => (e, index) => {
11
+ onClickTab(e, index)
12
+ }
13
+
14
+ export const Tabs = ({ getStyles, viewTabs, options, onClickTab }) => {
11
15
 
12
16
  if (viewTabs) {
13
17
  return (
@@ -18,12 +22,12 @@ export const Tabs = ({ getStyles, viewTabs }) => {
18
22
 
19
23
  <ul>
20
24
 
21
- {options.itemTabs.map((item, index) => (
25
+ {options.map((item, index) => (
22
26
 
23
27
  <Tab
24
28
  key={index}
25
- activeTab={false}
26
- onClick={function noRefCheck() { }}
29
+ activeTab={item.active}
30
+ onClick={(e) => onClickTab(e, index) && handleClick({ onClickTab } )}
27
31
  viewTab={item.view}
28
32
  >
29
33
  {item.text}
@@ -44,10 +48,12 @@ export const Tabs = ({ getStyles, viewTabs }) => {
44
48
 
45
49
  Tabs.propTypes = {
46
50
  getStyles: PropTypes.func.isRequired,
51
+ onClickTab: PropTypes.func
47
52
  }
48
53
 
49
54
  Tabs.defaultProps = {
50
55
  getStyles: () => { },
56
+ onClickTab: () => { },
51
57
  }
52
58
 
53
- export default withStyles(styles)(Tabs)
59
+ export default withStyles(styles)(Tabs)
@@ -9,4 +9,5 @@
9
9
  justify-content: center;
10
10
  align-items: center;
11
11
  margin: 0;
12
+ padding: 0;
12
13
  }
@@ -4,26 +4,31 @@ export const options = {
4
4
  text: "Taxi",
5
5
  href: "/taxi",
6
6
  view: true,
7
+ active: false,
7
8
  },
8
9
  {
9
10
  text: "Parking",
10
11
  href: "/parking",
11
12
  view: true,
13
+ active: false,
12
14
  },
13
15
  {
14
16
  text: "Sharing",
15
17
  href: "/sharing",
16
18
  view: true,
19
+ active: false,
17
20
  },
18
21
  {
19
22
  text: "T. Publico",
20
23
  href: "/sharing",
21
24
  view: true,
25
+ active: false,
22
26
  },
23
27
  {
24
28
  text: "Hoja de Km",
25
29
  href: "/sharing",
26
30
  view: true,
31
+ active: false,
27
32
  },
28
33
  ],
29
- }
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",
@@ -97,6 +97,7 @@
97
97
  "jest": "26.4.2",
98
98
  "lint-staged": "10.3.0",
99
99
  "minireset.css": "0.0.6",
100
+ "next": "11",
100
101
  "npm-run-all": "4.1.5",
101
102
  "prettier": "2.1.1",
102
103
  "react": "18",