@eturnity/eturnity_reusable_components 7.12.2-EPDM-9012.2 → 7.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.12.2-EPDM-9012.2",
3
+ "version": "7.12.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -9,7 +9,9 @@
9
9
  <script>
10
10
  // import ErrorMessage from "@eturnity/eturnity_reusable_components/src/components/errorMessage"
11
11
  //To use:
12
- // <error-message />
12
+ // <error-message
13
+ // alignText="right" // default is left
14
+ // />
13
15
 
14
16
  import styled from 'vue-styled-components'
15
17
 
@@ -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
@@ -109,6 +112,10 @@ export default {
109
112
  text: {
110
113
  required: false
111
114
  },
115
+ borderColor: {
116
+ required: false,
117
+ default: null
118
+ },
112
119
  size: {
113
120
  required: false,
114
121
  default: '14px'
@@ -150,7 +157,11 @@ export default {
150
157
  },
151
158
  computed: {
152
159
  iconColor() {
153
- return theme.colors.mediumGray
160
+ return this.isActive
161
+ ? this.borderColor
162
+ ? this.borderColor
163
+ : theme.colors.secondary
164
+ : theme.colors.mediumGray
154
165
  },
155
166
  halfComputedTextInfoWidth() {
156
167
  return parseInt(this.width) / 2
@@ -16,10 +16,12 @@
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"
23
25
  :alignArrow="labelInfoAlign"
24
26
  />
25
27
  </label-wrapper>
@@ -17,6 +17,7 @@
17
17
  <info-text
18
18
  v-if="infoTextMessage"
19
19
  :text="infoTextMessage"
20
+ borderColor="#ccc"
20
21
  :size="fontSize ? fontSize : '16px'"
21
22
  :alignArrow="infoTextAlign"
22
23
  />
@@ -22,7 +22,9 @@
22
22
  <info-text
23
23
  v-if="infoTextMessage"
24
24
  :text="infoTextMessage"
25
+ borderColor="#ccc"
25
26
  :size="infoTextSize"
27
+ :alignText="infoTextAlign"
26
28
  />
27
29
  </label-wrapper>
28
30
  <select-button-wrapper :disabled="disabled">
@@ -325,6 +327,9 @@ export default {
325
327
  infoTextMessage: {
326
328
  required: false
327
329
  },
330
+ infoTextAlign: {
331
+ required: false
332
+ },
328
333
  selectWidth: {
329
334
  type: String,
330
335
  required: false,
@@ -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: ''
@@ -13,6 +13,7 @@
13
13
  <info-text
14
14
  v-if="infoTextMessage"
15
15
  :text="infoTextMessage"
16
+ borderColor="#ccc"
16
17
  :size="fontSize ? fontSize : '16px'"
17
18
  :alignArrow="infoTextAlign"
18
19
  />
@@ -13,6 +13,8 @@
13
13
  <info-text
14
14
  v-if="tab['labelInfoText']"
15
15
  :text="tab['labelInfoText']"
16
+ borderColor="#ccc"
17
+ size="14px"
16
18
  :alignArrow="tab['labelInfoAlign']"
17
19
  />
18
20
  </Option>
@@ -55,7 +57,7 @@ const Option = styled('div',TabAttr)`
55
57
  justify-content: center;
56
58
  flex-direction: row;
57
59
  gap: 10px;
58
- color: ${props=>props.textColor ?
60
+ color: ${props=>props.textColor ?
59
61
  props.theme.colors[props.textColor] ? props.theme.colors[props.textColor] : props.textColor :
60
62
  props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
61
63
  `
@@ -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,14 +1,14 @@
1
1
  <template>
2
- <title-wrap :hasInfoText="!!infoText">
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
- v-if="!!infoText"
8
- :text="infoText"
9
- :alignArrow="infoAlign"
10
- />
11
- </title-wrap>
5
+ v-if="infoText"
6
+ :text="infoText"
7
+ borderColor="#ccc"
8
+ size="14px"
9
+ :alignArrow="infoAlign"
10
+ />
11
+ </flex>
12
12
  </template>
13
13
 
14
14
  <script>
@@ -19,32 +19,28 @@
19
19
  // color="red"
20
20
  // />
21
21
  import styled from "vue-styled-components"
22
- import InfoText from "../infoText"
23
-
24
- const wrapAttrs = { hasInfoText: Boolean }
25
- const TitleWrap = styled("div", wrapAttrs)`
26
- display: grid;
27
- align-items: center;
28
- grid-gap: 12px;
29
- grid-template-columns: ${(props) =>
30
- props.hasInfoText ? "auto auto 1fr" : "1fr"};
31
- margin-bottom: 20px;
32
- `
33
-
34
- const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
35
- 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)`
36
25
  color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
37
26
  font-weight: bold;
38
27
  font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
39
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;
40
36
  `
41
37
 
42
38
  export default {
43
39
  name: "page-title",
44
40
  components: {
45
41
  TitleText,
46
- TitleWrap,
47
- InfoText
42
+ InfoText,
43
+ flex
48
44
  },
49
45
  props: {
50
46
  text: {
@@ -63,11 +59,10 @@ export default {
63
59
  },
64
60
  infoText: {
65
61
  required: false,
66
- default: null,
67
62
  },
68
63
  infoAlign: {
69
64
  required: false,
70
- }
65
+ },
71
66
  },
72
67
  }
73
68
  </script>