@farm-investimentos/front-mfe-components 9.2.5 → 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.
@@ -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
- <farm-heading :type="5">{{ key }}</farm-heading>
23
- <span :style="{ backgroundColor: baseThemeColors[key] }">Base {{ baseThemeColors[key] }}</span>
24
- <span :style="{ backgroundColor: variationThemeColors[key + '-lighten'] }">Lighten: {{ variationThemeColors[key + '-lighten'] }}</span>
25
- <span :style="{ backgroundColor: variationThemeColors[key + '-darken'], color: 'white' }">Darken: {{ variationThemeColors[key + '-darken'] }}</span>
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(25% - 32px);
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
+ }