@farm-investimentos/front-mfe-components 15.5.0 → 15.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "15.5.0",
3
+ "version": "15.5.1",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -150,6 +150,22 @@ export const Dense = () => ({
150
150
  '<farm-collapsible icon="plus" title="With Icon" textChip="chip" dense showChip>collapsible content</farm-collapsible>',
151
151
  });
152
152
 
153
+ export const Custom = () => ({
154
+ template: `
155
+ <farm-collapsible custom>
156
+ <template #custom>
157
+ <farm-btn
158
+ v-bind="attrs"
159
+ v-on="on"
160
+ >
161
+ custom
162
+ </farm-btn>
163
+ </template>
164
+ collapsible content
165
+ </farm-collapsible>
166
+ `,
167
+ });
168
+
153
169
  Primary.storyName = 'Basic';
154
170
  Title.storyName = 'Title';
155
171
  Icon.storyName = 'Icon';
@@ -3,23 +3,24 @@
3
3
  <farm-card-content gutter="md">
4
4
  <div class="collapsible__header" @click="onToggleCollapsible(status)">
5
5
  <div class="collapsible__content-title">
6
- <div class="collapsible__icon collapsible__icon--main" v-if="icon !== ''">
6
+ <div class="collapsible__icon collapsible__icon--main" v-if="icon !== '' && !custom">
7
7
  <farm-icon size="md" :color="colorIcon">
8
8
  {{ icon }}
9
9
  </farm-icon>
10
10
  </div>
11
- <farm-heading type="6" color="black">
11
+ <farm-heading type="6" color="black" v-if="!custom">
12
12
  {{ title }}
13
13
  </farm-heading>
14
14
  <farm-btn
15
15
  outlined
16
16
  class="ml-6"
17
- v-if="hasButton"
17
+ v-if="hasButton && !custom"
18
18
  :disabled="disabledButton"
19
19
  @click.stop="onClick()"
20
20
  >
21
21
  {{ labelButton }}
22
22
  </farm-btn>
23
+ <slot name="custom" v-if="custom"></slot>
23
24
  </div>
24
25
  <div class="collapsible__content-right">
25
26
  <div class="collapsible__icon" v-if="showChip">
@@ -175,6 +176,10 @@ export default defineComponent({
175
176
  type: String,
176
177
  default: 'base',
177
178
  },
179
+ custom: {
180
+ type: Boolean,
181
+ default: false,
182
+ },
178
183
  },
179
184
 
180
185
  data() {