fix(input-otp): variants on segment background#5179
Conversation
🦋 Changeset detectedLatest commit: 73969d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces a new changeset file documenting patches to the Changes
Sequence Diagram(s)(No sequence diagrams generated as changes are limited to styling and dependency updates without modifications to control flow.) Assessment against linked issues
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/core/theme/src/components/input-otp.ts (1)
30-30: Consider reviewing the hover styling.While not part of the current changes, I noticed that line 30 includes
hover:bg-dangerin the base segment styling. This would cause all segments to display a danger/red background on hover regardless of their variant or color setting. You might want to review if this is the intended behavior or if it should be moved to specific variant or color compound variants.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/small-cougars-watch.md(1 hunks)packages/components/input-otp/package.json(1 hunks)packages/core/theme/src/components/input-otp.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: TypeScript
- GitHub Check: Build
- GitHub Check: Continuous Release
🔇 Additional comments (4)
.changeset/small-cougars-watch.md (1)
1-7: The changeset file correctly documents the patches.This changeset properly indicates that patches have been applied to both the
@heroui/input-otpand@heroui/themepackages, with a clear description of the fix related to input-otp variants and their segment backgrounds.packages/components/input-otp/package.json (1)
39-39: Appropriate peer dependency update.Updating the minimum required version of
@heroui/themeto>=2.4.13is appropriate since this fix relies on the styling changes made to the theme package. This ensures that consumers of the input-otp component will use a theme version that includes the fixed styling for proper display on dark backgrounds.packages/core/theme/src/components/input-otp.ts (2)
60-60: Good fix for background visibility in the bordered variant.Adding the
bg-backgroundclass to the segment styling for the bordered variant addresses the visibility issue when the component is displayed against a dark background in light mode. This ensures proper contrast between the text and background.
64-64: Good fix for background visibility in the underlined variant.Similarly, adding the
bg-backgroundclass to the underlined variant's segment styling ensures text visibility on dark backgrounds. This consistent approach to both variants maintains design coherence while solving the reported issue.
@heroui/accordion
@heroui/autocomplete
@heroui/alert
@heroui/avatar
@heroui/badge
@heroui/breadcrumbs
@heroui/button
@heroui/calendar
@heroui/card
@heroui/checkbox
@heroui/chip
@heroui/code
@heroui/date-input
@heroui/date-picker
@heroui/divider
@heroui/drawer
@heroui/dropdown
@heroui/form
@heroui/image
@heroui/input
@heroui/input-otp
@heroui/kbd
@heroui/link
@heroui/listbox
@heroui/menu
@heroui/modal
@heroui/number-input
@heroui/navbar
@heroui/pagination
@heroui/popover
@heroui/progress
@heroui/radio
@heroui/ripple
@heroui/scroll-shadow
@heroui/select
@heroui/skeleton
@heroui/slider
@heroui/snippet
@heroui/spacer
@heroui/spinner
@heroui/switch
@heroui/table
@heroui/tabs
@heroui/toast
@heroui/tooltip
@heroui/user
@heroui/react
@heroui/system
@heroui/system-rsc
@heroui/theme
@heroui/use-aria-accordion
@heroui/use-aria-accordion-item
@heroui/use-aria-button
@heroui/use-aria-link
@heroui/use-aria-modal-overlay
@heroui/use-aria-multiselect
@heroui/use-callback-ref
@heroui/use-clipboard
@heroui/use-data-scroll-overflow
@heroui/use-disclosure
@heroui/use-draggable
@heroui/use-image
@heroui/use-infinite-scroll
@heroui/use-intersection-observer
@heroui/use-is-mobile
@heroui/use-measure
@heroui/use-is-mounted
@heroui/use-pagination
@heroui/use-real-shape
@heroui/use-ref-state
@heroui/use-resize
@heroui/use-safe-layout-effect
@heroui/use-scroll-position
@heroui/use-ssr
@heroui/use-theme
@heroui/use-update-effect
@heroui/aria-utils
@heroui/dom-animation
@heroui/framer-utils
@heroui/react-rsc-utils
@heroui/react-utils
@heroui/shared-icons
@heroui/shared-utils
@heroui/stories-utils
@heroui/test-utils
commit: |
Closes #5168
📝 Description
Text is not visible in bordered and underlined if the container has a black background in light mode.
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit
Bug Fixes
Style
Chores