@eturnity/eturnity_reusable_components 7.30.3 → 7.32.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/.eslintrc.js +184 -0
- package/.prettierrc +8 -6
- package/package.json +9 -21
- package/src/App.vue +79 -78
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +48 -51
- package/src/components/banner/actionBanner/index.vue +54 -55
- package/src/components/banner/banner/banner.stories.js +5 -5
- package/src/components/banner/banner/index.vue +159 -159
- package/src/components/banner/infoBanner/index.vue +41 -53
- package/src/components/buttons/buttonIcon/index.vue +125 -122
- package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
- package/src/components/buttons/closeButton/index.vue +49 -49
- package/src/components/buttons/mainButton/index.vue +108 -108
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +96 -94
- package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
- package/src/components/deleteIcon/index.vue +54 -54
- package/src/components/draggableInputHandle/index.vue +37 -37
- package/src/components/dropdown/Dropdown.stories.js +9 -10
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +428 -422
- package/src/components/filter/index.vue +135 -135
- package/src/components/filter/parentDropdown.vue +73 -73
- package/src/components/icon/Icons.stories.js +7 -7
- package/src/components/icon/iconCollection.vue +53 -53
- package/src/components/icon/index.vue +122 -122
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +30 -32
- package/src/components/infoText/index.vue +142 -137
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +190 -180
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +696 -696
- package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +337 -336
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +222 -219
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +127 -126
- package/src/components/inputs/select/index.vue +792 -791
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +31 -32
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +220 -222
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +171 -173
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +214 -217
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +68 -66
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +39 -36
- package/src/components/modals/modal/index.vue +134 -134
- package/src/components/modals/modal/modal.stories.js +5 -5
- package/src/components/navigationTabs/index.vue +96 -94
- package/src/components/pageSubtitle/index.vue +55 -49
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +92 -89
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +246 -244
- package/src/components/rangeSlider/Slider.vue +491 -465
- package/src/components/rangeSlider/index.vue +410 -410
- package/src/components/rangeSlider/utils/dom.js +5 -5
- package/src/components/selectedOptions/index.vue +119 -119
- package/src/components/sideMenu/index.vue +199 -199
- package/src/components/spinner/index.vue +57 -57
- package/src/components/tableDropdown/index.vue +520 -520
- package/src/components/tables/mainTable/index.vue +417 -400
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +340 -334
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
package/.eslintrc.js
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
module.exports = {
|
2
|
+
root: true,
|
3
|
+
env: {
|
4
|
+
browser: true,
|
5
|
+
node: true,
|
6
|
+
es6: true,
|
7
|
+
},
|
8
|
+
extends: [
|
9
|
+
'eslint:recommended',
|
10
|
+
'eslint:recommended',
|
11
|
+
'plugin:vue/vue3-recommended',
|
12
|
+
'plugin:prettier/recommended',
|
13
|
+
],
|
14
|
+
plugins: ['vue', 'prettier'],
|
15
|
+
parserOptions: {
|
16
|
+
ecmaVersion: 2020,
|
17
|
+
sourceType: 'module',
|
18
|
+
},
|
19
|
+
rules: {
|
20
|
+
'vue/component-name-in-template-casing': [
|
21
|
+
'warn',
|
22
|
+
'PascalCase',
|
23
|
+
{
|
24
|
+
registeredComponentsOnly: false,
|
25
|
+
ignores: [],
|
26
|
+
},
|
27
|
+
],
|
28
|
+
'vue/multi-word-component-names': [
|
29
|
+
'warn',
|
30
|
+
{
|
31
|
+
ignores: [],
|
32
|
+
},
|
33
|
+
],
|
34
|
+
'vue/html-closing-bracket-newline': [
|
35
|
+
'warn',
|
36
|
+
{
|
37
|
+
singleline: 'never',
|
38
|
+
multiline: 'always',
|
39
|
+
},
|
40
|
+
],
|
41
|
+
'vue/html-closing-bracket-spacing': [
|
42
|
+
'warn',
|
43
|
+
{
|
44
|
+
startTag: 'never',
|
45
|
+
endTag: 'never',
|
46
|
+
selfClosingTag: 'always',
|
47
|
+
},
|
48
|
+
],
|
49
|
+
'vue/no-multi-spaces': [
|
50
|
+
'warn',
|
51
|
+
{
|
52
|
+
ignoreProperties: false,
|
53
|
+
},
|
54
|
+
],
|
55
|
+
'vue/html-end-tags': 'warn',
|
56
|
+
'keyword-spacing': [
|
57
|
+
'warn',
|
58
|
+
{
|
59
|
+
before: true, // Require a space before keywords
|
60
|
+
after: true, // Require a space after keywords
|
61
|
+
},
|
62
|
+
],
|
63
|
+
// Enforce one space after comma
|
64
|
+
'comma-spacing': [
|
65
|
+
'warn',
|
66
|
+
{
|
67
|
+
before: false, // No space before comma
|
68
|
+
after: true, // Require a space after comma
|
69
|
+
},
|
70
|
+
],
|
71
|
+
'func-call-spacing': ['warn', 'never'],
|
72
|
+
// Enforce one space around binary operators (+, -, *, /, etc.)
|
73
|
+
'space-infix-ops': 'warn',
|
74
|
+
// Enforce no space inside parentheses
|
75
|
+
'space-in-parens': ['warn', 'never'],
|
76
|
+
// Enforce one space before block statements (if, else, for, etc.)
|
77
|
+
'space-before-blocks': 'warn',
|
78
|
+
// Enforce no spaces inside square brackets
|
79
|
+
'array-bracket-spacing': ['warn', 'never'],
|
80
|
+
// Enforce one space before function parentheses
|
81
|
+
'space-before-function-paren': ['warn', 'never'],
|
82
|
+
// Enforce one space inside braces of object literals
|
83
|
+
'object-curly-spacing': ['warn', 'always'],
|
84
|
+
// Enforce one space before and after arrow functions (optional)
|
85
|
+
'arrow-spacing': ['warn', { before: true, after: true }],
|
86
|
+
// Enforce one space after colon in object literals
|
87
|
+
'key-spacing': [
|
88
|
+
'warn',
|
89
|
+
{
|
90
|
+
beforeColon: false, // No space before colon
|
91
|
+
afterColon: true, // Require one space after colon
|
92
|
+
mode: 'strict', // Enforce spacing between key and value
|
93
|
+
},
|
94
|
+
],
|
95
|
+
'vue/html-indent': 'off',
|
96
|
+
'vue/html-quotes': ['warn', 'double'],
|
97
|
+
'vue/html-self-closing': [
|
98
|
+
'warn',
|
99
|
+
{
|
100
|
+
html: {
|
101
|
+
void: 'always',
|
102
|
+
normal: 'never',
|
103
|
+
component: 'always',
|
104
|
+
},
|
105
|
+
svg: 'always',
|
106
|
+
math: 'always',
|
107
|
+
},
|
108
|
+
],
|
109
|
+
'vue/require-default-prop': 'warn',
|
110
|
+
'vue/require-prop-types': 'warn',
|
111
|
+
'vue/v-on-event-hyphenation': [
|
112
|
+
'warn',
|
113
|
+
'always',
|
114
|
+
{
|
115
|
+
autofix: true,
|
116
|
+
ignore: [],
|
117
|
+
},
|
118
|
+
],
|
119
|
+
'vue/prop-name-casing': ['warn', 'camelCase'],
|
120
|
+
'vue/order-in-components': 'warn',
|
121
|
+
'vue/this-in-template': ['warn', 'never'],
|
122
|
+
'vue/attributes-order': [
|
123
|
+
'warn',
|
124
|
+
{
|
125
|
+
order: [
|
126
|
+
'DEFINITION',
|
127
|
+
'LIST_RENDERING',
|
128
|
+
'CONDITIONALS',
|
129
|
+
'RENDER_MODIFIERS',
|
130
|
+
'GLOBAL',
|
131
|
+
['UNIQUE', 'SLOT'],
|
132
|
+
'TWO_WAY_BINDING',
|
133
|
+
'OTHER_DIRECTIVES',
|
134
|
+
'OTHER_ATTR',
|
135
|
+
'EVENTS',
|
136
|
+
'CONTENT',
|
137
|
+
],
|
138
|
+
alphabetical: true,
|
139
|
+
},
|
140
|
+
],
|
141
|
+
'vue/no-unused-vars': 'warn',
|
142
|
+
'vue/no-use-v-if-with-v-for': [
|
143
|
+
'warn',
|
144
|
+
{
|
145
|
+
allowUsingIterationVar: false,
|
146
|
+
},
|
147
|
+
],
|
148
|
+
'no-unused-vars': 'warn',
|
149
|
+
'no-undef': 'warn',
|
150
|
+
'no-console': 'warn',
|
151
|
+
'no-debugger': 'warn',
|
152
|
+
'no-multi-spaces': 'warn',
|
153
|
+
'no-mixed-spaces-and-tabs': 'warn',
|
154
|
+
'no-redeclare': 'warn',
|
155
|
+
'no-prototype-builtins': 'warn',
|
156
|
+
'no-unsafe-finally': 'warn',
|
157
|
+
'max-len': [
|
158
|
+
'warn',
|
159
|
+
{
|
160
|
+
code: 120,
|
161
|
+
tabWidth: 2,
|
162
|
+
ignoreUrls: true,
|
163
|
+
ignoreComments: true,
|
164
|
+
ignoreTrailingComments: true,
|
165
|
+
ignorePattern: '^import\\s.+\\sfrom\\s.+;$',
|
166
|
+
},
|
167
|
+
],
|
168
|
+
'prettier/prettier': [
|
169
|
+
'warn',
|
170
|
+
{
|
171
|
+
semi: false,
|
172
|
+
singleQuote: true,
|
173
|
+
trailingComma: 'es5',
|
174
|
+
printWidth: 80,
|
175
|
+
tabWidth: 2,
|
176
|
+
useTabs: false,
|
177
|
+
endOfLine: 'auto',
|
178
|
+
},
|
179
|
+
],
|
180
|
+
},
|
181
|
+
globals: {
|
182
|
+
_: true,
|
183
|
+
},
|
184
|
+
}
|
package/.prettierrc
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
"semi": false,
|
3
|
+
"singleQuote": true,
|
4
|
+
"printWidth": 80,
|
5
|
+
"tabWidth": 2,
|
6
|
+
"trailingComma": "es5",
|
7
|
+
"bracketSpacing": true,
|
8
|
+
"vueIndentScriptAndStyle": true
|
9
|
+
}
|
package/package.json
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.32.0",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
7
7
|
"build": "vue-cli-service build",
|
8
8
|
"lint": "vue-cli-service lint",
|
9
9
|
"storybook": "start-storybook -p 6006",
|
10
|
-
"build-storybook": "build-storybook"
|
10
|
+
"build-storybook": "build-storybook",
|
11
|
+
"prettier": "prettier --write 'src/**/*.{js,vue}'"
|
11
12
|
},
|
12
13
|
"dependencies": {
|
13
14
|
"@storybook/vue3": "7.0.18",
|
@@ -22,28 +23,15 @@
|
|
22
23
|
"vuedraggable": "4.1.0"
|
23
24
|
},
|
24
25
|
"devDependencies": {
|
25
|
-
"
|
26
|
-
"@babel/eslint-parser": "7.12.16",
|
27
|
-
"@vue/cli-plugin-babel": "5.0.8",
|
26
|
+
"babel-eslint": "10.1.0",
|
28
27
|
"@vue/cli-plugin-eslint": "5.0.8",
|
29
28
|
"@vue/cli-service": "5.0.8",
|
30
29
|
"@vue/compiler-sfc": "3.3.4",
|
31
|
-
"eslint": "
|
32
|
-
"eslint-
|
33
|
-
|
34
|
-
|
35
|
-
"
|
36
|
-
"env": {
|
37
|
-
"node": true
|
38
|
-
},
|
39
|
-
"extends": [
|
40
|
-
"plugin:vue/essential",
|
41
|
-
"eslint:recommended"
|
42
|
-
],
|
43
|
-
"parserOptions": {
|
44
|
-
"parser": "@babel/eslint-parser"
|
45
|
-
},
|
46
|
-
"rules": {}
|
30
|
+
"eslint": "8.0.1",
|
31
|
+
"eslint-config-prettier": "8.8.0",
|
32
|
+
"eslint-plugin-prettier": "4.2.1",
|
33
|
+
"eslint-plugin-vue": "9.14.1",
|
34
|
+
"prettier": "2.8.4"
|
47
35
|
},
|
48
36
|
"browserslist": [
|
49
37
|
"> 1%",
|
package/src/App.vue
CHANGED
@@ -1,109 +1,110 @@
|
|
1
1
|
<template>
|
2
|
-
<ThemeProvider :
|
3
|
-
<
|
2
|
+
<ThemeProvider :style="{ height: '100%' }" :theme="getTheme()">
|
3
|
+
<PageContainer>
|
4
4
|
<br />
|
5
|
-
<
|
5
|
+
<InputNumber
|
6
|
+
background-color="transparent"
|
7
|
+
border-color="eturnityGrey"
|
8
|
+
input-height="34px"
|
9
|
+
input-width="420px"
|
10
|
+
:interaction-step="1"
|
11
|
+
:is-interactive="true"
|
12
|
+
:min-number="0"
|
13
|
+
:number-precision="0"
|
14
|
+
text-align="left"
|
15
|
+
unit-name="mm"
|
6
16
|
:value="value"
|
7
|
-
|
8
|
-
unitName="mm"
|
9
|
-
:numberPrecision="0"
|
10
|
-
backgroundColor="transparent"
|
11
|
-
borderColor="eturnityGrey"
|
12
|
-
inputHeight="34px"
|
13
|
-
inputWidth="420px"
|
14
|
-
textAlign="left"
|
15
|
-
:isInteractive="true"
|
16
|
-
:interactionStep="1"
|
17
|
-
@on-input="inputHandler"
|
17
|
+
@input-blur="blurHandler"
|
18
18
|
@input-change="changeHandler"
|
19
19
|
@input-focus="focusHandler"
|
20
|
-
@input
|
20
|
+
@on-input="inputHandler"
|
21
21
|
>
|
22
|
-
<template
|
22
|
+
<template #label>
|
23
23
|
<div>Interactive Label 1</div>
|
24
24
|
</template>
|
25
|
-
</
|
25
|
+
</InputNumber>
|
26
26
|
|
27
|
-
<hr
|
27
|
+
<hr />
|
28
28
|
|
29
|
-
<
|
29
|
+
<InputNumber
|
30
|
+
background-color="transparent"
|
31
|
+
border-color="eturnityGrey"
|
32
|
+
input-height="34px"
|
33
|
+
input-width="420px"
|
34
|
+
:interaction-step="1"
|
35
|
+
:is-interactive="true"
|
36
|
+
:min-number="0"
|
37
|
+
:number-precision="0"
|
38
|
+
text-align="left"
|
39
|
+
unit-name="mm"
|
30
40
|
:value="value"
|
31
|
-
|
32
|
-
unitName="mm"
|
33
|
-
:numberPrecision="0"
|
34
|
-
backgroundColor="transparent"
|
35
|
-
borderColor="eturnityGrey"
|
36
|
-
inputHeight="34px"
|
37
|
-
inputWidth="420px"
|
38
|
-
textAlign="left"
|
39
|
-
:isInteractive="true"
|
40
|
-
:interactionStep="1"
|
41
|
-
@on-input="inputHandler"
|
41
|
+
@input-blur="blurHandler"
|
42
42
|
@input-change="changeHandler"
|
43
43
|
@input-focus="focusHandler"
|
44
|
-
@input
|
44
|
+
@on-input="inputHandler"
|
45
45
|
>
|
46
|
-
<template
|
46
|
+
<template #label>
|
47
47
|
<div>Interactive Label 2</div>
|
48
48
|
</template>
|
49
|
-
</
|
49
|
+
</InputNumber>
|
50
50
|
|
51
|
-
<hr
|
52
|
-
<button @click="value=42">Click to set at 42</button>
|
53
|
-
</
|
51
|
+
<hr />
|
52
|
+
<button @click="value = 42">Click to set at 42</button>
|
53
|
+
</PageContainer>
|
54
54
|
</ThemeProvider>
|
55
55
|
</template>
|
56
56
|
|
57
57
|
<script>
|
58
|
-
import { ThemeProvider } from 'vue3-styled-components'
|
59
|
-
import theme from './assets/theme'
|
60
|
-
import styled from 'vue3-styled-components'
|
61
|
-
import InputNumber from '@/components/inputs/inputNumber'
|
58
|
+
import { ThemeProvider } from 'vue3-styled-components'
|
59
|
+
import theme from './assets/theme'
|
60
|
+
import styled from 'vue3-styled-components'
|
61
|
+
import InputNumber from '@/components/inputs/inputNumber'
|
62
62
|
|
63
|
-
const PageContainer = styled.div`
|
64
|
-
|
65
|
-
`
|
63
|
+
const PageContainer = styled.div`
|
64
|
+
padding: 40px;
|
65
|
+
`
|
66
66
|
|
67
|
-
export default {
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
},
|
74
|
-
data() {
|
75
|
-
return {
|
76
|
-
value: 42,
|
77
|
-
}
|
78
|
-
},
|
79
|
-
computed: {
|
80
|
-
},
|
81
|
-
methods: {
|
82
|
-
blurHandler(e) {
|
83
|
-
console.log('blur', e)
|
67
|
+
export default {
|
68
|
+
name: 'App',
|
69
|
+
components: {
|
70
|
+
ThemeProvider,
|
71
|
+
PageContainer,
|
72
|
+
InputNumber,
|
84
73
|
},
|
85
|
-
|
86
|
-
|
74
|
+
data() {
|
75
|
+
return {
|
76
|
+
value: 42,
|
77
|
+
}
|
87
78
|
},
|
88
|
-
|
89
|
-
|
79
|
+
computed: {},
|
80
|
+
methods: {
|
81
|
+
blurHandler(e) {
|
82
|
+
console.log('blur', e)
|
83
|
+
},
|
84
|
+
changeHandler(e) {
|
85
|
+
console.log('change', e)
|
86
|
+
},
|
87
|
+
focusHandler(e) {
|
88
|
+
console.log('focus', e)
|
89
|
+
},
|
90
|
+
inputHandler(e) {
|
91
|
+
console.log('input', e)
|
92
|
+
//this.value = e
|
93
|
+
setTimeout(() => {
|
94
|
+
this.value = e
|
95
|
+
}, 1000)
|
96
|
+
},
|
97
|
+
getTheme() {
|
98
|
+
return theme
|
99
|
+
},
|
90
100
|
},
|
91
|
-
inputHandler(e) {
|
92
|
-
console.log('input', e)
|
93
|
-
//this.value = e
|
94
|
-
setTimeout(()=>{this.value = e},1000)
|
95
|
-
},
|
96
|
-
getTheme() {
|
97
|
-
return theme
|
98
|
-
}
|
99
101
|
}
|
100
|
-
}
|
101
102
|
</script>
|
102
103
|
|
103
104
|
<style>
|
104
|
-
html,
|
105
|
-
body {
|
106
|
-
|
107
|
-
|
108
|
-
}
|
105
|
+
html,
|
106
|
+
body {
|
107
|
+
height: 100%;
|
108
|
+
margin: 0;
|
109
|
+
}
|
109
110
|
</style>
|
package/src/assets/theme.js
CHANGED
@@ -26,16 +26,16 @@ const theme = {
|
|
26
26
|
transparentWhite3: '#ffffff48',
|
27
27
|
transparentBlack1: '#263238e6',
|
28
28
|
disabled: '#dfe1e1',
|
29
|
-
eturnityGrey: '#263238'
|
29
|
+
eturnityGrey: '#263238',
|
30
30
|
},
|
31
31
|
screen: {
|
32
32
|
mobileSmall: '345px',
|
33
33
|
mobile: '425px',
|
34
34
|
mobileLarge: '530px',
|
35
35
|
tablet: '768px',
|
36
|
-
tabletLarge: '950px'
|
36
|
+
tabletLarge: '950px',
|
37
37
|
},
|
38
|
-
borderRadius: '4px'
|
38
|
+
borderRadius: '4px',
|
39
39
|
}
|
40
40
|
|
41
41
|
export default theme
|
@@ -1,64 +1,61 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<PageContainer :should-position="shouldPosition">
|
3
|
+
<ButtonContainer :data-id="dataId">
|
4
4
|
<PlusButtonSvg />
|
5
|
-
</
|
6
|
-
</
|
5
|
+
</ButtonContainer>
|
6
|
+
</PageContainer>
|
7
7
|
</template>
|
8
8
|
|
9
9
|
<script>
|
10
|
-
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
-
import styled from 'vue3-styled-components'
|
12
|
-
import PlusButtonSvg from '../../assets/icons/plus_button.svg'
|
10
|
+
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
+
import styled from 'vue3-styled-components'
|
12
|
+
import PlusButtonSvg from '../../assets/icons/plus_button.svg'
|
13
13
|
|
14
|
-
const pageAttrs = { shouldPosition: Boolean }
|
15
|
-
const PageContainer = styled('div', pageAttrs)`
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
`
|
14
|
+
const pageAttrs = { shouldPosition: Boolean }
|
15
|
+
const PageContainer = styled('div', pageAttrs)`
|
16
|
+
position: ${(props) => (props.shouldPosition ? 'fixed' : 'unset')};
|
17
|
+
bottom: 30px;
|
18
|
+
right: 30px;
|
19
|
+
`
|
20
20
|
|
21
|
-
const ButtonContainer = styled.div`
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
const ButtonContainer = styled.div`
|
22
|
+
height: 60px;
|
23
|
+
width: 60px;
|
24
|
+
background-color: ${(props) => props.theme.colors.green};
|
25
|
+
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
|
26
|
+
border-radius: 100%;
|
27
|
+
cursor: pointer;
|
28
|
+
display: grid;
|
29
|
+
align-items: center;
|
30
|
+
justify-items: center;
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
&:active,
|
38
|
-
&:focus {
|
39
|
-
background: ${(props) => props.theme.colors.green};
|
40
|
-
}
|
41
|
-
`
|
32
|
+
&:hover {
|
33
|
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
34
|
+
${(props) => props.theme.colors.green};
|
35
|
+
}
|
42
36
|
|
43
|
-
|
37
|
+
&:active,
|
38
|
+
&:focus {
|
39
|
+
background: ${(props) => props.theme.colors.green};
|
40
|
+
}
|
41
|
+
`
|
44
42
|
|
45
|
-
export default {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
43
|
+
export default {
|
44
|
+
name: 'AddNewButton',
|
45
|
+
components: {
|
46
|
+
PageContainer,
|
47
|
+
ButtonContainer,
|
48
|
+
PlusButtonSvg,
|
49
|
+
},
|
50
|
+
props: {
|
51
|
+
shouldPosition: {
|
52
|
+
required: false,
|
53
|
+
default: true,
|
54
|
+
},
|
55
|
+
dataId: {
|
56
|
+
type: String,
|
57
|
+
default: '',
|
58
|
+
},
|
57
59
|
},
|
58
|
-
dataId: {
|
59
|
-
type: String,
|
60
|
-
default: ''
|
61
|
-
}
|
62
60
|
}
|
63
|
-
}
|
64
61
|
</script>
|