@eturnity/eturnity_reusable_components 1.0.75 → 1.0.79
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
package/src/App.vue
CHANGED
|
@@ -13,8 +13,21 @@
|
|
|
13
13
|
<tbody>
|
|
14
14
|
<tr>
|
|
15
15
|
<td class="text">Body 2</td>
|
|
16
|
-
<td
|
|
17
|
-
|
|
16
|
+
<td>
|
|
17
|
+
<toggle
|
|
18
|
+
@on-toggle-change="onInputChange($event)"
|
|
19
|
+
:isChecked="isChecked"
|
|
20
|
+
labelAlign="right"
|
|
21
|
+
/>
|
|
22
|
+
</td>
|
|
23
|
+
<td>
|
|
24
|
+
<toggle
|
|
25
|
+
@on-toggle-change="onInputChange($event)"
|
|
26
|
+
:isChecked="isChecked"
|
|
27
|
+
labelAlign="right"
|
|
28
|
+
:disabled="true"
|
|
29
|
+
/>
|
|
30
|
+
</td>
|
|
18
31
|
<div class="icons-container">
|
|
19
32
|
<three-dots :options="listOptions" :isLoading="false" />
|
|
20
33
|
</div>
|
|
@@ -28,6 +41,7 @@
|
|
|
28
41
|
:isChecked="isChecked"
|
|
29
42
|
label="My Label Text"
|
|
30
43
|
labelAlign="right"
|
|
44
|
+
:disabled="true"
|
|
31
45
|
/>
|
|
32
46
|
</page-container>
|
|
33
47
|
</ThemeProvider>
|
|
@@ -64,7 +78,7 @@ export default {
|
|
|
64
78
|
number_max_allowed: 10,
|
|
65
79
|
unit_short_name: "cm",
|
|
66
80
|
},
|
|
67
|
-
isChecked:
|
|
81
|
+
isChecked: false,
|
|
68
82
|
listOptions: [
|
|
69
83
|
{
|
|
70
84
|
name: "Option 1",
|
|
@@ -104,9 +104,7 @@ const InputContainer = styled("input", inputProps)`
|
|
|
104
104
|
props.isError ? props.theme.colors.red : props.theme.colors.black};
|
|
105
105
|
width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
|
|
106
106
|
background-color: ${(props) =>
|
|
107
|
-
props.isDisabled
|
|
108
|
-
? props.theme.colors.grey5 + " !important"
|
|
109
|
-
: "#fff !important"};
|
|
107
|
+
props.isDisabled ? props.theme.colors.grey5 : "#fff"};
|
|
110
108
|
box-sizing: border-box;
|
|
111
109
|
|
|
112
110
|
&::placeholder {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
tabindex="0"
|
|
12
12
|
@keydown.space.prevent="onToggleChange"
|
|
13
13
|
:disabled="disabled"
|
|
14
|
+
:backgroundColor="backgroundColor"
|
|
15
|
+
:isChecked="isChecked"
|
|
14
16
|
>
|
|
15
17
|
<toggle-background
|
|
16
18
|
:backgroundColor="backgroundColor"
|
|
@@ -69,7 +71,13 @@ const FlexWrapper = styled("div", flexAttrs)`
|
|
|
69
71
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
70
72
|
`
|
|
71
73
|
|
|
72
|
-
const toggleAttrs = {
|
|
74
|
+
const toggleAttrs = {
|
|
75
|
+
size: String,
|
|
76
|
+
fontColor: String,
|
|
77
|
+
disabled: Boolean,
|
|
78
|
+
backgroundColor: String,
|
|
79
|
+
isChecked: Boolean,
|
|
80
|
+
}
|
|
73
81
|
const LabelText = styled("div", toggleAttrs)`
|
|
74
82
|
color: ${(props) =>
|
|
75
83
|
props.fontColor ? props.fontColor : props.theme.colors.darkGray};
|
|
@@ -84,7 +92,13 @@ const LabelText = styled("div", toggleAttrs)`
|
|
|
84
92
|
const ToggleWrapper = styled("span", toggleAttrs)`
|
|
85
93
|
display: inline-block;
|
|
86
94
|
border: ${(props) =>
|
|
87
|
-
props.disabled
|
|
95
|
+
props.disabled
|
|
96
|
+
? "1px solid " + props.theme.colors.disabled
|
|
97
|
+
: props.isChecked
|
|
98
|
+
? props.backgroundColor
|
|
99
|
+
? "1px solid " + props.backgroundColor
|
|
100
|
+
: "1px solid " + props.theme.colors.green
|
|
101
|
+
: "1px solid " + props.theme.colors.grey3}
|
|
88
102
|
position: relative;
|
|
89
103
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
90
104
|
width: ${(props) =>
|
|
@@ -117,7 +131,8 @@ const backgroundAttrs = {
|
|
|
117
131
|
disabled: Boolean,
|
|
118
132
|
}
|
|
119
133
|
const ToggleBackground = styled("span", backgroundAttrs)`
|
|
120
|
-
display: inline-block;
|
|
134
|
+
/* display: inline-block; */
|
|
135
|
+
display: block;
|
|
121
136
|
border-radius: 100px;
|
|
122
137
|
height: 100%;
|
|
123
138
|
width: 100%;
|
|
@@ -154,7 +169,7 @@ const ToggleDot = styled("span", toggleProps)`
|
|
|
154
169
|
: "14px"};
|
|
155
170
|
left: 3px
|
|
156
171
|
bottom: ${(props) =>
|
|
157
|
-
props.size === "medium" ? "5px" : props.size === "small" ? "
|
|
172
|
+
props.size === "medium" ? "5px" : props.size === "small" ? "2px" : "5px"};
|
|
158
173
|
background-color: ${(props) =>
|
|
159
174
|
props.disabled
|
|
160
175
|
? props.theme.colors.disabled
|
|
@@ -170,7 +185,7 @@ const ToggleDot = styled("span", toggleProps)`
|
|
|
170
185
|
? props.size === "medium"
|
|
171
186
|
? "translateX(25px)"
|
|
172
187
|
: props.size === "small"
|
|
173
|
-
? "translateX(
|
|
188
|
+
? "translateX(12px)"
|
|
174
189
|
: "translateX(25px)"
|
|
175
190
|
: "translateX(0)"};
|
|
176
191
|
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dropdown-row
|
|
2
|
+
<dropdown-row
|
|
3
|
+
:colspan="colSpan"
|
|
4
|
+
@click="toggleOpen"
|
|
5
|
+
ref="dropdownItem"
|
|
6
|
+
class="table-dropdown"
|
|
7
|
+
>
|
|
3
8
|
<component-container :colSpan="colSpan">
|
|
4
9
|
<component-item v-for="(item, index) in tableItems" :key="index">
|
|
5
10
|
<template-button
|
|
@@ -122,7 +127,7 @@ import SearchInput from "@eturnity/eturnity_reusable_components/src/components/i
|
|
|
122
127
|
const DropdownRow = styled.td``
|
|
123
128
|
|
|
124
129
|
const ComponentItem = styled.div`
|
|
125
|
-
padding-left: 12px;
|
|
130
|
+
/* padding-left: 12px; */
|
|
126
131
|
overflow: hidden;
|
|
127
132
|
text-overflow: ellipsis;
|
|
128
133
|
`
|
|
@@ -78,8 +78,16 @@ const TableContainer = styled.table`
|
|
|
78
78
|
tbody {
|
|
79
79
|
tr {
|
|
80
80
|
&:hover {
|
|
81
|
-
background-color: ${(props) => props.theme.colors.
|
|
81
|
+
background-color: ${(props) => props.theme.colors.white};
|
|
82
82
|
cursor: pointer;
|
|
83
|
+
|
|
84
|
+
.table-dropdown {
|
|
85
|
+
background-color: ${(props) => props.theme.color.grey5} !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
input {
|
|
89
|
+
background-color: ${(props) => props.theme.color.grey5} !important;
|
|
90
|
+
}
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
td {
|
|
@@ -101,7 +109,7 @@ const TableContainer = styled.table`
|
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
td {
|
|
104
|
-
padding: 7px 15px;
|
|
112
|
+
padding: 7px 15px 7px 10px;
|
|
105
113
|
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
|
106
114
|
|
|
107
115
|
&.empty {
|