fix: let calendar use container width (#10209)#10260
Open
aakarsh12x wants to merge 2 commits intoshadcn-ui:mainfrom
Open
fix: let calendar use container width (#10209)#10260aakarsh12x wants to merge 2 commits intoshadcn-ui:mainfrom
aakarsh12x wants to merge 2 commits intoshadcn-ui:mainfrom
Conversation
Contributor
|
Someone is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's the problem?
The
Calendarcomponent usedw-fiton itsrootclass, which caused it to shrink-wrap its content instead of filling the available container width. This made it impossible to use the calendar in full-width layouts (e.g., dashboard cards, sidebars, date range pickers).Reported in #10209.
What changed?
Changed
w-fit->w-fullon therootclass across all calendar variants and style themes.Files updated:
apps/v4/registry/new-york-v4/ui/calendar.tsxapps/v4/registry/bases/radix/ui/calendar.tsxapps/v4/registry/bases/base/ui/calendar.tsxapps/v4/styles/*/ui/calendar.tsxvariants (radix-nova, radix-luma, radix-vega, radix-mira, radix-maia, radix-lyra, base-nova, base-luma, base-vega, base-mira, base-maia, base-lyra, including RTL)apps/v4/examples/base/calendar-hijri.tsxapps/v4/examples/radix/calendar-hijri.tsxBefore / After
root: cn("w-fit", defaultClassNames.root)root: cn("w-full", defaultClassNames.root)The calendar now fills its container width, consistent with how
month,week,table, andweekdayalready usew-full.