feat(Drawer): add close and closeIcon props - #243
Merged
Conversation
Port of upstream nuxt/ui 53e88a4 (#6669). Adds a built-in close button to Drawer (mirroring b24ui's Modal): `close` (boolean | Omit<ButtonProps, LinkPropsKeys>) and `closeIcon` (IconComponent) props, plus `actions` and `close` slots. The header is restructured into a `wrapper` (title + description) and an `actions` container (`ms-auto`) holding the close button; theme gains `wrapper`/`actions`/`close` slots + header flex classes. Adds the `drawer.close` i18n message to the Messages type and all 20 locales (each set to that locale's existing `modal.close` value). New renderEach cases for close/closeIcon/actions/close-slot; snapshots regenerated (8 new + 30 updated for the wrapper restructure). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
IgorShevchik
force-pushed
the
sync/nuxt-53e88a4
branch
from
July 10, 2026 08:35
da45914 to
4f1e3f2
Compare
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.
Upstream
53e88a4—feat(Drawer): add close and closeIcon props (#6669)Adds a built-in close button to
Drawer, mirroringModal.Change — adapted from b24ui's own Modal
b24ui already ships this pattern on
Modal, so the port mirrors b24ui's Modal rather than upstream's icon/color choices:Drawer.vue:close(boolean | Omit<ButtonProps, LinkPropsKeys>) andcloseIcon(IconComponent— b24ui has noIcon.vue, so not upstream'sIconProps['name']) props;actions/closeslots; header restructured intowrapper(title + description) andactions(ms-auto,DrawerClose→B24Buttonsize="md" color="air-tertiary-no-accent":aria-label="t('drawer.close')"). b24ui's separateVisuallyHiddena11y title/description block is untouched, so wrapping the display title/description is a11y-safe.theme/drawer.ts: header flex classes + newwrapper/actions/closeslots.drawer: { close }added totypes/locale.tsand all 20 locales, each set to that locale's existingmodal.closevalue (Close/Schließen/閉じる/Закрыть…) — no invented translations, curated set preserved.Tests
New
renderEachcaseswith close/with closeIcon(Cross30Icon) /with actions slot/with close slot(mirror Modal.spec). Snapshots: 8 written + 30 updated (existing title/description cases now nest underdata-slot="wrapper"). Suite 5155 passed (+8).Verify (CI=true)
dev:prepare·lint·typecheck(all 20 locales satisfydrawer.close) ·test·build— all green.Ledger
.sync/log/53e88a4….md— port rationale.sync/nuxt-ui.json— add53e88a4asport, advance cursor; reconcile priorefd44e2→ PR chore(deps): update all non-major dependencies #240 /eba22f76.🤖 Generated with Claude Code
Generated by Claude Code