@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.
Files changed (148) hide show
  1. package/dist/front-mfe-components.common.js +4146 -5381
  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 +4146 -5381
  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 +57 -18
  12. package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +49 -16
  13. package/src/components/Buttons/DefaultButton/DefaultButton.vue +3 -1
  14. package/src/components/Buttons/ExportButton/ExportButton.vue +2 -1
  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 +42 -29
  32. package/src/components/ContextMenu/ContextMenu.vue +20 -1
  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/DatePicker.vue +2 -3
  44. package/src/components/DatePicker/__tests__/DatePicker.spec.js +1 -1
  45. package/src/components/DatePicker/vDatePicker.scss +214 -0
  46. package/src/components/DialogFooter/DialogFooter.scss +1 -1
  47. package/src/components/DialogFooter/DialogFooter.stories.js +2 -2
  48. package/src/components/DialogFooter/DialogFooter.vue +1 -1
  49. package/src/components/DialogHeader/DialogHeader.scss +2 -3
  50. package/src/components/DialogHeader/DialogHeader.vue +4 -4
  51. package/src/components/Form/Form.stories.js +1 -1
  52. package/src/components/Icon/Icon.scss +6 -0
  53. package/src/components/Icon/Icon.stories.js +19 -1
  54. package/src/components/Icon/Icon.vue +8 -2
  55. package/src/components/IconBox/IconBox.stories.js +16 -0
  56. package/src/components/IconBox/IconBox.vue +17 -7
  57. package/src/components/IdCaption/IdCaption.vue +27 -13
  58. package/src/components/Label/Label.scss +17 -5
  59. package/src/components/Label/Label.stories.js +0 -1
  60. package/src/components/ListItem/ListItem.scss +5 -3
  61. package/src/components/ListItem/ListItem.vue +2 -0
  62. package/src/components/Logger/LoggerItem/LoggerItem.scss +9 -1
  63. package/src/components/Logger/LoggerItem/LoggerItem.vue +25 -8
  64. package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +1 -1
  65. package/src/components/MainFilter/MainFilter.stories.js +4 -4
  66. package/src/components/Modal/Modal.scss +3 -3
  67. package/src/components/ModalPromptUser/ModalPromptUser.stories.js +26 -0
  68. package/src/components/ModalPromptUser/ModalPromptUser.vue +10 -0
  69. package/src/components/MultipleFilePicker/MultipleFilePicker.scss +19 -12
  70. package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +12 -0
  71. package/src/components/MultipleFilePicker/MultipleFilePicker.vue +18 -11
  72. package/src/components/MultipleFilePicker/__tests__/MultipleFilePicker.spec.js +9 -0
  73. package/src/components/ProgressBar/ProgressBar.vue +4 -0
  74. package/src/components/Radio/Radio.scss +18 -4
  75. package/src/components/Radio/Radio.stories.js +2 -1
  76. package/src/components/Radio/Radio.vue +3 -1
  77. package/src/components/RangeDatePicker/RangeDatePicker.vue +0 -2
  78. package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +8 -8
  79. package/src/components/Select/Select.scss +4 -0
  80. package/src/components/Select/Select.vue +9 -1
  81. package/src/components/Stepper/StepperHeader/StepperHeader.scss +7 -7
  82. package/src/components/Stepper/StepperHeader/StepperHeader.vue +35 -36
  83. package/src/components/Switcher/Switcher.scss +24 -8
  84. package/src/components/Switcher/Switcher.stories.js +33 -0
  85. package/src/components/Switcher/Switcher.vue +24 -3
  86. package/src/components/TableContextMenu/TableContextMenu.scss +4 -9
  87. package/src/components/TableContextMenu/TableContextMenu.stories.js +2 -0
  88. package/src/components/TableContextMenu/TableContextMenu.vue +5 -4
  89. package/src/components/Tabs/Tabs.scss +69 -0
  90. package/src/components/Tabs/Tabs.stories.js +51 -4
  91. package/src/components/Tabs/Tabs.vue +59 -32
  92. package/src/components/Tabs/__tests__/Tabs.spec.js +54 -54
  93. package/src/components/Tabs/index.ts +1 -0
  94. package/src/components/TextArea/TextArea.scss +7 -3
  95. package/src/components/TextArea/TextArea.vue +1 -0
  96. package/src/components/TextFieldV2/TextFieldV2.scss +8 -4
  97. package/src/components/TextFieldV2/TextFieldV2.vue +1 -0
  98. package/src/components/Tooltip/Tooltip.scss +8 -10
  99. package/src/components/Tooltip/Tooltip.vue +4 -2
  100. package/src/components/Typography/BodyText/BodyText.scss +7 -7
  101. package/src/components/Typography/Caption/Caption.scss +7 -7
  102. package/src/components/Typography/Caption/Caption.stories.js +1 -1
  103. package/src/components/Typography/Caption/Caption.vue +4 -1
  104. package/src/components/Typography/Caption/configurations.ts +3 -2
  105. package/src/components/Typography/Heading/Heading.scss +19 -19
  106. package/src/components/Typography/Heading/configurations.ts +5 -5
  107. package/src/components/Typography/Small/Small.scss +3 -0
  108. package/src/components/Typography/Small/Small.stories.js +34 -0
  109. package/src/components/Typography/Small/Small.vue +47 -0
  110. package/src/components/Typography/Small/__tests__/Small.spec.js +31 -0
  111. package/src/components/Typography/Small/configurations.ts +7 -0
  112. package/src/components/Typography/Subtitle/Subtitle.scss +7 -7
  113. package/src/components/Typography/Typography.scss +10 -0
  114. package/src/components/Typography/Typography.stories.js +15 -2
  115. package/src/components/Typography/Typography.vue +6 -2
  116. package/src/components/Typography/index.ts +2 -1
  117. package/src/components/ValueCaption/ValueCaption.vue +2 -0
  118. package/src/components/layout/Line/Line.scss +15 -0
  119. package/src/components/layout/Line/Line.stories.js +28 -5
  120. package/src/components/layout/Line/Line.vue +37 -3
  121. package/src/configurations/_mixins.scss +1 -1
  122. package/src/configurations/_theme-colors-background.scss +10 -0
  123. package/src/configurations/_theme-colors-bw.scss +10 -0
  124. package/src/configurations/_theme-colors.scss +79 -48
  125. package/src/configurations/_variables.scss +2 -0
  126. package/src/examples/Colors.stories.js +39 -1
  127. package/src/examples/Colors.stories.scss +1 -1
  128. package/src/helpers/index.ts +2 -1
  129. package/src/helpers/isChildOfFixedElement.js +16 -0
  130. package/src/main.ts +1 -5
  131. package/src/scss/Sticky-table.scss +13 -7
  132. package/src/scss/VuejsDialog.scss +58 -51
  133. package/src/scss/cssVariablesGenerator.scss +17 -14
  134. package/src/scss/utils.scss +17 -251
  135. package/src/components/FilePicker/FilePicker.scss +0 -53
  136. package/src/components/FilePicker/FilePicker.stories.js +0 -14
  137. package/src/components/FilePicker/FilePicker.vue +0 -109
  138. package/src/components/FilePicker/__tests__/FilePicker.spec.js +0 -77
  139. package/src/components/FilePicker/index.ts +0 -3
  140. package/src/components/TextField/TextField.scss +0 -43
  141. package/src/components/TextField/TextField.stories.js +0 -104
  142. package/src/components/TextField/TextField.vue +0 -18
  143. package/src/components/TextField/index.ts +0 -4
  144. package/src/scss/ButtonOverrides.scss +0 -73
  145. package/src/scss/DefaultModal.scss +0 -89
  146. package/src/scss/DialogOverrides.scss +0 -94
  147. package/src/scss/FormOverrides.scss +0 -264
  148. package/src/scss/Status-Chip.scss +0 -34
@@ -1,10 +1,15 @@
1
1
  <template>
2
- <div :class="{
3
- 'farm-icon-box': true,
4
- [cssColorClass]: true,
5
- 'farm-icon-box--inverted': inverted,
6
- }" :size="size">
7
- <farm-icon :color="inverted ? 'white' : color" :size="size">{{ iconParsed }}</farm-icon>
2
+ <div
3
+ :class="{
4
+ 'farm-icon-box': true,
5
+ [cssColorClass]: true,
6
+ 'farm-icon-box--inverted': inverted,
7
+ }"
8
+ :size="size"
9
+ >
10
+ <farm-icon :color="inverted ? 'white' : color" :variation="variation" :size="size">
11
+ {{ iconParsed }}
12
+ </farm-icon>
8
13
  </div>
9
14
  </template>
10
15
 
@@ -28,18 +33,23 @@ export default Vue.extend({
28
33
  type: String as PropType<
29
34
  | 'primary'
30
35
  | 'secondary'
36
+ | 'secondary-green'
37
+ | 'secondary-golden'
31
38
  | 'neutral'
32
39
  | 'info'
33
40
  | 'success'
34
41
  | 'error'
35
42
  | 'warning'
36
- | 'success'
37
43
  | 'extra-1'
38
44
  | 'extra-2'
39
45
  | 'gray'
40
46
  >,
41
47
  default: 'primary',
42
48
  },
49
+ variation: {
50
+ type: String as PropType<'base' | 'darken'>,
51
+ default: 'base',
52
+ },
43
53
  size: {
44
54
  type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
45
55
  default: 'md',
@@ -1,15 +1,26 @@
1
1
  <template>
2
- <div :class="{
3
- idcaption: true,
4
- 'farm-idcaption': true,
5
- 'farm-idcaption--noicon': !icon,
6
- 'farm-idcaption--noheight': noHeight }"
2
+ <div
3
+ :class="{
4
+ idcaption: true,
5
+ 'farm-idcaption': true,
6
+ 'farm-idcaption--noicon': !icon,
7
+ 'farm-idcaption--noheight': noHeight,
8
+ }"
7
9
  >
8
- <farm-icon-box v-if="icon" :icon="icon" :color="iconBoxColor" size="md" />
10
+ <farm-icon-box
11
+ v-if="icon"
12
+ :icon="icon"
13
+ :color="iconBoxColor"
14
+ variation="darken"
15
+ size="md"
16
+ />
9
17
  <div
10
- :class="{ idcaption__body: true, 'idcaption__body--single': !hasTitle || !hasSubtitle }"
18
+ :class="{
19
+ idcaption__body: true,
20
+ 'idcaption__body--single': !hasTitle || !hasSubtitle,
21
+ }"
11
22
  >
12
- <farm-caption variation="medium" v-if="hasTitle">
23
+ <farm-caption variation="semiBold" v-if="hasTitle">
13
24
  <span>
14
25
  <slot name="title"></slot>
15
26
  </span>
@@ -20,16 +31,17 @@
20
31
  class="farm-btn--clickable"
21
32
  @click="$emit('onLinkClick')"
22
33
  >
23
- <farm-icon size="xs">open-in-new</farm-icon>
34
+ <farm-icon size="16px">open-in-new</farm-icon>
24
35
  </farm-btn>
25
36
  </farm-caption>
26
37
 
27
- <farm-caption variation="regular" color="gray" v-if="hasSubtitle">
38
+ <farm-caption variation="regular" color="black" colorVariation="50" v-if="hasSubtitle">
28
39
  <span>
29
40
  <slot name="subtitle"></slot>
30
41
  </span>
31
42
  <farm-copytoclipboard
32
43
  v-if="copyText"
44
+ sizeIcon="16px"
33
45
  :toCopy="copyText"
34
46
  :successMessage="successMessage"
35
47
  :tooltipColor="tooltipColor"
@@ -57,18 +69,19 @@ export default Vue.extend({
57
69
  iconBoxColor: {
58
70
  type: String as PropType<
59
71
  | 'primary'
72
+ | 'secondary-green'
73
+ | 'secondary-golden'
60
74
  | 'secondary'
61
75
  | 'neutral'
62
76
  | 'info'
63
77
  | 'success'
64
78
  | 'error'
65
79
  | 'warning'
66
- | 'success'
67
80
  | 'extra-1'
68
81
  | 'extra-2'
69
82
  | 'gray'
70
83
  >,
71
- default: 'primary',
84
+ default: 'secondary-golden',
72
85
  },
73
86
  /**
74
87
  * Text to be copied to clipboard
@@ -98,12 +111,13 @@ export default Vue.extend({
98
111
  type: String as PropType<
99
112
  | 'primary'
100
113
  | 'secondary'
114
+ | 'secondary-green'
115
+ | 'secondary-golden'
101
116
  | 'neutral'
102
117
  | 'info'
103
118
  | 'success'
104
119
  | 'error'
105
120
  | 'warning'
106
- | 'success'
107
121
  | 'extra-1'
108
122
  | 'extra-2'
109
123
  >,
@@ -4,11 +4,23 @@
4
4
  font-size: 12px;
5
5
  margin-bottom: 8px;
6
6
  line-height: 24px;
7
- color: var(--farm-text-primary);
7
+ color: var(--farm-bw-black-50);
8
+ font-weight: 600;
8
9
 
9
- &.farm-label--required::after {
10
- content: '*';
11
- margin-left: 2px;
12
- color: var(--farm-error-base);
10
+ &.farm-label--required:not(:has(.farm-tooltip)) {
11
+ &::after {
12
+ content: '*';
13
+ margin-left: 2px;
14
+ color: var(--farm-error-base);
15
+ }
16
+ }
17
+
18
+ &:has(.farm-tooltip) {
19
+ .farm-tooltip::before {
20
+ content: '*';
21
+ margin-left: 1px;
22
+ margin-right: 2px;
23
+ color: var(--farm-error-base);
24
+ }
13
25
  }
14
26
  }
@@ -27,7 +27,6 @@ export const Primary = () => ({
27
27
 
28
28
  export const Required = () => ({
29
29
  template: `<div>
30
- <farm-label :required="true">Label</farm-label>
31
30
  <farm-label required>Label</farm-label>
32
31
  </div>`,
33
32
  });
@@ -18,18 +18,20 @@
18
18
 
19
19
  &:hover {
20
20
 
21
+ border-radius: 5px;
22
+
21
23
  @each $color in $theme-colors-list {
22
24
 
23
25
  &#{'.farm-listitem--' + $color + '-base'} {
24
- background-color: themeColor($color);
26
+ background-color: rgba(themeColor($color), 0.27);
25
27
  }
26
28
 
27
29
  &#{'.farm-listitem--' + $color + '-lighten'} {
28
- background-color: themeColor($color, 'lighten');
30
+ background-color: rgba(themeColor($color, 'lighten'), 0.27);
29
31
  }
30
32
 
31
33
  &#{'.farm-listitem--' + $color + '-darken'} {
32
- background-color: themeColor($color, 'darken');
34
+ background-color: rgba(themeColor($color, 'darken'), 0.27);
33
35
  }
34
36
  }
35
37
  }
@@ -32,6 +32,8 @@ export default Vue.extend({
32
32
  type: [String, null] as PropType<
33
33
  | 'primary'
34
34
  | 'secondary'
35
+ | 'secondary-green'
36
+ | 'secondary-golden'
35
37
  | 'neutral'
36
38
  | 'error'
37
39
  | 'warning'
@@ -12,7 +12,7 @@
12
12
  .logger__item {
13
13
  display: flex;
14
14
  flex-direction: row;
15
- height: 64px;
15
+ height: 74px;
16
16
  align-items: center;
17
17
 
18
18
  > div {
@@ -52,3 +52,11 @@
52
52
  color: white;
53
53
  }
54
54
  }
55
+
56
+ .logger__item > .farm-btn.logger__item--button {
57
+ margin-left: 8px;
58
+ }
59
+
60
+ .logger__item > div .logger__item--spacing-bottom {
61
+ margin-bottom: 8px;
62
+ }
@@ -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
  });