Skip to content

Commit 0330168

Browse files
matthprostlisalupi
authored andcommitted
refactor(VerificationCode): migrate to use vanilla extract (#5520)
* refactor(VerificationCode): migrate to use vanilla extract * fix: unit tests
1 parent 7859e63 commit 0330168

File tree

2 files changed

+21
-693
lines changed

2 files changed

+21
-693
lines changed

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"
@@ -116,7 +32,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
11632
aria-invalid="false"
11733
aria-label="Verification code 0"
11834
autocomplete="off"
119-
class="emotion-2 emotion-3"
35+
class="uv_1k9synd2 uv_1k9synd4"
12036
data-success="false"
12137
data-testid="0"
12238
id="verification-code-input-0"
@@ -130,7 +46,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
13046
aria-invalid="false"
13147
aria-label="Verification code 1"
13248
autocomplete="off"
133-
class="emotion-2 emotion-3"
49+
class="uv_1k9synd2 uv_1k9synd4"
13450
data-success="false"
13551
data-testid="1"
13652
id="verification-code-input-1"
@@ -144,7 +60,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
14460
aria-invalid="false"
14561
aria-label="Verification code 2"
14662
autocomplete="off"
147-
class="emotion-2 emotion-3"
63+
class="uv_1k9synd2 uv_1k9synd4"
14864
data-success="false"
14965
data-testid="2"
15066
id="verification-code-input-2"
@@ -158,7 +74,7 @@ exports[`verificationCodeField > should render correctly 1`] = `
15874
aria-invalid="false"
15975
aria-label="Verification code 3"
16076
autocomplete="off"
161-
class="emotion-2 emotion-3"
77+
class="uv_1k9synd2 uv_1k9synd4"
16278
data-success="false"
16379
data-testid="3"
16480
id="verification-code-input-3"

0 commit comments

Comments
 (0)