-
Notifications
You must be signed in to change notification settings - Fork 163
chore: Apply shadcn latest styling changes to components #722
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: main
Are you sure you want to change the base?
Changes from 3 commits
b31fdb9
adf17e3
61857ea
f6f66bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ function DialogOverlay({ | |
| <DialogPrimitive.Backdrop | ||
| data-slot="dialog-overlay" | ||
| className={cn( | ||
| 'fixed inset-0 isolate z-50 bg-black/80 backdrop-blur-xs duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0', | ||
| 'fixed inset-0 isolate z-50 bg-black/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0 supports-backdrop-filter:backdrop-blur-xs', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Significant overlay opacity reduction may cause visual regression. The overlay opacity changed from Given the visual regressions reported in PR comments, this dramatic change may reduce dialog prominence and affect readability of content behind the overlay. Consider whether this aligns with the project's design intent or if a middle-ground value (e.g., 🤖 Prompt for AI Agents |
||
| className | ||
| )} | ||
| {...props} | ||
|
|
@@ -88,7 +88,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) { | |
| return ( | ||
| <div | ||
| data-slot="dialog-header" | ||
| className={cn('flex flex-col gap-1 text-left', className)} | ||
| className={cn('flex flex-col gap-2', className)} | ||
| {...props} | ||
| /> | ||
| ); | ||
|
|
@@ -118,7 +118,7 @@ function DialogFooter({ | |
| <div | ||
| data-slot="dialog-footer" | ||
| className={cn( | ||
| 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-between', | ||
| 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', | ||
| className | ||
| )} | ||
| {...props} | ||
|
|
@@ -137,7 +137,7 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) { | |
| return ( | ||
| <DialogPrimitive.Title | ||
| data-slot="dialog-title" | ||
| className={cn('text-lg leading-none font-semibold', className)} | ||
| className={cn('leading-none font-medium', className)} | ||
| {...props} | ||
| /> | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'; | |
| import { cn } from '@/lib/tailwind/utils'; | ||
|
|
||
| const labelVariants = cva( | ||
| 'flex items-baseline gap-1.5 text-sm peer-disabled:cursor-not-allowed peer-disabled:opacity-50' | ||
| 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for usages of "group" class combined with data-disabled in form-related components
echo "=== Checking FormField for group class ==="
rg -n "group" src/components/form/form-field.tsx
echo ""
echo "=== Checking for data-disabled usage in form components ==="
rg -n "data-disabled" src/components/form/
echo ""
echo "=== Checking Label usage contexts that might have group + data-disabled ==="
rg -B5 -A5 "<Label" --type=tsx | head -100Repository: BearStudio/start-ui-web Length of output: 292 🏁 Script executed: #!/bin/bash
echo "=== Checking label.tsx content ==="
cat -n src/components/ui/label.tsx
echo ""
echo "=== Checking form-field.tsx content ==="
cat -n src/components/form/form-field.tsx
echo ""
echo "=== Searching for group-data-[disabled usage ==="
rg "group-data-\[disabled" .
echo ""
echo "=== Searching for data-disabled attribute ==="
rg "data-disabled" .
echo ""
echo "=== Searching for 'group' class in form components ==="
rg "group" src/components/form/ -A2 -B2
echo ""
echo "=== Checking if Label is wrapped by group-enabled components ==="
rg -B10 "Label" src/components/form/ | head -150Repository: BearStudio/start-ui-web Length of output: 35449 🏁 Script executed: #!/bin/bash
echo "=== Checking form-field-controller.tsx ==="
cat src/components/form/form-field-controller.tsx | head -80
echo ""
echo "=== Checking if any component adds group class to FormField ==="
rg "FormField" src/components/form/ -A3 | grep -E "(group|data-disabled)" | head -20Repository: BearStudio/start-ui-web Length of output: 1996 🏁 Script executed: #!/bin/bash
echo "=== Finding form-field-controller ==="
find src/components/form -name "*field-controller*" -type f
echo ""
echo "=== Checking FormFieldContainer ==="
find src/components/form -name "*form-field-container*" -type f | xargs cat -n
echo ""
echo "=== Search for where data-disabled or group might be added to form fields ==="
rg "disabled" src/components/form/form-field-container.tsx -B2 -A2Repository: BearStudio/start-ui-web Length of output: 526 🏁 Script executed: #!/bin/bash
echo "=== Checking if any component wraps FormField with group class ==="
rg -B5 "FormField" src/components/ | grep -E "(className.*group|group.*className)" | head -20
echo ""
echo "=== Checking how Label is actually used in practice (find complete examples) ==="
rg "FormFieldLabel" src/components/form/*/docs.stories.tsx -B3 -A3 | head -60Repository: BearStudio/start-ui-web Length of output: 6079 Clarify if The new The 🤖 Prompt for AI Agents |
||
| ); | ||
|
|
||
| function Label({ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,11 +40,7 @@ function ScrollBar({ | |
| data-slot="scroll-area-scrollbar" | ||
| orientation={orientation} | ||
| className={cn( | ||
| 'flex touch-none p-px transition-colors select-none', | ||
| orientation === 'vertical' && | ||
| 'h-full w-2.5 border-l border-l-transparent', | ||
| orientation === 'horizontal' && | ||
| 'h-2.5 flex-col border-t border-t-transparent', | ||
| 'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: In
It does not emit Sources: Replace The 🤖 Prompt for AI Agents |
||
| className | ||
| )} | ||
| {...props} | ||
|
|
||
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.
Use logical-direction utilities to keep Alert RTL-safe.
Line 7 (
text-left) and Line 70 (right-3) hardcode LTR direction. This can misalign alert content/actions in RTL locales.💡 Proposed fix
Also applies to: 70-70
🤖 Prompt for AI Agents