From c842f2fa565e78922c3480e1d758d3b94eab12f1 Mon Sep 17 00:00:00 2001 From: Julian Pollinger Date: Wed, 17 Dec 2025 16:08:25 +0100 Subject: [PATCH 1/6] docs: fix typos in form documentation (#2956) * docs: Fix typos in form documentation * docs: typo in form documentation Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- apps/docs/src/docs/components/form.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/docs/components/form.md b/apps/docs/src/docs/components/form.md index ed946ea4c..860c5f56b 100644 --- a/apps/docs/src/docs/components/form.md +++ b/apps/docs/src/docs/components/form.md @@ -38,12 +38,12 @@ Custom form controls and selects are also supported. ## Floating Labels -Wrap a `BFormInput`, `BFormTextarea`, or `BFormSelect` in a `BFormFloatingLable` to enable floating labesl. A `placeholder` +Wrap a `BFormInput`, `BFormTextarea`, or `BFormSelect` in a `BFormFloatingLabel` to enable floating labels. A `placeholder` is required on each input in order to make the Bootstrap 5 `css` work correctly. <<< DEMO ./demo/FormFloatingLabels.vue#template{vue-html} -Floating labels work correclty for disable state and readonly states. In addition to styled textual inputs, floating labels +Floating labels work correctly for disabled state and readonly states. In addition to styled textual inputs, floating labels also work for plaintext inputs, textareas, input groups and selects. See the [Bootstrap 5 documentation](https://getbootstrap.com/docs/5.3/forms/floating-labels) for more details. From a75332efab0c397d2125e23ad634267151e5d0c9 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:29:00 +0200 Subject: [PATCH 2/6] fix: remove boolean and null from modal promise return types (#2957) * Remove boolean and null from modal promise return types Co-authored-by: xvaara <130606+xvaara@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: xvaara <130606+xvaara@users.noreply.github.com> --- .../src/composables/orchestratorShared.ts | 6 +++--- .../src/types/ComponentOrchestratorTypes.ts | 14 +++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/bootstrap-vue-next/src/composables/orchestratorShared.ts b/packages/bootstrap-vue-next/src/composables/orchestratorShared.ts index 0af65208f..8ac9611aa 100644 --- a/packages/bootstrap-vue-next/src/composables/orchestratorShared.ts +++ b/packages/bootstrap-vue-next/src/composables/orchestratorShared.ts @@ -22,12 +22,12 @@ export function buildPromise ): { value: PromiseWithComponent - resolve: (value: BvTriggerableEvent | boolean | null) => void + resolve: (value: BvTriggerableEvent) => void stop: WatchHandle | undefined } { - let resolveFunc: (value: BvTriggerableEvent | boolean | null) => void = () => {} + let resolveFunc: (value: BvTriggerableEvent) => void = () => {} - const promise = new Promise((resolve) => { + const promise = new Promise((resolve) => { resolveFunc = resolve }) as PromiseWithComponent diff --git a/packages/bootstrap-vue-next/src/types/ComponentOrchestratorTypes.ts b/packages/bootstrap-vue-next/src/types/ComponentOrchestratorTypes.ts index 16d19a2ca..535d0773e 100644 --- a/packages/bootstrap-vue-next/src/types/ComponentOrchestratorTypes.ts +++ b/packages/bootstrap-vue-next/src/types/ComponentOrchestratorTypes.ts @@ -12,7 +12,7 @@ import type BTooltip from '../components/BTooltip/BTooltip.vue' export type ControllerKey = symbol | string export interface PromiseWithComponent - extends Promise, + extends Promise, PromiseWithComponentInternal {} export interface PromiseWithComponentInternal extends AsyncDisposable { id: ControllerKey @@ -56,7 +56,7 @@ export type ToastOrchestratorArrayValue = Omit & { 'options': OrchestratorCreateOptions 'promise': { value: PromiseWithComponent - resolve: (value: BvTriggerableEvent | boolean | null) => void + resolve: (value: BvTriggerableEvent) => void stop?: WatchHandle } 'type': 'toast' @@ -124,7 +124,7 @@ export type TooltipOrchestratorArrayValue = BTooltipProps & { '_component'?: Readonly 'promise': { value: PromiseWithComponent - resolve: (value: BvTriggerableEvent | boolean | null) => void + resolve: (value: BvTriggerableEvent) => void stop?: WatchHandle } 'slots'?: { @@ -166,7 +166,7 @@ export type PopoverOrchestratorArrayValue = BPopoverProps & '_component'?: Readonly 'promise': { value: PromiseWithComponent - resolve: (value: BvTriggerableEvent | boolean | null) => void + resolve: (value: BvTriggerableEvent) => void stop?: WatchHandle } 'slots'?: { @@ -206,7 +206,7 @@ export type ModalOrchestratorArrayValue = BModalProps & { 'options': OrchestratorCreateOptions 'promise': { value: PromiseWithComponent - resolve: (value: BvTriggerableEvent | boolean | null) => void + resolve: (value: BvTriggerableEvent) => void stop?: WatchHandle } '_component'?: Readonly @@ -245,10 +245,6 @@ export type ModalOrchestratorCreateParam Date: Fri, 19 Dec 2025 12:50:35 -0800 Subject: [PATCH 3/6] feat(BFormGroup): add props to apply attrs to label and content wrappers in horizontal mode (#2960) --- .../src/data/components/formGroup.data.ts | 12 +++ .../demo/FormGroupWrapperAttrsBasic.vue | 15 +++ .../demo/FormGroupWrapperAttrsCustom.vue | 25 +++++ apps/docs/src/docs/components/form-group.md | 20 ++++ .../src/components/Comps/TFormGroup.vue | 56 +++++++++++ .../src/components/BFormGroup/BFormGroup.vue | 10 +- .../components/BFormGroup/form-group.spec.ts | 96 +++++++++++++++++++ .../src/types/ComponentProps.ts | 2 + 8 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 apps/docs/src/docs/components/demo/FormGroupWrapperAttrsBasic.vue create mode 100644 apps/docs/src/docs/components/demo/FormGroupWrapperAttrsCustom.vue diff --git a/apps/docs/src/data/components/formGroup.data.ts b/apps/docs/src/data/components/formGroup.data.ts index f4a54335e..b461f371d 100644 --- a/apps/docs/src/data/components/formGroup.data.ts +++ b/apps/docs/src/data/components/formGroup.data.ts @@ -41,6 +41,12 @@ export default { default: 'undefined', description: "Number of columns for the content width 'xl' screens and up", }, + contentWrapperAttrs: { + type: 'Readonly', + default: 'undefined', + description: + 'Additional attributes to apply to the content column wrapper in horizontal layout mode. Useful for adding custom classes or styles to control the width/layout of the content column. Only applies when using label-cols or content-cols props', + }, description: { type: 'string', default: 'undefined', @@ -139,6 +145,12 @@ export default { description: 'Visually hides the label content, but makes it available to screen reader users', }, + labelWrapperAttrs: { + type: 'Readonly', + default: 'undefined', + description: + 'Additional attributes to apply to the label column wrapper in horizontal layout mode. Useful for adding custom classes or styles to override the default column width set by label-cols. Only applies when using label-cols or content-cols props', + }, validFeedback: { type: 'string', default: 'undefined', diff --git a/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsBasic.vue b/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsBasic.vue new file mode 100644 index 000000000..1a0482bed --- /dev/null +++ b/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsBasic.vue @@ -0,0 +1,15 @@ + diff --git a/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsCustom.vue b/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsCustom.vue new file mode 100644 index 000000000..248a59ca0 --- /dev/null +++ b/apps/docs/src/docs/components/demo/FormGroupWrapperAttrsCustom.vue @@ -0,0 +1,25 @@ + + + diff --git a/apps/docs/src/docs/components/form-group.md b/apps/docs/src/docs/components/form-group.md index d35286bcf..f2749179a 100644 --- a/apps/docs/src/docs/components/form-group.md +++ b/apps/docs/src/docs/components/form-group.md @@ -91,6 +91,26 @@ value via the prop `label-text-align` and/or `label-align-{breakpoint}`. Alignment has no effect if the `label-visually-hidden` prop is set. +### Customizing wrapper elements in horizontal layout + +When using horizontal layout (with `label-cols` or `content-cols` props), the label and content are wrapped in column elements. You can apply additional attributes, classes, or styles to these wrapper elements using the `label-wrapper-attrs` and `content-wrapper-attrs` props. + +This is particularly useful when you need to override the default column widths with custom sizing: + +<<< DEMO ./demo/FormGroupWrapperAttrsBasic.vue#template{vue-html} + +**Important Notes:** + +- These props **only apply in horizontal layout mode** (when `label-cols` or `content-cols` is set) +- `label-wrapper-attrs` applies to the column wrapper around the label element +- `content-wrapper-attrs` applies to the column wrapper around the content/input +- Use `label-class` if you need to style the `