diff --git a/components/landing/HeroSection.vue b/components/landing/HeroSection.vue index 9acb97cff..c1627036d 100644 --- a/components/landing/HeroSection.vue +++ b/components/landing/HeroSection.vue @@ -144,7 +144,7 @@ }, menu: { root: { - style: 'width: 10rem; min-width: auto', + style: 'width: 10rem; min-width: auto' }, action: 'p-2' } diff --git a/components/lib/metergroup/MeterGroup.d.ts b/components/lib/metergroup/MeterGroup.d.ts index f6dd6fcb1..ddf934e7c 100644 --- a/components/lib/metergroup/MeterGroup.d.ts +++ b/components/lib/metergroup/MeterGroup.d.ts @@ -222,6 +222,19 @@ export interface MeterGroupSlots { */ totalPercent: string; }): VNode[]; + /** + * Custom icon template. + */ + icon(scope: { + /** + * Current value of the component + */ + value: MeterItemOptions; + /** + * Style class of the icon + */ + class: string; + }): VNode[]; /** * Custom start template. */ diff --git a/components/lib/metergroup/MeterGroup.vue b/components/lib/metergroup/MeterGroup.vue index b3856a42c..4e0773d54 100644 --- a/components/lib/metergroup/MeterGroup.vue +++ b/components/lib/metergroup/MeterGroup.vue @@ -3,7 +3,10 @@
  1. - + + + + {{ val.label }} ({{ percentValue(val.value) }})
diff --git a/components/lib/metergroup/style/MeterGroupStyle.js b/components/lib/metergroup/style/MeterGroupStyle.js index c7800ea9b..9f402c35d 100644 --- a/components/lib/metergroup/style/MeterGroupStyle.js +++ b/components/lib/metergroup/style/MeterGroupStyle.js @@ -26,12 +26,16 @@ const css = ` list-style-type: none; } - .p-metergroup-label-list-horizontal { + .p-metergroup-vertical .p-metergroup-label-list { + align-items: start; + } + + .p-metergroup-horizontal .p-metergroup-label-list-vertical { flex-direction: column; } - .p-metergroup-vertical .p-metergroup-label-list-vertical { - align-items: start; + .p-metergroup-vertical .p-metergroup-label-list-horizontal { + flex-direction: column; } .p-metergroup-label-list-item { @@ -42,6 +46,12 @@ const css = ` .p-metergroup-label-type { display: inline-block; } + + .p-metergroup-label-icon { + width: 1rem; + height: 1rem; + margin-right: .5rem; + } } `; @@ -65,6 +75,7 @@ const classes = { } ], labellistitem: 'p-metergroup-label-list-item', + labelicon: 'p-metergroup-label-icon', labellisttype: 'p-metergroup-label-type', label: 'p-metergroup-label' }; diff --git a/components/lib/overlaypanel/OverlayPanel.d.ts b/components/lib/overlaypanel/OverlayPanel.d.ts index 970305f08..2567528ea 100755 --- a/components/lib/overlaypanel/OverlayPanel.d.ts +++ b/components/lib/overlaypanel/OverlayPanel.d.ts @@ -244,6 +244,10 @@ export interface OverlayPanelEmits { * @group Component */ declare class OverlayPanel extends ClassComponent { + /** + * Aligns overlay panel based on the current position of the container. + */ + alignOverlay(): void; /** * Toggles the visibility of the overlay. * @param {Event} event - Browser event. diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 3fb520396..2d5e19ff8 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -35580,6 +35580,18 @@ "returnType": "VNode[]", "description": "Custom meter template." }, + { + "name": "icon", + "parameters": [ + { + "name": "scope", + "optional": false, + "type": "{\n \t value: MeterItemOptions, // Current value of the component\n \t class: string, // Style class of the icon\n }" + } + ], + "returnType": "VNode[]", + "description": "Custom icon template." + }, { "name": "start", "parameters": [ @@ -38410,6 +38422,12 @@ "methods": { "description": "Defines methods that can be accessed by the component's reference.", "values": [ + { + "name": "alignOverlay", + "parameters": [], + "returnType": "void", + "description": "Aligns overlay panel based on the current position of the container." + }, { "name": "toggle", "parameters": [ diff --git a/doc/metergroup/BasicDoc.vue b/doc/metergroup/BasicDoc.vue index 3e7bc1a1a..ac7f6928b 100644 --- a/doc/metergroup/BasicDoc.vue +++ b/doc/metergroup/BasicDoc.vue @@ -12,11 +12,7 @@ export default { data() { return { - value: [ - { color: '#239EF0', label: 'Mortgage', value: 25 }, - { color: '#FAA419', label: 'Loan', value: 15 }, - { color: '#EE5879', label: 'Credit Card', value: 20 } - ], + value: [{ label: 'Space used', value: 15 }], code: { basic: ` @@ -32,11 +28,7 @@ export default { export default { data() { return { - value: [ - { color: '#239EF0', label: 'Mortgage', value: 25 }, - { color: '#FAA419', label: 'Loan', value: 15 }, - { color: '#EE5879', label: 'Credit Card', value: 20 } - ] + value: [{ label: 'Space used', value: 15 }], }; } }; @@ -52,11 +44,7 @@ export default { diff --git a/doc/metergroup/VerticalDoc.vue b/doc/metergroup/VerticalDoc.vue index 2e9b01707..ac5e4712c 100644 --- a/doc/metergroup/VerticalDoc.vue +++ b/doc/metergroup/VerticalDoc.vue @@ -2,7 +2,7 @@

Layout of the MeterGroup is configured with the orientation property that accepts horizontal and vertical as options.

-
+
@@ -23,7 +23,7 @@ export default { `, options: ` @@ -44,7 +44,7 @@ export default { `, composition: ` diff --git a/doc/passthrough/UsePassThroughDoc.vue b/doc/passthrough/UsePassThroughDoc.vue index 88a92c574..facdad134 100644 --- a/doc/passthrough/UsePassThroughDoc.vue +++ b/doc/passthrough/UsePassThroughDoc.vue @@ -1,8 +1,6 @@