Skip to content

Commit a038fb1

Browse files
authored
Merge pull request #220 from Scille/ms-responsive-summary-card
[MS] Responsive summary card
2 parents 8fba35e + d2aa16a commit a038fb1

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

lib/components/ms-card/MsSummaryCard.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="ms-summary-card">
3-
<h2 class="ms-summary-card-title title-h3">{{ $msTranslate(title) }}</h2>
3+
<ion-title class="ms-summary-card-title title-h3">{{ $msTranslate(title) }}</ion-title>
44
<template
55
v-for="(row, index) in rows"
66
:key="`ms-summary-card-row${index}`"
@@ -49,7 +49,7 @@
4949
</template>
5050

5151
<script setup lang="ts">
52-
import { IonButton, IonIcon } from '@ionic/vue';
52+
import { IonButton, IonIcon, IonTitle } from '@ionic/vue';
5353
import { MsSummaryCardRowData } from '@lib/components/ms-card/types';
5454
import MsSummaryCardItem from '@lib/components/ms-card/MsSummaryCardItem.vue';
5555
import { pencil } from 'ionicons/icons';
@@ -73,16 +73,13 @@ defineEmits<{
7373
</script>
7474

7575
<style scoped lang="scss">
76-
.ms-summary-card {
77-
h2 {
78-
margin: 0;
79-
padding: 0;
80-
}
76+
@use '@lib/theme' as ms;
8177
78+
.ms-summary-card {
8279
display: flex;
8380
flex-direction: column;
8481
background: var(--parsec-color-light-secondary-background);
85-
border: 1px solid var(--parsec-color-light-secondary-disabled);
82+
border: 1px solid var(--parsec-color-light-secondary-medium);
8683
border-radius: var(--parsec-radius-8);
8784
gap: 1rem;
8885
width: 100%;
@@ -91,6 +88,8 @@ defineEmits<{
9188
9289
&-title {
9390
color: var(--parsec-color-light-secondary-text);
91+
margin: 0;
92+
padding: 0;
9493
}
9594
9695
&-row {
@@ -106,7 +105,12 @@ defineEmits<{
106105
right: 1rem;
107106
top: 1rem;
108107
108+
@include ms.responsive-breakpoint('xs') {
109+
position: initial;
110+
}
111+
109112
&__icon {
113+
font-size: 1rem;
110114
margin-right: 0.5rem;
111115
}
112116
}

lib/components/ms-input/MsCodeValidationInput.vue

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ async function focusInputElement(input: HTMLIonInputElement | undefined): Promis
206206
</script>
207207

208208
<style scoped lang="scss">
209+
@use '@lib/theme' as ms;
210+
209211
@keyframes blinking {
210212
0% {
211213
opacity: 1;
@@ -224,18 +226,33 @@ async function focusInputElement(input: HTMLIonInputElement | undefined): Promis
224226
gap: 1rem;
225227
margin: 0.25rem;
226228
229+
@include ms.responsive-breakpoint('sm') {
230+
gap: 0.5rem;
231+
}
227232
&__item {
228233
--highlight-color-focused: none;
229234
color: var(--parsec-color-light-primary-700);
230-
background-color: var(--parsec-color-light-secondary-premiere);
235+
border: 1px solid var(--parsec-color-light-secondary-disabled);
231236
caret-color: transparent;
232237
border-radius: var(--parsec-radius-8);
233-
width: 4.5rem;
234-
height: 6rem;
238+
width: 3.5rem;
239+
height: 5rem;
235240
display: flex;
236241
text-align: center;
237242
position: relative;
238243
244+
@include ms.responsive-breakpoint('sm') {
245+
width: 3rem;
246+
height: 4rem;
247+
font-size: 1.75rem !important;
248+
}
249+
250+
@include ms.responsive-breakpoint('xs') {
251+
width: 2.5rem;
252+
height: 3.25rem;
253+
font-size: 1.25rem !important;
254+
}
255+
239256
&:is(.has-focus) {
240257
&::after {
241258
content: '';
@@ -262,13 +279,21 @@ async function focusInputElement(input: HTMLIonInputElement | undefined): Promis
262279
gap: 0.5rem;
263280
264281
&__invalid {
265-
color: var(--parsec-color-light-danger-700);
266-
margin-top: 1rem;
282+
color: var(--parsec-color-light-danger-500);
283+
margin-top: 0.75rem;
284+
285+
@include ms.responsive-breakpoint('sm') {
286+
font-size: 0.875rem;
287+
}
267288
}
268289
269290
&__valid {
270-
color: var(--parsec-color-light-success-700);
271-
margin-top: 1rem;
291+
color: var(--parsec-color-light-success-500);
292+
margin-top: 0.75rem;
293+
294+
@include ms.responsive-breakpoint('sm') {
295+
font-size: 0.875rem;
296+
}
272297
}
273298
}
274299
</style>

0 commit comments

Comments
 (0)