@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.2 → 7.24.3-qa-elisee-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/.prettierrc +6 -8
- package/package.json +21 -9
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +78 -79
- package/src/assets/svgIcons/adjust_roof.svg +6 -0
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +51 -48
- package/src/components/banner/actionBanner/index.vue +55 -54
- 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 +53 -41
- package/src/components/buttons/buttonIcon/index.vue +122 -125
- 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 +119 -119
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +94 -96
- 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 +10 -9
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +433 -439
- 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 +121 -121
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +26 -26
- package/src/components/infoText/index.vue +132 -133
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +180 -190
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +644 -647
- package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +336 -337
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +219 -221
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +126 -126
- package/src/components/inputs/select/index.vue +776 -778
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +32 -31
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +222 -220
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +173 -171
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +217 -214
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +66 -68
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +36 -39
- 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 +94 -96
- package/src/components/pageSubtitle/index.vue +49 -55
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +89 -92
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +244 -246
- package/src/components/rangeSlider/Slider.vue +465 -491
- 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 +362 -366
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +334 -340
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/.eslintrc.js +0 -184
@@ -1,150 +1,150 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<container :inputWidth="inputWidth">
|
3
|
+
<input-wrapper :iconPosition="iconPosition" :iconColor="iconColor">
|
4
4
|
<SearchIconSvg class="search-icn" />
|
5
|
-
<
|
5
|
+
<input-container
|
6
6
|
ref="inputElement"
|
7
|
-
:data-id="dataId"
|
8
|
-
:disabled="disabled"
|
9
|
-
:has-focus="hasFocus"
|
10
|
-
:input-width="inputWidth"
|
11
|
-
:is-disabled="disabled"
|
12
|
-
:is-filter="isFilter"
|
13
7
|
:placeholder="placeholder"
|
14
8
|
:value="value"
|
15
9
|
@input="onChangeHandler($event)"
|
10
|
+
:disabled="disabled"
|
11
|
+
:isDisabled="disabled"
|
12
|
+
:inputWidth="inputWidth"
|
13
|
+
:isFilter="isFilter"
|
14
|
+
:hasFocus="hasFocus"
|
15
|
+
:data-id="dataId"
|
16
16
|
/>
|
17
|
-
</
|
18
|
-
</
|
17
|
+
</input-wrapper>
|
18
|
+
</container>
|
19
19
|
</template>
|
20
20
|
|
21
21
|
<script>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
22
|
+
// import SearchInput from "@eturnity/eturnity_reusable_components/src/components/inputs/searchInput"
|
23
|
+
// To use:
|
24
|
+
// <search-input
|
25
|
+
// placeholder="Company name"
|
26
|
+
// :value="companyName"
|
27
|
+
// :disabled="true"
|
28
|
+
// inputWidth="250px"
|
29
|
+
// @on-change="function($event)"
|
30
|
+
// :isFilter="true" // to set the height at 30px
|
31
|
+
// data-id="test-data-id"
|
32
|
+
// iconPosition="left"
|
33
|
+
// iconColor="grey2"
|
34
|
+
// />
|
35
|
+
import styled from 'vue3-styled-components'
|
36
|
+
import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
const inputAttrs = {
|
39
|
+
isDisabled: Boolean,
|
40
|
+
inputWidth: String,
|
41
|
+
isFilter: Boolean
|
42
|
+
}
|
43
|
+
const Container = styled('div', inputAttrs)`
|
44
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
45
|
+
position: relative;
|
46
|
+
`
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
48
|
+
const InputContainer = styled('input', inputAttrs)`
|
49
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
50
|
+
padding: ${(props) =>
|
51
|
+
props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
|
52
|
+
border-radius: 4px;
|
53
|
+
font-size: 13px;
|
54
|
+
color: ${(props) => props.theme.colors.black};
|
55
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
56
|
+
box-sizing: border-box;
|
57
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
58
|
+
background: ${(props) => props.theme.colors.white} !important;
|
59
|
+
&::placeholder {
|
60
|
+
color: ${(props) => props.theme.colors.darkGray};
|
61
|
+
}
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
&:focus {
|
64
|
+
outline: none;
|
65
|
+
}
|
66
|
+
`
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
const InputWrapper = styled.span`
|
69
|
+
position: relative;
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
svg {
|
72
|
+
position: absolute;
|
73
|
+
transform: translateY(-50%);
|
74
|
+
top: 50%;
|
75
|
+
${(props) => (props.iconPosition === 'right' ? 'right' : 'left')}: 10px;
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
}
|
77
|
+
path {
|
78
|
+
fill: ${(props) =>
|
79
|
+
props.theme.colors[props.iconColor]
|
80
|
+
? props.theme.colors[props.iconColor]
|
81
|
+
: props.iconColor};
|
83
82
|
}
|
84
|
-
|
83
|
+
}
|
84
|
+
`
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
export default {
|
87
|
+
name: 'search-input',
|
88
|
+
components: {
|
89
|
+
InputContainer,
|
90
|
+
InputWrapper,
|
91
|
+
Container,
|
92
|
+
SearchIconSvg
|
93
|
+
},
|
94
|
+
props: {
|
95
|
+
value: {
|
96
|
+
required: true
|
97
|
+
},
|
98
|
+
disabled: {
|
99
|
+
required: false,
|
100
|
+
default: false
|
101
|
+
},
|
102
|
+
placeholder: {
|
103
|
+
required: false,
|
104
|
+
default: ''
|
105
|
+
},
|
106
|
+
inputWidth: {
|
107
|
+
required: false,
|
108
|
+
default: null
|
109
|
+
},
|
110
|
+
isFilter: {
|
111
|
+
required: false,
|
112
|
+
default: false
|
93
113
|
},
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
},
|
98
|
-
disabled: {
|
99
|
-
required: false,
|
100
|
-
default: false,
|
101
|
-
},
|
102
|
-
placeholder: {
|
103
|
-
required: false,
|
104
|
-
default: '',
|
105
|
-
},
|
106
|
-
inputWidth: {
|
107
|
-
required: false,
|
108
|
-
default: null,
|
109
|
-
},
|
110
|
-
isFilter: {
|
111
|
-
required: false,
|
112
|
-
default: false,
|
113
|
-
},
|
114
|
-
hasFocus: {
|
115
|
-
required: false,
|
116
|
-
default: false,
|
117
|
-
},
|
118
|
-
dataId: {
|
119
|
-
required: false,
|
120
|
-
default: '',
|
121
|
-
},
|
122
|
-
iconPosition: {
|
123
|
-
type: String,
|
124
|
-
default: 'right',
|
125
|
-
},
|
126
|
-
iconColor: {
|
127
|
-
type: String,
|
128
|
-
default: 'black',
|
129
|
-
},
|
114
|
+
hasFocus: {
|
115
|
+
required: false,
|
116
|
+
default: false
|
130
117
|
},
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
if (newVal) {
|
135
|
-
this.focusInputElement()
|
136
|
-
}
|
137
|
-
},
|
118
|
+
dataId: {
|
119
|
+
required: false,
|
120
|
+
default: ''
|
138
121
|
},
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
},
|
143
|
-
focusInputElement() {
|
144
|
-
this.$nextTick(() => {
|
145
|
-
this.$refs.inputElement.$el.focus()
|
146
|
-
})
|
147
|
-
},
|
122
|
+
iconPosition: {
|
123
|
+
type: String,
|
124
|
+
default: 'right'
|
148
125
|
},
|
126
|
+
iconColor: {
|
127
|
+
type: String,
|
128
|
+
default: 'black'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
emits: ['on-change'],
|
132
|
+
methods: {
|
133
|
+
onChangeHandler(event) {
|
134
|
+
this.$emit('on-change', event.target.value)
|
135
|
+
},
|
136
|
+
focusInputElement() {
|
137
|
+
this.$nextTick(() => {
|
138
|
+
this.$refs.inputElement.$el.focus()
|
139
|
+
})
|
140
|
+
}
|
141
|
+
},
|
142
|
+
watch: {
|
143
|
+
hasFocus(newVal) {
|
144
|
+
if (newVal) {
|
145
|
+
this.focusInputElement()
|
146
|
+
}
|
147
|
+
}
|
149
148
|
}
|
149
|
+
}
|
150
150
|
</script>
|