@eturnity/eturnity_reusable_components 1.0.17 → 1.0.21

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.0.17",
3
+ "version": "1.0.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -1,7 +1,24 @@
1
1
  <template>
2
2
  <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
3
  <page-container>
4
- <page-subtitle text="My Page Title" />
4
+ <main-table>
5
+ <thead>
6
+ <tr>
7
+ <th>Column 1</th>
8
+ <th>Column 2</th>
9
+ <th>Column 3</th>
10
+ <th>Column 4</th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <tr>
15
+ <td class="text">Body 1</td>
16
+ <td class="text">Body 2</td>
17
+ <td class="text">Body 3</td>
18
+ <td class="text">Body 4</td>
19
+ </tr>
20
+ </tbody>
21
+ </main-table>
5
22
  </page-container>
6
23
  </ThemeProvider>
7
24
  </template>
@@ -10,7 +27,7 @@
10
27
  import { ThemeProvider } from "vue-styled-components"
11
28
  import theme from "./assets/theme"
12
29
  import styled from "vue-styled-components"
13
- import PageSubtitle from "@/components/pageSubtitle"
30
+ import MainTable from "@/components/tables/mainTable"
14
31
 
15
32
  const PageContainer = styled.div`
16
33
  padding: 40px;
@@ -21,7 +38,7 @@ export default {
21
38
  components: {
22
39
  ThemeProvider,
23
40
  PageContainer,
24
- PageSubtitle,
41
+ MainTable,
25
42
  },
26
43
  data() {
27
44
  return {
@@ -0,0 +1,8 @@
1
+ <svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4 2C4 3.10457 3.10457 4 2 4C0.89543 4 0 3.10457 0 2C0 0.89543 0.89543 0 2 0C3.10457 0 4 0.89543 4 2Z" fill="#B2B9C5"/>
3
+ <path d="M10 2C10 3.10457 9.10457 4 8 4C6.89543 4 6 3.10457 6 2C6 0.89543 6.89543 0 8 0C9.10457 0 10 0.89543 10 2Z" fill="#B2B9C5"/>
4
+ <path d="M4 8C4 9.10457 3.10457 10 2 10C0.89543 10 0 9.10457 0 8C0 6.89543 0.89543 6 2 6C3.10457 6 4 6.89543 4 8Z" fill="#B2B9C5"/>
5
+ <path d="M10 8C10 9.10457 9.10457 10 8 10C6.89543 10 6 9.10457 6 8C6 6.89543 6.89543 6 8 6C9.10457 6 10 6.89543 10 8Z" fill="#B2B9C5"/>
6
+ <path d="M4 14C4 15.1046 3.10457 16 2 16C0.89543 16 0 15.1046 0 14C0 12.8954 0.89543 12 2 12C3.10457 12 4 12.8954 4 14Z" fill="#B2B9C5"/>
7
+ <path d="M10 14C10 15.1046 9.10457 16 8 16C6.89543 16 6 15.1046 6 14C6 12.8954 6.89543 12 8 12C9.10457 12 10 12.8954 10 14Z" fill="#B2B9C5"/>
8
+ </svg>
@@ -1,6 +1,10 @@
1
1
  <template>
2
2
  <component-wrapper>
3
- <container :checkColor="checkColor"
3
+ <container
4
+ :checkColor="checkColor"
5
+ :size="size"
6
+ :hasLabel="!!label.length"
7
+ :backgroundColor="backgroundColor"
4
8
  >{{ label }}
5
9
  <input-checkbox
6
10
  type="checkbox"
@@ -20,6 +24,8 @@
20
24
  // :isChecked="isChecked" //required
21
25
  // @on-event-handler="onInputChange($event)" //required
22
26
  // checkColor="blue"
27
+ // size="small"
28
+ // backgroundColor="red"
23
29
  // />
24
30
  import styled from "vue-styled-components"
25
31
 
@@ -27,10 +33,15 @@ const ComponentWrapper = styled.div`
27
33
  display: inline-block;
28
34
  `
29
35
 
30
- const containerAttrs = { checkColor: String }
36
+ const containerAttrs = {
37
+ checkColor: String,
38
+ size: String,
39
+ hasLabel: Boolean,
40
+ backgroundColor: String,
41
+ }
31
42
  const Container = styled("label", containerAttrs)`
32
43
  display: grid;
33
- height: 28px;
44
+ height: ${(props) => (props.hasLabel ? "28px" : "auto")};
34
45
  align-content: center;
35
46
  color: ${(props) => props.theme.colors.black};
36
47
  position: relative;
@@ -44,9 +55,20 @@ const Container = styled("label", containerAttrs)`
44
55
  position: absolute;
45
56
  top: 0;
46
57
  left: 0;
47
- height: 25px;
48
- width: 25px;
49
- background-color: #fff;
58
+ height: ${(props) =>
59
+ props.size === "medium"
60
+ ? "25px"
61
+ : props.size === "small"
62
+ ? "16px"
63
+ : "25px"};
64
+ width: ${(props) =>
65
+ props.size === "medium"
66
+ ? "25px"
67
+ : props.size === "small"
68
+ ? "16px"
69
+ : "25px"};
70
+ background-color: ${(props) =>
71
+ props.backgroundColor ? props.backgroundColor : props.theme.colors.green};
50
72
  border-radius: 4px;
51
73
  border: 1px solid ${(props) => props.theme.colors.mediumGray};
52
74
 
@@ -58,14 +80,27 @@ const Container = styled("label", containerAttrs)`
58
80
  }
59
81
 
60
82
  .checkmark:after {
61
- left: 9px;
62
- top: 5px;
63
- width: 5px;
64
- height: 10px;
83
+ left: ${(props) =>
84
+ props.size === "medium" ? "9px" : props.size === "small" ? "5px" : "9px"};
85
+ top: ${(props) =>
86
+ props.size === "medium" ? "5px" : props.size === "small" ? "2px" : "5px"};
87
+ width: ${(props) =>
88
+ props.size === "medium" ? "5px" : props.size === "small" ? "3px" : "5px"};
89
+ height: ${(props) =>
90
+ props.size === "medium"
91
+ ? "10px"
92
+ : props.size === "small"
93
+ ? "6px"
94
+ : "10px"};
65
95
  border: solid
66
96
  ${(props) =>
67
- props.checkColor ? props.checkColor : props.theme.colors.black};
68
- border-width: 0 3px 3px 0;
97
+ props.checkColor ? props.checkColor : props.theme.colors.white};
98
+ border-width: ${(props) =>
99
+ props.size === "medium"
100
+ ? "0 3px 3px 0"
101
+ : props.size === "small"
102
+ ? "0 2px 2px 0"
103
+ : "0 3px 3px 0"};
69
104
  transform: rotate(45deg);
70
105
  }
71
106
  `
@@ -102,6 +137,13 @@ export default {
102
137
  checkColor: {
103
138
  required: false,
104
139
  },
140
+ size: {
141
+ required: false,
142
+ default: "medium", // small, medium
143
+ },
144
+ backgroundColor: {
145
+ required: false,
146
+ },
105
147
  },
106
148
  methods: {
107
149
  onChangeHandler(value) {
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <spinner-container v-if="fullWidth">
3
3
  <container>
4
- <spinner-wrapper :src="require('../../assets/icons/black-spinner.svg')" />
4
+ <spinner-wrapper :src="require('../../assets/icons/black_spinner.svg')" />
5
5
  </container>
6
6
  </spinner-container>
7
7
  <container v-else>
8
- <spinner-wrapper :src="require('../../assets/icons/black-spinner.svg')" />
8
+ <spinner-wrapper :src="require('../../assets/icons/black_spinner.svg')" />
9
9
  </container>
10
10
  </template>
11
11
 
@@ -65,12 +65,23 @@ const TableContainer = styled.table`
65
65
  th {
66
66
  padding: 12px 20px;
67
67
  background-color: ${(props) => props.theme.colors.blue1};
68
+
69
+ .ordering {
70
+ display: grid;
71
+ grid-template-columns: 1fr auto;
72
+ grid-gap: 6px;
73
+ }
68
74
  }
69
75
 
70
76
  td {
71
77
  padding: 7px 10px;
72
78
  border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
73
79
 
80
+ &.empty {
81
+ height: 100px;
82
+ text-align: center;
83
+ }
84
+
74
85
  &.no-border {
75
86
  border-bottom: none;
76
87
  }
@@ -193,7 +204,7 @@ const TableContainer = styled.table`
193
204
  cursor: grab;
194
205
  background-position: center;
195
206
  background-image: ${() =>
196
- `url(${require("@/assets/images/drag_icon.svg")})`};
207
+ `url(${require("../../../assets/icons/drag_icon.svg")})`};
197
208
 
198
209
  &:active {
199
210
  cursor: grabbing;
@@ -206,7 +217,7 @@ const TableContainer = styled.table`
206
217
  background: no-repeat;
207
218
  margin-left: 10px;
208
219
  background-image: ${() =>
209
- `url(${require("@/assets/images/subposition_icon.svg")})`};
220
+ `url(${require("../../../assets/icons/subposition_icon.svg")})`};
210
221
  }
211
222
 
212
223
  .arrow-down {
@@ -215,7 +226,7 @@ const TableContainer = styled.table`
215
226
  background: no-repeat;
216
227
  background-position: center;
217
228
  background-image: ${() =>
218
- `url(${require("@/assets/images/arrow_down.svg")})`};
229
+ `url(${require("../../../assets/icons/arrow_down.svg")})`};
219
230
  }
220
231
 
221
232
  .arrow-up {
@@ -224,7 +235,7 @@ const TableContainer = styled.table`
224
235
  background: no-repeat;
225
236
  background-position: center;
226
237
  background-image: ${() =>
227
- `url(${require("@/assets/images/arrow_up_red.svg")})`};
238
+ `url(${require("../../../assets/icons/arrow_up_red.svg")})`};
228
239
  }
229
240
  }
230
241