@farm-investimentos/front-mfe-components 14.2.1 → 15.0.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 +4146 -5381
- 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 +4146 -5381
- 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/AlertBox/AlertBox.scss +3 -2
- package/src/components/AlertBox/AlertBox.vue +2 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +57 -18
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +49 -16
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +3 -1
- package/src/components/Buttons/ExportButton/ExportButton.vue +2 -1
- package/src/components/Card/Card.scss +1 -1
- package/src/components/Card/CardComposition.stories.ts +8 -2
- package/src/components/Card/CardContent/CardContent.scss +11 -0
- package/src/components/Card/CardContent/CardContent.stories.js +11 -0
- package/src/components/Card/CardContent/CardContent.vue +9 -1
- package/src/components/CardContext/__tests__/CardContext.spec.js +5 -2
- package/src/components/Checkbox/Checkbox.scss +2 -2
- package/src/components/Checkbox/Checkbox.vue +2 -1
- package/src/components/Chip/Chip.scss +15 -15
- package/src/components/Chip/Chip.stories.js +13 -13
- package/src/components/Chip/Chip.stories.scss +1 -16
- package/src/components/Chip/Chip.vue +25 -3
- package/src/components/Collapsible/Collapsible.scss +8 -3
- package/src/components/Collapsible/Collapsible.stories.js +68 -1
- package/src/components/Collapsible/Collapsible.vue +68 -8
- package/src/components/ContextMenu/ContextMenu.scss +1 -1
- package/src/components/ContextMenu/ContextMenu.stories.js +42 -29
- package/src/components/ContextMenu/ContextMenu.vue +20 -1
- package/src/components/CopyToClipboard/CopyToClipboard.stories.js +7 -1
- package/src/components/CopyToClipboard/CopyToClipboard.vue +15 -3
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.scss +6 -9
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +4 -0
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.vue +21 -5
- package/src/components/{TextField/__tests__/TextField.spec.js → DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js} +3 -3
- package/src/components/DataTableHeader/DataTableHeader.scss +10 -12
- package/src/components/DataTableHeader/DataTableHeader.vue +5 -4
- package/src/components/DataTablePaginator/DataTablePaginator.scss +71 -69
- package/src/components/DatePicker/DatePicker.scss +5 -5
- package/src/components/DatePicker/DatePicker.vue +2 -3
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +1 -1
- package/src/components/DatePicker/vDatePicker.scss +214 -0
- package/src/components/DialogFooter/DialogFooter.scss +1 -1
- package/src/components/DialogFooter/DialogFooter.stories.js +2 -2
- package/src/components/DialogFooter/DialogFooter.vue +1 -1
- package/src/components/DialogHeader/DialogHeader.scss +2 -3
- package/src/components/DialogHeader/DialogHeader.vue +4 -4
- package/src/components/Form/Form.stories.js +1 -1
- package/src/components/Icon/Icon.scss +6 -0
- package/src/components/Icon/Icon.stories.js +19 -1
- package/src/components/Icon/Icon.vue +8 -2
- package/src/components/IconBox/IconBox.stories.js +16 -0
- package/src/components/IconBox/IconBox.vue +17 -7
- package/src/components/IdCaption/IdCaption.vue +27 -13
- package/src/components/Label/Label.scss +17 -5
- package/src/components/Label/Label.stories.js +0 -1
- package/src/components/ListItem/ListItem.scss +5 -3
- package/src/components/ListItem/ListItem.vue +2 -0
- package/src/components/Logger/LoggerItem/LoggerItem.scss +9 -1
- package/src/components/Logger/LoggerItem/LoggerItem.vue +25 -8
- package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +1 -1
- package/src/components/MainFilter/MainFilter.stories.js +4 -4
- package/src/components/Modal/Modal.scss +3 -3
- package/src/components/ModalPromptUser/ModalPromptUser.stories.js +26 -0
- package/src/components/ModalPromptUser/ModalPromptUser.vue +10 -0
- package/src/components/MultipleFilePicker/MultipleFilePicker.scss +19 -12
- package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +12 -0
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +18 -11
- package/src/components/MultipleFilePicker/__tests__/MultipleFilePicker.spec.js +9 -0
- package/src/components/ProgressBar/ProgressBar.vue +4 -0
- package/src/components/Radio/Radio.scss +18 -4
- package/src/components/Radio/Radio.stories.js +2 -1
- package/src/components/Radio/Radio.vue +3 -1
- package/src/components/RangeDatePicker/RangeDatePicker.vue +0 -2
- package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +8 -8
- package/src/components/Select/Select.scss +4 -0
- package/src/components/Select/Select.vue +9 -1
- package/src/components/Stepper/StepperHeader/StepperHeader.scss +7 -7
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +35 -36
- package/src/components/Switcher/Switcher.scss +24 -8
- package/src/components/Switcher/Switcher.stories.js +33 -0
- package/src/components/Switcher/Switcher.vue +24 -3
- package/src/components/TableContextMenu/TableContextMenu.scss +4 -9
- package/src/components/TableContextMenu/TableContextMenu.stories.js +2 -0
- package/src/components/TableContextMenu/TableContextMenu.vue +5 -4
- package/src/components/Tabs/Tabs.scss +69 -0
- package/src/components/Tabs/Tabs.stories.js +51 -4
- package/src/components/Tabs/Tabs.vue +59 -32
- package/src/components/Tabs/__tests__/Tabs.spec.js +54 -54
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/TextArea/TextArea.scss +7 -3
- package/src/components/TextArea/TextArea.vue +1 -0
- package/src/components/TextFieldV2/TextFieldV2.scss +8 -4
- package/src/components/TextFieldV2/TextFieldV2.vue +1 -0
- package/src/components/Tooltip/Tooltip.scss +8 -10
- package/src/components/Tooltip/Tooltip.vue +4 -2
- package/src/components/Typography/BodyText/BodyText.scss +7 -7
- package/src/components/Typography/Caption/Caption.scss +7 -7
- package/src/components/Typography/Caption/Caption.stories.js +1 -1
- package/src/components/Typography/Caption/Caption.vue +4 -1
- package/src/components/Typography/Caption/configurations.ts +3 -2
- package/src/components/Typography/Heading/Heading.scss +19 -19
- package/src/components/Typography/Heading/configurations.ts +5 -5
- package/src/components/Typography/Small/Small.scss +3 -0
- package/src/components/Typography/Small/Small.stories.js +34 -0
- package/src/components/Typography/Small/Small.vue +47 -0
- package/src/components/Typography/Small/__tests__/Small.spec.js +31 -0
- package/src/components/Typography/Small/configurations.ts +7 -0
- package/src/components/Typography/Subtitle/Subtitle.scss +7 -7
- package/src/components/Typography/Typography.scss +10 -0
- package/src/components/Typography/Typography.stories.js +15 -2
- package/src/components/Typography/Typography.vue +6 -2
- package/src/components/Typography/index.ts +2 -1
- package/src/components/ValueCaption/ValueCaption.vue +2 -0
- package/src/components/layout/Line/Line.scss +15 -0
- package/src/components/layout/Line/Line.stories.js +28 -5
- package/src/components/layout/Line/Line.vue +37 -3
- package/src/configurations/_mixins.scss +1 -1
- package/src/configurations/_theme-colors-background.scss +10 -0
- package/src/configurations/_theme-colors-bw.scss +10 -0
- package/src/configurations/_theme-colors.scss +79 -48
- package/src/configurations/_variables.scss +2 -0
- package/src/examples/Colors.stories.js +39 -1
- package/src/examples/Colors.stories.scss +1 -1
- package/src/helpers/index.ts +2 -1
- package/src/helpers/isChildOfFixedElement.js +16 -0
- package/src/main.ts +1 -5
- package/src/scss/Sticky-table.scss +13 -7
- package/src/scss/VuejsDialog.scss +58 -51
- package/src/scss/cssVariablesGenerator.scss +17 -14
- package/src/scss/utils.scss +17 -251
- package/src/components/FilePicker/FilePicker.scss +0 -53
- package/src/components/FilePicker/FilePicker.stories.js +0 -14
- package/src/components/FilePicker/FilePicker.vue +0 -109
- package/src/components/FilePicker/__tests__/FilePicker.spec.js +0 -77
- package/src/components/FilePicker/index.ts +0 -3
- package/src/components/TextField/TextField.scss +0 -43
- package/src/components/TextField/TextField.stories.js +0 -104
- package/src/components/TextField/TextField.vue +0 -18
- package/src/components/TextField/index.ts +0 -4
- package/src/scss/ButtonOverrides.scss +0 -73
- package/src/scss/DefaultModal.scss +0 -89
- package/src/scss/DialogOverrides.scss +0 -94
- package/src/scss/FormOverrides.scss +0 -264
- package/src/scss/Status-Chip.scss +0 -34
|
@@ -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
|
|
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: '
|
|
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;
|
|
@@ -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
|
|
25
|
-
components: { 'farm-line': Line },
|
|
26
|
+
export const NoSpacing = () => ({
|
|
26
27
|
template: '<farm-line :noSpacing="true" />',
|
|
27
28
|
});
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
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>
|
|
@@ -1,91 +1,122 @@
|
|
|
1
1
|
$primary: (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
base: #4f8406,
|
|
3
|
+
lighten: #d5e7bb,
|
|
4
|
+
darken: #395f05,
|
|
5
5
|
);
|
|
6
6
|
|
|
7
7
|
$secondary: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
base: #e0e0e0,
|
|
27
|
+
lighten: #f5f5f5,
|
|
28
|
+
darken: #5c5c5c,
|
|
17
29
|
);
|
|
18
30
|
|
|
19
31
|
$error: (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
base: #f44336,
|
|
33
|
+
lighten: #ffebee,
|
|
34
|
+
darken: #b71c1c,
|
|
23
35
|
);
|
|
24
36
|
|
|
25
37
|
$warning: (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
base: #ff9800,
|
|
39
|
+
lighten: #fff3e0,
|
|
40
|
+
darken: #ff6d00,
|
|
29
41
|
);
|
|
30
42
|
|
|
31
43
|
$info: (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
44
|
+
base: #2196f3,
|
|
45
|
+
lighten: #e3f2fd,
|
|
46
|
+
darken: #0d47a1,
|
|
35
47
|
);
|
|
36
48
|
|
|
37
49
|
$success: (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
base: #4caf50,
|
|
51
|
+
lighten: #e8f5e9,
|
|
52
|
+
darken: #1b5e20,
|
|
41
53
|
);
|
|
42
54
|
|
|
43
55
|
$extra-1: (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
base: #8e24aa,
|
|
57
|
+
lighten: #f3e5f5,
|
|
58
|
+
darken: #4a148c,
|
|
47
59
|
);
|
|
48
60
|
|
|
49
61
|
$extra-2: (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
base: #ec407a,
|
|
63
|
+
lighten: #fce4ec,
|
|
64
|
+
darken: #880e4f,
|
|
53
65
|
);
|
|
54
66
|
|
|
55
67
|
$gray: (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
base: #858585,
|
|
69
|
+
lighten: #d6d6d6,
|
|
70
|
+
darken: #5c5c5c,
|
|
59
71
|
);
|
|
60
72
|
|
|
61
73
|
$theme-colors: (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
'primary': #1c1c1c,
|
|
90
|
+
'secondary': #757575,
|
|
91
|
+
'disabled': #858585,
|
|
78
92
|
);
|
|
79
93
|
|
|
80
94
|
$stroke-colors: (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
90
|
-
|
|
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
|
-
|
|
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
|
});
|
package/src/helpers/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { formatDatePickerHeader } from './formatDatePickerHeader';
|
|
2
2
|
export { default as calculateMainZindex } from './calculateMainZindex';
|
|
3
|
-
|
|
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,9 +4,7 @@ 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
|
-
import Tabs from './components/Tabs';
|
|
10
8
|
import DialogHeader from './components/DialogHeader';
|
|
11
9
|
import DialogFooter from './components/DialogFooter';
|
|
12
10
|
import RangeDatePicker from './components/RangeDatePicker';
|
|
@@ -30,9 +28,7 @@ export {
|
|
|
30
28
|
DataTableHeader,
|
|
31
29
|
MainFilter,
|
|
32
30
|
Loader,
|
|
33
|
-
FilePicker,
|
|
34
31
|
MultipleFilePicker,
|
|
35
|
-
Tabs,
|
|
36
32
|
DialogHeader,
|
|
37
33
|
DialogFooter,
|
|
38
34
|
RangeDatePicker,
|
|
@@ -85,8 +81,8 @@ export * from './components/RadioGroup';
|
|
|
85
81
|
export * from './components/Select';
|
|
86
82
|
export * from './components/Stepper';
|
|
87
83
|
export * from './components/Switcher';
|
|
84
|
+
export * from './components/Tabs';
|
|
88
85
|
export * from './components/TextArea';
|
|
89
|
-
export * from './components/TextField';
|
|
90
86
|
export * from './components/TextFieldV2';
|
|
91
87
|
export * from './components/Tooltip';
|
|
92
88
|
export * from './components/Typography';
|
|
@@ -2,13 +2,13 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
2
2
|
@mixin stickytable($selector, $columns: 1, $lefts: $defaultLefts) {
|
|
3
3
|
#{$selector} {
|
|
4
4
|
tbody {
|
|
5
|
-
font-size:
|
|
5
|
+
font-size: 12px;
|
|
6
6
|
}
|
|
7
7
|
tbody tr:nth-of-type(odd) td {
|
|
8
|
-
background-color: var(--farm-
|
|
8
|
+
background-color: var(--farm-bw-black-5);
|
|
9
9
|
}
|
|
10
10
|
tr td {
|
|
11
|
-
background-color: white;
|
|
11
|
+
background-color: var(--farm-bw-white);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
tr:not(:last-child) td,
|
|
@@ -41,7 +41,7 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
41
41
|
th:nth-child(#{$i}) {
|
|
42
42
|
position: sticky;
|
|
43
43
|
z-index: 4;
|
|
44
|
-
background-color: white;
|
|
44
|
+
background-color: var(--farm-bw-white);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -53,6 +53,10 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
tr td:first-child, tr th:first-child {
|
|
57
|
+
padding-left: 24px;
|
|
58
|
+
}
|
|
59
|
+
|
|
56
60
|
.v-chip {
|
|
57
61
|
font-size: 0.75rem;
|
|
58
62
|
padding: 0 1.5rem;
|
|
@@ -68,14 +72,14 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
th[role='columnheader'] {
|
|
71
|
-
color: var(--farm-secondary-
|
|
75
|
+
color: var(--farm-secondary-green-darken);
|
|
72
76
|
font-size: 14px;
|
|
73
77
|
font-weight: 700;
|
|
74
78
|
text-transform: uppercase;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
td {
|
|
78
|
-
color: var(--farm-
|
|
82
|
+
color: var(--farm-bw-black);
|
|
79
83
|
font-size: 14px;
|
|
80
84
|
font-weight: 400;
|
|
81
85
|
}
|
|
@@ -102,7 +106,7 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
102
106
|
|
|
103
107
|
.v-data-table__checkbox .mdi {
|
|
104
108
|
margin-left: 0;
|
|
105
|
-
font-size:
|
|
109
|
+
font-size: 22px;
|
|
106
110
|
margin-left: -2px;
|
|
107
111
|
}
|
|
108
112
|
|
|
@@ -111,5 +115,7 @@ $defaultLefts: 0, 4rem, 4rem;
|
|
|
111
115
|
height: 20px;
|
|
112
116
|
margin-right: 0 !important;
|
|
113
117
|
}
|
|
118
|
+
|
|
119
|
+
|
|
114
120
|
}
|
|
115
121
|
}
|