@citizenplane/pimp 10.0.7 → 10.1.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 +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 -1
- package/src/assets/styles/utilities/_index.scss +26 -5
- 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 +241 -90
- package/src/components/CpTableColumnEditor.vue +18 -16
- package/src/components/CpTableEmptyState.vue +9 -9
- package/src/components/CpTabs.vue +17 -36
- 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/_sizing.scss +0 -4
|
@@ -55,7 +55,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
55
55
|
checkboxValue: '',
|
|
56
56
|
checkboxLabel: '',
|
|
57
57
|
groupName: '',
|
|
58
|
-
color: ToggleColors.
|
|
58
|
+
color: ToggleColors.ACCENT,
|
|
59
59
|
helper: '',
|
|
60
60
|
})
|
|
61
61
|
|
|
@@ -132,7 +132,7 @@ const onChange = () => {
|
|
|
132
132
|
</script>
|
|
133
133
|
|
|
134
134
|
<style lang="scss">
|
|
135
|
-
@mixin cp-checkbox-style($color, $className) {
|
|
135
|
+
@mixin cp-checkbox-style($color, $bgHoverColor, $className) {
|
|
136
136
|
&--is#{$className} input:checked,
|
|
137
137
|
&--is#{$className} input:indeterminate {
|
|
138
138
|
background-color: $color;
|
|
@@ -140,43 +140,49 @@ const onChange = () => {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
&--is#{$className}:hover input {
|
|
143
|
-
background-color:
|
|
143
|
+
background-color: var(--cp-background-primary-hover);
|
|
144
|
+
border-color: var(--cp-border-soft-hover);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
&--is#{$className}:hover input:checked,
|
|
147
148
|
&--is#{$className}:hover input:indeterminate {
|
|
148
|
-
background-color:
|
|
149
|
+
background-color: $bgHoverColor;
|
|
150
|
+
border-color: $bgHoverColor;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
&--is#{$className} input:focus-visible {
|
|
152
154
|
position: relative;
|
|
153
155
|
z-index: 1;
|
|
154
|
-
outline:
|
|
155
|
-
outline-offset:
|
|
156
|
+
outline: var(--cp-dimensions-0_5) solid $color;
|
|
157
|
+
outline-offset: var(--cp-dimensions-0_5);
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
.cpCheckbox {
|
|
160
|
-
$cp-checkbox-base-width: fn.px-to-rem(16);
|
|
161
|
-
$cp-checkbox-tick-base-width: fn.px-to-rem(12);
|
|
162
|
-
|
|
163
162
|
position: relative;
|
|
164
163
|
display: flex;
|
|
165
164
|
align-items: flex-start;
|
|
166
165
|
cursor: pointer;
|
|
167
166
|
|
|
168
|
-
@include cp-checkbox-style(
|
|
169
|
-
|
|
167
|
+
@include cp-checkbox-style(var(--cp-background-accent-solid), var(--cp-background-accent-solid-hover), 'Accent');
|
|
168
|
+
|
|
169
|
+
@include cp-checkbox-style(var(--cp-background-blue-solid), var(--cp-background-blue-solid-hover), 'Blue');
|
|
170
|
+
|
|
171
|
+
@include cp-checkbox-style(
|
|
172
|
+
var(--cp-background-accent-solid),
|
|
173
|
+
var(--cp-background-accent-solid-hover),
|
|
174
|
+
'Purple'
|
|
175
|
+
); // TODO: Should be replace by ACCENT
|
|
170
176
|
|
|
171
177
|
&:not(&--isEmpty) {
|
|
172
|
-
gap:
|
|
178
|
+
gap: var(--cp-spacing-md);
|
|
173
179
|
}
|
|
174
180
|
|
|
175
181
|
&__wrapper {
|
|
176
182
|
display: flex;
|
|
177
183
|
align-items: center;
|
|
178
184
|
justify-content: center;
|
|
179
|
-
padding:
|
|
185
|
+
padding: var(--cp-spacing-sm);
|
|
180
186
|
flex-shrink: 0;
|
|
181
187
|
}
|
|
182
188
|
|
|
@@ -184,23 +190,24 @@ const onChange = () => {
|
|
|
184
190
|
-webkit-appearance: none;
|
|
185
191
|
-moz-appearance: none;
|
|
186
192
|
appearance: none;
|
|
187
|
-
border:
|
|
188
|
-
border-radius:
|
|
189
|
-
width:
|
|
190
|
-
height:
|
|
193
|
+
border: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
|
|
194
|
+
border-radius: var(--cp-radius-sm);
|
|
195
|
+
width: var(--cp-dimensions-4);
|
|
196
|
+
height: var(--cp-dimensions-4);
|
|
191
197
|
flex-shrink: 0;
|
|
192
198
|
cursor: pointer;
|
|
199
|
+
box-shadow: var(--cp-shadows-3xs);
|
|
193
200
|
transition:
|
|
194
201
|
background-color 0.1s ease-out,
|
|
195
202
|
transform 0.1s linear;
|
|
196
|
-
background-color:
|
|
203
|
+
background-color: var(--cp-background-primary);
|
|
197
204
|
|
|
198
205
|
& + i {
|
|
199
206
|
position: absolute;
|
|
200
207
|
z-index: 2;
|
|
201
|
-
width:
|
|
202
|
-
height:
|
|
203
|
-
color:
|
|
208
|
+
width: var(--cp-dimensions-3);
|
|
209
|
+
height: var(--cp-dimensions-3);
|
|
210
|
+
color: var(--cp-foreground-white);
|
|
204
211
|
opacity: 0;
|
|
205
212
|
transition: opacity 0.2s linear 0.1s;
|
|
206
213
|
}
|
|
@@ -216,20 +223,18 @@ const onChange = () => {
|
|
|
216
223
|
}
|
|
217
224
|
|
|
218
225
|
&:disabled {
|
|
219
|
-
background-color:
|
|
226
|
+
background-color: var(--cp-background-disabled);
|
|
220
227
|
cursor: not-allowed;
|
|
221
|
-
|
|
222
|
-
& ~ span {
|
|
223
|
-
color: colors.$neutral-dark-1;
|
|
224
|
-
}
|
|
228
|
+
box-shadow: none;
|
|
225
229
|
}
|
|
226
230
|
|
|
227
|
-
&:checked:disabled
|
|
228
|
-
|
|
229
|
-
|
|
231
|
+
&:checked:disabled,
|
|
232
|
+
&:indeterminate:disabled {
|
|
233
|
+
border-color: var(--cp-border-disabled);
|
|
234
|
+
background-color: var(--cp-background-disabled);
|
|
230
235
|
|
|
231
|
-
&
|
|
232
|
-
color:
|
|
236
|
+
& + i {
|
|
237
|
+
color: var(--cp-foreground-disabled);
|
|
233
238
|
}
|
|
234
239
|
}
|
|
235
240
|
|
|
@@ -242,6 +247,11 @@ const onChange = () => {
|
|
|
242
247
|
cursor: not-allowed;
|
|
243
248
|
}
|
|
244
249
|
|
|
250
|
+
&--isDisabled &__label,
|
|
251
|
+
&--isDisabled &__helper {
|
|
252
|
+
color: var(--cp-text-disabled);
|
|
253
|
+
}
|
|
254
|
+
|
|
245
255
|
&--isReversed {
|
|
246
256
|
flex-direction: row-reverse;
|
|
247
257
|
}
|
|
@@ -253,7 +263,7 @@ const onChange = () => {
|
|
|
253
263
|
&__label,
|
|
254
264
|
&__helper {
|
|
255
265
|
display: block;
|
|
256
|
-
line-height:
|
|
266
|
+
line-height: var(--cp-line-height-md);
|
|
257
267
|
}
|
|
258
268
|
|
|
259
269
|
&__label {
|
|
@@ -265,7 +275,7 @@ const onChange = () => {
|
|
|
265
275
|
}
|
|
266
276
|
|
|
267
277
|
&__helper {
|
|
268
|
-
color:
|
|
278
|
+
color: var(--cp-text-secondary);
|
|
269
279
|
}
|
|
270
280
|
}
|
|
271
281
|
</style>
|
|
@@ -54,14 +54,11 @@ defineExpose({ show, hide })
|
|
|
54
54
|
|
|
55
55
|
<style lang="scss">
|
|
56
56
|
.cpContextualMenu {
|
|
57
|
-
min-width:
|
|
58
|
-
padding:
|
|
59
|
-
border:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
0 9px 24px rgba(colors.$neutral-dark, 0.2),
|
|
64
|
-
0 4px 4px rgba(colors.$neutral-dark, 0.1);
|
|
65
|
-
font-size: fn.px-to-em(14);
|
|
57
|
+
min-width: calc(var(--cp-dimensions-1) * 62.5);
|
|
58
|
+
padding: var(--cp-spacing-sm) 0;
|
|
59
|
+
border-radius: var(--cp-radius-md);
|
|
60
|
+
background-color: var(--cp-background-primary);
|
|
61
|
+
box-shadow: var(--cp-shadows-overlay);
|
|
62
|
+
font-size: var(--cp-text-size-sm);
|
|
66
63
|
}
|
|
67
64
|
</style>
|
|
@@ -282,7 +282,7 @@ watch(year, handleUpdate)
|
|
|
282
282
|
input,
|
|
283
283
|
select {
|
|
284
284
|
background-color: transparent;
|
|
285
|
-
color:
|
|
285
|
+
color: var(--cp-text-primary);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
// Hide arrows from number input
|
|
@@ -307,72 +307,74 @@ watch(year, handleUpdate)
|
|
|
307
307
|
.cpDate {
|
|
308
308
|
input::placeholder,
|
|
309
309
|
&__month--isEmpty {
|
|
310
|
-
color:
|
|
310
|
+
color: var(--cp-text-placeholder);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
&__inputs {
|
|
314
314
|
display: flex;
|
|
315
|
-
box-shadow:
|
|
316
|
-
|
|
315
|
+
box-shadow:
|
|
316
|
+
var(--cp-shadows-3xs),
|
|
317
|
+
0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
|
|
318
|
+
border-radius: var(--cp-radius-md-lg);
|
|
317
319
|
overflow: hidden;
|
|
318
|
-
background-color:
|
|
320
|
+
background-color: var(--cp-background-primary);
|
|
319
321
|
|
|
320
322
|
&:hover {
|
|
321
|
-
|
|
323
|
+
border-color: var(--cp-border-soft-hover);
|
|
322
324
|
}
|
|
323
325
|
|
|
324
326
|
&:focus-within {
|
|
325
|
-
outline:
|
|
327
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-border-accent-solid);
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
&__inputs > *:not(.cpDate__divider) {
|
|
330
|
-
line-height:
|
|
332
|
+
line-height: var(--cp-line-height-md);
|
|
331
333
|
}
|
|
332
334
|
|
|
333
335
|
&--lg {
|
|
334
336
|
.cpDate__day,
|
|
335
337
|
.cpDate__year {
|
|
336
|
-
padding:
|
|
337
|
-
font-size:
|
|
338
|
+
padding: var(--cp-spacing-lg) var(--cp-spacing-xl);
|
|
339
|
+
font-size: var(--cp-text-size-md);
|
|
338
340
|
}
|
|
339
341
|
|
|
340
342
|
.cpDate__month select {
|
|
341
|
-
padding:
|
|
342
|
-
font-size:
|
|
343
|
+
padding: var(--cp-spacing-lg) var(--cp-dimensions-8) var(--cp-spacing-lg) var(--cp-spacing-xl);
|
|
344
|
+
font-size: var(--cp-text-size-md);
|
|
343
345
|
}
|
|
344
346
|
}
|
|
345
347
|
|
|
346
348
|
&--md {
|
|
347
349
|
.cpDate__day,
|
|
348
350
|
.cpDate__year {
|
|
349
|
-
padding:
|
|
350
|
-
font-size:
|
|
351
|
+
padding: var(--cp-spacing-md) var(--cp-spacing-xl);
|
|
352
|
+
font-size: var(--cp-text-size-sm);
|
|
351
353
|
}
|
|
352
354
|
|
|
353
355
|
.cpDate__month select {
|
|
354
|
-
padding:
|
|
355
|
-
font-size:
|
|
356
|
+
padding: var(--cp-spacing-md) calc(var(--cp-dimensions-1) * 7) var(--cp-spacing-md) var(--cp-spacing-lg);
|
|
357
|
+
font-size: var(--cp-text-size-sm);
|
|
356
358
|
}
|
|
357
359
|
}
|
|
358
360
|
|
|
359
361
|
&--sm {
|
|
360
362
|
.cpDate__day,
|
|
361
363
|
.cpDate__year {
|
|
362
|
-
padding:
|
|
363
|
-
font-size:
|
|
364
|
+
padding: var(--cp-spacing-sm) var(--cp-spacing-lg);
|
|
365
|
+
font-size: var(--cp-text-size-sm);
|
|
364
366
|
}
|
|
365
367
|
|
|
366
368
|
.cpDate__month select {
|
|
367
|
-
padding:
|
|
368
|
-
font-size:
|
|
369
|
+
padding: var(--cp-spacing-sm) var(--cp-dimensions-8) var(--cp-spacing-sm) var(--cp-spacing-lg);
|
|
370
|
+
font-size: var(--cp-text-size-sm);
|
|
369
371
|
}
|
|
370
372
|
}
|
|
371
373
|
|
|
372
374
|
&__divider {
|
|
373
375
|
flex-shrink: 0;
|
|
374
|
-
width:
|
|
375
|
-
background-color:
|
|
376
|
+
width: var(--cp-dimensions-0_25);
|
|
377
|
+
background-color: var(--cp-border-soft);
|
|
376
378
|
}
|
|
377
379
|
|
|
378
380
|
&__month,
|
|
@@ -388,11 +390,16 @@ watch(year, handleUpdate)
|
|
|
388
390
|
&::after {
|
|
389
391
|
position: absolute;
|
|
390
392
|
top: 50%;
|
|
391
|
-
right:
|
|
392
|
-
width:
|
|
393
|
-
height:
|
|
394
|
-
background-
|
|
395
|
-
|
|
393
|
+
right: var(--cp-dimensions-3);
|
|
394
|
+
width: var(--cp-dimensions-5);
|
|
395
|
+
height: var(--cp-dimensions-5);
|
|
396
|
+
background-color: var(--cp-text-secondary);
|
|
397
|
+
mask-image: url('@/assets/images/icons/chevron-down-icon.svg');
|
|
398
|
+
mask-size: cover;
|
|
399
|
+
mask-repeat: no-repeat;
|
|
400
|
+
-webkit-mask-image: url('@/assets/images/icons/chevron-down-icon.svg');
|
|
401
|
+
-webkit-mask-size: cover;
|
|
402
|
+
-webkit-mask-repeat: no-repeat;
|
|
396
403
|
transform: translateY(-50%);
|
|
397
404
|
content: '';
|
|
398
405
|
pointer-events: none;
|
|
@@ -403,7 +410,7 @@ watch(year, handleUpdate)
|
|
|
403
410
|
width: 100%;
|
|
404
411
|
color: inherit;
|
|
405
412
|
cursor: pointer;
|
|
406
|
-
line-height:
|
|
413
|
+
line-height: var(--cp-line-height-md);
|
|
407
414
|
|
|
408
415
|
&:focus-visible {
|
|
409
416
|
text-decoration: underline;
|
|
@@ -411,7 +418,7 @@ watch(year, handleUpdate)
|
|
|
411
418
|
}
|
|
412
419
|
|
|
413
420
|
select > option:not(:disabled) {
|
|
414
|
-
color:
|
|
421
|
+
color: var(--cp-text-primary);
|
|
415
422
|
}
|
|
416
423
|
}
|
|
417
424
|
|
|
@@ -424,41 +431,47 @@ watch(year, handleUpdate)
|
|
|
424
431
|
&--isInvalid {
|
|
425
432
|
.cpDate__inputs,
|
|
426
433
|
.cpDate__inputs:hover {
|
|
427
|
-
box-shadow: 0 0 0
|
|
434
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-error-primary);
|
|
428
435
|
}
|
|
429
436
|
|
|
430
437
|
.cpDate__inputs:focus-within {
|
|
431
|
-
outline:
|
|
432
|
-
box-shadow: 0 0 0
|
|
438
|
+
outline: var(--cp-dimensions-0_5) solid var(--cp-border-error-primary);
|
|
439
|
+
box-shadow: 0 0 0 var(--cp-dimensions-0_25) color-mix(in srgb, #{var(--cp-border-error-primary)} 40%, transparent);
|
|
433
440
|
}
|
|
434
441
|
|
|
435
442
|
.cpDate__divider {
|
|
436
|
-
background-color:
|
|
443
|
+
background-color: var(--cp-border-error-primary);
|
|
437
444
|
}
|
|
438
445
|
}
|
|
439
446
|
|
|
440
447
|
&--isDisabled {
|
|
441
448
|
.cpDate__inputs {
|
|
442
|
-
|
|
443
|
-
|
|
449
|
+
background: var(--cp-background-disabled);
|
|
450
|
+
border-color: var(--cp-border-disabled);
|
|
444
451
|
}
|
|
445
452
|
|
|
446
453
|
.cpDate__inputs *,
|
|
447
454
|
input::placeholder {
|
|
448
|
-
color:
|
|
455
|
+
color: var(--cp-text-disabled) !important;
|
|
449
456
|
cursor: not-allowed !important;
|
|
450
457
|
}
|
|
451
458
|
|
|
459
|
+
.cpDate__month select:disabled {
|
|
460
|
+
color: var(--cp-text-disabled) !important;
|
|
461
|
+
-webkit-text-fill-color: var(--cp-text-disabled) !important;
|
|
462
|
+
opacity: 1;
|
|
463
|
+
}
|
|
464
|
+
|
|
452
465
|
.cpDate__month::after {
|
|
453
466
|
opacity: 0.4;
|
|
454
467
|
}
|
|
455
468
|
}
|
|
456
469
|
|
|
457
470
|
&__errorMessage {
|
|
458
|
-
margin-top:
|
|
459
|
-
font-size:
|
|
460
|
-
line-height:
|
|
461
|
-
color:
|
|
471
|
+
margin-top: var(--cp-spacing-md);
|
|
472
|
+
font-size: var(--cp-text-size-sm);
|
|
473
|
+
line-height: var(--cp-line-height-md);
|
|
474
|
+
color: var(--cp-text-error-primary);
|
|
462
475
|
}
|
|
463
476
|
}
|
|
464
477
|
</style>
|
|
@@ -163,7 +163,7 @@ watch(
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
&__input input:disabled {
|
|
166
|
-
background-color:
|
|
166
|
+
background-color: var(--cp-background-primary);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
&__datepicker {
|
|
@@ -173,7 +173,7 @@ watch(
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
&__datepicker:not(&__datepicker--isInline) {
|
|
176
|
-
margin-top:
|
|
176
|
+
margin-top: var(--cp-dimensions-2_5);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
@media (min-width: 350px) {
|
|
@@ -188,7 +188,7 @@ watch(
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
&__datepicker:not(&__datepicker--isInline) {
|
|
191
|
-
margin-top:
|
|
191
|
+
margin-top: var(--cp-spacing-xl);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
// Opening transition layout adaptation
|
|
@@ -94,7 +94,7 @@ $dialog-breakpoint: 550px;
|
|
|
94
94
|
transition-duration: 300ms;
|
|
95
95
|
|
|
96
96
|
@media screen and (min-width: calc(#{$dialog-breakpoint} + 1px)) {
|
|
97
|
-
padding: 10vh
|
|
97
|
+
padding: 10vh var(--cp-dimensions-8);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&__dialog {
|
|
@@ -114,7 +114,7 @@ $dialog-breakpoint: 550px;
|
|
|
114
114
|
z-index: -1;
|
|
115
115
|
width: 100%;
|
|
116
116
|
height: 100%;
|
|
117
|
-
background:
|
|
117
|
+
background: var(--cp-background-overlay);
|
|
118
118
|
inset: 0;
|
|
119
119
|
pointer-events: none;
|
|
120
120
|
transition: opacity 250ms ease;
|
|
@@ -128,9 +128,9 @@ $dialog-breakpoint: 550px;
|
|
|
128
128
|
max-height: 100%;
|
|
129
129
|
flex-direction: column;
|
|
130
130
|
justify-content: space-between;
|
|
131
|
-
border-radius:
|
|
132
|
-
background-color:
|
|
133
|
-
box-shadow:
|
|
131
|
+
border-radius: var(--cp-radius-lg);
|
|
132
|
+
background-color: var(--cp-background-primary);
|
|
133
|
+
box-shadow: var(--cp-shadows-overlay);
|
|
134
134
|
-webkit-overflow-scrolling: touch;
|
|
135
135
|
transition:
|
|
136
136
|
transform 300ms ease,
|
|
@@ -158,29 +158,29 @@ $dialog-breakpoint: 550px;
|
|
|
158
158
|
|
|
159
159
|
&__header {
|
|
160
160
|
position: relative;
|
|
161
|
-
border-bottom: 1px solid
|
|
161
|
+
border-bottom: 1px solid var(--cp-border-soft);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
&__close {
|
|
165
165
|
position: absolute;
|
|
166
|
-
top:
|
|
167
|
-
right:
|
|
166
|
+
top: var(--cp-spacing-2xl);
|
|
167
|
+
right: var(--cp-spacing-2xl);
|
|
168
168
|
display: inline-flex;
|
|
169
169
|
align-items: center;
|
|
170
170
|
justify-content: center;
|
|
171
|
-
padding:
|
|
172
|
-
border-radius:
|
|
173
|
-
color:
|
|
171
|
+
padding: var(--cp-spacing-sm);
|
|
172
|
+
border-radius: var(--cp-radius-md);
|
|
173
|
+
color: var(--cp-foreground-secondary);
|
|
174
174
|
transition: 0.2s ease-in-out;
|
|
175
|
-
transform: translate(
|
|
175
|
+
transform: translate(var(--cp-dimensions-1), calc(var(--cp-dimensions-1) * -1));
|
|
176
176
|
transition-property: color, background-color;
|
|
177
177
|
|
|
178
178
|
&:hover {
|
|
179
|
-
color:
|
|
179
|
+
color: var(--cp-foreground-primary);
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
&:focus-visible {
|
|
183
|
-
outline:
|
|
183
|
+
outline: calc(var(--cp-dimensions-0_5) * 1.5) solid var(--cp-focus);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -192,8 +192,8 @@ $dialog-breakpoint: 550px;
|
|
|
192
192
|
|
|
193
193
|
&__footer {
|
|
194
194
|
&:not(:empty) {
|
|
195
|
-
border-top: 1px solid
|
|
196
|
-
padding:
|
|
195
|
+
border-top: 1px solid var(--cp-border-soft);
|
|
196
|
+
padding: var(--cp-spacing-xl) var(--cp-spacing-2xl);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
&--noBorder {
|
|
@@ -204,14 +204,14 @@ $dialog-breakpoint: 550px;
|
|
|
204
204
|
|
|
205
205
|
@media screen and (max-width: $dialog-breakpoint) {
|
|
206
206
|
.cpDialog__close {
|
|
207
|
-
top:
|
|
208
|
-
right:
|
|
207
|
+
top: var(--cp-spacing-xl);
|
|
208
|
+
right: var(--cp-spacing-xl);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
@media (max-width: 650px) {
|
|
213
213
|
.cpDialog__footer {
|
|
214
|
-
padding:
|
|
214
|
+
padding: var(--cp-spacing-xl);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
</style>
|
|
@@ -31,62 +31,62 @@ defineOptions({
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&--100 {
|
|
34
|
-
font-size:
|
|
34
|
+
font-size: var(--cp-text-size-xs);
|
|
35
35
|
font-weight: 400;
|
|
36
|
-
line-height:
|
|
37
|
-
letter-spacing:
|
|
36
|
+
line-height: var(--cp-line-height-xs);
|
|
37
|
+
letter-spacing: var(--cp-letter-spacing-sm);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&--200 {
|
|
41
|
-
font-size:
|
|
41
|
+
font-size: var(--cp-text-size-xs);
|
|
42
42
|
font-weight: 600;
|
|
43
|
-
line-height:
|
|
43
|
+
line-height: var(--cp-line-height-xs);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&--300 {
|
|
47
|
-
font-size:
|
|
47
|
+
font-size: var(--cp-text-size-xs);
|
|
48
48
|
font-weight: 600;
|
|
49
|
-
line-height:
|
|
49
|
+
line-height: var(--cp-line-height-xs);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
&--400 {
|
|
53
|
-
font-size:
|
|
53
|
+
font-size: var(--cp-text-size-sm);
|
|
54
54
|
font-weight: 500;
|
|
55
|
-
line-height:
|
|
55
|
+
line-height: var(--cp-line-height-sm);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&--500 {
|
|
59
|
-
font-size:
|
|
59
|
+
font-size: var(--cp-text-size-md);
|
|
60
60
|
font-weight: 500;
|
|
61
|
-
line-height:
|
|
61
|
+
line-height: var(--cp-line-height-sm);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&--600 {
|
|
65
|
-
font-size:
|
|
65
|
+
font-size: var(--cp-text-size-lg);
|
|
66
66
|
font-weight: 500;
|
|
67
|
-
line-height:
|
|
68
|
-
letter-spacing:
|
|
67
|
+
line-height: var(--cp-line-height-md);
|
|
68
|
+
letter-spacing: var(--cp-letter-spacing-md);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&--700 {
|
|
72
|
-
font-size:
|
|
72
|
+
font-size: var(--cp-text-size-xl);
|
|
73
73
|
font-weight: 500;
|
|
74
|
-
line-height:
|
|
75
|
-
letter-spacing:
|
|
74
|
+
line-height: var(--cp-line-height-md);
|
|
75
|
+
letter-spacing: var(--cp-letter-spacing-md);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&--800 {
|
|
79
|
-
font-size:
|
|
79
|
+
font-size: var(--cp-text-size-3xl);
|
|
80
80
|
font-weight: 500;
|
|
81
|
-
line-height:
|
|
82
|
-
letter-spacing:
|
|
81
|
+
line-height: var(--cp-line-height-2xl);
|
|
82
|
+
letter-spacing: var(--cp-letter-spacing-md);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
&--900 {
|
|
86
|
-
font-size:
|
|
86
|
+
font-size: var(--cp-text-size-4xl);
|
|
87
87
|
font-weight: 500;
|
|
88
|
-
line-height:
|
|
89
|
-
letter-spacing:
|
|
88
|
+
line-height: var(--cp-line-height-4xl);
|
|
89
|
+
letter-spacing: var(--cp-letter-spacing-md);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
</style>
|