@farm-investimentos/front-mfe-components-vue3 0.0.6 → 0.0.7
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/README.md +9 -3
- package/dist/front-mfe-components.common.js +4946 -4931
- 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 +4946 -4931
- 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 +19 -16
- package/src/components/AlertBox/AlertBox.vue +3 -2
- package/src/components/AlertBox/__tests__/AlertBox.spec.js +2 -1
- package/src/components/AlertBox/__tests__/valueWatcher.spec.js +1 -0
- package/src/components/AlertReload/__tests__/AlertReload.spec.js +1 -0
- package/src/components/ButtonToggle/ButtonToggle.vue +4 -3
- package/src/components/ButtonToggle/__tests__/ButtonToggle.spec.js +2 -1
- package/src/components/Buttons/ConfirmButton/__tests__/ConfirmButton.spec.js +1 -0
- package/src/components/Buttons/DangerButton/__tests__/DangerButton.spec.js +1 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +10 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +3 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +32 -22
- package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +6 -1
- package/src/components/Buttons/ExportButton/__tests__/ExportButton.spec.js +1 -0
- package/src/components/Buttons/ImportButton/__tests__/ImportButton.spec.js +1 -0
- package/src/components/Buttons/MultiImportButton/__tests__/MultiImportButton.spec.js +1 -0
- package/src/components/Buttons/RemoveButton/__tests__/RemoveButton.spec.js +1 -0
- package/src/components/Buttons/ToggleButton/__tests__/ToggleButton.spec.js +1 -0
- package/src/components/Card/CardContent/__tests__/CardContent.spec.js +2 -1
- package/src/components/Card/__tests__/Card.spec.js +2 -1
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.js +2 -0
- package/src/components/Checkbox/Checkbox.vue +6 -3
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +2 -1
- package/src/components/Checkbox/__tests__/modelValueWatcher.spec.js +1 -0
- package/src/components/Chip/Chip.stories.js +2 -0
- package/src/components/Chip/__tests__/Chip.spec.js +2 -1
- package/src/components/ChipInviteStatus/__tests__/ChipInviteStatus.spec.js +2 -1
- package/src/components/Collapsible/Collapsible.stories.js +2 -0
- package/src/components/Collapsible/Collapsible.vue +34 -8
- package/src/components/ContextMenu/ContextMenu.vue +1 -0
- package/src/components/ContextMenu/__tests__/ContextMenu.spec.js +2 -1
- package/src/components/CopyToClipboard/CopyToClipboard.vue +1 -0
- package/src/components/CopyToClipboard/__tests__/CopyToClipboard.spec.js +2 -1
- package/src/components/DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js +2 -1
- package/src/components/DataTableHeader/__tests__/DataTableHeader.spec.js +2 -1
- package/src/components/DataTablePaginator/__tests__/DataTablePaginator.spec.js +2 -1
- package/src/components/DatePicker/DatePicker.vue +2 -1
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +2 -1
- package/src/components/DialogFooter/DialogFooter.vue +1 -0
- package/src/components/DialogFooter/__tests__/DialogFooter.spec.js +2 -1
- package/src/components/DialogHeader/DialogHeader.scss +1 -1
- package/src/components/DialogHeader/__tests__/DialogHeader.spec.js +2 -1
- package/src/components/DialogPrompt/index.ts +3 -1
- package/src/components/DialogPrompt/utils/index.ts +1 -1
- package/src/components/Form/Form.stories.js +2 -1
- package/src/components/Form/Form.vue +3 -4
- package/src/components/Form/__tests__/Form.spec.js +1 -0
- package/src/components/Icon/Icon.stories.js +4 -2
- package/src/components/Icon/__tests__/Icon.spec.js +1 -0
- package/src/components/IconBox/IconBox.stories.js +1 -0
- package/src/components/IconBox/__tests__/IconBox.spec.js +2 -1
- package/src/components/IdCaption/__tests__/IdCaption.spec.js +1 -0
- package/src/components/Label/__tests__/Label.spec.js +2 -1
- package/src/components/List/List.vue +1 -0
- package/src/components/List/__tests__/List.spec.js +2 -1
- package/src/components/ListItem/ListItem.stories.js +2 -0
- package/src/components/ListItem/__tests__/ListItem.spec.js +2 -1
- package/src/components/Loader/Loader.vue +1 -0
- package/src/components/Loader/__tests__/Loader.spec.js +2 -1
- package/src/components/Logger/Logger.vue +1 -0
- package/src/components/Logger/LoggerItem/LoggerItem.vue +1 -0
- package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +1 -0
- package/src/components/Logger/__tests__/Logger.spec.js +1 -0
- package/src/components/MainFilter/__tests__/MainFilter.spec.js +1 -0
- package/src/components/ManagersList/__tests__/ManagersList.spec.js +1 -0
- package/src/components/Modal/Modal.vue +2 -1
- package/src/components/ModalPromptUser/__tests__/ModalPromptUser.spec.js +3 -2
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +1 -0
- package/src/components/MultipleSelectShortener/__tests__/MultipleSelectShortener.spec.js +1 -0
- package/src/components/ProgressBar/__tests__/ProgressBar.spec.js +2 -1
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.vue +12 -7
- package/src/components/PromptUserToConfirm/__tests__/PromptUserToConfirm.spec.js +3 -2
- package/src/components/Radio/Radio.stories.js +3 -1
- package/src/components/RadioGroup/RadioGroup.vue +3 -2
- package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +2 -1
- package/src/components/RangeDatePicker/RangeDatePicker.vue +1 -1
- package/src/components/RangeDatePicker/__tests__/RangeDatePicker.spec.js +2 -1
- package/src/components/ResetTableRowSelection/__tests__/ResetTableRowSelection.spec.js +2 -1
- package/src/components/ResourceMetaInfo/__tests__/ResourceMetaInfo.spec.js +2 -1
- package/src/components/Select/Select.vue +6 -3
- package/src/components/Select/__tests__/Select.spec.js +2 -1
- package/src/components/SelectAutoComplete/SelectAutoComplete.vue +6 -3
- package/src/components/SelectAutoComplete/__tests__/SelectAutoComplete.spec.js +2 -1
- package/src/components/SelectModalOptions/SelectModalOptions.vue +3 -3
- package/src/components/SelectModalOptions/__tests__/SelectModalOptions.spec.js +7 -5
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +1 -0
- package/src/components/Stepper/StepperHeader/__tests__/StepperHeader.spec.js +1 -0
- package/src/components/Switcher/Switcher.stories.js +2 -0
- package/src/components/Switcher/__tests__/Switcher.spec.js +1 -0
- package/src/components/TableContextMenu/__tests__/TableContextMenu.spec.js +2 -1
- package/src/components/Tabs/__tests__/Tabs.spec.js +1 -0
- package/src/components/TextArea/TextArea.vue +3 -2
- package/src/components/TextArea/__tests__/TextArea.spec.js +2 -1
- package/src/components/TextFieldV2/TextFieldV2.stories.js +2 -1
- package/src/components/TextFieldV2/TextFieldV2.vue +5 -4
- package/src/components/TextFieldV2/__tests__/TextFieldV2.spec.js +2 -1
- package/src/components/Tooltip/Tooltip.vue +4 -3
- package/src/components/Tooltip/__tests__/Tooltip.spec.js +2 -1
- package/src/components/Typography/BodyText/BodyText.stories.js +0 -1
- package/src/components/Typography/BodyText/BodyText.vue +1 -0
- package/src/components/Typography/BodyText/__tests__/BodyText.spec.js +2 -1
- package/src/components/Typography/Caption/__tests__/Caption.spec.js +2 -1
- package/src/components/Typography/Heading/__tests__/Heading.spec.js +2 -1
- package/src/components/Typography/OverlayText/__tests__/OverlayText.spec.js +2 -1
- package/src/components/Typography/Small/__tests__/Small.spec.js +2 -1
- package/src/components/Typography/Subtitle/__tests__/Subtitle.spec.js +2 -1
- package/src/components/Typography/Typography.stories.js +3 -1
- package/src/components/Typography/Typography.vue +1 -0
- package/src/components/Typography/__tests__/Typography.spec.js +2 -1
- package/src/components/Typography/index.ts +3 -2
- package/src/components/ValueCaption/ValueCaption.stories.js +2 -0
- package/src/components/ValueCaption/__tests__/ValueCaption.spec.js +1 -0
- package/src/components/layout/Box/Box.stories.js +2 -0
- package/src/components/layout/Box/__tests__/Box.spec.js +2 -1
- package/src/components/layout/Col/Col.stories.js +2 -0
- package/src/components/layout/Col/__tests__/Col.spec.js +2 -1
- package/src/components/layout/Line/Line.stories.js +2 -0
- package/src/components/layout/Line/__tests__/Line.spec.js +2 -1
- package/src/components/layout/Row/Row.stories.js +2 -0
- package/src/components/layout/Row/__tests__/Row.spec.js +2 -1
- package/src/examples/Colors.stories.js +3 -3
- package/src/main.ts +13 -15
- package/src/plugins/DialogPrompt/utils/__tests__/modalFooter.spec.js +18 -0
- package/src/plugins/DialogPrompt/utils/__tests__/modalHeader.spec.js +15 -0
- package/src/plugins/DialogPrompt/utils/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components-vue3",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"lint": "vue-cli-service lint --fix",
|
|
22
22
|
"serve": "vue-cli-service serve",
|
|
23
23
|
"storybook": "storybook dev -p 6006",
|
|
24
|
-
"test:coverage": "jest --
|
|
25
|
-
"test:unit": "jest
|
|
24
|
+
"test:coverage": "jest --coverage",
|
|
25
|
+
"test:unit": "jest"
|
|
26
26
|
},
|
|
27
27
|
"browserslist": [
|
|
28
28
|
"> 1%",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@farm-investimentos/front-mfe-libs-ts": "^2.5.0",
|
|
34
|
-
"@vuepic/vue-datepicker": "
|
|
35
|
-
"core-js": "
|
|
34
|
+
"@vuepic/vue-datepicker": "7.2.0",
|
|
35
|
+
"core-js": "3.33.1",
|
|
36
36
|
"text-mask-addons": "^3.8.0",
|
|
37
|
-
"v-mask": "
|
|
37
|
+
"v-mask": "2.3.0",
|
|
38
38
|
"vue": "3.3.4",
|
|
39
39
|
"vuetify": "^3.3.22",
|
|
40
40
|
"webpack": "^4.39.3"
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/core": "7.17.9",
|
|
44
44
|
"@babel/generator": "7.17.9",
|
|
45
|
-
"@storybook/addon-essentials": "
|
|
46
|
-
"@storybook/addon-interactions": "
|
|
47
|
-
"@storybook/addon-links": "
|
|
48
|
-
"@storybook/blocks": "
|
|
45
|
+
"@storybook/addon-essentials": "7.5.0",
|
|
46
|
+
"@storybook/addon-interactions": "7.5.0",
|
|
47
|
+
"@storybook/addon-links": "7.5.0",
|
|
48
|
+
"@storybook/blocks": "7.5.0",
|
|
49
49
|
"@storybook/testing-library": "^0.2.2",
|
|
50
|
-
"@storybook/vue3": "
|
|
51
|
-
"@storybook/vue3-vite": "
|
|
50
|
+
"@storybook/vue3": "7.5.0",
|
|
51
|
+
"@storybook/vue3-vite": "7.5.0",
|
|
52
52
|
"@tsconfig/node18": "^18.2.2",
|
|
53
53
|
"@types/jest": "^29.0.0",
|
|
54
54
|
"@types/node": "^18.17.17",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@vue/cli-plugin-babel": "~4.5.0",
|
|
59
59
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
60
60
|
"@vue/cli-plugin-typescript": "~4.5.0",
|
|
61
|
-
"@vue/cli-plugin-unit-jest": "^4.5.12",
|
|
62
61
|
"@vue/cli-service": "^4.5.13",
|
|
63
62
|
"@vue/compiler-sfc": "^3.0.0",
|
|
64
63
|
"@vue/eslint-config-typescript": "^7.0.0",
|
|
@@ -70,20 +69,24 @@
|
|
|
70
69
|
"babel-loader": "^8.3.0",
|
|
71
70
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
|
72
71
|
"eslint": "^6.7.2",
|
|
72
|
+
"eslint-plugin-import": "^2.29.0",
|
|
73
73
|
"eslint-plugin-vue": "^7.1.0",
|
|
74
|
+
"jest": "^29.0.0",
|
|
75
|
+
"jest-environment-jsdom": "^29.0.0",
|
|
74
76
|
"npm-run-all2": "^6.0.6",
|
|
75
77
|
"react": "^18.2.0",
|
|
76
78
|
"react-dom": "^18.2.0",
|
|
77
79
|
"sass": "~1.32.0",
|
|
78
|
-
"sass-loader": "
|
|
79
|
-
"storybook": "
|
|
80
|
+
"sass-loader": "10.4.1",
|
|
81
|
+
"storybook": "7.5.0",
|
|
82
|
+
"ts-jest": "^29.0.0",
|
|
80
83
|
"typescript": "~4.1.5",
|
|
81
84
|
"vite": "^4.4.9",
|
|
82
85
|
"vue-loader": "^16.8.3",
|
|
83
86
|
"vue-tsc": "^1.8.11"
|
|
84
87
|
},
|
|
85
88
|
"engines": {
|
|
86
|
-
"node": "
|
|
89
|
+
"node": ">20.0.0"
|
|
87
90
|
},
|
|
88
91
|
"publishConfig": {
|
|
89
92
|
"@farm-investimentos:registry": "https://registry.npmjs.org"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
<script lang="ts">
|
|
49
49
|
import { ref, PropType } from 'vue';
|
|
50
|
+
|
|
50
51
|
import valueWatcher from './valueWatcher';
|
|
51
52
|
|
|
52
53
|
export default {
|
|
@@ -93,7 +94,7 @@ export default {
|
|
|
93
94
|
>,
|
|
94
95
|
default: 'primary',
|
|
95
96
|
},
|
|
96
|
-
|
|
97
|
+
modelValue: {
|
|
97
98
|
type: Boolean,
|
|
98
99
|
default: true,
|
|
99
100
|
},
|
|
@@ -110,7 +111,7 @@ export default {
|
|
|
110
111
|
|
|
111
112
|
function close() {
|
|
112
113
|
visible.value = false;
|
|
113
|
-
emit('
|
|
114
|
+
emit('update:modelValue', false);
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
valueWatcher(props, visible);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import AlertBox from '../AlertBox';
|
|
3
4
|
|
|
4
5
|
describe('AlertBox component', () => {
|
|
@@ -16,7 +17,7 @@ describe('AlertBox component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
<script lang="ts">
|
|
15
15
|
import { PropType, ref } from 'vue';
|
|
16
|
+
|
|
16
17
|
import IButtonToggle from './IButtonToggle';
|
|
17
18
|
|
|
18
19
|
export default {
|
|
@@ -28,14 +29,14 @@ export default {
|
|
|
28
29
|
/**
|
|
29
30
|
* v-model binding
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
+
modelValue: { default: null },
|
|
32
33
|
},
|
|
33
34
|
setup(props, { emit }) {
|
|
34
|
-
const inputVal = ref(props.
|
|
35
|
+
const inputVal = ref(props.modelValue);
|
|
35
36
|
|
|
36
37
|
const setValue = (index: number) => {
|
|
37
38
|
inputVal.value = index;
|
|
38
|
-
emit('
|
|
39
|
+
emit('update:modelValue', inputVal.value);
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
const isSelected = (index: number) => index === inputVal.value;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ButtonToggle from '../ButtonToggle.vue';
|
|
3
4
|
|
|
4
5
|
describe('ButtonToggle component', () => {
|
|
@@ -28,7 +29,7 @@ describe('ButtonToggle component', () => {
|
|
|
28
29
|
it('Should set value', () => {
|
|
29
30
|
component.setValue(3);
|
|
30
31
|
expect(component.inputVal).toEqual(3);
|
|
31
|
-
expect(wrapper.emitted('
|
|
32
|
+
expect(wrapper.emitted('update:modelValue')[0]).toEqual([3]);
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
});
|
|
@@ -37,8 +37,7 @@ $butonSizes: (
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
@each $size,
|
|
41
|
-
$value in $sizes {
|
|
40
|
+
@each $size, $value in $sizes {
|
|
42
41
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
43
42
|
font-size: $value;
|
|
44
43
|
height: map-get($butonSizes, $size);
|
|
@@ -52,8 +51,8 @@ $butonSizes: (
|
|
|
52
51
|
align-items: center;
|
|
53
52
|
gap: 8px;
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
font-size:
|
|
54
|
+
:deep(i.mdi) {
|
|
55
|
+
font-size: 16px;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -152,9 +151,11 @@ $butonSizes: (
|
|
|
152
151
|
.farm-btn__content i.mdi {
|
|
153
152
|
color: gray;
|
|
154
153
|
}
|
|
154
|
+
.farm-icon {
|
|
155
|
+
margin-right: auto;
|
|
156
|
+
}
|
|
155
157
|
|
|
156
|
-
@each $size,
|
|
157
|
-
$value in $sizes {
|
|
158
|
+
@each $size, $value in $sizes {
|
|
158
159
|
&#{'.farm-btn[size=' + $size + ']'} {
|
|
159
160
|
font-size: $value;
|
|
160
161
|
}
|
|
@@ -203,7 +204,7 @@ $butonSizes: (
|
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
&#{'.farm-btn--white'}:not(.farm-btn--disabled) {
|
|
206
|
-
|
|
207
|
+
:deep(.farm-btn__content i.mdi) {
|
|
207
208
|
color: white;
|
|
208
209
|
}
|
|
209
210
|
}
|
|
@@ -219,7 +220,7 @@ $butonSizes: (
|
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
&:not(.farm-btn--outlined):not(.farm-btn--plain):not(.farm-btn--icon) {
|
|
222
|
-
|
|
223
|
+
:deep(.farm-btn__content) {
|
|
223
224
|
i.mdi {
|
|
224
225
|
color: white;
|
|
225
226
|
}
|
|
@@ -325,4 +326,4 @@ $butonSizes: (
|
|
|
325
326
|
width: 100%;
|
|
326
327
|
margin: 0;
|
|
327
328
|
}
|
|
328
|
-
}
|
|
329
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import DefaultButton from './DefaultButton.vue';
|
|
3
|
+
|
|
2
4
|
import baseThemeColors from '../../../configurations/_theme-colors-base.module.scss';
|
|
5
|
+
|
|
3
6
|
import './Buttons.stories.scss';
|
|
4
|
-
import DefaultButton from './DefaultButton.vue';
|
|
5
7
|
const colors = Object.keys(baseThemeColors);
|
|
6
8
|
|
|
7
9
|
export default {
|
|
@@ -11,14 +11,20 @@
|
|
|
11
11
|
<slot></slot>
|
|
12
12
|
</span>
|
|
13
13
|
</button>
|
|
14
|
-
<router-link
|
|
14
|
+
<router-link
|
|
15
|
+
:to="to"
|
|
16
|
+
v-bind="$attrs"
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
:class="classes"
|
|
19
|
+
v-else
|
|
20
|
+
>
|
|
15
21
|
<span class="farm-btn__content">
|
|
16
22
|
<slot></slot>
|
|
17
23
|
</span>
|
|
18
24
|
</router-link>
|
|
19
25
|
</template>
|
|
20
26
|
<script lang="ts">
|
|
21
|
-
import { PropType } from 'vue';
|
|
27
|
+
import { PropType, computed, toRefs } from 'vue';
|
|
22
28
|
|
|
23
29
|
export default {
|
|
24
30
|
name: 'farm-btn',
|
|
@@ -97,29 +103,33 @@ export default {
|
|
|
97
103
|
},
|
|
98
104
|
},
|
|
99
105
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
obj['farm-btn--' + key] = this[key];
|
|
107
|
-
});
|
|
106
|
+
setup(props: any) {
|
|
107
|
+
const { elevated, rounded, icon, full, color, variation, outlined, plain, disabled } =
|
|
108
|
+
toRefs(props);
|
|
109
|
+
|
|
110
|
+
const classes = computed(() => {
|
|
111
|
+
|
|
108
112
|
return {
|
|
109
113
|
'farm-btn': true,
|
|
110
|
-
'farm-btn--elevated':
|
|
111
|
-
'farm-btn--round':
|
|
112
|
-
'farm-btn--rounded':
|
|
113
|
-
'farm-btn--icon':
|
|
114
|
-
'farm-btn--full':
|
|
115
|
-
['farm-btn--' +
|
|
116
|
-
['farm-btn--variation-' +
|
|
117
|
-
|
|
114
|
+
'farm-btn--elevated': elevated.value,
|
|
115
|
+
'farm-btn--round': isRound.value,
|
|
116
|
+
'farm-btn--rounded': rounded.value,
|
|
117
|
+
'farm-btn--icon': icon.value,
|
|
118
|
+
'farm-btn--full': full.value,
|
|
119
|
+
['farm-btn--' + color.value]: true,
|
|
120
|
+
['farm-btn--variation-' + variation.value]: true,
|
|
121
|
+
'farm-btn--outlined': outlined.value,
|
|
122
|
+
'farm-btn--plain': plain.value,
|
|
123
|
+
'farm-btn--disabled': disabled.value,
|
|
118
124
|
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const isRound = computed(() => Boolean(icon.value));
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
classes,
|
|
131
|
+
isRound,
|
|
132
|
+
};
|
|
123
133
|
},
|
|
124
134
|
};
|
|
125
135
|
</script>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import DefaultButton from '../DefaultButton.vue';
|
|
3
4
|
|
|
4
5
|
describe('DefaultButton component', () => {
|
|
5
6
|
let wrapper;
|
|
@@ -28,5 +29,9 @@ describe('DefaultButton component', () => {
|
|
|
28
29
|
expect(component.classes).toBeDefined();
|
|
29
30
|
});
|
|
30
31
|
|
|
32
|
+
it('get classes with props set', async () => {
|
|
33
|
+
await wrapper.setProps({ outlined: true, plain: true, disabled: true });
|
|
34
|
+
expect(component.classes['farm-btn--outlined']).toBeTruthy();
|
|
35
|
+
});
|
|
31
36
|
});
|
|
32
37
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import CardContent from '../CardContent';
|
|
3
4
|
|
|
4
5
|
describe('CardContent component', () => {
|
|
@@ -14,7 +15,7 @@ describe('CardContent component', () => {
|
|
|
14
15
|
|
|
15
16
|
describe('mount component', () => {
|
|
16
17
|
it('renders correctly', () => {
|
|
17
|
-
expect(wrapper.element).
|
|
18
|
+
expect(wrapper.element).toBeDefined();
|
|
18
19
|
});
|
|
19
20
|
});
|
|
20
21
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import Card from '../Card';
|
|
3
4
|
|
|
4
5
|
describe('Card component', () => {
|
|
@@ -14,7 +15,7 @@ describe('Card component', () => {
|
|
|
14
15
|
|
|
15
16
|
describe('mount component', () => {
|
|
16
17
|
it('renders correctly', () => {
|
|
17
|
-
expect(wrapper.element).
|
|
18
|
+
expect(wrapper.element).toBeDefined();
|
|
18
19
|
});
|
|
19
20
|
});
|
|
20
21
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import Checkbox from './Checkbox.vue';
|
|
2
|
+
|
|
2
3
|
import baseThemeColors from '../../configurations/_theme-colors-base.module.scss';
|
|
3
4
|
import sizes from '../../configurations/sizes';
|
|
5
|
+
|
|
4
6
|
const colors = Object.keys(baseThemeColors);
|
|
5
7
|
const variations = ['', 'darken', 'lighten'];
|
|
6
8
|
|
|
@@ -23,11 +23,14 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
import { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
import modelValueWatcher from './modelValueWatcher';
|
|
28
|
+
|
|
29
|
+
import deepEqual from '../../composition/deepEqual';
|
|
27
30
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
28
31
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
29
|
-
import
|
|
30
|
-
|
|
32
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
33
|
+
|
|
31
34
|
|
|
32
35
|
export default {
|
|
33
36
|
name: 'farm-checkbox',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import Checkbox from '../Checkbox';
|
|
3
4
|
|
|
4
5
|
describe('Checkbox component', () => {
|
|
@@ -20,7 +21,7 @@ describe('Checkbox component', () => {
|
|
|
20
21
|
|
|
21
22
|
describe('mount component', () => {
|
|
22
23
|
it('renders correctly', () => {
|
|
23
|
-
expect(wrapper.element).
|
|
24
|
+
expect(wrapper.element).toBeDefined();
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import Chip from '../Chip';
|
|
3
4
|
|
|
4
5
|
describe('Chip component', () => {
|
|
@@ -14,7 +15,7 @@ describe('Chip component', () => {
|
|
|
14
15
|
|
|
15
16
|
describe('mount component', () => {
|
|
16
17
|
it('renders correctly', () => {
|
|
17
|
-
expect(wrapper.element).
|
|
18
|
+
expect(wrapper.element).toBeDefined();
|
|
18
19
|
});
|
|
19
20
|
});
|
|
20
21
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ChipInviteStatus from '../ChipInviteStatus.vue';
|
|
3
4
|
describe('ChipInviteStatus component', () => {
|
|
4
5
|
let wrapper;
|
|
@@ -16,7 +17,7 @@ describe('ChipInviteStatus component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
});
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<farm-card class="collapsible">
|
|
3
3
|
<farm-card-content gutter="md">
|
|
4
|
-
<div
|
|
4
|
+
<div
|
|
5
|
+
class="collapsible__header"
|
|
6
|
+
@click="onToggleCollapsible(status)"
|
|
7
|
+
>
|
|
5
8
|
<div class="collapsible__content-title">
|
|
6
|
-
<div
|
|
7
|
-
|
|
9
|
+
<div
|
|
10
|
+
class="collapsible__icon collapsible__icon--main"
|
|
11
|
+
v-if="icon !== ''"
|
|
12
|
+
>
|
|
13
|
+
<farm-icon
|
|
14
|
+
size="md"
|
|
15
|
+
:color="colorIcon"
|
|
16
|
+
>
|
|
8
17
|
{{ icon }}
|
|
9
18
|
</farm-icon>
|
|
10
19
|
</div>
|
|
11
|
-
<farm-heading
|
|
20
|
+
<farm-heading
|
|
21
|
+
type="6"
|
|
22
|
+
color="black"
|
|
23
|
+
>
|
|
12
24
|
{{ title }}
|
|
13
25
|
</farm-heading>
|
|
14
|
-
<farm-btn
|
|
26
|
+
<farm-btn
|
|
27
|
+
outlined
|
|
28
|
+
class="ml-6"
|
|
29
|
+
v-if="hasButton"
|
|
30
|
+
@click.stop="$emit('onClick')"
|
|
31
|
+
>
|
|
15
32
|
{{ labelButton }}
|
|
16
33
|
</farm-btn>
|
|
17
34
|
</div>
|
|
18
35
|
<div class="collapsible__content-right">
|
|
19
|
-
<div
|
|
36
|
+
<div
|
|
37
|
+
class="collapsible__icon"
|
|
38
|
+
v-if="showChip"
|
|
39
|
+
>
|
|
20
40
|
<farm-chip
|
|
21
41
|
:color="colorChip"
|
|
22
42
|
:dense="dense"
|
|
@@ -27,14 +47,20 @@
|
|
|
27
47
|
</farm-chip>
|
|
28
48
|
</div>
|
|
29
49
|
<div class="collapsible__icon collapsible__icon--arrow">
|
|
30
|
-
<farm-icon
|
|
50
|
+
<farm-icon
|
|
51
|
+
size="md"
|
|
52
|
+
color="primary"
|
|
53
|
+
>
|
|
31
54
|
{{ arrowIcon }}
|
|
32
55
|
</farm-icon>
|
|
33
56
|
</div>
|
|
34
57
|
</div>
|
|
35
58
|
</div>
|
|
36
59
|
<transition name="fade">
|
|
37
|
-
<div
|
|
60
|
+
<div
|
|
61
|
+
class="collapsible__body"
|
|
62
|
+
v-show="status"
|
|
63
|
+
>
|
|
38
64
|
<slot></slot>
|
|
39
65
|
</div>
|
|
40
66
|
</transition>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ContextMenu from '../ContextMenu';
|
|
3
4
|
|
|
4
5
|
describe('ContextMenu component', () => {
|
|
@@ -16,7 +17,7 @@ describe('ContextMenu component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import CopyToClipboard from '../CopyToClipboard';
|
|
3
4
|
|
|
4
5
|
describe('CopyToClipboard component', () => {
|
|
@@ -18,7 +19,7 @@ describe('CopyToClipboard component', () => {
|
|
|
18
19
|
|
|
19
20
|
describe('mount component', () => {
|
|
20
21
|
it('renders correctly', () => {
|
|
21
|
-
expect(wrapper.element).
|
|
22
|
+
expect(wrapper.element).toBeDefined();
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
});
|