From b474ff13da8042172ffa64876f4a5fe8ef23240e Mon Sep 17 00:00:00 2001 From: Lorenz van Herwaarden Date: Tue, 13 May 2025 15:46:22 +0200 Subject: [PATCH 1/7] feat(GlFormCheckbox): remove BFormCheckbox from GlFormCheckbox Part of a larger migration to remove Bootstrap Vue from GitLab UI BREAKING CHANGE: support for the following props have been dropped: - autofocus - button - button-variant - form - switch - inline - plain - size --- .../base/form/form_checkbox/form_checkbox.md | 177 +++++++- .../form/form_checkbox/form_checkbox.spec.js | 420 +++++++++++++++++- .../form_checkbox/form_checkbox.stories.js | 5 +- .../base/form/form_checkbox/form_checkbox.vue | 304 +++++++++++-- 4 files changed, 867 insertions(+), 39 deletions(-) diff --git a/src/components/base/form/form_checkbox/form_checkbox.md b/src/components/base/form/form_checkbox/form_checkbox.md index 05fab87270..cc710b2776 100644 --- a/src/components/base/form/form_checkbox/form_checkbox.md +++ b/src/components/base/form/form_checkbox/form_checkbox.md @@ -1,6 +1,181 @@ -Form checkbox groups for general use inside forms. +`` and `` implement custom checkbox inputs that ensure +consistent appearance across all browsers while maintaining the semantic structure and +accessibility of native elements, making them robust replacements for default browser checkboxes. ## Stacked By default, the GitLab Design guide mandates the `` be `stacked` and is non-changeable at this time. + +## Checkbox group options array + +`options` can be an array of strings or objects. Available fields: + +- `value` The selected value which will be set on `v-model` +- `disabled` Disables item for selection +- `text` Display text, or `html` Display basic inline html + +`value` can be a string, number, or simple object. Avoid using complex types in values. + +If both `html` and `text` are provided, `html` will take precedence. Only basic/native HTML is +supported in the `html` field (components will not work). Note that not all browsers will render +inline html (i.e. ``, ``, etc.) inside `