@farm-investimentos/front-mfe-components 15.3.3 → 15.3.4
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/dist/front-mfe-components.common.js +152 -101
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +152 -101
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Collapsible/Collapsible.stories.js +36 -2
- package/src/components/Collapsible/Collapsible.vue +50 -1
package/package.json
CHANGED
|
@@ -26,7 +26,39 @@ export const Title = () => ({
|
|
|
26
26
|
|
|
27
27
|
export const Icon = () => ({
|
|
28
28
|
template:
|
|
29
|
-
'<farm-collapsible icon="
|
|
29
|
+
'<farm-collapsible icon="clipboard" title="With Icon">collapsible content</farm-collapsible>',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const ColorIcons = () => ({
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
colors,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
template: `
|
|
39
|
+
<farm-row>
|
|
40
|
+
<farm-col cols="12" md="4" v-for="color in colors" :key="'color_' + color">
|
|
41
|
+
<h4 style="margin:15px">{{ color }}</h4>
|
|
42
|
+
<farm-collapsible
|
|
43
|
+
style="margin-top:15px"
|
|
44
|
+
icon="clipboard"
|
|
45
|
+
title="color icon"
|
|
46
|
+
:colorIcon="color"
|
|
47
|
+
>
|
|
48
|
+
</farm-collapsible>
|
|
49
|
+
</farm-col>
|
|
50
|
+
</farm-row>`,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export const Export = () => ({
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
clicked: false,
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
template: `<div>
|
|
60
|
+
clicked: {{clicked}} <farm-collapsible icon="clipboard" title="With Button" :hasButton="true" @onClick="value => clicked = !clicked" >collapsible content</farm-collapsible>
|
|
61
|
+
</div>`,
|
|
30
62
|
});
|
|
31
63
|
|
|
32
64
|
export const Opened = () => ({
|
|
@@ -110,7 +142,9 @@ export const Dense = () => ({
|
|
|
110
142
|
Primary.storyName = 'Basic';
|
|
111
143
|
Title.storyName = 'Title';
|
|
112
144
|
Icon.storyName = 'Icon';
|
|
145
|
+
Export.storyName = 'Export';
|
|
113
146
|
Opened.storyName = 'Opened';
|
|
114
|
-
|
|
147
|
+
ColorIcons.storyName = 'Icon Colors';
|
|
148
|
+
ColorsChips.storyName = 'Chip Colors';
|
|
115
149
|
ColorsOutlinedChips.storyName = 'Outlined';
|
|
116
150
|
Dense.storyName = 'Dense';
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
<div class="collapsible__header" @click="onToggleCollapsible(status)">
|
|
5
5
|
<div class="collapsible__content-title">
|
|
6
6
|
<div class="collapsible__icon collapsible__icon--main" v-if="icon !== ''">
|
|
7
|
-
<farm-icon size="md" color="
|
|
7
|
+
<farm-icon size="md" :color="colorIcon">
|
|
8
8
|
{{ icon }}
|
|
9
9
|
</farm-icon>
|
|
10
10
|
</div>
|
|
11
11
|
<farm-heading type="6" color="black">
|
|
12
12
|
{{ title }}
|
|
13
13
|
</farm-heading>
|
|
14
|
+
<farm-btn outlined class="ml-6" v-if="hasButton" @click.stop="onClick()">
|
|
15
|
+
{{ labelButton }}
|
|
16
|
+
</farm-btn>
|
|
14
17
|
</div>
|
|
15
18
|
<div class="collapsible__content-right">
|
|
16
19
|
<div class="collapsible__icon" v-if="showChip">
|
|
@@ -82,6 +85,27 @@ export default defineComponent({
|
|
|
82
85
|
type: String,
|
|
83
86
|
default: '',
|
|
84
87
|
},
|
|
88
|
+
/**
|
|
89
|
+
* has butotn
|
|
90
|
+
*/
|
|
91
|
+
hasButton: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* export button
|
|
97
|
+
*/
|
|
98
|
+
onExport: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false,
|
|
101
|
+
},
|
|
102
|
+
/**
|
|
103
|
+
* label button
|
|
104
|
+
*/
|
|
105
|
+
labelButton: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: 'Exportar',
|
|
108
|
+
},
|
|
85
109
|
/**
|
|
86
110
|
* color of Chip
|
|
87
111
|
*/
|
|
@@ -101,6 +125,25 @@ export default defineComponent({
|
|
|
101
125
|
>,
|
|
102
126
|
default: 'primary',
|
|
103
127
|
},
|
|
128
|
+
colorIcon: {
|
|
129
|
+
type: String as PropType<
|
|
130
|
+
| 'primary'
|
|
131
|
+
| 'secondary'
|
|
132
|
+
| 'secondary-green'
|
|
133
|
+
| 'secondary-golden'
|
|
134
|
+
| 'neutral'
|
|
135
|
+
| 'info'
|
|
136
|
+
| 'success'
|
|
137
|
+
| 'error'
|
|
138
|
+
| 'warning'
|
|
139
|
+
| 'extra-1'
|
|
140
|
+
| 'extra-2'
|
|
141
|
+
>,
|
|
142
|
+
default: 'secondary-green',
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Is dense
|
|
146
|
+
*/
|
|
104
147
|
dense: {
|
|
105
148
|
type: Boolean,
|
|
106
149
|
default: false,
|
|
@@ -112,6 +155,9 @@ export default defineComponent({
|
|
|
112
155
|
type: Boolean,
|
|
113
156
|
default: false,
|
|
114
157
|
},
|
|
158
|
+
/**
|
|
159
|
+
* Is variation
|
|
160
|
+
*/
|
|
115
161
|
variation: {
|
|
116
162
|
type: String,
|
|
117
163
|
default: 'base',
|
|
@@ -134,6 +180,9 @@ export default defineComponent({
|
|
|
134
180
|
this.status = !status;
|
|
135
181
|
this.$emit('open', this.status);
|
|
136
182
|
},
|
|
183
|
+
onClick(): void {
|
|
184
|
+
this.$emit('onClick');
|
|
185
|
+
},
|
|
137
186
|
},
|
|
138
187
|
});
|
|
139
188
|
</script>
|