* 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>
* feat(@vben-core/form-ui): support labelWidth auto alignment
Measure horizontal labels and align them to the widest one when
labelWidth is set to auto, allow string widths, and expose a single
form-render context that also carries the label-width registry.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(@vben/playground): add form labelWidth auto demo
Provide an interactive example under Examples -> Form -> Label Auto
Width, with locales and route wiring, to showcase auto alignment.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(@vben-core/menu-ui): menu badge ping ring clipped by overflow
The .vben-menu-item__content span rule applied the menu-title mixin
(overflow:hidden, for text ellipsis) to ALL descendant spans, including
the badge dot spans. This clipped the animate-ping expanding ring, so
the leaf-menu badge dot only pulsed (opacity fade) instead of pinging,
while the sub-menu (directory) badge pinged correctly because it lives
under .vben-sub-menu-content which has no such rule.
Fix: scope the menu-title mixin to the title span (.vben-menu__name)
and wrap the menu-item title slot accordingly.
* fix(@vben-core/menu-ui): allow custom font-size on sub-menu-content descendants
* fix(@vben-core/menu-ui): correct default badge variant color
Mount in-content drawers and modals to the persistent main content element.
Initialize drawer open state when mounted after the API opens.
Fixesvbenjs/vue-vben-admin#8210
Bind shared data to modal and drawer APIs and infer it from exposed connected components.
BREAKING CHANGE: getData<T>() is replaced by getData().
Shared data defaults to unknown, and an unset payload returns undefined instead
of an empty object.
* refactor(@vben-core/form-ui)!: group field slot component props
* fix(@vben-core/form-ui): stabilize grouped field slot bindings
Resolve function-based common component props with field context.
Preserve internal model and event bindings when custom field slots spread componentProps.
Add regression coverage for array contexts, disabled precedence, and stale binding isolation.
* feat(@vben/vite-config): warn about field slot migration
Print the temporary field-slot migration warning when the development server starts.
Inject the same message into the browser console and keep the plugin serve-only.
* docs(@vben/docs): document field slot migration
Place the breaking field-slot notice at the start of both form documents.
Explain old and new bindings, development warnings, and planned notice removal.
* feat(@vben/playground): extend custom form example
Add a switchable input and select field to demonstrate schema component updates.
Update the composite phone field to emit new tuple values so validation observes changes.