From 069ce2ce8d74620f48977b10d26ab342558e48f7 Mon Sep 17 00:00:00 2001 From: llastflowers Date: Fri, 22 Aug 2025 15:11:18 -0700 Subject: [PATCH 1/5] remove sx prop from CheckboxGroup.tsx --- packages/react/src/CheckboxGroup/CheckboxGroup.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react/src/CheckboxGroup/CheckboxGroup.tsx b/packages/react/src/CheckboxGroup/CheckboxGroup.tsx index b519bd85b27..c75c27ca61e 100644 --- a/packages/react/src/CheckboxGroup/CheckboxGroup.tsx +++ b/packages/react/src/CheckboxGroup/CheckboxGroup.tsx @@ -6,7 +6,6 @@ import CheckboxOrRadioGroupCaption from '../internal/components/CheckboxOrRadioG import CheckboxOrRadioGroupLabel from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel' import CheckboxOrRadioGroupValidation from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation' import {useRenderForcingRef} from '../hooks' -import type {SxProp} from '../sx' import FormControl from '../FormControl' import Checkbox from '../Checkbox/Checkbox' import {CheckboxGroupContext} from './CheckboxGroupContext' @@ -16,8 +15,7 @@ type CheckboxGroupProps = { * An onChange handler that gets called when any of the checkboxes change */ onChange?: (selected: string[], e?: ChangeEvent) => void -} & CheckboxOrRadioGroupProps & - SxProp +} & CheckboxOrRadioGroupProps const CheckboxGroup: FC> = ({children, disabled, onChange, ...rest}) => { const formControlComponentChildren = React.Children.toArray(children) From c00446e5d2b4ccb90e45f48cae86158d6a6c5b5f Mon Sep 17 00:00:00 2001 From: llastflowers Date: Fri, 22 Aug 2025 15:12:12 -0700 Subject: [PATCH 2/5] remove CheckboxGroup dev stories file because there was only one sx story in it --- .../CheckboxGroup.dev.stories.tsx | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx diff --git a/packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx b/packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx deleted file mode 100644 index 2a7130df9e4..00000000000 --- a/packages/react/src/CheckboxGroup/CheckboxGroup.dev.stories.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import type {Meta} from '@storybook/react-vite' -import {Checkbox, CheckboxGroup, FormControl} from '..' - -export default { - title: 'Components/CheckboxGroup/Dev', - component: CheckboxGroup, - parameters: {controls: {exclude: ['aria-labelledby', 'id', 'onChange', 'sx']}}, -} as Meta - -export const SxProps = () => ( - - - Caption - - - Choices - - - - Choice one - - - - Choice two - - - - Choice three - - -) From 36a53973d1141d7a8e9c98e8991ef9c0fd22927a Mon Sep 17 00:00:00 2001 From: llastflowers Date: Fri, 22 Aug 2025 15:12:45 -0700 Subject: [PATCH 3/5] remove sx from docs.json --- .../src/CheckboxGroup/CheckboxGroup.docs.json | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/packages/react/src/CheckboxGroup/CheckboxGroup.docs.json b/packages/react/src/CheckboxGroup/CheckboxGroup.docs.json index 6db6a947822..171bf3987de 100644 --- a/packages/react/src/CheckboxGroup/CheckboxGroup.docs.json +++ b/packages/react/src/CheckboxGroup/CheckboxGroup.docs.json @@ -61,11 +61,6 @@ "type": "boolean", "defaultValue": "false", "description": "If true, the user must make a selection before the owning form can be submitted" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ], "subcomponents": [ @@ -77,11 +72,6 @@ "type": "boolean", "defaultValue": "false", "description": "If true, the fieldset legend will be visually hidden" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -93,11 +83,6 @@ "type": "React.ReactNode", "defaultValue": "", "description": "The caption content" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -116,13 +101,8 @@ "defaultValue": "", "required": true, "description": "Changes the visual style to match the validation status" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] } ] -} \ No newline at end of file +} From 6789057312d3046ca491f695e48eed9e139e44a9 Mon Sep 17 00:00:00 2001 From: llastflowers Date: Fri, 22 Aug 2025 15:13:49 -0700 Subject: [PATCH 4/5] remove sx from e2e --- e2e/components/CheckboxGroup.test.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/e2e/components/CheckboxGroup.test.ts b/e2e/components/CheckboxGroup.test.ts index d8f0ca44264..adb846d93f8 100644 --- a/e2e/components/CheckboxGroup.test.ts +++ b/e2e/components/CheckboxGroup.test.ts @@ -23,10 +23,6 @@ const stories = [ title: 'Visually Hidden Label', id: 'components-checkboxgroup-features--visually-hidden-label', }, - { - title: 'SX Props', - id: 'components-checkboxgroup-dev--sx-props', - }, ] as const test.describe('CheckboxGroup', () => { From 8fdba337b56925ce827ea0b4b08e400cb0773e0a Mon Sep 17 00:00:00 2001 From: "Brittany L. Houtz" <55068883+llastflowers@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:17:52 -0700 Subject: [PATCH 5/5] Update CheckboxGroup to remove sx support --- .changeset/tame-ducks-ring.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tame-ducks-ring.md diff --git a/.changeset/tame-ducks-ring.md b/.changeset/tame-ducks-ring.md new file mode 100644 index 00000000000..2fde4d6b218 --- /dev/null +++ b/.changeset/tame-ducks-ring.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +Update CheckboxGroup component to no longer support sx