-
Notifications
You must be signed in to change notification settings - Fork 12.6k
fix(ui): fix disabled date contrast and update datepicker tests (#28771) #28791
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
Changes from all commits
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,22 +31,24 @@ function Calendar({ | |
| nav: "flex items-center", | ||
| head: "", | ||
| head_row: "flex w-full items-center justify-between", | ||
| head_cell: "w-8 md:w-11 h-8 text-sm font-medium text-default text-center", | ||
| head_cell: | ||
| "w-8 md:w-11 h-8 text-sm font-medium text-default text-center", | ||
| nav_button: cn(buttonClasses({ color: "minimal", variant: "icon" })), | ||
| table: "w-full border-collapse stack-y-1", | ||
| row: "flex w-full mt-0.5 gap-0.5", | ||
| cell: "w-8 h-8 md:h-11 md:w-11 text-center text-sm p-0 relative focus-within:relative focus-within:z-20", | ||
| day: cn( | ||
| buttonClasses({ color: "minimal" }), | ||
| "w-8 h-8 md:h-11 md:w-11 p-0 text-sm font-medium aria-selected:opacity-100 inline-flex items-center justify-center" | ||
| "w-8 h-8 md:h-11 md:w-11 p-0 text-sm font-medium aria-selected:opacity-100 inline-flex items-center justify-center", | ||
| ), | ||
| day_range_end: "hover:bg-inverted! text-inverted!", | ||
| day_range_start: "hover:bg-inverted! text-inverted!", | ||
| day_selected: "bg-inverted text-inverted", | ||
| day_today: "", | ||
| day_outside: "", | ||
| day_disabled: "text-muted opacity-50", | ||
| day_range_middle: "aria-selected:bg-emphasis aria-selected:text-emphasis", | ||
| day_disabled: "text-[#4A4E59] dark:text-[#A3A3A3]", | ||
| day_range_middle: | ||
| "aria-selected:bg-emphasis aria-selected:text-emphasis", | ||
|
Comment on lines
40
to
+51
|
||
| day_hidden: "invisible", | ||
| ...classNames, | ||
| }} | ||
|
|
||
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.
day_disablednow uses hard-coded hex colors. This bypasses the project’s semantic theme tokens (e.g.,text-subtle,text-muted) and makes the disabled-day color harder to tune for custom themes/branding. Consider introducing a semantic token/class for disabled date text (or using an existing token if one matches the required contrast) instead of embedding hex values here.