From b57f4be284c03ef8f04b036c8da8e0ce10d27eb8 Mon Sep 17 00:00:00 2001
From: Brandy Carney
Date: Wed, 21 Aug 2024 14:55:40 -0400
Subject: [PATCH] feat(textarea): add ionic theme design with medium size
(#29776)
- Adds the typography styles for the default size (medium)
- Adds the styles for the outline fill
- Adds the styles for the label & helper text
- Adds the spacing for the label, textarea, counter and helper text
---
core/api.txt | 1 +
core/src/components.d.ts | 8 ++
.../components/textarea/test/basic/index.html | 14 +-
.../components/textarea/test/size/index.html | 75 ++++++++++
.../textarea/test/size/textarea.e2e.ts | 57 ++++++++
...ionic-md-ltr-light-Mobile-Chrome-linux.png | Bin 0 -> 2210 bytes
...onic-md-ltr-light-Mobile-Firefox-linux.png | Bin 0 -> 3425 bytes
...ionic-md-ltr-light-Mobile-Safari-linux.png | Bin 0 -> 2173 bytes
...ionic-md-ltr-light-Mobile-Chrome-linux.png | Bin 0 -> 2275 bytes
...onic-md-ltr-light-Mobile-Firefox-linux.png | Bin 0 -> 3768 bytes
...ionic-md-ltr-light-Mobile-Safari-linux.png | Bin 0 -> 2249 bytes
...ionic-md-ltr-light-Mobile-Chrome-linux.png | Bin 0 -> 3065 bytes
...onic-md-ltr-light-Mobile-Firefox-linux.png | Bin 0 -> 4695 bytes
...ionic-md-ltr-light-Mobile-Safari-linux.png | Bin 0 -> 3214 bytes
.../{textarea.scss => textarea.common.scss} | 98 +------------
.../textarea/textarea.ionic.outline.scss | 55 ++++++++
.../components/textarea/textarea.ionic.scss | 101 +++++++++++++
.../src/components/textarea/textarea.ios.scss | 2 +-
core/src/components/textarea/textarea.md.scss | 2 +-
.../components/textarea/textarea.native.scss | 133 ++++++++++++++++++
core/src/components/textarea/textarea.tsx | 23 ++-
packages/angular/src/directives/proxies.ts | 4 +-
packages/vue/src/proxies.ts | 1 +
23 files changed, 470 insertions(+), 104 deletions(-)
create mode 100644 core/src/components/textarea/test/size/index.html
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-ionic-md-ltr-light-Mobile-Chrome-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-ionic-md-ltr-light-Mobile-Firefox-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-ionic-md-ltr-light-Mobile-Safari-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-label-stacked-ionic-md-ltr-light-Mobile-Chrome-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-label-stacked-ionic-md-ltr-light-Mobile-Firefox-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-label-stacked-ionic-md-ltr-light-Mobile-Safari-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-outline-ionic-md-ltr-light-Mobile-Chrome-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-outline-ionic-md-ltr-light-Mobile-Firefox-linux.png
create mode 100644 core/src/components/textarea/test/size/textarea.e2e.ts-snapshots/textarea-size-medium-outline-ionic-md-ltr-light-Mobile-Safari-linux.png
rename core/src/components/textarea/{textarea.scss => textarea.common.scss} (85%)
create mode 100644 core/src/components/textarea/textarea.ionic.outline.scss
create mode 100644 core/src/components/textarea/textarea.ionic.scss
create mode 100644 core/src/components/textarea/textarea.native.scss
diff --git a/core/api.txt b/core/api.txt
index 77c2a42746..31ba1f7658 100644
--- a/core/api.txt
+++ b/core/api.txt
@@ -2280,6 +2280,7 @@ ion-textarea,prop,readonly,boolean,false,false,false
ion-textarea,prop,required,boolean,false,false,false
ion-textarea,prop,rows,number | undefined,undefined,false,false
ion-textarea,prop,shape,"round" | undefined,undefined,false,false
+ion-textarea,prop,size,"large" | "medium" | "small" | undefined,'medium',false,false
ion-textarea,prop,spellcheck,boolean,false,false,false
ion-textarea,prop,theme,"ios" | "md" | "ionic",undefined,false,false
ion-textarea,prop,value,null | string | undefined,'',false,false
diff --git a/core/src/components.d.ts b/core/src/components.d.ts
index 057be08e40..55f61afc6f 100644
--- a/core/src/components.d.ts
+++ b/core/src/components.d.ts
@@ -3620,6 +3620,10 @@ export namespace Components {
* The shape of the textarea. If "round" it will have an increased border radius.
*/
"shape"?: 'round';
+ /**
+ * The size of the textarea. If "large", it will have an increased height. By default the size is "medium". This property only applies to the `"ionic"` theme.
+ */
+ "size"?: 'small' | 'medium' | 'large';
/**
* If `true`, the element will have its spelling and grammar checked.
*/
@@ -8976,6 +8980,10 @@ declare namespace LocalJSX {
* The shape of the textarea. If "round" it will have an increased border radius.
*/
"shape"?: 'round';
+ /**
+ * The size of the textarea. If "large", it will have an increased height. By default the size is "medium". This property only applies to the `"ionic"` theme.
+ */
+ "size"?: 'small' | 'medium' | 'large';
/**
* If `true`, the element will have its spelling and grammar checked.
*/
diff --git a/core/src/components/textarea/test/basic/index.html b/core/src/components/textarea/test/basic/index.html
index 070e2072cb..6d73908513 100644
--- a/core/src/components/textarea/test/basic/index.html
+++ b/core/src/components/textarea/test/basic/index.html
@@ -22,8 +22,18 @@
-
-
+
+
+
+
+
+
+
+ Textarea - Size
+
+
+
+
+
+
+
No Fill: No Size
+
+
+
+
+
Outline: No Size
+
+
+
+
+
No Fill: No Size, Round Shape
+
+
+
+
+
Outline: No Size, Round Shape
+
+
+
+
+
+
diff --git a/core/src/components/textarea/test/size/index.html b/core/src/components/textarea/test/size/index.html
new file mode 100644
index 0000000000..884371f930
--- /dev/null
+++ b/core/src/components/textarea/test/size/index.html
@@ -0,0 +1,75 @@
+
+
+