@eturnity/eturnity_reusable_components 6.48.0-EPDM-9012.0 → 6.48.0-EPDM-7260.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/package.json +1 -1
- package/src/App.vue +1 -3
- package/src/components/infoText/index.vue +12 -1
- package/src/components/inputs/inputNumber/InputNumber.stories.js +3 -1
- package/src/components/inputs/inputNumber/index.vue +8 -0
- package/src/components/inputs/inputText/InputText.stories.js +1 -0
- package/src/components/inputs/inputText/index.vue +6 -0
- package/src/components/inputs/select/index.vue +5 -0
- package/src/components/inputs/switchField/index.vue +9 -0
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +8 -0
- package/src/components/inputs/textAreaInput/index.vue +6 -0
- package/src/components/inputs/toggle/index.vue +11 -1
- package/src/components/pageSubtitle/index.vue +8 -1
- package/src/components/pageTitle/index.vue +4 -28
- package/src/components/selectedOptions/index.vue +130 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
3
3
|
<page-container>
|
4
|
-
|
4
|
+
|
5
5
|
<br/>
|
6
6
|
<input-number
|
7
7
|
:value="value"
|
@@ -114,7 +114,6 @@ import iconCollection from '@/components/icon/iconCollection'
|
|
114
114
|
import dropdownComponent from '@/components/dropdown'
|
115
115
|
import videoThumbnail from '@/components/videoThumbnail'
|
116
116
|
import icon from '@/components/icon'
|
117
|
-
import pageTitle from '@/components/pageTitle'
|
118
117
|
// import TableDropdown from "@/components/tableDropdown"
|
119
118
|
|
120
119
|
const PageContainer = styled.div`
|
@@ -138,7 +137,6 @@ export default {
|
|
138
137
|
SwitchField,
|
139
138
|
iconCollection,
|
140
139
|
dropdownComponent,
|
141
|
-
pageTitle,
|
142
140
|
videoThumbnail,
|
143
141
|
icon
|
144
142
|
},
|
@@ -10,6 +10,7 @@
|
|
10
10
|
</icon-img>
|
11
11
|
<text-overlay
|
12
12
|
v-if="showInfo"
|
13
|
+
:borderColor="borderColor"
|
13
14
|
:width="width"
|
14
15
|
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
15
16
|
:alignArrow="alignArrow"
|
@@ -26,6 +27,7 @@
|
|
26
27
|
//To use:
|
27
28
|
// <info-text
|
28
29
|
// text="Veritatis et quasi architecto beatae vitae"
|
30
|
+
// borderColor="#ccc"
|
29
31
|
// size="20"
|
30
32
|
// alignArrow="right" // which side the arrow should be on
|
31
33
|
// />
|
@@ -35,6 +37,7 @@ import icon from '../icon'
|
|
35
37
|
|
36
38
|
const textAttrs = {
|
37
39
|
iconSize: String,
|
40
|
+
borderColor: String,
|
38
41
|
alignArrow: String,
|
39
42
|
width: String,
|
40
43
|
halfComputedTextInfoWidth: Number
|
@@ -108,6 +111,10 @@ export default {
|
|
108
111
|
text: {
|
109
112
|
required: false
|
110
113
|
},
|
114
|
+
borderColor: {
|
115
|
+
required: false,
|
116
|
+
default: null
|
117
|
+
},
|
111
118
|
size: {
|
112
119
|
required: false,
|
113
120
|
default: '14px'
|
@@ -149,7 +156,11 @@ export default {
|
|
149
156
|
},
|
150
157
|
computed: {
|
151
158
|
iconColor() {
|
152
|
-
return
|
159
|
+
return this.isActive
|
160
|
+
? this.borderColor
|
161
|
+
? this.borderColor
|
162
|
+
: theme.colors.secondary
|
163
|
+
: theme.colors.mediumGray
|
153
164
|
},
|
154
165
|
halfComputedTextInfoWidth() {
|
155
166
|
return parseInt(this.width) / 2
|
@@ -32,6 +32,7 @@ const Template = (args, { argTypes }) => ({
|
|
32
32
|
// fontSize="13px"
|
33
33
|
// labelText="Number of Modules"
|
34
34
|
// labelInfoText="Here is some information for you..."
|
35
|
+
// labelInfoAlign="left"
|
35
36
|
// />
|
36
37
|
})
|
37
38
|
|
@@ -128,7 +129,8 @@ WithLabelInfo.args = {
|
|
128
129
|
textAlign: "left",
|
129
130
|
showLinearUnitName: false,
|
130
131
|
labelText: "Number Input",
|
131
|
-
labelInfoText: "Here is some information for you..."
|
132
|
+
labelInfoText: "Here is some information for you...",
|
133
|
+
labelInfoAlign: "right",
|
132
134
|
}
|
133
135
|
|
134
136
|
export const LargerFont = Template.bind({})
|
@@ -19,6 +19,9 @@
|
|
19
19
|
<info-text
|
20
20
|
v-if="labelInfoText"
|
21
21
|
:text="labelInfoText"
|
22
|
+
borderColor="#ccc"
|
23
|
+
size="14px"
|
24
|
+
:alignText="labelInfoAlign"
|
22
25
|
/>
|
23
26
|
</label-wrapper>
|
24
27
|
<input-wrapper>
|
@@ -92,6 +95,7 @@
|
|
92
95
|
// fontSize="13px"
|
93
96
|
// labelText="Number of Modules"
|
94
97
|
// labelInfoText="Here is some information for you..."
|
98
|
+
// labelInfoAlign="left"
|
95
99
|
// :minNumber="0"
|
96
100
|
// fontColor="blue"
|
97
101
|
// />
|
@@ -396,6 +400,10 @@ export default {
|
|
396
400
|
required: false,
|
397
401
|
default: null
|
398
402
|
},
|
403
|
+
labelInfoAlign: {
|
404
|
+
required: false,
|
405
|
+
default: 'left'
|
406
|
+
},
|
399
407
|
defaultNumber: {
|
400
408
|
required: false,
|
401
409
|
default: null
|
@@ -21,6 +21,7 @@ const Template = (args, { argTypes }) => ({
|
|
21
21
|
// @input-change="onInputChange({ value: $event, type: 'companyName' })"
|
22
22
|
// :isError="checkErrors()"
|
23
23
|
// :errorMessage="This is my error message"
|
24
|
+
// infoTextAlign="right" // left by default
|
24
25
|
// infoTextMessage="My info message"
|
25
26
|
// label="Question 5"
|
26
27
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -17,7 +17,9 @@
|
|
17
17
|
<info-text
|
18
18
|
v-if="infoTextMessage"
|
19
19
|
:text="infoTextMessage"
|
20
|
+
borderColor="#ccc"
|
20
21
|
:size="fontSize ? fontSize : '16px'"
|
22
|
+
:alignText="infoTextAlign"
|
21
23
|
/>
|
22
24
|
</label-wrapper>
|
23
25
|
<input-error-wrapper>
|
@@ -204,6 +206,7 @@ export default {
|
|
204
206
|
// @input-blur="onInputBlur($event)"
|
205
207
|
// :isError="checkErrors()"
|
206
208
|
// :errorMessage="This is my error message"
|
209
|
+
// infoTextAlign="right" // left by default
|
207
210
|
// infoTextMessage="My info message"
|
208
211
|
// label="Question 5"
|
209
212
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -267,6 +270,9 @@ export default {
|
|
267
270
|
infoTextMessage: {
|
268
271
|
required: false
|
269
272
|
},
|
273
|
+
infoTextAlign: {
|
274
|
+
required: false
|
275
|
+
},
|
270
276
|
label: {
|
271
277
|
required: false
|
272
278
|
},
|
@@ -22,7 +22,9 @@
|
|
22
22
|
<info-text
|
23
23
|
v-if="infoTextMessage"
|
24
24
|
:text="infoTextMessage"
|
25
|
+
borderColor="#ccc"
|
25
26
|
:size="fontSize ? fontSize : '16px'"
|
27
|
+
:alignText="infoTextAlign"
|
26
28
|
/>
|
27
29
|
</label-wrapper>
|
28
30
|
<select-button-wrapper :disabled="disabled">
|
@@ -311,6 +313,9 @@ export default {
|
|
311
313
|
infoTextMessage: {
|
312
314
|
required: false
|
313
315
|
},
|
316
|
+
infoTextAlign: {
|
317
|
+
required: false
|
318
|
+
},
|
314
319
|
selectWidth: {
|
315
320
|
required: false,
|
316
321
|
default: null
|
@@ -15,6 +15,9 @@
|
|
15
15
|
<info-text
|
16
16
|
v-if="infoTextMessage"
|
17
17
|
:text="infoTextMessage"
|
18
|
+
borderColor="#ccc"
|
19
|
+
size="14px"
|
20
|
+
:alignText="infoTextAlign"
|
18
21
|
/>
|
19
22
|
</label-container>
|
20
23
|
|
@@ -45,6 +48,9 @@
|
|
45
48
|
@click.native.stop
|
46
49
|
v-if="infoTextMessage"
|
47
50
|
:text="infoTextMessage"
|
51
|
+
borderColor="#ccc"
|
52
|
+
size="14px"
|
53
|
+
:alignText="infoTextAlign"
|
48
54
|
/>
|
49
55
|
</label-container>
|
50
56
|
</flex-wrapper>
|
@@ -196,6 +202,9 @@ export default {
|
|
196
202
|
infoTextMessage: {
|
197
203
|
required: false
|
198
204
|
},
|
205
|
+
infoTextAlign: {
|
206
|
+
required: false
|
207
|
+
},
|
199
208
|
colorMode: {
|
200
209
|
required: false,
|
201
210
|
default: 'light'
|
@@ -22,6 +22,7 @@ const Template = (args, { argTypes }) => ({
|
|
22
22
|
// rowHeight="4" //optional
|
23
23
|
// :isError="false"
|
24
24
|
// :errorText="$gettext('field_required')"
|
25
|
+
// infoTextAlign="right" // left by default
|
25
26
|
// infoTextMessage="My info message"
|
26
27
|
// label="Question 5"
|
27
28
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -36,6 +37,7 @@ Default.args = {
|
|
36
37
|
rowHeight: "2",
|
37
38
|
isError: false,
|
38
39
|
errorText: "This field is required",
|
40
|
+
infoTextAlign: "right",
|
39
41
|
infoTextMessage: "",
|
40
42
|
label: "",
|
41
43
|
value: "",
|
@@ -50,6 +52,7 @@ Disabled.args = {
|
|
50
52
|
rowHeight: "2",
|
51
53
|
isError: false,
|
52
54
|
errorText: "This field is required",
|
55
|
+
infoTextAlign: "right",
|
53
56
|
infoTextMessage: "",
|
54
57
|
label: "",
|
55
58
|
value: "",
|
@@ -64,6 +67,7 @@ Error.args = {
|
|
64
67
|
rowHeight: "2",
|
65
68
|
isError: true,
|
66
69
|
errorText: "This field is required",
|
70
|
+
infoTextAlign: "right",
|
67
71
|
infoTextMessage: "",
|
68
72
|
label: "",
|
69
73
|
value: "",
|
@@ -78,6 +82,7 @@ WithLabel.args = {
|
|
78
82
|
rowHeight: "2",
|
79
83
|
isError: false,
|
80
84
|
errorText: "This field is required",
|
85
|
+
infoTextAlign: "right",
|
81
86
|
infoTextMessage: "Here is some information",
|
82
87
|
label: "Description",
|
83
88
|
value: "Here is my description!",
|
@@ -92,6 +97,7 @@ HorizontalLabel.args = {
|
|
92
97
|
rowHeight: "2",
|
93
98
|
isError: false,
|
94
99
|
errorText: "This field is required",
|
100
|
+
infoTextAlign: "right",
|
95
101
|
infoTextMessage: "Here is some information",
|
96
102
|
label: "Description",
|
97
103
|
value: "Here is my description!",
|
@@ -106,6 +112,7 @@ LargerTextArea.args = {
|
|
106
112
|
rowHeight: "5",
|
107
113
|
isError: false,
|
108
114
|
errorText: "This field is required",
|
115
|
+
infoTextAlign: "right",
|
109
116
|
infoTextMessage: "Here is some information",
|
110
117
|
label: "Description",
|
111
118
|
value: "Here is my description!",
|
@@ -120,6 +127,7 @@ LargerFontSize.args = {
|
|
120
127
|
fontSize: "24px",
|
121
128
|
isError: false,
|
122
129
|
errorText: "This field is required",
|
130
|
+
infoTextAlign: "right",
|
123
131
|
infoTextMessage: "Here is some information",
|
124
132
|
label: "Description",
|
125
133
|
value: "Here is my description!",
|
@@ -11,7 +11,9 @@
|
|
11
11
|
<info-text
|
12
12
|
v-if="infoTextMessage"
|
13
13
|
:text="infoTextMessage"
|
14
|
+
borderColor="#ccc"
|
14
15
|
size="16px"
|
16
|
+
:alignText="infoTextAlign"
|
15
17
|
/>
|
16
18
|
</label-wrapper>
|
17
19
|
<input-container
|
@@ -45,6 +47,7 @@
|
|
45
47
|
// rowHeight="4" //optional
|
46
48
|
// :isError="false"
|
47
49
|
// :errorText="$gettext('field_required')"
|
50
|
+
// infoTextAlign="right" // left by default
|
48
51
|
// infoTextMessage="My info message"
|
49
52
|
// label="Question 5"
|
50
53
|
// alignItems="horizontal" // horizontal, vertical
|
@@ -164,6 +167,9 @@ export default {
|
|
164
167
|
infoTextMessage: {
|
165
168
|
required: false
|
166
169
|
},
|
170
|
+
infoTextAlign: {
|
171
|
+
required: false
|
172
|
+
},
|
167
173
|
label: {
|
168
174
|
required: false
|
169
175
|
},
|
@@ -9,6 +9,9 @@
|
|
9
9
|
<info-text
|
10
10
|
v-if="infoTextMessage"
|
11
11
|
:text="infoTextMessage"
|
12
|
+
borderColor="#ccc"
|
13
|
+
size="14px"
|
14
|
+
:alignText="infoTextAlign"
|
12
15
|
/>
|
13
16
|
</label-container>
|
14
17
|
<toggle-wrapper
|
@@ -42,6 +45,9 @@
|
|
42
45
|
@click.native.stop
|
43
46
|
v-if="infoTextMessage"
|
44
47
|
:text="infoTextMessage"
|
48
|
+
borderColor="#ccc"
|
49
|
+
size="14px"
|
50
|
+
:alignText="infoTextAlign"
|
45
51
|
/>
|
46
52
|
</label-container>
|
47
53
|
</flex-wrapper>
|
@@ -61,6 +67,7 @@
|
|
61
67
|
// labelAlign="right"
|
62
68
|
// fontColor="black"
|
63
69
|
// :disabled="true"
|
70
|
+
// infoTextAlign="right" // left by default
|
64
71
|
// infoTextMessage="My info message"
|
65
72
|
// />
|
66
73
|
|
@@ -264,7 +271,10 @@ export default {
|
|
264
271
|
},
|
265
272
|
infoTextMessage: {
|
266
273
|
required: false,
|
267
|
-
}
|
274
|
+
},
|
275
|
+
infoTextAlign: {
|
276
|
+
required: false,
|
277
|
+
},
|
268
278
|
},
|
269
279
|
methods: {
|
270
280
|
onToggleChange() {
|
@@ -4,8 +4,11 @@
|
|
4
4
|
{{ text }}
|
5
5
|
</span>
|
6
6
|
<info-text
|
7
|
-
v-if="!!infoText"
|
8
7
|
:text="infoText"
|
8
|
+
v-if="!!infoText"
|
9
|
+
size="14px"
|
10
|
+
borderColor="#ccc"
|
11
|
+
:alignText="alignInfoText"
|
9
12
|
/>
|
10
13
|
</subtitle-text>
|
11
14
|
</template>
|
@@ -52,6 +55,10 @@ export default {
|
|
52
55
|
required: false,
|
53
56
|
default: null,
|
54
57
|
},
|
58
|
+
alignInfoText: {
|
59
|
+
required: false,
|
60
|
+
default: "left",
|
61
|
+
},
|
55
62
|
marginBottom: {
|
56
63
|
required: false,
|
57
64
|
default: "30px",
|
@@ -1,13 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<title-
|
3
|
-
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
4
|
-
{{ text }}
|
5
|
-
</title-text>
|
6
|
-
<info-text
|
7
|
-
v-if="!!infoText"
|
8
|
-
:text="infoText"
|
9
|
-
/>
|
10
|
-
</title-wrap>
|
2
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ text }}</title-text>
|
11
3
|
</template>
|
12
4
|
|
13
5
|
<script>
|
@@ -18,41 +10,25 @@
|
|
18
10
|
// color="red"
|
19
11
|
// />
|
20
12
|
import styled from "vue-styled-components"
|
21
|
-
import InfoText from "../infoText"
|
22
13
|
|
23
|
-
const
|
24
|
-
const
|
25
|
-
display: grid;
|
26
|
-
align-items: center;
|
27
|
-
grid-gap: 12px;
|
28
|
-
grid-template-columns: ${(props) =>
|
29
|
-
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
30
|
-
margin-bottom: 20px;
|
31
|
-
`
|
32
|
-
|
33
|
-
const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
34
|
-
const TitleText = styled('span', titleAttrs)`
|
14
|
+
const textAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
15
|
+
const TitleText = styled("div", textAttrs)`
|
35
16
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
36
17
|
font-weight: bold;
|
37
18
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
38
19
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
20
|
+
margin-bottom: 20px;
|
39
21
|
`
|
40
22
|
|
41
23
|
export default {
|
42
24
|
name: "page-title",
|
43
25
|
components: {
|
44
26
|
TitleText,
|
45
|
-
TitleWrap,
|
46
|
-
InfoText
|
47
27
|
},
|
48
28
|
props: {
|
49
29
|
text: {
|
50
30
|
required: true,
|
51
31
|
},
|
52
|
-
infoText: {
|
53
|
-
required: false,
|
54
|
-
default: null,
|
55
|
-
},
|
56
32
|
color: {
|
57
33
|
required: false,
|
58
34
|
},
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container>
|
3
|
+
<box-container>
|
4
|
+
<selected-container
|
5
|
+
>{{ numberSelected }} {{ $gettext('selected') }}</selected-container
|
6
|
+
>
|
7
|
+
<list-container>
|
8
|
+
<list-item
|
9
|
+
v-for="item in optionsList"
|
10
|
+
:key="item.type"
|
11
|
+
:hoverColor="item.hoverColor"
|
12
|
+
@click="$emit('on-' + item.type)"
|
13
|
+
>
|
14
|
+
{{ item.name }}
|
15
|
+
</list-item>
|
16
|
+
</list-container>
|
17
|
+
<icon-container @click="$emit('on-close')">
|
18
|
+
<icon
|
19
|
+
name="close_for_modals,_tool_tips"
|
20
|
+
color="white"
|
21
|
+
size="14px"
|
22
|
+
cursor="pointer"
|
23
|
+
/>
|
24
|
+
</icon-container>
|
25
|
+
</box-container>
|
26
|
+
</page-container>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
// import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
|
31
|
+
// optionsList = [
|
32
|
+
// {
|
33
|
+
// type: 'export',
|
34
|
+
// name: 'Export'
|
35
|
+
// },
|
36
|
+
// {
|
37
|
+
// type: 'delete',
|
38
|
+
// name: 'Delete',
|
39
|
+
// hoverColor: 'red' // default is green
|
40
|
+
// }
|
41
|
+
// ]
|
42
|
+
// @on-${type}="function" should $emit the callback for the 'type' in the optionsList
|
43
|
+
// <selected-options :optionsList="optionsList" @on-close="onCloseFunction()" @on-export="function()" @on-delete="function()" />
|
44
|
+
import styled from 'vue-styled-components'
|
45
|
+
import Icon from '../icon'
|
46
|
+
|
47
|
+
const PageContainer = styled.div`
|
48
|
+
position: fixed;
|
49
|
+
bottom: 30px;
|
50
|
+
left: 50%;
|
51
|
+
transform: translateX(-50%);
|
52
|
+
`
|
53
|
+
|
54
|
+
const SelectedContainer = styled.div`
|
55
|
+
display: grid;
|
56
|
+
align-items: center;
|
57
|
+
height: 100%;
|
58
|
+
padding-right: 20px;
|
59
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
60
|
+
`
|
61
|
+
|
62
|
+
const BoxContainer = styled.div`
|
63
|
+
display: flex;
|
64
|
+
align-items: center;
|
65
|
+
background-color: ${(props) => props.theme.colors.black};
|
66
|
+
opacity: 90%;
|
67
|
+
color: ${(props) => props.theme.colors.white};
|
68
|
+
border-radius: 4px;
|
69
|
+
padding: 8px 10px 8px 20px;
|
70
|
+
font-size: 14px;
|
71
|
+
height: 40px;
|
72
|
+
`
|
73
|
+
|
74
|
+
const ListContainer = styled.div`
|
75
|
+
padding: 0 20px;
|
76
|
+
display: flex;
|
77
|
+
gap: 20px;
|
78
|
+
color: ${(props) => props.theme.colors.white};
|
79
|
+
`
|
80
|
+
|
81
|
+
const ListAttrs = {
|
82
|
+
hoverColor: String
|
83
|
+
}
|
84
|
+
const ListItem = styled('div', ListAttrs)`
|
85
|
+
cursor: pointer;
|
86
|
+
&:hover {
|
87
|
+
color: ${(props) =>
|
88
|
+
props.hoverColor
|
89
|
+
? props.theme.colors[props.hoverColor]
|
90
|
+
: props.theme.colors.green};
|
91
|
+
}
|
92
|
+
`
|
93
|
+
|
94
|
+
const IconContainer = styled.div`
|
95
|
+
display: grid;
|
96
|
+
align-items: center;
|
97
|
+
justify-items: center;
|
98
|
+
height: 30px;
|
99
|
+
width: 30px;
|
100
|
+
cursor: pointer;
|
101
|
+
margin-left: 20px;
|
102
|
+
|
103
|
+
&:hover {
|
104
|
+
background: rgba(255, 255, 255, 0.1);
|
105
|
+
border-radius: 4px;
|
106
|
+
}
|
107
|
+
`
|
108
|
+
|
109
|
+
export default {
|
110
|
+
name: 'selected-options',
|
111
|
+
components: {
|
112
|
+
PageContainer,
|
113
|
+
BoxContainer,
|
114
|
+
SelectedContainer,
|
115
|
+
ListContainer,
|
116
|
+
ListItem,
|
117
|
+
Icon,
|
118
|
+
IconContainer
|
119
|
+
},
|
120
|
+
props: {
|
121
|
+
optionsList: {
|
122
|
+
required: true
|
123
|
+
},
|
124
|
+
numberSelected: {
|
125
|
+
required: true,
|
126
|
+
default: 0
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
</script>
|