@farm-investimentos/front-mfe-components 5.2.1 → 5.2.2
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 +76 -76
- 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 +76 -76
- 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 +6 -6
- package/src/components/Stepper/StepperHeader/StepperHeader.scss +18 -10
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +34 -32
- package/src/examples/Modal.stories.js +53 -1
- package/src/scss/DefaultModal.scss +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"author": "farm investimentos",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/front-mfe-components.common.js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"vuetify-dialog": "^2.0.17"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@socheatsok78/storybook-addon-vuetify": "^0.1.
|
|
31
|
-
"@storybook/addon-actions": "^6.
|
|
32
|
-
"@storybook/addon-essentials": "^6.
|
|
33
|
-
"@storybook/addon-links": "^6.
|
|
34
|
-
"@storybook/vue": "^6.
|
|
30
|
+
"@socheatsok78/storybook-addon-vuetify": "^0.1.9",
|
|
31
|
+
"@storybook/addon-actions": "^6.5.8",
|
|
32
|
+
"@storybook/addon-essentials": "^6.5.8",
|
|
33
|
+
"@storybook/addon-links": "^6.5.8",
|
|
34
|
+
"@storybook/vue": "^6.5.8",
|
|
35
35
|
"@types/jest": "^24.9.1",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
37
37
|
"@typescript-eslint/parser": "^4.18.0",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
$step-height: 64px;
|
|
2
|
-
$vertical-step-width: 160px;
|
|
3
2
|
|
|
4
3
|
@mixin stepperHeaderStepColor($color) {
|
|
5
|
-
|
|
6
|
-
|
|
7
4
|
i.mdi {
|
|
8
5
|
background-color: $color;
|
|
9
6
|
border-color: $color;
|
|
@@ -14,6 +11,10 @@ $vertical-step-width: 160px;
|
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
13
|
|
|
14
|
+
.horizontal-step-size .stepper__header--vertical {
|
|
15
|
+
width: 160px;
|
|
16
|
+
}
|
|
17
|
+
|
|
17
18
|
.stepper__header {
|
|
18
19
|
display: flex;
|
|
19
20
|
flex-direction: row;
|
|
@@ -72,8 +73,6 @@ $vertical-step-width: 160px;
|
|
|
72
73
|
|
|
73
74
|
&.stepper__header--vertical {
|
|
74
75
|
display: block;
|
|
75
|
-
width: $vertical-step-width;
|
|
76
|
-
|
|
77
76
|
|
|
78
77
|
div.stepper__header-step {
|
|
79
78
|
width: 100%;
|
|
@@ -86,8 +85,10 @@ $vertical-step-width: 160px;
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
span {
|
|
89
|
-
display:
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
90
|
width: calc(100% - 40px);
|
|
91
|
+
height: 32px;
|
|
91
92
|
clear: none;
|
|
92
93
|
float: left;
|
|
93
94
|
margin-top: 0;
|
|
@@ -109,11 +110,19 @@ $vertical-step-width: 160px;
|
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
&.stepper__divider--previous-to-current {
|
|
112
|
-
background: linear-gradient(
|
|
113
|
+
background: linear-gradient(
|
|
114
|
+
to bottom,
|
|
115
|
+
var(--v-secondary-base),
|
|
116
|
+
var(--v-accent-base)
|
|
117
|
+
);
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
&.stepper__divider--previous-to-error {
|
|
116
|
-
background: linear-gradient(
|
|
121
|
+
background: linear-gradient(
|
|
122
|
+
to bottom,
|
|
123
|
+
var(--v-secondary-base),
|
|
124
|
+
var(--v-error-base)
|
|
125
|
+
);
|
|
117
126
|
}
|
|
118
127
|
}
|
|
119
128
|
}
|
|
@@ -130,9 +139,8 @@ i.mdi {
|
|
|
130
139
|
align-items: center;
|
|
131
140
|
justify-content: center;
|
|
132
141
|
|
|
133
|
-
|
|
134
142
|
&:before {
|
|
135
143
|
font-size: 16px;
|
|
136
144
|
color: var(--v-gray-lighten1);
|
|
137
145
|
}
|
|
138
|
-
}
|
|
146
|
+
}
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
'stepper__header-step': true,
|
|
7
|
-
'stepper__header-step--current': isStepCurrent(index),
|
|
8
|
-
'stepper__header-step--previous': isStepPrevious(index),
|
|
9
|
-
'stepper__header-step--error': isStepError(index),
|
|
10
|
-
}"
|
|
11
|
-
:key="step.label"
|
|
12
|
-
>
|
|
13
|
-
<i
|
|
2
|
+
<div class="horizontal-step-size">
|
|
3
|
+
<section :class="{ stepper__header: true, 'stepper__header--vertical': vertical }">
|
|
4
|
+
<template v-for="(step, index) in steps">
|
|
5
|
+
<div
|
|
14
6
|
:class="{
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
'stepper__header-step': true,
|
|
8
|
+
'stepper__header-step--current': isStepCurrent(index),
|
|
9
|
+
'stepper__header-step--previous': isStepPrevious(index),
|
|
10
|
+
'stepper__header-step--error': isStepError(index),
|
|
17
11
|
}"
|
|
18
|
-
|
|
12
|
+
:key="step.label"
|
|
13
|
+
>
|
|
14
|
+
<i
|
|
15
|
+
:class="{
|
|
16
|
+
mdi: true,
|
|
17
|
+
['mdi-' + step.icon]: true,
|
|
18
|
+
}"
|
|
19
|
+
v-if="step.icon"
|
|
20
|
+
/>
|
|
21
|
+
<span>
|
|
22
|
+
{{ step.label }}
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div
|
|
26
|
+
:class="{
|
|
27
|
+
'stepper__divider--horizontal': !vertical,
|
|
28
|
+
'stepper__divider--vertical': vertical,
|
|
29
|
+
'stepper__divider--previous': isStepPrevious(index),
|
|
30
|
+
'stepper__divider--previous-to-current': isStepPreviousToCurrent(index),
|
|
31
|
+
'stepper__divider--previous-to-error': isStepPreviousToError(index),
|
|
32
|
+
}"
|
|
33
|
+
v-if="hasDivider(index)"
|
|
34
|
+
:key="'divider_' + step.label"
|
|
19
35
|
/>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</div>
|
|
24
|
-
<div
|
|
25
|
-
:class="{
|
|
26
|
-
'stepper__divider--horizontal': !vertical,
|
|
27
|
-
'stepper__divider--vertical': vertical,
|
|
28
|
-
'stepper__divider--previous': isStepPrevious(index),
|
|
29
|
-
'stepper__divider--previous-to-current': isStepPreviousToCurrent(index),
|
|
30
|
-
'stepper__divider--previous-to-error': isStepPreviousToError(index),
|
|
31
|
-
}"
|
|
32
|
-
v-if="hasDivider(index)"
|
|
33
|
-
:key="'divider_' + step.label"
|
|
34
|
-
/>
|
|
35
|
-
</template>
|
|
36
|
-
</section>
|
|
36
|
+
</template>
|
|
37
|
+
</section>
|
|
38
|
+
</div>
|
|
37
39
|
</template>
|
|
38
40
|
<script lang="ts">
|
|
39
41
|
import Vue, { PropType } from 'vue';
|
|
@@ -58,6 +58,54 @@ export const ModalSmall = () => ({
|
|
|
58
58
|
</div>`,
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
+
export const ModalExtremeSmall = () => ({
|
|
62
|
+
components: {
|
|
63
|
+
DialogHeader,
|
|
64
|
+
DialogFooter,
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
showModalSmall: false,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
template: `<div>
|
|
72
|
+
<v-dialog content-class="modal-default modal-default-x-small" v-model="showModalSmall">
|
|
73
|
+
<DialogHeader title="Exemplo" @onClose="showModalSmall = false;" />
|
|
74
|
+
<v-main class="pa-6 pt-12">
|
|
75
|
+
Place dialog content here!
|
|
76
|
+
</v-main>
|
|
77
|
+
<DialogFooter :hasConfirm="false" @onClose="showModalSmall = false;" />
|
|
78
|
+
</v-dialog>
|
|
79
|
+
<v-btn @click="showModalSmall = true;" color="secondary">
|
|
80
|
+
Clique para abrir
|
|
81
|
+
</v-btn>
|
|
82
|
+
</div>`,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export const ModalMedium = () => ({
|
|
86
|
+
components: {
|
|
87
|
+
DialogHeader,
|
|
88
|
+
DialogFooter,
|
|
89
|
+
},
|
|
90
|
+
data() {
|
|
91
|
+
return {
|
|
92
|
+
showModalSmall: false,
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
template: `<div>
|
|
96
|
+
<v-dialog content-class="modal-default modal-default-md" v-model="showModalSmall">
|
|
97
|
+
<DialogHeader title="Exemplo" @onClose="showModalSmall = false;" />
|
|
98
|
+
<v-main class="pa-6 pt-12">
|
|
99
|
+
Place dialog content here!
|
|
100
|
+
</v-main>
|
|
101
|
+
<DialogFooter :hasConfirm="false" @onClose="showModalSmall = false;" />
|
|
102
|
+
</v-dialog>
|
|
103
|
+
<v-btn @click="showModalSmall = true;" color="secondary">
|
|
104
|
+
Clique para abrir
|
|
105
|
+
</v-btn>
|
|
106
|
+
</div>`,
|
|
107
|
+
});
|
|
108
|
+
|
|
61
109
|
export const ModalScrollVertical = () => ({
|
|
62
110
|
components: {
|
|
63
111
|
DialogHeader,
|
|
@@ -181,4 +229,8 @@ ModalSmall.story = {
|
|
|
181
229
|
|
|
182
230
|
ModalScrollVertical.storyName = 'Rolagem vertical';
|
|
183
231
|
|
|
184
|
-
ModalScrollHorizontal.storyName = 'Rolagem horizontal';
|
|
232
|
+
ModalScrollHorizontal.storyName = 'Rolagem horizontal';
|
|
233
|
+
|
|
234
|
+
ModalExtremeSmall.storyName = 'Extra pequeno';
|
|
235
|
+
|
|
236
|
+
ModalMedium.storyName = 'Médio';
|
|
@@ -72,7 +72,16 @@
|
|
|
72
72
|
max-width: calc(392px - 2rem);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
.v-dialog.modal-default.modal-default-md {
|
|
77
|
+
max-width: calc(600px - 2rem);
|
|
78
|
+
|
|
79
|
+
header {
|
|
80
|
+
max-width: calc(600px - 2rem);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
75
83
|
}
|
|
84
|
+
|
|
76
85
|
@media screen and (max-width: 960px) {
|
|
77
86
|
.v-dialog.modal-default header {
|
|
78
87
|
max-width: calc(100% - 3rem);
|