@eturnity/eturnity_reusable_components 7.4.4-EPDM-7260.15 → 7.4.4-EPDM-7260.17
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 +19 -23
- package/src/App.vue +2 -2
- package/src/assets/svgIcons/charger_icon_white.svg +44 -0
- package/src/assets/svgIcons/energy_meter.svg +12 -0
- package/src/components/addNewButton/index.vue +5 -3
- 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 +6 -1
- package/src/components/card/index.vue +96 -0
- package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
- package/src/components/deleteIcon/index.vue +47 -30
- package/src/components/draggableInputHandle/index.vue +24 -25
- package/src/components/dropdown/index.vue +129 -110
- package/src/components/errorMessage/index.vue +10 -5
- package/src/components/filter/filterSettings.vue +59 -97
- package/src/components/filter/index.vue +3 -3
- package/src/components/filter/parentDropdown.vue +2 -2
- package/src/components/icon/iconCache.js +23 -0
- package/src/components/icon/iconCollection.vue +2 -2
- package/src/components/icon/index.vue +61 -72
- package/src/components/iconWrapper/index.vue +1 -4
- package/src/components/infoCard/index.vue +2 -3
- package/src/components/infoText/index.vue +1 -1
- package/src/components/inputs/checkbox/index.vue +21 -6
- package/src/components/inputs/inputNumber/index.vue +8 -11
- package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
- package/src/components/inputs/inputText/index.vue +4 -4
- package/src/components/inputs/radioButton/index.vue +1 -1
- package/src/components/inputs/searchInput/index.vue +28 -11
- package/src/components/inputs/select/index.vue +261 -60
- package/src/components/inputs/select/option/index.vue +43 -12
- 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 +27 -31
- package/src/components/modals/modal/index.vue +2 -6
- package/src/components/navigationTabs/index.vue +27 -20
- package/src/components/pageSubtitle/index.vue +1 -1
- package/src/components/pageTitle/index.vue +4 -4
- package/src/components/pagination/index.vue +3 -3
- package/src/components/progressBar/index.vue +1 -1
- package/src/components/projectMarker/index.vue +16 -9
- package/src/components/rangeSlider/index.vue +3 -3
- package/src/components/selectedOptions/index.vue +1 -1
- package/src/components/sideMenu/index.vue +1 -1
- package/src/components/spinner/index.vue +7 -11
- package/src/components/tableDropdown/index.vue +35 -45
- package/src/components/tables/mainTable/exampleNested.vue +1 -1
- package/src/components/tables/mainTable/index.vue +10 -9
- package/src/components/tables/viewTable/index.vue +2 -2
- package/src/components/threeDots/index.vue +1 -1
- package/src/components/videoThumbnail/index.vue +95 -100
- package/src/main.js +3 -10
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.4.4-EPDM-7260.
|
3
|
+
"version": "7.4.4-EPDM-7260.17",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -10,30 +10,26 @@
|
|
10
10
|
"build-storybook": "build-storybook"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@
|
14
|
-
"
|
13
|
+
"@storybook/vue3": "7.0.18",
|
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",
|
15
18
|
"html-loader": "0.5.5",
|
16
|
-
"postcss": "
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"vue2-datepicker": "3.11.1",
|
21
|
-
"vuedraggable": "2.24.3"
|
19
|
+
"postcss": "8.4.25",
|
20
|
+
"vue": "3.3.4",
|
21
|
+
"vue3-styled-components": "1.2.1",
|
22
|
+
"vuedraggable": "4.1.0"
|
22
23
|
},
|
23
24
|
"devDependencies": {
|
24
|
-
"@
|
25
|
-
"@
|
26
|
-
"@
|
27
|
-
"@
|
28
|
-
"@
|
29
|
-
"@vue/
|
30
|
-
"
|
31
|
-
"
|
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"
|
25
|
+
"@babel/core": "7.12.16",
|
26
|
+
"@babel/eslint-parser": "7.12.16",
|
27
|
+
"@vue/cli-plugin-babel": "5.0.8",
|
28
|
+
"@vue/cli-plugin-eslint": "5.0.8",
|
29
|
+
"@vue/cli-service": "5.0.8",
|
30
|
+
"@vue/compiler-sfc": "3.3.4",
|
31
|
+
"eslint": "7.32.0",
|
32
|
+
"eslint-plugin-vue": "8.0.3"
|
37
33
|
},
|
38
34
|
"eslintConfig": {
|
39
35
|
"root": true,
|
@@ -45,7 +41,7 @@
|
|
45
41
|
"eslint:recommended"
|
46
42
|
],
|
47
43
|
"parserOptions": {
|
48
|
-
"parser": "babel-
|
44
|
+
"parser": "@babel/eslint-parser"
|
49
45
|
},
|
50
46
|
"rules": {}
|
51
47
|
},
|
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 'vue3-styled-components'
|
59
59
|
import theme from './assets/theme'
|
60
|
-
import styled from '
|
60
|
+
import styled from 'vue3-styled-components'
|
61
61
|
import InputNumber from '@/components/inputs/inputNumber'
|
62
62
|
|
63
63
|
const PageContainer = styled.div`
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4
|
+
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
5
|
+
<style type="text/css">
|
6
|
+
.st0{display:none;}
|
7
|
+
.st1{display:inline;}
|
8
|
+
.st2{fill:#FFFFFF;}
|
9
|
+
</style>
|
10
|
+
<g class="st0">
|
11
|
+
<g class="st1">
|
12
|
+
<rect x="-312.013" y="-258.339" class="st2" width="2" height="16"/>
|
13
|
+
</g>
|
14
|
+
<g class="st1">
|
15
|
+
<polygon class="st2" points="-303.346,-242.339 -303.346,-248.339 -312.013,-248.426 -312.013,-242.339 "/>
|
16
|
+
</g>
|
17
|
+
<g class="st1">
|
18
|
+
<rect x="-311.673" y="-258.339" class="st2" width="8" height="2"/>
|
19
|
+
</g>
|
20
|
+
<g class="st1">
|
21
|
+
<path class="st2" d="M-294.833-255.839v-2.5h-7v2.5c0,1.933,1.567,3.5,3.5,3.5l0,0
|
22
|
+
C-296.4-252.339-294.833-253.906-294.833-255.839z"/>
|
23
|
+
</g>
|
24
|
+
<g class="st1">
|
25
|
+
<rect x="-305.346" y="-258.339" class="st2" width="2" height="16"/>
|
26
|
+
</g>
|
27
|
+
<g class="st1">
|
28
|
+
<rect x="-299.333" y="-258.339" class="st2" width="2" height="12"/>
|
29
|
+
</g>
|
30
|
+
<g class="st1">
|
31
|
+
<rect x="-303.346" y="-248.339" class="st2" width="6" height="2"/>
|
32
|
+
</g>
|
33
|
+
<g class="st1">
|
34
|
+
<rect x="-301.346" y="-260.339" class="st2" width="2" height="2"/>
|
35
|
+
</g>
|
36
|
+
<g class="st1">
|
37
|
+
<rect x="-297.346" y="-260.339" class="st2" width="2" height="2"/>
|
38
|
+
</g>
|
39
|
+
</g>
|
40
|
+
<g>
|
41
|
+
<path class="st2" d="M15.777,8.974h3v-2h-3V6h-1c-1.857,0-3.404,1.272-3.855,2.987H8.889V3V1h-2H3.223h-2v2v14v2h2h5.667v-1v-1
|
42
|
+
v-6.013h2.025C11.356,12.716,12.911,14,14.777,14h1v-1.026h3v-2h-3V8.987V8.974z M6.889,17H3.223V3h3.667v5.987v2V17z"/>
|
43
|
+
</g>
|
44
|
+
</svg>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<!-- Creator: CorelDRAW 2021 (64-Bit) -->
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="462px" height="512px" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd"
|
5
|
+
viewBox="0 0 462 511.93"
|
6
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
7
|
+
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
8
|
+
<g id="Layer_x0020_1">
|
9
|
+
<metadata id="CorelCorpID_0Corel-Layer"/>
|
10
|
+
<path fill="white" d="M22.37 0l417.26 0c12.31,0 22.37,10.06 22.37,22.37l0 400.73c0,12.3 -10.06,22.37 -22.37,22.37l-32.27 0 0 19.01c0,6.2 -5.06,11.27 -11.26,11.27l-25.1 0 0 32.03c0,2.28 -1.87,4.15 -4.15,4.15l-32.33 0c-4.56,0 -8.29,-3.73 -8.29,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -33.43 0 0 32.03c0,2.28 -1.86,4.15 -4.14,4.15l-32.34 0c-4.56,0 -8.28,-3.73 -8.28,-8.29l0 -27.89 -25.76 0c-6.2,0 -11.26,-5.07 -11.26,-11.27l0 -19.01 -32.27 0c-12.31,0 -22.37,-10.07 -22.37,-22.37l0 -400.73c0,-12.31 10.06,-22.37 22.37,-22.37zm61.36 103.62l294.54 0c3.34,0 6.38,1.38 8.57,3.57 2.19,2.19 3.56,5.23 3.56,8.57l0 53.77c0,3.33 -1.37,6.37 -3.56,8.56 -2.2,2.2 -5.23,3.57 -8.57,3.57l-294.54 0c-3.34,0 -6.38,-1.37 -8.57,-3.57 -2.19,-2.19 -3.56,-5.23 -3.56,-8.56l0 -53.77c0,-3.34 1.36,-6.37 3.56,-8.57 2.2,-2.21 5.23,-3.57 8.57,-3.57zm159 210.98l15.79 0c2.29,0.01 4.15,1.87 4.15,4.16 0,0.83 -0.25,1.63 -0.7,2.32l-37.64 64.27c-0.75,1.23 -2.09,1.98 -3.53,1.98 -2.29,0 -4.15,-1.86 -4.15,-4.14 0,-0.28 0.02,-0.55 0.08,-0.81l5.55 -39.45 -18.73 0.32c-0.02,0 -0.05,0 -0.08,0 -2.25,0 -4.09,-1.81 -4.13,-4.06 0,-0.01 0,-0.01 0,-0.02 0,-0.75 0.2,-1.5 0.58,-2.15l37.06 -64.26c0.75,-1.24 2.1,-2 3.55,-2 2.29,0 4.15,1.85 4.15,4.15 0,0.18 -0.02,0.36 -0.04,0.54l-1.91 39.15zm151.34 -255.93c5.79,0 10.49,4.95 10.49,11.06 0,6.1 -4.7,11.05 -10.49,11.05 -5.8,0 -10.5,-4.95 -10.5,-11.05 0,-6.11 4.7,-11.06 10.5,-11.06zm-326.13 0c5.8,0 10.5,4.95 10.5,11.06 0,6.1 -4.7,11.05 -10.5,11.05 -5.8,0 -10.5,-4.95 -10.5,-11.05 0,-6.11 4.7,-11.06 10.5,-11.06zm0 307.96c5.8,0 10.5,4.96 10.5,11.06 0,6.11 -4.7,11.06 -10.5,11.06 -5.8,0 -10.5,-4.95 -10.5,-11.06 0,-6.1 4.7,-11.06 10.5,-11.06zm326.13 0c5.79,0 10.49,4.96 10.49,11.06 0,6.11 -4.7,11.06 -10.49,11.06 -5.8,0 -10.5,-4.95 -10.5,-11.06 0,-6.1 4.7,-11.06 10.5,-11.06zm-38.94 -206.03c-3.07,0 -5.53,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.86,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.78,4.44 2.78,7.59l0 14.98c0,3.14 -0.93,5.67 -2.78,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.08,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.34,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.34,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.18,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.12 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.78,-4.45 -2.78,-7.59l0 -14.98c0,-3.15 0.93,-5.67 2.78,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.07,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.34,0.53 0.82,0.79 1.41,0.79zm-63.81 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.54,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.86,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.33 7.1c-3.07,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.77,-4.45 -2.77,-7.59l0 -14.98c0,-3.15 0.92,-5.67 2.77,-7.59 1.85,-1.92 4.32,-2.88 7.39,-2.88 3.08,0 5.55,0.96 7.4,2.88 1.85,1.92 2.77,4.44 2.77,7.59l0 14.98c0,3.14 -0.92,5.67 -2.77,7.59 -1.85,1.92 -4.32,2.88 -7.4,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.42,-0.79 0.35,-0.53 0.52,-1.22 0.52,-2.08l0 -15.98c0,-0.86 -0.17,-1.56 -0.52,-2.09 -0.35,-0.52 -0.82,-0.79 -1.42,-0.79 -0.59,0 -1.06,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.35,0.53 0.82,0.79 1.41,0.79zm-61.16 7.1c-3.08,0 -5.54,-0.96 -7.39,-2.88 -1.85,-1.92 -2.78,-4.45 -2.78,-7.59l0 -14.98c0,-3.15 0.93,-5.67 2.78,-7.59 1.85,-1.92 4.31,-2.88 7.39,-2.88 3.07,0 5.54,0.96 7.39,2.88 1.85,1.92 2.78,4.44 2.78,7.59l0 14.98c0,3.14 -0.93,5.67 -2.78,7.59 -1.85,1.92 -4.32,2.88 -7.39,2.88zm0 -7.1c0.6,0 1.07,-0.26 1.41,-0.79 0.35,-0.53 0.53,-1.22 0.53,-2.08l0 -15.98c0,-0.86 -0.18,-1.56 -0.53,-2.09 -0.34,-0.52 -0.81,-0.79 -1.41,-0.79 -0.6,0 -1.07,0.27 -1.41,0.79 -0.35,0.53 -0.52,1.23 -0.52,2.09l0 15.98c0,0.86 0.17,1.55 0.52,2.08 0.34,0.53 0.81,0.79 1.41,0.79zm58.85 102.29c-4.25,0 -7.69,-3.45 -7.69,-7.69 0,-4.24 3.44,-7.68 7.69,-7.68l128.88 0c4.25,0 7.69,3.44 7.69,7.68 0,4.24 -3.44,7.69 -7.69,7.69l-128.88 0zm-50.58 -38.85c-4.24,0 -7.69,-3.44 -7.69,-7.68 0,-4.24 3.45,-7.69 7.69,-7.69l230.04 0c4.24,0 7.68,3.45 7.68,7.69 0,4.24 -3.44,7.68 -7.68,7.68l-230.04 0zm212.57 -103.71l0 58.82 49.72 0c0.69,0 1.32,-0.29 1.78,-0.75 0.46,-0.45 0.75,-1.09 0.75,-1.77l0 -53.77c0,-0.69 -0.29,-1.33 -0.75,-1.79 -0.45,-0.45 -1.09,-0.74 -1.78,-0.74l-49.72 0zm-9.61 58.82l0 -58.82 -52.26 0 0 58.82 52.26 0zm-61.87 0l0 -58.82 -52.14 0 0 58.82 52.14 0zm-61.75 0l0 -58.82 -52.3 0 0 58.82 52.3 0zm-61.91 0l0 -58.82 -49.68 0c-0.7,0 -1.33,0.29 -1.79,0.74 -0.45,0.46 -0.74,1.09 -0.74,1.79l0 53.77c0,0.69 0.29,1.32 0.74,1.77 0.46,0.46 1.1,0.75 1.79,0.75l49.68 0zm-74.08 -133.14l343.34 0c12.31,0 22.37,10.07 22.37,22.37l0 324.85c0,12.3 -10.07,22.37 -22.37,22.37l-343.34 0c-12.3,0 -22.37,-10.06 -22.37,-22.37l0 -324.85c0,-12.31 10.06,-22.37 22.37,-22.37z"/>
|
11
|
+
</g>
|
12
|
+
</svg>
|
@@ -1,14 +1,15 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container :shouldPosition="shouldPosition">
|
3
3
|
<button-container :data-id="dataId">
|
4
|
-
<
|
4
|
+
<PlusButtonSvg />
|
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 '
|
11
|
+
import styled from 'vue3-styled-components'
|
12
|
+
import PlusButtonSvg from '../../assets/icons/plus_button.svg'
|
12
13
|
|
13
14
|
const pageAttrs = { shouldPosition: Boolean }
|
14
15
|
const PageContainer = styled('div', pageAttrs)`
|
@@ -46,7 +47,8 @@ export default {
|
|
46
47
|
components: {
|
47
48
|
PageContainer,
|
48
49
|
ButtonContainer,
|
49
|
-
PlusButton
|
50
|
+
PlusButton,
|
51
|
+
PlusButtonSvg
|
50
52
|
},
|
51
53
|
props: {
|
52
54
|
shouldPosition: {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<page-container>
|
3
3
|
<button-container
|
4
|
+
:id="id"
|
4
5
|
:type="type"
|
5
6
|
:minWidth="minWidth"
|
6
7
|
:isDisabled="isDisabled"
|
@@ -29,7 +30,7 @@
|
|
29
30
|
// :data-id="test_data_id"
|
30
31
|
// />
|
31
32
|
|
32
|
-
import styled from '
|
33
|
+
import styled from 'vue3-styled-components'
|
33
34
|
import Icon from '../../icon'
|
34
35
|
|
35
36
|
const PageContainer = styled.div``
|
@@ -120,6 +121,10 @@ export default {
|
|
120
121
|
required: false,
|
121
122
|
default: null
|
122
123
|
},
|
124
|
+
id: {
|
125
|
+
required: false,
|
126
|
+
default: null
|
127
|
+
},
|
123
128
|
dataId: {
|
124
129
|
type: String,
|
125
130
|
default: ''
|
@@ -0,0 +1,96 @@
|
|
1
|
+
<template>
|
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
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
import styled from 'vue3-styled-components'
|
24
|
+
import Spinner from '../spinner'
|
25
|
+
|
26
|
+
const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
|
27
|
+
const Wrapper = styled('div', WrapperProps)`
|
28
|
+
max-width: ${(props) => props.width};
|
29
|
+
min-width: ${(props) => props.minWidth};
|
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);
|
33
|
+
border-radius: 4px;
|
34
|
+
background-color: ${(props) => props.theme.colors.white};
|
35
|
+
height: 100%;
|
36
|
+
`
|
37
|
+
|
38
|
+
const CardWrapper = styled('div')`
|
39
|
+
height: 100%;
|
40
|
+
width: auto;
|
41
|
+
`
|
42
|
+
|
43
|
+
const CardTitle = styled('p')`
|
44
|
+
font-size: 14px;
|
45
|
+
line-height: 1;
|
46
|
+
color: ${(props) => props.theme.colors.black};
|
47
|
+
font-weight: 700;
|
48
|
+
margin-bottom: 10px;
|
49
|
+
`
|
50
|
+
|
51
|
+
export default {
|
52
|
+
name: 'Card',
|
53
|
+
props: {
|
54
|
+
title: {
|
55
|
+
type: String,
|
56
|
+
default: ''
|
57
|
+
},
|
58
|
+
width: {
|
59
|
+
type: [Number, String],
|
60
|
+
required: false,
|
61
|
+
default: '400px'
|
62
|
+
},
|
63
|
+
minWidth: {
|
64
|
+
type: [Number, String],
|
65
|
+
required: false,
|
66
|
+
default: null
|
67
|
+
},
|
68
|
+
titleClass: {
|
69
|
+
type: String,
|
70
|
+
default: ''
|
71
|
+
},
|
72
|
+
showPopover: {
|
73
|
+
type: Boolean,
|
74
|
+
default: false
|
75
|
+
},
|
76
|
+
viewCardClass: {
|
77
|
+
type: String,
|
78
|
+
default: ''
|
79
|
+
},
|
80
|
+
popoverText: {
|
81
|
+
type: String,
|
82
|
+
default: ''
|
83
|
+
},
|
84
|
+
isLoading: {
|
85
|
+
type: Boolean,
|
86
|
+
default: false
|
87
|
+
}
|
88
|
+
},
|
89
|
+
components: {
|
90
|
+
Spinner,
|
91
|
+
Wrapper,
|
92
|
+
CardTitle,
|
93
|
+
CardWrapper
|
94
|
+
}
|
95
|
+
}
|
96
|
+
</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
|
18
|
+
// <delete-icon color="gray" @click="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
|
}
|
@@ -1,61 +1,78 @@
|
|
1
1
|
<template>
|
2
|
-
<wrapper
|
3
|
-
|
4
|
-
|
5
|
-
:isDisabled="isDisabled"
|
6
|
-
>
|
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
|
-
/>
|
2
|
+
<wrapper :isDisabled="isDisabled">
|
3
|
+
<delete-icon-red class="icon-red" :hoverBg="hoverBg" />
|
4
|
+
<delete-icon-gray class="icon-gray" />
|
16
5
|
</wrapper>
|
17
6
|
</template>
|
18
7
|
|
19
8
|
<script>
|
20
9
|
// To use:
|
21
|
-
// <delete-icon @click
|
22
|
-
import styled from
|
10
|
+
// <delete-icon @click="onDeleteItem(item)" :isDisabled="true" />
|
11
|
+
import styled from 'vue3-styled-components'
|
12
|
+
import SvgDelete from '../../assets/icons/delete_icon.svg'
|
13
|
+
import SvgDeleteGray from '../../assets/icons/delete_icon_gray.svg'
|
23
14
|
|
24
15
|
const wrapperAttrs = { isDisabled: Boolean }
|
25
|
-
const Wrapper = styled(
|
16
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
26
17
|
width: 30px;
|
27
18
|
height: 30px;
|
28
|
-
cursor: ${(props) => (props.isDisabled ?
|
19
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
20
|
+
|
21
|
+
.icon-red {
|
22
|
+
display: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
.icon-gray {
|
26
|
+
display: inline;
|
27
|
+
}
|
28
|
+
|
29
|
+
${(props) =>
|
30
|
+
!props.isDisabled &&
|
31
|
+
`
|
32
|
+
&:hover {
|
33
|
+
.icon-red {
|
34
|
+
display: inline;
|
35
|
+
}
|
36
|
+
|
37
|
+
.icon-gray {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
`}
|
29
42
|
`
|
30
43
|
|
31
44
|
const IconImageAttrs = { hoverBg: String }
|
32
|
-
const
|
45
|
+
const DeleteIconRed = styled(SvgDelete, IconImageAttrs)`
|
33
46
|
&:hover {
|
34
|
-
background-color: ${(props) =>
|
47
|
+
background-color: ${(props) =>
|
48
|
+
props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
|
49
|
+
border-radius: 4px;
|
50
|
+
}
|
51
|
+
`
|
52
|
+
|
53
|
+
const DeleteIconGray = styled(SvgDeleteGray, IconImageAttrs)`
|
54
|
+
&:hover {
|
55
|
+
background-color: ${(props) => props.theme.colors.grey5};
|
35
56
|
border-radius: 4px;
|
36
57
|
}
|
37
58
|
`
|
38
59
|
|
39
60
|
export default {
|
40
|
-
name:
|
61
|
+
name: 'delete-icon',
|
41
62
|
components: {
|
42
63
|
Wrapper,
|
43
|
-
|
64
|
+
DeleteIconRed,
|
65
|
+
DeleteIconGray
|
44
66
|
},
|
45
67
|
props: {
|
46
68
|
isDisabled: {
|
47
69
|
required: false,
|
48
|
-
default: false
|
70
|
+
default: false
|
49
71
|
},
|
50
72
|
hoverBg: {
|
51
73
|
required: false,
|
52
|
-
default: ''
|
74
|
+
default: ''
|
53
75
|
}
|
54
|
-
}
|
55
|
-
data() {
|
56
|
-
return {
|
57
|
-
isHovered: false,
|
58
|
-
}
|
59
|
-
},
|
76
|
+
}
|
60
77
|
}
|
61
78
|
</script>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<Handle :height
|
2
|
+
<Handle :height="height" class="handle">
|
3
3
|
<Dot></Dot>
|
4
4
|
<Dot></Dot>
|
5
5
|
<Dot></Dot>
|
@@ -7,35 +7,34 @@
|
|
7
7
|
</template>
|
8
8
|
|
9
9
|
<script>
|
10
|
+
import styled from 'vue3-styled-components'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
align-items: center;
|
27
|
-
`
|
12
|
+
const Handle = styled('div', { height: String })`
|
13
|
+
position: absolute;
|
14
|
+
left: 0;
|
15
|
+
margin-right: 10px;
|
16
|
+
display: flex;
|
17
|
+
align-items: stretch;
|
18
|
+
flex-direction: column;
|
19
|
+
justify-content: center;
|
20
|
+
width: 14px;
|
21
|
+
height: ${(props) => props.height};
|
22
|
+
padding: 0 5px;
|
23
|
+
background-color: #f3f3f7;
|
24
|
+
cursor: pointer;
|
25
|
+
align-items: center;
|
26
|
+
`
|
28
27
|
const Dot = styled.div`
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
display: inline-block;
|
29
|
+
width: 4px;
|
30
|
+
height: 4px;
|
31
|
+
margin: 2px;
|
32
|
+
background-color: #0068de;
|
33
|
+
`
|
35
34
|
|
36
35
|
export default {
|
37
36
|
name: 'draggableInputHandle',
|
38
|
-
props:['height'],
|
37
|
+
props: ['height'],
|
39
38
|
components: {
|
40
39
|
Handle,
|
41
40
|
Dot
|