@zap-wunschlachen/wl-shared-components 1.0.28 → 1.0.30
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/App.vue +2 -4
- package/package.json +1 -1
- package/src/components/Background/Background.css +15 -0
- package/src/components/Button/Button.vue +8 -4
- package/src/components/ErrorPage/ErrorPage.css +49 -1
- package/src/components/MaintenanceBanner/MaintenanceBanner.css +64 -0
- package/src/components/OtpInput/OtpInput.vue +10 -7
- package/src/utils/index.ts +7 -6
package/App.vue
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="app">
|
|
3
3
|
<div class="element-container">
|
|
4
|
-
<
|
|
5
|
-
<!--<ErrorPage :statusCode="404" />-->
|
|
4
|
+
<OtpInput phoneNumber="+49 123 4567890" :submitFn="() => alert('Submitted!')" :resendFn="() => alert('Resent!')" />
|
|
6
5
|
</div>
|
|
7
6
|
</div>
|
|
8
7
|
</template>
|
|
9
8
|
|
|
10
9
|
<script setup lang="ts">
|
|
11
|
-
|
|
12
|
-
import MaintenanceBanner from '@/components/MaintenanceBanner/MaintenanceBanner.vue';
|
|
10
|
+
import OtpInput from '@/components/OtpInput/OtpInput.vue';
|
|
13
11
|
</script>
|
|
14
12
|
|
|
15
13
|
<style scoped>
|
package/package.json
CHANGED
|
@@ -36,4 +36,19 @@
|
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Mobile landscape mode - enable scrolling */
|
|
42
|
+
@media (max-height: 500px) and (orientation: landscape) {
|
|
43
|
+
.background {
|
|
44
|
+
overflow: auto;
|
|
45
|
+
align-items: flex-start;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.background__content {
|
|
49
|
+
height: auto;
|
|
50
|
+
min-height: 100%;
|
|
51
|
+
padding: 1rem;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
}
|
|
39
54
|
}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
</v-btn>
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
|
-
<script setup>
|
|
21
|
-
import {
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { siteColors } from "../../utils/index";
|
|
22
22
|
|
|
23
23
|
const props = defineProps({
|
|
24
24
|
/**
|
|
@@ -27,7 +27,7 @@ const props = defineProps({
|
|
|
27
27
|
*/
|
|
28
28
|
color: {
|
|
29
29
|
type: String,
|
|
30
|
-
default: '
|
|
30
|
+
default: siteColors['btn_bg'],
|
|
31
31
|
},
|
|
32
32
|
/**
|
|
33
33
|
* Icon to display before the button label.
|
|
@@ -113,7 +113,11 @@ const props = defineProps({
|
|
|
113
113
|
</script>
|
|
114
114
|
|
|
115
115
|
<style>
|
|
116
|
-
.wl-button
|
|
116
|
+
.wl-button.v-btn--variant-flat {
|
|
117
|
+
color: white !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.wl-button.v-btn--variant-outlined {
|
|
117
121
|
border-width: 1.5px;
|
|
118
122
|
}
|
|
119
123
|
</style>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
min-height: 100vh;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
|
-
background-image: url('../Background/wunschlachen-background.svg');
|
|
6
5
|
background-repeat: no-repeat;
|
|
7
6
|
background-position: center;
|
|
8
7
|
background-size: auto;
|
|
@@ -122,3 +121,52 @@
|
|
|
122
121
|
height: 340px;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
124
|
+
|
|
125
|
+
/* Small mobile screens with limited height (e.g. iPhone SE) */
|
|
126
|
+
@media (max-width: 480px) and (max-height: 700px) {
|
|
127
|
+
.error-page__grid {
|
|
128
|
+
gap: 1rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.error-page__content {
|
|
132
|
+
padding: 1rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.error-page__header {
|
|
136
|
+
gap: 0.5rem;
|
|
137
|
+
margin-bottom: 0.75rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.error-page__icon {
|
|
141
|
+
width: 80px;
|
|
142
|
+
height: 109px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.error-page__description {
|
|
146
|
+
margin-top: 0.75rem;
|
|
147
|
+
margin-bottom: 0.75rem;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (max-width: 480px) and (max-height: 600px) {
|
|
152
|
+
.error-page__icon {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.error-page__grid {
|
|
157
|
+
gap: 0.5rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.error-page__content {
|
|
161
|
+
padding: 0.5rem;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.error-page__header {
|
|
165
|
+
margin-bottom: 0.5rem;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.error-page__description {
|
|
169
|
+
margin-top: 0.5rem;
|
|
170
|
+
margin-bottom: 0.5rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -274,6 +274,70 @@
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
/* Small mobile screens with limited height (e.g. iPhone SE) */
|
|
278
|
+
@media (max-width: 480px) and (max-height: 700px) {
|
|
279
|
+
.maintenance-banner__content {
|
|
280
|
+
gap: 24px;
|
|
281
|
+
padding: 1rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.maintenance-banner__text-content {
|
|
285
|
+
gap: 24px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.maintenance-banner__logo-section {
|
|
289
|
+
gap: 16px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.maintenance-banner__logo-headline {
|
|
293
|
+
gap: 16px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.maintenance-banner__body-section {
|
|
297
|
+
gap: 12px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.maintenance-banner__illustration {
|
|
301
|
+
width: 100px;
|
|
302
|
+
height: 100px;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.maintenance-banner__title {
|
|
306
|
+
font-size: 24px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.maintenance-banner__description,
|
|
310
|
+
.maintenance-banner__contact-text {
|
|
311
|
+
font-size: 14px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.maintenance-banner__button {
|
|
315
|
+
font-size: 14px;
|
|
316
|
+
padding: 10px 20px;
|
|
317
|
+
height: auto;
|
|
318
|
+
width: auto;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@media (max-width: 480px) and (max-height: 600px) {
|
|
323
|
+
.maintenance-banner__illustration {
|
|
324
|
+
display: none;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.maintenance-banner__title {
|
|
328
|
+
font-size: 22px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.maintenance-banner__content {
|
|
332
|
+
gap: 16px;
|
|
333
|
+
padding: 0.5rem;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.maintenance-banner__text-content {
|
|
337
|
+
gap: 16px;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
277
341
|
/* Respect users who prefer reduced motion: disable transitions/animations */
|
|
278
342
|
@media (prefers-reduced-motion: reduce) {
|
|
279
343
|
.maintenance-banner__button,
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
<form class="wl-otp-input" @submit.prevent="props.submitFn" aria-labelledby="page-heading"
|
|
3
3
|
:aria-describedby="error ? 'form-error' : undefined" data-testid="root">
|
|
4
4
|
<div class="title-container">
|
|
5
|
-
<h2 id="page-heading" ref="heading">{{ t('wl.otp_input.enter_sms_code') }}</h2>
|
|
6
|
-
<p>{{ t('wl.otp_input.code_was_sent', { phoneNumber }) }}</p>
|
|
5
|
+
<h2 id="page-heading" ref="heading" :style="{ color: siteColors['font_color_title_code'] }">{{ t('wl.otp_input.enter_sms_code') }}</h2>
|
|
6
|
+
<p :style="{ color: siteColors['font_color_code'] }">{{ t('wl.otp_input.code_was_sent', { phoneNumber }) }}</p>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="input-container">
|
|
10
|
-
<v-otp-input
|
|
11
|
-
v-model="internalValue"
|
|
10
|
+
<v-otp-input
|
|
11
|
+
v-model="internalValue"
|
|
12
12
|
autofocus
|
|
13
13
|
rounded="lg"
|
|
14
|
-
:loading="loading"
|
|
15
|
-
:error="error"
|
|
14
|
+
:loading="loading"
|
|
15
|
+
:error="error"
|
|
16
16
|
:focus-all="error"
|
|
17
|
-
:focused="error"
|
|
17
|
+
:focused="error"
|
|
18
|
+
color="white"
|
|
19
|
+
:base-color="siteColors['font_color_title_code']"
|
|
18
20
|
@update:model-value="onResetError"
|
|
19
21
|
type="number"
|
|
20
22
|
/>
|
|
@@ -42,6 +44,7 @@ import { ref, computed, watch, type CSSProperties, PropType } from 'vue';
|
|
|
42
44
|
import './OtpInput.css';
|
|
43
45
|
import Button from '../Button/Button.vue';
|
|
44
46
|
import { useI18n } from 'vue-i18n';
|
|
47
|
+
import { siteColors } from "../../utils/index";
|
|
45
48
|
|
|
46
49
|
const { t } = useI18n();
|
|
47
50
|
|
package/src/utils/index.ts
CHANGED
|
@@ -65,14 +65,15 @@ if (currentDomain.includes("white-cocoon")) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
let siteColors: any = {
|
|
68
|
-
"border-color": "
|
|
68
|
+
"border-color": "var(--Dental-Blue-0)",
|
|
69
69
|
font_color: "!text-[var(--Dental-Blue-1)]",
|
|
70
70
|
font_color_title: "!text-[var(--Dental-Blue-0)]",
|
|
71
|
-
btn_bg: "
|
|
71
|
+
btn_bg: "var(--Dental-Blue-0)",
|
|
72
72
|
"border-b": "border-b-[var(--Dental-Blue-0)]",
|
|
73
73
|
font_color_code: "var(--Dental-Blue-1)",
|
|
74
74
|
font_color_title_code: "var(--Dental-Blue-0)",
|
|
75
|
-
"slot-bg": "
|
|
75
|
+
"slot-bg": "var(--Dental-Light-Blue-0)",
|
|
76
|
+
"slot-text": "text-[#4E5257]",
|
|
76
77
|
bg_0: "bg-[var(--Dental-Light-Blue--3)]",
|
|
77
78
|
bg_logo_fill_color: "white",
|
|
78
79
|
button_rounded: "lg",
|
|
@@ -89,9 +90,9 @@ if (domain.value === "domain-cocoon") {
|
|
|
89
90
|
"border-b": "border-b-[var(--Night-Nude-0)]",
|
|
90
91
|
bg_0: "bg-[var(--Warm-Air--4)]",
|
|
91
92
|
font_family: "font-['arial']",
|
|
92
|
-
btn_bg: "
|
|
93
|
-
"border-color": "
|
|
94
|
-
"slot-bg": "
|
|
93
|
+
btn_bg: "var(--Dark-Nude-2)",
|
|
94
|
+
"border-color": "[var(--Dark-Nude-0)",
|
|
95
|
+
"slot-bg": "var(--Warm-Air--4)",
|
|
95
96
|
"slot-text": "text-[#4E5257]",
|
|
96
97
|
"divider-color": "divide-[var(--Dark-Nude-0)]",
|
|
97
98
|
bg_logo_fill_color: "var(--Warm-Air--3)",
|