@farm-investimentos/front-mfe-components 12.0.1 → 12.1.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 +174 -151
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +174 -151
- 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.stories.js +1 -1
- package/src/components/ButtonToggle/ButtonToggle.stories.js +2 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +2 -1
- package/src/components/ChipInviteStatus/ChipInviteStatus.stories.js +10 -0
- package/src/components/ContextMenu/ContextMenu.vue +4 -8
- package/src/components/IconBox/IconBox.stories.js +3 -1
- package/src/components/IdCaption/IdCaption.stories.js +2 -1
- package/src/components/Label/Label.stories.js +2 -1
- package/src/components/List/List.stories.js +2 -1
- package/src/components/ListItem/ListItem.stories.js +2 -2
- package/src/components/Radio/Radio.scss +27 -2
- package/src/components/Radio/Radio.stories.js +34 -2
- package/src/components/Radio/Radio.vue +34 -13
- package/src/components/Select/Select.vue +1 -0
- package/src/components/Switcher/Switcher.stories.js +10 -0
- package/src/components/ValueCaption/ValueCaption.stories.js +2 -2
- package/src/components/layout/Line/Line.stories.js +2 -1
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
description: {
|
|
11
11
|
component: `Alert Box<br />
|
|
12
12
|
selector: <em>farm-alertbox</em><br />
|
|
13
|
-
<span style="color: var(--farm-
|
|
13
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>
|
|
14
14
|
`,
|
|
15
15
|
},
|
|
16
16
|
},
|
|
@@ -3,6 +3,16 @@ import ChipInviteStatus from './ChipInviteStatus.vue';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Display/Chips/Onboarding/InviteStatus',
|
|
5
5
|
component: ChipInviteStatus,
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: `Chip Invite Status<br />
|
|
10
|
+
selector: <em>farm-chip-invite</em><br />
|
|
11
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>`,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
viewMode: 'docs',
|
|
15
|
+
},
|
|
6
16
|
};
|
|
7
17
|
|
|
8
18
|
export const Primary = () => ({
|
|
@@ -4,14 +4,10 @@
|
|
|
4
4
|
<slot name="activator"></slot>
|
|
5
5
|
</span>
|
|
6
6
|
|
|
7
|
-
<div
|
|
8
|
-
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
'farm-contextmenu__popup--visible': inputValue,
|
|
12
|
-
}"
|
|
13
|
-
:style="styles"
|
|
14
|
-
>
|
|
7
|
+
<div ref="popup" :class="{
|
|
8
|
+
'farm-contextmenu__popup': true,
|
|
9
|
+
'farm-contextmenu__popup--visible': inputValue,
|
|
10
|
+
}" :style="styles">
|
|
15
11
|
<slot></slot>
|
|
16
12
|
</div>
|
|
17
13
|
</div>
|
|
@@ -12,11 +12,11 @@ export default {
|
|
|
12
12
|
decorators: [withDesign],
|
|
13
13
|
parameters: {
|
|
14
14
|
viewMode: 'docs',
|
|
15
|
-
|
|
16
15
|
docs: {
|
|
17
16
|
description: {
|
|
18
17
|
component: `ListItem<br />
|
|
19
|
-
selector: <em>farm-listitem</em
|
|
18
|
+
selector: <em>farm-listitem</em><br />
|
|
19
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>`,
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
},
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
@import '../../configurations/variables';
|
|
2
2
|
@import '../../configurations/theme-colors';
|
|
3
3
|
|
|
4
|
+
.farm-radio-wrapper {
|
|
5
|
+
align-items: baseline;
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
input[type='radio'] {
|
|
5
10
|
-webkit-appearance: none;
|
|
6
11
|
appearance: none;
|
|
@@ -8,7 +13,7 @@ input[type='radio'] {
|
|
|
8
13
|
margin: 0;
|
|
9
14
|
font: inherit;
|
|
10
15
|
color: rgba(0, 0, 0, 0.6);
|
|
11
|
-
border:
|
|
16
|
+
border: 2.5px solid themeColor('neutral', 'darken');
|
|
12
17
|
border-radius: 50%;
|
|
13
18
|
display: grid;
|
|
14
19
|
place-content: center;
|
|
@@ -19,7 +24,6 @@ input[type='radio'] {
|
|
|
19
24
|
border-radius: 50%;
|
|
20
25
|
transform: scale(0);
|
|
21
26
|
transition: 120ms transform ease-in-out;
|
|
22
|
-
background-color: CanvasText;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
&.farm-radio--checked::before {
|
|
@@ -53,6 +57,27 @@ input[type='radio'] {
|
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
}
|
|
60
|
+
|
|
61
|
+
&:disabled {
|
|
62
|
+
border: 2.5px solid themeColor('neutral', 'base');
|
|
63
|
+
cursor: auto;
|
|
64
|
+
|
|
65
|
+
&.farm-radio--checked::before {
|
|
66
|
+
box-shadow: inset 16px 16px themeColor('neutral', 'base');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.farm-radio--checked {
|
|
70
|
+
border-color: themeColor('neutral', 'base');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover,
|
|
74
|
+
&.farm-radio--checked:hover {
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
border-radius: 50%;
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
56
81
|
}
|
|
57
82
|
|
|
58
83
|
@each $size, $value in $sizes {
|
|
@@ -94,7 +94,7 @@ export const Sizes = () => ({
|
|
|
94
94
|
},
|
|
95
95
|
template: `<div style="width: 480px">
|
|
96
96
|
<div v-for="size in sizes" :key="size" class="d-flex flex-row align-center mb-3">
|
|
97
|
-
<farm-radio v-model="v" :value="size" :size="size" />  
|
|
97
|
+
<farm-radio v-model="v" :id="size" :value="size" :size="size" /> <label :for="size">{{ size }}</label>
|
|
98
98
|
</div>
|
|
99
99
|
</div>`,
|
|
100
100
|
});
|
|
@@ -108,7 +108,39 @@ export const Colors = () => ({
|
|
|
108
108
|
},
|
|
109
109
|
template: `<div style="width: 480px">
|
|
110
110
|
<div v-for="color in colors" :key="color" class="d-flex flex-row align-center mb-3">
|
|
111
|
-
<farm-radio v-model="v" :value="1" :color="color"
|
|
111
|
+
<farm-radio v-model="v" :id="color" :value="1" :color="color" :label="color" />
|
|
112
|
+
</div>
|
|
113
|
+
</div>`,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const Disabled = () => ({
|
|
117
|
+
data() {
|
|
118
|
+
return {
|
|
119
|
+
v: 1,
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
template: `<div style="width: 480px">
|
|
123
|
+
<div class="d-flex flex-row align-center mb-3">
|
|
124
|
+
<farm-radio v-model="v" :value="2" disabled label="Disabled" />
|
|
125
|
+
</div>
|
|
126
|
+
<div class="d-flex flex-row align-center mb-3">
|
|
127
|
+
<farm-radio v-model="v" :value="1" disabled label="Checked and Disabled" />
|
|
128
|
+
</div>
|
|
129
|
+
</div>`,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
export const Label = () => ({
|
|
133
|
+
data() {
|
|
134
|
+
return {
|
|
135
|
+
v: 1,
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
template: `<div style="width: 480px">
|
|
139
|
+
<div class="d-flex flex-row align-center mb-3">
|
|
140
|
+
<farm-radio v-model="v" :value="2" id="option1" label="Option 1" />
|
|
141
|
+
</div>
|
|
142
|
+
<div class="d-flex flex-row align-center mb-3">
|
|
143
|
+
<farm-radio v-model="v" :value="1" id="option2" label="Option 2" />
|
|
112
144
|
</div>
|
|
113
145
|
</div>`,
|
|
114
146
|
});
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<div class="farm-radio-wrapper">
|
|
3
|
+
<input
|
|
4
|
+
:class="{
|
|
5
|
+
'farm-radio': true,
|
|
6
|
+
'farm-radio--checked': isChecked,
|
|
7
|
+
}"
|
|
8
|
+
:id="id"
|
|
9
|
+
type="radio"
|
|
10
|
+
:color="color"
|
|
11
|
+
:size="$props.size"
|
|
12
|
+
:checked="isChecked"
|
|
13
|
+
:value="value"
|
|
14
|
+
v-bind="$attrs"
|
|
15
|
+
@click="onClick"
|
|
16
|
+
/>
|
|
17
|
+
<farm-label v-if="label" class="ml-2" :for="id">
|
|
18
|
+
{{ label }}
|
|
19
|
+
</farm-label>
|
|
20
|
+
</div>
|
|
14
21
|
</template>
|
|
15
22
|
<script lang="ts">
|
|
16
23
|
import Vue, { PropType } from 'vue';
|
|
@@ -34,7 +41,7 @@ export default Vue.extend({
|
|
|
34
41
|
*/
|
|
35
42
|
size: {
|
|
36
43
|
type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
|
|
37
|
-
default: '
|
|
44
|
+
default: 'sm',
|
|
38
45
|
},
|
|
39
46
|
/**
|
|
40
47
|
* Color
|
|
@@ -54,6 +61,20 @@ export default Vue.extend({
|
|
|
54
61
|
>,
|
|
55
62
|
default: 'primary',
|
|
56
63
|
},
|
|
64
|
+
/**
|
|
65
|
+
* Label
|
|
66
|
+
*/
|
|
67
|
+
label: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* ID
|
|
73
|
+
*/
|
|
74
|
+
id: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: '',
|
|
77
|
+
},
|
|
57
78
|
},
|
|
58
79
|
computed: {
|
|
59
80
|
isChecked() {
|
|
@@ -3,6 +3,16 @@ import Switch from './Switcher';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Form/Switcher',
|
|
5
5
|
component: Switch,
|
|
6
|
+
parameters: {
|
|
7
|
+
viewMode: 'docs',
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `Switcher<br />
|
|
11
|
+
selector: <em>farm-switcher</em><br />
|
|
12
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
6
16
|
};
|
|
7
17
|
|
|
8
18
|
export const Primary = () => ({
|
|
@@ -11,8 +11,8 @@ export default {
|
|
|
11
11
|
docs: {
|
|
12
12
|
description: {
|
|
13
13
|
component: `Value Caption<br />
|
|
14
|
-
selector: <em>farm-valuecaption</em
|
|
15
|
-
|
|
14
|
+
selector: <em>farm-valuecaption</em><br />
|
|
15
|
+
<span style="color: var(--farm-primary-base);">ready for use</span>`,
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
viewMode: 'docs',
|