@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
@@ -7,24 +7,41 @@
7
7
  >
8
8
  <farm-icon size="16px">{{ mdiIconName }}</farm-icon>
9
9
  <div>
10
- <farm-caption variation="regular">
10
+ <farm-bodysmall
11
+ variation="regular"
12
+ color="black"
13
+ colorVariation="50"
14
+ class="logger__item--spacing-bottom"
15
+ >
11
16
  {{ item.formattedDate }}
12
- </farm-caption>
13
- <farm-bodytext :type="2" variation="bold">
17
+ </farm-bodysmall>
18
+ <farm-bodytext
19
+ :type="2"
20
+ variation="bold"
21
+ color="black"
22
+ colorVariation="50"
23
+ class="logger__item--spacing-bottom"
24
+ >
14
25
  {{ item.message }}
15
26
  </farm-bodytext>
16
- <farm-caption variation="regular" v-if="item.userName">
17
- <farm-icon color="black" size="xs">account-circle</farm-icon>
27
+ <farm-bodysmall
28
+ variation="regular"
29
+ color="black"
30
+ colorVariation="50"
31
+ v-if="item.userName"
32
+ >
33
+ <farm-icon color="black" variation="50" size="xs">account-circle</farm-icon>
18
34
  {{ item.userName }}
19
- </farm-caption>
35
+ </farm-bodysmall>
20
36
  <farm-caption variation="regular">
21
37
  {{ item.extraMessage }}
22
38
  </farm-caption>
23
39
  </div>
24
40
  <farm-btn
25
41
  v-if="hasDetails"
26
- plain
42
+ outlined
27
43
  title="Ver Detalhes"
44
+ class="logger__item--button"
28
45
  :color="buttonColor"
29
46
  @click="callDetails"
30
47
  >
@@ -69,7 +86,7 @@ export default Vue.extend({
69
86
  return 'error';
70
87
  }
71
88
 
72
- return 'secondary';
89
+ return 'primary';
73
90
  },
74
91
  hasDetails(): boolean {
75
92
  return !!this.item.details;
@@ -73,7 +73,7 @@ describe('LoggerItem component', () => {
73
73
  status: 'primary',
74
74
  },
75
75
  });
76
- expect(component.buttonColor).toEqual('secondary');
76
+ expect(component.buttonColor).toEqual('primary');
77
77
  });
78
78
 
79
79
  it('Should not have a detail button', async () => {
@@ -61,16 +61,16 @@ export const Application = () => ({
61
61
  Extra filters
62
62
  </farm-col>
63
63
  <farm-col cols="12" md="3">
64
- <farm-textfield />
64
+ <farm-textfield-v2 />
65
65
  </farm-col>
66
66
  <farm-col cols="12" md="3">
67
- <farm-textfield />
67
+ <farm-textfield-v2 />
68
68
  </farm-col>
69
69
  <farm-col cols="12" md="3">
70
- <farm-textfield />
70
+ <farm-textfield-v2 />
71
71
  </farm-col>
72
72
  <farm-col cols="12" md="3">
73
- <farm-textfield />
73
+ <farm-textfield-v2 />
74
74
  </farm-col>
75
75
  </farm-row>
76
76
  </div>`,
@@ -17,14 +17,14 @@
17
17
  left: 0;
18
18
  width: 100vw;
19
19
  height: 100vh;
20
- opacity: 0.46;
21
- background-color: rgb(33, 33, 33) !important;
20
+ opacity: 0.36;
21
+ background-color: var(--farm-gray-darken);
22
22
  z-index: 101;
23
23
  }
24
24
 
25
25
  &--container {
26
26
  background-color: white;
27
- border-radius: 8px;
27
+ border-radius: 4px;
28
28
  max-height: calc(100vh - 48px);
29
29
  position: relative;
30
30
  overflow: hidden;
@@ -92,4 +92,30 @@ export const Slot = () => ({
92
92
  reabrir
93
93
  </farm-btn>
94
94
  </div>`,
95
+ });
96
+
97
+ export const OnConfirm = () => ({
98
+ data() {
99
+ return {
100
+ showPrompt: false,
101
+ };
102
+ },
103
+ methods: {
104
+ onConfirm() {
105
+ alert('On confirm triggered');
106
+ }
107
+ },
108
+ template: `<div>
109
+ <farm-prompt-user
110
+ match="CONFIRMAR"
111
+ title="Título"
112
+ subtitle="Digite CONFIRMAR para habilitar"
113
+ v-model="showPrompt"
114
+ @onConfirm="onConfirm"
115
+ />
116
+ click:
117
+ <farm-btn color="primary" @click="showPrompt = true;">
118
+ reabrir
119
+ </farm-btn>
120
+ </div>`,
95
121
  });
@@ -5,6 +5,9 @@
5
5
  </template>
6
6
  <template v-slot:content>
7
7
  <section class="modal-content">
8
+ <!--
9
+ @slot subtitle content
10
+ -->
8
11
  <slot name="subtitle"></slot>
9
12
  <farm-promptusertoconfirm
10
13
  v-if="inputVal"
@@ -60,6 +63,8 @@ export default Vue.extend({
60
63
  type: String as PropType<
61
64
  | 'primary'
62
65
  | 'secondary'
66
+ | 'secondary-green'
67
+ | 'secondary-golden'
63
68
  | 'neutral'
64
69
  | 'info'
65
70
  | 'success'
@@ -114,6 +119,11 @@ export default Vue.extend({
114
119
  this.inputVal = false;
115
120
  },
116
121
  confirm() {
122
+ /**
123
+ * input is correct filled and confirm button is triggered
124
+ *
125
+ * @event onConfirm
126
+ */
117
127
  this.$emit('onConfirm');
118
128
  this.inputVal = false;
119
129
  },
@@ -1,7 +1,7 @@
1
1
  section {
2
- border: 2px dashed var(--v-gray-lighten1);
2
+ border: 2px dashed var(--farm-primary-base);
3
3
  border-radius: 2rem;
4
- background-color: var(--v-gray-lighten4);
4
+ background-color: var(--farm-primary-lighten);
5
5
  padding: 1.5rem;
6
6
  position: relative;
7
7
  min-height: 12rem;
@@ -20,7 +20,7 @@ section {
20
20
  }
21
21
 
22
22
  &.highlight {
23
- background: var(--v-secondary-lighten5);
23
+ background: var(--farm-primary-lighten);
24
24
  opacity: 0.5;
25
25
  }
26
26
 
@@ -32,7 +32,7 @@ section {
32
32
  }
33
33
  p {
34
34
  font-weight: 600;
35
- color: var(--v-gray-base);
35
+ color: var(--farm-bw-black-50);
36
36
  }
37
37
  }
38
38
 
@@ -56,7 +56,7 @@ section {
56
56
  span {
57
57
  display: block;
58
58
  font-size: 24px;
59
- color: #fff;
59
+ color: var(--farm-bw-white);
60
60
  }
61
61
 
62
62
  @media screen and (max-width: 600px) {
@@ -83,9 +83,10 @@ section {
83
83
 
84
84
  .itemFilesStyled {
85
85
  width: 100%;
86
- background-color: #858585;
86
+ background-color: var(--farm-bw-black-5);
87
+ border: 1px solid var(--farm-bw-black-30);
87
88
  border-radius: 50px;
88
- color: white;
89
+ color: var(--farm-bw-white);
89
90
  display: flex;
90
91
  justify-content: space-between;
91
92
  align-items: center;
@@ -106,6 +107,10 @@ section {
106
107
  display: flex;
107
108
  align-items: center;
108
109
 
110
+ p{
111
+ margin-top: 2px;
112
+ }
113
+
109
114
  @media screen and (max-width: 600px) {
110
115
  display: block;
111
116
  text-align: center;
@@ -119,7 +124,7 @@ section {
119
124
  width: 15rem;
120
125
  span {
121
126
  font-size: 1.5rem;
122
- color: #fff;
127
+ color: var(--farm-bw-black-50);
123
128
  cursor: pointer;
124
129
  }
125
130
 
@@ -143,19 +148,21 @@ section {
143
148
  }
144
149
 
145
150
  .download-button.farm-btn {
146
- background-color: #858585 !important;
147
- color: #fff;
151
+ background-color: var(--farm-bw-black-30) !important;
152
+ color: var(--farm-bw-black-50);
148
153
  margin-right: 1rem;
149
154
 
150
155
  &__content {
151
- color: #fff;
156
+ color: var(--farm-bw-black-50);
152
157
  }
153
158
  }
154
159
 
155
160
  .download-button__icon {
156
- color: #fff !important;
161
+ color: var(--farm-bw-black-50) !important;
157
162
  }
158
163
 
164
+
165
+
159
166
  .upload-icon {
160
167
  cursor: pointer;
161
168
  }
@@ -60,3 +60,15 @@ export const InvalidFiles = () => ({
60
60
  @onInvalidFiles="onInvalidFiles" />
61
61
  </div>`,
62
62
  });
63
+
64
+ export const Reset = () => ({
65
+ methods: {
66
+ onReset() {
67
+ this.$refs.picker.reset();
68
+ }
69
+ },
70
+ template: `<div>
71
+ <farm-multiple-filepicker ref="picker" />
72
+ <farm-btn @click="onReset" class="mt-1">reset</farm-btn>
73
+ </div>`,
74
+ });
@@ -9,10 +9,12 @@
9
9
  @change="fileChange($event.target.files)"
10
10
  />
11
11
  <div v-if="!hasFiles" class="selectfile-container">
12
- <farm-icon class="upload-icon" size="lg" @click="addMoreFiles">
13
- cloud-upload
12
+ <farm-icon class="upload-icon" color="primary" size="lg" @click="addMoreFiles">
13
+ cloud-upload-outline
14
14
  </farm-icon>
15
- <p>Clique para selecionar ou arraste o arquivo aqui</p>
15
+ <farm-subtitle :type="2" variation="regular" color="primary">
16
+ Arraste e solte o arquivo <br/> ou clique aqui
17
+ </farm-subtitle>
16
18
  </div>
17
19
 
18
20
  <ul
@@ -25,18 +27,20 @@
25
27
  <li class="itemFilesStyled" v-for="file in downloadFiles" :key="file.id">
26
28
  <div class="itemFilesContentStyled">
27
29
  <div class="fileDocumentStyled">
28
- <farm-icon color="white" size="md">file</farm-icon>
30
+ <farm-icon color="black" variation="50" size="sm">attachment</farm-icon>
29
31
  </div>
30
32
  <div>
31
- <span clas="textStyled">
33
+ <farm-bodysmall color="black" color-variation="50">
32
34
  Arquivo selecionado: {{ file.name }} ({{ sizeOf(file.size) }})
33
- </span>
35
+ </farm-bodysmall>
34
36
  </div>
35
37
  </div>
36
38
  <div class="itemFilesContentButtonStyled">
37
39
  <farm-btn
38
- class="download-button"
39
40
  plain
41
+ color="black"
42
+ variation="50"
43
+ class="download-button"
40
44
  title="Baixar Arquivo"
41
45
  @click.prevent="onDownload(file.id)"
42
46
  >
@@ -53,20 +57,22 @@
53
57
  <ul class="listFilesStyled" v-if="files.length > 0">
54
58
  <li class="itemFilesStyled" v-for="(file, index) in files" :key="index">
55
59
  <div class="itemFilesContentStyled">
60
+
56
61
  <div class="fileDocumentStyled">
57
- <farm-icon color="white" size="md">file</farm-icon>
62
+ <farm-icon color="black" variation="50" size="sm">attachment</farm-icon>
58
63
  </div>
59
64
  <div>
60
- <span clas="textStyled">
65
+ <farm-bodysmall color="black" color-variation="50">
61
66
  Arquivo selecionado: {{ file.name }} ({{ sizeOf(file.size) }})
62
- </span>
67
+ </farm-bodysmall>
63
68
  </div>
64
69
  </div>
65
70
  <div class="itemFilesContentButtonStyled">
66
71
  <farm-btn
67
72
  icon
68
73
  title="Remover"
69
- color="neutral"
74
+ color="black"
75
+ variation="50"
70
76
  size="md"
71
77
  @click.prevent="remove(index)"
72
78
  >
@@ -162,6 +168,7 @@ export default Vue.extend({
162
168
  },
163
169
  reset(): void {
164
170
  this.$refs.container.querySelector('input').value = '';
171
+ this.files = [];
165
172
  },
166
173
  fileChange(fileList): void {
167
174
  this.files.push(...fileList);
@@ -69,6 +69,15 @@ describe('MultipleFilePicker component', () => {
69
69
  });
70
70
  });
71
71
 
72
+ describe('reset', () => {
73
+ it('should reset', () => {
74
+ const file = new File([], 'test');
75
+ component.files = [file];
76
+ component.reset();
77
+ expect(component.files.length).toEqual(0);
78
+ });
79
+ });
80
+
72
81
  describe('remove', () => {
73
82
  it('should remove an item and call reset method when files length is 1', () => {
74
83
  const spy = jest.spyOn(component, 'reset');
@@ -16,6 +16,8 @@ export default Vue.extend({
16
16
  type: String as PropType<
17
17
  | 'primary'
18
18
  | 'secondary'
19
+ | 'secondary-green'
20
+ | 'secondary-golden'
19
21
  | 'neutral'
20
22
  | 'info'
21
23
  | 'success'
@@ -34,6 +36,8 @@ export default Vue.extend({
34
36
  type: String as PropType<
35
37
  | 'primary'
36
38
  | 'secondary'
39
+ | 'secondary-green'
40
+ | 'secondary-golden'
37
41
  | 'neutral'
38
42
  | 'info'
39
43
  | 'success'
@@ -2,7 +2,7 @@
2
2
  @import '../../configurations/theme-colors';
3
3
 
4
4
  .farm-radio-wrapper {
5
- align-items: baseline;
5
+ align-items: center;
6
6
  display: flex;
7
7
  }
8
8
 
@@ -80,15 +80,29 @@ input[type='radio'] {
80
80
  }
81
81
  }
82
82
 
83
- @each $size, $value in $sizes {
83
+ @each $size,
84
+ $value in $sizes {
84
85
  #{'input[type="radio"][size=' + $size + ']'} {
85
86
  width: $value;
86
87
  height: $value;
87
88
 
88
89
  &::before {
89
90
  content: '';
90
- width: $value / 2;
91
- height: $value / 2;
91
+
92
+ @if $value == 14px {
93
+ width: 6px;
94
+ height: 6px;
95
+ }
96
+
97
+ @else {
98
+ width: $value / 2;
99
+ height: $value / 2;
100
+ }
92
101
  }
93
102
  }
94
103
  }
104
+
105
+ .farm-label {
106
+ margin-left: 10px;
107
+ margin-bottom: 0;
108
+ }
@@ -68,7 +68,8 @@ export const Reset = () => ({
68
68
  <farm-radio v-model="v" value="2" />
69
69
  <farm-radio v-model="v" value="3" />
70
70
  v-model: {{ v }}
71
- <farm-btn @click="reset">reset</farm-btn>
71
+ <farm-btn @click="reset">reset by method</farm-btn>
72
+ <farm-btn @click="v = null">reset by value</farm-btn>
72
73
  </farm-form>
73
74
  </div>`,
74
75
  });
@@ -14,7 +14,7 @@
14
14
  v-bind="$attrs"
15
15
  @click="onClick"
16
16
  />
17
- <farm-label v-if="label" class="ml-2" :for="id">
17
+ <farm-label v-if="label" :for="id">
18
18
  {{ label }}
19
19
  </farm-label>
20
20
  </div>
@@ -50,6 +50,8 @@ export default Vue.extend({
50
50
  type: String as PropType<
51
51
  | 'primary'
52
52
  | 'secondary'
53
+ | 'secondary-green'
54
+ | 'secondary-golden'
53
55
  | 'neutral'
54
56
  | 'info'
55
57
  | 'success'
@@ -1,28 +1,28 @@
1
1
  <template>
2
2
  <div class="farm-resource-metainfo">
3
3
  <div v-if="showCreate">
4
- <farm-icon color="gray" size="sm">calendar-blank</farm-icon>
5
- <farm-caption color="gray" variation="regular">
4
+ <farm-icon color="black" variation="40" size="sm">calendar-blank</farm-icon>
5
+ <farm-caption color="black" color-variation="40" variation="regular">
6
6
  Data de cadastro:
7
- <farm-caption color="gray" variation="medium" tag="span">
7
+ <farm-caption color="black" color-variation="40" variation="medium" tag="span">
8
8
  {{ formattedCreatedAt }}
9
9
  </farm-caption>
10
10
  </farm-caption>
11
11
  </div>
12
12
  <div v-if="showUpdate">
13
- <farm-icon color="gray" size="sm">history</farm-icon>
13
+ <farm-icon color="black" variation="40" size="sm">history</farm-icon>
14
14
 
15
- <farm-caption color="gray" variation="regular">
15
+ <farm-caption color="black" color-variation="40" variation="regular">
16
16
  Última atualização feita por
17
- <farm-caption color="gray" variation="medium" tag="span">
17
+ <farm-caption color="black" color-variation="40" variation="medium" tag="span">
18
18
  {{ formattedUsername }}
19
19
  </farm-caption>
20
20
  , dia
21
- <farm-caption color="gray" variation="medium" tag="span">
21
+ <farm-caption color="black" color-variation="40" variation="medium" tag="span">
22
22
  {{ formattedUpdatedAt }}
23
23
  </farm-caption>
24
24
  às
25
- <farm-caption color="gray" variation="medium" tag="span">
25
+ <farm-caption color="black" color-variation="40" variation="medium" tag="span">
26
26
  {{ formattedUpdatedHours }}
27
27
  </farm-caption>
28
28
  </farm-caption>
@@ -28,6 +28,10 @@
28
28
  margin-right: 8px;
29
29
  }
30
30
 
31
+ :deep(.farm-listitem:hover .farm-typography) {
32
+ color: var(--farm-primary-base);
33
+ }
34
+
31
35
  :deep(.farm-listitem:hover .farm-checkbox .farm-icon) {
32
36
  color: var(--farm-primary-lighten);
33
37
  }
@@ -7,6 +7,7 @@
7
7
  'farm-textfield--blured': isBlured,
8
8
  'farm-textfield--error': hasError,
9
9
  'farm-textfield--disabled': disabled,
10
+ 'farm-textfield--focused': isFocus || isVisible,
10
11
  'farm-textfield--hiddendetails': hideDetails,
11
12
  }"
12
13
  v-if="!readonly && !disabled"
@@ -250,6 +251,9 @@ export default Vue.extend({
250
251
  newValue => {
251
252
  innerValue.value = newValue;
252
253
  errorBucket.value = [];
254
+ if(multiple.value && newValue === null || (Array.isArray(newValue) && newValue.length === 0)) {
255
+ multipleValues.value = [];
256
+ }
253
257
  validate(newValue);
254
258
  updateSelectedTextValue();
255
259
  emit('input', newValue);
@@ -17,7 +17,7 @@ $step-height: 64px;
17
17
  flex-direction: column;
18
18
  align-items: center;
19
19
  justify-items: center;
20
- color: var(--v-gray-lighten1);
20
+ color: var(--farm-bw-black-5);
21
21
  font-size: 14px;
22
22
  font-weight: 700;
23
23
 
@@ -26,7 +26,7 @@ $step-height: 64px;
26
26
  }
27
27
 
28
28
  &.stepper__header-step--current {
29
- @include stepperHeaderStepColor(#5089de);
29
+ @include stepperHeaderStepColor(var(--farm-info-base));
30
30
  }
31
31
 
32
32
  &.stepper__header-step--error {
@@ -36,7 +36,7 @@ $step-height: 64px;
36
36
  &.stepper__header-step--next {
37
37
  .farm-icon,
38
38
  .farm-icon__number {
39
- color: var(--farm-gray-base);
39
+ color: var(--farm-bw-black-50);
40
40
  }
41
41
  }
42
42
 
@@ -54,7 +54,7 @@ $step-height: 64px;
54
54
 
55
55
  border: none;
56
56
  margin: 16px -16px 0;
57
- background: var(--farm-gray-base);
57
+ background: var(--farm-bw-black-5);
58
58
 
59
59
  &.stepper__divider--previous {
60
60
  background: var(--farm-primary-base);
@@ -96,7 +96,7 @@ $step-height: 64px;
96
96
  height: 32px;
97
97
  margin: -24px 0 8px 16px;
98
98
  width: 1px;
99
- background-color: var(----farm-gray-lighten);
99
+ background-color: var(--farm-bw-black-5);
100
100
 
101
101
  &.stepper__divider--previous {
102
102
  background-color: var(--farm-primary-base);
@@ -109,7 +109,7 @@ $step-height: 64px;
109
109
 
110
110
  .farm-icon,
111
111
  .farm-icon__number {
112
- border: 1px solid var(--farm-gray-base);
112
+ border: 1px solid var(--farm-bw-black-5);
113
113
  border-radius: 50%;
114
114
  width: 32px;
115
115
  height: 32px;
@@ -122,6 +122,6 @@ $step-height: 64px;
122
122
 
123
123
  &:before {
124
124
  font-size: 16px;
125
- color: var(--v-gray-lighten1);
125
+ color: var(--farm-bw-black-50);
126
126
  }
127
127
  }
@@ -1,15 +1,25 @@
1
- .farm-switch--selected {
2
- background-color: var(--farm-primary-base);
1
+ @import '../../configurations/theme-colors';
2
+
3
+
4
+
5
+ .farm-switch {
6
+ @each $color in $theme-colors-list {
7
+ &#{'[color=' + $color + ']'} {
8
+ .farm-switch--selected {
9
+ background-color: themeColor($color);
10
+ }
11
+
12
+ .farm-switch--disabled-on {
13
+ background-color: rgba(themeColor($color), 0.27);
14
+ }
15
+ }
16
+ }
3
17
  }
4
18
 
5
19
  .farm-switch--idle {
6
20
  background-color: var(--farm-neutral-base);
7
21
  }
8
22
 
9
- .farm-switch--disabled-on {
10
- background-color: var(--farm-primary-lighten);
11
- }
12
-
13
23
  .farm-switch--disabled-off {
14
24
  background-color: var(--farm-neutral-lighten);
15
25
  }
@@ -17,7 +27,7 @@
17
27
  .farm-switch {
18
28
  display: inline-block;
19
29
  position: relative;
20
- cursor: pointer;
30
+
21
31
  width: 24px;
22
32
  height: 16px;
23
33
  border-radius: 9999px;
@@ -30,6 +40,13 @@
30
40
  display: block;
31
41
  }
32
42
 
43
+ cursor: pointer;
44
+
45
+ &:has(.farm-switch--disabled-on),
46
+ &:has(.farm-switch--disabled-off) {
47
+ cursor: default;
48
+ }
49
+
33
50
  }
34
51
 
35
52
  .farm-switch__background {
@@ -38,7 +55,6 @@
38
55
  margin-top: 0;
39
56
  height: 12px;
40
57
  width: 100%;
41
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
42
58
  transition: background-color .4s ease;
43
59
  }
44
60