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.
@@ -0,0 +1,213 @@
1
+ .card-services-finalized {
2
+ /* display: flex; */
3
+ width: 100%;
4
+ align-items: center;
5
+ padding: 2px 10px;
6
+ border: var(--border-width-thin) solid var(--color-base-transparent);
7
+ border-radius: var(--card-border-radius);
8
+ box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);
9
+ color: var(--color-font-base);
10
+ transition: box-shadow .28s cubic-bezier(.4, 0, .2, 1);
11
+ background-color: #fff;
12
+ margin: 0;
13
+ cursor: auto;
14
+ max-width: 360px;
15
+ min-width: 360px;
16
+
17
+ align-items: center;
18
+ align-content: center;
19
+ justify-content: space-around;
20
+ margin-bottom: 10px;
21
+ display: flex;
22
+
23
+ }
24
+
25
+ .card-content {
26
+ display: flex;
27
+ align-items: flex-start;
28
+ align-content: space-between;
29
+ border-top: 1px solid #dfe8f2;
30
+ }
31
+
32
+ .card-content-p-box {
33
+ padding: 6px;
34
+ }
35
+
36
+ .card-content-action {
37
+ padding-left: 10px;
38
+ border-left: 1px solid #dfe8f2;
39
+ height: 100%;
40
+ display: flex;
41
+ flex-direction: column;
42
+ justify-content: space-around;
43
+ }
44
+
45
+ .card-content-p {
46
+ margin: 0;
47
+ padding: 0;
48
+ font-size: var(--font-size-mini);
49
+ font-weight: var(--font-weight-normal);
50
+ line-height: var(--line-height-tight);
51
+ }
52
+
53
+ .card-subcontent {
54
+ width: 100%;
55
+ }
56
+
57
+ .card-subcontent-action {
58
+ display: flex;
59
+ align-items: center;
60
+ }
61
+
62
+ .size-sm {
63
+ min-height: 45px;
64
+ }
65
+
66
+ .size-md {
67
+ min-height: 80px;
68
+ }
69
+
70
+ .size-lg {
71
+ min-height: 115px;
72
+ }
73
+
74
+ .color-primary {
75
+ background: var(--color-primary);
76
+ color: var(--color-primary-inverted);
77
+ }
78
+
79
+ .color-secondary {
80
+ background: var(--color-secondary);
81
+ color: var(--color-secondary-inverted);
82
+ }
83
+
84
+ .color-base {
85
+ border: var(--border-width-thin) solid var(--color-gray-400);
86
+ background: var(--background-color-primary-highlight);
87
+ }
88
+
89
+ .is-clickable {
90
+ cursor: pointer;
91
+ }
92
+
93
+ .is-draggable {
94
+ cursor: grab;
95
+ user-select: none;
96
+ }
97
+
98
+ .card-services-finalized.is-clickable:active,
99
+ .card-services-finalized.is-draggable:active {
100
+ box-shadow: var(--box-shadow-xs);
101
+ }
102
+
103
+ .selectCard {
104
+ border-top: 4px solid #39b54a;
105
+ border-bottom: 4px solid #00a3ff;
106
+ border-left: 1px solid #39b54a;
107
+ border-right: 1px solid #00a3ff;
108
+ -webkit-box-sizing: border-box;
109
+ -moz-box-sizing: border-box;
110
+ box-sizing: border-box;
111
+ background-position: 0 0, 100% 0;
112
+ background-repeat: no-repeat;
113
+ -webkit-background-size: 4px 100%;
114
+ -moz-background-size: 4px 100%;
115
+ background-size: 4px 100%;
116
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=),url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=);
117
+ background-image: -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
118
+ background-image: -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
119
+ background-image: -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
120
+ background-image: linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%), linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%);
121
+ }
122
+
123
+ .flip-out-hor-bottom {
124
+ -webkit-animation: flip-out-hor-bottom 0.45s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
125
+ animation: flip-out-hor-bottom 0.45s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
126
+ }
127
+
128
+ .flip-in-hor-bottom {
129
+ -webkit-animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
130
+ animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
131
+ }
132
+
133
+ /**
134
+ * ----------------------------------------
135
+ * animation flip-out-hor-bottom
136
+ * ----------------------------------------
137
+ */
138
+ @-webkit-keyframes flip-out-hor-bottom {
139
+ 0% {
140
+ -webkit-transform: rotateX(0);
141
+ transform: rotateX(0);
142
+ opacity: 1;
143
+ }
144
+ 100% {
145
+ -webkit-transform: rotateX(-70deg);
146
+ transform: rotateX(-70deg);
147
+ opacity: 0;
148
+ }
149
+ }
150
+ @keyframes flip-out-hor-bottom {
151
+ 0% {
152
+ -webkit-transform: rotateX(0);
153
+ transform: rotateX(0);
154
+ opacity: 1;
155
+ }
156
+ 100% {
157
+ -webkit-transform: rotateX(-70deg);
158
+ transform: rotateX(-70deg);
159
+ opacity: 0;
160
+ }
161
+ }
162
+
163
+
164
+ /**
165
+ * ----------------------------------------
166
+ * animation flip-in-hor-bottom
167
+ * ----------------------------------------
168
+ */
169
+ @-webkit-keyframes flip-in-hor-bottom {
170
+ 0% {
171
+ -webkit-transform: rotateX(80deg);
172
+ transform: rotateX(80deg);
173
+ opacity: 0;
174
+ }
175
+ 100% {
176
+ -webkit-transform: rotateX(0);
177
+ transform: rotateX(0);
178
+ opacity: 1;
179
+ }
180
+ }
181
+ @keyframes flip-in-hor-bottom {
182
+ 0% {
183
+ -webkit-transform: rotateX(80deg);
184
+ transform: rotateX(80deg);
185
+ opacity: 0;
186
+ }
187
+ 100% {
188
+ -webkit-transform: rotateX(0);
189
+ transform: rotateX(0);
190
+ opacity: 1;
191
+ }
192
+ }
193
+
194
+
195
+ .icon-view:hover svg path {
196
+ fill: var(--color-primary-muted);
197
+ }
198
+
199
+ .icon-view-delete:hover svg path {
200
+ fill: var(--color-secondary-muted);
201
+ }
202
+
203
+ .icon-view-status10 svg circle {
204
+ fill: #00a3ff;
205
+ }
206
+
207
+ .icon-view-status20 svg circle {
208
+ fill: #39b54a;
209
+ }
210
+
211
+ .icon-view-status30 svg circle {
212
+ fill: #8F12FE;
213
+ }
@@ -0,0 +1,23 @@
1
+ import { CardServicesFinalized, styles, options } from '.'
2
+
3
+ import {
4
+ getTemplate,
5
+ getListTemplate,
6
+ getOptionsArgTypes,
7
+ } from '../../helpers/storybook'
8
+
9
+ const Template = getTemplate(CardServicesFinalized, styles)
10
+ const ListTemplate = getListTemplate(CardServicesFinalized, styles)
11
+
12
+ export default {
13
+ title: 'Molecules/CardServicesFinalized',
14
+ component: CardServicesFinalized,
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, CardServicesFinalized } from './CardServicesFinalized'
2
+ export { options } from './constants'
3
+ export { default as styles } from './CardServicesFinalized.module.css'
@@ -114,184 +114,206 @@ export const RowTable = ({
114
114
  :
115
115
 
116
116
 
117
- itemTd.isPicture
117
+ itemTd.isArrayObject
118
118
 
119
119
  ?
120
- <td className={getStyles('td', 'tdacction')} key={[itemTd.accessor]}>
121
- <Picture
122
- src={item[itemTd.accessor]}
123
- width={50}
124
- />
120
+
121
+ <td className={getStyles('td')} key={[itemTd.accessor]}>
122
+
123
+ {item[itemTd.accessor].map((itemTdObj, index, array) => (
124
+
125
+ <span key={itemTdObj.id}>{itemTdObj[itemTd.subAccessor]}
126
+
127
+ {array.length - 1 !== index ?
128
+ <span>, </span> : null }
129
+
130
+ </span>
131
+
132
+ ))}
133
+
125
134
  </td>
126
- :
127
135
 
128
- itemTd.subAccessor === 'action'
136
+ :
129
137
 
130
- ?
131
138
 
132
- <td className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor]}>
133
-
134
- {itemTd.viewUserView ?
135
- <>
136
- <Icon
137
- background="base"
138
- name="userView"
139
- onClick={(e) => { onClickActionUserView(e, item) }}
140
- />
141
- <Horizontal size="xs" />
142
- </>
143
- : null}
144
-
145
-
146
- {itemTd.viewListInvoice ?
147
- <>
148
- <Icon
149
- background="base"
150
- name="listInvoice"
151
- onClick={(e) => { onClickActionListInvoice(e, item) }}
152
- />
153
- <Horizontal size="xs" />
154
- </>
155
- : null}
156
-
157
- {itemTd.viewListXLS && item.fileType === 'xls' ?
158
- <>
159
- <Icon
160
- background="base"
161
- name="listXLS"
162
- onClick={(e) => { onClickActionListXLS(e, item) }}
163
- />
164
- <Horizontal size="xs" />
165
- </>
166
- : null}
167
-
168
- {itemTd.viewListCSV && item.fileType === 'xml' ?
169
- <>
170
- <Icon
171
- background="base"
172
- name="listCSV"
173
- onClick={(e) => { onClickActionListCSV(e, item) }}
174
- />
175
- <Horizontal size="xs" />
176
- </>
177
- : null}
178
-
179
- {itemTd.viewListPDF && item.fileType === 'pdf' ?
180
- <>
181
- <Icon
182
- background="base"
183
- name="listPDF"
184
- onClick={(e) => { onClickActionListPDF(e, item) }}
185
- />
186
- <Horizontal size="xs" />
187
- </>
188
- : null}
189
-
190
-
191
-
192
- {itemTd.viewEdit ?
193
- <>
194
- <Icon
195
- background="base"
196
- name="edit"
197
- onClick={(e) => { onClickActionEdit(e, item) }}
198
- />
199
- <Horizontal size="xs" />
200
- </>
201
- : null}
202
-
203
- {itemTd.viewEmailSend ?
204
- <>
205
- <Icon
206
- background="base"
207
- name="sendEmail"
208
- // onClick={(e) => onClickEdit(e, item)}
209
- onClick={e => { onClickActionSendEmail(e, item) }}
210
- />
211
- <Horizontal size="xs" />
212
- </>
213
- : null}
214
-
215
- {itemTd.viewTrash ?
216
- <>
217
- <Icon
218
- background="base"
219
- name="trash"
220
- // onClick={(e) => onClickEdit(e, item)}
221
- onClick={e => { onClickActionDelete(e, item) }}
222
- />
223
- <Horizontal size="xs" />
224
- </>
225
- : null}
139
+ itemTd.isPicture
226
140
 
141
+ ?
142
+ <td className={getStyles('td', 'tdacction')} key={[itemTd.accessor]}>
143
+ <Picture
144
+ src={item[itemTd.accessor]}
145
+ width={50}
146
+ />
227
147
  </td>
228
-
229
148
  :
230
149
 
231
- itemTd.subAccessor !== ''
150
+ itemTd.subAccessor === 'action'
232
151
 
233
152
  ?
234
153
 
235
- <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor][itemTd.subAccessor]}</td>
154
+ <td className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor]}>
155
+
156
+ {itemTd.viewUserView ?
157
+ <>
158
+ <Icon
159
+ background="base"
160
+ name="userView"
161
+ onClick={(e) => { onClickActionUserView(e, item) }}
162
+ />
163
+ <Horizontal size="xs" />
164
+ </>
165
+ : null}
166
+
167
+
168
+ {itemTd.viewListInvoice ?
169
+ <>
170
+ <Icon
171
+ background="base"
172
+ name="listInvoice"
173
+ onClick={(e) => { onClickActionListInvoice(e, item) }}
174
+ />
175
+ <Horizontal size="xs" />
176
+ </>
177
+ : null}
178
+
179
+ {itemTd.viewListXLS && item.fileType === 'xls' ?
180
+ <>
181
+ <Icon
182
+ background="base"
183
+ name="listXLS"
184
+ onClick={(e) => { onClickActionListXLS(e, item) }}
185
+ />
186
+ <Horizontal size="xs" />
187
+ </>
188
+ : null}
189
+
190
+ {itemTd.viewListCSV && item.fileType === 'xml' ?
191
+ <>
192
+ <Icon
193
+ background="base"
194
+ name="listCSV"
195
+ onClick={(e) => { onClickActionListCSV(e, item) }}
196
+ />
197
+ <Horizontal size="xs" />
198
+ </>
199
+ : null}
200
+
201
+ {itemTd.viewListPDF && item.fileType === 'pdf' ?
202
+ <>
203
+ <Icon
204
+ background="base"
205
+ name="listPDF"
206
+ onClick={(e) => { onClickActionListPDF(e, item) }}
207
+ />
208
+ <Horizontal size="xs" />
209
+ </>
210
+ : null}
211
+
212
+
213
+
214
+ {itemTd.viewEdit ?
215
+ <>
216
+ <Icon
217
+ background="base"
218
+ name="edit"
219
+ onClick={(e) => { onClickActionEdit(e, item) }}
220
+ />
221
+ <Horizontal size="xs" />
222
+ </>
223
+ : null}
224
+
225
+ {itemTd.viewEmailSend ?
226
+ <>
227
+ <Icon
228
+ background="base"
229
+ name="sendEmail"
230
+ // onClick={(e) => onClickEdit(e, item)}
231
+ onClick={e => { onClickActionSendEmail(e, item) }}
232
+ />
233
+ <Horizontal size="xs" />
234
+ </>
235
+ : null}
236
+
237
+ {itemTd.viewTrash ?
238
+ <>
239
+ <Icon
240
+ background="base"
241
+ name="trash"
242
+ // onClick={(e) => onClickEdit(e, item)}
243
+ onClick={e => { onClickActionDelete(e, item) }}
244
+ />
245
+ <Horizontal size="xs" />
246
+ </>
247
+ : null}
248
+
249
+ </td>
236
250
 
237
251
  :
238
252
 
239
- itemTd.typeFilter === 'date'
253
+ itemTd.subAccessor !== ''
240
254
 
241
255
  ?
242
256
 
243
- <td className={getStyles('td')} key={[itemTd.accessor]}>
244
- <Moment format="DD/MM/YYYY hh:mm:ss">
245
- {item[itemTd.accessor]}
246
- </Moment>
247
- </td>
257
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor][itemTd.subAccessor]}</td>
248
258
 
249
259
  :
250
260
 
251
- itemTd.typeFilter === 'select'
261
+ itemTd.typeFilter === 'date'
252
262
 
253
263
  ?
254
264
 
255
- itemTd.optionsSelect.map((itemSelect) => (
265
+ <td className={getStyles('td')} key={[itemTd.accessor]}>
266
+ <Moment format="DD/MM/YYYY hh:mm:ss">
267
+ {item[itemTd.accessor]}
268
+ </Moment>
269
+ </td>
256
270
 
271
+ :
257
272
 
258
- item[itemTd.accessor] === itemSelect.value ?
273
+ itemTd.typeFilter === 'select'
259
274
 
260
- <td className={getStyles('td')} key={[itemTd.accessor]}>
261
- {itemSelect.label}
262
- </td>
275
+ ?
263
276
 
264
- :
277
+ itemTd.optionsSelect.map((itemSelect) => (
265
278
 
266
- null
267
- ))
268
279
 
269
- :
280
+ item[itemTd.accessor] === itemSelect.value ?
270
281
 
271
- itemTd.typeFilter === 'number'
282
+ <td className={getStyles('td')} key={[itemTd.accessor]}>
283
+ {itemSelect.label}
284
+ </td>
272
285
 
273
- ?
286
+ :
287
+
288
+ null
289
+ ))
274
290
 
275
- itemTd.subTypeFilter
291
+ :
292
+
293
+ itemTd.typeFilter === 'number'
276
294
 
277
295
  ?
278
296
 
279
- itemTd.characterExtra === 'km'
297
+ itemTd.subTypeFilter
298
+
280
299
  ?
281
- <td className={getStyles('td')} key={[itemTd.accessor]}>{(item[itemTd.accessor] / 1000).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
300
+
301
+ itemTd.characterExtra === 'km'
302
+ ?
303
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{(item[itemTd.accessor] / 1000).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
304
+ :
305
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor].toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
282
306
  :
283
- <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor].toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
284
- :
285
- <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
307
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
286
308
 
287
- :
309
+ :
288
310
 
289
- itemTd.subTypeFilter
311
+ itemTd.subTypeFilter
290
312
 
291
- ?
292
- <td className={getStyles('td')} key={[itemTd.accessor]}>{Number(item[itemTd.accessor]).toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
293
- :
294
- <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
313
+ ?
314
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{Number(item[itemTd.accessor]).toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
315
+ :
316
+ <td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
295
317
 
296
318
  ) : null
297
319
  ))}