From 4053bbf4b96a5248365547ae53be166a244d49a5 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Mon, 19 Feb 2024 19:08:17 +0300 Subject: [PATCH] Migrated icon field --- components/lib/theme/aura/iconfield/index.js | 35 +++++++++++++++++++ .../lib/theme/aura/iconfield/package.json | 6 ++++ components/lib/theme/aura/index.js | 14 ++++---- nuxt-vite.config.js | 2 ++ 4 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 components/lib/theme/aura/iconfield/index.js create mode 100644 components/lib/theme/aura/iconfield/package.json diff --git a/components/lib/theme/aura/iconfield/index.js b/components/lib/theme/aura/iconfield/index.js new file mode 100644 index 000000000..429a8fcd8 --- /dev/null +++ b/components/lib/theme/aura/iconfield/index.js @@ -0,0 +1,35 @@ +export default { + variables: { + colorScheme: { + light: {}, + dark: {} + } + }, + css: ` +.p-icon-field { + position: relative; +} + +.p-icon-field .p-input-icon { + position: absolute; + top: 50%; + margin-top: -.5rem; +} + +.p-icon-field-left .p-input-icon { + left: 0.75rem; +} + +.p-icon-field-right .p-input-icon { + right: 0.75rem; +} + +.p-icon-field-left .p-inputtext { + padding-left: 2.5rem; +} + +.p-icon-field-right .p-inputtext { + padding-right: 2.5rem; +} +` +}; diff --git a/components/lib/theme/aura/iconfield/package.json b/components/lib/theme/aura/iconfield/package.json new file mode 100644 index 000000000..f8e9d7ae0 --- /dev/null +++ b/components/lib/theme/aura/iconfield/package.json @@ -0,0 +1,6 @@ +{ + "main": "./index.cjs.js", + "module": "./index.esm.js", + "unpkg": "./index.min.js", + "types": "./index.d.ts" +} diff --git a/components/lib/theme/aura/index.js b/components/lib/theme/aura/index.js index 28869307b..92c48ddec 100644 --- a/components/lib/theme/aura/index.js +++ b/components/lib/theme/aura/index.js @@ -21,6 +21,7 @@ import dock from 'primevue/theme/aura/dock'; import fieldset from 'primevue/theme/aura/fieldset'; import galleria from 'primevue/theme/aura/galleria'; import global from 'primevue/theme/aura/global'; +import iconfield from 'primevue/theme/aura/iconfield'; import image from 'primevue/theme/aura/image'; import inlinemessage from 'primevue/theme/aura/inlinemessage'; import inplace from 'primevue/theme/aura/inplace'; @@ -237,18 +238,19 @@ export default { dock, fieldset, galleria, - knob, - megamenu, - menu, - menubar, - message, - metergroup, + iconfield, image, inlinemessage, inplace, inputgroup, inputswitch, inputtext, + knob, + megamenu, + menu, + menubar, + message, + metergroup, orderlist, organizationchart, overlaypanel, diff --git a/nuxt-vite.config.js b/nuxt-vite.config.js index adf6fba54..32178d73c 100644 --- a/nuxt-vite.config.js +++ b/nuxt-vite.config.js @@ -192,7 +192,9 @@ const THEME_ALIAS = { 'primevue/theme/aura/editor': path.resolve(__dirname, './components/lib/theme/aura/editor/index.js'), 'primevue/theme/aura/fieldset': path.resolve(__dirname, './components/lib/theme/aura/fieldset/index.js'), 'primevue/theme/aura/fileupload': path.resolve(__dirname, './components/lib/theme/aura/fileupload/index.js'), + 'primevue/theme/aura/floatlabel': path.resolve(__dirname, './components/lib/theme/aura/iconfield/floatlabel.js'), 'primevue/theme/aura/galleria': path.resolve(__dirname, './components/lib/theme/aura/galleria/index.js'), + 'primevue/theme/aura/iconfield': path.resolve(__dirname, './components/lib/theme/aura/iconfield/index.js'), 'primevue/theme/aura/image': path.resolve(__dirname, './components/lib/theme/aura/image/index.js'), 'primevue/theme/aura/inlinemessage': path.resolve(__dirname, './components/lib/theme/aura/inlinemessage/index.js'), 'primevue/theme/aura/inplace': path.resolve(__dirname, './components/lib/theme/aura/inplace/index.js'),