@eturnity/eturnity_reusable_components 7.30.3-EPDM-10647.0 → 7.30.3-EPDM-10576.2
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 +486 -452
- 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 -701
- 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 -792
- 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/src/utils/index.js +0 -12
@@ -1,7 +1,7 @@
|
|
1
|
-
import RadioButton from
|
1
|
+
import RadioButton from './index.vue'
|
2
2
|
|
3
3
|
export default {
|
4
|
-
title:
|
4
|
+
title: 'RadioButton',
|
5
5
|
component: RadioButton,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
@@ -34,25 +34,25 @@ const Template = (args, { argTypes }) => ({
|
|
34
34
|
export const Default = Template.bind({})
|
35
35
|
Default.args = {
|
36
36
|
options: [
|
37
|
-
{ label:
|
38
|
-
{ label:
|
39
|
-
{ label:
|
40
|
-
{ label:
|
37
|
+
{ label: 'Button 1', value: 'button_1', infoText: 'my info text' },
|
38
|
+
{ label: 'Button 2', value: 'button_2', infoText: 'my info text 2' },
|
39
|
+
{ label: 'Button 3', value: 'button_3', disabled: true },
|
40
|
+
{ label: 'Button 4', value: 'button_4', disabled: true },
|
41
41
|
],
|
42
|
-
selectedOption:
|
43
|
-
layout:
|
44
|
-
size:
|
42
|
+
selectedOption: 'button_2',
|
43
|
+
layout: 'horizontal',
|
44
|
+
size: 'medium',
|
45
45
|
}
|
46
46
|
|
47
47
|
export const VerticalLayout = Template.bind({})
|
48
48
|
VerticalLayout.args = {
|
49
49
|
options: [
|
50
|
-
{ label:
|
51
|
-
{ label:
|
52
|
-
{ label:
|
53
|
-
{ label:
|
50
|
+
{ label: 'Button 1', value: 'button_1' },
|
51
|
+
{ label: 'Button 2', value: 'button_2' },
|
52
|
+
{ label: 'Button 3', value: 'button_3' },
|
53
|
+
{ label: 'Button 4', value: 'button_4', disabled: true },
|
54
54
|
],
|
55
|
-
selectedOption:
|
56
|
-
layout:
|
57
|
-
size:
|
55
|
+
selectedOption: 'button_2',
|
56
|
+
layout: 'vertical',
|
57
|
+
size: 'medium',
|
58
58
|
}
|
@@ -1,270 +1,273 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
2
|
+
<ComponentWrapper :layout="layout">
|
3
|
+
<RadioWrapper v-for="(item, index) in options" :key="item.value">
|
4
|
+
<LabelContainer
|
5
|
+
:checkmark-color="checkmarkColor"
|
6
|
+
:has-label="!!item.label"
|
7
|
+
:is-checked="selectedOption === item.value"
|
8
|
+
:is-disabled="item.disabled"
|
5
9
|
:size="size"
|
6
|
-
:hasLabel="item.label"
|
7
|
-
:isDisabled="item.disabled"
|
8
|
-
:isChecked="selectedOption === item.value"
|
9
|
-
:checkmarkColor="checkmarkColor"
|
10
10
|
>
|
11
|
-
<
|
11
|
+
<Radio
|
12
|
+
:checked="selectedOption === item.value"
|
13
|
+
:data-id="`radio_button_${dataId}_option_${item.value}`"
|
14
|
+
:disabled="item.disabled"
|
15
|
+
:name="'radioButtons_' + radioName"
|
12
16
|
type="radio"
|
13
17
|
:value="selectedOption"
|
14
18
|
@click="onInputHandler(item.value)"
|
15
|
-
:name="'radioButtons_' + radioName"
|
16
|
-
:checked="selectedOption === item.value"
|
17
|
-
:disabled="item.disabled"
|
18
|
-
:data-id="`radio_button_${dataId}_option_${item.value}`"
|
19
19
|
/>
|
20
20
|
<span class="checkmark"></span>
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
<LabelText v-if="item.label" :is-disabled="item.disabled">
|
22
|
+
{{ item.label }}
|
23
|
+
</LabelText>
|
24
|
+
<InfoText v-if="item.infoText" size="16px" :text="item.infoText" />
|
25
|
+
</LabelContainer>
|
26
|
+
<ImageContainer v-if="item.img">
|
27
|
+
<RadioImage :src="item.img" />
|
26
28
|
<div class="search-icn-container" @click="toggleImageModal(index)">
|
27
29
|
<img
|
28
30
|
class="search-icn"
|
29
31
|
:src="require('../../../assets/icons/search_icon.png')"
|
30
32
|
/>
|
31
33
|
</div>
|
32
|
-
</
|
33
|
-
<
|
34
|
+
</ImageContainer>
|
35
|
+
<Modal
|
34
36
|
v-if="item.img"
|
35
|
-
:
|
37
|
+
:is-open="isImageOpen(index)"
|
36
38
|
@on-close="toggleImageModal(null)"
|
37
39
|
>
|
38
|
-
<
|
39
|
-
<
|
40
|
-
</
|
41
|
-
</
|
42
|
-
</
|
43
|
-
</
|
40
|
+
<ModalImageContainer>
|
41
|
+
<ModalImage :src="item.img" />
|
42
|
+
</ModalImageContainer>
|
43
|
+
</Modal>
|
44
|
+
</RadioWrapper>
|
45
|
+
</ComponentWrapper>
|
44
46
|
</template>
|
45
47
|
|
46
48
|
<script>
|
47
|
-
// import RadioButton from "@eturnity/eturnity_reusable_components/src/components/inputs/radioButton"
|
48
|
-
// To use:
|
49
|
-
// <radio-button
|
50
|
-
// :options="radioOptions"
|
51
|
-
// :selectedOption="checkedOption"
|
52
|
-
// @on-radio-change="onInputChange($event)"
|
53
|
-
// layout="vertical"
|
54
|
-
// size="large"
|
55
|
-
// />
|
56
|
-
// Data being passed should look like:
|
57
|
-
// radioOptions: [
|
58
|
-
// { label: 'Button 1', value: 'button_1', img: 'www.imagesrc.com', infoText: 'my info text' },
|
59
|
-
// { label: 'Button 2', value: 'button_2', img: 'www.imagesrc.com', infoText: 'my info text 2' },
|
60
|
-
// { label: 'Button 3', value: 'button_3', img: 'www.imagesrc.com', disabled: true },
|
61
|
-
// { label: 'Button 4', value: 'button_4', disabled: true }
|
62
|
-
// ]
|
49
|
+
// import RadioButton from "@eturnity/eturnity_reusable_components/src/components/inputs/radioButton"
|
50
|
+
// To use:
|
51
|
+
// <radio-button
|
52
|
+
// :options="radioOptions"
|
53
|
+
// :selectedOption="checkedOption"
|
54
|
+
// @on-radio-change="onInputChange($event)"
|
55
|
+
// layout="vertical"
|
56
|
+
// size="large"
|
57
|
+
// />
|
58
|
+
// Data being passed should look like:
|
59
|
+
// radioOptions: [
|
60
|
+
// { label: 'Button 1', value: 'button_1', img: 'www.imagesrc.com', infoText: 'my info text' },
|
61
|
+
// { label: 'Button 2', value: 'button_2', img: 'www.imagesrc.com', infoText: 'my info text 2' },
|
62
|
+
// { label: 'Button 3', value: 'button_3', img: 'www.imagesrc.com', disabled: true },
|
63
|
+
// { label: 'Button 4', value: 'button_4', disabled: true }
|
64
|
+
// ]
|
63
65
|
|
64
|
-
import styled from 'vue3-styled-components'
|
65
|
-
import Modal from '../../modals/modal'
|
66
|
-
import InfoText from '../../infoText'
|
66
|
+
import styled from 'vue3-styled-components'
|
67
|
+
import Modal from '../../modals/modal'
|
68
|
+
import InfoText from '../../infoText'
|
67
69
|
|
68
|
-
const wrapperProps = {
|
69
|
-
|
70
|
-
}
|
71
|
-
const ComponentWrapper = styled('div', wrapperProps)`
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
`
|
78
|
-
|
79
|
-
const Radio = styled.input`
|
80
|
-
cursor: pointer;
|
81
|
-
position: absolute;
|
82
|
-
opacity: 0;
|
83
|
-
cursor: pointer;
|
84
|
-
height: 0;
|
85
|
-
width: 0;
|
86
|
-
`
|
70
|
+
const wrapperProps = {
|
71
|
+
layout: String,
|
72
|
+
}
|
73
|
+
const ComponentWrapper = styled('div', wrapperProps)`
|
74
|
+
display: flex;
|
75
|
+
flex-direction: ${(props) =>
|
76
|
+
props.layout === 'vertical' ? 'column' : 'row'};
|
77
|
+
grid-gap: 10px 5px;
|
78
|
+
flex-wrap: wrap;
|
79
|
+
`
|
87
80
|
|
88
|
-
const
|
89
|
-
|
90
|
-
|
91
|
-
|
81
|
+
const Radio = styled.input`
|
82
|
+
cursor: pointer;
|
83
|
+
position: absolute;
|
84
|
+
opacity: 0;
|
85
|
+
cursor: pointer;
|
86
|
+
height: 0;
|
87
|
+
width: 0;
|
88
|
+
`
|
92
89
|
|
93
|
-
const
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
checkmarkColor: String
|
98
|
-
}
|
99
|
-
const LabelContainer = styled('label', containerProps)`
|
100
|
-
display: grid;
|
101
|
-
grid-template-columns: auto 1fr auto;
|
102
|
-
grid-gap: ${(props) =>
|
103
|
-
props.hasLabel
|
104
|
-
? '15px' : 0 };
|
105
|
-
align-items: center;
|
106
|
-
color: ${(props) =>
|
107
|
-
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
108
|
-
position: relative;
|
109
|
-
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
110
|
-
font-size: ${(props) =>
|
111
|
-
props.size === 'large'
|
112
|
-
? '16px'
|
113
|
-
: props.size === 'medium'
|
114
|
-
? '13px'
|
115
|
-
: '10px'};
|
116
|
-
user-select: none;
|
117
|
-
flex: auto;
|
118
|
-
align-self: baseline;
|
90
|
+
const RadioWrapper = styled.div`
|
91
|
+
display: grid;
|
92
|
+
grid-gap: 10px;
|
93
|
+
`
|
119
94
|
|
120
|
-
|
121
|
-
|
95
|
+
const containerProps = {
|
96
|
+
size: String,
|
97
|
+
isDisabled: Boolean,
|
98
|
+
isChecked: Boolean,
|
99
|
+
checkmarkColor: String,
|
100
|
+
hasLabel: Boolean,
|
101
|
+
}
|
102
|
+
const LabelContainer = styled('label', containerProps)`
|
103
|
+
display: grid;
|
104
|
+
grid-template-columns: auto 1fr auto;
|
105
|
+
grid-gap: ${(props) => (props.hasLabel ? '15px' : 0)};
|
106
|
+
align-items: center;
|
107
|
+
color: ${(props) =>
|
108
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
109
|
+
position: relative;
|
110
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
111
|
+
font-size: ${(props) =>
|
122
112
|
props.size === 'large'
|
123
|
-
? '23px'
|
124
|
-
: props.size === 'medium'
|
125
113
|
? '16px'
|
126
|
-
: '12px'};
|
127
|
-
width: ${(props) =>
|
128
|
-
props.size === 'large'
|
129
|
-
? '23px'
|
130
114
|
: props.size === 'medium'
|
131
|
-
? '
|
132
|
-
: '
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
display: flex;
|
137
|
-
align-items: center;
|
138
|
-
justify-content: center;
|
115
|
+
? '13px'
|
116
|
+
: '10px'};
|
117
|
+
user-select: none;
|
118
|
+
flex: auto;
|
119
|
+
align-self: baseline;
|
139
120
|
|
140
|
-
|
141
|
-
|
142
|
-
display: ${(props) => (props.isChecked ? 'block' : 'none')};
|
143
|
-
width: ${(props) =>
|
121
|
+
.checkmark {
|
122
|
+
height: ${(props) =>
|
144
123
|
props.size === 'large'
|
145
|
-
? '
|
124
|
+
? '23px'
|
146
125
|
: props.size === 'medium'
|
147
|
-
? '
|
148
|
-
: '
|
149
|
-
|
126
|
+
? '16px'
|
127
|
+
: '12px'};
|
128
|
+
width: ${(props) =>
|
150
129
|
props.size === 'large'
|
151
|
-
? '
|
130
|
+
? '23px'
|
152
131
|
: props.size === 'medium'
|
153
|
-
? '
|
154
|
-
: '
|
132
|
+
? '16px'
|
133
|
+
: '12px'};
|
134
|
+
background-color: #fff;
|
155
135
|
border-radius: 100%;
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
`
|
136
|
+
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
137
|
+
display: flex;
|
138
|
+
align-items: center;
|
139
|
+
justify-content: center;
|
161
140
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
141
|
+
&:after {
|
142
|
+
content: '';
|
143
|
+
display: ${(props) => (props.isChecked ? 'block' : 'none')};
|
144
|
+
width: ${(props) =>
|
145
|
+
props.size === 'large'
|
146
|
+
? '10px'
|
147
|
+
: props.size === 'medium'
|
148
|
+
? '8px'
|
149
|
+
: '6px'};
|
150
|
+
height: ${(props) =>
|
151
|
+
props.size === 'large'
|
152
|
+
? '10px'
|
153
|
+
: props.size === 'medium'
|
154
|
+
? '8px'
|
155
|
+
: '6px'};
|
156
|
+
border-radius: 100%;
|
157
|
+
background: ${(props) =>
|
158
|
+
props.checkmarkColor
|
159
|
+
? props.checkmarkColor
|
160
|
+
: props.theme.colors.green};
|
161
|
+
}
|
162
|
+
}
|
163
|
+
`
|
167
164
|
|
168
|
-
const
|
169
|
-
|
170
|
-
|
165
|
+
const textAttrs = { isDisabled: Boolean }
|
166
|
+
const LabelText = styled('div', textAttrs)`
|
167
|
+
color: ${(props) =>
|
168
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
169
|
+
`
|
171
170
|
|
172
|
-
const
|
173
|
-
|
174
|
-
|
175
|
-
display: grid;
|
176
|
-
align-items: center;
|
177
|
-
justify-items: center;
|
178
|
-
position: relative;
|
171
|
+
const RadioImage = styled.img`
|
172
|
+
max-width: 100px;
|
173
|
+
`
|
179
174
|
|
180
|
-
.
|
181
|
-
|
182
|
-
|
175
|
+
const ImageContainer = styled.div`
|
176
|
+
border-radius: 4px;
|
177
|
+
cursor: pointer;
|
178
|
+
display: grid;
|
179
|
+
align-items: center;
|
180
|
+
justify-items: center;
|
181
|
+
position: relative;
|
183
182
|
|
184
|
-
&:hover {
|
185
183
|
.search-icn-container {
|
186
|
-
display:
|
187
|
-
position: absolute;
|
188
|
-
background: rgba(0, 0, 0, 0.4);
|
189
|
-
width: 100%;
|
190
|
-
height: 100%;
|
191
|
-
align-items: center;
|
192
|
-
justify-items: center;
|
184
|
+
display: none;
|
193
185
|
}
|
194
|
-
}
|
195
|
-
`
|
196
186
|
|
197
|
-
|
187
|
+
&:hover {
|
188
|
+
.search-icn-container {
|
189
|
+
display: grid;
|
190
|
+
position: absolute;
|
191
|
+
background: rgba(0, 0, 0, 0.4);
|
192
|
+
width: 100%;
|
193
|
+
height: 100%;
|
194
|
+
align-items: center;
|
195
|
+
justify-items: center;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
`
|
198
199
|
|
199
|
-
const
|
200
|
-
padding: 40px;
|
201
|
-
`
|
200
|
+
const ModalImage = styled.img``
|
202
201
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
default: false
|
222
|
-
},
|
223
|
-
options: {
|
224
|
-
required: true,
|
225
|
-
default: []
|
226
|
-
},
|
227
|
-
layout: {
|
228
|
-
required: false,
|
229
|
-
default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
|
230
|
-
},
|
231
|
-
size: {
|
232
|
-
required: false,
|
233
|
-
default: 'medium' // small, medium, large
|
202
|
+
const ModalImageContainer = styled.div`
|
203
|
+
padding: 40px;
|
204
|
+
`
|
205
|
+
|
206
|
+
export default {
|
207
|
+
name: 'RadioButton',
|
208
|
+
components: {
|
209
|
+
Radio,
|
210
|
+
ComponentWrapper,
|
211
|
+
LabelContainer,
|
212
|
+
RadioWrapper,
|
213
|
+
RadioImage,
|
214
|
+
ImageContainer,
|
215
|
+
Modal,
|
216
|
+
ModalImage,
|
217
|
+
ModalImageContainer,
|
218
|
+
InfoText,
|
219
|
+
LabelText,
|
234
220
|
},
|
235
|
-
|
236
|
-
|
237
|
-
|
221
|
+
props: {
|
222
|
+
selectedOption: {
|
223
|
+
required: true,
|
224
|
+
default: false,
|
225
|
+
},
|
226
|
+
options: {
|
227
|
+
required: true,
|
228
|
+
default: [],
|
229
|
+
},
|
230
|
+
layout: {
|
231
|
+
required: false,
|
232
|
+
default: 'horizontal', //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
|
233
|
+
},
|
234
|
+
size: {
|
235
|
+
required: false,
|
236
|
+
default: 'medium', // small, medium, large
|
237
|
+
},
|
238
|
+
name: {
|
239
|
+
required: false,
|
240
|
+
default: '',
|
241
|
+
},
|
242
|
+
checkmarkColor: {
|
243
|
+
required: false,
|
244
|
+
default: '',
|
245
|
+
},
|
246
|
+
dataId: {
|
247
|
+
type: String,
|
248
|
+
default: 'key',
|
249
|
+
},
|
238
250
|
},
|
239
|
-
|
240
|
-
|
241
|
-
|
251
|
+
data() {
|
252
|
+
return {
|
253
|
+
selectedImage: null,
|
254
|
+
radioName: '',
|
255
|
+
}
|
242
256
|
},
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
}
|
247
|
-
},
|
248
|
-
data() {
|
249
|
-
return {
|
250
|
-
selectedImage: null,
|
251
|
-
radioName: ''
|
252
|
-
}
|
253
|
-
},
|
254
|
-
methods: {
|
255
|
-
onInputHandler(value) {
|
256
|
-
this.$emit('on-radio-change', value)
|
257
|
+
created() {
|
258
|
+
this.radioName =
|
259
|
+
this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
257
260
|
},
|
258
|
-
|
259
|
-
|
261
|
+
methods: {
|
262
|
+
onInputHandler(value) {
|
263
|
+
this.$emit('on-radio-change', value)
|
264
|
+
},
|
265
|
+
isImageOpen(index) {
|
266
|
+
return this.selectedImage === index
|
267
|
+
},
|
268
|
+
toggleImageModal(value) {
|
269
|
+
this.selectedImage = value
|
270
|
+
},
|
260
271
|
},
|
261
|
-
toggleImageModal(value) {
|
262
|
-
this.selectedImage = value
|
263
|
-
}
|
264
|
-
},
|
265
|
-
created() {
|
266
|
-
this.radioName =
|
267
|
-
this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
268
272
|
}
|
269
|
-
}
|
270
273
|
</script>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import SearchInput from
|
1
|
+
import SearchInput from './index.vue'
|
2
2
|
|
3
3
|
export default {
|
4
|
-
title:
|
4
|
+
title: 'SearchInput',
|
5
5
|
component: SearchInput,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
@@ -25,16 +25,16 @@ const Template = (args, { argTypes }) => ({
|
|
25
25
|
|
26
26
|
export const Default = Template.bind({})
|
27
27
|
Default.args = {
|
28
|
-
placeholder:
|
28
|
+
placeholder: 'Search...',
|
29
29
|
disabled: false,
|
30
|
-
value:
|
31
|
-
inputWidth:
|
30
|
+
value: '',
|
31
|
+
inputWidth: '250px',
|
32
32
|
}
|
33
33
|
|
34
34
|
export const Disabled = Template.bind({})
|
35
35
|
Disabled.args = {
|
36
|
-
placeholder:
|
36
|
+
placeholder: 'Search...',
|
37
37
|
disabled: true,
|
38
|
-
value:
|
39
|
-
inputWidth:
|
38
|
+
value: '',
|
39
|
+
inputWidth: '250px',
|
40
40
|
}
|