dtable-ui-component 5.1.12-alpha.3 → 5.1.13
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.
|
@@ -6,18 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
require("./index.css");
|
|
10
9
|
function DtableSwitch(props) {
|
|
11
10
|
const {
|
|
12
11
|
onChange,
|
|
13
12
|
checked,
|
|
14
13
|
placeholder,
|
|
15
14
|
disabled,
|
|
16
|
-
switchClassName
|
|
17
|
-
isMobile
|
|
15
|
+
switchClassName
|
|
18
16
|
} = props;
|
|
19
17
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
-
className: "dtable-switch position-relative ".concat(
|
|
18
|
+
className: "dtable-switch position-relative ".concat(switchClassName || '')
|
|
21
19
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
22
20
|
className: "custom-switch"
|
|
23
21
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
@@ -37,3 +37,38 @@
|
|
|
37
37
|
color: #c2c2c2;
|
|
38
38
|
cursor: grab;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
.field-item-container .dtable-switch .custom-switch {
|
|
42
|
+
width: 100%;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.field-item-container .dtable-switch .custom-switch .dtable-font {
|
|
47
|
+
-webkit-transform: scale(.8);
|
|
48
|
+
transform: scale(.8);
|
|
49
|
+
display: inline-block;
|
|
50
|
+
line-height: 24px;
|
|
51
|
+
margin-right: 8px;
|
|
52
|
+
color: #666;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.field-item-container .dtable-switch .custom-switch .custom-switch-description {
|
|
56
|
+
width: 192px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.field-item-container .dtable-switch .custom-switch .custom-switch-indicator {
|
|
60
|
+
width: 22px;
|
|
61
|
+
height: 12px;
|
|
62
|
+
border-radius: 6px;
|
|
63
|
+
margin-right: .25rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.field-item-container .dtable-switch .custom-switch .custom-switch-indicator::before {
|
|
67
|
+
height: 8px;
|
|
68
|
+
width: 8px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.field-item-container .dtable-switch .custom-switch-input:checked~.custom-switch-indicator:before {
|
|
72
|
+
left: 12px;
|
|
73
|
+
}
|
|
74
|
+
|
package/package.json
CHANGED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
.dtable-switch {
|
|
2
|
-
flex: 1;
|
|
3
|
-
display: flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.dtable-switch .custom-switch {
|
|
7
|
-
width: 100%;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.dtable-switch .custom-switch .custom-switch-description {
|
|
13
|
-
width: 192px;
|
|
14
|
-
margin: 0;
|
|
15
|
-
padding-right: 5px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dtable-switch .custom-switch .dtable-font {
|
|
19
|
-
-webkit-transform: scale(.8);
|
|
20
|
-
transform: scale(.8);
|
|
21
|
-
display: inline-block;
|
|
22
|
-
line-height: 24px;
|
|
23
|
-
margin-right: 8px;
|
|
24
|
-
color: #666;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.dtable-switch .custom-switch-indicator {
|
|
28
|
-
width: 22px;
|
|
29
|
-
height: 12px;
|
|
30
|
-
border-radius: 6px;
|
|
31
|
-
margin-right: 10px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.dtable-switch .custom-switch-input:checked~.custom-switch-indicator:before {
|
|
35
|
-
left: 12px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.dtable-switch .custom-switch-indicator:before {
|
|
39
|
-
height: 8px;
|
|
40
|
-
width: 8px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* mobile */
|
|
44
|
-
.dtable-switch.mobile .custom-switch-indicator {
|
|
45
|
-
height: 1.25rem;
|
|
46
|
-
width: 2.25rem;
|
|
47
|
-
border-radius: 50px;
|
|
48
|
-
margin-right: 0px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.dtable-switch.mobile .custom-switch-indicator:before {
|
|
52
|
-
height: calc(1.25rem - 4px);
|
|
53
|
-
width: calc(1.25rem - 4px);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.dtable-switch.mobile .custom-switch-input:checked~.custom-switch-indicator:before {
|
|
57
|
-
left: calc(1rem + 1px);
|
|
58
|
-
}
|