diff --git a/core/api.txt b/core/api.txt index 14736c3556d..70cd499a604 100644 --- a/core/api.txt +++ b/core/api.txt @@ -398,6 +398,8 @@ ion-checkbox,prop,alignment,"center" | "start" | undefined,undefined,false,false ion-checkbox,prop,checked,boolean,false,false,false ion-checkbox,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,undefined,false,true ion-checkbox,prop,disabled,boolean,false,false,false +ion-checkbox,prop,errorText,string | undefined,undefined,false,false +ion-checkbox,prop,helperText,string | undefined,undefined,false,false ion-checkbox,prop,indeterminate,boolean,false,false,false ion-checkbox,prop,justify,"end" | "space-between" | "start" | undefined,undefined,false,false ion-checkbox,prop,labelPlacement,"end" | "fixed" | "stacked" | "start",'start',false,false @@ -431,8 +433,11 @@ ion-checkbox,css-prop,--size,md ion-checkbox,css-prop,--transition,ios ion-checkbox,css-prop,--transition,md ion-checkbox,part,container +ion-checkbox,part,error-text +ion-checkbox,part,helper-text ion-checkbox,part,label ion-checkbox,part,mark +ion-checkbox,part,supporting-text ion-chip,shadow ion-chip,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,undefined,false,true diff --git a/core/src/components.d.ts b/core/src/components.d.ts index bbb1d3937ce..bd7426116f1 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -623,6 +623,14 @@ export namespace Components { * If `true`, the user cannot interact with the checkbox. */ "disabled": boolean; + /** + * Text that is placed under the checkbox label and displayed when an error is detected. + */ + "errorText"?: string; + /** + * Text that is placed under the checkbox label and displayed when no error is detected. + */ + "helperText"?: string; /** * If `true`, the checkbox will visually appear as indeterminate. */ @@ -5419,6 +5427,14 @@ declare namespace LocalJSX { * If `true`, the user cannot interact with the checkbox. */ "disabled"?: boolean; + /** + * Text that is placed under the checkbox label and displayed when an error is detected. + */ + "errorText"?: string; + /** + * Text that is placed under the checkbox label and displayed when no error is detected. + */ + "helperText"?: string; /** * If `true`, the checkbox will visually appear as indeterminate. */ diff --git a/core/src/components/checkbox/checkbox.scss b/core/src/components/checkbox/checkbox.scss index ccfe42c863c..9cb35cca8f5 100644 --- a/core/src/components/checkbox/checkbox.scss +++ b/core/src/components/checkbox/checkbox.scss @@ -148,46 +148,53 @@ input { opacity: 0; } -// Justify Content -// --------------------------------------------- +// Checkbox Bottom Content +// ---------------------------------------------------------------- + +.checkbox-bottom { + @include padding(4px, null, null, null); + + display: flex; -:host(.checkbox-justify-space-between) .checkbox-wrapper { justify-content: space-between; -} -:host(.checkbox-justify-start) .checkbox-wrapper { - justify-content: start; + font-size: dynamic-font(12px); + + white-space: normal; } -:host(.checkbox-justify-end) .checkbox-wrapper { - justify-content: end; +:host(.checkbox-label-placement-stacked) .checkbox-bottom { + font-size: dynamic-font(16px); } -// Align Items -// --------------------------------------------- +// Checkbox Hint Text +// ---------------------------------------------------------------- -:host(.checkbox-alignment-start) .checkbox-wrapper { - align-items: start; -} +/** + * Error text should only be shown when .ion-invalid is + * present on the checkbox. Otherwise the helper text should + * be shown. + */ +.checkbox-bottom .error-text { + display: none; -:host(.checkbox-alignment-center) .checkbox-wrapper { - align-items: center; + color: ion-color(danger, base); } -// Justify Content & Align Items -// --------------------------------------------- +.checkbox-bottom .helper-text { + display: block; -// The checkbox should be displayed as block when either justify -// or alignment is set; otherwise, these properties will have no -// visible effect. -:host(.checkbox-justify-space-between), -:host(.checkbox-justify-start), -:host(.checkbox-justify-end), -:host(.checkbox-alignment-start), -:host(.checkbox-alignment-center) { + color: $text-color-step-300; +} + +:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text { display: block; } +:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text { + display: none; +} + // Label Placement - Start // ---------------------------------------------------------------- @@ -217,6 +224,8 @@ input { */ :host(.checkbox-label-placement-end) .checkbox-wrapper { flex-direction: row-reverse; + + justify-content: start; } /** @@ -260,6 +269,8 @@ input { */ :host(.checkbox-label-placement-stacked) .checkbox-wrapper { flex-direction: column; + + text-align: center; } :host(.checkbox-label-placement-stacked) .label-text-wrapper { @@ -287,6 +298,46 @@ input { @include transform-origin(center, top); } +// Justify Content +// --------------------------------------------- + +:host(.checkbox-justify-space-between) .checkbox-wrapper { + justify-content: space-between; +} + +:host(.checkbox-justify-start) .checkbox-wrapper { + justify-content: start; +} + +:host(.checkbox-justify-end) .checkbox-wrapper { + justify-content: end; +} + +// Align Items +// --------------------------------------------- + +:host(.checkbox-alignment-start) .checkbox-wrapper { + align-items: start; +} + +:host(.checkbox-alignment-center) .checkbox-wrapper { + align-items: center; +} + +// Justify Content & Align Items +// --------------------------------------------- + +// The checkbox should be displayed as block when either justify +// or alignment is set; otherwise, these properties will have no +// visible effect. +:host(.checkbox-justify-space-between), +:host(.checkbox-justify-start), +:host(.checkbox-justify-end), +:host(.checkbox-alignment-start), +:host(.checkbox-alignment-center) { + display: block; +} + // Checked / Indeterminate Checkbox // --------------------------------------------- diff --git a/core/src/components/checkbox/checkbox.tsx b/core/src/components/checkbox/checkbox.tsx index 2e05e366f70..2dbfbedbd1f 100644 --- a/core/src/components/checkbox/checkbox.tsx +++ b/core/src/components/checkbox/checkbox.tsx @@ -17,6 +17,9 @@ import type { CheckboxChangeEventDetail } from './checkbox-interface'; * @part container - The container for the checkbox mark. * @part label - The label text describing the checkbox. * @part mark - The checkmark used to indicate the checked state. + * @part supporting-text - Supporting text displayed beneath the checkbox label. + * @part helper-text - Supporting text displayed beneath the checkbox label when the checkbox is valid. + * @part error-text - Supporting text displayed beneath the checkbox label when the checkbox is invalid and touched. */ @Component({ tag: 'ion-checkbox', @@ -28,6 +31,8 @@ import type { CheckboxChangeEventDetail } from './checkbox-interface'; }) export class Checkbox implements ComponentInterface { private inputId = `ion-cb-${checkboxIds++}`; + private helperTextId = `${this.inputId}-helper-text`; + private errorTextId = `${this.inputId}-error-text`; private focusEl?: HTMLElement; private inheritedAttributes: Attributes = {}; @@ -60,6 +65,16 @@ export class Checkbox implements ComponentInterface { */ @Prop() disabled = false; + /** + * Text that is placed under the checkbox label and displayed when an error is detected. + */ + @Prop() errorText?: string; + + /** + * Text that is placed under the checkbox label and displayed when no error is detected. + */ + @Prop() helperText?: string; + /** * The value of the checkbox does not mean if it's checked or not, use the `checked` * property for that. @@ -174,6 +189,48 @@ export class Checkbox implements ComponentInterface { this.toggleChecked(ev); }; + private getHintTextID(): string | undefined { + const { el, helperText, errorText, helperTextId, errorTextId } = this; + + if (el.classList.contains('ion-touched') && el.classList.contains('ion-invalid') && errorText) { + return errorTextId; + } + + if (helperText) { + return helperTextId; + } + + return undefined; + } + + /** + * Responsible for rendering helper text and error text. + * This element should only be rendered if hint text is set. + */ + private renderHintText() { + const { helperText, errorText, helperTextId, errorTextId } = this; + + /** + * undefined and empty string values should + * be treated as not having helper/error text. + */ + const hasHintText = !!helperText || !!errorText; + if (!hasHintText) { + return; + } + + return ( +
+
+ {helperText} +
+
+ {errorText} +
+
+ ); + } + render() { const { color, @@ -199,6 +256,8 @@ export class Checkbox implements ComponentInterface { return ( + {this.renderHintText()}
diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts new file mode 100644 index 00000000000..96d31c07379 --- /dev/null +++ b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts @@ -0,0 +1,207 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * Functionality is the same across modes & directions + */ +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('checkbox: bottom content functionality'), () => { + test('should not render bottom content if no hint is enabled', async ({ page }) => { + await page.setContent(`Label`, config); + + const bottomEl = page.locator('ion-checkbox .checkbox-bottom'); + await expect(bottomEl).toHaveCount(0); + }); + test('helper text should be visible initially', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const helperText = page.locator('ion-checkbox .helper-text'); + const errorText = page.locator('ion-checkbox .error-text'); + await expect(helperText).toBeVisible(); + await expect(helperText).toHaveText('Helper text'); + await expect(errorText).toBeHidden(); + }); + test('checkbox should have an aria-describedby attribute when helper text is present', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const checkbox = page.locator('ion-checkbox'); + const helperText = page.locator('ion-checkbox .helper-text'); + const helperTextId = await helperText.getAttribute('id'); + const ariaDescribedBy = await checkbox.getAttribute('aria-describedby'); + + expect(ariaDescribedBy).toBe(helperTextId); + }); + test('error text should be visible when checkbox is invalid', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const helperText = page.locator('ion-checkbox .helper-text'); + const errorText = page.locator('ion-checkbox .error-text'); + await expect(helperText).toBeHidden(); + await expect(errorText).toBeVisible(); + await expect(errorText).toHaveText('Error text'); + }); + + test('checkbox should have an aria-describedby attribute when error text is present', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const checkbox = page.locator('ion-checkbox'); + const errorText = page.locator('ion-checkbox .error-text'); + const errorTextId = await errorText.getAttribute('id'); + const ariaDescribedBy = await checkbox.getAttribute('aria-describedby'); + + expect(ariaDescribedBy).toBe(errorTextId); + }); + test('checkbox should have aria-invalid attribute when checkbox is invalid', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const checkbox = page.locator('ion-checkbox'); + + await expect(checkbox).toHaveAttribute('aria-invalid'); + }); + test('checkbox should not have aria-invalid attribute when checkbox is valid', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const checkbox = page.locator('ion-checkbox'); + + await expect(checkbox).not.toHaveAttribute('aria-invalid'); + }); + test('checkbox should not have aria-describedby attribute when no hint or error text is present', async ({ + page, + }) => { + await page.setContent(`Label`, config); + + const checkbox = page.locator('ion-checkbox'); + + await expect(checkbox).not.toHaveAttribute('aria-describedby'); + }); + }); +}); + +/** + * Rendering is different across modes + */ +configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('checkbox: helper text rendering'), () => { + // Check the default label placement, end, and stacked + [undefined, 'end', 'stacked'].forEach((labelPlacement) => { + test(`${ + labelPlacement ? `${labelPlacement} label - ` : '' + }should not have visual regressions when rendering helper text`, async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const bottomEl = page.locator('ion-checkbox'); + await expect(bottomEl).toHaveScreenshot( + screenshot(`checkbox-helper-text${labelPlacement ? `-${labelPlacement}` : ''}`) + ); + }); + + test(`${ + labelPlacement ? `${labelPlacement} label - ` : '' + }should not have visual regressions when rendering helper text with wrapping text`, async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const bottomEl = page.locator('ion-checkbox'); + await expect(bottomEl).toHaveScreenshot( + screenshot(`checkbox-helper-text${labelPlacement ? `-${labelPlacement}` : ''}-wrapping`) + ); + }); + }); + }); + + test.describe(title('checkbox: error text rendering'), () => { + test('should not have visual regressions when rendering error text', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const bottomEl = page.locator('ion-checkbox'); + await expect(bottomEl).toHaveScreenshot(screenshot(`checkbox-error-text`)); + }); + test('should not have visual regressions when rendering error text with a stacked label', async ({ page }) => { + await page.setContent( + `Label`, + config + ); + + const bottomEl = page.locator('ion-checkbox'); + await expect(bottomEl).toHaveScreenshot(screenshot(`checkbox-error-text-stacked-label`)); + }); + }); +}); + +/** + * Customizing supporting text is the same across modes and directions + */ +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('checkbox: supporting text customization'), () => { + test('should not have visual regressions when rendering helper text with custom css', async ({ page }) => { + await page.setContent( + ` + + Label + `, + config + ); + + const helperText = page.locator('ion-checkbox'); + await expect(helperText).toHaveScreenshot(screenshot(`checkbox-helper-text-custom-css`)); + }); + test('should not have visual regressions when rendering error text with custom css', async ({ page }) => { + await page.setContent( + ` + + Label + `, + config + ); + + const errorText = page.locator('ion-checkbox'); + await expect(errorText).toHaveScreenshot(screenshot(`checkbox-error-text-custom-css`)); + }); + }); +}); diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..c4613c5094d Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..297c618d920 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..7eb4b452fdc Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-custom-css-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..6b67bd71e2e Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..4baaabab3e9 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..7138a638d6f Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..189ed070857 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..4515126b949 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..08e183b7eb9 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..9d10762fa3b Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..dec9250c822 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..534d1150489 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..4b8b0e627ae Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..9dd773c24ad Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..c6fd7561986 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-error-text-stacked-label-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..c5be4a1aa25 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..0043a255d17 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..db40ca48ea8 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-custom-css-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..cb2c2524b97 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..8fe5868a7bd Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..843a661807d Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..258522da373 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..b0146de1296 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..f2ac14f541a Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..49554b31b19 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..7d7d4058cb6 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..2df6aaa3a49 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..72004aa9cf3 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..82140a4ed2b Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..828a01090bb Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-end-wrapping-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..90e1406199b Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..98b732c74ce Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..63e8bdd2251 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..f932f8c8567 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..6c4389a97aa Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..fe95a160b6a Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..dc4a62aeb8b Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..3d61995043e Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..ad4b90d03d0 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..d8f984d10f8 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..5eed0aca4d0 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..a97762674ab Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..b558c91d63e Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..39a88efe767 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..f03d8bc3448 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..172d3482557 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..977dcd81dec Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..16568fff70e Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-stacked-wrapping-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..c920f97f2e8 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..496a4db2565 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..4f3892df6b0 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..9b0523a0901 Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..75786640c6f Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..06d17629ffb Binary files /dev/null and b/core/src/components/checkbox/test/bottom-content/checkbox.e2e.ts-snapshots/checkbox-helper-text-wrapping-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/bottom-content/index.html b/core/src/components/checkbox/test/bottom-content/index.html new file mode 100644 index 00000000000..9ae90f5ef83 --- /dev/null +++ b/core/src/components/checkbox/test/bottom-content/index.html @@ -0,0 +1,134 @@ + + + + + Checkbox - Bottom Content + + + + + + + + + + + + + + Checkbox - Bottom Content + + + + +
+
+

No Hint

+ Label +
+ +
+

No Hint: Stacked

+ Label +
+ +
+

Helper Text: Label Start

+ Label +
+ +
+

Helper Text: Label End

+ Label +
+ +
+

Helper Text: Label Stacked

+ Label +
+ +
+

Helper Text: Label Fixed

+ Label +
+ +
+

Error Text: Label Start

+ Label +
+ +
+

Error Text: Label End

+ Label +
+ +
+

Error Text: Label Stacked

+ Label +
+ +
+

Error Text: Label Fixed

+ Label +
+
+ + + + +
+
+ + diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts b/core/src/components/checkbox/test/item/checkbox.e2e.ts index 5f9f78ab8b5..bdcf1892da2 100644 --- a/core/src/components/checkbox/test/item/checkbox.e2e.ts +++ b/core/src/components/checkbox/test/item/checkbox.e2e.ts @@ -53,7 +53,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { test.describe(title('checkbox: long label in item'), () => { - test('should render margins correctly when using long label in item', async ({ page }) => { + test('should not have visual regressions when using long label in item', async ({ page }) => { await page.setContent( ` @@ -69,7 +69,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { const list = page.locator('ion-list'); await expect(list).toHaveScreenshot(screenshot(`checkbox-long-label-in-item`)); }); - test('should render margins correctly when using long label in item with start alignment', async ({ + test('should not have visual regressions when using long label in item with start alignment', async ({ page, }, testInfo) => { testInfo.annotations.push({ @@ -93,8 +93,25 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { }); }); + test.describe(title('checkbox: end label in item'), () => { + test('should not have visual regressions when using end label in item', async ({ page }) => { + await page.setContent( + ` + + + Enable Notifications + + + `, + config + ); + const list = page.locator('ion-list'); + await expect(list).toHaveScreenshot(screenshot(`checkbox-end-label-in-item`)); + }); + }); + test.describe(title('checkbox: stacked label in item'), () => { - test('should render margins correctly when using stacked label in item', async ({ page }) => { + test('should not have visual regressions when using stacked label in item', async ({ page }) => { await page.setContent( ` diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..c11295cded2 Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..edde2d41f01 Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..5e4e5b09148 Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Chrome-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..e1c479c87bb Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Firefox-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..66aaf985533 Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Safari-linux.png b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..bc07709caa5 Binary files /dev/null and b/core/src/components/checkbox/test/item/checkbox.e2e.ts-snapshots/checkbox-end-label-in-item-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/checkbox/test/item/index.html b/core/src/components/checkbox/test/item/index.html index 43d2cd640d3..b2fa0bdccd1 100644 --- a/core/src/components/checkbox/test/item/index.html +++ b/core/src/components/checkbox/test/item/index.html @@ -49,6 +49,15 @@

Placement Start

+
+

Default Justify

+ + + Enable Notifications + + +
+

Justify Start

@@ -79,6 +88,15 @@

Justify Space Between

Placement End

+
+

Default Justify

+ + + Enable Notifications + + +
+

Justify Start

@@ -109,6 +127,15 @@

Justify Space Between

Placement Fixed

+
+

Default Justify

+ + + Enable Notifications + + +
+

Justify Start

@@ -139,6 +166,15 @@

Justify Space Between

Placement Stacked

+
+

Default Align

+ + + Enable Notifications + + +
+

Align Start

@@ -190,6 +226,24 @@

Multiline Label

+
+ + + + Enable Notifications Enable Notifications Enable Notifications + + + +
+
+ + + + Enable Notifications Enable Notifications Enable Notifications + + + +
diff --git a/packages/angular/src/directives/proxies.ts b/packages/angular/src/directives/proxies.ts index 9d6d23b5c17..69c2f742454 100644 --- a/packages/angular/src/directives/proxies.ts +++ b/packages/angular/src/directives/proxies.ts @@ -507,14 +507,14 @@ export declare interface IonCardTitle extends Components.IonCardTitle {} @ProxyCmp({ - inputs: ['alignment', 'checked', 'color', 'disabled', 'indeterminate', 'justify', 'labelPlacement', 'mode', 'name', 'required', 'value'] + inputs: ['alignment', 'checked', 'color', 'disabled', 'errorText', 'helperText', 'indeterminate', 'justify', 'labelPlacement', 'mode', 'name', 'required', 'value'] }) @Component({ selector: 'ion-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['alignment', 'checked', 'color', 'disabled', 'indeterminate', 'justify', 'labelPlacement', 'mode', 'name', 'required', 'value'], + inputs: ['alignment', 'checked', 'color', 'disabled', 'errorText', 'helperText', 'indeterminate', 'justify', 'labelPlacement', 'mode', 'name', 'required', 'value'], }) export class IonCheckbox { protected el: HTMLIonCheckboxElement; diff --git a/packages/angular/standalone/src/directives/checkbox.ts b/packages/angular/standalone/src/directives/checkbox.ts index c1259d10800..72e55ac0c6f 100644 --- a/packages/angular/standalone/src/directives/checkbox.ts +++ b/packages/angular/standalone/src/directives/checkbox.ts @@ -20,6 +20,8 @@ const CHECKBOX_INPUTS = [ 'checked', 'color', 'disabled', + 'errorText', + 'helperText', 'indeterminate', 'justify', 'labelPlacement', diff --git a/packages/vue/src/proxies.ts b/packages/vue/src/proxies.ts index a866edde10a..79a0953d053 100644 --- a/packages/vue/src/proxies.ts +++ b/packages/vue/src/proxies.ts @@ -231,6 +231,8 @@ export const IonCheckbox = /*@__PURE__*/ defineContainer