Skip to content

Commit 0f0d421

Browse files
committed
fix: migrated to new collapse animations
1 parent 862153a commit 0f0d421

File tree

19 files changed

+102
-72
lines changed

19 files changed

+102
-72
lines changed

apps/showcase/doc/message/IconDoc.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<DocSectionText v-bind="$attrs">
33
<p>Icon property and the <i>icon</i> slots are available to customize the icon of the message.</p>
44
</DocSectionText>
5-
<div class="card flex justify-center gap-4">
5+
<div class="card flex justify-center items-center gap-4">
66
<Message severity="info" icon="pi pi-send">Info Message</Message>
77
<Message severity="success">
88
<template #icon>

packages/primevue/src/accordioncontent/AccordionContent.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export interface AccordionContentPassThroughOptions {
5757
* Used to pass attributes to the transition's DOM element.
5858
*/
5959
transition?: AccordionContentPassThroughOptionType;
60+
/**
61+
* Used to pass attributes to the content's wrapper DOM element.
62+
*/
63+
contentWrapper?: AccordionContentPassThroughOptionType;
6064
/**
6165
* Used to pass attributes to the content's DOM element.
6266
*/

packages/primevue/src/accordioncontent/AccordionContent.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<template>
22
<template v-if="!asChild">
3-
<transition name="p-toggleable-content" v-bind="ptm('transition', ptParams)">
3+
<transition name="p-collapsible" v-bind="ptm('transition', ptParams)">
44
<component v-if="$pcAccordion.lazy ? $pcAccordionPanel.active : true" v-show="$pcAccordion.lazy ? true : $pcAccordionPanel.active" :is="as" :class="cx('root')" v-bind="attrs">
5-
<div :class="cx('content')" v-bind="ptm('content', ptParams)">
6-
<slot></slot>
5+
<div :class="cx('contentWrapper')" v-bind="ptm('contentWrapper', ptParams)">
6+
<div :class="cx('content')" v-bind="ptm('content', ptParams)">
7+
<slot></slot>
8+
</div>
79
</div>
810
</component>
911
</transition>

packages/primevue/src/accordioncontent/style/AccordionContentStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import BaseStyle from '@primevue/core/base/style';
22

33
const classes = {
44
root: 'p-accordioncontent',
5+
contentWrapper: 'p-accordioncontent-wrapper',
56
content: 'p-accordioncontent-content'
67
};
78

packages/primevue/src/fieldset/Fieldset.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ export interface FieldsetPassThroughOptions {
9090
* Used to pass attributes to the content container's DOM element.
9191
*/
9292
contentContainer?: FieldsetPassThroughOptionType;
93+
/**
94+
* Used to pass attributes to the content wrapper DOM element.
95+
*/
96+
contentWrapper?: FieldsetPassThroughOptionType;
9397
/**
9498
* Used to pass attributes to the content's DOM element.
9599
*/

packages/primevue/src/fieldset/Fieldset.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
</button>
2525
</slot>
2626
</legend>
27-
<transition name="p-toggleable-content" v-bind="ptm('transition')">
27+
<transition name="p-collapsible" v-bind="ptm('transition')">
2828
<div v-show="!d_collapsed" :id="$id + '_content'" :class="cx('contentContainer')" role="region" :aria-labelledby="$id + '_header'" v-bind="ptm('contentContainer')">
29-
<div :class="cx('content')" v-bind="ptm('content')">
30-
<slot></slot>
29+
<div :class="cx('contentWrapper')" v-bind="ptm('contentWrapper')">
30+
<div :class="cx('content')" v-bind="ptm('content')">
31+
<slot></slot>
32+
</div>
3133
</div>
3234
</div>
3335
</transition>

packages/primevue/src/fieldset/style/FieldsetStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const classes = {
1313
toggleButton: 'p-fieldset-toggle-button',
1414
toggleIcon: 'p-fieldset-toggle-icon',
1515
contentContainer: 'p-fieldset-content-container',
16+
contentWrapper: 'p-fieldset-content-wrapper',
1617
content: 'p-fieldset-content'
1718
};
1819

packages/primevue/src/message/Message.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export interface MessagePassThroughOptions<T = any> {
5151
* Used to pass attributes to the root's DOM element.
5252
*/
5353
root?: MessagePassThroughOptionType<T>;
54+
/**
55+
* Used to pass attributes to the content wrapper DOM element.
56+
*/
57+
contentWrapper?: MessagePassThroughOptionType<T>;
5458
/**
5559
* Used to pass attributes to the content's DOM element.
5660
*/

packages/primevue/src/message/Message.vue

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<template>
22
<transition name="p-message" appear v-bind="ptmi('transition')">
33
<div v-if="visible" :class="cx('root')" role="alert" aria-live="assertive" aria-atomic="true" :data-p="dataP" v-bind="ptm('root')">
4-
<slot v-if="$slots.container" name="container" :closeCallback="close"></slot>
5-
<div v-else :class="cx('content')" :data-p="dataP" v-bind="ptm('content')">
6-
<slot name="icon" :class="cx('icon')">
7-
<component :is="icon ? 'span' : null" :class="[cx('icon'), icon]" :data-p="dataP" v-bind="ptm('icon')"></component>
8-
</slot>
9-
<div v-if="$slots.default" :class="cx('text')" :data-p="dataP" v-bind="ptm('text')">
10-
<slot></slot>
11-
</div>
12-
<button v-if="closable" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" @click="close($event)" :data-p="dataP"
13-
v-bind="{ ...closeButtonProps, ...ptm('closeButton') }">
14-
<slot name="closeicon">
15-
<i v-if="closeIcon" :class="[cx('closeIcon'), closeIcon]" :data-p="dataP" v-bind="ptm('closeIcon')" />
16-
<TimesIcon v-else :class="[cx('closeIcon'), closeIcon]" :data-p="dataP" v-bind="ptm('closeIcon')" />
4+
<div :class="cx('contentWrapper')" v-bind="ptm('contentWrapper')">
5+
<slot v-if="$slots.container" name="container" :closeCallback="close"></slot>
6+
<div v-else :class="cx('content')" :data-p="dataP" v-bind="ptm('content')">
7+
<slot name="icon" :class="cx('icon')">
8+
<component :is="icon ? 'span' : null" :class="[cx('icon'), icon]" :data-p="dataP" v-bind="ptm('icon')"></component>
179
</slot>
18-
</button>
10+
<div v-if="$slots.default" :class="cx('text')" :data-p="dataP" v-bind="ptm('text')">
11+
<slot></slot>
12+
</div>
13+
<button v-if="closable" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" @click="close($event)" :data-p="dataP"
14+
v-bind="{ ...closeButtonProps, ...ptm('closeButton') }">
15+
<slot name="closeicon">
16+
<i v-if="closeIcon" :class="[cx('closeIcon'), closeIcon]" :data-p="dataP" v-bind="ptm('closeIcon')" />
17+
<TimesIcon v-else :class="[cx('closeIcon'), closeIcon]" :data-p="dataP" v-bind="ptm('closeIcon')" />
18+
</slot>
19+
</button>
20+
</div>
1921
</div>
2022
</div>
2123
</transition>

packages/primevue/src/message/style/MessageStyle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const classes = {
1111
'p-message-lg': props.size === 'large'
1212
}
1313
],
14+
contentWrapper: 'p-message-content-wrapper',
1415
content: 'p-message-content',
1516
icon: 'p-message-icon',
1617
text: 'p-message-text',

0 commit comments

Comments
 (0)