Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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/orange-eels-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@primer/react': patch
---

1. Fix a spacing issue with the loading spinner in a `TextInputWithTokens`
2. Bolds form validation text to be visually balanced with the icon
6 changes: 4 additions & 2 deletions src/TextInputWithTokens.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// i dont understand what's wrong

import {FocusKeys} from '@primer/behaviors'
import {isFocusable} from '@primer/behaviors/utils'
import {omit} from '@styled-system/props'
Expand Down Expand Up @@ -254,8 +256,8 @@ function TextInputWithTokensInnerComponent<TokenComponentType extends AnyReactCo
className={className}
contrast={contrast}
disabled={disabled}
hasLeadingVisual={Boolean(LeadingVisual)}
hasTrailingVisual={Boolean(TrailingVisual)}
hasLeadingVisual={Boolean(LeadingVisual || showLeadingLoadingIndicator)}
hasTrailingVisual={Boolean(TrailingVisual || showTrailingLoadingIndicator)}
width={widthProp}
minWidth={minWidthProp}
maxWidth={maxWidthProp}
Expand Down
3 changes: 2 additions & 1 deletion src/_InputValidation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const InputValidation: React.FC<Props> = ({children, id, validationStatus, sx})

return (
<Text
fontSize={0}
sx={{
fontSize: 0,
fontWeight: 'bold',
alignItems: 'center',
color: fgColor,
display: 'flex',
Expand Down
20 changes: 10 additions & 10 deletions src/__tests__/__snapshots__/TextInputWithTokens.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6507,7 +6507,7 @@ Array [
background-repeat: no-repeat;
background-position: right 8px center;
padding-left: 0;
padding-right: 0;
padding-right: 12px;
padding-left: 12px;
padding-top: calc(12px / 2);
padding-bottom: calc(12px / 2);
Expand Down Expand Up @@ -6556,7 +6556,7 @@ Array [
.c0 > input,
.c0 > select {
padding-left: 12px;
padding-right: 12px;
padding-right: 0;
}

.c3 {
Expand Down Expand Up @@ -7230,7 +7230,7 @@ Array [
padding-bottom: calc(12px / 2);
background-repeat: no-repeat;
background-position: right 8px center;
padding-left: 0;
padding-left: 12px;
padding-right: 0;
padding-left: 12px;
padding-top: calc(12px / 2);
Expand Down Expand Up @@ -7279,7 +7279,7 @@ Array [

.c0 > input,
.c0 > select {
padding-left: 12px;
padding-left: 0;
padding-right: 12px;
}

Expand Down Expand Up @@ -7999,7 +7999,7 @@ Array [
background-repeat: no-repeat;
background-position: right 8px center;
padding-left: 0;
padding-right: 0;
padding-right: 12px;
padding-left: 12px;
padding-top: calc(12px / 2);
padding-bottom: calc(12px / 2);
Expand Down Expand Up @@ -8048,7 +8048,7 @@ Array [
.c0 > input,
.c0 > select {
padding-left: 12px;
padding-right: 12px;
padding-right: 0;
}

.c3 {
Expand Down Expand Up @@ -10343,7 +10343,7 @@ Array [
background-repeat: no-repeat;
background-position: right 8px center;
padding-left: 12px;
padding-right: 0;
padding-right: 12px;
padding-left: 12px;
padding-top: calc(12px / 2);
padding-bottom: calc(12px / 2);
Expand Down Expand Up @@ -10392,7 +10392,7 @@ Array [
.c0 > input,
.c0 > select {
padding-left: 0;
padding-right: 12px;
padding-right: 0;
}

.c6 {
Expand Down Expand Up @@ -11914,7 +11914,7 @@ Array [
padding-bottom: calc(12px / 2);
background-repeat: no-repeat;
background-position: right 8px center;
padding-left: 0;
padding-left: 12px;
padding-right: 12px;
padding-left: 12px;
padding-top: calc(12px / 2);
Expand Down Expand Up @@ -11963,7 +11963,7 @@ Array [

.c0 > input,
.c0 > select {
padding-left: 12px;
padding-left: 0;
padding-right: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ exports[`ChoiceFieldset renders with a success validation message 1`] = `

.c12 {
font-size: 12px;
font-weight: bold;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -1050,7 +1051,6 @@ exports[`ChoiceFieldset renders with a success validation message 1`] = `
>
<span
class="c12"
font-size="0"
>
<span
aria-hidden="true"
Expand Down Expand Up @@ -1163,6 +1163,7 @@ exports[`ChoiceFieldset renders with an error validation message 1`] = `

.c12 {
font-size: 12px;
font-weight: bold;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
Expand Down Expand Up @@ -1296,7 +1297,6 @@ exports[`ChoiceFieldset renders with an error validation message 1`] = `
>
<span
class="c12"
font-size="0"
>
<span
aria-hidden="true"
Expand Down