* fix(@vben-core/composables): track initially-absent props in usePriorityValue
The priority computed skipped reading props[key] when the raw prop was
undefined at setup, so no reactive dependency was established and later
prop updates were ignored. Always read props[key] to keep the computed
live; add a regression test.
* feat(@vben-core/form-ui): expose compact spacing as css variables
Introduce --vben-form-compact-padding (field/action trailing padding)
and --vben-form-compact-row-gap (compact grid row gap) so containers can
tune the compact form's vertical rhythm without overriding internal
classes; standalone forms keep their existing spacing.
useExpandable now accounts for the grid row gap when measuring
collapsed rows and reacts to collapsedRows/wrapperClass/compact/layout
changes; add regression tests.
* feat(@vben/plugins): segmented layout for the vxe grid form and table sections
Add a segmented mode (false / zone / card) that splits the search form
and the table body into two sections with independently customizable
radius and background:
- sectionOptions unifies section surfaces (form/body background and
radius, two-card gap, fullscreen background); formClass styles the
form surface
- separator gains class, style and fullBleed options and becomes an
in-flow decorative element following a uniform 8px vertical rhythm;
the full-bleed width is measured per side from the actual grid
padding, so custom gridClass padding and fullscreen keep working
- layout changes (search form toggle, collapse/expand, mode switches)
now trigger grid.recalculate(true) automatically; segmented modes
validate the effective layouts and report violations in the console
- in card mode the grid root padding is removed so both cards share the
same outer footprint as the other layouts
- playground demo page, zh/en docs and changeset included
* fix: address review findings on segmented layout pr
- docs(vxe-table): bind gridApi in the runtime-switch examples (zh/en)
- fix(vite-config): guard css layer-order injection on the marked style
element instead of any occurrence of the marker in page html, so body
text or comments containing the marker no longer skip injection
- fix(plugins): restrict GridSurfaceStyle to css length strings; numeric
borderRadius would be written into css custom properties verbatim
(no unit appended for --custom props) and silently dropped
- fix(composables): document the boolean-cast presence limitation and
cover presence transitions (undefined/false/value/absent) for both
attrs-based and default-undefined declared props with regressions
* fix(@vben/vite-config): scope the css layer-order guard to the head
The previous guard tested the whole html for the marker and matched a
style element inside a comment or outside the head, skipping injection.
Strip html comments from the head and only accept a real marked style
element there; body markers and commented-out styles now inject. Cover
all cases with tests.
* fix: address css layer CodeQL alerts and attrs review
* fix: clean up Tailwind configuration and utility merging
Register compound utilities with asymmetric conflicts to preserve alignment
and direction under atomic overrides.
Align Tailwind ecosystem dependencies and Vite resolutions, declare the
design build dependency, remove unused configuration, and document
merging rules.
* chore: add changeset
Badge.vue, Toggle.vue and SelectContent.vue imported their own modules
through the directory barrel (from '.'), while the barrel re-exported
those components, forming component <-> index.ts cycles reported by
`vsh check-circular`. Import the variants modules and the scroll-button
components directly instead, matching the existing style in Button.vue
and ScrollArea.vue. No public exports change.
Co-authored-by: Claude Code <noreply@anthropic.com>
* fix(@vben-core/shadcn-ui): align the table action pop confirm with the row height and dropdown size
The pop confirm button rendered by action-item.vue still carried p-2, so it
kept the vertical padding that #8464 removed from the plain action buttons in
table-action.vue and overflowed the 40px cell of a small-sized Grid (#8461).
Its confirmation buttons also used the default size while the dropdown pop
confirm uses sm, so the two bubbles looked different.
Use gap-1 px-2 py-0 like table-action.vue and render the cancel/confirm
buttons with size sm. The popover side is unchanged (top for inline actions,
left for dropdown items).
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(@vben/playground): add a standalone TableAction example
Add Examples > Table Action to the playground. It shows VbenTableAction on
its own (basic, tooltip, pop confirm and loading, more dropdown, permission
with a local hasPermission) and inside a vxe Grid, where row state drives
disabled / loading / ifShow and auth codes are checked against the logged
in user.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(@vben-core/shared): keep a usable file name when downloading images by url
downloadFileFromImageUrl rasterises the source and then relied on the
base64 fallback name, so omitting the optional fileName saved an
extension-less "downloaded_file" whose bytes are actually PNG.
* fix(@vben-core/shared): keep image data urls out of derived file names
* docs(@vben-core/shared): describe the download file name helper
* docs(@vben-core/shared): describe the image pipeline test stub
---------
Co-authored-by: MindOfqc <MindOfqc@users.noreply.github.com>
* fix(@vben-core/shared): keep the deployment base when opening routes in a new window
openRouteInNewWindow only recognised the hash href produced at the root
base ('/#/demo'), so a base-prefixed href ('/myapp/#/demo') got a second
'/#' injected and the new window landed on the wrong route.
* fix(test): safely read the mocked window open call
---------
Co-authored-by: MindOfqc <MindOfqc@users.noreply.github.com>
resolveFileName took everything after the last slash, so a signed link
saved as `%E6%8A%A5%E5%91%8A.pdf?token=abc`: the percent-encoded segment
was never decoded and the query string leaked into the download attribute.
Strip the query and fragment, then decode, falling back to the raw
segment when the escape sequence is malformed.
Co-authored-by: MindOfqc <MindOfqc@users.noreply.github.com>
* fix(@vben-core/table-action): keep action buttons within the row height
VbenTableAction rendered its buttons with p-2, so the 8px vertical
padding stacked on top of the button's min-height and overflowed the
40px cell of a small-sized vxe Grid, visually misaligning the action
buttons against the rest of the row (#8461). Keep the horizontal
padding for the hit area and drop the vertical one; the wrapper is
flex items-center, so buttons stay centered in the row.
* fix(@vben-core/table-action): zero the vertical padding explicitly
Review follow-up: the default-size VbenButton variant keeps `py-2`, so
switching `p-2` to `px-2` only removed the horizontal padding. Add `py-0` to
both the action button classes and the dropdown trigger so the vertical
padding is actually zero and the row-height intent is explicit.
No behavioural change beyond the padding classes.
StateHandler kept a single resolve/reject pair, so calling
waitForCondition() more than once before the condition flips overwrote the
previous handles and left the earlier waiters pending forever. form-api and
the vxe-table api both await this gate while mounting, so concurrent callers
could hang permanently. Collect all pending resolvers/rejecters and settle
them together on each transition.
Co-authored-by: rwzdk <rwzdk@users.noreply.github.com>
* fix(@vben-core/shadcn-ui): use locale messages for the table action pop confirm
The pop confirm bubble of the table action button hardcoded the English
strings "Are you sure?", "Cancel" and "OK" instead of using the shared
locale messages, so the confirmation popup was never translated. The
confirm button also carried a "p-2" override that made it render smaller
than the cancel button next to it.
Fixes#8449
* test(@vben-core/shadcn-ui): assert the pop confirm button labels directly
---------
Co-authored-by: rwzdk <rwzdk@users.noreply.github.com>
* feat(@vben-core/form-ui): support grouped schema for collapsible sections
Add `type: 'group'` to `FormSchema`, parallel to `type: 'array'`, so a set
of fields can be organised into a collapsible section without turning the
group itself into a field.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(@vben-core/form-ui): harden grouped section behavior
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(@vben-core/shared): keep filterTree from mutating the source tree
filterTree assigned the filtered child array back onto the source node, so nodes that failed
the predicate were dropped from the input tree permanently instead of only from the result.
In frontend/mixed access mode generateRoutesByFrontend filters the module-level accessRoutes
on every login and role refresh, so routes stripped for a low-privilege user stayed missing
for later sessions until a full page reload.
filterTree is now pure: matched nodes owning a child array are copied, nodes without children
are still returned by reference.
* docs(@vben-core/shared): correct filterTree reference-semantics comment
filterTree does not write its result back into the input tree, but childless
matched nodes are still returned by reference. The previous comment claimed no
source node is ever returned, which contradicted the implementation and could
mislead callers.
* fix(@vben-core/shared): preserve branch references in filterTree
filterTree copied every matched branch node, so filtering a tree where nothing
changed still returned new branch objects. The previous implementation used
Array#filter, which keeps element references, so callers could rely on
filterTree(input, () => true)[0] === input[0].
Branch nodes are now shallow-copied only when their child sequence actually
changes; unchanged nodes are returned by reference, restoring the reference
semantics callers had before. The mutation fix itself is unaffected: the
filtered child array is never assigned back onto the source node.
* fix(@vben-core/form-ui): strip native name attr when fieldName collides with form properties
An <input name="nodeName"> inside a vben form hijacks the form.nodeName
accessor: it returns the control element instead of the string "FORM".
When a TreeSelect dropdown opens, popper/floating computation walks the
ancestor chain and calls getNodeName(form) -> form.nodeName.toLowerCase(),
which throws. Strip the native name attribute only for field names that
collide with <form> built-in properties (nodeName, action, id, name,
title, ...); the outer tanstack Field name binding used for field
location is unaffected.
closes#8214
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/form-ui): 字段名与 <form> 固有属性冲突时剥离原生 name (#8214)
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/form-ui): keep name-resolved model bindings intact in conflict sweep (#8214)
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/form-ui): preserve declared name props in conflict sweep (#8214)
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/form-ui): resolve string components before name-prop introspection (#8214)
Co-Authored-By: EvoX <evox@evomap.ai>
---------
Co-authored-by: EvoX <evox@evomap.ai>
Cover the imperative AlertBuilder path (alert()/confirm()/clearAllAlerts)
that issue #8052 reported: mouse click on the confirm button resolves the
promise, mouse click on cancel or Escape rejects with 'dialog cancelled',
and the mounted container is removed from the DOM afterwards.
Verified separately: oxlint/oxfmt/eslint clean, popup-ui typecheck clean,
vitest 7/7 passing. Full-repo checkType blocked by unrelated uncommitted
apps/web-ele/src/__tests__/repro-8214.test.ts (8214 track work).
Co-authored-by: EvoX <evox@evomap.ai>
Allow custom content to be rendered in the modal header, positioned to the
left of the fullscreen toggle button, via a new `extra` slot. Mirrors the
existing `extra` slot in the drawer component.
Co-authored-by: EvoX <evox@evomap.ai>
* feat(@vben-core/shadcn-ui): add Progress primitive with progressbar semantics
Add a reka-ui-based Progress primitive (role="progressbar") exposing
aria-valuemin/valuemax/valuenow, a custom max, and an indeterminate state
when modelValue is null, with unit tests covering those semantics.
Co-Authored-By: EvoX <evox@evomap.ai>
* chore: add changeset for Progress primitive
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/shadcn-ui): normalize progress indicator fill with custom max
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/shadcn-ui): guard Progress against non-positive max values
Co-Authored-By: EvoX <evox@evomap.ai>
* chore(@vben-core/shadcn-ui): dedupe progress max fallback tests
Co-Authored-By: EvoX <evox@evomap.ai>
* test(@vben-core/shadcn-ui): assert NaN max fallback instead of zero
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/shadcn-ui): reject non-finite progress max values
Co-Authored-By: EvoX <evox@evomap.ai>
* fix(@vben-core/shadcn-ui): narrow max to number in progress normalization
Co-Authored-By: EvoX <evox@evomap.ai>
---------
Co-authored-by: EvoX <evox@evomap.ai>