Skip to content

Commit 8126aff

Browse files
author
Matthias
committed
refactor(VerificationCode): migrate to use vanilla extract
1 parent da751ca commit 8126aff

File tree

7 files changed

+230
-1862
lines changed

7 files changed

+230
-1862
lines changed

.changeset/tender-flowers-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": minor
3+
---
4+
5+
Refactor `<VerificationCode /> to use vanilla extract`

packages/form/src/components/VerificationCodeField/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 6 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -2,99 +2,15 @@
22

33
exports[`verificationCodeField > should render correctly 1`] = `
44
<DocumentFragment>
5-
.emotion-0 {
6-
border: none;
7-
padding: 0;
8-
margin: 0;
9-
display: -webkit-box;
10-
display: -webkit-flex;
11-
display: -ms-flexbox;
12-
display: flex;
13-
-webkit-flex-direction: column;
14-
-ms-flex-direction: column;
15-
flex-direction: column;
16-
gap: 0.25rem;
17-
}
18-
19-
.emotion-2 {
20-
background: #ffffff;
21-
color: #3f4250;
22-
font-size: 1rem;
23-
font-weight: 400;
24-
text-align: center;
25-
border-radius: 0.25rem;
26-
margin-right: 0.5rem;
27-
width: 2.5rem;
28-
height: 3rem;
29-
outline-style: none;
30-
-webkit-transition: border-color 0.2s ease,box-shadow 0.2s ease;
31-
transition: border-color 0.2s ease,box-shadow 0.2s ease;
32-
border: solid 1px #d9dadd;
33-
}
34-
35-
.emotion-2[aria-invalid='true'] {
36-
border-color: #b3144d;
37-
}
38-
39-
.emotion-2[data-success='true'] {
40-
border-color: #22674e;
41-
}
42-
43-
.emotion-2:hover,
44-
.emotion-2:focus {
45-
border-color: #792dd4;
46-
}
47-
48-
.emotion-2:hover[aria-invalid='true'],
49-
.emotion-2:focus[aria-invalid='true'] {
50-
border-color: #92103f;
51-
}
52-
53-
.emotion-2:hover[data-success='true'],
54-
.emotion-2:focus[data-success='true'] {
55-
border-color: #1b533f;
56-
}
57-
58-
.emotion-2:focus {
59-
box-shadow: 0px 0px 0px 3px #8c40ef40;
60-
}
61-
62-
.emotion-2:last-child {
63-
margin-right: 0;
64-
}
65-
66-
.emotion-2::-webkit-input-placeholder {
67-
color: #727683;
68-
}
69-
70-
.emotion-2::-moz-placeholder {
71-
color: #727683;
72-
}
73-
74-
.emotion-2:-ms-input-placeholder {
75-
color: #727683;
76-
}
77-
78-
.emotion-2::placeholder {
79-
color: #727683;
80-
}
81-
82-
.emotion-2:disabled {
83-
cursor: not-allowed;
84-
background: #f3f3f4;
85-
color: #b5b7bd;
86-
border: solid 1px #e9eaeb;
87-
}
88-
89-
<div
5+
<div
906
data-testid="testing"
917
>
928
<form
939
novalidate=""
9410
style="display: contents;"
9511
>
9612
<fieldset
97-
class="emotion-0 emotion-1"
13+
class="uv_1k9synd5"
9814
>
9915
<div
10016
class="uv_toi52u0 uv_toi52u3j uv_toi52u2j uv_toi52u7d uv_toi52u1v uv_toi52u5d"
@@ -115,7 +31,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
11531
aria-invalid="false"
11632
aria-label="Verification code 0"
11733
autocomplete="off"
118-
class="emotion-2 emotion-3"
34+
class="uv_1k9synd2 uv_1k9synd4"
11935
data-success="false"
12036
data-testid="0"
12137
id="verification-code-input-0"
@@ -129,7 +45,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
12945
aria-invalid="false"
13046
aria-label="Verification code 1"
13147
autocomplete="off"
132-
class="emotion-2 emotion-3"
48+
class="uv_1k9synd2 uv_1k9synd4"
13349
data-success="false"
13450
data-testid="1"
13551
id="verification-code-input-1"
@@ -143,7 +59,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
14359
aria-invalid="false"
14460
aria-label="Verification code 2"
14561
autocomplete="off"
146-
class="emotion-2 emotion-3"
62+
class="uv_1k9synd2 uv_1k9synd4"
14763
data-success="false"
14864
data-testid="2"
14965
id="verification-code-input-2"
@@ -157,7 +73,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
15773
aria-invalid="false"
15874
aria-label="Verification code 3"
15975
autocomplete="off"
160-
class="emotion-2 emotion-3"
76+
class="uv_1k9synd2 uv_1k9synd4"
16177
data-success="false"
16278
data-testid="3"
16379
id="verification-code-input-3"

0 commit comments

Comments
 (0)