@eturnity/eturnity_reusable_components 7.18.0-EPDM-10335.1 → 7.18.0-qa-dev03.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/.storybook/preview.js +1 -1
- package/package.json +23 -19
- package/src/App.vue +2 -2
- package/src/assets/svgIcons/anchor.svg +18 -0
- package/src/assets/svgIcons/flatten_roof.svg +20 -0
- package/src/assets/svgIcons/split.svg +6 -88
- package/src/components/addNewButton/index.vue +3 -5
- package/src/components/buttons/buttonIcon/index.vue +1 -1
- package/src/components/buttons/closeButton/index.vue +1 -1
- package/src/components/buttons/mainButton/index.vue +1 -6
- package/src/components/card/index.vue +24 -25
- package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
- package/src/components/deleteIcon/index.vue +21 -25
- package/src/components/draggableInputHandle/index.vue +25 -24
- package/src/components/dropdown/index.vue +110 -129
- package/src/components/errorMessage/index.vue +5 -10
- package/src/components/filter/filterSettings.vue +97 -58
- package/src/components/filter/index.vue +3 -3
- package/src/components/filter/parentDropdown.vue +2 -2
- package/src/components/icon/iconCollection.vue +2 -2
- package/src/components/icon/index.vue +75 -67
- package/src/components/iconWrapper/index.vue +4 -1
- package/src/components/infoCard/index.vue +3 -2
- package/src/components/infoText/index.vue +1 -1
- package/src/components/inputs/checkbox/index.vue +6 -21
- package/src/components/inputs/inputNumber/index.vue +10 -10
- package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
- package/src/components/inputs/inputText/index.vue +3 -3
- package/src/components/inputs/radioButton/index.vue +1 -1
- package/src/components/inputs/searchInput/index.vue +11 -28
- package/src/components/inputs/select/index.vue +55 -199
- package/src/components/inputs/select/option/index.vue +11 -36
- package/src/components/inputs/slider/index.vue +16 -16
- package/src/components/inputs/switchField/index.vue +2 -2
- package/src/components/inputs/textAreaInput/index.vue +1 -1
- package/src/components/inputs/toggle/index.vue +2 -2
- package/src/components/label/index.vue +31 -27
- package/src/components/modals/modal/index.vue +6 -2
- package/src/components/navigationTabs/index.vue +20 -27
- package/src/components/pageSubtitle/index.vue +1 -1
- package/src/components/pageTitle/index.vue +4 -4
- package/src/components/pagination/index.vue +1 -1
- package/src/components/progressBar/index.vue +1 -1
- package/src/components/projectMarker/index.vue +9 -16
- package/src/components/sideMenu/index.vue +1 -1
- package/src/components/spinner/index.vue +11 -7
- package/src/components/tableDropdown/index.vue +37 -30
- package/src/components/tables/mainTable/exampleNested.vue +1 -1
- package/src/components/tables/mainTable/index.vue +9 -10
- package/src/components/tables/viewTable/index.vue +2 -2
- package/src/components/threeDots/index.vue +1 -1
- package/src/components/videoThumbnail/index.vue +100 -95
- package/src/main.js +11 -4
- package/src/components/icon/iconCache.js +0 -23
package/.storybook/preview.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "7.18.0-
|
3
|
+
"version": "7.18.0-qa-dev03.0",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -10,26 +10,30 @@
|
|
10
10
|
"build-storybook": "build-storybook"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@
|
14
|
-
"@vue/compat": "3.3.4",
|
15
|
-
"@vueform/slider": "2.1.10",
|
16
|
-
"@vuepic/vue-datepicker": "6.1.0",
|
17
|
-
"click-outside-vue3": "4.0.1",
|
13
|
+
"@vueform/slider": "1.0.5",
|
18
14
|
"html-loader": "0.5.5",
|
19
|
-
"postcss": "8.4.25",
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
15
|
+
"postcss": "^8.4.25",
|
16
|
+
"v-click-outside": "2.1.4",
|
17
|
+
"vue": "2.6.11",
|
18
|
+
"vue-styled-components": "1.6.0",
|
19
|
+
"vue2-datepicker": "3.11.1",
|
20
|
+
"vuedraggable": "2.24.3",
|
21
|
+
"core-js": "3.31.1"
|
23
22
|
},
|
24
23
|
"devDependencies": {
|
25
|
-
"@
|
26
|
-
"@
|
27
|
-
"@
|
28
|
-
"@
|
29
|
-
"@vue
|
30
|
-
"@vue/
|
31
|
-
"eslint": "
|
32
|
-
"
|
24
|
+
"@storybook/addon-actions": "6.2.8",
|
25
|
+
"@storybook/addon-docs": "6.4.19",
|
26
|
+
"@storybook/addon-essentials": "6.2.8",
|
27
|
+
"@storybook/addon-links": "6.2.8",
|
28
|
+
"@storybook/vue": "6.4.19",
|
29
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
30
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
31
|
+
"@vue/cli-service": "~4.5.0",
|
32
|
+
"@vue/composition-api": "1.0.0-rc.10",
|
33
|
+
"babel-eslint": "10.1.0",
|
34
|
+
"eslint": "6.7.2",
|
35
|
+
"eslint-plugin-vue": "6.2.2",
|
36
|
+
"vue-template-compiler": "2.6.11"
|
33
37
|
},
|
34
38
|
"eslintConfig": {
|
35
39
|
"root": true,
|
@@ -41,7 +45,7 @@
|
|
41
45
|
"eslint:recommended"
|
42
46
|
],
|
43
47
|
"parserOptions": {
|
44
|
-
"parser": "
|
48
|
+
"parser": "babel-eslint"
|
45
49
|
},
|
46
50
|
"rules": {}
|
47
51
|
},
|
package/src/App.vue
CHANGED
@@ -55,9 +55,9 @@
|
|
55
55
|
</template>
|
56
56
|
|
57
57
|
<script>
|
58
|
-
import { ThemeProvider } from '
|
58
|
+
import { ThemeProvider } from 'vue-styled-components'
|
59
59
|
import theme from './assets/theme'
|
60
|
-
import styled from '
|
60
|
+
import styled from 'vue-styled-components'
|
61
61
|
import InputNumber from '@/components/inputs/inputNumber'
|
62
62
|
|
63
63
|
const PageContainer = styled.div`
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
3
|
+
<svg height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
4
|
+
viewBox="0 0 204.851 204.851" xml:space="preserve">
|
5
|
+
<g>
|
6
|
+
<g>
|
7
|
+
<g>
|
8
|
+
<path fill="white" d="M139.518,128.595l16.834,16.336c0,0-20.644,29.877-42.725,30.473
|
9
|
+
c0.479,0,0.117-84.092,0.039-104.472c14.694-4.797,25.402-18.182,25.402-34.117c0-20.009-16.697-36.218-37.273-36.218
|
10
|
+
c-20.615,0-37.312,16.209-37.312,36.208c0,15.671,10.376,28.929,24.748,33.961l0.098,104.277
|
11
|
+
c-26.643-1.837-42.061-27.474-42.061-27.474l17.997-17.41L0,120.505l9.887,63.301l17.362-16.795
|
12
|
+
c15.036,12.105,32.017,37.244,72.876,37.244c51.332-1.309,63.184-28.939,76.344-39.804l18.993,18.514l9.389-63.907
|
13
|
+
L139.518,128.595z M82.558,36.208c0-10.298,8.608-18.661,19.218-18.661s19.257,8.363,19.257,18.661
|
14
|
+
c0,10.327-8.647,18.681-19.257,18.681S82.558,46.535,82.558,36.208z"/>
|
15
|
+
</g>
|
16
|
+
</g>
|
17
|
+
</g>
|
18
|
+
</svg>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
width="16"
|
6
|
+
height="8"
|
7
|
+
viewBox="0 0 16 8"
|
8
|
+
version="1.1"
|
9
|
+
id="svg5"
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
11
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
12
|
+
<g
|
13
|
+
transform="translate(-55.350933,-93.588073)">
|
14
|
+
<path
|
15
|
+
fill="#000000"
|
16
|
+
d="m 61.719348,100.39494 1.004406,0.0185 -0.0013,-2.679323 0.88345,-4.27e-4 c -0.0051,-0.01381 -0.01401,2.69128 -0.01401,2.69128 l 1.05348,-0.0159 -1.582401,1.44453 z m -6.368415,-0.817395 7.856738,-5.989472 7.616581,6.321372 -1.240034,1.266145 -6.409573,-5.185912 -6.581971,5.125212 z"
|
17
|
+
id="path874"
|
18
|
+
/>
|
19
|
+
</g>
|
20
|
+
</svg>
|
@@ -1,94 +1,12 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
-
|
4
1
|
<svg
|
5
|
-
version="1.1"
|
6
|
-
id="svg438"
|
7
2
|
width="838"
|
8
3
|
height="833"
|
9
4
|
viewBox="0 0 838 833"
|
10
|
-
sodipodi:docname="split.svg"
|
11
|
-
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
12
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
13
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
14
5
|
xmlns="http://www.w3.org/2000/svg"
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<stop
|
22
|
-
style="stop-color:#ffffff;stop-opacity:1;"
|
23
|
-
offset="0"
|
24
|
-
id="stop7381" />
|
25
|
-
</linearGradient>
|
26
|
-
<linearGradient
|
27
|
-
id="linearGradient6933"
|
28
|
-
inkscape:swatch="solid">
|
29
|
-
<stop
|
30
|
-
style="stop-color:#000000;stop-opacity:1;"
|
31
|
-
offset="0"
|
32
|
-
id="stop6931" />
|
33
|
-
</linearGradient>
|
34
|
-
</defs>
|
35
|
-
<sodipodi:namedview
|
36
|
-
id="namedview440"
|
37
|
-
pagecolor="#ffffff"
|
38
|
-
bordercolor="#666666"
|
39
|
-
borderopacity="1.0"
|
40
|
-
inkscape:pageshadow="2"
|
41
|
-
inkscape:pageopacity="0.0"
|
42
|
-
inkscape:pagecheckerboard="0"
|
43
|
-
showgrid="false"
|
44
|
-
inkscape:zoom="0.95078031"
|
45
|
-
inkscape:cx="466.45896"
|
46
|
-
inkscape:cy="549.02273"
|
47
|
-
inkscape:window-width="1920"
|
48
|
-
inkscape:window-height="1007"
|
49
|
-
inkscape:window-x="0"
|
50
|
-
inkscape:window-y="0"
|
51
|
-
inkscape:window-maximized="1"
|
52
|
-
inkscape:current-layer="g444" />
|
53
|
-
<g
|
54
|
-
inkscape:groupmode="layer"
|
55
|
-
inkscape:label="Image"
|
56
|
-
id="g444">
|
57
|
-
<circle
|
58
|
-
id="path5141"
|
59
|
-
style="fill:none;stroke:#fffeff;stroke-opacity:1"
|
60
|
-
cx="0.66903824"
|
61
|
-
cy="263.65976"
|
62
|
-
r="0.52949077" />
|
63
|
-
<circle
|
64
|
-
id="path5143"
|
65
|
-
style="fill:none;stroke:#fffeff;stroke-opacity:1"
|
66
|
-
cx="0.66903824"
|
67
|
-
cy="263.65976"
|
68
|
-
r="0.52949077" />
|
69
|
-
<g
|
70
|
-
id="path5184"
|
71
|
-
style="stroke:#fffeff;stroke-opacity:1;fill:none">
|
72
|
-
<path
|
73
|
-
style="color:#000000;fill:none;stroke-width:154.42;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
74
|
-
d="m -156.35359,113.32885 348.76355,221.92361 744.6236,-498.85799"
|
75
|
-
id="path6861" />
|
76
|
-
<path
|
77
|
-
style="color:#000000;fill:none;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
78
|
-
d="M 894.06055,-227.75 191.32227,243.04492 -114.9043,48.1875 -197.80273,178.46875 193.49609,427.45898 980.00781,-99.460937 Z"
|
79
|
-
id="path6863" />
|
80
|
-
</g>
|
81
|
-
<g
|
82
|
-
id="path5186"
|
83
|
-
style="stroke:#fffeff;stroke-opacity:1;fill:none">
|
84
|
-
<path
|
85
|
-
style="color:#000000;fill:none;stroke-width:166.34;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
86
|
-
d="M 816.06617,905.68984 357.97591,628.01443 1035.7943,176.14788"
|
87
|
-
id="path6855" />
|
88
|
-
<path
|
89
|
-
style="color:#000000;fill:none;-inkscape-stroke:none;stroke:#fffeff;stroke-opacity:1"
|
90
|
-
d="M 989.66016,106.94531 203.03125,631.34961 772.95312,976.81445 859.17773,834.56641 512.91992,624.67773 1081.9277,245.34961 Z"
|
91
|
-
id="path6857" />
|
92
|
-
</g>
|
93
|
-
</g>
|
6
|
+
>
|
7
|
+
|
8
|
+
<path
|
9
|
+
fill="#B2B9C5"
|
10
|
+
d="m -5.0875843,441.73292 3.3936693,-93.74987 847.237645,-2.85667 -3.71049,95.94711 z m 333.6519143,232.4369 -98.27777,-105.35245 43.34233,-0.60608 c 23.83828,-0.33335 56.95483,-0.67085 73.59233,-0.75 l 30.25,-0.14392 L 376,413.05958 374.48738,213.61969 301.67731,213.3632 228.86724,213.10671 326.58798,107.77384 C 380.33439,49.84076 424.5019,2.3657611 424.73801,2.2738411 425.25724,2.0716911 628.96623,212.59506 628.96623,213.35636 c 0,0.29424 -41.55385,0.25035 -81.97885,0.25035 h -73.5 L 475,413.0466 l 1.47122,154.25779 72.81196,0.25649 72.81196,0.25649 -91.89971,99.5 -103.35334,112.2049 z"
|
11
|
+
/>
|
94
12
|
</svg>
|
@@ -1,15 +1,14 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container :shouldPosition="shouldPosition">
|
3
3
|
<button-container :data-id="dataId">
|
4
|
-
<
|
4
|
+
<plus-button :src="require('../../assets/icons/plus_button.svg')" />
|
5
5
|
</button-container>
|
6
6
|
</page-container>
|
7
7
|
</template>
|
8
8
|
|
9
9
|
<script>
|
10
10
|
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
-
import styled from '
|
12
|
-
import PlusButtonSvg from '../../assets/icons/plus_button.svg'
|
11
|
+
import styled from 'vue-styled-components'
|
13
12
|
|
14
13
|
const pageAttrs = { shouldPosition: Boolean }
|
15
14
|
const PageContainer = styled('div', pageAttrs)`
|
@@ -47,8 +46,7 @@ export default {
|
|
47
46
|
components: {
|
48
47
|
PageContainer,
|
49
48
|
ButtonContainer,
|
50
|
-
PlusButton
|
51
|
-
PlusButtonSvg
|
49
|
+
PlusButton
|
52
50
|
},
|
53
51
|
props: {
|
54
52
|
shouldPosition: {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container>
|
3
3
|
<button-container
|
4
|
-
:id="id"
|
5
4
|
:type="type"
|
6
5
|
:minWidth="minWidth"
|
7
6
|
:isDisabled="isDisabled"
|
@@ -26,7 +25,7 @@
|
|
26
25
|
// :data-id="test_data_id"
|
27
26
|
// />
|
28
27
|
|
29
|
-
import styled from '
|
28
|
+
import styled from 'vue-styled-components'
|
30
29
|
|
31
30
|
const PageContainer = styled.div``
|
32
31
|
|
@@ -99,10 +98,6 @@ export default {
|
|
99
98
|
required: false,
|
100
99
|
default: null
|
101
100
|
},
|
102
|
-
id: {
|
103
|
-
required: false,
|
104
|
-
default: null
|
105
|
-
},
|
106
101
|
dataId: {
|
107
102
|
type: String,
|
108
103
|
default: ''
|
@@ -1,26 +1,26 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
<Wrapper
|
3
|
+
v-show="!isLoading"
|
4
|
+
:class="viewCardClass"
|
5
|
+
:width="width"
|
6
|
+
:minWidth="minWidth"
|
7
|
+
>
|
8
|
+
<Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
|
9
|
+
<CardWrapper v-else>
|
10
|
+
<CardTitle :class="titleClass" >
|
11
|
+
{{ $gettext(title) }}
|
12
|
+
<et-popover
|
13
|
+
v-if="showPopover && popoverText !== ''"
|
14
|
+
:text="popoverText"
|
15
|
+
></et-popover>
|
16
|
+
</CardTitle>
|
17
|
+
<slot></slot>
|
18
|
+
</CardWrapper>
|
19
|
+
</Wrapper>
|
20
20
|
</template>
|
21
21
|
|
22
22
|
<script>
|
23
|
-
import styled from '
|
23
|
+
import styled from 'vue-styled-components'
|
24
24
|
import Spinner from '../spinner'
|
25
25
|
|
26
26
|
const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
|
@@ -28,10 +28,9 @@ const Wrapper = styled('div', WrapperProps)`
|
|
28
28
|
max-width: ${(props) => props.width};
|
29
29
|
min-width: ${(props) => props.minWidth};
|
30
30
|
padding: 20px;
|
31
|
-
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
32
|
-
0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
31
|
+
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
33
32
|
border-radius: 4px;
|
34
|
-
background-color: ${
|
33
|
+
background-color: ${props => props.theme.colors.white};
|
35
34
|
height: 100%;
|
36
35
|
`
|
37
36
|
|
@@ -43,7 +42,7 @@ const CardWrapper = styled('div')`
|
|
43
42
|
const CardTitle = styled('p')`
|
44
43
|
font-size: 14px;
|
45
44
|
line-height: 1;
|
46
|
-
color: ${
|
45
|
+
color: ${props => props.theme.colors.black};
|
47
46
|
font-weight: 700;
|
48
47
|
margin-bottom: 10px;
|
49
48
|
`
|
@@ -90,7 +89,7 @@ export default {
|
|
90
89
|
Spinner,
|
91
90
|
Wrapper,
|
92
91
|
CardTitle,
|
93
|
-
CardWrapper
|
92
|
+
CardWrapper,
|
94
93
|
}
|
95
94
|
}
|
96
|
-
</script>
|
95
|
+
</script>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import DeleteIcon from
|
1
|
+
import DeleteIcon from "./index.vue"
|
2
2
|
|
3
3
|
export default {
|
4
|
-
title:
|
5
|
-
component: DeleteIcon
|
4
|
+
title: "DeleteIcon",
|
5
|
+
component: DeleteIcon,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
8
8
|
|
@@ -11,19 +11,19 @@ const Template = (args, { argTypes }) => ({
|
|
11
11
|
components: { DeleteIcon },
|
12
12
|
// The story's `args` need to be mapped into the template through the `setup()` method
|
13
13
|
props: Object.keys(argTypes),
|
14
|
-
template: '<delete-icon v-bind="$props" />'
|
14
|
+
template: '<delete-icon v-bind="$props" />',
|
15
15
|
|
16
16
|
// import DeleteIcon from "@eturnity/eturnity_reusable_components/src/components/deleteIcon"
|
17
17
|
// To use:
|
18
|
-
// <delete-icon color="gray" @click="onDeleteItem(item)" :isDisabled="true" />
|
18
|
+
// <delete-icon color="gray" @click.native="onDeleteItem(item)" :isDisabled="true" />
|
19
19
|
})
|
20
20
|
|
21
21
|
export const Default = Template.bind({})
|
22
22
|
Default.args = {
|
23
|
-
isDisabled: false
|
23
|
+
isDisabled: false,
|
24
24
|
}
|
25
25
|
|
26
26
|
export const Disabled = Template.bind({})
|
27
27
|
Disabled.args = {
|
28
|
-
isDisabled: true
|
28
|
+
isDisabled: true,
|
29
29
|
}
|
@@ -4,62 +4,58 @@
|
|
4
4
|
@mouseleave="isHovered = false"
|
5
5
|
:isDisabled="isDisabled"
|
6
6
|
>
|
7
|
-
<
|
8
|
-
|
7
|
+
<icon-image
|
8
|
+
v-if="isHovered && !isDisabled"
|
9
|
+
:hoverBg="hoverBg"
|
10
|
+
:src="require('../../assets/icons/delete_icon.svg')"
|
11
|
+
/>
|
12
|
+
<icon-image
|
13
|
+
v-else
|
14
|
+
:src="require('../../assets/icons/delete_icon_gray.svg')"
|
15
|
+
/>
|
9
16
|
</wrapper>
|
10
17
|
</template>
|
11
18
|
|
12
19
|
<script>
|
13
20
|
// To use:
|
14
|
-
// <delete-icon @click="onDeleteItem(item)" :isDisabled="true" />
|
15
|
-
import styled from
|
16
|
-
import SvgDelete from '../../assets/icons/delete_icon.svg'
|
17
|
-
import SvgDeleteGray from '../../assets/icons/delete_icon_gray.svg'
|
21
|
+
// <delete-icon @click.native="onDeleteItem(item)" :isDisabled="true" />
|
22
|
+
import styled from "vue-styled-components"
|
18
23
|
|
19
24
|
const wrapperAttrs = { isDisabled: Boolean }
|
20
|
-
const Wrapper = styled(
|
25
|
+
const Wrapper = styled("div", wrapperAttrs)`
|
21
26
|
width: 30px;
|
22
27
|
height: 30px;
|
23
|
-
cursor: ${(props) => (props.isDisabled ?
|
28
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
24
29
|
`
|
25
30
|
|
26
31
|
const IconImageAttrs = { hoverBg: String }
|
27
|
-
const
|
32
|
+
const IconImage = styled('img', IconImageAttrs)`
|
28
33
|
&:hover {
|
29
|
-
background-color: ${(props) =>
|
30
|
-
props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
|
31
|
-
border-radius: 4px;
|
32
|
-
}
|
33
|
-
`
|
34
|
-
|
35
|
-
const DeleteIconGray = styled(SvgDeleteGray, IconImageAttrs)`
|
36
|
-
&:hover {
|
37
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
34
|
+
background-color: ${(props) => props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
|
38
35
|
border-radius: 4px;
|
39
36
|
}
|
40
37
|
`
|
41
38
|
|
42
39
|
export default {
|
43
|
-
name:
|
40
|
+
name: "delete-icon",
|
44
41
|
components: {
|
45
42
|
Wrapper,
|
46
|
-
|
47
|
-
DeleteIconGray
|
43
|
+
IconImage,
|
48
44
|
},
|
49
45
|
props: {
|
50
46
|
isDisabled: {
|
51
47
|
required: false,
|
52
|
-
default: false
|
48
|
+
default: false,
|
53
49
|
},
|
54
50
|
hoverBg: {
|
55
51
|
required: false,
|
56
|
-
default: ''
|
52
|
+
default: '',
|
57
53
|
}
|
58
54
|
},
|
59
55
|
data() {
|
60
56
|
return {
|
61
|
-
isHovered: false
|
57
|
+
isHovered: false,
|
62
58
|
}
|
63
|
-
}
|
59
|
+
},
|
64
60
|
}
|
65
61
|
</script>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<Handle :height="height" class="handle">
|
2
|
+
<Handle :height = "height" class="handle">
|
3
3
|
<Dot></Dot>
|
4
4
|
<Dot></Dot>
|
5
5
|
<Dot></Dot>
|
@@ -7,34 +7,35 @@
|
|
7
7
|
</template>
|
8
8
|
|
9
9
|
<script>
|
10
|
-
import styled from 'vue3-styled-components'
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
import styled from 'vue-styled-components'
|
12
|
+
|
13
|
+
const Handle = styled('div',{ height : String })`
|
14
|
+
position:absolute;
|
15
|
+
left:0;
|
16
|
+
margin-right:10px;
|
17
|
+
display: flex;
|
18
|
+
align-items: stretch;
|
19
|
+
flex-direction: column;
|
20
|
+
justify-content: center;
|
21
|
+
width: 14px;
|
22
|
+
height:${props=> props.height};
|
23
|
+
padding: 0 5px;
|
24
|
+
background-color: #f3f3f7;
|
25
|
+
cursor: pointer;
|
26
|
+
align-items: center;
|
27
|
+
`
|
27
28
|
const Dot = styled.div`
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
`
|
29
|
+
display: inline-block;
|
30
|
+
width: 4px;
|
31
|
+
height: 4px;
|
32
|
+
margin:2px;
|
33
|
+
background-color: #0068de;
|
34
|
+
`
|
34
35
|
|
35
36
|
export default {
|
36
37
|
name: 'draggableInputHandle',
|
37
|
-
props:
|
38
|
+
props:['height'],
|
38
39
|
components: {
|
39
40
|
Handle,
|
40
41
|
Dot
|