-
Notifications
You must be signed in to change notification settings - Fork 19
refactor: swap out radix with reka #1271
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a93cdc2
refactor: swap out radix with reka
9873280
refactor: clean up sidebar typescript errors
9b081f7
refactor: remove radix package from web and unraid-ui and revert chan…
a4da7a7
chore: remove radix-vue from override in package.json
4063583
fix: add vue to includes in tsconfig.test.json
babc65d
fix: install vite-plugin-vue-tracer as a dev dependency to fix nuxt e…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,39 @@ | ||
| import { cva } from "class-variance-authority"; | ||
| import { cva, VariantProps } from 'class-variance-authority'; | ||
|
|
||
| export const badgeVariants = cva( | ||
| "inline-flex items-center rounded-full font-semibold leading-none transition-all duration-200 ease-in-out unraid-ui-badge-test", | ||
| 'inline-flex items-center rounded-full font-semibold leading-none transition-all duration-200 ease-in-out unraid-ui-badge-test', | ||
| { | ||
| variants: { | ||
| variant: { | ||
| red: "bg-unraid-red text-white hover:bg-orange-dark", | ||
| yellow: "bg-yellow-100 text-black hover:bg-yellow-200", | ||
| green: "bg-green-200 text-green-800 hover:bg-green-300", | ||
| blue: "bg-blue-100 text-blue-800 hover:bg-blue-200", | ||
| indigo: "bg-indigo-100 text-indigo-800 hover:bg-indigo-200", | ||
| purple: "bg-purple-100 text-purple-800 hover:bg-purple-200", | ||
| pink: "bg-pink-100 text-pink-800 hover:bg-pink-200", | ||
| orange: "bg-orange text-white hover:bg-orange-dark", | ||
| black: "bg-black text-white hover:bg-gray-800", | ||
| white: "bg-white text-black hover:bg-gray-100", | ||
| transparent: "bg-transparent text-black hover:bg-gray-100", | ||
| current: "bg-current text-current hover:bg-gray-100", | ||
| gray: "bg-gray-200 text-gray-800 hover:bg-gray-300", | ||
| custom: "", | ||
| red: 'bg-unraid-red text-white hover:bg-orange-dark', | ||
| yellow: 'bg-yellow-100 text-black hover:bg-yellow-200', | ||
| green: 'bg-green-200 text-green-800 hover:bg-green-300', | ||
| blue: 'bg-blue-100 text-blue-800 hover:bg-blue-200', | ||
| indigo: 'bg-indigo-100 text-indigo-800 hover:bg-indigo-200', | ||
| purple: 'bg-purple-100 text-purple-800 hover:bg-purple-200', | ||
| pink: 'bg-pink-100 text-pink-800 hover:bg-pink-200', | ||
| orange: 'bg-orange text-white hover:bg-orange-dark', | ||
| black: 'bg-black text-white hover:bg-gray-800', | ||
| white: 'bg-white text-black hover:bg-gray-100', | ||
| transparent: 'bg-transparent text-black hover:bg-gray-100', | ||
| current: 'bg-current text-current hover:bg-gray-100', | ||
| gray: 'bg-gray-200 text-gray-800 hover:bg-gray-300', | ||
| custom: '', | ||
| }, | ||
| size: { | ||
| xs: "text-12px px-8px py-4px gap-4px", | ||
| sm: "text-14px px-8px py-4px gap-8px", | ||
| md: "text-16px px-12px py-8px gap-8px", | ||
| lg: "text-18px px-12px py-8px gap-8px", | ||
| xl: "text-20px px-16px py-12px gap-8px", | ||
| "2xl": "text-24px px-16px py-12px gap-8px", | ||
| xs: 'text-12px px-8px py-4px gap-4px', | ||
| sm: 'text-14px px-8px py-4px gap-8px', | ||
| md: 'text-16px px-12px py-8px gap-8px', | ||
| lg: 'text-18px px-12px py-8px gap-8px', | ||
| xl: 'text-20px px-16px py-12px gap-8px', | ||
| '2xl': 'text-24px px-16px py-12px gap-8px', | ||
| }, | ||
| }, | ||
| defaultVariants: { | ||
| variant: "gray", | ||
| size: "md", | ||
| variant: 'gray', | ||
| size: 'md', | ||
| }, | ||
| } | ||
| ); | ||
|
|
||
| export type BadgeVariants = VariantProps<typeof badgeVariants>; | ||
mdatelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 16 additions & 17 deletions
33
unraid-ui/src/components/common/button/button.variants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,29 @@ | ||
| import { cva } from "class-variance-authority"; | ||
| import { cva, VariantProps } from 'class-variance-authority'; | ||
|
|
||
| export const buttonVariants = cva( | ||
| "inline-flex items-center justify-center rounded-md text-base font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", | ||
| 'inline-flex items-center justify-center rounded-md text-base font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', | ||
| { | ||
| variants: { | ||
| variant: { | ||
| primary: "bg-primary text-primary-foreground hover:bg-primary/90", | ||
| destructive: | ||
| "bg-destructive text-destructive-foreground hover:bg-destructive/90", | ||
| outline: | ||
| "border border-input bg-background hover:bg-accent hover:text-accent-foreground", | ||
| secondary: | ||
| "bg-secondary text-secondary-foreground hover:bg-secondary/80", | ||
| ghost: "hover:bg-accent hover:text-accent-foreground", | ||
| link: "text-primary underline-offset-4 hover:underline", | ||
| primary: 'bg-primary text-primary-foreground hover:bg-primary/90', | ||
| destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', | ||
| outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', | ||
| secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', | ||
| ghost: 'hover:bg-accent hover:text-accent-foreground', | ||
| link: 'text-primary underline-offset-4 hover:underline', | ||
| }, | ||
| size: { | ||
| sm: "h-9 rounded-md px-3", | ||
| md: "h-10 px-4 py-2", | ||
| lg: "h-11 rounded-md px-8", | ||
| icon: "h-10 w-10", | ||
| sm: 'h-9 rounded-md px-3', | ||
| md: 'h-10 px-4 py-2', | ||
| lg: 'h-11 rounded-md px-8', | ||
| icon: 'h-10 w-10', | ||
| }, | ||
| }, | ||
| defaultVariants: { | ||
| variant: "primary", | ||
| size: "md", | ||
| variant: 'primary', | ||
| size: 'md', | ||
| }, | ||
| } | ||
| ); | ||
|
|
||
| export type ButtonVariants = VariantProps<typeof buttonVariants>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,27 @@ | ||
| import { cva } from "class-variance-authority"; | ||
| import { cva, VariantProps } from 'class-variance-authority'; | ||
|
|
||
| export const sheetVariants = cva( | ||
| "fixed z-50 bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 border-border", | ||
| 'fixed z-50 bg-background gap-4 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 border-border', | ||
| { | ||
| variants: { | ||
| side: { | ||
| top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", | ||
| bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", | ||
| left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", | ||
| right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", | ||
| top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top', | ||
| bottom: | ||
| 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom', | ||
| left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm', | ||
| right: | ||
| 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm', | ||
| }, | ||
| padding: { | ||
| none: "", | ||
| md: "p-6", | ||
| none: '', | ||
| md: 'p-6', | ||
| }, | ||
| }, | ||
| defaultVariants: { | ||
| side: "right", | ||
| padding: "md", | ||
| side: 'right', | ||
| padding: 'md', | ||
| }, | ||
| } | ||
| ); | ||
| ); | ||
|
|
||
| export type SheetVariants = VariantProps<typeof sheetVariants>; | ||
mdatelle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
unraid-ui/src/components/common/stepper/StepperDescription.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.