Skip to content

Version Packages - #1329

Open
tenphi wants to merge 1 commit into
mainfrom
changeset-release/main
Open

Version Packages#1329
tenphi wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@tenphi

@tenphi tenphi commented Aug 18, 2026

Copy link
Copy Markdown
Member

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@cube-dev/ui-kit@0.164.0

Minor Changes

  • #1326 aa455803 Thanks @tenphi! - ItemAction / ItemBadge now default to type="current" and stop mirroring the host row's type from context. current derives every color from the inherited currentcolor, so one type covers every host type × theme combination that the context mapping used to enumerate — and, because currentcolor is inherited rather than resolved once, an action also follows its row through hover, selected and disabled instead of holding a fixed palette. The mapping in ItemActionProvider that folded item / outline / outline-2 / header / card onto clear is gone.

    ItemActionContext stays. It still carries disableActionsFocus, isDisabled, the theme, and type — the last only for its presence, which drives the context mod that collapses an action's side margins. The provider's signature is unchanged, so no call site moved.

    Passing an explicit theme opts an action out of current and back to clear, since current is theme-agnostic by construction and the theme would otherwise have nothing to color. The theme="default" case is excluded from that fallback: passing a prop's own default value must not change what renders, which is the invariant no-redundant-default-prop lints for.

    Supporting changes:

    • Selection reads as a filled chip. Every other type marks isSelected with a brand hue — an accent-tinted fill under an accent label — and current has one inherited color to work with, so it cannot. Alpha is the only channel left, and the neutral types' .09 step read as a slightly dirty background rather than an "on" state, so a selected ItemAction / ItemBadge looked unselected. Selection now jumps clear of the interaction steps (.18 in light) instead of continuing them, while hover and press stay subtle so a row full of actions is not busy. On dark surfaces the same construction inverts — a light chip climbing toward an equally light label — and both the dark scheme and the special theme hit the AA floor for their label at exactly .24, so their steps are written under that measured ceiling and selected is a smaller jump there.
    • A scheme-aware alpha ramp. Unlike the brand tokens, #current alphas do not adapt to the color scheme — a 4% tint of a dark label on a light surface reads far stronger than a 4% tint of a light label on a dark one. Each step now carries a per-surface value: the base entry for light, @dark for the dark scheme, and theme=special as a single fixed ramp (special is static across light/dark/HC by design). Each step lives in its own custom property rather than inline in fill, because three ramps in one state-map would put ~18 alpha values where Tasty's mergeEntriesByValue pass coalesces equal value strings into one OR-entry at the group's max priority and breaks negation against lower-priority rules.
    • ItemAction regains a focus ring. CURRENT_ITEM_STYLES follows the *_ITEM_STYLES convention of leaving focus to the collection that owns the row, which is wrong for a focusable action. The ring moves to ItemAction's base styles, where every variant's own outline still overrides it, so only current is affected.
    • ItemButton paints its actions' color. It renders actions as a sibling of the button rather than inside it — deliberately, so they are not nested in a <button> — so currentcolor reached them from the page instead of the row: a danger row handed its actions neutral text, and a special row handed them the page's dark text to tint on a dark purple surface. ActionsWrapper now carries the row's resting color, derived from the variant map rather than restating the palette.
    • One variants map. Item's inline theme.type → styles object is now the exported ITEM_VARIANTS, shared with the color projection above so the two cannot drift.

    Every clear and trigger button across the field components now relies on that default instead of pinning a type or a validation theme: Select, Picker, FilterPicker, ComboBox, SearchComboBox and SearchInput clear buttons, PasswordInput's masking toggle, ColorInput's pipette, DatePicker's calendar button and the ComboBox / SearchComboBox triggers. Each one now takes the color of the field it sits in, so it follows a custom theme rather than staying pinned to default.clear.

    Where that changes rendering, it changes it toward matching the field's own text:

    • Picker / FilterPicker clear buttons are unchanged — their trigger text already carries validation state, so the inherited color equals what the explicit theme produced.
    • ComboBox / SearchComboBox / SearchInput clear buttons and the ComboBox trigger move from the fixed danger.clear label to the input's own #danger-accent-text when invalid. The trigger previously stayed neutral beside red input text.
    • PasswordInput's toggle now tints with the field instead of always rendering neutral.
    • Select's clear button no longer turns red when the field is invalid. Its trigger keeps neutral label text in that state, so the button now matches its own field, and the red border still signals invalidity. Picker and FilterPicker are also Item-based but do tint their trigger text — that inconsistency lives in Select and is worth fixing there rather than being masked by a themed clear button.

    ItemAction / ItemBadge type therefore returns to a plain 'current' default in the lint registry. The skip: 'context' classification it was given existed because the prop resolved through ItemActionProvider; it no longer does. isDisabled is still context-resolved and still skipped.

  • #1327 5bebe7d1 Thanks @tenphi! - MenuTrigger / DialogTrigger: an action can now hand focus off to the surface it opens. Closing either overlay used to return focus to its trigger unconditionally — an item or button whose action opened a panel, a dialog or an inline editor lost focus to the trigger a tick later, so consumers had to out-race the overlay by re-focusing on every animation frame over a several-hundred-millisecond window. The restore is now skipped whenever focus already sits outside the closing overlay, so a single focus() from the opened surface's mount effect holds.

    Nothing changes when the action moves focus nowhere: focus still inside the overlay (the pressed control keeps it through the exit animation) or dropped to <body> returns to the trigger as before. A clicked control outside the overlay also keeps focus now instead of having it yanked to the trigger. For DialogTrigger this affects the modal, tray, fullscreen, fullscreenTakeover and panel types; popover already restored through Dialog's own FocusScope, which declines to restore when focus moved.

    Both triggers also gain a shouldRestoreFocus prop (default true) for surfaces that claim focus later than the restore — after an async load or an entry animation — where the trigger would otherwise take focus first and flash. It silences every restore path the trigger owns: MenuTrigger's popover FocusScope as well as its manual restore, and for DialogTrigger the Dialog's own FocusScope (reached through DialogContext, so a Dialog rendered outside a trigger keeps restoring focus as before).

    Tabs: the rename-from-menu flow no longer runs a refocus pass. Picking "Rename" used to re-focus the inline-edit input on an animation frame and again at 50/200/400ms purely to survive the closing menu; the input's own FocusScope autoFocus is now enough. Behaviour is unchanged — rename still lands in a live editing session, in every context-menu mode.

Patch Changes

  • #1328 cfa6fb6e Thanks @tenphi! - Update @tenphi/tasty to 3.0.2. A patch release with no public API change — the export surface is byte-for-byte the same set of names as 3.0.1 — so nothing in the UI Kit needed migrating and the full suite passes unchanged.

    Two clarifications in Tasty's docs are worth knowing if you write custom tokens: token names are case-sensitive and should start lowercase (a leading capital folds, so $Foo resolves to --foo), and preset / transition take token names rather than values, so a bare $name there warns in dev and is ignored. Neither affects this package — no capitalized token name is used anywhere in src.

    The tree-shaking size budget goes from 123 kB to 124 kB. Tasty's core grew ~0.56 kB in this release, which put the old budget 31 bytes over; the All entry moved by the same amount and stays inside its 501 kB budget.


Note

Low Risk
Diff is version, changelog, and changeset cleanup only; no runtime code changes in this merge.

Overview
Release housekeeping for @cube-dev/ui-kit 0.164.0: bumps package.json from 0.163.0, folds the pending Changesets into CHANGELOG.md, and deletes the three consumed changeset files (item-action-current-default, menu-focus-handoff, tasty-3-0-2).

The published 0.164.0 notes (already merged on main) cover ItemAction / ItemBadge defaulting to type="current", MenuTrigger / DialogTrigger focus-restore behavior plus shouldRestoreFocus, and a @tenphi/tasty 3.0.2 patch with a slightly higher tree-shake budget. This PR does not re-apply those code changes—it only prepares the npm release.

Reviewed by Cursor Bugbot for commit ee2603d. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview Aug 18, 2026 8:35am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 487.96 KB (0% 🟰) Yes 🎉
Tree shaking (just a Button) 120.15 KB (0% 🟰) Yes 🎉

Compared against main at cfa6fb6run 32107032149, 2026-08-18T06:27:57Z.

Click here if you want to find out what is changed in this build

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant