@eturnity/eturnity_reusable_components 1.0.56 → 1.0.60

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.56",
3
+ "version": "1.0.60",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -24,7 +24,12 @@
24
24
  </main-table>
25
25
  <br />
26
26
  <br />
27
- <search-input :value="inputValue" @on-change="onInputChange" :disabled="false" placeholder="Search..." />
27
+ <toggle
28
+ @on-toggle-change="onInputChange($event)"
29
+ :isChecked="inputValue"
30
+ label="My Label Text"
31
+ labelAlign="right"
32
+ />
28
33
  </page-container>
29
34
  </ThemeProvider>
30
35
  </template>
@@ -35,7 +40,7 @@ import theme from "./assets/theme"
35
40
  import styled from "vue-styled-components"
36
41
  import MainTable from "@/components/tables/mainTable"
37
42
  import ThreeDots from "@/components/threeDots"
38
- import SearchInput from "@/components/inputs/searchInput"
43
+ import Toggle from "@/components/inputs/toggle"
39
44
 
40
45
  const PageContainer = styled.div`
41
46
  padding: 40px;
@@ -48,11 +53,11 @@ export default {
48
53
  PageContainer,
49
54
  MainTable,
50
55
  ThreeDots,
51
- SearchInput,
56
+ Toggle,
52
57
  },
53
58
  data() {
54
59
  return {
55
- inputValue: "",
60
+ inputValue: true,
56
61
  checkedOption: "button_1",
57
62
  question: {
58
63
  number_format_precision: 4,
@@ -49,7 +49,7 @@ const Container = styled("label", containerAttrs)`
49
49
  align-content: center;
50
50
  color: ${(props) => props.theme.colors.black};
51
51
  position: relative;
52
- padding-left: 42px;
52
+ /* padding-left: 42px; */
53
53
  margin-bottom: 12px;
54
54
  cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
55
55
  font-size: 16px;
@@ -13,7 +13,10 @@
13
13
  @keydown.space.prevent="onToggleChange"
14
14
  :disabled="disabled"
15
15
  >
16
- <toggle-background :backgroundColor="backgroundColor" />
16
+ <toggle-background
17
+ :backgroundColor="backgroundColor"
18
+ :isChecked="isChecked"
19
+ />
17
20
  <toggle-dot
18
21
  :isChecked="isChecked"
19
22
  :toggleColor="toggleColor"
@@ -43,6 +46,7 @@
43
46
  // backgroundColor="blue"
44
47
  // labelAlign="right"
45
48
  // fontColor="black"
49
+ // :disabled="true"
46
50
  // />
47
51
 
48
52
  import styled from "vue-styled-components"
@@ -72,7 +76,7 @@ const LabelText = styled("div", toggleAttrs)`
72
76
  props.size === "medium"
73
77
  ? "16px"
74
78
  : props.size === "small"
75
- ? "12px"
79
+ ? "13px"
76
80
  : "16px"};
77
81
  `
78
82
 
@@ -104,16 +108,18 @@ const ToggleWrapper = styled("span", toggleAttrs)`
104
108
  }
105
109
  `
106
110
 
107
- const backroundAttrs = { backgroundColor: String }
108
- const ToggleBackground = styled("span", backroundAttrs)`
111
+ const backgroundAttrs = { backgroundColor: String, isChecked: Boolean }
112
+ const ToggleBackground = styled("span", backgroundAttrs)`
109
113
  display: inline-block;
110
114
  border-radius: 100px;
111
115
  height: 100%;
112
116
  width: 100%;
113
117
  background-color: ${(props) =>
114
- props.backgroundColor
118
+ props.isChecked
115
119
  ? props.backgroundColor
116
- : props.theme.colors.lightGray};
120
+ ? props.backgroundColor
121
+ : props.theme.colors.green
122
+ : props.theme.colors.grey3};
117
123
  transition: 0.4s ease;
118
124
  `
119
125
 
@@ -137,7 +143,7 @@ const ToggleDot = styled("span", toggleProps)`
137
143
  : props.size === "small"
138
144
  ? "10px"
139
145
  : "14px"};
140
- left: 5px
146
+ left: 4px
141
147
  bottom: ${(props) =>
142
148
  props.size === "medium" ? "5px" : props.size === "small" ? "3px" : "5px"};
143
149
  background-color: ${(props) =>
@@ -146,8 +152,8 @@ const ToggleDot = styled("span", toggleProps)`
146
152
  : props.isChecked
147
153
  ? props.toggleColor
148
154
  ? props.toggleColor
149
- : props.theme.colors.primary
150
- : props.theme.colors.mediumGray};
155
+ : props.theme.colors.white
156
+ : props.theme.colors.white};
151
157
  border-radius: 100%;
152
158
  transition: transform 0.4s ease;
153
159
  transform: ${(props) =>
@@ -195,7 +201,7 @@ export default {
195
201
  },
196
202
  size: {
197
203
  required: false,
198
- default: "medium",
204
+ default: "small",
199
205
  },
200
206
  labelAlign: {
201
207
  required: false,
@@ -85,7 +85,7 @@ const TableContainer = styled.table`
85
85
  }
86
86
 
87
87
  th {
88
- padding: 12px 20px;
88
+ padding: 11px 20px;
89
89
  background-color: ${(props) => props.theme.colors.blue1};
90
90
 
91
91
  .ordering {
@@ -152,6 +152,15 @@ const TableContainer = styled.table`
152
152
  text-align: right;
153
153
  }
154
154
  }
155
+
156
+ &.checkbox {
157
+ padding: 7px 20px !important;
158
+ width: 40px;
159
+ }
160
+
161
+ &.checkbox-header {
162
+ width: 40px;
163
+ }
155
164
  }
156
165
 
157
166
  tr {
@@ -146,6 +146,8 @@ const DotItem = styled.div`
146
146
 
147
147
  const DropdownContainer = styled.div`
148
148
  z-index: 99;
149
+ height: 200px;
150
+ margin-top: 50px;
149
151
  position: absolute;
150
152
  right: 20px;
151
153
  display: grid;