merge feature-7.2

Feature 7.2
This commit is contained in:
Liam DeBeasi
2023-07-19 14:24:54 -04:00
committed by GitHub
196 changed files with 915 additions and 232 deletions

View File

@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [7.2.0](https://github.com/ionic-team/ionic-framework/compare/v7.1.4...v7.2.0) (2023-07-19)
### Features
* **angular:** support binding routing data to component inputs ([#27694](https://github.com/ionic-team/ionic-framework/issues/27694)) ([90f4124](https://github.com/ionic-team/ionic-framework/commit/90f41243d9404caaad99076965b7cd649ddf7f33)), closes [#27476](https://github.com/ionic-team/ionic-framework/issues/27476)
* **button:** allow button to increase in height when text wraps ([#27547](https://github.com/ionic-team/ionic-framework/issues/27547)) ([6fe716f](https://github.com/ionic-team/ionic-framework/commit/6fe716fd1320935632854e5d4f741b57801bda92))
* **searchbar:** add name property ([#27737](https://github.com/ionic-team/ionic-framework/issues/27737)) ([7131037](https://github.com/ionic-team/ionic-framework/commit/71310372c94862342d607007ece127340df92a8c)), closes [#27675](https://github.com/ionic-team/ionic-framework/issues/27675)
## [7.1.4](https://github.com/ionic-team/ionic-framework/compare/v7.1.3...v7.1.4) (2023-07-19) ## [7.1.4](https://github.com/ionic-team/ionic-framework/compare/v7.1.3...v7.1.4) (2023-07-19)

View File

@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [7.2.0](https://github.com/ionic-team/ionic-framework/compare/v7.1.4...v7.2.0) (2023-07-19)
### Features
* **button:** allow button to increase in height when text wraps ([#27547](https://github.com/ionic-team/ionic-framework/issues/27547)) ([6fe716f](https://github.com/ionic-team/ionic-framework/commit/6fe716fd1320935632854e5d4f741b57801bda92))
* **searchbar:** add name property ([#27737](https://github.com/ionic-team/ionic-framework/issues/27737)) ([7131037](https://github.com/ionic-team/ionic-framework/commit/71310372c94862342d607007ece127340df92a8c)), closes [#27675](https://github.com/ionic-team/ionic-framework/issues/27675)
## [7.1.4](https://github.com/ionic-team/ionic-framework/compare/v7.1.3...v7.1.4) (2023-07-19) ## [7.1.4](https://github.com/ionic-team/ionic-framework/compare/v7.1.3...v7.1.4) (2023-07-19)

View File

@ -1157,6 +1157,7 @@ ion-searchbar,prop,disabled,boolean,false,false,false
ion-searchbar,prop,enterkeyhint,"done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined,undefined,false,false ion-searchbar,prop,enterkeyhint,"done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined,undefined,false,false
ion-searchbar,prop,inputmode,"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefined,undefined,false,false ion-searchbar,prop,inputmode,"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefined,undefined,false,false
ion-searchbar,prop,mode,"ios" | "md",undefined,false,false ion-searchbar,prop,mode,"ios" | "md",undefined,false,false
ion-searchbar,prop,name,string,this.inputId,false,false
ion-searchbar,prop,placeholder,string,'Search',false,false ion-searchbar,prop,placeholder,string,'Search',false,false
ion-searchbar,prop,searchIcon,string | undefined,undefined,false,false ion-searchbar,prop,searchIcon,string | undefined,undefined,false,false
ion-searchbar,prop,showCancelButton,"always" | "focus" | "never",'never',false,false ion-searchbar,prop,showCancelButton,"always" | "focus" | "never",'never',false,false

View File

@ -1,12 +1,12 @@
{ {
"name": "@ionic/core", "name": "@ionic/core",
"version": "7.1.4", "version": "7.2.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@ionic/core", "name": "@ionic/core",
"version": "7.1.4", "version": "7.2.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@stencil/core": "^3.4.0", "@stencil/core": "^3.4.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@ionic/core", "name": "@ionic/core",
"version": "7.1.4", "version": "7.2.0",
"description": "Base components for Ionic", "description": "Base components for Ionic",
"keywords": [ "keywords": [
"ionic", "ionic",

View File

@ -2578,6 +2578,10 @@ export namespace Components {
* The mode determines which platform styles to use. * The mode determines which platform styles to use.
*/ */
"mode"?: "ios" | "md"; "mode"?: "ios" | "md";
/**
* If used in a form, set the name of the control, which is submitted with the form data.
*/
"name": string;
/** /**
* Set the input's placeholder. `placeholder` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `<Ionic>` would become `&lt;Ionic&gt;` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) * Set the input's placeholder. `placeholder` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `<Ionic>` would become `&lt;Ionic&gt;` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
*/ */
@ -6625,6 +6629,10 @@ declare namespace LocalJSX {
* The mode determines which platform styles to use. * The mode determines which platform styles to use.
*/ */
"mode"?: "ios" | "md"; "mode"?: "ios" | "md";
/**
* If used in a form, set the name of the control, which is submitted with the form data.
*/
"name"?: string;
/** /**
* Emitted when the input loses focus. * Emitted when the input loses focus.
*/ */

View File

@ -16,7 +16,7 @@
@include margin($button-ios-margin-top, $button-ios-margin-end, $button-ios-margin-bottom, $button-ios-margin-start); @include margin($button-ios-margin-top, $button-ios-margin-end, $button-ios-margin-bottom, $button-ios-margin-start);
height: #{$button-ios-height}; min-height: #{$button-ios-min-height};
font-size: #{$button-ios-font-size}; font-size: #{$button-ios-font-size};
font-weight: #{$button-ios-font-weight}; font-weight: #{$button-ios-font-weight};
@ -92,7 +92,7 @@
--padding-end: #{$button-ios-large-padding-end}; --padding-end: #{$button-ios-large-padding-end};
--padding-bottom: #{$button-ios-large-padding-bottom}; --padding-bottom: #{$button-ios-large-padding-bottom};
height: #{$button-ios-large-height}; min-height: #{$button-ios-large-min-height};
font-size: #{$button-ios-large-font-size}; font-size: #{$button-ios-large-font-size};
} }
@ -104,11 +104,16 @@
--padding-end: #{$button-ios-small-padding-end}; --padding-end: #{$button-ios-small-padding-end};
--padding-bottom: #{$button-ios-small-padding-bottom}; --padding-bottom: #{$button-ios-small-padding-bottom};
height: #{$button-ios-small-height}; min-height: #{$button-ios-small-min-height};
font-size: #{$button-ios-small-font-size}; font-size: #{$button-ios-small-font-size};
} }
:host(.button-has-icon-only) {
--padding-top: 0;
--padding-bottom: 0;
}
// iOS Round Button // iOS Round Button
// -------------------------------------------------- // --------------------------------------------------

View File

@ -16,7 +16,7 @@ $button-ios-margin-bottom: 4px !default;
$button-ios-margin-start: 2px !default; $button-ios-margin-start: 2px !default;
/// @prop - Padding top of the button /// @prop - Padding top of the button
$button-ios-padding-top: 0 !default; $button-ios-padding-top: 13px !default;
/// @prop - Padding end of the button /// @prop - Padding end of the button
$button-ios-padding-end: 1em !default; $button-ios-padding-end: 1em !default;
@ -27,8 +27,8 @@ $button-ios-padding-bottom: $button-ios-padding-top !d
/// @prop - Padding start of the button /// @prop - Padding start of the button
$button-ios-padding-start: $button-ios-padding-end !default; $button-ios-padding-start: $button-ios-padding-end !default;
/// @prop - Height of the button /// @prop - Minimum height of the button
$button-ios-height: 3.1em !default; $button-ios-min-height: 3.1em !default;
/// @prop - Border radius of the button /// @prop - Border radius of the button
$button-ios-border-radius: 14px !default; $button-ios-border-radius: 14px !default;
@ -65,7 +65,7 @@ $button-ios-opacity-disabled: .5 !default;
// -------------------------------------------------- // --------------------------------------------------
/// @prop - Padding top of the large button /// @prop - Padding top of the large button
$button-ios-large-padding-top: 0 !default; $button-ios-large-padding-top: 17px !default;
/// @prop - Padding end of the large button /// @prop - Padding end of the large button
$button-ios-large-padding-end: 1em !default; $button-ios-large-padding-end: 1em !default;
@ -76,8 +76,8 @@ $button-ios-large-padding-bottom: $button-ios-large-padding-
/// @prop - Padding start of the large button /// @prop - Padding start of the large button
$button-ios-large-padding-start: $button-ios-large-padding-end !default; $button-ios-large-padding-start: $button-ios-large-padding-end !default;
/// @prop - Height of the large button /// @prop - Minimum height of the large button
$button-ios-large-height: 3.1em !default; $button-ios-large-min-height: 3.1em !default;
/// @prop - Border radius of the large button /// @prop - Border radius of the large button
$button-ios-large-border-radius: 16px !default; $button-ios-large-border-radius: 16px !default;
@ -90,7 +90,7 @@ $button-ios-large-font-size: 20px !default;
// -------------------------------------------------- // --------------------------------------------------
/// @prop - Padding top of the small button /// @prop - Padding top of the small button
$button-ios-small-padding-top: 0 !default; $button-ios-small-padding-top: 4px !default;
/// @prop - Padding end of the small button /// @prop - Padding end of the small button
$button-ios-small-padding-end: .9em !default; $button-ios-small-padding-end: .9em !default;
@ -101,8 +101,8 @@ $button-ios-small-padding-bottom: $button-ios-small-padding-
/// @prop - Padding start of the small button /// @prop - Padding start of the small button
$button-ios-small-padding-start: $button-ios-small-padding-end !default; $button-ios-small-padding-start: $button-ios-small-padding-end !default;
/// @prop - Height of the small button /// @prop - Minimum height of the small button
$button-ios-small-height: 2.1em !default; $button-ios-small-min-height: 2.1em !default;
/// @prop - Border radius of the small button /// @prop - Border radius of the small button
$button-ios-small-border-radius: 6px !default; $button-ios-small-border-radius: 6px !default;

View File

@ -16,7 +16,7 @@
@include margin($button-md-margin-top, $button-md-margin-end, $button-md-margin-bottom, $button-md-margin-start); @include margin($button-md-margin-top, $button-md-margin-end, $button-md-margin-bottom, $button-md-margin-start);
height: #{$button-md-height}; min-height: #{$button-md-min-height};
font-size: #{$button-md-font-size}; font-size: #{$button-md-font-size};
font-weight: #{$button-md-font-weight}; font-weight: #{$button-md-font-weight};
@ -97,7 +97,7 @@
--padding-end: #{$button-md-large-padding-end}; --padding-end: #{$button-md-large-padding-end};
--padding-bottom: #{$button-md-large-padding-bottom}; --padding-bottom: #{$button-md-large-padding-bottom};
height: #{$button-md-large-height}; min-height: #{$button-md-large-min-height};
font-size: #{$button-md-large-font-size}; font-size: #{$button-md-large-font-size};
} }
@ -108,11 +108,16 @@
--padding-end: #{$button-md-small-padding-end}; --padding-end: #{$button-md-small-padding-end};
--padding-bottom: #{$button-md-small-padding-bottom}; --padding-bottom: #{$button-md-small-padding-bottom};
height: #{$button-md-small-height}; min-height: #{$button-md-small-min-height};
font-size: #{$button-md-small-font-size}; font-size: #{$button-md-small-font-size};
} }
:host(.button-has-icon-only) {
--padding-top: 0;
--padding-bottom: 0;
}
// MD strong Button // MD strong Button
// -------------------------------------------------- // --------------------------------------------------

View File

@ -16,19 +16,19 @@ $button-md-margin-bottom: 4px !default;
$button-md-margin-start: 2px !default; $button-md-margin-start: 2px !default;
/// @prop - Padding top of the button /// @prop - Padding top of the button
$button-md-padding-top: 0 !default; $button-md-padding-top: 8px !default;
/// @prop - Padding end of the button /// @prop - Padding end of the button
$button-md-padding-end: 1.1em !default; $button-md-padding-end: 1.1em !default;
/// @prop - Padding bottom of the button /// @prop - Padding bottom of the button
$button-md-padding-bottom: 0 !default; $button-md-padding-bottom: $button-md-padding-top !default;
/// @prop - Padding start of the button /// @prop - Padding start of the button
$button-md-padding-start: 1.1em !default; $button-md-padding-start: 1.1em !default;
/// @prop - Height of the button /// @prop - Minimum height of the button
$button-md-height: 36px !default; $button-md-min-height: 36px !default;
/// @prop - Border radius of the button /// @prop - Border radius of the button
$button-md-border-radius: 4px !default; $button-md-border-radius: 4px !default;
@ -63,7 +63,7 @@ $button-md-opacity-disabled: .5 !default;
// -------------------------------------------------- // --------------------------------------------------
/// @prop - Padding top of the large button /// @prop - Padding top of the large button
$button-md-large-padding-top: 0 !default; $button-md-large-padding-top: 14px !default;
/// @prop - Padding end of the large button /// @prop - Padding end of the large button
$button-md-large-padding-end: 1em !default; $button-md-large-padding-end: 1em !default;
@ -74,8 +74,8 @@ $button-md-large-padding-bottom: $button-md-large-padding
/// @prop - Padding start of the large button /// @prop - Padding start of the large button
$button-md-large-padding-start: $button-md-large-padding-end !default; $button-md-large-padding-start: $button-md-large-padding-end !default;
/// @prop - Height of the large button /// @prop - Minimum height of the large button
$button-md-large-height: 2.8em !default; $button-md-large-min-height: 2.8em !default;
/// @prop - Font size of the large button /// @prop - Font size of the large button
$button-md-large-font-size: 20px !default; $button-md-large-font-size: 20px !default;
@ -85,7 +85,7 @@ $button-md-large-font-size: 20px !default;
// -------------------------------------------------- // --------------------------------------------------
/// @prop - Padding top of the small button /// @prop - Padding top of the small button
$button-md-small-padding-top: 0 !default; $button-md-small-padding-top: 4px !default;
/// @prop - Padding end of the small button /// @prop - Padding end of the small button
$button-md-small-padding-end: .9em !default; $button-md-small-padding-end: .9em !default;
@ -96,8 +96,8 @@ $button-md-small-padding-bottom: $button-md-small-padding
/// @prop - Padding start of the small button /// @prop - Padding start of the small button
$button-md-small-padding-start: $button-md-small-padding-end !default; $button-md-small-padding-start: $button-md-small-padding-end !default;
/// @prop - Height of the small button /// @prop - Minimum height of the small button
$button-md-small-height: 2.1em !default; $button-md-small-min-height: 2.1em !default;
/// @prop - Font size of the small button /// @prop - Font size of the small button
$button-md-small-font-size: 13px !default; $button-md-small-font-size: 13px !default;

View File

@ -55,8 +55,8 @@
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
text-overflow: ellipsis;
// TODO(FW-4599): change to normal
white-space: nowrap; white-space: nowrap;
user-select: none; user-select: none;
@ -114,8 +114,6 @@
:host(.button-block) .button-native { :host(.button-block) .button-native {
@include margin-horizontal(0); @include margin-horizontal(0);
display: block;
width: 100%; width: 100%;
clear: both; clear: both;
@ -138,8 +136,6 @@
:host(.button-full) .button-native { :host(.button-full) .button-native {
@include margin-horizontal(0); @include margin-horizontal(0);
display: block;
width: 100%; width: 100%;
contain: content; contain: content;
@ -159,12 +155,17 @@
@include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
@include text-inherit(); @include text-inherit();
display: block; display: flex;
position: relative; position: relative;
align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: inherit;
transition: var(--transition); transition: var(--transition);
border-width: var(--border-width); border-width: var(--border-width);
@ -210,11 +211,20 @@
} }
// Button Slots
// --------------------------------------------------
::slotted([slot=start]),
::slotted([slot=end]) {
flex-shrink: 0;
}
// Button Icons // Button Icons
// -------------------------------------------------- // --------------------------------------------------
::slotted(ion-icon) { ::slotted(ion-icon) {
font-size: 1.4em; font-size: 1.35em;
pointer-events: none; pointer-events: none;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -0,0 +1,207 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
test.describe(title('button: wrap'), () => {
test('should render button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap">This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap`));
});
test('should render small button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" size="small">This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-small`));
});
test('should render large button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" size="large">This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-large`));
});
test('should render button with long text and icons', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-icons`));
});
test('should render block button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" expand="block">This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-block`));
});
test('should render block button with long text and icons', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" expand="block">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-block-icons`));
});
test('should render full button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" expand="full">This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-full`));
});
test('should render full button with long text and icons', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-button class="ion-text-wrap" expand="full">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
`,
config
);
const button = page.locator('ion-button');
await expect(button).toHaveScreenshot(screenshot(`button-wrap-full-icons`));
});
test('should render an item button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-item>
<ion-button class="ion-text-wrap" slot="end">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
</ion-button>
</ion-item>
`,
config
);
const item = page.locator('ion-item');
await expect(item).toHaveScreenshot(screenshot(`button-wrap-item-button`));
});
test('should render an item button with long text and icons', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-item>
<ion-button class="ion-text-wrap" slot="end">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
</ion-item>
`,
config
);
const item = page.locator('ion-item');
await expect(item).toHaveScreenshot(screenshot(`button-wrap-item-button-icons`));
});
test('should render a list header button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-list-header>
<ion-label>List Header</ion-label>
<ion-button class="ion-text-wrap">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
</ion-button>
</ion-list-header>
`,
config
);
const listHeader = page.locator('ion-list-header');
await expect(listHeader).toHaveScreenshot(screenshot(`button-wrap-list-header-button`));
});
test('should render a toolbar button with long text', async ({ page }) => {
// TODO(FW-4599): remove ion-text-wrap class
await page.setContent(
`
<ion-toolbar>
<ion-buttons slot="end">
<ion-button class="ion-text-wrap">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
</ion-button>
</ion-buttons>
</ion-toolbar>
`,
config
);
const toolbar = page.locator('ion-toolbar');
await expect(toolbar).toHaveScreenshot(screenshot(`button-wrap-toolbar-button`));
});
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Button - Wrap</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
<style>
h2 {
font-size: 12px;
font-weight: normal;
color: #6f7378;
margin-top: 10px;
}
</style>
</head>
<body>
<ion-app>
<ion-content class="ion-padding" no-bounce>
<h2>Item</h2>
<ion-item>
<ion-button slot="end">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends
</ion-button>
</ion-item>
<ion-item>
<ion-button size="default" slot="end">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends
</ion-button>
</ion-item>
<ion-item>
<ion-button size="large" slot="end">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends
</ion-button>
</ion-item>
<h2>Toolbar</h2>
<ion-toolbar>
<ion-buttons slot="end">
<ion-button>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends
</ion-button>
</ion-buttons>
</ion-toolbar>
<h2>Default</h2>
<ion-button>Button</ion-button>
<ion-button
>This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends</ion-button
>
<ion-button>
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
<h2>Small</h2>
<ion-button size="small">Button</ion-button>
<ion-button size="small">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
</ion-button>
<ion-button size="small">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
<h2>Large</h2>
<ion-button size="large">Button</ion-button>
<ion-button size="large">
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
</ion-button>
<ion-button size="large">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
<h2>Block</h2>
<ion-button expand="block">Button</ion-button>
<ion-button expand="block"
>This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends</ion-button
>
<ion-button expand="block">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
<h2>Full</h2>
<ion-button expand="full">Button</ion-button>
<ion-button expand="full"
>This is the button that never ends it just goes on and on and on and on and on and on and on and on my
friends</ion-button
>
<ion-button expand="full">
<ion-icon slot="start" name="heart"></ion-icon>
This is the button that never ends it just goes on and on and on and on and on and on and on and on my friends
<ion-icon slot="end" name="star"></ion-icon>
</ion-button>
</ion-content>
</ion-app>
</body>
</html>

View File

@ -6,12 +6,19 @@
// -------------------------------------------------- // --------------------------------------------------
::slotted(*) ion-button { ::slotted(*) ion-button {
--padding-top: 3px;
--padding-bottom: 3px;
--padding-start: 5px; --padding-start: 5px;
--padding-end: 5px; --padding-end: 5px;
@include margin-horizontal(2px, 2px); @include margin-horizontal(2px, 2px);
height: 32px; min-height: 32px;
}
::slotted(*) .button-has-icon-only {
--padding-top: 0;
--padding-bottom: 0;
} }
::slotted(*) ion-button:not(.button-round) { ::slotted(*) ion-button:not(.button-round) {

View File

@ -5,15 +5,20 @@
// -------------------------------------------------- // --------------------------------------------------
::slotted(*) ion-button { ::slotted(*) ion-button {
--padding-top: 0; --padding-top: 3px;
--padding-bottom: 0; --padding-bottom: 3px;
--padding-start: 8px; --padding-start: 8px;
--padding-end: 8px; --padding-end: 8px;
--box-shadow: none; --box-shadow: none;
@include margin-horizontal(2px, 2px); @include margin-horizontal(2px, 2px);
height: 32px; min-height: 32px;
}
::slotted(*) .button-has-icon-only {
--padding-top: 0;
--padding-bottom: 0;
} }
::slotted(*) ion-button:not(.button-round) { ::slotted(*) ion-button:not(.button-round) {

View File

@ -154,12 +154,12 @@
// -------------------------------------------------- // --------------------------------------------------
::slotted(.button-small) { ::slotted(.button-small) {
--padding-top: 0px; --padding-top: 1px;
--padding-bottom: 0px; --padding-bottom: 1px;
--padding-start: .5em; --padding-start: .5em;
--padding-end: .5em; --padding-end: .5em;
height: 24px; min-height: 24px;
font-size: 13px; font-size: 13px;
} }

Some files were not shown because too many files have changed in this diff Show More