diff --git a/core/src/components.d.ts b/core/src/components.d.ts index c17d097daf4..c9cb5d4fefe 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1139,6 +1139,9 @@ export namespace Components { */ "loadingText"?: string | IonicSafeString; } + /** + * @experimental The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. + */ interface IonInput { /** * This attribute is ignored. @@ -1214,7 +1217,7 @@ export namespace Components { */ "inputmode"?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; /** - * The visible label associated with the input. + * The visible label associated with the input. Use this if you need to render a plaintext label. The `label` property will take priority over the `label` slot if both are used. */ "label"?: string; /** @@ -3591,6 +3594,9 @@ declare global { prototype: HTMLIonInfiniteScrollContentElement; new (): HTMLIonInfiniteScrollContentElement; }; + /** + * @experimental The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. + */ interface HTMLIonInputElement extends Components.IonInput, HTMLStencilElement { } var HTMLIonInputElement: { @@ -5177,6 +5183,9 @@ declare namespace LocalJSX { */ "loadingText"?: string | IonicSafeString; } + /** + * @experimental The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. + */ interface IonInput { /** * This attribute is ignored. @@ -5248,7 +5257,7 @@ declare namespace LocalJSX { */ "inputmode"?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; /** - * The visible label associated with the input. + * The visible label associated with the input. Use this if you need to render a plaintext label. The `label` property will take priority over the `label` slot if both are used. */ "label"?: string; /** @@ -7478,6 +7487,9 @@ declare module "@stencil/core" { "ion-img": LocalJSX.IonImg & JSXBase.HTMLAttributes; "ion-infinite-scroll": LocalJSX.IonInfiniteScroll & JSXBase.HTMLAttributes; "ion-infinite-scroll-content": LocalJSX.IonInfiniteScrollContent & JSXBase.HTMLAttributes; + /** + * @experimental The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. + */ "ion-input": LocalJSX.IonInput & JSXBase.HTMLAttributes; "ion-item": LocalJSX.IonItem & JSXBase.HTMLAttributes; "ion-item-divider": LocalJSX.IonItemDivider & JSXBase.HTMLAttributes; diff --git a/core/src/components/input/input.scss b/core/src/components/input/input.scss index ab0cf76b37c..ba8b00312f9 100644 --- a/core/src/components/input/input.scss +++ b/core/src/components/input/input.scss @@ -463,7 +463,8 @@ * works on block-level elements. A flex item is * considered blockified (https://www.w3.org/TR/css-display-3/#blockify). */ -.label-text { +.label-text, +::slotted([slot="label"]) { text-overflow: ellipsis; white-space: nowrap; @@ -471,6 +472,15 @@ overflow: hidden; } +/** + * If no label text is placed into the slot + * then the element should be hidden otherwise + * there will be additional margins added. + */ +.label-text-wrapper-hidden { + display: none; +} + .input-wrapper input { /** * When the floating label appears on top of the diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index e76bf1dafc6..7ec546ed9eb 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -16,6 +16,8 @@ import { getCounterText } from './input.utils'; /** * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. + * + * @slot label - @experimental The label text to associate with the input. Use the `labelPlacement` property to control where the label is placed relative to the input. Use this if you need to render a label with custom HTML. */ @Component({ tag: 'ion-input', @@ -165,6 +167,10 @@ export class Input implements ComponentInterface { /** * The visible label associated with the input. + * + * Use this if you need to render a plaintext label. + * + * The `label` property will take priority over the `label` slot if both are used. */ @Prop() label?: string; @@ -578,17 +584,37 @@ export class Input implements ComponentInterface { private renderLabel() { const { label } = this; - if (label === undefined) { - return; - } return ( -
-
{this.label}
+
+ {label === undefined ? :
{label}
}
); } + /** + * Gets any content passed into the `label` slot, + * not the definition. + */ + private get labelSlot() { + return this.el.querySelector('[slot="label"]'); + } + + /** + * Returns `true` if label content is provided + * either by a prop or a content. If you want + * to get the plaintext value of the label use + * the `labelText` getter instead. + */ + private get hasLabel() { + return this.label !== undefined || this.labelSlot !== null; + } + /** * Renders the border container * when fill="outline". diff --git a/core/src/components/input/test/a11y/index.html b/core/src/components/input/test/a11y/index.html index 7ee00c06a23..acbcdaa333e 100644 --- a/core/src/components/input/test/a11y/index.html +++ b/core/src/components/input/test/a11y/index.html @@ -15,6 +15,7 @@

Input - a11y

+
Slotted Label




diff --git a/core/src/components/input/test/input.spec.ts b/core/src/components/input/test/input.spec.ts index 599c305aec6..add4cf2e367 100644 --- a/core/src/components/input/test/input.spec.ts +++ b/core/src/components/input/test/input.spec.ts @@ -44,3 +44,57 @@ describe('input: rendering', () => { expect(bottomContent).toBe(null); }); }); + +/** + * Input uses emulated slots, so the internal + * behavior will not exactly match IonSelect's slots. + * For example, Input does not render an actual `` element + * internally, so we do not check for that here. Instead, + * we check to see which label text is being used. + * If Input is updated to use Shadow DOM (and therefore native slots), + * then we can update these tests to more closely match the Select tests. + **/ +describe('input: label rendering', () => { + it('should render label prop if only prop provided', async () => { + const page = await newSpecPage({ + components: [Input], + html: ` + + `, + }); + + const input = page.body.querySelector('ion-input'); + + const labelText = input.querySelector('.label-text-wrapper'); + + expect(labelText.textContent).toBe('Label Prop Text'); + }); + it('should render label slot if only slot provided', async () => { + const page = await newSpecPage({ + components: [Input], + html: ` +
Label Prop Slot
+ `, + }); + + const input = page.body.querySelector('ion-input'); + + const labelText = input.querySelector('.label-text-wrapper'); + + expect(labelText.textContent).toBe('Label Prop Slot'); + }); + it('should render label prop if both prop and slot provided', async () => { + const page = await newSpecPage({ + components: [Input], + html: ` +
Label Prop Slot
+ `, + }); + + const input = page.body.querySelector('ion-input'); + + const labelText = input.querySelector('.label-text-wrapper'); + + expect(labelText.textContent).toBe('Label Prop Text'); + }); +}); diff --git a/core/src/components/input/test/label-placement/input.e2e.ts b/core/src/components/input/test/label-placement/input.e2e.ts index eb0698fbf76..ac1666467fd 100644 --- a/core/src/components/input/test/label-placement/input.e2e.ts +++ b/core/src/components/input/test/label-placement/input.e2e.ts @@ -14,17 +14,6 @@ configs().forEach(({ title, screenshot, config }) => { const input = page.locator('ion-input'); expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-placement-start`)); }); - - test('long label should truncate', async ({ page }) => { - await page.setContent( - ` - - `, - config - ); - const input = page.locator('ion-input'); - expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-placement-start-long-label`)); - }); }); test.describe(title('input: label placement end'), () => { test('label should appear on the ending side of the input', async ({ page }) => { @@ -38,16 +27,6 @@ configs().forEach(({ title, screenshot, config }) => { const input = page.locator('ion-input'); expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-placement-end`)); }); - test('long label should truncate', async ({ page }) => { - await page.setContent( - ` - - `, - config - ); - const input = page.locator('ion-input'); - expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-placement-end-long-label`)); - }); }); test.describe(title('input: label placement fixed'), () => { test('label should appear on the starting side of the input, have a fixed width, and show ellipses', async ({ @@ -179,3 +158,32 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { }); }); }); + +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('input: label overflow'), () => { + test('label property should be truncated with ellipses', async ({ page }) => { + await page.setContent( + ` + + `, + config + ); + + const input = page.locator('ion-input'); + expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-label-truncate`)); + }); + test('label slot should be truncated with ellipses', async ({ page }) => { + await page.setContent( + ` + +
Label Label Label Label Label
+
+ `, + config + ); + + const input = page.locator('ion-input'); + expect(await input.screenshot()).toMatchSnapshot(screenshot(`input-label-slot-truncate`)); + }); + }); +}); diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..8bd05c624cc Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..259c9dbf1be Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..c3b05b1c432 Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-slot-truncate-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..8bd05c624cc Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..259c9dbf1be Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..c3b05b1c432 Binary files /dev/null and b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-label-truncate-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index a7064b4b67e..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index cfcd07def9b..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Safari-linux.png deleted file mode 100644 index c3f0abd6d2a..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 2206d9a29de..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index bf6ddfda913..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 7b49bc8636a..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-ios-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index dcc1b0b2774..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 207166e210a..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 20a296d3843..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 66dfa2779e5..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 9f7abb1af0c..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 40759ce6dff..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-end-long-label-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index b9e6710357b..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 25559e0adf4..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 7f7ec936424..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 1ef2c02d09b..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index c1c0ff42916..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Safari-linux.png deleted file mode 100644 index df285daf58c..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-ios-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 3e0f6ffaca2..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 423c15b6d6c..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 5313e7f9708..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 20f80eb91e8..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 5936a4c5b3d..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index e8c47288c9d..00000000000 Binary files a/core/src/components/input/test/label-placement/input.e2e.ts-snapshots/input-placement-start-long-label-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/input/test/slot/index.html b/core/src/components/input/test/slot/index.html new file mode 100644 index 00000000000..81d724ebe54 --- /dev/null +++ b/core/src/components/input/test/slot/index.html @@ -0,0 +1,98 @@ + + + + + Input - Slot + + + + + + + + + + + + + + Input - Slot + + + + +
+
+

No Fill / Start

+ +
Email *
+
+
+ +
+

Solid / Start

+ +
Email *
+
+
+ +
+

Outline / Start

+ +
Email *
+
+
+ +
+

No Fill / Floating

+ +
Email *
+
+
+ +
+

Solid / Floating

+ +
Email *
+
+
+ +
+

Outline / Floating

+ +
Email *
+
+
+
+
+
+ + diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index 1fb799146fa..39831d66329 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -33,7 +33,7 @@ import type { SelectChangeEventDetail, SelectInterface, SelectCompareFn } from ' /** * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. * - * @slot label - The label text to associate with the select. Use the "labelPlacement" property to control where the label is placed relative to the select. Use this if you need to render a label with custom HTML. + * @slot label - The label text to associate with the select. Use the `labelPlacement` property to control where the label is placed relative to the select. Use this if you need to render a label with custom HTML. * * @part placeholder - The text displayed in the select when there is no value. * @part text - The displayed value of the select.