@eturnity/eturnity_reusable_components 1.1.39 → 1.1.42

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": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -44,6 +44,8 @@
44
44
  :value="inputValue"
45
45
  @input-change="onInputChange($event)"
46
46
  />
47
+ <br />
48
+ <page-subtitle text="My Subtitle" infoText="My info Text" />
47
49
  </page-container>
48
50
  </ThemeProvider>
49
51
  </template>
@@ -56,6 +58,7 @@ import MainTable from "@/components/tables/mainTable"
56
58
  import ThreeDots from "@/components/threeDots"
57
59
  import Toggle from "@/components/inputs/toggle"
58
60
  import InputNumber from "@/components/inputs/inputNumber"
61
+ import PageSubtitle from "@/components/pageSubtitle"
59
62
  // import TableDropdown from "@/components/tableDropdown"
60
63
 
61
64
  const PageContainer = styled.div`
@@ -71,6 +74,7 @@ export default {
71
74
  ThreeDots,
72
75
  Toggle,
73
76
  InputNumber,
77
+ PageSubtitle,
74
78
  // TableDropdown,
75
79
  },
76
80
  data() {
@@ -38,7 +38,7 @@
38
38
  <script>
39
39
  // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
40
40
  //To use:
41
- // <info-component
41
+ // <info-text
42
42
  // text="Veritatis et quasi architecto beatae vitae"
43
43
  // borderColor="#ccc"
44
44
  // size="20"
@@ -1,16 +1,13 @@
1
1
  <template>
2
2
  <container>
3
- <input-wrapper
4
- :alignItems="alignItems"
5
- :hasLabel="!!label && label.length > 0"
6
- >
7
- <label-wrapper v-if="label">
8
- <input-label>{{ label }}</input-label>
3
+ <input-wrapper :hasLabel="!!label && label.length > 0">
4
+ <label-wrapper :alignItems="alignItems" v-if="label">
5
+ <input-label :fontSize="fontSize">{{ label }}</input-label>
9
6
  <info-text
10
7
  v-if="infoTextMessage"
11
8
  :text="infoTextMessage"
12
9
  borderColor="#ccc"
13
- size="16"
10
+ :size="fontSize ? fontSize : '16'"
14
11
  :alignText="infoTextAlign"
15
12
  />
16
13
  </label-wrapper>
@@ -24,6 +21,7 @@
24
21
  :noBorder="noBorder"
25
22
  :disabled="disabled"
26
23
  :isDisabled="disabled"
24
+ :fontSize="fontSize"
27
25
  />
28
26
  </input-wrapper>
29
27
  <error-message v-if="isError">{{ errorMessage }}</error-message>
@@ -39,8 +37,10 @@ const Container = styled.div`
39
37
  position: relative;
40
38
  `
41
39
 
42
- const InputLabel = styled.div`
40
+ const labelAttrs = { fontSize: String }
41
+ const InputLabel = styled("div", labelAttrs)`
43
42
  font-weight: bold;
43
+ font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
44
44
  `
45
45
 
46
46
  const LabelWrapper = styled.div`
@@ -48,7 +48,6 @@ const LabelWrapper = styled.div`
48
48
  grid-template-columns: auto 1fr;
49
49
  grid-gap: 12px;
50
50
  align-items: center;
51
- margin-bottom: 12px;
52
51
  `
53
52
 
54
53
  const inputProps = {
@@ -57,6 +56,7 @@ const inputProps = {
57
56
  minWidth: String,
58
57
  noBorder: Boolean,
59
58
  isDisabled: Boolean,
59
+ fontSize: String,
60
60
  }
61
61
  const InputContainer = styled("input", inputProps)`
62
62
  border: ${(props) =>
@@ -70,7 +70,7 @@ const InputContainer = styled("input", inputProps)`
70
70
  padding: ${(props) =>
71
71
  props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
72
72
  border-radius: 4px;
73
- font-size: 16px;
73
+ font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
74
74
  color: ${(props) =>
75
75
  props.isError ? props.theme.colors.red : props.theme.colors.black};
76
76
  width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
@@ -123,6 +123,7 @@ export default {
123
123
  // alignItems="horizontal" // horizontal, vertical
124
124
  // inputWidth="250px"
125
125
  // minWidth="100px"
126
+ // fontSize="13px"
126
127
  // />
127
128
  name: "input-text",
128
129
  components: {
@@ -180,6 +181,10 @@ export default {
180
181
  required: false,
181
182
  default: false,
182
183
  },
184
+ fontSize: {
185
+ required: false,
186
+ default: null,
187
+ },
183
188
  },
184
189
  methods: {
185
190
  onChangeHandler($event) {
@@ -1,5 +1,15 @@
1
1
  <template>
2
- <subtitle-text :color="color">{{ text }}</subtitle-text>
2
+ <subtitle-text :color="color" :hasInfoText="!!infoText">
3
+ <span>
4
+ {{ text }}
5
+ </span>
6
+ <info-text
7
+ :text="infoText"
8
+ v-if="!!infoText"
9
+ size="14"
10
+ borderColor="#ccc"
11
+ />
12
+ </subtitle-text>
3
13
  </template>
4
14
 
5
15
  <script>
@@ -8,21 +18,30 @@
8
18
  // <page-subtitle
9
19
  // text="My Page Subitle"
10
20
  // color="red"
21
+ // infoText="My info text"
11
22
  // />
12
23
  import styled from "vue-styled-components"
24
+ import InfoText from "../infoText"
13
25
 
14
- const textAttrs = { color: String }
26
+ const textAttrs = { color: String, hasInfoText: Boolean }
15
27
  const SubtitleText = styled("div", textAttrs)`
28
+ display: grid;
29
+ align-items: center;
30
+ grid-gap: 12px;
31
+ grid-template-columns: ${(props) =>
32
+ props.hasInfoText ? "auto auto 1fr" : "1fr"};
16
33
  color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
17
34
  font-size: 13px;
18
35
  margin-bottom: 30px;
19
36
  line-height: 1.5;
37
+ position: relative;
20
38
  `
21
39
 
22
40
  export default {
23
41
  name: "page-subtitle",
24
42
  components: {
25
43
  SubtitleText,
44
+ InfoText,
26
45
  },
27
46
  props: {
28
47
  text: {
@@ -31,6 +50,10 @@ export default {
31
50
  color: {
32
51
  required: false,
33
52
  },
53
+ infoText: {
54
+ required: false,
55
+ default: null,
56
+ },
34
57
  },
35
58
  }
36
59
  </script>