@farm-investimentos/front-mfe-components 14.2.2 → 15.0.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.
Files changed (141) hide show
  1. package/dist/front-mfe-components.common.js +1237 -1139
  2. package/dist/front-mfe-components.common.js.map +1 -1
  3. package/dist/front-mfe-components.css +2 -2
  4. package/dist/front-mfe-components.umd.js +1237 -1139
  5. package/dist/front-mfe-components.umd.js.map +1 -1
  6. package/dist/front-mfe-components.umd.min.js +1 -1
  7. package/dist/front-mfe-components.umd.min.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/AlertBox/AlertBox.scss +3 -2
  10. package/src/components/AlertBox/AlertBox.vue +2 -0
  11. package/src/components/Buttons/DefaultButton/DefaultButton.scss +35 -9
  12. package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +4 -4
  13. package/src/components/Buttons/DefaultButton/DefaultButton.vue +2 -0
  14. package/src/components/Buttons/ExportButton/ExportButton.vue +1 -2
  15. package/src/components/Card/Card.scss +1 -1
  16. package/src/components/Card/CardComposition.stories.ts +8 -2
  17. package/src/components/Card/CardContent/CardContent.scss +11 -0
  18. package/src/components/Card/CardContent/CardContent.stories.js +11 -0
  19. package/src/components/Card/CardContent/CardContent.vue +9 -1
  20. package/src/components/CardContext/__tests__/CardContext.spec.js +5 -2
  21. package/src/components/Checkbox/Checkbox.scss +2 -2
  22. package/src/components/Checkbox/Checkbox.vue +2 -1
  23. package/src/components/Chip/Chip.scss +15 -15
  24. package/src/components/Chip/Chip.stories.js +13 -13
  25. package/src/components/Chip/Chip.stories.scss +1 -16
  26. package/src/components/Chip/Chip.vue +25 -3
  27. package/src/components/Collapsible/Collapsible.scss +8 -3
  28. package/src/components/Collapsible/Collapsible.stories.js +68 -1
  29. package/src/components/Collapsible/Collapsible.vue +68 -8
  30. package/src/components/ContextMenu/ContextMenu.scss +1 -1
  31. package/src/components/ContextMenu/ContextMenu.stories.js +3 -3
  32. package/src/components/ContextMenu/ContextMenu.vue +14 -2
  33. package/src/components/CopyToClipboard/CopyToClipboard.stories.js +7 -1
  34. package/src/components/CopyToClipboard/CopyToClipboard.vue +15 -3
  35. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.scss +6 -9
  36. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +4 -0
  37. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.vue +21 -5
  38. package/src/components/{TextField/__tests__/TextField.spec.js → DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js} +3 -3
  39. package/src/components/DataTableHeader/DataTableHeader.scss +10 -12
  40. package/src/components/DataTableHeader/DataTableHeader.vue +5 -4
  41. package/src/components/DataTablePaginator/DataTablePaginator.scss +71 -69
  42. package/src/components/DatePicker/DatePicker.scss +5 -5
  43. package/src/components/DatePicker/vDatePicker.scss +214 -0
  44. package/src/components/DialogFooter/DialogFooter.scss +1 -1
  45. package/src/components/DialogFooter/DialogFooter.stories.js +2 -2
  46. package/src/components/DialogFooter/DialogFooter.vue +1 -1
  47. package/src/components/DialogHeader/DialogHeader.scss +2 -3
  48. package/src/components/DialogHeader/DialogHeader.vue +4 -4
  49. package/src/components/Form/Form.stories.js +1 -1
  50. package/src/components/Icon/Icon.scss +6 -0
  51. package/src/components/Icon/Icon.stories.js +19 -1
  52. package/src/components/Icon/Icon.vue +8 -2
  53. package/src/components/IconBox/IconBox.stories.js +16 -0
  54. package/src/components/IconBox/IconBox.vue +17 -7
  55. package/src/components/IdCaption/IdCaption.vue +27 -13
  56. package/src/components/Label/Label.scss +17 -5
  57. package/src/components/Label/Label.stories.js +0 -1
  58. package/src/components/ListItem/ListItem.scss +5 -3
  59. package/src/components/ListItem/ListItem.vue +2 -0
  60. package/src/components/Logger/LoggerItem/LoggerItem.scss +9 -1
  61. package/src/components/Logger/LoggerItem/LoggerItem.vue +25 -8
  62. package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +1 -1
  63. package/src/components/MainFilter/MainFilter.stories.js +4 -4
  64. package/src/components/Modal/Modal.scss +3 -3
  65. package/src/components/ModalPromptUser/ModalPromptUser.stories.js +26 -0
  66. package/src/components/ModalPromptUser/ModalPromptUser.vue +10 -0
  67. package/src/components/MultipleFilePicker/MultipleFilePicker.scss +19 -12
  68. package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +12 -0
  69. package/src/components/MultipleFilePicker/MultipleFilePicker.vue +18 -11
  70. package/src/components/MultipleFilePicker/__tests__/MultipleFilePicker.spec.js +9 -0
  71. package/src/components/ProgressBar/ProgressBar.vue +4 -0
  72. package/src/components/Radio/Radio.scss +18 -4
  73. package/src/components/Radio/Radio.stories.js +2 -1
  74. package/src/components/Radio/Radio.vue +3 -1
  75. package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +8 -8
  76. package/src/components/Select/Select.scss +4 -0
  77. package/src/components/Select/Select.vue +4 -0
  78. package/src/components/Stepper/StepperHeader/StepperHeader.scss +7 -7
  79. package/src/components/Switcher/Switcher.scss +24 -8
  80. package/src/components/Switcher/Switcher.stories.js +33 -0
  81. package/src/components/Switcher/Switcher.vue +24 -3
  82. package/src/components/TableContextMenu/TableContextMenu.scss +4 -9
  83. package/src/components/TableContextMenu/TableContextMenu.stories.js +2 -0
  84. package/src/components/TableContextMenu/TableContextMenu.vue +3 -3
  85. package/src/components/Tabs/Tabs.scss +24 -10
  86. package/src/components/Tabs/Tabs.vue +45 -24
  87. package/src/components/TextArea/TextArea.scss +7 -3
  88. package/src/components/TextArea/TextArea.vue +1 -0
  89. package/src/components/TextFieldV2/TextFieldV2.scss +8 -4
  90. package/src/components/TextFieldV2/TextFieldV2.vue +1 -0
  91. package/src/components/Tooltip/Tooltip.scss +8 -10
  92. package/src/components/Tooltip/Tooltip.vue +4 -2
  93. package/src/components/Typography/BodyText/BodyText.scss +7 -7
  94. package/src/components/Typography/Caption/Caption.scss +7 -7
  95. package/src/components/Typography/Caption/Caption.stories.js +1 -1
  96. package/src/components/Typography/Caption/Caption.vue +4 -1
  97. package/src/components/Typography/Caption/configurations.ts +3 -2
  98. package/src/components/Typography/Heading/Heading.scss +19 -19
  99. package/src/components/Typography/Heading/configurations.ts +5 -5
  100. package/src/components/Typography/Small/Small.scss +3 -0
  101. package/src/components/Typography/Small/Small.stories.js +34 -0
  102. package/src/components/Typography/Small/Small.vue +47 -0
  103. package/src/components/Typography/Small/__tests__/Small.spec.js +31 -0
  104. package/src/components/Typography/Small/configurations.ts +7 -0
  105. package/src/components/Typography/Subtitle/Subtitle.scss +7 -7
  106. package/src/components/Typography/Typography.scss +10 -0
  107. package/src/components/Typography/Typography.stories.js +15 -2
  108. package/src/components/Typography/Typography.vue +6 -2
  109. package/src/components/Typography/index.ts +2 -1
  110. package/src/components/ValueCaption/ValueCaption.vue +2 -0
  111. package/src/components/layout/Line/Line.scss +15 -0
  112. package/src/components/layout/Line/Line.stories.js +28 -5
  113. package/src/components/layout/Line/Line.vue +37 -3
  114. package/src/configurations/_mixins.scss +1 -1
  115. package/src/configurations/_theme-colors-background.scss +10 -0
  116. package/src/configurations/_theme-colors-bw.scss +10 -0
  117. package/src/configurations/_theme-colors.scss +79 -48
  118. package/src/configurations/_variables.scss +2 -0
  119. package/src/examples/Colors.stories.js +39 -1
  120. package/src/examples/Colors.stories.scss +1 -1
  121. package/src/helpers/index.ts +2 -1
  122. package/src/helpers/isChildOfFixedElement.js +16 -0
  123. package/src/main.ts +0 -3
  124. package/src/scss/Sticky-table.scss +8 -6
  125. package/src/scss/VuejsDialog.scss +58 -51
  126. package/src/scss/cssVariablesGenerator.scss +17 -14
  127. package/src/scss/utils.scss +17 -251
  128. package/src/components/FilePicker/FilePicker.scss +0 -53
  129. package/src/components/FilePicker/FilePicker.stories.js +0 -14
  130. package/src/components/FilePicker/FilePicker.vue +0 -109
  131. package/src/components/FilePicker/__tests__/FilePicker.spec.js +0 -77
  132. package/src/components/FilePicker/index.ts +0 -3
  133. package/src/components/TextField/TextField.scss +0 -43
  134. package/src/components/TextField/TextField.stories.js +0 -104
  135. package/src/components/TextField/TextField.vue +0 -18
  136. package/src/components/TextField/index.ts +0 -4
  137. package/src/scss/ButtonOverrides.scss +0 -73
  138. package/src/scss/DefaultModal.scss +0 -89
  139. package/src/scss/DialogOverrides.scss +0 -94
  140. package/src/scss/FormOverrides.scss +0 -264
  141. package/src/scss/Status-Chip.scss +0 -34
@@ -0,0 +1,31 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import Small from '../Small.vue';
3
+
4
+ describe('Small component', () => {
5
+ let wrapper;
6
+ let component;
7
+
8
+ beforeEach(() => {
9
+ wrapper = shallowMount(Small, {});
10
+ component = wrapper.vm;
11
+ });
12
+
13
+ test('Created hook', () => {
14
+ expect(wrapper).toBeDefined();
15
+ });
16
+
17
+ describe('mount component', () => {
18
+ it('renders correctly', () => {
19
+ expect(wrapper.element).toMatchSnapshot();
20
+ });
21
+ });
22
+
23
+ describe('Computed properties', () => {
24
+ it('Should return weight 500', async () => {
25
+ await wrapper.setProps({
26
+ variation: 'medium',
27
+ });
28
+ expect(component.weight).toEqual(500);
29
+ });
30
+ });
31
+ });
@@ -0,0 +1,7 @@
1
+ const Keys = {
2
+ regular: { weight: 400, size: '10px' },
3
+ medium: { weight: 500, size: '10px' },
4
+ bold: { weight: 700, size: '10px' },
5
+ };
6
+
7
+ export { Keys };
@@ -1,8 +1,8 @@
1
1
  .farm-subtitle {
2
- &--1 {
3
- letter-spacing: 0.15px;
4
- }
5
- &--2 {
6
- letter-spacing: 0.1px;
7
- }
8
- }
2
+ &--1 {
3
+ letter-spacing: 0.5px;
4
+ }
5
+ &--2 {
6
+ letter-spacing: 0.5px;
7
+ }
8
+ }
@@ -64,6 +64,16 @@
64
64
  font-weight: $w;
65
65
  }
66
66
  }
67
+
68
+ }
69
+
70
+ .farm-typography[color=black] {
71
+ color: var(--farm-bw-black);
72
+ @each $v in $bwVariations {
73
+ &.farm-typography--black-#{$v} {
74
+ color: var(--farm-bw-black-#{$v});
75
+ }
76
+ }
67
77
  }
68
78
 
69
79
  @include upToSm {
@@ -1,6 +1,7 @@
1
1
  import Typography from './Typography';
2
2
  import sizes from '../../configurations/sizes';
3
3
  import baseThemeColors from '../../configurations/_theme-colors-base.scss';
4
+ import bwThemeColors from '../../configurations/_theme-colors-bw.scss';
4
5
 
5
6
  const colors = Object.keys(baseThemeColors);
6
7
 
@@ -91,7 +92,8 @@ export const CustomSizes = () => ({
91
92
  export const Colors = () => ({
92
93
  data() {
93
94
  return {
94
- colors: ['default', ...colors, 'white'],
95
+ colors: ['default', ...colors],
96
+ bwColors: Object.keys(bwThemeColors),
95
97
  };
96
98
  },
97
99
  template: `<div>
@@ -102,6 +104,17 @@ export const Colors = () => ({
102
104
  >
103
105
  Typography - color {{ color }}
104
106
  </farm-typography>
107
+
108
+ <farm-typography
109
+ v-for="bw in bwColors"
110
+ :style="{ backgroundColor: bw === 'white' ? 'black' : 'white' }"
111
+ :color="bw.split('-')[0]"
112
+ :color-variation="bw.split('-')[1]"
113
+ :key="bw"
114
+ >
115
+ Typography - color {{ bw }}
116
+ </farm-typography>
117
+
105
118
  </div>`,
106
119
  });
107
120
 
@@ -194,4 +207,4 @@ export const Listener = () => ({
194
207
  template: `<farm-bodytext @click="handleEvent">
195
208
  Click me
196
209
  </farm-bodytext>`,
197
- });
210
+ });
@@ -8,6 +8,7 @@
8
8
  ['farm-typography--weight-' + weight]: weight !== undefined,
9
9
  'farm-typography--lighten': colorVariation === 'lighten',
10
10
  'farm-typography--darken': colorVariation === 'darken',
11
+ ['farm-typography--black-' + colorVariation]: color === 'black',
11
12
  'farm-typography--ellipsis': ellipsis,
12
13
  }"
13
14
  :style="style"
@@ -70,17 +71,20 @@ export default Vue.extend({
70
71
  type: String as PropType<
71
72
  | 'primary'
72
73
  | 'secondary'
74
+ | 'secondary-green'
75
+ | 'secondary-golden'
73
76
  | 'neutral'
74
77
  | 'info'
75
78
  | 'success'
76
79
  | 'error'
77
80
  | 'warning'
78
- | 'success'
79
81
  | 'extra-1'
80
82
  | 'extra-2'
81
83
  | 'gray'
84
+ | 'black'
85
+ | 'white'
82
86
  >,
83
- default: 'default',
87
+ default: '',
84
88
  },
85
89
  /**
86
90
  * Color variation
@@ -5,6 +5,7 @@ import Subtitle from './Subtitle/Subtitle.vue';
5
5
  import BodyText from './BodyText/BodyText.vue';
6
6
  import Caption from './Caption/Caption.vue';
7
7
  import OverlayText from './OverlayText/OverlayText.vue';
8
+ import Small from './Small/Small.vue';
8
9
 
9
- export { Typography, Heading, Subtitle, BodyText, Caption, OverlayText };
10
+ export { Typography, Heading, Subtitle, BodyText, Caption, OverlayText, Small };
10
11
  export default Typography;
@@ -32,6 +32,8 @@ export default Vue.extend({
32
32
  type: String as PropType<
33
33
  | 'primary'
34
34
  | 'secondary'
35
+ | 'secondary-green'
36
+ | 'secondary-golden'
35
37
  | 'neutral'
36
38
  | 'info'
37
39
  | 'success'
@@ -1,3 +1,4 @@
1
+ @import '../../../configurations/theme-colors';
1
2
  .farm-line {
2
3
  width: 100%;
3
4
  border: none;
@@ -7,4 +8,18 @@
7
8
  &--spacing {
8
9
  margin-top: 16px;
9
10
  }
11
+
12
+ @each $color in $theme-colors-list {
13
+ &#{'.farm-line--' + $color} {
14
+ border-bottom-color: var(--farm-#{$color}-base);
15
+
16
+ &.farm-line--lighten {
17
+ border-bottom-color: themeColor($color, 'lighten');
18
+ }
19
+
20
+ &.farm-line--darken {
21
+ border-bottom-color: themeColor($color, 'darken');
22
+ }
23
+ }
24
+ }
10
25
  }
@@ -1,4 +1,7 @@
1
1
  import Line from './Line.vue';
2
+ import baseThemeColors from '../../../configurations/_theme-colors-base.scss';
3
+ const colors = Object.keys(baseThemeColors);
4
+ const variations = ['base', 'lighten', 'darken'];
2
5
 
3
6
  export default {
4
7
  title: 'Layout/Line',
@@ -17,14 +20,34 @@ export default {
17
20
  };
18
21
 
19
22
  export const Primary = () => ({
20
- components: { 'farm-line': Line },
21
23
  template: '<farm-line />',
22
24
  });
23
25
 
24
- export const Spacing = () => ({
25
- components: { 'farm-line': Line },
26
+ export const NoSpacing = () => ({
26
27
  template: '<farm-line :noSpacing="true" />',
27
28
  });
28
29
 
29
- Primary.storyName = 'Basic';
30
- Spacing.storyName = 'No Spacing';
30
+ export const Colors = () => ({
31
+ data() {
32
+ return {
33
+ colors,
34
+ variations,
35
+ };
36
+ },
37
+ template: `
38
+ <farm-row>
39
+ <farm-col cols="12">
40
+ <h4 style="margin-top:15px">Default</h4>
41
+ <farm-line />
42
+ </farm-col>
43
+ <farm-col cols="12" v-for="color in colors" :key="'color_' + color">
44
+ <h4 style="margin-top:15px">{{ color }}</h4>
45
+ <farm-line
46
+ v-for="variation in variations"
47
+ :key="color + '_' + variation"
48
+ :color="color"
49
+ :variation="variation"
50
+ />
51
+ </farm-col>
52
+ </farm-row>`,
53
+ });
@@ -1,13 +1,47 @@
1
1
  <template>
2
- <hr :class="{ 'farm-line': true, 'farm-line--spacing': !noSpacing }" />
2
+ <hr
3
+ :class="{
4
+ 'farm-line': true,
5
+ 'farm-line--spacing': !noSpacing,
6
+ ['farm-line--' + color]: !!color,
7
+ 'farm-line--lighten': variation === 'lighten',
8
+ 'farm-line--darken': variation === 'darken',
9
+ }"
10
+ />
3
11
  </template>
4
12
 
5
13
  <script lang="ts">
6
- import Vue from 'vue';
14
+ import Vue, { PropType } from 'vue';
7
15
 
8
16
  export default Vue.extend({
9
17
  name: 'farm-line',
10
18
  props: {
19
+ /**
20
+ * Color
21
+ */
22
+ color: {
23
+ type: String as PropType<
24
+ | 'primary'
25
+ | 'secondary'
26
+ | 'secondary-green'
27
+ | 'secondary-golden'
28
+ | 'neutral'
29
+ | 'info'
30
+ | 'success'
31
+ | 'error'
32
+ | 'warning'
33
+ | 'extra-1'
34
+ | 'extra-2'
35
+ >,
36
+ default: 'default',
37
+ },
38
+ /**
39
+ * Variation Color
40
+ */
41
+ variation: {
42
+ type: String,
43
+ default: 'base',
44
+ },
11
45
  /**
12
46
  * Remove default margins
13
47
  */
@@ -20,5 +54,5 @@ export default Vue.extend({
20
54
  </script>
21
55
 
22
56
  <style lang="scss" scoped>
23
- @import './Line'
57
+ @import './Line';
24
58
  </style>
@@ -41,7 +41,7 @@
41
41
  }
42
42
 
43
43
  @mixin addShadow {
44
- box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16);
44
+ box-shadow: 0px 16px 32px rgba(0, 0, 0, 0.16);
45
45
  }
46
46
 
47
47
  @mixin buildCol($code) {
@@ -0,0 +1,10 @@
1
+ @import './theme-colors';
2
+
3
+ :export {
4
+
5
+ @each $name,
6
+ $color in $background-colors {
7
+ #{$name}: $color;
8
+ }
9
+
10
+ }
@@ -0,0 +1,10 @@
1
+ @import './theme-colors';
2
+
3
+ :export {
4
+
5
+ @each $name,
6
+ $color in $bw-colors {
7
+ #{$name}: $color;
8
+ }
9
+
10
+ }
@@ -1,91 +1,122 @@
1
1
  $primary: (
2
- base: #00B493,
3
- lighten: #EBFFFB,
4
- darken: #099A82,
2
+ base: #4f8406,
3
+ lighten: #d5e7bb,
4
+ darken: #395f05,
5
5
  );
6
6
 
7
7
  $secondary: (
8
- base: #1A3738,
9
- lighten: #467D7E,
10
- darken: #0B1A1B,
8
+ base: #e2c076,
9
+ lighten: #f1e6cc,
10
+ darken: #968254,
11
+ );
12
+
13
+ $secondary-green: (
14
+ base: #3e4e4b,
15
+ lighten: #6e7a78,
16
+ darken: #00231d,
17
+ );
18
+
19
+ $secondary-golden: (
20
+ base: #e2c076,
21
+ lighten: #f1e6cc,
22
+ darken: #968254,
11
23
  );
12
24
 
13
25
  $neutral: (
14
- base: #E0E0E0,
15
- lighten: #F5F5F5,
16
- darken: #5C5C5C,
26
+ base: #e0e0e0,
27
+ lighten: #f5f5f5,
28
+ darken: #5c5c5c,
17
29
  );
18
30
 
19
31
  $error: (
20
- base: #F44336,
21
- lighten: #FFEBEE,
22
- darken: #B71C1C,
32
+ base: #f44336,
33
+ lighten: #ffebee,
34
+ darken: #b71c1c,
23
35
  );
24
36
 
25
37
  $warning: (
26
- base: #FF9800,
27
- lighten: #FFF3E0,
28
- darken: #FF6D00,
38
+ base: #ff9800,
39
+ lighten: #fff3e0,
40
+ darken: #ff6d00,
29
41
  );
30
42
 
31
43
  $info: (
32
- base: #2196F3,
33
- lighten: #E3F2FD,
34
- darken: #0D47A1,
44
+ base: #2196f3,
45
+ lighten: #e3f2fd,
46
+ darken: #0d47a1,
35
47
  );
36
48
 
37
49
  $success: (
38
- base: #4CAF50,
39
- lighten: #E8F5E9,
40
- darken: #1B5E20,
50
+ base: #4caf50,
51
+ lighten: #e8f5e9,
52
+ darken: #1b5e20,
41
53
  );
42
54
 
43
55
  $extra-1: (
44
- base: #8E24AA,
45
- lighten: #F3E5F5,
46
- darken: #4A148C,
56
+ base: #8e24aa,
57
+ lighten: #f3e5f5,
58
+ darken: #4a148c,
47
59
  );
48
60
 
49
61
  $extra-2: (
50
- base: #EC407A,
51
- lighten: #FCE4EC,
52
- darken: #880E4F,
62
+ base: #ec407a,
63
+ lighten: #fce4ec,
64
+ darken: #880e4f,
53
65
  );
54
66
 
55
67
  $gray: (
56
- base: #858585,
57
- lighten: #D6D6D6,
58
- darken: #5C5C5C,
68
+ base: #858585,
69
+ lighten: #d6d6d6,
70
+ darken: #5c5c5c,
59
71
  );
60
72
 
61
73
  $theme-colors: (
62
- "primary": $primary,
63
- "secondary": $secondary,
64
- "neutral": $neutral,
65
- "info": $info,
66
- "error": $error,
67
- "warning": $warning,
68
- "success": $success,
69
- "extra-1": $extra-1,
70
- "extra-2": $extra-2,
71
- "gray": $gray
74
+ 'primary': $primary,
75
+ 'secondary': $secondary,
76
+ 'secondary-green': $secondary-green,
77
+ 'secondary-golden': $secondary-golden,
78
+ 'neutral': $neutral,
79
+ 'info': $info,
80
+ 'error': $error,
81
+ 'warning': $warning,
82
+ 'success': $success,
83
+ 'extra-1': $extra-1,
84
+ 'extra-2': $extra-2,
85
+ 'gray': $gray,
72
86
  );
73
87
 
74
88
  $text-colors: (
75
- "primary": #1C1C1C,
76
- "secondary": #757575,
77
- "disabled": #BDBDBD
89
+ 'primary': #1c1c1c,
90
+ 'secondary': #757575,
91
+ 'disabled': #858585,
78
92
  );
79
93
 
80
94
  $stroke-colors: (
81
- "base": #E0E0E0,
82
- "disabled": #BDBDBD,
83
- "divider": #E0E0E0
95
+ 'base': #e0e0e0,
96
+ 'disabled': #bdbdbd,
97
+ 'divider': #e0e0e0,
98
+ );
99
+
100
+ $bw-colors: (
101
+ 'black': #1c1c1c,
102
+ 'black-80': #333333,
103
+ 'black-50': #5c5c5c,
104
+ 'black-40': #757575,
105
+ 'black-30': #858585,
106
+ 'black-10': #d6d6d6,
107
+ 'black-5': #f5f5f5,
108
+ 'white': #ffffff,
109
+ );
110
+
111
+ $background-colors: (
112
+ 'base': #f5f5f5,
113
+ 'lighten': #FAFAFA,
114
+ 'white': #FFFFFF,
84
115
  );
85
116
 
86
117
  $theme-colors-list: map-keys($theme-colors);
87
118
 
88
119
  @function themeColor($name, $variation: 'base') {
89
- $theme-color: map-get($theme-colors, $name);
90
- @return map-get($theme-color, $variation)
120
+ $theme-color: map-get($theme-colors, $name);
121
+ @return map-get($theme-color, $variation);
91
122
  }
@@ -28,6 +28,8 @@ $fontSizes: (
28
28
 
29
29
  $fontWeights: 100, 200, 300, 400, 500, 600, 700;
30
30
 
31
+ $bwVariations: 80, 50, 40, 30, 10, 5;
32
+
31
33
  $aligns: start,center,end,auto,baseline,stretch;
32
34
  $align-contents: start,center,end,space-between,space-around,stretch;
33
35
  $justifications: start,center,end,space-between,space-around;
@@ -1,6 +1,8 @@
1
1
  import baseThemeColors from '../configurations/_theme-colors-base.scss';
2
2
  import textThemeColors from '../configurations/_theme-colors-text.scss';
3
3
  import strokeThemeColors from '../configurations/_theme-colors-stroke.scss';
4
+ import bwThemeColors from '../configurations/_theme-colors-bw.scss';
5
+ import backgroundThemeColors from '../configurations/_theme-colors-background.scss';
4
6
  import variationThemeColors from '../configurations/_theme-colors-variations.scss';
5
7
  import('./Colors.stories.scss');
6
8
 
@@ -16,6 +18,10 @@ export const NamesAndValues = () => ({
16
18
  variationThemeColors: { ...variationThemeColors },
17
19
  textThemeColors: { ...textThemeColors },
18
20
  strokeThemeColors: { ...strokeThemeColors },
21
+ bwThemeColorsKeys: Object.keys(bwThemeColors),
22
+ bwThemeColors: { ...bwThemeColors },
23
+ backgroundThemeColorsKeys: Object.keys(backgroundThemeColors),
24
+ backgroundThemeColors: { ...backgroundThemeColors },
19
25
  };
20
26
  },
21
27
  template: `<div class="palette-container">
@@ -40,7 +46,21 @@ export const NamesAndValues = () => ({
40
46
  <span :style="{ color: strokeThemeColors['stroke-base'] }">Base <span>{{ strokeThemeColors['stroke-base'] }}</span></span>
41
47
  <span :style="{ color: strokeThemeColors['stroke-disabled'] }">Disabled <span>{{ strokeThemeColors['stroke-disabled'] }}</span></span>
42
48
  <span :style="{ color: strokeThemeColors['stroke-divider'] }">Divider <span>{{ strokeThemeColors['stroke-divider'] }}</span></span>
43
- </div>
49
+ </div>
50
+
51
+ <div>
52
+ <farm-heading :type="5">Black & White</farm-heading>
53
+ <span v-for="bw in bwThemeColorsKeys" :key="'bw_name_' + bw" :style="{ color: bw !== 'white' ? bwThemeColors[bw] : 'black' }">
54
+ {{ bw }}<span>{{ bwThemeColors[bw] }}</span>
55
+ </span>
56
+ </div>
57
+
58
+ <div>
59
+ <farm-heading :type="5">Background</farm-heading>
60
+ <span v-for="bw in backgroundThemeColorsKeys" :key="'bw_name_' + bw" :style="{ backgroundColor: backgroundThemeColors[bw] }">
61
+ {{ bw }}<span>{{ backgroundThemeColors[bw] }}</span>
62
+ </span>
63
+ </div>
44
64
 
45
65
  </div>`,
46
66
  });
@@ -53,6 +73,10 @@ export const CssVariables = () => ({
53
73
  variationThemeColors: { ...variationThemeColors },
54
74
  textThemeColors: { ...textThemeColors },
55
75
  strokeThemeColors: { ...strokeThemeColors },
76
+ bwThemeColorsKeys: Object.keys(bwThemeColors),
77
+ bwThemeColors: { ...bwThemeColors },
78
+ backgroundThemeColorsKeys: Object.keys(backgroundThemeColors),
79
+ backgroundThemeColors: { ...backgroundThemeColors },
56
80
  };
57
81
  },
58
82
  template: `<div class="palette-container">
@@ -80,5 +104,19 @@ export const CssVariables = () => ({
80
104
  <span :style="{ color: strokeThemeColors['stroke-divider'] }">Divider <span>--farm-stroke-divider</span></span>
81
105
  </div>
82
106
 
107
+ <div>
108
+ <farm-heading :type="5">Black & White</farm-heading>
109
+ <span v-for="bw in bwThemeColorsKeys" :key="'bw_var_' + bw" :style="{ color: bw !== 'white' ? bwThemeColors[bw] : 'black' }">
110
+ {{ bw }} <span>--farm-bw-{{ bw }}</span>
111
+ </span>
112
+ </div>
113
+
114
+ <div>
115
+ <farm-heading :type="5">Background</farm-heading>
116
+ <span v-for="bw in backgroundThemeColorsKeys" :key="'bw_var_' + bw" :style="{ backgroundColor: backgroundThemeColors[bw], }">
117
+ {{ bw }} <span>--farm-background-{{ bw }}</span>
118
+ </span>
119
+ </div>
120
+
83
121
  </div>`,
84
122
  });
@@ -7,7 +7,7 @@
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  width: calc(33.333% - 32px);
10
- margin: auto 16px 32px;
10
+ margin: 0 16px 32px;
11
11
  font-size: 12px;
12
12
 
13
13
  >span {
@@ -1,3 +1,4 @@
1
1
  import { formatDatePickerHeader } from './formatDatePickerHeader';
2
2
  export { default as calculateMainZindex } from './calculateMainZindex';
3
- export { formatDatePickerHeader };
3
+ import isChildOfFixedElement from './isChildOfFixedElement';
4
+ export { formatDatePickerHeader, isChildOfFixedElement };
@@ -0,0 +1,16 @@
1
+ function isChildOfFixedElement(element) {
2
+ const parent = element.parentNode;
3
+
4
+ if (!parent || !(parent instanceof Element)) {
5
+ return false;
6
+ }
7
+ const style = window.getComputedStyle(parent);
8
+
9
+ if (style.position === 'fixed') {
10
+ return true;
11
+ }
12
+
13
+ return isChildOfFixedElement(parent);
14
+ }
15
+
16
+ export default isChildOfFixedElement;
package/src/main.ts CHANGED
@@ -4,7 +4,6 @@ import DataTablePaginator from './components/DataTablePaginator';
4
4
  import DataTableHeader from './components/DataTableHeader';
5
5
  import MainFilter from './components/MainFilter';
6
6
  import Loader from './components/Loader';
7
- import FilePicker from './components/FilePicker';
8
7
  import MultipleFilePicker from './components/MultipleFilePicker';
9
8
  import DialogHeader from './components/DialogHeader';
10
9
  import DialogFooter from './components/DialogFooter';
@@ -29,7 +28,6 @@ export {
29
28
  DataTableHeader,
30
29
  MainFilter,
31
30
  Loader,
32
- FilePicker,
33
31
  MultipleFilePicker,
34
32
  DialogHeader,
35
33
  DialogFooter,
@@ -85,7 +83,6 @@ export * from './components/Stepper';
85
83
  export * from './components/Switcher';
86
84
  export * from './components/Tabs';
87
85
  export * from './components/TextArea';
88
- export * from './components/TextField';
89
86
  export * from './components/TextFieldV2';
90
87
  export * from './components/Tooltip';
91
88
  export * from './components/Typography';