@farm-investimentos/front-mfe-components 9.2.4 → 9.3.0
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 +271 -177
- 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 +271 -177
- 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 +4 -1
- package/src/components/Checkbox/Checkbox.scss +9 -0
- package/src/components/Checkbox/Checkbox.stories.js +13 -0
- package/src/components/Checkbox/Checkbox.vue +13 -5
- package/src/components/Chip/Chip.scss +33 -6
- package/src/components/Chip/Chip.stories.js +36 -16
- package/src/components/Chip/Chip.stories.scss +8 -1
- package/src/components/Chip/Chip.vue +20 -1
- package/src/components/DialogHeader/DialogHeader.stories.js +9 -2
- package/src/components/DialogHeader/DialogHeader.vue +2 -3
- package/src/components/Modal/Modal.scss +32 -28
- package/src/components/Modal/Modal.stories.js +102 -4
- package/src/components/Modal/Modal.vue +13 -3
- package/src/components/Modal/__tests__/Modal.spec.js +0 -2
- package/src/configurations/_mixins.scss +1 -1
- package/src/configurations/_theme-colors-base.scss +3 -1
- package/src/configurations/_theme-colors-stroke.scss +10 -0
- package/src/configurations/_theme-colors-text.scss +10 -0
- package/src/configurations/_theme-colors.scss +65 -11
- package/src/examples/Colors.stories.js +60 -4
- package/src/examples/Colors.stories.scss +10 -4
- package/src/scss/cssVariablesGenerator.scss +22 -0
|
@@ -1,25 +1,79 @@
|
|
|
1
|
+
$primary: (
|
|
2
|
+
base: #00CCA7,
|
|
3
|
+
lighten: #EBFFFB,
|
|
4
|
+
darken: #00B493,
|
|
5
|
+
);
|
|
6
|
+
|
|
1
7
|
$secondary: (
|
|
2
|
-
base: #
|
|
3
|
-
lighten: #
|
|
4
|
-
darken: #
|
|
8
|
+
base: #5C5C5C,
|
|
9
|
+
lighten: #F5F5F5,
|
|
10
|
+
darken: #1A3738,
|
|
5
11
|
);
|
|
6
12
|
|
|
7
|
-
$
|
|
8
|
-
base: #
|
|
9
|
-
lighten: #
|
|
10
|
-
darken: #
|
|
13
|
+
$neutral: (
|
|
14
|
+
base: #EEEEEE,
|
|
15
|
+
lighten: #F5F5F5,
|
|
16
|
+
darken: #E0E0E0,
|
|
11
17
|
);
|
|
12
18
|
|
|
13
19
|
$error: (
|
|
14
|
-
base: #
|
|
15
|
-
lighten: #
|
|
16
|
-
darken: #
|
|
20
|
+
base: #F44336,
|
|
21
|
+
lighten: #FFEBEE,
|
|
22
|
+
darken: #B71C1C,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
$warning: (
|
|
26
|
+
base: #FF9800,
|
|
27
|
+
lighten: #FFF3E0,
|
|
28
|
+
darken: #FF6D00,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
$info: (
|
|
32
|
+
base: #2196F3,
|
|
33
|
+
lighten: #E3F2FD,
|
|
34
|
+
darken: #0D47A1,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
$success: (
|
|
38
|
+
base: #4CAF50,
|
|
39
|
+
lighten: #E8F5E9,
|
|
40
|
+
darken: #1B5E20,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
$extra-1: (
|
|
44
|
+
base: #8E24AA,
|
|
45
|
+
lighten: #E8F5E9,
|
|
46
|
+
darken: #4A148C,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
$extra-2: (
|
|
50
|
+
base: #EC407A,
|
|
51
|
+
lighten: #FCE4EC,
|
|
52
|
+
darken: #880E4F,
|
|
17
53
|
);
|
|
18
54
|
|
|
19
55
|
$theme-colors: (
|
|
56
|
+
"primary": $primary,
|
|
20
57
|
"secondary": $secondary,
|
|
58
|
+
"neutral": $neutral,
|
|
21
59
|
"info": $info,
|
|
22
|
-
"error": $error
|
|
60
|
+
"error": $error,
|
|
61
|
+
"warning": $warning,
|
|
62
|
+
"success": $success,
|
|
63
|
+
"extra-1": $extra-1,
|
|
64
|
+
"extra-2": $extra-2
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
$text-colors: (
|
|
68
|
+
"primary": #1C1C1C,
|
|
69
|
+
"secondary": #757575,
|
|
70
|
+
"disabled": #BDBDBD
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
$stroke-colors: (
|
|
74
|
+
"base": #E0E0E0,
|
|
75
|
+
"disabled": #BDBDBD,
|
|
76
|
+
"divider": #E0E0E0
|
|
23
77
|
);
|
|
24
78
|
|
|
25
79
|
$theme-colors-list: map-keys($theme-colors);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import baseThemeColors from '../configurations/_theme-colors-base.scss';
|
|
2
|
+
import textThemeColors from '../configurations/_theme-colors-text.scss';
|
|
3
|
+
import strokeThemeColors from '../configurations/_theme-colors-stroke.scss';
|
|
2
4
|
import variationThemeColors from '../configurations/_theme-colors-variations.scss';
|
|
3
5
|
import('./Colors.stories.scss');
|
|
4
6
|
|
|
@@ -12,6 +14,8 @@ export const NamesAndValues = () => ({
|
|
|
12
14
|
baseThemeColors: { ...baseThemeColors },
|
|
13
15
|
keys: Object.keys(baseThemeColors),
|
|
14
16
|
variationThemeColors: { ...variationThemeColors },
|
|
17
|
+
textThemeColors: { ...textThemeColors },
|
|
18
|
+
strokeThemeColors: { ...strokeThemeColors },
|
|
15
19
|
};
|
|
16
20
|
},
|
|
17
21
|
template: `<div class="palette-container">
|
|
@@ -19,10 +23,62 @@ export const NamesAndValues = () => ({
|
|
|
19
23
|
v-for="key in keys"
|
|
20
24
|
:key="key"
|
|
21
25
|
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
<farm-heading :type="5">{{ key }}</farm-heading>
|
|
27
|
+
<span :style="{ backgroundColor: baseThemeColors[key] }">Base <span>{{ baseThemeColors[key] }}</span></span>
|
|
28
|
+
<span :style="{ backgroundColor: variationThemeColors[key + '-lighten'] }">Lighten <span>{{ variationThemeColors[key + '-lighten'] }}</span></span>
|
|
29
|
+
<span :style="{ backgroundColor: variationThemeColors[key + '-darken'], color: 'white' }">Darken <span>{{ variationThemeColors[key + '-darken'] }}</span></span>
|
|
26
30
|
</div>
|
|
31
|
+
|
|
32
|
+
<div>
|
|
33
|
+
<farm-heading :type="5">Text</farm-heading>
|
|
34
|
+
<span :style="{ color: textThemeColors['text-primary'] }">Primary <span>{{ textThemeColors['text-primary'] }}</span></span>
|
|
35
|
+
<span :style="{ color: textThemeColors['text-secondary'] }">Secondary <span>{{ textThemeColors['text-secondary'] }}</span></span>
|
|
36
|
+
<span :style="{ color: textThemeColors['text-disabled'] }">Disabled <span>{{ textThemeColors['text-disabled'] }}</span></span>
|
|
37
|
+
</div>
|
|
38
|
+
<div>
|
|
39
|
+
<farm-heading :type="5">Stroke</farm-heading>
|
|
40
|
+
<span :style="{ color: strokeThemeColors['stroke-base'] }">Base <span>{{ strokeThemeColors['stroke-base'] }}</span></span>
|
|
41
|
+
<span :style="{ color: strokeThemeColors['stroke-disabled'] }">Disabled <span>{{ strokeThemeColors['stroke-disabled'] }}</span></span>
|
|
42
|
+
<span :style="{ color: strokeThemeColors['stroke-divider'] }">Divider <span>{{ strokeThemeColors['stroke-divider'] }}</span></span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
</div>`,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const CssVariables = () => ({
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
baseThemeColors: { ...baseThemeColors },
|
|
52
|
+
keys: Object.keys(baseThemeColors),
|
|
53
|
+
variationThemeColors: { ...variationThemeColors },
|
|
54
|
+
textThemeColors: { ...textThemeColors },
|
|
55
|
+
strokeThemeColors: { ...strokeThemeColors },
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
template: `<div class="palette-container">
|
|
59
|
+
<div
|
|
60
|
+
v-for="key in keys"
|
|
61
|
+
:key="key"
|
|
62
|
+
>
|
|
63
|
+
<farm-heading :type="5">{{ key }}</farm-heading>
|
|
64
|
+
<span :style="{ backgroundColor: baseThemeColors[key] }">Base <span>--farm-{{ key }}-base</span></span>
|
|
65
|
+
<span :style="{ backgroundColor: variationThemeColors[key + '-lighten'] }">Lighten<span>--farm-{{ key }}-lighten</span></span>
|
|
66
|
+
<span :style="{ backgroundColor: variationThemeColors[key + '-darken'], color: 'white' }">Darken: <span>--farm-{{ key }}-darken</span></span>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div>
|
|
70
|
+
<farm-heading :type="5">Text</farm-heading>
|
|
71
|
+
<span :style="{ color: textThemeColors['text-primary'] }">Primary <span>--farm-text-primary</span></span></span>
|
|
72
|
+
<span :style="{ color: textThemeColors['text-secondary'] }">Secondary <span>--farm-text-secondary</span></span>
|
|
73
|
+
<span :style="{ color: textThemeColors['text-disabled'] }">Disabled <span>--farm-text-disabled</span></span>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div>
|
|
77
|
+
<farm-heading :type="5">Stroke</farm-heading>
|
|
78
|
+
<span :style="{ color: strokeThemeColors['stroke-base'] }">Base <span>--farm-stroke-base</span></span></span>
|
|
79
|
+
<span :style="{ color: strokeThemeColors['stroke-disabled'] }">Disabled <span>--farm-stroke-disabled</span></span>
|
|
80
|
+
<span :style="{ color: strokeThemeColors['stroke-divider'] }">Divider <span>--farm-stroke-divider</span></span>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
27
83
|
</div>`,
|
|
28
84
|
});
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
.palette-container {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
|
+
flex-wrap: wrap;
|
|
4
5
|
|
|
5
6
|
>div {
|
|
6
7
|
display: flex;
|
|
7
8
|
flex-direction: column;
|
|
8
|
-
width: calc(
|
|
9
|
-
margin: auto 16px;
|
|
9
|
+
width: calc(33.333% - 32px);
|
|
10
|
+
margin: auto 16px 32px;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
|
|
13
|
+
>span {
|
|
14
|
+
padding: 8px 12px;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
justify-content: space-between;
|
|
10
18
|
|
|
11
|
-
span {
|
|
12
|
-
padding: 4px 8px;
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
21
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import '../configurations/theme-colors';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
|
|
5
|
+
@each $name,
|
|
6
|
+
$color in $theme-colors {
|
|
7
|
+
#{"--farm-" + $name + "-base"}: themeColor($name, "base");
|
|
8
|
+
#{"--farm-" + $name + "-lighten"}: themeColor($name, "lighten");
|
|
9
|
+
#{"--farm-" + $name + "-darken"}: themeColor($name, "darken");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@each $name,
|
|
13
|
+
$color in $text-colors {
|
|
14
|
+
#{"--farm-text-" + $name}: $color;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@each $name,
|
|
19
|
+
$color in $stroke-colors {
|
|
20
|
+
#{"--farm-stroke-" + $name}: $color;
|
|
21
|
+
}
|
|
22
|
+
}
|