@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.
- package/dist/front-mfe-components.common.js +1237 -1139
- 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 +1237 -1139
- 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 +35 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +4 -4
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +2 -0
- package/src/components/Buttons/ExportButton/ExportButton.vue +1 -2
- 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 +3 -3
- package/src/components/ContextMenu/ContextMenu.vue +14 -2
- 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/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/ResourceMetaInfo/ResourceMetaInfo.vue +8 -8
- package/src/components/Select/Select.scss +4 -0
- package/src/components/Select/Select.vue +4 -0
- package/src/components/Stepper/StepperHeader/StepperHeader.scss +7 -7
- 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 +3 -3
- package/src/components/Tabs/Tabs.scss +24 -10
- package/src/components/Tabs/Tabs.vue +45 -24
- 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 +0 -3
- package/src/scss/Sticky-table.scss +8 -6
- 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
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Switch from './Switcher';
|
|
2
|
+
import baseThemeColors from '../../configurations/_theme-colors-base.scss';
|
|
3
|
+
const colors = Object.keys(baseThemeColors);
|
|
2
4
|
|
|
3
5
|
export default {
|
|
4
6
|
title: 'Form/Switcher',
|
|
@@ -58,3 +60,34 @@ export const OffDisabled = () => ({
|
|
|
58
60
|
<farm-switcher v-model="selectedValue" block :disabled="true" />
|
|
59
61
|
</div>`,
|
|
60
62
|
});
|
|
63
|
+
|
|
64
|
+
export const Colors = () => ({
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
colors,
|
|
68
|
+
selectedValue: true,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
template: `
|
|
72
|
+
<farm-row>
|
|
73
|
+
<farm-col
|
|
74
|
+
cols="12"
|
|
75
|
+
md="3"
|
|
76
|
+
v-for="color in colors"
|
|
77
|
+
:key="'color_' + color"
|
|
78
|
+
>
|
|
79
|
+
<farm-bodytext>{{ color }}</farm-bodytext>
|
|
80
|
+
<farm-switcher
|
|
81
|
+
v-model="selectedValue"
|
|
82
|
+
:color="color"
|
|
83
|
+
/>
|
|
84
|
+
<farm-caption>Desabilitado</farm-caption>
|
|
85
|
+
<farm-switcher
|
|
86
|
+
disabled
|
|
87
|
+
v-model="selectedValue"
|
|
88
|
+
:color="color"
|
|
89
|
+
/>
|
|
90
|
+
</farm-col>
|
|
91
|
+
|
|
92
|
+
</farm-row>`,
|
|
93
|
+
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
:class="{ 'farm-switch': true }"
|
|
4
4
|
role="checkbox"
|
|
5
|
+
v-bind="$props"
|
|
5
6
|
@click="toggle"
|
|
6
7
|
@keydown.space.prevent="toggle"
|
|
7
8
|
>
|
|
@@ -10,11 +11,31 @@
|
|
|
10
11
|
</div>
|
|
11
12
|
</template>
|
|
12
13
|
<script lang="ts">
|
|
13
|
-
import Vue from 'vue';
|
|
14
|
+
import Vue, { PropType } from 'vue';
|
|
14
15
|
|
|
15
16
|
export default Vue.extend({
|
|
16
17
|
name: 'farm-switcher',
|
|
17
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
|
+
| 'gray'
|
|
36
|
+
>,
|
|
37
|
+
default: 'primary',
|
|
38
|
+
},
|
|
18
39
|
/**
|
|
19
40
|
* v-model binding
|
|
20
41
|
*/
|
|
@@ -37,8 +58,8 @@ export default Vue.extend({
|
|
|
37
58
|
return {
|
|
38
59
|
'farm-switch--selected': this.value && !this.isDisabled,
|
|
39
60
|
'farm-switch--idle': !this.value && !this.isDisabled,
|
|
40
|
-
'farm-switch--disabled-on': this.value && this.isDisabled,
|
|
41
|
-
'farm-switch--disabled-off': !this.value && this.isDisabled,
|
|
61
|
+
'farm-switch--disabled-on': this.value && this.isDisabled,
|
|
62
|
+
'farm-switch--disabled-off': !this.value && this.isDisabled,
|
|
42
63
|
};
|
|
43
64
|
},
|
|
44
65
|
indicatorStyles() {
|
|
@@ -50,6 +50,8 @@ export const Multi = () => ({
|
|
|
50
50
|
{ label: 'Novo', icon: { type: 'open-in-new' } },
|
|
51
51
|
{ label: 'Editar', icon: { color: 'secondary', type: 'open-in-new' } },
|
|
52
52
|
{ label: 'Remover', icon: { color: 'error', type: 'delete' } },
|
|
53
|
+
{ label: 'Outro', icon: { color: 'black', type: 'cog' } },
|
|
54
|
+
{ label: 'Book', icon: { color: 'gray', type: 'book' } },
|
|
53
55
|
],
|
|
54
56
|
};
|
|
55
57
|
},
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<template v-slot:activator>
|
|
7
7
|
<farm-btn
|
|
8
8
|
icon
|
|
9
|
-
title="
|
|
10
|
-
color="secondary"
|
|
9
|
+
title="Ver opções"
|
|
10
|
+
color="secondary-green"
|
|
11
11
|
:disabled="disabled"
|
|
12
12
|
@click="toggleValue"
|
|
13
13
|
>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<farm-icon v-if="item.icon" size="sm" :color="item.icon.color || 'primary'">
|
|
27
27
|
{{ item.icon.type }}
|
|
28
28
|
</farm-icon>
|
|
29
|
-
<farm-caption bold tag="span">{{ item.label }}</farm-caption>
|
|
29
|
+
<farm-caption bold tag="span" :color="item.icon.color || 'primary'">{{ item.label }}</farm-caption>
|
|
30
30
|
</farm-listitem>
|
|
31
31
|
</farm-list>
|
|
32
32
|
</farm-contextmenu>
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
@import '../../configurations/theme-colors';
|
|
2
|
+
|
|
3
|
+
.farm-tabs {
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
1
6
|
.tabs {
|
|
2
7
|
display: flex;
|
|
8
|
+
margin-bottom: -1px;
|
|
3
9
|
|
|
4
10
|
&__tab {
|
|
5
|
-
border-bottom: 1px solid var(--farm-
|
|
11
|
+
border-bottom: 1px solid var(--farm-primary-lighten);
|
|
6
12
|
cursor: pointer;
|
|
7
13
|
display: inline-flex;
|
|
8
|
-
padding:
|
|
14
|
+
padding: 18px 24px 14px;
|
|
9
15
|
height: 54px;
|
|
10
|
-
|
|
16
|
+
transition: all 0.5s ease;
|
|
11
17
|
&:hover {
|
|
12
|
-
background-color:
|
|
18
|
+
background-color: transparentize(themeColor('primary', 'base'), 0.86);
|
|
19
|
+
|
|
20
|
+
div.rounded-circle {
|
|
21
|
+
opacity: 0.86;
|
|
22
|
+
}
|
|
13
23
|
}
|
|
14
24
|
|
|
15
25
|
span {
|
|
@@ -17,14 +27,11 @@
|
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
&--selected {
|
|
20
|
-
border-bottom: 4px solid var(--farm-primary-base);
|
|
21
|
-
transition: border-bottom 0.2s ease-in-out;
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
background-color: var(--farm-primary-lighten);
|
|
25
|
-
}
|
|
31
|
+
border-bottom: 4px solid var(--farm-primary-base);
|
|
26
32
|
|
|
27
33
|
span {
|
|
34
|
+
font-size: 14px;
|
|
28
35
|
font-weight: 500;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
@@ -47,12 +54,19 @@
|
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
|
|
57
|
+
.farm-tabs {
|
|
58
|
+
border-bottom: 1px solid var(--farm-primary-lighten);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
50
62
|
div.rounded-circle {
|
|
51
63
|
background-color: var(--farm-gray-lighten);
|
|
52
64
|
width: 24px;
|
|
53
65
|
height: 24px;
|
|
66
|
+
margin-top: -2px;
|
|
67
|
+
margin-left: -2px;
|
|
54
68
|
|
|
55
69
|
&.is-selected {
|
|
56
70
|
background-color: var(--farm-primary-base);
|
|
57
71
|
}
|
|
58
|
-
}
|
|
72
|
+
}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="tabs"
|
|
3
|
-
<div
|
|
4
|
-
v-for="(tab, index) in tabs"
|
|
5
|
-
class="tabs__tab"
|
|
6
|
-
:key="index"
|
|
7
|
-
:class="{ hideCounter: !showCounter, 'tabs__tab--selected': isSelected(index) }"
|
|
8
|
-
@click="changeTab(tab, index)"
|
|
9
|
-
>
|
|
2
|
+
<div class="farm-tabs">
|
|
3
|
+
<div class="tabs" :class="{ 'tabs--disabled': !allowUserChange }">
|
|
10
4
|
<div
|
|
11
|
-
v-
|
|
12
|
-
class="
|
|
13
|
-
:
|
|
5
|
+
v-for="(tab, index) in tabs"
|
|
6
|
+
class="tabs__tab"
|
|
7
|
+
:key="index"
|
|
8
|
+
:class="{ hideCounter: !showCounter, 'tabs__tab--selected': isSelected(index) }"
|
|
9
|
+
@click="changeTab(tab, index)"
|
|
14
10
|
>
|
|
11
|
+
<div
|
|
12
|
+
v-if="showCounter"
|
|
13
|
+
class="
|
|
14
|
+
mr-2
|
|
15
|
+
rounded-circle
|
|
16
|
+
d-inline-flex
|
|
17
|
+
align-center
|
|
18
|
+
justify-center
|
|
19
|
+
white--text
|
|
20
|
+
"
|
|
21
|
+
:class="{ 'is-selected': isSelected(index) }"
|
|
22
|
+
>
|
|
23
|
+
<farm-subtitle
|
|
24
|
+
color="white"
|
|
25
|
+
tag="span"
|
|
26
|
+
:type="2"
|
|
27
|
+
:color-variation="isSelected(index) ? 'base' : 'darken'"
|
|
28
|
+
>
|
|
29
|
+
{{ index + 1 }}
|
|
30
|
+
</farm-subtitle>
|
|
31
|
+
</div>
|
|
15
32
|
<farm-subtitle
|
|
16
|
-
color="white"
|
|
17
33
|
tag="span"
|
|
18
34
|
:type="2"
|
|
35
|
+
:color="isSelected(index) ? 'primary' : 'gray'"
|
|
19
36
|
:color-variation="isSelected(index) ? 'base' : 'darken'"
|
|
20
37
|
>
|
|
21
|
-
{{
|
|
38
|
+
{{ forceUppercase ? tab.name.toUpperCase() : tab.name }}
|
|
22
39
|
</farm-subtitle>
|
|
23
40
|
</div>
|
|
24
|
-
<farm-subtitle
|
|
25
|
-
tag="span"
|
|
26
|
-
:type="2"
|
|
27
|
-
:color="isSelected(index) ? 'primary' : 'gray'"
|
|
28
|
-
:color-variation="isSelected(index) ? 'base' : 'darken'"
|
|
29
|
-
>
|
|
30
|
-
{{ tab.name }}
|
|
31
|
-
</farm-subtitle>
|
|
32
41
|
</div>
|
|
33
42
|
</div>
|
|
34
43
|
</template>
|
|
@@ -37,9 +46,11 @@
|
|
|
37
46
|
import Vue from 'vue';
|
|
38
47
|
export default Vue.extend({
|
|
39
48
|
name: 'farm-tabs',
|
|
40
|
-
data
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
selected: 0,
|
|
52
|
+
};
|
|
53
|
+
},
|
|
43
54
|
props: {
|
|
44
55
|
tabs: {
|
|
45
56
|
type: Array,
|
|
@@ -58,6 +69,9 @@ export default Vue.extend({
|
|
|
58
69
|
type: Boolean,
|
|
59
70
|
default: true,
|
|
60
71
|
},
|
|
72
|
+
/**
|
|
73
|
+
* Initial tab selected
|
|
74
|
+
*/
|
|
61
75
|
initialSelect: {
|
|
62
76
|
type: Number,
|
|
63
77
|
default: 0,
|
|
@@ -66,6 +80,13 @@ export default Vue.extend({
|
|
|
66
80
|
type: Boolean,
|
|
67
81
|
default: true,
|
|
68
82
|
},
|
|
83
|
+
/**
|
|
84
|
+
* Force uppercase in tab
|
|
85
|
+
*/
|
|
86
|
+
forceUppercase: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: true,
|
|
89
|
+
},
|
|
69
90
|
},
|
|
70
91
|
methods: {
|
|
71
92
|
isSelected(index) {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: 8px;
|
|
14
14
|
border: 1px solid;
|
|
15
|
-
border-color: var(--farm-
|
|
15
|
+
border-color: var(--farm-bw-black-10);
|
|
16
16
|
min-height: 36px;
|
|
17
17
|
border-radius: 5px;
|
|
18
18
|
padding: 8px 0 0 8px;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
& > textarea {
|
|
24
24
|
flex: 1;
|
|
25
25
|
outline: none;
|
|
26
|
-
color: var(--farm-
|
|
26
|
+
color: var(--farm-bw-black-50);
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
font-weight: 400;
|
|
29
29
|
max-width: 100%;
|
|
@@ -31,9 +31,13 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
&--focused .farm-textarea--textarea {
|
|
35
|
+
border-color: var(--farm-bw-black-30);
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
&--disabled {
|
|
35
39
|
textarea {
|
|
36
|
-
color: var(--farm-
|
|
40
|
+
color: var(--farm-bw-black-30);
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: 8px;
|
|
14
14
|
border: 1px solid;
|
|
15
|
-
border-color: var(--farm-
|
|
15
|
+
border-color: var(--farm-bw-black-10);
|
|
16
16
|
height: 36px;
|
|
17
17
|
border-radius: 5px;
|
|
18
18
|
padding: 8px;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
& > input {
|
|
27
27
|
flex: 1;
|
|
28
28
|
outline: none;
|
|
29
|
-
color: var(--farm-
|
|
29
|
+
color: var(--farm-bw-black-50);
|
|
30
30
|
font-size: 12px;
|
|
31
31
|
font-weight: 400;
|
|
32
32
|
max-width: 100%;
|
|
@@ -39,12 +39,16 @@
|
|
|
39
39
|
width: 100%;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
&--focused .farm-textfield--input {
|
|
43
|
+
border-color: var(--farm-bw-black-30);
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
&--disabled {
|
|
43
47
|
input {
|
|
44
|
-
color: var(--farm-
|
|
48
|
+
color: var(--farm-bw-black-30);
|
|
45
49
|
}
|
|
46
50
|
.farm-icon {
|
|
47
|
-
color: var(--farm-
|
|
51
|
+
color: var(--farm-bw-black-30);
|
|
48
52
|
cursor: default;
|
|
49
53
|
}
|
|
50
54
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
'farm-textfield--touched': isTouched,
|
|
8
8
|
'farm-textfield--blured': isBlured,
|
|
9
9
|
'farm-textfield--error': hasError,
|
|
10
|
+
'farm-textfield--focused': isFocus && !readonly,
|
|
10
11
|
'farm-textfield--disabled': disabled,
|
|
11
12
|
'farm-textfield--hiddendetails': hideDetails,
|
|
12
13
|
'farm-textfield--uppercase': isUppercase,
|
|
@@ -8,14 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
.farm-tooltip__popup {
|
|
10
10
|
background-color: rgba(themeColor('primary'), 0.95);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
&.farm-tooltip--#{$color} {
|
|
15
|
-
background-color: rgba(themeColor($color), 0.95);
|
|
16
|
-
}
|
|
11
|
+
@each $color in $theme-colors-list {
|
|
12
|
+
&.farm-tooltip--#{$color} {
|
|
13
|
+
background-color: rgba(themeColor($color), 0.95);
|
|
17
14
|
}
|
|
18
15
|
}
|
|
16
|
+
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
.farm-tooltip__popup {
|
|
@@ -26,10 +24,10 @@
|
|
|
26
24
|
width: 160px;
|
|
27
25
|
contain: content;
|
|
28
26
|
color: white;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
font-
|
|
32
|
-
font-
|
|
27
|
+
border-radius: 5px;
|
|
28
|
+
font-family: 'Manrope', sans-serif !important;
|
|
29
|
+
font-size: 12px;
|
|
30
|
+
font-weight: 500px;
|
|
33
31
|
padding: 8px 12px;
|
|
34
32
|
display: block;
|
|
35
33
|
|
|
@@ -33,16 +33,18 @@ export default Vue.extend({
|
|
|
33
33
|
type: String as PropType<
|
|
34
34
|
| 'primary'
|
|
35
35
|
| 'secondary'
|
|
36
|
+
| 'secondary-green'
|
|
37
|
+
| 'secondary-golden'
|
|
36
38
|
| 'neutral'
|
|
37
39
|
| 'info'
|
|
38
40
|
| 'success'
|
|
39
41
|
| 'error'
|
|
40
42
|
| 'warning'
|
|
41
|
-
| 'success'
|
|
42
43
|
| 'extra-1'
|
|
43
44
|
| 'extra-2'
|
|
45
|
+
| 'gray'
|
|
44
46
|
>,
|
|
45
|
-
default: '
|
|
47
|
+
default: 'gray',
|
|
46
48
|
},
|
|
47
49
|
/**
|
|
48
50
|
* Control visibility
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.farm-bodytext {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
&--1 {
|
|
3
|
+
letter-spacing: 0.5px;
|
|
4
|
+
}
|
|
5
|
+
&--2 {
|
|
6
|
+
letter-spacing: 0.5px;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.farm-subtitle {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
&--1 {
|
|
3
|
+
letter-spacing: 0.5px;
|
|
4
|
+
}
|
|
5
|
+
&--2 {
|
|
6
|
+
letter-spacing: 0.5px;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -22,7 +22,10 @@ export default Vue.extend({
|
|
|
22
22
|
/**
|
|
23
23
|
* Variation of the caption
|
|
24
24
|
*/
|
|
25
|
-
variation: {
|
|
25
|
+
variation: {
|
|
26
|
+
type: String as PropType<'regular' | 'medium' | 'semiBold'>,
|
|
27
|
+
default: 'medium',
|
|
28
|
+
},
|
|
26
29
|
},
|
|
27
30
|
setup(props) {
|
|
28
31
|
const { variation } = toRefs(props);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
.farm-heading-- {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
2
|
+
&h1 {
|
|
3
|
+
letter-spacing: 0.5px;
|
|
4
|
+
}
|
|
5
|
+
&h2 {
|
|
6
|
+
letter-spacing: 0.5px;
|
|
7
|
+
}
|
|
8
|
+
&h3 {
|
|
9
|
+
letter-spacing: 0.5px;
|
|
10
|
+
}
|
|
11
|
+
&h4 {
|
|
12
|
+
letter-spacing: 0.75px;
|
|
13
|
+
}
|
|
14
|
+
&h5 {
|
|
15
|
+
letter-spacing: 0.75px;
|
|
16
|
+
}
|
|
17
|
+
&h6 {
|
|
18
|
+
letter-spacing: 0.75px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const Keys = {
|
|
2
|
-
1: { weight:
|
|
3
|
-
2: { weight: 300, size: '
|
|
4
|
-
3: { weight:
|
|
5
|
-
4: { weight:
|
|
6
|
-
5: { weight:
|
|
2
|
+
1: { weight: 200, size: '60px' },
|
|
3
|
+
2: { weight: 300, size: '52px' },
|
|
4
|
+
3: { weight: 600, size: '44px' },
|
|
5
|
+
4: { weight: 500, size: '32px' },
|
|
6
|
+
5: { weight: 600, size: 'xl' },
|
|
7
7
|
6: { weight: 500, size: 'lg' },
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Small from './Small';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Typography/Small',
|
|
5
|
+
component: Small,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Small<br />
|
|
10
|
+
selector: <em>farm-bodysmall</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
12
|
+
`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
viewMode: 'docs',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Primary = () => ({
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
variations: ['regular', 'medium', 'bold'],
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
template: `<div >
|
|
26
|
+
<div v-for="variation in variations" :key="variation">
|
|
27
|
+
<farm-bodysmall :variation="variation">
|
|
28
|
+
Small {{ variation }}
|
|
29
|
+
</farm-bodysmall>
|
|
30
|
+
</div>
|
|
31
|
+
</div>`,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
Primary.storyName = 'Basic';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<farm-typography
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
v-on="$listeners"
|
|
5
|
+
:weight="weight"
|
|
6
|
+
:size="size"
|
|
7
|
+
:key="key"
|
|
8
|
+
:class="{ 'farm-small': true, [`farm-small--${variation}`]: true }"
|
|
9
|
+
>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</farm-typography>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
import Vue, { computed, ref, watch, toRefs, PropType } from 'vue';
|
|
15
|
+
|
|
16
|
+
import { Keys } from './configurations';
|
|
17
|
+
|
|
18
|
+
export default Vue.extend({
|
|
19
|
+
inheritAttrs: true,
|
|
20
|
+
name: 'farm-bodysmall',
|
|
21
|
+
props: {
|
|
22
|
+
/**
|
|
23
|
+
* Variation of the small
|
|
24
|
+
*/
|
|
25
|
+
variation: { type: String as PropType<'regular' | 'medium' | 'bold'>, default: 'medium' },
|
|
26
|
+
},
|
|
27
|
+
setup(props) {
|
|
28
|
+
const { variation } = toRefs(props);
|
|
29
|
+
const key = ref(variation.value);
|
|
30
|
+
|
|
31
|
+
watch(
|
|
32
|
+
() => props,
|
|
33
|
+
() => {
|
|
34
|
+
key.value = variation.value;
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const config = computed(() => Keys[key.value]);
|
|
39
|
+
const weight = computed(() => config.value.weight);
|
|
40
|
+
const size = computed(() => config.value.size);
|
|
41
|
+
return { weight, size, key, variation };
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
@import 'Small';
|
|
47
|
+
</style>
|