+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -56,7 +100,9 @@ export default {
diff --git a/apps/showcase/pages/textarea/index.vue b/apps/showcase/pages/textarea/index.vue
index cb801812a..c1becb498 100755
--- a/apps/showcase/pages/textarea/index.vue
+++ b/apps/showcase/pages/textarea/index.vue
@@ -17,6 +17,7 @@ import BasicDoc from '@/doc/textarea/BasicDoc.vue';
import DisabledDoc from '@/doc/textarea/DisabledDoc.vue';
import FilledDoc from '@/doc/textarea/FilledDoc.vue';
import FloatLabelDoc from '@/doc/textarea/FloatLabelDoc.vue';
+import IftaLabelDoc from '@/doc/textarea/IftaLabelDoc.vue';
import ImportDoc from '@/doc/textarea/ImportDoc.vue';
import InvalidDoc from '@/doc/textarea/InvalidDoc.vue';
import PTComponent from '@/doc/textarea/pt/index.vue';
@@ -46,6 +47,11 @@ export default {
label: 'Float Label',
component: FloatLabelDoc
},
+ {
+ id: 'iftalabel',
+ label: 'Ifta Label',
+ component: IftaLabelDoc
+ },
{
id: 'filled',
label: 'Filled',
diff --git a/packages/primevue/src/floatlabel/style/FloatLabelStyle.js b/packages/primevue/src/floatlabel/style/FloatLabelStyle.js
index e5e68d728..510e5dbc1 100644
--- a/packages/primevue/src/floatlabel/style/FloatLabelStyle.js
+++ b/packages/primevue/src/floatlabel/style/FloatLabelStyle.js
@@ -10,7 +10,7 @@ const theme = ({ dt }) => `
position: absolute;
pointer-events: none;
top: 50%;
- margin-top: -.5rem;
+ transform: translateY(-50%);
transition-property: all;
transition-timing-function: ease;
line-height: 1;
@@ -20,8 +20,9 @@ const theme = ({ dt }) => `
transition-duration: ${dt('floatlabel.transition.duration')};
}
-.p-floatlabel:has(textarea) label {
- top: 1rem;
+.p-floatlabel:has(.p-textarea) label {
+ top: ${dt('floatlabel.position.y')};
+ transform: translateY(0);
}
.p-floatlabel:has(.p-invalid) label {
@@ -36,7 +37,7 @@ const theme = ({ dt }) => `
.p-floatlabel:has(.p-inputwrapper-focus) label,
.p-floatlabel:has(.p-inputwrapper-filled) label {
top: ${dt('floatlabel.over.focus.top')};
- margin-top: 0;
+ transform: translateY(0);
font-size: ${dt('floatlabel.focus.font.size')};
font-weight: ${dt('floatlabel.label.focus.font.weight')};
}
@@ -47,7 +48,7 @@ const theme = ({ dt }) => `
color: ${dt('floatlabel.active.color')};
}
-.p-floatlabel:has(input:focus) label ,
+.p-floatlabel:has(input:focus) label,
.p-floatlabel:has(input:-webkit-autofill) label,
.p-floatlabel:has(textarea:focus) label ,
.p-floatlabel:has(.p-inputwrapper-focus) label {
@@ -70,7 +71,8 @@ const theme = ({ dt }) => `
transition-timing-function: ease;
}
-.p-floatlabel-in .p-inputtext {
+.p-floatlabel-in .p-inputtext,
+.p-floatlabel-in .p-textarea {
padding-top: ${dt('floatlabel.in.input.padding.top')};
}
diff --git a/packages/primevue/src/iftalabel/style/IftaLabelStyle.js b/packages/primevue/src/iftalabel/style/IftaLabelStyle.js
index e6519b25c..7fbac4ca2 100644
--- a/packages/primevue/src/iftalabel/style/IftaLabelStyle.js
+++ b/packages/primevue/src/iftalabel/style/IftaLabelStyle.js
@@ -20,14 +20,11 @@ const theme = ({ dt }) => `
transition-duration: ${dt('iftalabel.transition.duration')};
}
-.p-iftalabel .p-inputtext {
+.p-iftalabel .p-inputtext,
+.p-iftalabel .p-textarea {
padding-top: ${dt('iftalabel.input.padding.top')};
}
-.p-iftalabel:has(textarea) label {
- top: 1rem;
-}
-
.p-iftalabel:has(.p-invalid) label {
color: ${dt('iftalabel.invalid.color')};
}
diff --git a/packages/themes/src/presets/aura/floatlabel/index.js b/packages/themes/src/presets/aura/floatlabel/index.js
index 1f481b3af..1bab854db 100644
--- a/packages/themes/src/presets/aura/floatlabel/index.js
+++ b/packages/themes/src/presets/aura/floatlabel/index.js
@@ -6,6 +6,7 @@ export default {
invalidColor: '{form.field.float.label.invalid.color}',
transitionDuration: '0.2s',
positionX: '{form.field.padding.x}',
+ positionY: '{form.field.padding.y}',
fontWeight: '500',
focus: {
fontSize: '0.75rem',
diff --git a/packages/themes/src/presets/lara/floatlabel/index.js b/packages/themes/src/presets/lara/floatlabel/index.js
index 8aa750fdb..3c962fab6 100644
--- a/packages/themes/src/presets/lara/floatlabel/index.js
+++ b/packages/themes/src/presets/lara/floatlabel/index.js
@@ -6,6 +6,7 @@ export default {
invalidColor: '{form.field.float.label.invalid.color}',
transitionDuration: '0.2s',
positionX: '{form.field.padding.x}',
+ positionY: '{form.field.padding.y}',
fontWeight: '500',
focus: {
fontSize: '0.875rem',
@@ -14,7 +15,7 @@ export default {
},
over: {
focus: {
- top: '-1.25rem'
+ top: '-1.375rem'
}
},
in: {
diff --git a/packages/themes/src/presets/nora/floatlabel/index.js b/packages/themes/src/presets/nora/floatlabel/index.js
index 548ede753..1bab854db 100644
--- a/packages/themes/src/presets/nora/floatlabel/index.js
+++ b/packages/themes/src/presets/nora/floatlabel/index.js
@@ -6,9 +6,10 @@ export default {
invalidColor: '{form.field.float.label.invalid.color}',
transitionDuration: '0.2s',
positionX: '{form.field.padding.x}',
+ positionY: '{form.field.padding.y}',
fontWeight: '500',
focus: {
- fontSize: '0.875rem',
+ fontSize: '0.75rem',
fontWeight: '400'
}
},