@eturnity/eturnity_reusable_components 7.33.2 → 7.33.4-EPDM-11766.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 +30 -33
- package/src/Test.vue +10 -0
- package/src/components/buttons/closeButton/CloseButton.stories.js +16 -19
- package/src/components/buttons/closeButton/index.vue +1 -0
- package/src/components/icon/index.vue +1 -1
- package/src/components/inputs/toggle/toggle.spec.js +1 -1
- package/src/components/modals/modal/modal.stories.js +4 -4
- package/src/stories/Button.stories.js +48 -0
- package/src/stories/Button.vue +52 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.js +41 -0
- package/src/stories/Header.vue +59 -0
- package/src/stories/Page.stories.js +30 -0
- package/src/stories/Page.vue +83 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/.eslintrc.js +0 -186
- package/.prettierrc +0 -9
- package/.storybook/main.js +0 -8
- package/.storybook/preview.js +0 -46
- package/babel.config.js +0 -7
- package/jest.config.js +0 -19
- package/postcss.config.js +0 -6
- package/src/components/banner/banner/banner.stories.js +0 -31
- /package/src/components/icon/{iconCache.js → iconCache.mjs} +0 -0
package/package.json
CHANGED
@@ -1,27 +1,36 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "7.33.
|
3
|
+
"version": "7.33.4-EPDM-11766.0",
|
4
|
+
"files": [
|
5
|
+
"dist",
|
6
|
+
"src"
|
7
|
+
],
|
8
|
+
"main": "./dist/main.umd.js",
|
9
|
+
"module": "./dist/main.es.js",
|
4
10
|
"private": false,
|
5
11
|
"scripts": {
|
6
|
-
"dev": "
|
7
|
-
"build": "
|
12
|
+
"dev": "vite",
|
13
|
+
"build": "vite build",
|
8
14
|
"lint": "vue-cli-service lint",
|
9
|
-
"storybook": "
|
10
|
-
"build-storybook": "build
|
15
|
+
"storybook": "storybook dev -p 6006",
|
16
|
+
"build-storybook": "storybook build",
|
11
17
|
"prettier": "prettier --write 'src/**/*.{js,vue}'",
|
12
18
|
"test": "jest",
|
19
|
+
"test-coverage": "jest --coverage",
|
13
20
|
"prepublishOnly": "npm run test"
|
14
21
|
},
|
15
22
|
"dependencies": {
|
16
|
-
"@
|
23
|
+
"@originjs/vite-plugin-commonjs": "1.0.3",
|
24
|
+
"@storybook/vue3": "8.2.8",
|
17
25
|
"@vue/compat": "3.3.4",
|
18
26
|
"@vueform/slider": "2.1.10",
|
19
27
|
"@vuepic/vue-datepicker": "6.1.0",
|
20
28
|
"click-outside-vue3": "4.0.1",
|
21
29
|
"html-loader": "0.5.5",
|
22
30
|
"postcss": "8.4.25",
|
31
|
+
"vite-plugin-require": "1.1.14",
|
23
32
|
"vue": "3.3.4",
|
24
|
-
"vue-router": "
|
33
|
+
"vue-router": "4.2.2",
|
25
34
|
"vue3-styled-components": "1.2.1",
|
26
35
|
"vuedraggable": "4.1.0"
|
27
36
|
},
|
@@ -29,7 +38,16 @@
|
|
29
38
|
"@babel/core": "^7.25.2",
|
30
39
|
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
31
40
|
"@babel/preset-env": "^7.25.3",
|
41
|
+
"@chromatic-com/storybook": "^1.6.1",
|
42
|
+
"@storybook/addon-essentials": "^8.2.8",
|
43
|
+
"@storybook/addon-interactions": "^8.2.8",
|
44
|
+
"@storybook/addon-links": "^8.2.8",
|
45
|
+
"@storybook/addon-onboarding": "^8.2.8",
|
46
|
+
"@storybook/blocks": "^8.2.8",
|
47
|
+
"@storybook/test": "^8.2.8",
|
48
|
+
"@storybook/testing-library": "^0.2.1",
|
32
49
|
"@types/node": "^22.1.0",
|
50
|
+
"@vitejs/plugin-vue": "2.0.1",
|
33
51
|
"@vue/cli-plugin-babel": "^5.0.8",
|
34
52
|
"@vue/cli-plugin-eslint": "5.0.8",
|
35
53
|
"@vue/cli-service": "^5.0.8",
|
@@ -40,34 +58,14 @@
|
|
40
58
|
"eslint": "8.0.1",
|
41
59
|
"eslint-config-prettier": "8.8.0",
|
42
60
|
"eslint-plugin-prettier": "4.2.1",
|
61
|
+
"eslint-plugin-storybook": "^0.8.0",
|
43
62
|
"eslint-plugin-vue": "9.14.1",
|
44
63
|
"jest": "^26.6.3",
|
45
64
|
"prettier": "2.8.4",
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"
|
50
|
-
"transform": {
|
51
|
-
"^.+\\.vue$": "vue-jest",
|
52
|
-
"^.+\\.js$": "babel-jest"
|
53
|
-
},
|
54
|
-
"moduleFileExtensions": [
|
55
|
-
"js",
|
56
|
-
"json",
|
57
|
-
"vue"
|
58
|
-
],
|
59
|
-
"transformIgnorePatterns": [
|
60
|
-
"<rootDir>/node_modules/"
|
61
|
-
],
|
62
|
-
"testMatch": [
|
63
|
-
"**/tests/unit/**/*.spec.js"
|
64
|
-
],
|
65
|
-
"collectCoverageFrom": [
|
66
|
-
"src/**/*.{js,vue}",
|
67
|
-
"!src/main.js",
|
68
|
-
"!src/router/index.js",
|
69
|
-
"!**/node_modules/**"
|
70
|
-
]
|
65
|
+
"storybook": "^8.2.8",
|
66
|
+
"vite": "2.7.2",
|
67
|
+
"vue-jest": "^5.0.0-alpha.10",
|
68
|
+
"vue-loader": "^17.4.2"
|
71
69
|
},
|
72
70
|
"browserslist": [
|
73
71
|
"> 1%",
|
@@ -75,7 +73,6 @@
|
|
75
73
|
"not dead"
|
76
74
|
],
|
77
75
|
"description": "## Project setup ``` npm install ```",
|
78
|
-
"main": "babel.config.js",
|
79
76
|
"repository": {
|
80
77
|
"type": "git",
|
81
78
|
"url": "git+https://aaronenser@bitbucket.org/eturnitydevs/eturnity_reusable_components.git"
|
package/src/Test.vue
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
<template>
|
2
2
|
<PageContainer>
|
3
|
+
<ToggleComponent
|
4
|
+
:disabled="false"
|
5
|
+
info-text-message="My info message"
|
6
|
+
:is-checked="true"
|
7
|
+
label="My Label Text"
|
8
|
+
label-align="right"
|
9
|
+
toggle-color="red"
|
10
|
+
/>
|
3
11
|
<br />
|
4
12
|
<InputNumber
|
5
13
|
background-color="transparent"
|
@@ -55,6 +63,7 @@
|
|
55
63
|
<script>
|
56
64
|
import styled from 'vue3-styled-components'
|
57
65
|
import InputNumber from '@/components/inputs/inputNumber'
|
66
|
+
import ToggleComponent from '@/components/inputs/toggle'
|
58
67
|
|
59
68
|
const PageContainer = styled.div`
|
60
69
|
padding: 40px;
|
@@ -65,6 +74,7 @@
|
|
65
74
|
components: {
|
66
75
|
PageContainer,
|
67
76
|
InputNumber,
|
77
|
+
ToggleComponent,
|
68
78
|
},
|
69
79
|
data() {
|
70
80
|
return {
|
@@ -3,27 +3,24 @@ import CloseButton from './index.vue'
|
|
3
3
|
export default {
|
4
4
|
title: 'CloseButton',
|
5
5
|
component: CloseButton,
|
6
|
-
|
6
|
+
tags: ['autodocs'],
|
7
7
|
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
// // To use:
|
10
|
+
// // import CloseButton from "@eturnity/eturnity_reusable_components/src/components/buttons/closeButton"
|
11
|
+
// // <close-button
|
12
|
+
// // color="#fff"
|
13
|
+
// // />
|
14
|
+
// })
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
})
|
22
|
-
|
23
|
-
export const Default = Template.bind({})
|
24
|
-
Default.args = {}
|
16
|
+
export const Default = {
|
17
|
+
args: {
|
18
|
+
color: 'red',
|
19
|
+
},
|
20
|
+
}
|
25
21
|
|
26
|
-
export const ColorButton =
|
27
|
-
|
28
|
-
|
22
|
+
export const ColorButton = {
|
23
|
+
args: {
|
24
|
+
color: 'blue',
|
25
|
+
},
|
29
26
|
}
|
@@ -3,7 +3,7 @@ import { mount } from '@vue/test-utils'
|
|
3
3
|
import RCToggle from '@/components/inputs/toggle'
|
4
4
|
import theme from '@/assets/theme'
|
5
5
|
|
6
|
-
jest.mock('@/components/icon/iconCache', () => ({
|
6
|
+
jest.mock('@/components/icon/iconCache.mjs', () => ({
|
7
7
|
// need to mock this due to how jest handles import.meta
|
8
8
|
fetchIcon: jest.fn(() => Promise.resolve('mocked-icon-url.svg')),
|
9
9
|
}))
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import Modal from './index.vue'
|
2
2
|
|
3
3
|
export default {
|
4
|
-
title: 'Modal',
|
4
|
+
title: 'Components/Modal',
|
5
5
|
component: Modal,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
@@ -21,11 +21,11 @@ const Template = (args, { argTypes }) => ({
|
|
21
21
|
// </modal>
|
22
22
|
})
|
23
23
|
|
24
|
-
export const Default = Template.bind({
|
24
|
+
export const Default = Template.bind({})
|
25
|
+
Default.args = {
|
25
26
|
isOpen: true,
|
26
27
|
preventOutsideClose: true,
|
27
28
|
isLoading: false,
|
28
29
|
hideClose: false,
|
29
30
|
backdrop: 'dark',
|
30
|
-
}
|
31
|
-
Default.args = {}
|
31
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import MyButton from './Button.vue';
|
2
|
+
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
|
4
|
+
export default {
|
5
|
+
title: 'Example/Button',
|
6
|
+
component: MyButton,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
backgroundColor: {
|
10
|
+
control: 'color',
|
11
|
+
},
|
12
|
+
onClick: {},
|
13
|
+
size: {
|
14
|
+
control: {
|
15
|
+
type: 'select',
|
16
|
+
},
|
17
|
+
options: ['small', 'medium', 'large'],
|
18
|
+
},
|
19
|
+
},
|
20
|
+
};
|
21
|
+
|
22
|
+
// More on writing stories with args: https://storybook.js.org/docs/vue/writing-stories/args
|
23
|
+
export const Primary = {
|
24
|
+
args: {
|
25
|
+
primary: true,
|
26
|
+
label: 'Button',
|
27
|
+
},
|
28
|
+
};
|
29
|
+
|
30
|
+
export const Secondary = {
|
31
|
+
args: {
|
32
|
+
label: 'Button',
|
33
|
+
},
|
34
|
+
};
|
35
|
+
|
36
|
+
export const Large = {
|
37
|
+
args: {
|
38
|
+
size: 'large',
|
39
|
+
label: 'Button',
|
40
|
+
},
|
41
|
+
};
|
42
|
+
|
43
|
+
export const Small = {
|
44
|
+
args: {
|
45
|
+
size: 'small',
|
46
|
+
label: 'Button',
|
47
|
+
},
|
48
|
+
};
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<template>
|
2
|
+
<button type="button" :class="classes" @click="onClick" :style="style">{{ label }}</button>
|
3
|
+
</template>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
import './button.css';
|
7
|
+
import { reactive, computed } from 'vue';
|
8
|
+
|
9
|
+
export default {
|
10
|
+
name: 'my-button',
|
11
|
+
|
12
|
+
props: {
|
13
|
+
label: {
|
14
|
+
type: String,
|
15
|
+
required: true,
|
16
|
+
},
|
17
|
+
primary: {
|
18
|
+
type: Boolean,
|
19
|
+
default: false,
|
20
|
+
},
|
21
|
+
size: {
|
22
|
+
type: String,
|
23
|
+
validator: function (value) {
|
24
|
+
return ['small', 'medium', 'large'].indexOf(value) !== -1;
|
25
|
+
},
|
26
|
+
},
|
27
|
+
backgroundColor: {
|
28
|
+
type: String,
|
29
|
+
},
|
30
|
+
},
|
31
|
+
|
32
|
+
emits: ['click'],
|
33
|
+
|
34
|
+
setup(props, { emit }) {
|
35
|
+
props = reactive(props);
|
36
|
+
return {
|
37
|
+
classes: computed(() => ({
|
38
|
+
'storybook-button': true,
|
39
|
+
'storybook-button--primary': props.primary,
|
40
|
+
'storybook-button--secondary': !props.primary,
|
41
|
+
[`storybook-button--${props.size || 'medium'}`]: true,
|
42
|
+
})),
|
43
|
+
style: computed(() => ({
|
44
|
+
backgroundColor: props.backgroundColor,
|
45
|
+
})),
|
46
|
+
onClick() {
|
47
|
+
emit('click');
|
48
|
+
},
|
49
|
+
};
|
50
|
+
},
|
51
|
+
};
|
52
|
+
</script>
|