-
Notifications
You must be signed in to change notification settings - Fork 10
Feature: Add components #83
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
base: develop
Are you sure you want to change the base?
Conversation
…up, and Separator stories to include dynamic source
…nd Skeleton components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "@popperjs/core": "^2.11.8", | ||
| "@radix-ui/react-dialog": "^1.1.14", | ||
| "@radix-ui/react-dropdown-menu": "^2.1.15", | ||
| "@radix-ui/react-label": "^2.1.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Radix UI is used. These should be derived from Base UI
| lg: "text-lg", | ||
| }; | ||
|
|
||
| const themeClasses: Record<RadioGroupTheme, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name, | ||
| orientation = "vertical", | ||
| }) => { | ||
| const sizeClasses: Record<RadioGroupSize, string> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constants should not be declared in the components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no radio group in the docs or figma. I'm assuming this is an extension of radio-button from the figma.
| } | ||
| `} | ||
| > | ||
| <div className="font-medium">{option.label}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
div used for text
| > | ||
| <div className="font-medium">{option.label}</div> | ||
| {option.description && ( | ||
| <div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
div used for text
| size === "sm" ? "text-xs" : "text-sm" | ||
| } text-ink-gray-5 mt-0.5`} | ||
| > | ||
| {option.description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no description in the designs
| className={` | ||
| ${sizeClasses[size]} | ||
| ${themeClasses[theme]} | ||
| rounded-full border-2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default state should have no border.
| ${themeClasses[theme]} | ||
| rounded-full border-2 | ||
| focus:outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-3 | ||
| disabled:cursor-not-allowed disabled:opacity-50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-opacity changes in designs
This pull request introduces three new UI components—
Label,RadioGroup,Skeleton, andSeparator—to thefrappe-ui-reactpackage, each built on top of Radix UI primitives. It also adds their respective type definitions and comprehensive Storybook stories for documentation and testing. Additionally, the required Radix UI dependencies are added to the package manifest. These changes enhance the design system by providing configurable, accessible, and themable form and layout primitives.New Component Additions
Labelcomponent (src/components/label/index.tsx) supporting size, weight, variant, disabled, required, and optional props, with Radix UI integration.RadioGroupcomponent (src/components/radiogroup/index.tsx) with support for sizes, themes, variants, orientation, option descriptions, and disabled states, built on Radix UI.Separatorcomponent (src/components/separator/index.tsx) supporting size, color, variant, and orientation, leveraging Radix UI.Type Definitions
Label,RadioGroup,Skeleton, andSeparatorcomponents in their respectivetypes.tsfiles for type safety and IntelliSense.Storybook Documentation
LabelandRadioGroupcomponents to demonstrate usage, variants, and states, aiding in visual documentation and testing.Dependency Management
package.jsonto include new Radix UI dependencies required for the added components:@radix-ui/react-label,@radix-ui/react-radio-group, and@radix-ui/react-separator.