@citizenplane/pimp 8.9.5 → 8.11.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.
- package/dist/pimp.es.js +5051 -4622
- package/dist/pimp.umd.js +9 -2
- package/dist/style.css +1 -1
- package/package.json +15 -16
- package/src/App.vue +9 -9
- package/src/assets/styles/base/_base.scss +4 -4
- package/src/assets/styles/helpers/_keyframes.scss +0 -25
- package/src/assets/styles/helpers/_mixins.scss +23 -2
- package/src/assets/styles/main.scss +2 -16
- package/src/assets/styles/variables/_colors.scss +2 -0
- package/src/assets/styles/variables/_sizing.scss +3 -3
- package/src/assets/styles/variables/_spacing.scss +2 -2
- package/src/components/atomic-elements/CpBadge.vue +33 -33
- package/src/components/atomic-elements/CpDialog.vue +19 -19
- package/src/components/atomic-elements/CpTooltip.vue +6 -6
- package/src/components/buttons/CpButton.vue +53 -57
- package/src/components/core/{BaseInputLabel/index.vue → BaseInputLabel.vue} +3 -3
- package/src/components/core/playground-sections/SectionAtomicElements.vue +1 -1
- package/src/components/core/playground-sections/SectionButtons.vue +2 -2
- package/src/components/core/playground-sections/SectionContainer.vue +5 -5
- package/src/components/core/playground-sections/SectionDatePickers.vue +3 -3
- package/src/components/core/playground-sections/SectionDialog.vue +1 -1
- package/src/components/core/playground-sections/SectionFeedbackIndicators.vue +2 -2
- package/src/components/core/playground-sections/SectionInputs.vue +2 -2
- package/src/components/core/playground-sections/SectionListsAndTables.vue +9 -9
- package/src/components/core/playground-sections/SectionSelects.vue +2 -2
- package/src/components/core/playground-sections/SectionSimpleInputs.vue +2 -2
- package/src/components/core/playground-sections/SectionToggles.vue +4 -4
- package/src/components/date-pickers/CpCalendar.vue +14 -14
- package/src/components/date-pickers/{CpDate/index.vue → CpDate.vue} +165 -1
- package/src/components/date-pickers/CpDatepicker.vue +1 -1
- package/src/components/feedback-indicators/CpAlert.vue +22 -22
- package/src/components/feedback-indicators/CpToaster.vue +36 -38
- package/src/components/index.js +7 -7
- package/src/components/inputs/CpInput.vue +55 -55
- package/src/components/inputs/CpTextarea.vue +20 -20
- package/src/components/lists-and-table/CpTable.vue +722 -0
- package/src/components/lists-and-table/{CpTable/CpTableEmptyState/index.vue → CpTableEmptyState.vue} +9 -9
- package/src/components/selects/CpSelect.vue +29 -28
- package/src/components/selects/{CpSelectMenu/index.vue → CpSelectMenu.vue} +40 -41
- package/src/components/toggles/{CpCheckbox/index.vue → CpCheckbox.vue} +133 -1
- package/src/components/toggles/CpRadio.vue +253 -0
- package/src/components/toggles/{CpSwitch/index.vue → CpSwitch.vue} +19 -19
- package/src/components/typography/{CpHeading/index.vue → CpHeading.vue} +26 -26
- package/src/constants/index.js +1 -0
- package/src/constants/src/CpTableConfig.js +14 -0
- package/src/libs/CoreDatepicker.vue +383 -308
- package/src/assets/styl/colors.styl +0 -39
- package/src/components/date-pickers/CpDate/index.scss +0 -165
- package/src/components/lists-and-table/CpTable/index.scss +0 -325
- package/src/components/lists-and-table/CpTable/index.vue +0 -438
- package/src/components/toggles/CpCheckbox/index.scss +0 -136
- package/src/components/toggles/CpRadio/index.scss +0 -160
- package/src/components/toggles/CpRadio/index.vue +0 -97
|
@@ -237,27 +237,27 @@ export default {
|
|
|
237
237
|
width: 100%;
|
|
238
238
|
|
|
239
239
|
> *:not(:last-of-type) {
|
|
240
|
-
margin-bottom:
|
|
240
|
+
margin-bottom: sp.$space;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
&__title {
|
|
245
|
-
margin-bottom:
|
|
245
|
+
margin-bottom: sp.$space-lg;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
&__menu {
|
|
249
249
|
position: absolute;
|
|
250
250
|
box-shadow:
|
|
251
|
-
0 9px 24px rgba(
|
|
252
|
-
0 4px 4px rgba(
|
|
253
|
-
border: px-to-rem(1) solid
|
|
254
|
-
border-radius: px-to-rem(10);
|
|
255
|
-
background-color:
|
|
256
|
-
padding:
|
|
251
|
+
0 9px 24px rgba(colors.$neutral-dark, 0.2),
|
|
252
|
+
0 4px 4px rgba(colors.$neutral-dark, 0.1);
|
|
253
|
+
border: fn.px-to-rem(1) solid colors.$neutral-dark-4;
|
|
254
|
+
border-radius: fn.px-to-rem(10);
|
|
255
|
+
background-color: colors.$neutral-light;
|
|
256
|
+
padding: sp.$space 0;
|
|
257
257
|
min-width: 250px;
|
|
258
258
|
|
|
259
259
|
li {
|
|
260
|
-
padding:
|
|
260
|
+
padding: sp.$space sp.$space-md;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
<style lang="scss">
|
|
105
105
|
.sectionSelects {
|
|
106
106
|
&__title {
|
|
107
|
-
margin-bottom:
|
|
107
|
+
margin-bottom: sp.$space-lg;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
&__selects {
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
flex-wrap: wrap;
|
|
114
114
|
|
|
115
115
|
> * {
|
|
116
|
-
margin: 0
|
|
116
|
+
margin: 0 sp.$space-lg sp.$space-lg 0;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
289
289
|
<style lang="scss">
|
|
290
290
|
.sectionSimpleInputs {
|
|
291
291
|
&__title {
|
|
292
|
-
margin-bottom:
|
|
292
|
+
margin-bottom: sp.$space-lg;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
&__inputs {
|
|
@@ -298,7 +298,7 @@ export default {
|
|
|
298
298
|
flex-wrap: wrap;
|
|
299
299
|
|
|
300
300
|
> * {
|
|
301
|
-
margin: 0
|
|
301
|
+
margin: 0 sp.$space-lg sp.$space-lg 0;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
@@ -142,17 +142,17 @@ export default {
|
|
|
142
142
|
.sectionToggles {
|
|
143
143
|
&__switch {
|
|
144
144
|
&:not(:last-child) {
|
|
145
|
-
margin-bottom:
|
|
145
|
+
margin-bottom: sp.$space;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&--isSmall {
|
|
149
|
-
font-size: px-to-em(12);
|
|
149
|
+
font-size: fn.px-to-em(12);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
&__customLabel {
|
|
154
|
-
font-size: px-to-em(14);
|
|
155
|
-
line-height: px-to-rem(24);
|
|
154
|
+
font-size: fn.px-to-em(14);
|
|
155
|
+
line-height: fn.px-to-rem(24);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
</style>
|
|
@@ -310,12 +310,12 @@ export default {
|
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
&__input input:disabled {
|
|
313
|
-
background-color:
|
|
313
|
+
background-color: colors.$neutral-light;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
.footer-container {
|
|
317
|
-
background:
|
|
318
|
-
border-top: 1px solid
|
|
317
|
+
background: colors.$neutral-light;
|
|
318
|
+
border-top: 1px solid colors.$neutral-dark-5;
|
|
319
319
|
|
|
320
320
|
.asd__recurency--action {
|
|
321
321
|
padding: 16px;
|
|
@@ -325,7 +325,7 @@ export default {
|
|
|
325
325
|
|
|
326
326
|
button {
|
|
327
327
|
font-size: 16px;
|
|
328
|
-
color:
|
|
328
|
+
color: colors.$neutral-dark;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -333,9 +333,9 @@ export default {
|
|
|
333
333
|
border: #b5b5b5;
|
|
334
334
|
|
|
335
335
|
&:not([disabled]) {
|
|
336
|
-
background-color:
|
|
337
|
-
color:
|
|
338
|
-
border:
|
|
336
|
+
background-color: colors.$primary-color;
|
|
337
|
+
color: colors.$neutral-light !important;
|
|
338
|
+
border: colors.$primary-color;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
|
|
@@ -363,9 +363,9 @@ export default {
|
|
|
363
363
|
flex: 1;
|
|
364
364
|
justify-content: center;
|
|
365
365
|
align-items: center;
|
|
366
|
-
border-top: 1px solid
|
|
366
|
+
border-top: 1px solid colors.$neutral-dark-5;
|
|
367
367
|
font-size: 16px;
|
|
368
|
-
color:
|
|
368
|
+
color: colors.$neutral-dark;
|
|
369
369
|
height: 64px;
|
|
370
370
|
transition: background 200ms linear;
|
|
371
371
|
|
|
@@ -381,13 +381,13 @@ export default {
|
|
|
381
381
|
.checkbox--border {
|
|
382
382
|
height: 100%;
|
|
383
383
|
width: 100%;
|
|
384
|
-
border: 1px solid
|
|
384
|
+
border: 1px solid colors.$neutral-dark-5;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
.feather-check {
|
|
388
388
|
height: 100%;
|
|
389
389
|
width: 100%;
|
|
390
|
-
color:
|
|
390
|
+
color: colors.$accent-color-1;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
span {
|
|
@@ -399,7 +399,7 @@ export default {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
.asd__recurency--li--selected {
|
|
402
|
-
color:
|
|
402
|
+
color: colors.$accent-color-1;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
.asd__recurency--summary {
|
|
@@ -408,7 +408,7 @@ export default {
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
.asd__recurency--text {
|
|
411
|
-
background:
|
|
411
|
+
background: colors.$neutral-dark;
|
|
412
412
|
border-radius: 10px;
|
|
413
413
|
display: flex;
|
|
414
414
|
justify-content: center;
|
|
@@ -426,7 +426,7 @@ export default {
|
|
|
426
426
|
font-size: 14px;
|
|
427
427
|
|
|
428
428
|
strong {
|
|
429
|
-
color:
|
|
429
|
+
color: colors.$neutral-light;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
@@ -282,5 +282,169 @@ export default {
|
|
|
282
282
|
</script>
|
|
283
283
|
|
|
284
284
|
<style lang="scss">
|
|
285
|
-
|
|
285
|
+
// Reset default input style
|
|
286
|
+
.cpDate {
|
|
287
|
+
input,
|
|
288
|
+
select {
|
|
289
|
+
background-color: transparent;
|
|
290
|
+
color: colors.$neutral-dark;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Hide arrows from number input
|
|
294
|
+
input::-webkit-outer-spin-button,
|
|
295
|
+
input::-webkit-inner-spin-button {
|
|
296
|
+
-webkit-appearance: none;
|
|
297
|
+
margin: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
input[type='number'] {
|
|
301
|
+
-moz-appearance: textfield;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Remove select style
|
|
305
|
+
select {
|
|
306
|
+
appearance: none;
|
|
307
|
+
-webkit-appearance: none;
|
|
308
|
+
-moz-appearance: none;
|
|
309
|
+
outline: none;
|
|
310
|
+
border: none;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.cpDate {
|
|
315
|
+
input::placeholder,
|
|
316
|
+
&__month--isEmpty {
|
|
317
|
+
color: colors.$neutral-dark;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&__label {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
margin-bottom: fn.px-to-em(6);
|
|
324
|
+
font-size: fn.px-to-em(14);
|
|
325
|
+
font-weight: 600;
|
|
326
|
+
|
|
327
|
+
i {
|
|
328
|
+
margin-left: sp.$space-sm;
|
|
329
|
+
width: fn.px-to-rem(16);
|
|
330
|
+
height: fn.px-to-rem(16);
|
|
331
|
+
color: colors.$error-color;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&__inputs {
|
|
336
|
+
display: flex;
|
|
337
|
+
height: fn.px-to-em(44);
|
|
338
|
+
border: fn.px-to-rem(1) solid colors.$neutral-dark-4;
|
|
339
|
+
border-radius: fn.px-to-em(10);
|
|
340
|
+
overflow: hidden;
|
|
341
|
+
background-color: colors.$neutral-light;
|
|
342
|
+
box-shadow: inset 0 fn.px-to-em(1) fn.px-to-em(2) rgba(colors.$neutral-dark, 0.12);
|
|
343
|
+
|
|
344
|
+
&:hover,
|
|
345
|
+
&:focus-within {
|
|
346
|
+
border-color: colors.$primary-color;
|
|
347
|
+
background-color: colors.$neutral-light;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&:focus-within {
|
|
351
|
+
box-shadow:
|
|
352
|
+
rgba(colors.$primary-color, 0.1) 0 0 0 fn.px-to-rem(4),
|
|
353
|
+
colors.$primary-color 0 0 0 fn.px-to-rem(0.5);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&__divider {
|
|
358
|
+
flex-shrink: 0;
|
|
359
|
+
width: fn.px-to-rem(1);
|
|
360
|
+
height: 100%;
|
|
361
|
+
background-color: colors.$border-color;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
&__month,
|
|
365
|
+
&__day,
|
|
366
|
+
&__year {
|
|
367
|
+
min-width: 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
&__month {
|
|
371
|
+
position: relative;
|
|
372
|
+
flex: 1 1 50%;
|
|
373
|
+
|
|
374
|
+
&::after {
|
|
375
|
+
position: absolute;
|
|
376
|
+
top: 50%;
|
|
377
|
+
right: fn.px-to-em(12);
|
|
378
|
+
width: fn.px-to-em(20);
|
|
379
|
+
height: fn.px-to-em(20);
|
|
380
|
+
background-image: url('@/assets/images/icons/chevron-down-icon.svg');
|
|
381
|
+
background-size: cover;
|
|
382
|
+
transform: translateY(-50%);
|
|
383
|
+
content: '';
|
|
384
|
+
pointer-events: none;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
select {
|
|
388
|
+
@extend %u-text-ellipsis;
|
|
389
|
+
width: 100%;
|
|
390
|
+
padding: fn.px-to-em(12) fn.px-to-em(40) fn.px-to-em(12) fn.px-to-em(12);
|
|
391
|
+
color: inherit;
|
|
392
|
+
cursor: pointer;
|
|
393
|
+
|
|
394
|
+
&:focus-visible {
|
|
395
|
+
text-decoration: underline;
|
|
396
|
+
font-weight: 500;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
select > option:not(:disabled) {
|
|
401
|
+
color: colors.$neutral-dark;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
&__day,
|
|
406
|
+
&__year {
|
|
407
|
+
flex: 0 0 25%;
|
|
408
|
+
padding: sp.$space-md;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
&--isInvalid {
|
|
412
|
+
.cpDate__inputs,
|
|
413
|
+
.cpDate__inputs:hover,
|
|
414
|
+
.cpDate__inputs:focus-within {
|
|
415
|
+
border-color: colors.$error-color;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.cpDate__inputs:focus-within {
|
|
419
|
+
box-shadow: 0 0 0 fn.px-to-em(3) color.scale(colors.$error-color, $lightness: 60%);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.cpDate__divider {
|
|
423
|
+
background-color: colors.$error-color;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
&--isDisabled {
|
|
428
|
+
.cpDate__inputs {
|
|
429
|
+
border-color: colors.$neutral-dark-4;
|
|
430
|
+
background: colors.$neutral-light-1;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.cpDate__inputs * {
|
|
434
|
+
color: colors.$neutral-dark-2 !important;
|
|
435
|
+
cursor: not-allowed !important;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.cpDate__month::after {
|
|
439
|
+
opacity: 0.4;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
&__errorMessage {
|
|
444
|
+
margin-top: fn.px-to-rem(6);
|
|
445
|
+
color: colors.$error-color;
|
|
446
|
+
font-weight: 500;
|
|
447
|
+
font-size: fn.px-to-em(14);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
286
450
|
</style>
|
|
@@ -70,7 +70,7 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&--#{$className} button:focus-visible {
|
|
73
|
-
outline: px-to-rem(2) solid $color;
|
|
73
|
+
outline: fn.px-to-rem(2) solid $color;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -78,9 +78,9 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
78
78
|
position: relative;
|
|
79
79
|
display: flex;
|
|
80
80
|
align-items: flex-start;
|
|
81
|
-
padding: px-to-rem(10);
|
|
82
|
-
font-size: px-to-em(14);
|
|
83
|
-
border-radius: px-to-rem(4);
|
|
81
|
+
padding: fn.px-to-rem(10);
|
|
82
|
+
font-size: fn.px-to-em(14);
|
|
83
|
+
border-radius: fn.px-to-rem(4);
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
|
|
86
86
|
&:before {
|
|
@@ -89,18 +89,18 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
89
89
|
left: 0;
|
|
90
90
|
top: 0;
|
|
91
91
|
height: 100%;
|
|
92
|
-
width: px-to-rem(3);
|
|
92
|
+
width: fn.px-to-rem(3);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
&__body {
|
|
96
96
|
flex: 1;
|
|
97
|
-
margin-left:
|
|
98
|
-
padding-right: calc(#{px-to-rem(18)} + #{
|
|
97
|
+
margin-left: sp.$space;
|
|
98
|
+
padding-right: calc(#{fn.px-to-rem(18)} + #{sp.$space-lg});
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
&__iconWrapper {
|
|
102
102
|
display: flex;
|
|
103
|
-
padding-block:
|
|
103
|
+
padding-block: sp.$space-xs;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&__icon {
|
|
@@ -110,15 +110,15 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
110
110
|
i {
|
|
111
111
|
display: inline-block;
|
|
112
112
|
vertical-align: sub;
|
|
113
|
-
width: px-to-rem(16);
|
|
114
|
-
height: px-to-rem(16);
|
|
113
|
+
width: fn.px-to-rem(16);
|
|
114
|
+
height: fn.px-to-rem(16);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
&__icon,
|
|
119
119
|
&__content,
|
|
120
120
|
&__title {
|
|
121
|
-
line-height: px-to-rem(19);
|
|
121
|
+
line-height: fn.px-to-rem(19);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
&__title {
|
|
@@ -126,23 +126,23 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
126
126
|
font-weight: 600;
|
|
127
127
|
|
|
128
128
|
&:not(:only-child) {
|
|
129
|
-
margin-bottom:
|
|
129
|
+
margin-bottom: sp.$space-sm;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
&__button {
|
|
134
134
|
display: flex;
|
|
135
135
|
position: absolute;
|
|
136
|
-
right: px-to-rem(7);
|
|
137
|
-
top: px-to-rem(7);
|
|
138
|
-
border-radius: px-to-rem(4);
|
|
139
|
-
padding:
|
|
136
|
+
right: fn.px-to-rem(7);
|
|
137
|
+
top: fn.px-to-rem(7);
|
|
138
|
+
border-radius: fn.px-to-rem(4);
|
|
139
|
+
padding: sp.$space-sm;
|
|
140
140
|
color: inherit;
|
|
141
141
|
|
|
142
142
|
svg {
|
|
143
143
|
margin: 0;
|
|
144
|
-
width: px-to-rem(18);
|
|
145
|
-
height: px-to-rem(18);
|
|
144
|
+
width: fn.px-to-rem(18);
|
|
145
|
+
height: fn.px-to-rem(18);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&:hover {
|
|
@@ -150,9 +150,9 @@ const dismissAlert = () => (isDisplayed.value = false)
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
@include cp-alert-style(
|
|
154
|
-
@include cp-alert-style(
|
|
155
|
-
@include cp-alert-style(
|
|
156
|
-
@include cp-alert-style(
|
|
153
|
+
@include cp-alert-style(colors.$secondary-color, 'info');
|
|
154
|
+
@include cp-alert-style(colors.$success-color, 'success');
|
|
155
|
+
@include cp-alert-style(colors.$warning-color, 'warning');
|
|
156
|
+
@include cp-alert-style(colors.$error-color, 'critical');
|
|
157
157
|
}
|
|
158
158
|
</style>
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script>
|
|
31
|
-
import
|
|
31
|
+
import { animate } from 'animejs'
|
|
32
32
|
|
|
33
33
|
import { Intent } from '@/utils/constants'
|
|
34
34
|
import { randomString } from '@/helpers'
|
|
35
35
|
|
|
36
|
-
import CpHeading from '@/components/typography/CpHeading
|
|
36
|
+
import CpHeading from '@/components/typography/CpHeading.vue'
|
|
37
37
|
import CpIcon from '@/components/visual/CpIcon.vue'
|
|
38
38
|
|
|
39
39
|
export default {
|
|
@@ -203,24 +203,22 @@ export default {
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
async enter(el, done) {
|
|
206
|
-
|
|
207
|
-
targets: el,
|
|
206
|
+
animate(el, {
|
|
208
207
|
translateY: [-60, 0],
|
|
209
208
|
opacity: [0, 1],
|
|
210
209
|
duration: 240,
|
|
211
|
-
|
|
210
|
+
ease: 'cubicBezier(0.175, 0.885, 0.32, 1.175)',
|
|
212
211
|
complete: function () {
|
|
213
212
|
done()
|
|
214
213
|
},
|
|
215
214
|
})
|
|
216
215
|
},
|
|
217
216
|
async leave(el, done) {
|
|
218
|
-
|
|
219
|
-
targets: el,
|
|
217
|
+
animate(el, {
|
|
220
218
|
scale: [1, 0.8],
|
|
221
219
|
opacity: [1, 0],
|
|
222
220
|
duration: 240,
|
|
223
|
-
|
|
221
|
+
ease: 'cubicBezier(0.0, 0.0, 0.2, 1)',
|
|
224
222
|
complete: function () {
|
|
225
223
|
done()
|
|
226
224
|
},
|
|
@@ -246,17 +244,17 @@ export default {
|
|
|
246
244
|
box-shadow:
|
|
247
245
|
rgba(67, 90, 111, 0.3) 0 0 1px,
|
|
248
246
|
rgba(67, 90, 111, 0.47) 0 8px 10px -4px;
|
|
249
|
-
background:
|
|
250
|
-
padding:
|
|
247
|
+
background: colors.$neutral-light;
|
|
248
|
+
padding: sp.$space-md;
|
|
251
249
|
overflow: hidden;
|
|
252
250
|
width: max-content;
|
|
253
251
|
max-width: 100%;
|
|
254
252
|
margin: auto;
|
|
255
253
|
pointer-events: auto;
|
|
256
|
-
font-size: px-to-rem(14);
|
|
254
|
+
font-size: fn.px-to-rem(14);
|
|
257
255
|
|
|
258
256
|
@media (min-width: 769px) {
|
|
259
|
-
border-radius: px-to-rem(8);
|
|
257
|
+
border-radius: fn.px-to-rem(8);
|
|
260
258
|
}
|
|
261
259
|
|
|
262
260
|
@media (max-width: 768px) {
|
|
@@ -268,7 +266,7 @@ export default {
|
|
|
268
266
|
position: absolute;
|
|
269
267
|
top: 0;
|
|
270
268
|
left: 0;
|
|
271
|
-
width: px-to-rem(3);
|
|
269
|
+
width: fn.px-to-rem(3);
|
|
272
270
|
height: 100%;
|
|
273
271
|
}
|
|
274
272
|
|
|
@@ -279,12 +277,12 @@ export default {
|
|
|
279
277
|
left: 0;
|
|
280
278
|
right: 0;
|
|
281
279
|
margin: auto;
|
|
282
|
-
padding:
|
|
283
|
-
max-width: px-to-rem(400);
|
|
280
|
+
padding: sp.$space-lg;
|
|
281
|
+
max-width: fn.px-to-rem(400);
|
|
284
282
|
pointer-events: none;
|
|
285
283
|
|
|
286
284
|
& > *:not(:last-child) {
|
|
287
|
-
margin-bottom:
|
|
285
|
+
margin-bottom: sp.$space;
|
|
288
286
|
}
|
|
289
287
|
|
|
290
288
|
@media (max-width: 768px) {
|
|
@@ -299,71 +297,71 @@ export default {
|
|
|
299
297
|
|
|
300
298
|
&__body {
|
|
301
299
|
flex: 1;
|
|
302
|
-
margin-left:
|
|
303
|
-
padding-right: calc(
|
|
300
|
+
margin-left: sp.$space;
|
|
301
|
+
padding-right: calc(sp.$space-lg + sp.$space-lg);
|
|
304
302
|
}
|
|
305
303
|
|
|
306
304
|
&__icon {
|
|
307
305
|
flex-shrink: 0;
|
|
308
|
-
height: px-to-rem(16);
|
|
309
|
-
width: px-to-rem(16);
|
|
306
|
+
height: fn.px-to-rem(16);
|
|
307
|
+
width: fn.px-to-rem(16);
|
|
310
308
|
}
|
|
311
309
|
|
|
312
310
|
&__content,
|
|
313
311
|
&__title {
|
|
314
|
-
line-height: px-to-rem(16);
|
|
312
|
+
line-height: fn.px-to-rem(16);
|
|
315
313
|
}
|
|
316
314
|
|
|
317
315
|
&__title {
|
|
318
316
|
font-weight: 600;
|
|
319
317
|
|
|
320
318
|
&:not(:only-child) {
|
|
321
|
-
margin-bottom:
|
|
319
|
+
margin-bottom: sp.$space-sm;
|
|
322
320
|
}
|
|
323
321
|
}
|
|
324
322
|
|
|
325
323
|
&__description {
|
|
326
|
-
font-size: px-to-rem(14);
|
|
324
|
+
font-size: fn.px-to-rem(14);
|
|
327
325
|
}
|
|
328
326
|
|
|
329
327
|
&__close {
|
|
330
328
|
position: absolute;
|
|
331
|
-
right:
|
|
332
|
-
top:
|
|
329
|
+
right: sp.$space;
|
|
330
|
+
top: sp.$space;
|
|
333
331
|
display: flex;
|
|
334
|
-
border-radius: px-to-rem(4);
|
|
335
|
-
padding:
|
|
336
|
-
color:
|
|
332
|
+
border-radius: fn.px-to-rem(4);
|
|
333
|
+
padding: sp.$space-sm;
|
|
334
|
+
color: colors.$neutral-dark-1;
|
|
337
335
|
|
|
338
336
|
svg {
|
|
339
337
|
margin: 0;
|
|
340
|
-
width: px-to-rem(18);
|
|
341
|
-
height: px-to-rem(18);
|
|
338
|
+
width: fn.px-to-rem(18);
|
|
339
|
+
height: fn.px-to-rem(18);
|
|
342
340
|
}
|
|
343
341
|
|
|
344
342
|
&:hover {
|
|
345
|
-
background-color: rgba(
|
|
343
|
+
background-color: rgba(colors.$neutral-dark-1, 0.1);
|
|
346
344
|
}
|
|
347
345
|
}
|
|
348
346
|
|
|
349
347
|
&__footer {
|
|
350
348
|
display: flex;
|
|
351
349
|
justify-content: flex-end;
|
|
352
|
-
margin-top:
|
|
350
|
+
margin-top: sp.$space-lg;
|
|
353
351
|
}
|
|
354
352
|
|
|
355
353
|
&__button {
|
|
356
|
-
font-size: px-to-rem(12);
|
|
357
|
-
color:
|
|
354
|
+
font-size: fn.px-to-rem(12);
|
|
355
|
+
color: colors.$secondary-color;
|
|
358
356
|
|
|
359
357
|
&:not(:hover) {
|
|
360
358
|
text-decoration: underline;
|
|
361
359
|
}
|
|
362
360
|
}
|
|
363
361
|
|
|
364
|
-
@include cp-toaster-style(
|
|
365
|
-
@include cp-toaster-style(
|
|
366
|
-
@include cp-toaster-style(
|
|
367
|
-
@include cp-toaster-style(
|
|
362
|
+
@include cp-toaster-style(colors.$secondary-color, 'info');
|
|
363
|
+
@include cp-toaster-style(colors.$warning-color, 'warning');
|
|
364
|
+
@include cp-toaster-style(colors.$success-color, 'success');
|
|
365
|
+
@include cp-toaster-style(colors.$error-color, 'critical');
|
|
368
366
|
}
|
|
369
367
|
</style>
|
package/src/components/index.js
CHANGED
|
@@ -14,13 +14,13 @@ import CpDialogWrapper from './atomic-elements/CpDialogWrapper.vue'
|
|
|
14
14
|
import CpTooltip from './atomic-elements/CpTooltip.vue'
|
|
15
15
|
|
|
16
16
|
// Typography
|
|
17
|
-
import CpHeading from './typography/CpHeading
|
|
17
|
+
import CpHeading from './typography/CpHeading.vue'
|
|
18
18
|
|
|
19
19
|
// Buttons
|
|
20
20
|
import CpButton from './buttons/CpButton.vue'
|
|
21
21
|
|
|
22
22
|
// Date pickers
|
|
23
|
-
import CpDate from './date-pickers/CpDate
|
|
23
|
+
import CpDate from './date-pickers/CpDate.vue'
|
|
24
24
|
import CpCoreDatepicker from '../libs/CoreDatepicker.vue'
|
|
25
25
|
import CpDatepicker from './date-pickers/CpDatepicker.vue'
|
|
26
26
|
import CpCalendar from './date-pickers/CpCalendar.vue'
|
|
@@ -38,15 +38,15 @@ import CpTextarea from './inputs/CpTextarea.vue'
|
|
|
38
38
|
|
|
39
39
|
// Selects
|
|
40
40
|
import CpSelect from './selects/CpSelect.vue'
|
|
41
|
-
import CpSelectMenu from './selects/CpSelectMenu
|
|
41
|
+
import CpSelectMenu from './selects/CpSelectMenu.vue'
|
|
42
42
|
|
|
43
43
|
// Toggles
|
|
44
|
-
import CpCheckbox from './toggles/CpCheckbox
|
|
45
|
-
import CpRadio from './toggles/CpRadio
|
|
46
|
-
import CpSwitch from './toggles/CpSwitch
|
|
44
|
+
import CpCheckbox from './toggles/CpCheckbox.vue'
|
|
45
|
+
import CpRadio from './toggles/CpRadio.vue'
|
|
46
|
+
import CpSwitch from './toggles/CpSwitch.vue'
|
|
47
47
|
|
|
48
48
|
// List and Tables
|
|
49
|
-
import CpTable from './lists-and-table/CpTable
|
|
49
|
+
import CpTable from './lists-and-table/CpTable.vue'
|
|
50
50
|
|
|
51
51
|
// Visual
|
|
52
52
|
import CpIcon from './visual/CpIcon.vue'
|