The Open Standard for Generative UI
[TH-1037]:Bug Fix (#190)
Ankit Das3f2439457d55
diff --git a/js/packages/react-ui/src/components/CheckBoxGroup/stories/CheckBoxGroup.stories.tsx b/js/packages/react-ui/src/components/CheckBoxGroup/stories/CheckBoxGroup.stories.tsxindex 16b298be9..49df8a5b5 100644--- a/js/packages/react-ui/src/components/CheckBoxGroup/stories/CheckBoxGroup.stories.tsx+++ b/js/packages/react-ui/src/components/CheckBoxGroup/stories/CheckBoxGroup.stories.tsx@@ -10,8 +10,7 @@ const meta = {layout: "centered",docs: {description: {- component:- "```tsx\nimport { CheckBoxGroup, CheckBoxItem } from '@crayon-ui/react-ui';\n```",+ component: "```tsx\nimport { CheckBoxGroup, CheckBoxItem } from '@crayonai/react-ui';\n```",},},},@@ -78,3 +77,26 @@ export const ClearVariant: Story = {],},};++export const WithLongDescription: Story = {+ args: {+ variant: "card",+ children: [+ <CheckBoxItem+ key="long1"+ label="First option with a long description"+ description="This is a long description that elaborates on the choice in great detail so that readers can fully understand the implications of selecting this option. It provides context, examples, and any caveats that might be relevant when making a selection."+ />,+ <CheckBoxItem+ key="long2"+ label="Second option with a long description"+ description="Another extended description that spans multiple sentences to showcase how the component behaves with verbose content. It should wrap correctly and remain readable without breaking the layout of the checkbox group."+ />,+ <CheckBoxItem+ key="long3"+ label="Third option with a long description"+ description="A very long explanation that includes more nuance about the option, possible trade-offs, and guidance for when this might be preferred. This helps validate the design for accessibility and usability with real-world copy lengths."+ />,+ ],+ },+};diff --git a/js/packages/react-ui/src/components/CheckBoxItem/checkBoxItem.scss b/js/packages/react-ui/src/components/CheckBoxItem/checkBoxItem.scssindex ff8767eed..7aa97ad60 100644--- a/js/packages/react-ui/src/components/CheckBoxItem/checkBoxItem.scss+++ b/js/packages/react-ui/src/components/CheckBoxItem/checkBoxItem.scss@@ -12,6 +12,7 @@.crayon-checkbox-item-root {display: inline-flex;+ flex-shrink: 0;align-items: center;justify-content: center;width: 16px;diff --git a/js/packages/react-ui/src/components/RadioGroup/stories/RadioGroup.stories.tsx b/js/packages/react-ui/src/components/RadioGroup/stories/RadioGroup.stories.tsxindex c899bd510..1dc0fcbc5 100644--- a/js/packages/react-ui/src/components/RadioGroup/stories/RadioGroup.stories.tsx+++ b/js/packages/react-ui/src/components/RadioGroup/stories/RadioGroup.stories.tsx@@ -68,3 +68,28 @@ export const Default: Story = {</RadioGroup>),};++export const WithLongDescription: Story = {+ args: {+ variant: "card",+ },+ render: (args) => (+ <RadioGroup {...args}>+ <RadioItem+ value="long1"+ label="First option with a long description"+ description="This is a long description that elaborates on the choice in great detail so that readers can fully understand the implications of selecting this option. It provides context, examples, and any caveats that might be relevant when making a selection."+ />+ <RadioItem+ value="long2"+ label="Second option with a long description"+ description="Another extended description that spans multiple sentences to showcase how the component behaves with verbose content. It should wrap correctly and remain readable without breaking the layout of the radio group."+ />+ <RadioItem+ value="long3"+ label="Third option with a long description"+ description="A very long explanation that includes more nuance about the option, possible trade-offs, and guidance for when this might be preferred. This helps validate the design for accessibility and usability with real-world copy lengths."+ />+ </RadioGroup>+ ),+};diff --git a/js/packages/react-ui/src/components/RadioItem/radioItem.scss b/js/packages/react-ui/src/components/RadioItem/radioItem.scssindex 107459387..77b80848b 100644--- a/js/packages/react-ui/src/components/RadioItem/radioItem.scss+++ b/js/packages/react-ui/src/components/RadioItem/radioItem.scss@@ -12,6 +12,7 @@.crayon-radio-item-root {box-sizing: border-box;+ flex-shrink: 0;border-radius: cssUtils.$rounded-full;border: none;height: 16px;diff --git a/js/packages/react-ui/src/components/SwitchGroup/stories/SwitchGroup.stories.tsx b/js/packages/react-ui/src/components/SwitchGroup/stories/SwitchGroup.stories.tsxindex cc70ef903..b0f8449ce 100644--- a/js/packages/react-ui/src/components/SwitchGroup/stories/SwitchGroup.stories.tsx+++ b/js/packages/react-ui/src/components/SwitchGroup/stories/SwitchGroup.stories.tsx@@ -69,3 +69,28 @@ export const SwitchGroupStory: Story = {</SwitchGroup>),};++export const WithLongDescription: Story = {+ args: {+ variant: "card",+ },+ render: (args) => (+ <SwitchGroup {...args}>+ <SwitchItem+ value="long1"+ label="First option with a long description"+ description="This is a long description that elaborates on the choice in great detail so that readers can fully understand the implications of selecting this option. It provides context, examples, and any caveats that might be relevant when making a selection."+ />+ <SwitchItem+ value="long2"+ label="Second option with a long description"+ description="Another extended description that spans multiple sentences to showcase how the component behaves with verbose content. It should wrap correctly and remain readable without breaking the layout of the switch group."+ />+ <SwitchItem+ value="long3"+ label="Third option with a long description"+ description="A very long explanation that includes more nuance about the option, possible trade-offs, and guidance for when this might be preferred. This helps validate the design for accessibility and usability with real-world copy lengths."+ />+ </SwitchGroup>+ ),+};diff --git a/js/packages/react-ui/src/components/SwitchItem/switchItem.scss b/js/packages/react-ui/src/components/SwitchItem/switchItem.scssindex b5f2d5e6d..0c91df78a 100644--- a/js/packages/react-ui/src/components/SwitchItem/switchItem.scss+++ b/js/packages/react-ui/src/components/SwitchItem/switchItem.scss@@ -14,6 +14,7 @@.crayon-switch-item-root {position: relative;display: inline-block;+ flex-shrink: 0;height: 16px;width: 24px;margin-top: cssUtils.$spacing-2xs;