diff --git a/apps/showcase/doc/inputgroup/FloatLabelDoc.vue b/apps/showcase/doc/inputgroup/FloatLabelDoc.vue new file mode 100644 index 000000000..fa503280d --- /dev/null +++ b/apps/showcase/doc/inputgroup/FloatLabelDoc.vue @@ -0,0 +1,160 @@ + + + diff --git a/apps/showcase/doc/inputgroup/IftaLabelDoc.vue b/apps/showcase/doc/inputgroup/IftaLabelDoc.vue new file mode 100644 index 000000000..6e9ecd24d --- /dev/null +++ b/apps/showcase/doc/inputgroup/IftaLabelDoc.vue @@ -0,0 +1,82 @@ + + + diff --git a/apps/showcase/pages/inputgroup/index.vue b/apps/showcase/pages/inputgroup/index.vue index 34ac5b733..cabb64a20 100755 --- a/apps/showcase/pages/inputgroup/index.vue +++ b/apps/showcase/pages/inputgroup/index.vue @@ -15,6 +15,8 @@ import AccessibilityDoc from '@/doc/inputgroup/AccessibilityDoc.vue'; import BasicDoc from '@/doc/inputgroup/BasicDoc.vue'; import ButtonDoc from '@/doc/inputgroup/ButtonDoc.vue'; import CheckboxDoc from '@/doc/inputgroup/CheckboxDoc.vue'; +import FloatLabelDoc from '@/doc/inputgroup/FloatLabelDoc.vue'; +import IftaLabelDoc from '@/doc/inputgroup/IftaLabelDoc.vue'; import ImportDoc from '@/doc/inputgroup/ImportDoc.vue'; import MultipleDoc from '@/doc/inputgroup/MultipleDoc.vue'; import PTComponent from '@/doc/inputgroup/pt/index.vue'; @@ -49,6 +51,16 @@ export default { label: 'Checkbox & Radio', component: CheckboxDoc }, + { + id: 'floatlabel', + label: 'Float Label', + component: FloatLabelDoc + }, + { + id: 'iftalabel', + label: 'Ifta Label', + component: IftaLabelDoc + }, { id: 'accessibility', label: 'Accessibility', diff --git a/packages/primevue/src/inputgroup/style/InputGroupStyle.js b/packages/primevue/src/inputgroup/style/InputGroupStyle.js index 456986b2e..9173c5789 100644 --- a/packages/primevue/src/inputgroup/style/InputGroupStyle.js +++ b/packages/primevue/src/inputgroup/style/InputGroupStyle.js @@ -21,7 +21,8 @@ const theme = ({ dt }) => ` min-width: 2.5rem; } -.p-inputgroup .p-floatlabel { +.p-inputgroup .p-floatlabel, +.p-inputgroup .p-iftalabel { display: flex; align-items: stretch; width: 100%; @@ -41,26 +42,30 @@ const theme = ({ dt }) => ` .p-inputgroup > .p-component, .p-inputgroup > .p-inputwrapper > .p-inputtext, -.p-inputgroup > .p-floatlabel > .p-component { +.p-inputgroup > .p-floatlabel > .p-component, +.p-inputgroup > .p-iftalabel > .p-component { border-radius: 0; margin: 0; } .p-inputgroup > .p-component + .p-inputgroupaddon, .p-inputgroup > .p-inputwrapper > .p-inputtext + .p-inputgroupaddon, -.p-inputgroup > .p-floatlabel > .p-component + .p-inputgroupaddon { +.p-inputgroup > .p-floatlabel > .p-component + .p-inputgroupaddon, +.p-inputgroup > .p-iftalabel > .p-component + .p-inputgroupaddon { border-left: 0 none; } .p-inputgroup > .p-component:focus, .p-inputgroup > .p-inputwrapper > .p-inputtext:focus, -.p-inputgroup > .p-floatlabel > .p-component:focus { +.p-inputgroup > .p-floatlabel > .p-component:focus, +.p-inputgroup > .p-iftalabel > .p-component:focus { z-index: 1; } .p-inputgroup > .p-component:focus ~ label, .p-inputgroup > .p-inputwrapper > .p-inputtext:focus~label, -.p-inputgroup > .p-floatlabel > .p-component:focus~label { +.p-inputgroup > .p-floatlabel > .p-component:focus~label, +.p-inputgroup > .p-iftalabel > .p-component:focus~label { z-index: 1; } @@ -73,7 +78,8 @@ const theme = ({ dt }) => ` border-bottom-left-radius: ${dt('inputgroup.addon.border.radius')}; } -.p-inputgroup .p-floatlabel:first-child input { +.p-inputgroup .p-floatlabel:first-child input, +.p-inputgroup .p-iftalabel:first-child input { border-top-left-radius: ${dt('inputgroup.addon.border.radius')}; border-bottom-left-radius: ${dt('inputgroup.addon.border.radius')}; } @@ -87,7 +93,8 @@ const theme = ({ dt }) => ` border-bottom-right-radius: ${dt('inputgroup.addon.border.radius')}; } -.p-inputgroup .p-floatlabel:last-child input { +.p-inputgroup .p-floatlabel:last-child input, +.p-inputgroup .p-iftalabel:last-child input { border-top-right-radius: ${dt('inputgroup.addon.border.radius')}; border-bottom-right-radius: ${dt('inputgroup.addon.border.radius')}; }