@citizenplane/pimp 10.0.8 → 10.1.1
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 +1305 -1303
- package/dist/pimp.umd.js +22 -22
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/css/base.css +16 -1
- package/src/assets/css/colors.css +111 -110
- package/src/assets/css/dimensions.css +36 -35
- package/src/assets/css/easings.css +2 -1
- package/src/assets/css/shadows.css +67 -65
- package/src/assets/css/tokens.css +355 -386
- package/src/assets/css/typography.css +109 -0
- package/src/assets/main.css +1 -1
- package/src/assets/styles/helpers/_functions.scss +2 -2
- package/src/assets/styles/helpers/_mixins.scss +1 -3
- package/src/assets/styles/utilities/_index.scss +3 -6
- package/src/components/BaseInputLabel.vue +23 -21
- package/src/components/BaseSelectClearButton.vue +15 -9
- package/src/components/CpAirlineLogo.vue +1 -1
- package/src/components/CpAlert.vue +16 -16
- package/src/components/CpBadge.vue +149 -29
- package/src/components/CpButton.vue +135 -110
- package/src/components/CpButtonGroup.vue +3 -3
- package/src/components/CpCalendar.vue +32 -32
- package/src/components/CpCheckbox.vue +43 -33
- package/src/components/CpContextualMenu.vue +6 -9
- package/src/components/CpDate.vue +53 -40
- package/src/components/CpDatepicker.vue +3 -3
- package/src/components/CpDialog.vue +19 -19
- package/src/components/CpHeading.vue +23 -23
- package/src/components/CpInput.vue +71 -52
- package/src/components/CpItemActions.vue +4 -4
- package/src/components/CpLoader.vue +14 -7
- package/src/components/CpMenuItem.vue +23 -17
- package/src/components/CpMultiselect.vue +84 -58
- package/src/components/CpPartnerBadge.vue +13 -13
- package/src/components/CpRadio.vue +32 -24
- package/src/components/CpSelect.vue +43 -30
- package/src/components/CpSelectMenu.vue +39 -39
- package/src/components/CpSwitch.vue +51 -40
- package/src/components/CpTable.vue +249 -81
- package/src/components/CpTableColumnEditor.vue +18 -16
- package/src/components/CpTableEmptyState.vue +9 -9
- package/src/components/CpTabs.vue +15 -15
- package/src/components/CpTelInput.vue +76 -70
- package/src/components/CpTextarea.vue +27 -17
- package/src/components/CpToast.vue +49 -49
- package/src/components/CpTooltip.vue +6 -6
- package/src/components/CpTransitionDialog.vue +1 -1
- package/src/constants/Sizes.ts +5 -0
- package/src/constants/colors/Colors.ts +15 -5
- package/src/constants/colors/ToggleColors.ts +2 -1
- package/src/libs/CoreDatepicker.vue +21 -18
- package/src/stories/CpBadge.stories.ts +25 -17
- package/src/stories/CpButton.stories.ts +6 -5
- package/src/stories/CpCheckbox.stories.ts +4 -4
- package/src/stories/CpContextualMenu.stories.ts +3 -2
- package/src/stories/CpLoader.stories.ts +2 -2
- package/src/stories/CpMenuItem.stories.ts +104 -0
- package/src/stories/CpRadio.stories.ts +29 -2
- package/src/stories/CpSwitch.stories.ts +27 -0
- package/src/stories/CpTable.stories.ts +94 -0
- package/src/assets/css/spacing.css +0 -43
- package/src/assets/styles/helpers/_keyframes.scss +0 -48
- package/src/assets/styles/variables/_colors.scss +0 -89
- package/src/assets/styles/variables/_easings.scss +0 -1
- package/src/assets/styles/variables/_sizing.scss +0 -4
- package/src/assets/styles/variables/_spacing.scss +0 -10
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</slot>
|
|
54
54
|
</template>
|
|
55
55
|
<template v-if="typeahead" #dropdown>
|
|
56
|
-
<div v-if="
|
|
56
|
+
<div v-if="hasPrefixSlot" class="cpMultiselect__prefix">
|
|
57
57
|
<slot name="prefix" />
|
|
58
58
|
</div>
|
|
59
59
|
<cp-loader v-if="isLoading" class="cpMultiselect__loader" color="#B2B2BD" />
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<script setup lang="ts">
|
|
81
81
|
import { absolutePosition, getOuterWidth } from '@primeuix/utils/dom'
|
|
82
82
|
import AutoComplete from 'primevue/autocomplete'
|
|
83
|
-
import { ref, computed, onMounted } from 'vue'
|
|
83
|
+
import { ref, computed, onMounted, useSlots } from 'vue'
|
|
84
84
|
|
|
85
85
|
import BaseInputLabel from '@/components/BaseInputLabel.vue'
|
|
86
86
|
import BaseSelectClearButton from '@/components/BaseSelectClearButton.vue'
|
|
@@ -136,6 +136,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
136
136
|
|
|
137
137
|
const emit = defineEmits<Emits>()
|
|
138
138
|
|
|
139
|
+
const slots = useSlots()
|
|
140
|
+
|
|
139
141
|
const selectModel = computed({
|
|
140
142
|
get() {
|
|
141
143
|
return props.modelValue
|
|
@@ -178,10 +180,7 @@ const chevronDynamicClass = computed(() => {
|
|
|
178
180
|
return { 'cpMultiselect__dropdownIcon--isRotated': isDropdownOpen.value }
|
|
179
181
|
})
|
|
180
182
|
|
|
181
|
-
const
|
|
182
|
-
if (!props.multiple) return true
|
|
183
|
-
return !selectModel.value?.length
|
|
184
|
-
})
|
|
183
|
+
const hasPrefixSlot = computed(() => !!slots.prefix)
|
|
185
184
|
|
|
186
185
|
const displayClearButton = computed(() => {
|
|
187
186
|
if (props.multiple) return false
|
|
@@ -273,7 +272,7 @@ onMounted(() => overrideAlignOverlay())
|
|
|
273
272
|
.cpMultiselect {
|
|
274
273
|
display: flex;
|
|
275
274
|
flex-direction: column;
|
|
276
|
-
gap:
|
|
275
|
+
gap: var(--cp-spacing-md);
|
|
277
276
|
|
|
278
277
|
&__label {
|
|
279
278
|
margin-bottom: 0;
|
|
@@ -294,45 +293,56 @@ onMounted(() => overrideAlignOverlay())
|
|
|
294
293
|
display: flex;
|
|
295
294
|
align-items: center;
|
|
296
295
|
justify-content: space-between;
|
|
297
|
-
padding:
|
|
298
|
-
box-shadow:
|
|
299
|
-
|
|
300
|
-
|
|
296
|
+
padding: var(--cp-spacing-md) var(--cp-spacing-xl);
|
|
297
|
+
box-shadow:
|
|
298
|
+
var(--cp-shadows-3xs),
|
|
299
|
+
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
|
|
300
|
+
border-radius: var(--cp-radius-md);
|
|
301
|
+
gap: var(--cp-spacing-md);
|
|
301
302
|
|
|
302
303
|
&--sm {
|
|
303
|
-
padding:
|
|
304
|
+
padding: var(--cp-spacing-sm) var(--cp-spacing-lg);
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
&:has(input:hover):not(:has(input:disabled)) {
|
|
307
|
-
outline:
|
|
308
|
+
outline: var(--cp-dimensions-0_25) solid var(--cp-border-soft-hover);
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
&:has(input:focus-visible):not(:has(input:disabled)) {
|
|
311
|
-
outline:
|
|
312
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-border-accent-solid);
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
&:has(input:disabled) {
|
|
315
|
-
background-color:
|
|
316
|
+
background-color: var(--cp-background-white);
|
|
316
317
|
cursor: not-allowed;
|
|
318
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-disabled);
|
|
319
|
+
color: var(--cp-text-disabled);
|
|
320
|
+
|
|
321
|
+
input,
|
|
322
|
+
input::placeholder {
|
|
323
|
+
color: var(--cp-text-disabled);
|
|
324
|
+
}
|
|
317
325
|
|
|
318
326
|
.cpMultiselect__toggle {
|
|
319
327
|
display: none;
|
|
320
328
|
}
|
|
321
329
|
.cpIcon {
|
|
322
|
-
color:
|
|
330
|
+
color: var(--cp-foreground-disabled);
|
|
323
331
|
}
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
&:has([data-p*='invalid']) {
|
|
327
|
-
outline:
|
|
328
|
-
box-shadow: 0 0 0
|
|
334
|
+
&:is([data-p*='invalid'], .p-invalid, :has([data-p*='invalid']), :has([aria-invalid='true'])) {
|
|
335
|
+
outline: var(--cp-dimensions-0_25) solid var(--cp-border-error-solid) !important;
|
|
336
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-error-solid) !important;
|
|
329
337
|
|
|
330
|
-
&:has(input:hover) {
|
|
331
|
-
outline:
|
|
338
|
+
&:is(:hover, :has(input:hover), :has(input:placeholder-shown):has(input:hover)) {
|
|
339
|
+
outline: var(--cp-dimensions-0_25) solid var(--cp-border-error-solid) !important;
|
|
340
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-error-solid) !important;
|
|
332
341
|
}
|
|
333
342
|
|
|
334
|
-
&:has(input:focus-visible) {
|
|
335
|
-
outline:
|
|
343
|
+
&:is(:focus-within, :has(input:focus-visible), :has(input:placeholder-shown):has(input:focus-visible)) {
|
|
344
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-border-error-solid) !important;
|
|
345
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-error-solid) !important;
|
|
336
346
|
}
|
|
337
347
|
}
|
|
338
348
|
}
|
|
@@ -341,7 +351,7 @@ onMounted(() => overrideAlignOverlay())
|
|
|
341
351
|
display: flex;
|
|
342
352
|
flex: 1;
|
|
343
353
|
flex-wrap: wrap;
|
|
344
|
-
gap:
|
|
354
|
+
gap: var(--cp-spacing-md);
|
|
345
355
|
|
|
346
356
|
li {
|
|
347
357
|
display: flex;
|
|
@@ -350,8 +360,8 @@ onMounted(() => overrideAlignOverlay())
|
|
|
350
360
|
}
|
|
351
361
|
|
|
352
362
|
&__tag.cpBadge.cpBadge--sm {
|
|
353
|
-
padding-top:
|
|
354
|
-
padding-bottom:
|
|
363
|
+
padding-top: calc(var(--cp-dimensions-0_5) * 1.5);
|
|
364
|
+
padding-bottom: calc(var(--cp-dimensions-0_5) * 1.5);
|
|
355
365
|
}
|
|
356
366
|
|
|
357
367
|
&__toggle {
|
|
@@ -374,17 +384,21 @@ onMounted(() => overrideAlignOverlay())
|
|
|
374
384
|
|
|
375
385
|
&__input {
|
|
376
386
|
padding: 0;
|
|
377
|
-
font-size:
|
|
378
|
-
line-height:
|
|
387
|
+
font-size: var(--cp-text-size-sm);
|
|
388
|
+
line-height: var(--cp-line-height-md);
|
|
379
389
|
background-color: transparent;
|
|
380
390
|
width: 100%;
|
|
381
391
|
|
|
392
|
+
&::placeholder {
|
|
393
|
+
color: var(--cp-text-placeholder);
|
|
394
|
+
}
|
|
395
|
+
|
|
382
396
|
&:disabled {
|
|
383
|
-
color:
|
|
397
|
+
color: var(--cp-foreground-disabled);
|
|
384
398
|
cursor: not-allowed;
|
|
385
399
|
|
|
386
400
|
&::placeholder {
|
|
387
|
-
color:
|
|
401
|
+
color: var(--cp-text-disabled);
|
|
388
402
|
}
|
|
389
403
|
}
|
|
390
404
|
|
|
@@ -396,32 +410,31 @@ onMounted(() => overrideAlignOverlay())
|
|
|
396
410
|
}
|
|
397
411
|
|
|
398
412
|
&__dropdownIcon {
|
|
399
|
-
|
|
413
|
+
width: var(--cp-dimensions-4);
|
|
414
|
+
height: var(--cp-dimensions-4);
|
|
400
415
|
|
|
416
|
+
color: var(--cp-foreground-secondary);
|
|
401
417
|
transition: rotate 200ms ease;
|
|
402
418
|
|
|
403
419
|
&--isRotated {
|
|
404
420
|
rotate: 180deg;
|
|
421
|
+
color: var(--cp-foreground-primary);
|
|
405
422
|
}
|
|
406
423
|
}
|
|
407
424
|
|
|
408
425
|
&__loader {
|
|
409
|
-
|
|
426
|
+
width: var(--cp-dimensions-4);
|
|
427
|
+
height: var(--cp-dimensions-4);
|
|
410
428
|
}
|
|
411
429
|
|
|
412
430
|
&__overlay {
|
|
413
|
-
padding-block:
|
|
431
|
+
padding-block: var(--cp-spacing-sm);
|
|
414
432
|
left: 0;
|
|
415
433
|
overflow: hidden;
|
|
416
|
-
background:
|
|
417
|
-
border-radius:
|
|
418
|
-
margin-block:
|
|
419
|
-
box-shadow:
|
|
420
|
-
0 2px 4px 0 rgba(18, 18, 23, 0.04),
|
|
421
|
-
0 5px 8px 0 rgba(18, 18, 23, 0.04),
|
|
422
|
-
0 10px 18px 0 rgba(18, 18, 23, 0.03),
|
|
423
|
-
0 24px 48px 0 rgba(18, 18, 23, 0.03),
|
|
424
|
-
0 0 0 1px rgba(18, 18, 23, 0.1);
|
|
434
|
+
background: var(--cp-background-primary);
|
|
435
|
+
border-radius: var(--cp-radius-md);
|
|
436
|
+
margin-block: var(--cp-spacing-md);
|
|
437
|
+
box-shadow: var(--cp-shadows-overlay);
|
|
425
438
|
|
|
426
439
|
&--isHidden {
|
|
427
440
|
display: none;
|
|
@@ -438,23 +451,28 @@ onMounted(() => overrideAlignOverlay())
|
|
|
438
451
|
|
|
439
452
|
&__list {
|
|
440
453
|
display: flex;
|
|
441
|
-
padding-inline:
|
|
454
|
+
padding-inline: var(--cp-spacing-sm);
|
|
442
455
|
flex-direction: column;
|
|
443
|
-
gap:
|
|
456
|
+
gap: var(--cp-spacing-xs);
|
|
444
457
|
}
|
|
445
458
|
|
|
446
459
|
&__optionWrapper {
|
|
447
|
-
border-radius:
|
|
460
|
+
border-radius: var(--cp-radius-sm-md);
|
|
448
461
|
|
|
449
462
|
&:hover,
|
|
450
463
|
&[data-p-focused='true'],
|
|
451
464
|
&[data-p-selected='true'] {
|
|
452
|
-
background:
|
|
453
|
-
color:
|
|
465
|
+
background: var(--cp-background-primary-hover);
|
|
466
|
+
color: var(--cp-foreground-primary);
|
|
454
467
|
}
|
|
455
468
|
|
|
456
469
|
&[data-p-selected='true'] {
|
|
457
|
-
|
|
470
|
+
background: var(--cp-background-accent-primary);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
&[data-p-selected='true'] .cpMultiselect__option {
|
|
474
|
+
color: var(--cp-foreground-accent-primary);
|
|
475
|
+
font-weight: 500;
|
|
458
476
|
}
|
|
459
477
|
|
|
460
478
|
&[data-p-disabled='true'] {
|
|
@@ -466,10 +484,10 @@ onMounted(() => overrideAlignOverlay())
|
|
|
466
484
|
|
|
467
485
|
&__optionWrapper > *,
|
|
468
486
|
&__option {
|
|
469
|
-
padding:
|
|
470
|
-
border-radius:
|
|
471
|
-
font-size:
|
|
472
|
-
line-height:
|
|
487
|
+
padding: var(--cp-dimensions-2_5);
|
|
488
|
+
border-radius: var(--cp-radius-sm-md);
|
|
489
|
+
font-size: var(--cp-text-size-sm);
|
|
490
|
+
line-height: var(--cp-line-height-sm);
|
|
473
491
|
text-align: left;
|
|
474
492
|
width: 100%;
|
|
475
493
|
}
|
|
@@ -479,21 +497,29 @@ onMounted(() => overrideAlignOverlay())
|
|
|
479
497
|
}
|
|
480
498
|
|
|
481
499
|
&__empty {
|
|
482
|
-
padding:
|
|
483
|
-
font-size:
|
|
484
|
-
color:
|
|
500
|
+
padding: var(--cp-spacing-md);
|
|
501
|
+
font-size: var(--cp-text-size-sm);
|
|
502
|
+
color: var(--cp-text-secondary);
|
|
485
503
|
}
|
|
486
504
|
|
|
487
505
|
&__error {
|
|
488
|
-
color:
|
|
489
|
-
font-size:
|
|
490
|
-
line-height:
|
|
506
|
+
color: var(--cp-text-error-primary);
|
|
507
|
+
font-size: var(--cp-text-size-sm);
|
|
508
|
+
line-height: var(--cp-line-height-md);
|
|
491
509
|
|
|
492
510
|
&::first-letter {
|
|
493
511
|
text-transform: capitalize;
|
|
494
512
|
}
|
|
495
513
|
}
|
|
496
514
|
|
|
515
|
+
&__clear {
|
|
516
|
+
position: absolute;
|
|
517
|
+
right: var(--cp-dimensions-3_5);
|
|
518
|
+
top: 50%;
|
|
519
|
+
transform: translateY(-50%);
|
|
520
|
+
background-color: var(--cp-background-primary);
|
|
521
|
+
}
|
|
522
|
+
|
|
497
523
|
@include mx.media-query-pointer-device-only {
|
|
498
524
|
&__clear {
|
|
499
525
|
display: none;
|
|
@@ -48,42 +48,42 @@ const componentDynamicClasses = computed(() => {
|
|
|
48
48
|
<style lang="scss">
|
|
49
49
|
.cpPartnerBadge {
|
|
50
50
|
display: inline-flex;
|
|
51
|
-
padding:
|
|
51
|
+
padding: var(--cp-spacing-xs);
|
|
52
52
|
align-items: center;
|
|
53
53
|
justify-content: center;
|
|
54
|
-
border-radius:
|
|
55
|
-
color:
|
|
54
|
+
border-radius: var(--cp-radius-sm);
|
|
55
|
+
color: var(--cp-text-white);
|
|
56
56
|
|
|
57
57
|
&--isOta {
|
|
58
|
-
background-color:
|
|
58
|
+
background-color: var(--cp-background-warning-solid);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&--isAirline {
|
|
62
|
-
background-color:
|
|
62
|
+
background-color: var(--cp-background-blue-solid);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&--isSupplier {
|
|
66
|
-
background-color:
|
|
66
|
+
background-color: var(--cp-background-accent-solid);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&--isThirdParty {
|
|
70
|
-
background-color:
|
|
70
|
+
background-color: var(--cp-background-pink-solid);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
> * {
|
|
74
|
-
width:
|
|
75
|
-
height:
|
|
74
|
+
width: var(--cp-dimensions-5);
|
|
75
|
+
height: var(--cp-dimensions-5);
|
|
76
76
|
aspect-ratio: 1/1;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
&--sm > * {
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
80
|
+
width: var(--cp-dimensions-4);
|
|
81
|
+
height: var(--cp-dimensions-4);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&--xs > * {
|
|
85
|
-
width:
|
|
86
|
-
height:
|
|
85
|
+
width: var(--cp-dimensions-3);
|
|
86
|
+
height: var(--cp-dimensions-3);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
</style>
|
|
@@ -105,20 +105,20 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
&--is#{$className}:focus-within {
|
|
108
|
-
box-shadow: 0 0 0
|
|
108
|
+
box-shadow: 0 0 0 var(--cp-dimensions-1) rgba($color, 0.1);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.cpRadio {
|
|
113
|
-
$cp-radio-base-width:
|
|
113
|
+
$cp-radio-base-width: var(--cp-dimensions-5);
|
|
114
114
|
|
|
115
115
|
position: relative;
|
|
116
|
-
border:
|
|
117
|
-
border-radius:
|
|
118
|
-
padding:
|
|
116
|
+
border: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
|
|
117
|
+
border-radius: var(--cp-radius-md-lg);
|
|
118
|
+
padding: var(--cp-spacing-xl) var(--cp-spacing-lg);
|
|
119
119
|
display: grid;
|
|
120
120
|
grid-template-columns: min-content 1fr;
|
|
121
|
-
grid-gap:
|
|
121
|
+
grid-gap: var(--cp-spacing-lg);
|
|
122
122
|
align-items: center;
|
|
123
123
|
width: 100%;
|
|
124
124
|
|
|
@@ -127,12 +127,16 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
127
127
|
cursor: pointer;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
@include cp-radio-style(
|
|
131
|
-
|
|
130
|
+
@include cp-radio-style(var(--cp-foreground-accent-primary), 'Accent');
|
|
131
|
+
|
|
132
|
+
@include cp-radio-style(var(--cp-foreground-blue-primary), 'Blue');
|
|
133
|
+
|
|
134
|
+
@include cp-radio-style(var(--cp-foreground-accent-primary), 'Purple'); // TODO: Sould be replace by ACCENT
|
|
132
135
|
|
|
133
136
|
&--isDisabled {
|
|
134
|
-
background-color:
|
|
135
|
-
color:
|
|
137
|
+
background-color: var(--cp-background-disabled);
|
|
138
|
+
color: var(--cp-foreground-disabled);
|
|
139
|
+
border-color: var(--cp-border-disabled);
|
|
136
140
|
|
|
137
141
|
&,
|
|
138
142
|
* {
|
|
@@ -142,25 +146,25 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
142
146
|
&:hover,
|
|
143
147
|
&:focus {
|
|
144
148
|
box-shadow: none;
|
|
145
|
-
border-color:
|
|
149
|
+
border-color: var(--cp-border-disabled);
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
&--isActive#{&}--isDisabled,
|
|
150
154
|
&--isActive#{&}--isDisabled:hover {
|
|
151
|
-
border-color:
|
|
155
|
+
border-color: var(--cp-border-disabled);
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
&:not(:last-of-type) {
|
|
155
|
-
margin-bottom:
|
|
159
|
+
margin-bottom: var(--cp-spacing-lg);
|
|
156
160
|
}
|
|
157
161
|
|
|
158
162
|
input {
|
|
159
163
|
-webkit-appearance: none;
|
|
160
164
|
-moz-appearance: none;
|
|
161
165
|
appearance: none;
|
|
162
|
-
border:
|
|
163
|
-
border-radius:
|
|
166
|
+
border: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
|
|
167
|
+
border-radius: var(--cp-radius-full);
|
|
164
168
|
padding: 25%;
|
|
165
169
|
width: $cp-radio-base-width;
|
|
166
170
|
height: $cp-radio-base-width;
|
|
@@ -171,8 +175,8 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
171
175
|
display: flex;
|
|
172
176
|
width: 100%;
|
|
173
177
|
height: 100%;
|
|
174
|
-
border-radius:
|
|
175
|
-
background-color:
|
|
178
|
+
border-radius: var(--cp-radius-full);
|
|
179
|
+
background-color: var(--cp-background-primary);
|
|
176
180
|
transition: transform 0.15s linear;
|
|
177
181
|
transform: scale(0);
|
|
178
182
|
}
|
|
@@ -186,14 +190,18 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
186
190
|
}
|
|
187
191
|
|
|
188
192
|
&:checked:disabled {
|
|
189
|
-
border-color:
|
|
190
|
-
background-color:
|
|
193
|
+
border-color: var(--cp-border-disabled);
|
|
194
|
+
background-color: var(--cp-background-disabled);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:checked:disabled:before {
|
|
198
|
+
background-color: var(--cp-foreground-disabled);
|
|
191
199
|
}
|
|
192
200
|
|
|
193
201
|
&:checked:disabled ~ span .cpRadio {
|
|
194
202
|
&__label,
|
|
195
203
|
&__additionalData {
|
|
196
|
-
color:
|
|
204
|
+
color: var(--cp-foreground-disabled);
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
207
|
}
|
|
@@ -211,12 +219,12 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
211
219
|
justify-content: space-between;
|
|
212
220
|
flex-wrap: wrap;
|
|
213
221
|
text-transform: capitalize;
|
|
214
|
-
margin: 0 (-
|
|
222
|
+
margin: 0 calc(var(--cp-spacing-md) * -1);
|
|
215
223
|
}
|
|
216
224
|
|
|
217
225
|
&__label,
|
|
218
226
|
&__description {
|
|
219
|
-
margin: 0
|
|
227
|
+
margin: 0 var(--cp-spacing-md);
|
|
220
228
|
flex-grow: 1;
|
|
221
229
|
}
|
|
222
230
|
|
|
@@ -227,7 +235,7 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
227
235
|
|
|
228
236
|
&__description,
|
|
229
237
|
&__additionalData {
|
|
230
|
-
color:
|
|
238
|
+
color: var(--cp-text-secondary);
|
|
231
239
|
}
|
|
232
240
|
|
|
233
241
|
&__label {
|
|
@@ -236,7 +244,7 @@ const computedClasses = ({ value, disabled }: { disabled?: boolean; value: strin
|
|
|
236
244
|
|
|
237
245
|
&__additionalData {
|
|
238
246
|
text-align: right;
|
|
239
|
-
margin-left:
|
|
247
|
+
margin-left: var(--cp-spacing-xl);
|
|
240
248
|
}
|
|
241
249
|
}
|
|
242
250
|
</style>
|
|
@@ -122,22 +122,25 @@ const handleChange = (e: Event): void => {
|
|
|
122
122
|
position: relative;
|
|
123
123
|
|
|
124
124
|
&:has(.cpSelect__help, .cpSelect__error) .cpSelect__container {
|
|
125
|
-
margin-bottom:
|
|
125
|
+
margin-bottom: var(--cp-spacing-md);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
&__container {
|
|
129
129
|
position: relative;
|
|
130
130
|
|
|
131
131
|
&:after {
|
|
132
|
-
|
|
132
|
+
width: var(--cp-dimensions-4);
|
|
133
|
+
height: var(--cp-dimensions-4);
|
|
133
134
|
|
|
134
135
|
content: '';
|
|
135
136
|
position: absolute;
|
|
136
|
-
right:
|
|
137
|
+
right: var(--cp-dimensions-3);
|
|
137
138
|
top: 50%;
|
|
138
139
|
transform: translateY(-50%);
|
|
139
|
-
background-
|
|
140
|
-
|
|
140
|
+
background-color: var(--cp-foreground-secondary);
|
|
141
|
+
mask-image: url('@/assets/images/icons/chevron-down-icon.svg');
|
|
142
|
+
mask-size: cover;
|
|
143
|
+
mask-repeat: no-repeat;
|
|
141
144
|
pointer-events: none;
|
|
142
145
|
}
|
|
143
146
|
}
|
|
@@ -145,40 +148,46 @@ const handleChange = (e: Event): void => {
|
|
|
145
148
|
&__inner {
|
|
146
149
|
@extend %u-text-ellipsis;
|
|
147
150
|
|
|
148
|
-
box-shadow:
|
|
151
|
+
box-shadow:
|
|
152
|
+
var(--cp-shadows-3xs),
|
|
153
|
+
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
|
|
149
154
|
appearance: none;
|
|
150
155
|
border: none;
|
|
151
|
-
border-radius:
|
|
152
|
-
background-color:
|
|
156
|
+
border-radius: var(--cp-radius-md);
|
|
157
|
+
background-color: var(--cp-background-primary);
|
|
153
158
|
width: 100%;
|
|
154
|
-
color:
|
|
159
|
+
color: var(--cp-foreground-primary);
|
|
155
160
|
cursor: pointer;
|
|
156
|
-
padding:
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
padding: var(--cp-spacing-md)
|
|
162
|
+
calc(var(--cp-spacing-lg) + var(--cp-spacing-sm) + var(--cp-dimensions-4) + var(--cp-spacing-md))
|
|
163
|
+
var(--cp-spacing-md) var(--cp-spacing-xl);
|
|
164
|
+
line-height: var(--cp-line-height-md);
|
|
165
|
+
font-size: var(--cp-text-size-sm);
|
|
159
166
|
|
|
160
167
|
&:hover {
|
|
161
|
-
box-shadow:
|
|
168
|
+
box-shadow:
|
|
169
|
+
var(--cp-shadows-3xs),
|
|
170
|
+
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft-hover);
|
|
162
171
|
}
|
|
163
172
|
|
|
164
173
|
&:focus {
|
|
165
|
-
outline:
|
|
166
|
-
background-color:
|
|
174
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-focus);
|
|
175
|
+
background-color: var(--cp-background-primary);
|
|
167
176
|
}
|
|
168
177
|
}
|
|
169
178
|
|
|
170
179
|
&__help,
|
|
171
180
|
&__error {
|
|
172
|
-
font-size:
|
|
173
|
-
line-height:
|
|
181
|
+
font-size: var(--cp-text-size-sm);
|
|
182
|
+
line-height: var(--cp-line-height-md);
|
|
174
183
|
}
|
|
175
184
|
|
|
176
185
|
&__help {
|
|
177
|
-
color:
|
|
186
|
+
color: var(--cp-text-secondary);
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
&__error {
|
|
181
|
-
color:
|
|
190
|
+
color: var(--cp-foreground-error-primary);
|
|
182
191
|
|
|
183
192
|
&::first-letter {
|
|
184
193
|
text-transform: capitalize;
|
|
@@ -187,18 +196,19 @@ const handleChange = (e: Event): void => {
|
|
|
187
196
|
|
|
188
197
|
&--isDisabled {
|
|
189
198
|
.cpSelect__inner {
|
|
190
|
-
box-shadow: 0 0 0
|
|
191
|
-
background:
|
|
199
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-disabled);
|
|
200
|
+
background: var(--cp-background-disabled);
|
|
192
201
|
}
|
|
193
202
|
|
|
194
203
|
.cpSelect__inner,
|
|
195
204
|
.cpSelect__container:after {
|
|
196
205
|
cursor: not-allowed;
|
|
197
|
-
color:
|
|
206
|
+
color: var(--cp-text-disabled);
|
|
207
|
+
opacity: 1;
|
|
198
208
|
}
|
|
199
209
|
|
|
200
210
|
.cpSelect__container:after {
|
|
201
|
-
|
|
211
|
+
background-color: var(--cp-foreground-disabled);
|
|
202
212
|
}
|
|
203
213
|
}
|
|
204
214
|
|
|
@@ -206,29 +216,32 @@ const handleChange = (e: Event): void => {
|
|
|
206
216
|
.cpSelect__inner,
|
|
207
217
|
.cpSelect__inner:hover,
|
|
208
218
|
.cpSelect__inner:focus {
|
|
209
|
-
box-shadow: 0 0 0
|
|
219
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-error-solid);
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
.cpSelect__inner:focus {
|
|
213
|
-
outline:
|
|
223
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-border-error-solid);
|
|
214
224
|
}
|
|
215
225
|
}
|
|
216
226
|
|
|
217
227
|
&--sm {
|
|
218
228
|
.cpSelect__inner {
|
|
219
|
-
padding:
|
|
229
|
+
padding: var(--cp-spacing-sm) calc(var(--cp-spacing-2xl) + var(--cp-dimensions-3)) var(--cp-spacing-sm)
|
|
230
|
+
var(--cp-spacing-lg);
|
|
220
231
|
}
|
|
221
232
|
}
|
|
222
233
|
|
|
223
234
|
&--lg {
|
|
224
235
|
.cpSelect__inner {
|
|
225
|
-
border-radius:
|
|
226
|
-
font-size:
|
|
227
|
-
padding:
|
|
236
|
+
border-radius: var(--cp-radius-md-lg);
|
|
237
|
+
font-size: var(--cp-text-size-md);
|
|
238
|
+
padding: var(--cp-spacing-lg) calc(var(--cp-spacing-xl) + var(--cp-dimensions-5) + var(--cp-spacing-sm))
|
|
239
|
+
var(--cp-spacing-lg) var(--cp-spacing-xl);
|
|
228
240
|
}
|
|
229
241
|
|
|
230
242
|
.cpSelect__container:after {
|
|
231
|
-
|
|
243
|
+
width: var(--cp-dimensions-5);
|
|
244
|
+
height: var(--cp-dimensions-5);
|
|
232
245
|
}
|
|
233
246
|
}
|
|
234
247
|
}
|