@farm-investimentos/front-mfe-components 3.3.0 → 3.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -0,0 +1,26 @@
1
+ .status-chip--onboarding {
2
+ font-weight: bold;
3
+ .status-chip-yellow {
4
+ color: black;
5
+ }
6
+ &.status-chip.status-chip-accent {
7
+ color: var(--v-accent-base) !important;
8
+ border: 2px solid var(--v-accent-base) !important;
9
+ background-color: white !important;
10
+ }
11
+ &.status-chip.status-chip-yellow {
12
+ color: black !important;
13
+ border: 2px solid var(--v-yellow-lighten1) !important;
14
+ background-color: white !important;
15
+ }
16
+ &.status-chip.status-chip-error {
17
+ color: var(--v-error-base) !important;
18
+ border: 2px solid var(--v-error-base) !important;
19
+ background-color: white !important;
20
+ }
21
+ &.status-chip.status-chip-success {
22
+ color: var(--v-secondary-base) !important;
23
+ border: 2px solid var(--v-success-base) !important;
24
+ background-color: white !important;
25
+ }
26
+ }
@@ -0,0 +1,19 @@
1
+ import ChipInviteStatus from './ChipInviteStatus.vue';
2
+
3
+ export default {
4
+ title: 'Example/Onboarding/ChipInviteStatus',
5
+ component: ChipInviteStatus,
6
+ };
7
+
8
+ export const Primary = () => ({
9
+ components: { ChipInviteStatus },
10
+ template: `<div style="width: 120px;">
11
+ <ChipInviteStatus status="CONVIDAR" />
12
+ <ChipInviteStatus status="CONVIDADO" />
13
+ <ChipInviteStatus status="INCOMPLETO" />
14
+ <ChipInviteStatus status="CONCLUIDO" />
15
+ <ChipInviteStatus status="FALHA/ERRO" />
16
+ </div>`,
17
+ });
18
+
19
+ Primary.storyName = 'Básico';
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <v-chip
3
+ small
4
+ :class="
5
+ `status-chip ${
6
+ isFull ? 'status-chip--fullwidth' : ''
7
+ } status-chip-${color} status-chip--onboarding`
8
+ "
9
+ >
10
+ <span :class="`${textColor}--text`">
11
+ {{ label }}
12
+ </span>
13
+ </v-chip>
14
+ </template>
15
+ <script>
16
+ import Vue from 'vue';
17
+ const StatusColor = {
18
+ CONVIDAR: 'secondary',
19
+ CONVIDADO: 'yellow',
20
+ INCOMPLETO: 'yellow',
21
+ CONCLUIDO: 'success',
22
+ 'FALHA/ERRO': 'error',
23
+ };
24
+
25
+ import VChip from 'vuetify/lib/components/VChip/';
26
+
27
+ export default Vue.extend({
28
+ name: 'farm-chip-invite',
29
+ components: VChip,
30
+ props: {
31
+ /**
32
+ * Invite status
33
+ */
34
+ status: {
35
+ type: String,
36
+ default: '',
37
+ },
38
+ /**
39
+ * Full width (from parent)
40
+ */
41
+ isFull: {
42
+ type: Boolean,
43
+ default: true,
44
+ },
45
+ },
46
+ computed: {
47
+ textColor() {
48
+ return this.status === 'CONVIDAR' ? '' : StatusColor[this.status];
49
+ },
50
+ color() {
51
+ return !this.status ? '' : StatusColor[this.status];
52
+ },
53
+ label() {
54
+ return this.status;
55
+ },
56
+ },
57
+ });
58
+ </script>
59
+ <style lang="scss" scoped>
60
+ @import './ChipInviteStatus.scss';
61
+ </style>
@@ -0,0 +1,4 @@
1
+ import ChipInviteStatus from './ChipInviteStatus.vue';
2
+
3
+ export { ChipInviteStatus };
4
+ export default ChipInviteStatus;
package/src/main.js CHANGED
@@ -57,3 +57,4 @@ export * from './components/Logos/OriginatorLogo/';
57
57
  export * from './components/ResetTableRowSelection/';
58
58
  export * from './components/MultipleSelectShortener/';
59
59
  export * from './components/SelectModalOptions/';
60
+ export * from './components/ChipInviteStatus/';
@@ -24,7 +24,11 @@ $statusList: 'primary', 'secondary', 'accent', 'error', 'info', 'success', 'warn
24
24
  }
25
25
  &.status-chip-yellow {
26
26
  background-color: var(--v-yellow-base) !important;
27
- color: var(--v-gray-lighten5);
27
+ color: var(--v-gray-lighten3) !important;
28
28
  }
29
29
 
30
+ &.status-chip--fullwidth {
31
+ width: 100%;
32
+ justify-content: center;
33
+ }
30
34
  }