@farm-investimentos/front-mfe-components 14.1.5 → 14.1.6
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 +137 -129
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +2 -2
- package/dist/front-mfe-components.umd.js +137 -129
- 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/Buttons/DefaultButton/DefaultButton.scss +28 -12
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +10 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +8 -0
- package/src/components/DataTableHeader/DataTableHeader.stories.js +36 -3
- package/src/components/DataTableHeader/DataTableHeader.vue +2 -2
- package/src/scss/VuejsDialog.scss +1 -1
package/package.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
@import '../../../configurations/mixins';
|
|
3
3
|
@import '../../../configurations/theme-colors';
|
|
4
4
|
$butonSizes: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
'xs': 20px,
|
|
6
|
+
'sm': 28px,
|
|
7
|
+
'md': 32px,
|
|
8
|
+
'lg': 48px,
|
|
9
|
+
'xl': 56px,
|
|
10
10
|
'default': 36px,
|
|
11
11
|
);
|
|
12
12
|
|
|
@@ -37,8 +37,7 @@ $butonSizes: (
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@each $size,
|
|
41
|
-
$value in $sizes {
|
|
40
|
+
@each $size, $value in $sizes {
|
|
42
41
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
43
42
|
font-size: $value;
|
|
44
43
|
height: map-get($butonSizes, $size);
|
|
@@ -136,8 +135,7 @@ $butonSizes: (
|
|
|
136
135
|
color: gray;
|
|
137
136
|
}
|
|
138
137
|
|
|
139
|
-
@each $size,
|
|
140
|
-
$value in $sizes {
|
|
138
|
+
@each $size, $value in $sizes {
|
|
141
139
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
142
140
|
font-size: $value;
|
|
143
141
|
}
|
|
@@ -162,11 +160,30 @@ $butonSizes: (
|
|
|
162
160
|
::v-deep .farm-btn__content i.mdi {
|
|
163
161
|
color: var(--farm-#{$color}-base);
|
|
164
162
|
}
|
|
163
|
+
|
|
164
|
+
&.lighten-variation-icon {
|
|
165
|
+
&:hover {
|
|
166
|
+
color: var(--farm-#{$color}-lighten);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
::v-deep .farm-btn__content i.mdi {
|
|
170
|
+
color: var(--farm-#{$color}-lighten);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&.darken-variation-icon {
|
|
175
|
+
&:hover {
|
|
176
|
+
color: var(--farm-#{$color}-darken);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
::v-deep .farm-btn__content i.mdi {
|
|
180
|
+
color: var(--farm-#{$color}-darken);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
165
183
|
}
|
|
166
184
|
}
|
|
167
185
|
|
|
168
186
|
&#{'.farm-btn--white'}:not(.farm-btn--disabled) {
|
|
169
|
-
|
|
170
187
|
::v-deep .farm-btn__content i.mdi {
|
|
171
188
|
color: white;
|
|
172
189
|
}
|
|
@@ -190,7 +207,6 @@ $butonSizes: (
|
|
|
190
207
|
}
|
|
191
208
|
}
|
|
192
209
|
}
|
|
193
|
-
|
|
194
210
|
}
|
|
195
211
|
|
|
196
212
|
.farm-btn--extra,
|
|
@@ -270,4 +286,4 @@ $butonSizes: (
|
|
|
270
286
|
width: 100%;
|
|
271
287
|
margin: 0;
|
|
272
288
|
}
|
|
273
|
-
}
|
|
289
|
+
}
|
|
@@ -201,6 +201,16 @@ export const Iconed = () => ({
|
|
|
201
201
|
<farm-icon>book</farm-icon>
|
|
202
202
|
</farm-btn>
|
|
203
203
|
|
|
204
|
+
<h4>Darken Icon</h4>
|
|
205
|
+
<farm-btn icon v-for="color of colors" :key="'random_2_' + color" :color="color" variation="darken">
|
|
206
|
+
<farm-icon>book</farm-icon>
|
|
207
|
+
</farm-btn>
|
|
208
|
+
|
|
209
|
+
<h4>Lighten Icon</h4>
|
|
210
|
+
<farm-btn icon v-for="color of colors" :key="'random_2_' + color" :color="color" variation="lighten">
|
|
211
|
+
<farm-icon>book</farm-icon>
|
|
212
|
+
</farm-btn>
|
|
213
|
+
|
|
204
214
|
<h4>Disabled Icon</h4>
|
|
205
215
|
<farm-btn icon v-for="color of colors" :key="'disabled_random_2_' + color" :color="color" :disabled="true">
|
|
206
216
|
<farm-icon>book</farm-icon>
|
|
@@ -87,6 +87,13 @@ export default Vue.extend({
|
|
|
87
87
|
type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
|
|
88
88
|
default: 'default',
|
|
89
89
|
},
|
|
90
|
+
/**
|
|
91
|
+
* Color Variation to Icons
|
|
92
|
+
*/
|
|
93
|
+
variation: {
|
|
94
|
+
type: String as PropType<'base' | 'lighten' | 'darken'>,
|
|
95
|
+
default: 'base',
|
|
96
|
+
},
|
|
90
97
|
},
|
|
91
98
|
|
|
92
99
|
computed: {
|
|
@@ -105,6 +112,7 @@ export default Vue.extend({
|
|
|
105
112
|
'farm-btn--icon': this.icon,
|
|
106
113
|
'farm-btn--full': this.full,
|
|
107
114
|
['farm-btn--' + this.color]: true,
|
|
115
|
+
[this.variation + '-variation-icon']: true,
|
|
108
116
|
...obj,
|
|
109
117
|
};
|
|
110
118
|
},
|
|
@@ -23,10 +23,37 @@ export const Primary = () => ({
|
|
|
23
23
|
return {
|
|
24
24
|
headers,
|
|
25
25
|
sortClick: [],
|
|
26
|
-
firstSelected:
|
|
26
|
+
firstSelected: true,
|
|
27
|
+
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
template: `<farm-datatable-header
|
|
31
|
+
:headers="headers"
|
|
32
|
+
:sortClick="sortClick"
|
|
33
|
+
:showCheckbox="false"
|
|
34
|
+
:firstSelected="firstSelected"
|
|
35
|
+
:selectedIndex="1"
|
|
36
|
+
/>`,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const SetDescInititalOrder = () => ({
|
|
40
|
+
data() {
|
|
41
|
+
let customHeaders = [...headers];
|
|
42
|
+
customHeaders[1].order = 'DESC';
|
|
43
|
+
return {
|
|
44
|
+
headers: customHeaders,
|
|
45
|
+
sortClick: [],
|
|
46
|
+
firstSelected: true,
|
|
47
|
+
|
|
27
48
|
};
|
|
28
49
|
},
|
|
29
|
-
template: `<farm-datatable-header
|
|
50
|
+
template: `<farm-datatable-header
|
|
51
|
+
:headers="headers"
|
|
52
|
+
:sortClick="sortClick"
|
|
53
|
+
:showCheckbox="false"
|
|
54
|
+
:firstSelected="firstSelected"
|
|
55
|
+
:selectedIndex="1"
|
|
56
|
+
/>`,
|
|
30
57
|
});
|
|
31
58
|
|
|
32
59
|
export const CheckBox = () => ({
|
|
@@ -46,7 +73,13 @@ export const CheckBox = () => ({
|
|
|
46
73
|
firstSelected: false,
|
|
47
74
|
};
|
|
48
75
|
},
|
|
49
|
-
template: `<farm-datatable-header
|
|
76
|
+
template: `<farm-datatable-header
|
|
77
|
+
:headers="headers"
|
|
78
|
+
:headerProps="headerProps"
|
|
79
|
+
:sortClick="sortClick"
|
|
80
|
+
:firstSelected="firstSelected"
|
|
81
|
+
:showCheckbox="true"
|
|
82
|
+
:selectedIndex="1" />`,
|
|
50
83
|
});
|
|
51
84
|
|
|
52
85
|
const headerProps = { someItems: true, everyItem: true };
|
|
@@ -167,8 +167,8 @@ export default Vue.extend({
|
|
|
167
167
|
created() {
|
|
168
168
|
for (let i = 0; i < this.headers.length; i += 1) {
|
|
169
169
|
this.sortClick.push({
|
|
170
|
-
[this.headers[i].value]:
|
|
171
|
-
descending: 'ASC',
|
|
170
|
+
[this.headers[i].value]: this.firstSelected && i === this.selectedIndex && this.headers[i].order === 'DESC',
|
|
171
|
+
descending: this.headers[i].order || 'ASC',
|
|
172
172
|
field: this.headers[i].value,
|
|
173
173
|
clicked: this.checkFirstSelected(i),
|
|
174
174
|
show: this.checkFirstSelected(i),
|