diff --git a/.changeset/spicy-items-watch.md b/.changeset/spicy-items-watch.md new file mode 100644 index 00000000000..bffcfa80181 --- /dev/null +++ b/.changeset/spicy-items-watch.md @@ -0,0 +1,6 @@ +--- +"@primer/react": patch +"@primer/styled-react": patch +--- + +chore(TextInput): remove sx diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-colorblind-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-colorblind-linux.png deleted file mode 100644 index df3df41d174..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-dimmed-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-dimmed-linux.png deleted file mode 100644 index 7c5497e2b96..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-high-contrast-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-high-contrast-linux.png deleted file mode 100644 index 36a573d7a12..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-linux.png deleted file mode 100644 index df3df41d174..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-tritanopia-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-tritanopia-linux.png deleted file mode 100644 index df3df41d174..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-colorblind-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-colorblind-linux.png deleted file mode 100644 index 785dcf53bb9..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-high-contrast-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-high-contrast-linux.png deleted file mode 100644 index adef3e640fb..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-linux.png deleted file mode 100644 index 785dcf53bb9..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-tritanopia-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-tritanopia-linux.png deleted file mode 100644 index 785dcf53bb9..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSx-light-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-colorblind-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-colorblind-linux.png deleted file mode 100644 index 081099aacdb..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-dimmed-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-dimmed-linux.png deleted file mode 100644 index 5c4c510e792..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-high-contrast-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-high-contrast-linux.png deleted file mode 100644 index 6f5df61ea46..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-linux.png deleted file mode 100644 index 081099aacdb..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-tritanopia-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-tritanopia-linux.png deleted file mode 100644 index 081099aacdb..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-colorblind-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-colorblind-linux.png deleted file mode 100644 index 14413c4b12e..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-high-contrast-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-high-contrast-linux.png deleted file mode 100644 index 2e8b221001e..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-linux.png deleted file mode 100644 index 14413c4b12e..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-tritanopia-linux.png b/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-tritanopia-linux.png deleted file mode 100644 index 14413c4b12e..00000000000 Binary files a/.playwright/snapshots/components/TextInput.test.ts-snapshots/TextInput-Dev-WithSxAndCSS-light-tritanopia-linux.png and /dev/null differ diff --git a/e2e/components/TextInput.test.ts b/e2e/components/TextInput.test.ts index fceb98ca879..114854866b2 100644 --- a/e2e/components/TextInput.test.ts +++ b/e2e/components/TextInput.test.ts @@ -219,24 +219,6 @@ test.describe('TextInput', () => { } }) - test.describe('Dev: With Sx', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'components-textinput-dev--with-sx', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect(await page.screenshot()).toMatchSnapshot(`TextInput.Dev.WithSx.${theme}.png`) - }) - }) - } - }) - test.describe('Dev: With CSS', () => { for (const theme of themes) { test.describe(theme, () => { @@ -254,22 +236,4 @@ test.describe('TextInput', () => { }) } }) - - test.describe('Dev: With Sx and CSS', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'components-textinput-dev--with-sx-and-css', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect(await page.screenshot()).toMatchSnapshot(`TextInput.Dev.WithSxAndCSS.${theme}.png`) - }) - }) - } - }) }) diff --git a/packages/react/src/TextInput/TextInput.dev.stories.tsx b/packages/react/src/TextInput/TextInput.dev.stories.tsx index 356f21970c3..ebcf5fc62cd 100644 --- a/packages/react/src/TextInput/TextInput.dev.stories.tsx +++ b/packages/react/src/TextInput/TextInput.dev.stories.tsx @@ -18,21 +18,3 @@ export const WithCSS = () => ( ) - -export const WithSx = () => ( -
- - Default label - - -
-) - -export const WithSxAndCSS = () => ( -
- - Default label - - -
-) diff --git a/packages/react/src/TextInput/TextInput.tsx b/packages/react/src/TextInput/TextInput.tsx index ff666c81c7f..5aa61e3040a 100644 --- a/packages/react/src/TextInput/TextInput.tsx +++ b/packages/react/src/TextInput/TextInput.tsx @@ -46,7 +46,6 @@ export type TextInputNonPassthroughProps = { | 'contrast' | 'disabled' | 'monospace' - | 'sx' | 'width' | 'maxWidth' | 'minWidth' @@ -75,7 +74,6 @@ const TextInput = React.forwardRef( loaderText = 'Loading', monospace, validationStatus, - sx: sxProp, size: sizeProp, onFocus, onBlur, @@ -137,7 +135,6 @@ const TextInput = React.forwardRef( contrast={contrast} disabled={disabled} monospace={monospace} - sx={sxProp} size={sizeProp} width={widthProp} minWidth={minWidthProp} diff --git a/packages/react/src/TextInput/__snapshots__/TextInput.test.tsx.snap b/packages/react/src/TextInput/__snapshots__/TextInput.test.tsx.snap index 04f3f456271..4d816592e47 100644 --- a/packages/react/src/TextInput/__snapshots__/TextInput.test.tsx.snap +++ b/packages/react/src/TextInput/__snapshots__/TextInput.test.tsx.snap @@ -294,7 +294,7 @@ exports[`TextInput > renders trailingAction icon button 1`] = `