Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: style and spacing for form elements #4238

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/stale-cows-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@ultraviolet/form": patch
"@ultraviolet/ui": patch
---

Form components: homogenize styling for all form components
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ exports[`CheckboxField > should render correctly 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -567,7 +567,7 @@ exports[`CheckboxField > should render correctly checked without value 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -906,7 +906,7 @@ exports[`CheckboxField > should render correctly disabled 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -1245,7 +1245,7 @@ exports[`CheckboxField > should render correctly not checked without value 1`] =
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -1583,7 +1583,7 @@ exports[`CheckboxField > should render correctly with errors 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -1634,7 +1634,19 @@ exports[`CheckboxField > should render correctly with errors 1`] = `
width: 100%;
}

.emotion-15 {
.emotion-14 {
color: #3f4250;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 400;
letter-spacing: 0;
line-height: 24px;
text-transform: none;
-webkit-text-decoration: none;
text-decoration: none;
}

.emotion-17 {
color: #b3144d;
font-size: 12px;
font-family: Inter,Asap,sans-serif;
Expand All @@ -1661,10 +1673,10 @@ exports[`CheckboxField > should render correctly with errors 1`] = `
>
<input
aria-checked="false"
aria-describedby=":ra:-hint"
aria-describedby=":rb:-hint"
aria-invalid="true"
class="emotion-2 emotion-3"
id=":ra:"
id=":rb:"
name="test"
type="checkbox"
value=""
Expand Down Expand Up @@ -1705,13 +1717,17 @@ exports[`CheckboxField > should render correctly with errors 1`] = `
>
<label
class="emotion-12 emotion-13"
for=":ra:"
for=":rb:"
>
Checkbox field error
<label
class="emotion-14 emotion-15"
>
Checkbox field error
</label>
</label>
</div>
<span
class="emotion-14 emotion-15 emotion-16"
class="emotion-16 emotion-17 emotion-15"
>
This field is required
</span>
Expand Down Expand Up @@ -1954,7 +1970,7 @@ exports[`CheckboxField > should trigger events correctly 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -2005,6 +2021,18 @@ exports[`CheckboxField > should trigger events correctly 1`] = `
width: 100%;
}

.emotion-14 {
color: #3f4250;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 400;
letter-spacing: 0;
line-height: 24px;
text-transform: none;
-webkit-text-decoration: none;
text-decoration: none;
}

<div
data-testid="testing"
>
Expand Down Expand Up @@ -2064,7 +2092,11 @@ exports[`CheckboxField > should trigger events correctly 1`] = `
class="emotion-12 emotion-13"
for=":r8:"
>
Checkbox field events
<label
class="emotion-14 emotion-15"
>
Checkbox field events
</label>
</label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ exports[`CheckboxField > should render correctly checked 1`] = `
}

.emotion-6 {
color: #222638;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 500;
Expand Down Expand Up @@ -298,7 +299,7 @@ exports[`CheckboxField > should render correctly checked 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -349,6 +350,18 @@ exports[`CheckboxField > should render correctly checked 1`] = `
width: 100%;
}

.emotion-25 {
color: #3f4250;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 400;
letter-spacing: 0;
line-height: 24px;
text-transform: none;
-webkit-text-decoration: none;
text-decoration: none;
}

<div
data-testid="testing"
>
Expand Down Expand Up @@ -425,7 +438,11 @@ exports[`CheckboxField > should render correctly checked 1`] = `
class="emotion-23 emotion-24"
for=":r1:"
>
Checkbox 1
<label
class="emotion-25 emotion-7"
>
Checkbox 1
</label>
</label>
</div>
</div>
Expand All @@ -440,7 +457,7 @@ exports[`CheckboxField > should render correctly checked 1`] = `
aria-checked="true"
aria-invalid="false"
class="emotion-13 emotion-14"
id=":r3:"
id=":r4:"
name="Checkbox.value-2"
type="checkbox"
value="value-2"
Expand Down Expand Up @@ -481,9 +498,13 @@ exports[`CheckboxField > should render correctly checked 1`] = `
>
<label
class="emotion-23 emotion-24"
for=":r3:"
for=":r4:"
>
Checkbox 2
<label
class="emotion-25 emotion-7"
>
Checkbox 2
</label>
</label>
</div>
</div>
Expand Down Expand Up @@ -552,6 +573,7 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
}

.emotion-6 {
color: #222638;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 500;
Expand Down Expand Up @@ -795,7 +817,7 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
gap: 2px;
gap: 4px;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
Expand Down Expand Up @@ -846,6 +868,18 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
width: 100%;
}

.emotion-25 {
color: #3f4250;
font-size: 16px;
font-family: Inter,Asap,sans-serif;
font-weight: 400;
letter-spacing: 0;
line-height: 24px;
text-transform: none;
-webkit-text-decoration: none;
text-decoration: none;
}

<div
data-testid="testing"
>
Expand Down Expand Up @@ -879,7 +913,7 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
aria-checked="false"
aria-invalid="false"
class="emotion-13 emotion-14"
id=":r6:"
id=":r8:"
name="test.value-1"
type="checkbox"
value="value-1"
Expand Down Expand Up @@ -920,9 +954,13 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
>
<label
class="emotion-23 emotion-24"
for=":r6:"
for=":r8:"
>
Checkbox 1
<label
class="emotion-25 emotion-7"
>
Checkbox 1
</label>
</label>
</div>
</div>
Expand All @@ -937,7 +975,7 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
aria-checked="false"
aria-invalid="false"
class="emotion-13 emotion-14"
id=":r8:"
id=":rb:"
name="test.value-2"
type="checkbox"
value="value-2"
Expand Down Expand Up @@ -978,9 +1016,13 @@ exports[`CheckboxField > should trigger events correctly with required prop 1`]
>
<label
class="emotion-23 emotion-24"
for=":r8:"
for=":rb:"
>
Checkbox 2
<label
class="emotion-25 emotion-7"
>
Checkbox 2
</label>
</label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports[`DateField > should render correctly 1`] = `
font-family: Inter,Asap,sans-serif;
border-color: #e9eaeb;
background-color: #ffffff;
box-shadows:0: 0px 4px 8px 0px #22263829;
box-shadow:0: 0px 4px 8px 0px #22263829;
1: 0px 8px 24px 0px #2226383d;
}

Expand Down Expand Up @@ -398,7 +398,6 @@ exports[`DateField > should render correctly 1`] = `
<svg
class="emotion-10 emotion-11"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75zM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75zM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75zM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75zM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75z"
Expand Down Expand Up @@ -452,7 +451,7 @@ exports[`DateField > should render correctly disabled 1`] = `
font-family: Inter,Asap,sans-serif;
border-color: #e9eaeb;
background-color: #ffffff;
box-shadows:0: 0px 4px 8px 0px #22263829;
box-shadow:0: 0px 4px 8px 0px #22263829;
1: 0px 8px 24px 0px #2226383d;
}

Expand Down Expand Up @@ -820,7 +819,6 @@ exports[`DateField > should render correctly disabled 1`] = `
<svg
class="emotion-10 emotion-11"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75zM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75zM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75zM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75zM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75z"
Expand Down Expand Up @@ -874,7 +872,7 @@ exports[`DateField > should trigger events 1`] = `
font-family: Inter,Asap,sans-serif;
border-color: #e9eaeb;
background-color: #ffffff;
box-shadows:0: 0px 4px 8px 0px #22263829;
box-shadow:0: 0px 4px 8px 0px #22263829;
1: 0px 8px 24px 0px #2226383d;
}

Expand Down Expand Up @@ -1243,7 +1241,6 @@ exports[`DateField > should trigger events 1`] = `
<svg
class="emotion-10 emotion-11"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H6a.75.75 0 0 1-.75-.75zM6 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM7.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H8a.75.75 0 0 1-.75-.75zM8 13.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM9.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75zM9.25 14a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H10a.75.75 0 0 1-.75-.75zM12 9.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.75-.75zM11.25 12a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H12a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V14a.75.75 0 0 0-.75-.75zM13.25 10a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 .75.75v.01a.75.75 0 0 1-.75.75H14a.75.75 0 0 1-.75-.75zm.75 1.25a.75.75 0 0 0-.75.75v.01c0 .414.336.75.75.75h.01a.75.75 0 0 0 .75-.75V12a.75.75 0 0 0-.75-.75z"
Expand Down
Loading
Loading