@eturnity/eturnity_reusable_components 7.2.2-EPDM-9012.0 → 7.2.2-EPDM-8006.1
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 +2 -2
- package/src/App.vue +71 -74
- package/src/assets/svgIcons/logout.svg +3 -0
- 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 +9 -1
- 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 +28 -29
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "7.2.2-EPDM-
|
3
|
+
"version": "7.2.2-EPDM-8006.1",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -63,4 +63,4 @@
|
|
63
63
|
"author": "Aaron Enser",
|
64
64
|
"license": "ISC",
|
65
65
|
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
66
|
-
}
|
66
|
+
}
|
package/src/App.vue
CHANGED
@@ -1,24 +1,23 @@
|
|
1
1
|
<template>
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
3
3
|
<page-container>
|
4
|
-
|
5
|
-
<br/>
|
4
|
+
<br />
|
6
5
|
<input-number
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
:value="value"
|
7
|
+
:minNumber="0"
|
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="value = $event"
|
18
|
+
@input-change="changeHandler"
|
19
|
+
@input-focus="focusHandler"
|
20
|
+
@input-blur="blurHandler"
|
22
21
|
>
|
23
22
|
<template v-slot:label>
|
24
23
|
<div>Interactive Label</div>
|
@@ -31,79 +30,77 @@
|
|
31
30
|
<div>
|
32
31
|
<a href="">test1</a>
|
33
32
|
<button href="">test2</button>
|
34
|
-
<br
|
33
|
+
<br />
|
35
34
|
<p>Text</p>
|
36
35
|
</div>
|
37
36
|
</template>
|
38
37
|
</dropdown-component>
|
39
38
|
|
40
39
|
<videoThumbnail
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
|
41
|
+
playIconColor="red"
|
42
|
+
playIconSize="20px"
|
43
|
+
width="400px"
|
44
|
+
height="600px"
|
46
45
|
/>
|
47
46
|
|
48
47
|
<SwitchField
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
48
|
+
@on-switch-change="onInputChange($event)"
|
49
|
+
:options="[
|
50
|
+
{ value: 0, content: 'zero' },
|
51
|
+
{ value: 1, content: 'one' },
|
52
|
+
{ value: 2, content: 'two' }
|
53
|
+
]"
|
54
|
+
:value="value"
|
55
|
+
label="label"
|
56
|
+
toggleColor="red"
|
57
|
+
size="large"
|
58
|
+
backgroundColor="blue"
|
59
|
+
labelAlign="left"
|
60
|
+
fontColor="black"
|
61
|
+
:disabled="false"
|
63
62
|
/>
|
64
63
|
<icon
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
64
|
+
name="opacity"
|
65
|
+
color="red"
|
66
|
+
hoveredColor="blue"
|
67
|
+
size="60px"
|
68
|
+
cursor="default"
|
69
|
+
isStriked="true"
|
71
70
|
/>
|
72
71
|
<Select
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
72
|
+
:value="value"
|
73
|
+
selectWidth="100%"
|
74
|
+
optionWidth="50%"
|
75
|
+
label="that is a label"
|
76
|
+
alignItems="vertical"
|
77
|
+
colorMode="dark"
|
78
|
+
isSearchable="true"
|
79
|
+
@input-change="value = $event"
|
80
|
+
@search-change="searchValue = $event"
|
82
81
|
>
|
83
82
|
<template #selector="{ selectedValue }">
|
84
83
|
value selected: {{ selectedValue }}
|
85
84
|
</template>
|
86
85
|
<template #dropdown>
|
87
86
|
<Option
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
</Option
|
93
|
-
>
|
87
|
+
v-for="opt in filteredOptionList"
|
88
|
+
:key="opt.id"
|
89
|
+
:value="opt.val"
|
90
|
+
>{{ opt.lookFor }}
|
91
|
+
</Option>
|
94
92
|
</template>
|
95
93
|
</Select>
|
96
94
|
|
97
|
-
|
98
95
|
{{ filteredOptionList }}
|
99
96
|
|
100
|
-
<iconCollection color="red"/>
|
97
|
+
<iconCollection color="red" />
|
101
98
|
</page-container>
|
102
99
|
</ThemeProvider>
|
103
100
|
</template>
|
104
101
|
|
105
102
|
<script>
|
106
|
-
import {ThemeProvider} from 'vue-styled-components'
|
103
|
+
import { ThemeProvider } from 'vue-styled-components'
|
107
104
|
import theme from './assets/theme'
|
108
105
|
import styled from 'vue-styled-components'
|
109
106
|
import InputNumber from '@/components/inputs/inputNumber'
|
@@ -114,7 +111,7 @@ import iconCollection from '@/components/icon/iconCollection'
|
|
114
111
|
import dropdownComponent from '@/components/dropdown'
|
115
112
|
import videoThumbnail from '@/components/videoThumbnail'
|
116
113
|
import icon from '@/components/icon'
|
117
|
-
import infoCard from '@/components/infoCard'
|
114
|
+
// import infoCard from '@/components/infoCard'
|
118
115
|
// import TableDropdown from "@/components/tableDropdown"
|
119
116
|
|
120
117
|
const PageContainer = styled.div`
|
@@ -139,8 +136,8 @@ export default {
|
|
139
136
|
iconCollection,
|
140
137
|
dropdownComponent,
|
141
138
|
videoThumbnail,
|
142
|
-
icon
|
143
|
-
infoCard
|
139
|
+
icon
|
140
|
+
// infoCard
|
144
141
|
},
|
145
142
|
data() {
|
146
143
|
return {
|
@@ -148,14 +145,14 @@ export default {
|
|
148
145
|
value2: 42,
|
149
146
|
companyName: 'toto',
|
150
147
|
optionList: [
|
151
|
-
{id: 'a', val: 'A', lookFor: 'babababa'},
|
152
|
-
{id: 'b', val: 'B', lookFor: 'abab'},
|
153
|
-
{id: 'c', val: 'C', lookFor: 'ccc'},
|
154
|
-
{id: 'd', val: 'D', lookFor: 'ddd'},
|
155
|
-
{id: 'e', val: 'E', lookFor: 'dddee'},
|
156
|
-
{id: 'f', val: 'F', lookFor: 'ddfff'},
|
157
|
-
{id: 'g', val: 'G', lookFor: 'dggg'},
|
158
|
-
{id: 'h', val: 'H', lookFor: 'dddhhh'}
|
148
|
+
{ id: 'a', val: 'A', lookFor: 'babababa' },
|
149
|
+
{ id: 'b', val: 'B', lookFor: 'abab' },
|
150
|
+
{ id: 'c', val: 'C', lookFor: 'ccc' },
|
151
|
+
{ id: 'd', val: 'D', lookFor: 'ddd' },
|
152
|
+
{ id: 'e', val: 'E', lookFor: 'dddee' },
|
153
|
+
{ id: 'f', val: 'F', lookFor: 'ddfff' },
|
154
|
+
{ id: 'g', val: 'G', lookFor: 'dggg' },
|
155
|
+
{ id: 'h', val: 'H', lookFor: 'dddhhh' }
|
159
156
|
],
|
160
157
|
searchValue: ''
|
161
158
|
}
|
@@ -163,7 +160,7 @@ export default {
|
|
163
160
|
computed: {
|
164
161
|
filteredOptionList() {
|
165
162
|
return this.optionList.filter((opt) =>
|
166
|
-
|
163
|
+
opt.lookFor.includes(this.searchValue)
|
167
164
|
)
|
168
165
|
}
|
169
166
|
},
|
@@ -226,7 +223,7 @@ export default {
|
|
226
223
|
]
|
227
224
|
return items
|
228
225
|
},
|
229
|
-
getComponentInfo({row, value}) {
|
226
|
+
getComponentInfo({ row, value }) {
|
230
227
|
let item
|
231
228
|
if (row.selectedValue && row.selectedValue[value]) {
|
232
229
|
item = row.selectedValue[value]
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M12.173 4.517L15.242 7.586L15.656 8L15.676 8L15.676 8.02L16.656 9L15.676 9.98L15.676 10L15.656 10L15.242 10.414L12.173 13.483L10.759 12.069L12.827 10L4.676 10L4.676 8L12.827 8L10.758 5.931L12.173 4.517ZM-6.99382e-07 2L-8.74228e-08 16L0 18L2 18L7 18L7 16L2 16L2 2L7 2L7 -3.0598e-07L2 -8.74228e-08L-7.86805e-07 0L-6.99382e-07 2Z" fill="#263238"/>
|
3
|
+
</svg>
|
@@ -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({})
|
@@ -16,10 +16,13 @@
|
|
16
16
|
<label-text :labelFontColor="labelFontColor" :data-id="labelDataId">
|
17
17
|
{{ labelText }}
|
18
18
|
</label-text>
|
19
|
-
|
19
|
+
|
20
20
|
<info-text
|
21
21
|
v-if="labelInfoText"
|
22
22
|
:text="labelInfoText"
|
23
|
+
borderColor="#ccc"
|
24
|
+
size="14px"
|
25
|
+
:alignArrow="labelInfoAlign"
|
23
26
|
/>
|
24
27
|
</label-wrapper>
|
25
28
|
<input-wrapper>
|
@@ -94,6 +97,7 @@
|
|
94
97
|
// fontSize="13px"
|
95
98
|
// labelText="Number of Modules"
|
96
99
|
// labelInfoText="Here is some information for you..."
|
100
|
+
// labelInfoAlign="left"
|
97
101
|
// :minNumber="0"
|
98
102
|
// fontColor="blue"
|
99
103
|
// />
|
@@ -402,6 +406,10 @@ export default {
|
|
402
406
|
required: false,
|
403
407
|
default: null
|
404
408
|
},
|
409
|
+
labelInfoAlign: {
|
410
|
+
required: false,
|
411
|
+
default: 'left'
|
412
|
+
},
|
405
413
|
defaultNumber: {
|
406
414
|
required: false,
|
407
415
|
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
|
+
:alignArrow="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">
|
@@ -313,6 +315,9 @@ export default {
|
|
313
315
|
infoTextMessage: {
|
314
316
|
required: false
|
315
317
|
},
|
318
|
+
infoTextAlign: {
|
319
|
+
required: false
|
320
|
+
},
|
316
321
|
selectWidth: {
|
317
322
|
required: false,
|
318
323
|
default: null
|
@@ -17,6 +17,9 @@
|
|
17
17
|
<info-text
|
18
18
|
v-if="infoTextMessage"
|
19
19
|
:text="infoTextMessage"
|
20
|
+
borderColor="#ccc"
|
21
|
+
size="14px"
|
22
|
+
:alignText="infoTextAlign"
|
20
23
|
/>
|
21
24
|
</label-container>
|
22
25
|
|
@@ -48,6 +51,9 @@
|
|
48
51
|
@click.native.stop
|
49
52
|
v-if="infoTextMessage"
|
50
53
|
:text="infoTextMessage"
|
54
|
+
borderColor="#ccc"
|
55
|
+
size="14px"
|
56
|
+
:alignText="infoTextAlign"
|
51
57
|
/>
|
52
58
|
</label-container>
|
53
59
|
</flex-wrapper>
|
@@ -201,6 +207,9 @@ export default {
|
|
201
207
|
infoTextMessage: {
|
202
208
|
required: false
|
203
209
|
},
|
210
|
+
infoTextAlign: {
|
211
|
+
required: false
|
212
|
+
},
|
204
213
|
colorMode: {
|
205
214
|
required: false,
|
206
215
|
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
|
},
|
@@ -14,6 +14,9 @@
|
|
14
14
|
<info-text
|
15
15
|
v-if="infoTextMessage"
|
16
16
|
:text="infoTextMessage"
|
17
|
+
borderColor="#ccc"
|
18
|
+
size="14px"
|
19
|
+
:alignText="infoTextAlign"
|
17
20
|
/>
|
18
21
|
</label-container>
|
19
22
|
<toggle-wrapper
|
@@ -47,6 +50,9 @@
|
|
47
50
|
@click.native.stop
|
48
51
|
v-if="infoTextMessage"
|
49
52
|
:text="infoTextMessage"
|
53
|
+
borderColor="#ccc"
|
54
|
+
size="14px"
|
55
|
+
:alignText="infoTextAlign"
|
50
56
|
/>
|
51
57
|
</label-container>
|
52
58
|
</flex-wrapper>
|
@@ -66,6 +72,7 @@
|
|
66
72
|
// labelAlign="right"
|
67
73
|
// fontColor="black"
|
68
74
|
// :disabled="true"
|
75
|
+
// infoTextAlign="right" // left by default
|
69
76
|
// infoTextMessage="My info message"
|
70
77
|
// data-id="test_data_id"
|
71
78
|
// />
|
@@ -186,7 +193,7 @@ const ToggleDot = styled('span', toggleProps)`
|
|
186
193
|
: props.size === 'small'
|
187
194
|
? '10px'
|
188
195
|
: '14px'};
|
189
|
-
left: 3px
|
196
|
+
left: 3px
|
190
197
|
bottom: ${(props) =>
|
191
198
|
props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
|
192
199
|
background-color: ${(props) =>
|
@@ -271,6 +278,9 @@ export default {
|
|
271
278
|
infoTextMessage: {
|
272
279
|
required: false
|
273
280
|
},
|
281
|
+
infoTextAlign: {
|
282
|
+
required: false
|
283
|
+
},
|
274
284
|
dataId: {
|
275
285
|
type: String,
|
276
286
|
default: ''
|
@@ -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,14 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
4
|
-
{{ text }}
|
5
|
-
</title-text>
|
2
|
+
<flex>
|
3
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ text }}</title-text>
|
6
4
|
<info-text
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
v-if="infoText"
|
6
|
+
:text="infoText"
|
7
|
+
borderColor="#ccc"
|
8
|
+
size="14px"
|
9
|
+
:alignArrow="infoAlign"
|
10
|
+
/>
|
11
|
+
</flex>
|
11
12
|
</template>
|
12
13
|
|
13
14
|
<script>
|
@@ -18,41 +19,33 @@
|
|
18
19
|
// color="red"
|
19
20
|
// />
|
20
21
|
import styled from "vue-styled-components"
|
21
|
-
import InfoText from
|
22
|
-
|
23
|
-
const
|
24
|
-
const TitleWrap = styled("div", wrapAttrs)`
|
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)`
|
22
|
+
import InfoText from '../infoText'
|
23
|
+
const textAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
24
|
+
const TitleText = styled("div", textAttrs)`
|
35
25
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
36
26
|
font-weight: bold;
|
37
27
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
38
28
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
29
|
+
|
30
|
+
`
|
31
|
+
const flex = styled("div", textAttrs)`
|
32
|
+
display: flex;
|
33
|
+
gap:10px;
|
34
|
+
margin-bottom: 20px;
|
35
|
+
align-items: center;
|
39
36
|
`
|
40
37
|
|
41
38
|
export default {
|
42
39
|
name: "page-title",
|
43
40
|
components: {
|
44
41
|
TitleText,
|
45
|
-
|
46
|
-
|
42
|
+
InfoText,
|
43
|
+
flex
|
47
44
|
},
|
48
45
|
props: {
|
49
46
|
text: {
|
50
47
|
required: true,
|
51
48
|
},
|
52
|
-
infoText: {
|
53
|
-
required: false,
|
54
|
-
default: null,
|
55
|
-
},
|
56
49
|
color: {
|
57
50
|
required: false,
|
58
51
|
},
|
@@ -63,7 +56,13 @@ export default {
|
|
63
56
|
uppercase: {
|
64
57
|
required: false,
|
65
58
|
default: true
|
66
|
-
}
|
59
|
+
},
|
60
|
+
infoText: {
|
61
|
+
required: false,
|
62
|
+
},
|
63
|
+
infoAlign: {
|
64
|
+
required: false,
|
65
|
+
},
|
67
66
|
},
|
68
67
|
}
|
69
68
|
</script>
|