-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
266 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
core/src/components/input-password-toggle/input-password-toggle.common.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@import "../../themes/native/native.globals"; | ||
|
||
// Input Toggle Password | ||
// -------------------------------------------------- |
12 changes: 12 additions & 0 deletions
12
core/src/components/input-password-toggle/input-password-toggle.ionic.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@use "../../themes/ionic/ionic.globals.scss" as globals; | ||
@use "./input-password-toggle.common.scss"; | ||
|
||
// Ionic Input Toggle Password | ||
// -------------------------------------------------- | ||
:host ion-button.button-has-icon-only { | ||
--padding-end: inherit; | ||
--color: #{globals.$ionic-color-neutral-500}; | ||
--margin-end: calc(-1 * var(--padding-end)); | ||
|
||
@include globals.margin(0, var(--margin-end), 0, 0); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
core/src/components/input-password-toggle/test/basic/input-password-toggle.e2e.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+747 Bytes
...e.ts-snapshots/input-password-toggle-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+649 Bytes
....ts-snapshots/input-password-toggle-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+773 Bytes
...e.ts-snapshots/input-password-toggle-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+777 Bytes
...rd-toggle.e2e.ts-snapshots/input-password-toggle-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+878 Bytes
...d-toggle.e2e.ts-snapshots/input-password-toggle-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+741 Bytes
...rd-toggle.e2e.ts-snapshots/input-password-toggle-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" dir="ltr"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Textarea - Shape</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> | ||
.grid { | ||
display: grid; | ||
grid-template-columns: repeat(2, minmax(250px, 1fr)); | ||
grid-row-gap: 20px; | ||
grid-column-gap: 20px; | ||
} | ||
|
||
h2 { | ||
font-size: 12px; | ||
font-weight: normal; | ||
|
||
color: #6f7378; | ||
|
||
margin-top: 10px; | ||
} | ||
|
||
@media screen and (max-width: 800px) { | ||
.grid { | ||
grid-template-columns: 1fr; | ||
padding: 0; | ||
} | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<ion-app> | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>Textarea - Shape</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
<ion-content id="content" class="ion-padding"> | ||
<div class="grid"> | ||
<div class="grid-item"> | ||
<h2>Default</h2> | ||
<ion-textarea | ||
fill="outline" | ||
label="Label" | ||
label-placement="stacked" | ||
placeholder="Placeholder" | ||
></ion-textarea> | ||
</div> | ||
|
||
<div class="grid-item"> | ||
<h2>Round</h2> | ||
<ion-textarea | ||
shape="round" | ||
fill="outline" | ||
label="Label" | ||
label-placement="stacked" | ||
placeholder="Placeholder" | ||
></ion-textarea> | ||
</div> | ||
|
||
<div class="grid-item"> | ||
<h2>Soft</h2> | ||
<ion-textarea | ||
shape="soft" | ||
fill="outline" | ||
label="Label" | ||
label-placement="stacked" | ||
placeholder="Placeholder" | ||
></ion-textarea> | ||
</div> | ||
|
||
<div class="grid-item"> | ||
<h2>Rectangular</h2> | ||
<ion-textarea | ||
shape="rectangular" | ||
fill="outline" | ||
label="Label" | ||
label-placement="stacked" | ||
placeholder="Placeholder" | ||
></ion-textarea> | ||
</div> | ||
</div> | ||
</ion-content> | ||
</ion-app> | ||
</body> | ||
</html> |
100 changes: 100 additions & 0 deletions
100
core/src/components/textarea/test/shape/textarea.e2e.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import { expect } from '@playwright/test'; | ||
import { configs, test } from '@utils/test/playwright'; | ||
|
||
/** | ||
* This behavior does not vary across directions | ||
* The round shape is only available in the Ionic and Material Design themes | ||
*/ | ||
configs({ modes: ['md', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
test.describe(title('textarea: shape'), () => { | ||
test.describe('default', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.setContent( | ||
` | ||
<ion-textarea | ||
fill="outline" | ||
label="Email" | ||
label-placement="stacked" | ||
value="[email protected]" | ||
></ion-textarea> | ||
`, | ||
config | ||
); | ||
|
||
const textarea = page.locator('ion-textarea'); | ||
|
||
await expect(textarea).toHaveScreenshot(screenshot(`textarea-default`)); | ||
}); | ||
}); | ||
|
||
test.describe('round', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.setContent( | ||
` | ||
<ion-textarea | ||
shape="round" | ||
fill="outline" | ||
label="Email" | ||
label-placement="stacked" | ||
value="[email protected]" | ||
></ion-textarea> | ||
`, | ||
config | ||
); | ||
|
||
const textarea = page.locator('ion-textarea'); | ||
|
||
await expect(textarea).toHaveScreenshot(screenshot(`textarea-round`)); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
/** | ||
* The soft and rectangular shapes are only available in the Ionic theme | ||
*/ | ||
configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { | ||
test.describe(title('textarea: shape'), () => { | ||
test.describe('soft', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.setContent( | ||
` | ||
<ion-textarea | ||
shape="soft" | ||
fill="outline" | ||
label="Email" | ||
label-placement="stacked" | ||
value="[email protected]" | ||
></ion-textarea> | ||
`, | ||
config | ||
); | ||
|
||
const textarea = page.locator('ion-textarea'); | ||
|
||
await expect(textarea).toHaveScreenshot(screenshot(`textarea-soft`)); | ||
}); | ||
}); | ||
|
||
test.describe('rectangular', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.setContent( | ||
` | ||
<ion-textarea | ||
shape="rectangular" | ||
fill="outline" | ||
label="Email" | ||
label-placement="stacked" | ||
value="[email protected]" | ||
></ion-textarea> | ||
`, | ||
config | ||
); | ||
|
||
const textarea = page.locator('ion-textarea'); | ||
|
||
await expect(textarea).toHaveScreenshot(screenshot(`textarea-rectangular`)); | ||
}); | ||
}); | ||
}); | ||
}); |
Binary file added
BIN
+2.97 KB
...ea.e2e.ts-snapshots/textarea-default-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.48 KB
...a.e2e.ts-snapshots/textarea-default-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.07 KB
...ea.e2e.ts-snapshots/textarea-default-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.05 KB
...shape/textarea.e2e.ts-snapshots/textarea-default-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.69 KB
...hape/textarea.e2e.ts-snapshots/textarea-default-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.83 KB
...shape/textarea.e2e.ts-snapshots/textarea-default-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.3 KB
...2e.ts-snapshots/textarea-rectangular-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.64 KB
...e.ts-snapshots/textarea-rectangular-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.24 KB
...2e.ts-snapshots/textarea-rectangular-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.97 KB
...area.e2e.ts-snapshots/textarea-round-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.48 KB
...rea.e2e.ts-snapshots/textarea-round-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.07 KB
...area.e2e.ts-snapshots/textarea-round-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.14 KB
...t/shape/textarea.e2e.ts-snapshots/textarea-round-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.48 KB
.../shape/textarea.e2e.ts-snapshots/textarea-round-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.05 KB
...t/shape/textarea.e2e.ts-snapshots/textarea-round-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.65 KB
...tarea.e2e.ts-snapshots/textarea-soft-ionic-md-ltr-light-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.08 KB
...area.e2e.ts-snapshots/textarea-soft-ionic-md-ltr-light-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.63 KB
...tarea.e2e.ts-snapshots/textarea-soft-ionic-md-ltr-light-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.