diff --git a/components/lib/buttongroup/style/ButtonGroupStyle.js b/components/lib/buttongroup/style/ButtonGroupStyle.js index f2e9899b8..5ae26258c 100644 --- a/components/lib/buttongroup/style/ButtonGroupStyle.js +++ b/components/lib/buttongroup/style/ButtonGroupStyle.js @@ -1,7 +1,7 @@ import BaseStyle from 'primevue/base/style'; const classes = { - root: 'p-button-group p-component' + root: 'p-buttongroup p-component' }; export default BaseStyle.extend({ diff --git a/components/lib/themes/primeone/base/buttongroup/index.js b/components/lib/themes/primeone/base/buttongroup/index.js new file mode 100644 index 000000000..8295744d7 --- /dev/null +++ b/components/lib/themes/primeone/base/buttongroup/index.js @@ -0,0 +1,31 @@ +export default { + css: ({ dt }) => ` +.p-buttongroup .p-button { + margin: 0; +} + +.p-buttongroup .p-button:not(:last-child), +.p-buttongroup .p-button:not(:last-child):hover { + border-right: 0 none; +} + +.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) { + border-radius: 0; +} + +.p-buttongroup .p-button:first-of-type:not(:only-of-type) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.p-buttongroup .p-button:last-of-type:not(:only-of-type) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.p-buttongroup .p-button:focus { + position: relative; + z-index: 1; +} +` +}; diff --git a/components/lib/themes/primeone/base/buttongroup/package.json b/components/lib/themes/primeone/base/buttongroup/package.json new file mode 100644 index 000000000..f8e9d7ae0 --- /dev/null +++ b/components/lib/themes/primeone/base/buttongroup/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/themes/primeone/base/index.js b/components/lib/themes/primeone/base/index.js index fbcaa35da..c44ccf789 100644 --- a/components/lib/themes/primeone/base/index.js +++ b/components/lib/themes/primeone/base/index.js @@ -5,6 +5,7 @@ import badge from 'primevue/themes/primeone/base/badge'; import blockui from 'primevue/themes/primeone/base/blockui'; import breadcrumb from 'primevue/themes/primeone/base/breadcrumb'; import button from 'primevue/themes/primeone/base/button'; +import buttongroup from 'primevue/themes/primeone/base/buttongroup'; import calendar from 'primevue/themes/primeone/base/calendar'; import card from 'primevue/themes/primeone/base/card'; import carousel from 'primevue/themes/primeone/base/carousel'; @@ -93,6 +94,7 @@ export default { blockui, breadcrumb, button, + buttongroup, calendar, card, carousel, diff --git a/components/lib/themes/primeone/presets/aura/buttongroup/index.js b/components/lib/themes/primeone/presets/aura/buttongroup/index.js new file mode 100644 index 000000000..ff8b4c563 --- /dev/null +++ b/components/lib/themes/primeone/presets/aura/buttongroup/index.js @@ -0,0 +1 @@ +export default {}; diff --git a/components/lib/themes/primeone/presets/aura/buttongroup/package.json b/components/lib/themes/primeone/presets/aura/buttongroup/package.json new file mode 100644 index 000000000..f8e9d7ae0 --- /dev/null +++ b/components/lib/themes/primeone/presets/aura/buttongroup/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/themes/primeone/presets/aura/index.js b/components/lib/themes/primeone/presets/aura/index.js index 43561f6e1..4565a79c2 100644 --- a/components/lib/themes/primeone/presets/aura/index.js +++ b/components/lib/themes/primeone/presets/aura/index.js @@ -5,6 +5,7 @@ import badge from 'primevue/themes/primeone/presets/aura/badge'; import blockui from 'primevue/themes/primeone/presets/aura/blockui'; import breadcrumb from 'primevue/themes/primeone/presets/aura/breadcrumb'; import button from 'primevue/themes/primeone/presets/aura/button'; +import buttongroup from 'primevue/themes/primeone/presets/aura/buttongroup'; import calendar from 'primevue/themes/primeone/presets/aura/calendar'; import card from 'primevue/themes/primeone/presets/aura/card'; import carousel from 'primevue/themes/primeone/presets/aura/carousel'; @@ -238,6 +239,7 @@ export default { blockui, breadcrumb, button, + buttongroup, calendar, card, carousel, diff --git a/nuxt-vite.config.js b/nuxt-vite.config.js index 75c0233be..9cc276dd5 100644 --- a/nuxt-vite.config.js +++ b/nuxt-vite.config.js @@ -164,7 +164,7 @@ const ICON_ALIAS = { }; // prettier-ignore -const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable']; +const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable']; const createThemeAlias = (design, presets) => { const baseAlias = THEME_COMPONENTS.reduce((acc, name) => { diff --git a/rollup.config.js b/rollup.config.js index a113c8934..a77c0f093 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -175,7 +175,7 @@ const CORE_STYLE_DEPENDENCIES = { }; // prettier-ignore -const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable']; +const THEME_COMPONENTS = ['accordion','autocomplete','avatar','badge','blockui','breadcrumb','button','buttongroup','calendar','card','carousel','cascadeselect','checkbox','chip','chips','colorpicker','confirmdialog','confirmpopup','contextmenu','datatable','dataview','dialog','divider','dock','dropdown','editor','fieldset','fileupload','floatlabel','galleria','iconfield','image','inlinemessage','inplace','inputgroup','inputnumber','inputotp','inputswitch','inputtext','knob','listbox','megamenu','menu','menubar','message','metergroup','multiselect','orderlist','organizationchart','overlaypanel','paginator','panel','panelmenu','password','picklist','progressbar','progressspinner','radiobutton','rating','scrollpanel','scrolltop','selectbutton','sidebar','skeleton','slider','speeddial','splitbutton','splitter','steps','stepper','tabmenu','tabview','tag','terminal','textarea','tieredmenu','timeline','toast','togglebutton','toolbar','tooltip','tree','treeselect','treetable']; const createThemeDependencies = (design, presets) => { const baseDeps = THEME_COMPONENTS.reduce((acc, name) => {