@occmundial/occ-atomic 3.0.0-beta.15 → 3.0.0-beta.16
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/build/Button/__snapshots__/Button.test.js.snap +18 -18
- package/build/Button/styles.js +6 -6
- package/build/Checkbox/Checkbox.js +25 -2
- package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +63 -71
- package/build/Checkbox/styles.js +74 -81
- package/build/Radio/Radio.js +11 -4
- package/build/Radio/__snapshots__/Radio.test.js.snap +71 -79
- package/build/Radio/styles.js +84 -85
- package/build/SlideToggle/SlideToggle.js +19 -4
- package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +52 -37
- package/build/SlideToggle/styles.js +63 -44
- package/package.json +1 -1
@@ -6,12 +6,11 @@ exports[`Radio styles matches the snapshot 1`] = `
|
|
6
6
|
Object {
|
7
7
|
"active": Object {
|
8
8
|
"& $radio": Object {
|
9
|
-
"
|
9
|
+
"& $radioInner": Object {
|
10
10
|
"background": "#0059CD",
|
11
11
|
},
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"borderWidth": 2,
|
12
|
+
"& $radioOuter": Object {
|
13
|
+
"boxShadow": "inset 0 0 0 2px #0059CD",
|
15
14
|
},
|
16
15
|
},
|
17
16
|
},
|
@@ -21,77 +20,68 @@ Object {
|
|
21
20
|
"cont": Object {
|
22
21
|
"&$active": Object {
|
23
22
|
"&:active": Object {
|
24
|
-
"& $radio
|
23
|
+
"& $radio $radioInner": Object {
|
25
24
|
"background": "#083CAE",
|
26
25
|
},
|
27
|
-
"& $radio
|
28
|
-
"
|
29
|
-
"borderWidth": "3px",
|
26
|
+
"& $radio $radioOuter": Object {
|
27
|
+
"boxShadow": "inset 0 0 0 3px #0047A5 !important",
|
30
28
|
},
|
31
29
|
},
|
32
|
-
"&:focus $radio:before": Object {
|
33
|
-
"borderColor": "#0059CD",
|
34
|
-
"boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
|
35
|
-
},
|
36
30
|
"&:hover": Object {
|
37
|
-
"& $radio
|
31
|
+
"& $radio $radioInner": Object {
|
38
32
|
"background": "#083CAE",
|
39
33
|
},
|
40
|
-
"& $radio
|
41
|
-
"
|
34
|
+
"& $radio $radioOuter": Object {
|
35
|
+
"boxShadow": "inset 0 0 0 2px #0047A5",
|
42
36
|
},
|
43
37
|
},
|
44
38
|
},
|
45
|
-
"&:
|
46
|
-
"
|
47
|
-
"borderColor": "#6C6F89",
|
48
|
-
"borderWidth": "2px",
|
49
|
-
"boxShadow": "initial",
|
50
|
-
},
|
51
|
-
"&:focus $radio:before": Object {
|
52
|
-
"borderColor": "#D3D4DC",
|
53
|
-
"boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
|
54
|
-
},
|
55
|
-
"&:hover $radio:before": Object {
|
56
|
-
"borderColor": "#6C6F89",
|
57
|
-
"boxShadow": "initial",
|
58
|
-
},
|
39
|
+
"&:active $radio $radioOuter": Object {
|
40
|
+
"boxShadow": "inset 0 0 0 2px #6C6F89",
|
59
41
|
},
|
60
|
-
"
|
42
|
+
"&:focus-visible $radio": Object {
|
43
|
+
"boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
|
44
|
+
},
|
45
|
+
"&:hover $radio $radioOuter": Object {
|
46
|
+
"boxShadow": "inset 0 0 0 1px #6C6F89",
|
47
|
+
},
|
48
|
+
"alignItems": "flex-start",
|
61
49
|
"boxSizing": "border-box",
|
62
50
|
"cursor": "pointer",
|
63
51
|
"display": "flex",
|
64
52
|
"outline": "0",
|
65
|
-
"paddingBottom": "8px",
|
66
|
-
"paddingTop": "8px",
|
67
53
|
},
|
68
54
|
"disabled": Object {
|
69
|
-
"&
|
70
|
-
"
|
55
|
+
"& $radio $radioInner": Object {
|
56
|
+
"background": "#EDEDF1",
|
57
|
+
},
|
58
|
+
"& $radio $radioOuter": Object {
|
59
|
+
"background": "#EDEDF1",
|
71
60
|
},
|
72
61
|
"&$active": Object {
|
73
|
-
"& $radio
|
62
|
+
"& $radio $radioInner": Object {
|
74
63
|
"background": "#8DA5DA",
|
75
64
|
},
|
76
|
-
"& $radio
|
77
|
-
"
|
78
|
-
},
|
79
|
-
},
|
80
|
-
"&:not($active)": Object {
|
81
|
-
"& $radio:after": Object {
|
82
|
-
"background": "#EDEDF1",
|
83
|
-
},
|
84
|
-
"& $radio:before": Object {
|
85
|
-
"background": "#EDEDF1",
|
65
|
+
"& $radio $radioOuter": Object {
|
66
|
+
"boxShadow": "inset 0 0 0 2px #8DA5DA",
|
86
67
|
},
|
87
68
|
},
|
88
69
|
"pointerEvents": "none",
|
89
70
|
},
|
90
71
|
"label": Object {
|
91
72
|
"cursor": "pointer",
|
92
|
-
"flex":
|
93
|
-
"
|
94
|
-
"
|
73
|
+
"flex": 1,
|
74
|
+
"marginLeft": "12px",
|
75
|
+
"pointerEvents": "none",
|
76
|
+
},
|
77
|
+
"labelWrap": Object {
|
78
|
+
"alignItems": "center",
|
79
|
+
"display": "flex",
|
80
|
+
"flex": 1,
|
81
|
+
"minHeight": 48,
|
82
|
+
"overflow": "hidden",
|
83
|
+
"paddingBottom": "4px",
|
84
|
+
"paddingTop": "4px",
|
95
85
|
},
|
96
86
|
"overflow": Object {
|
97
87
|
"overflow": "hidden",
|
@@ -99,41 +89,43 @@ Object {
|
|
99
89
|
"whiteSpace": "nowrap",
|
100
90
|
},
|
101
91
|
"radio": Object {
|
102
|
-
"
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
"
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
92
|
+
"alignItems": "center",
|
93
|
+
"borderRadius": "9999px",
|
94
|
+
"display": "grid",
|
95
|
+
"height": 20,
|
96
|
+
"justifyContent": "center",
|
97
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
98
|
+
"width": 20,
|
99
|
+
},
|
100
|
+
"radioInner": Object {
|
101
|
+
"background": "#fff",
|
102
|
+
"borderRadius": "9999px",
|
103
|
+
"gridColumnStart": 1,
|
104
|
+
"gridRowStart": 1,
|
105
|
+
"height": 10,
|
106
|
+
"margin": 5,
|
107
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
108
|
+
"width": 10,
|
109
|
+
},
|
110
|
+
"radioOuter": Object {
|
111
|
+
"background": "#fff",
|
112
|
+
"borderRadius": "9999px",
|
113
|
+
"boxShadow": "inset 0 0 0 1px #D3D4DC",
|
114
|
+
"gridColumnStart": 1,
|
115
|
+
"gridRowStart": 1,
|
116
|
+
"height": 20,
|
117
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
118
|
+
"width": 20,
|
119
|
+
},
|
120
|
+
"radioWrap": Object {
|
129
121
|
"alignItems": "center",
|
130
122
|
"display": "flex",
|
131
|
-
"
|
132
|
-
"
|
133
|
-
"
|
123
|
+
"flexShrink": 0,
|
124
|
+
"height": 48,
|
125
|
+
"justifyContent": "center",
|
126
|
+
"width": 52,
|
134
127
|
},
|
135
128
|
"right": Object {
|
136
|
-
"float": "right",
|
137
129
|
"marginLeft": "8px",
|
138
130
|
"pointerEvents": "none",
|
139
131
|
},
|
package/build/Radio/styles.js
CHANGED
@@ -11,133 +11,132 @@ var _colors = _interopRequireDefault(require("../tokens/colors.json"));
|
|
11
11
|
|
12
12
|
var _shadows = _interopRequireDefault(require("../tokens/shadows.json"));
|
13
13
|
|
14
|
+
var _borderRadius = _interopRequireDefault(require("../tokens/borderRadius.json"));
|
15
|
+
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
17
|
|
16
18
|
var radio = _colors["default"].radio;
|
19
|
+
var transition = 'all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s';
|
20
|
+
var contentHeight = 48;
|
21
|
+
var radioWidth = 52;
|
22
|
+
var radioSize = 20;
|
23
|
+
var radioInnerSize = 10;
|
17
24
|
var _default = {
|
18
25
|
cont: {
|
19
|
-
paddingTop: _spacing["default"]['size-2'],
|
20
|
-
paddingBottom: _spacing["default"]['size-2'],
|
21
26
|
boxSizing: 'border-box',
|
22
27
|
display: 'flex',
|
23
|
-
alignItems: '
|
28
|
+
alignItems: 'flex-start',
|
24
29
|
cursor: 'pointer',
|
25
30
|
outline: '0',
|
31
|
+
'&:focus-visible $radio': {
|
32
|
+
boxShadow: _shadows["default"]['focus-bright-blue']
|
33
|
+
},
|
34
|
+
'&:hover $radio $radioOuter': {
|
35
|
+
boxShadow: "inset 0 0 0 1px ".concat(radio.unselected.border.hover)
|
36
|
+
},
|
37
|
+
'&:active $radio $radioOuter': {
|
38
|
+
boxShadow: "inset 0 0 0 2px ".concat(radio.unselected.border.hover)
|
39
|
+
},
|
26
40
|
'&$active': {
|
27
|
-
'&:focus $radio:before': {
|
28
|
-
borderColor: radio['selected']['border']['default'],
|
29
|
-
boxShadow: _shadows["default"]['focus-bright-blue']
|
30
|
-
},
|
31
41
|
'&:hover': {
|
32
|
-
'& $radio
|
33
|
-
|
42
|
+
'& $radio $radioOuter': {
|
43
|
+
boxShadow: "inset 0 0 0 2px ".concat(radio.selected.border.hover)
|
34
44
|
},
|
35
|
-
'& $radio
|
36
|
-
background: radio
|
45
|
+
'& $radio $radioInner': {
|
46
|
+
background: radio.selected.bg.hover
|
37
47
|
}
|
38
48
|
},
|
39
49
|
'&:active': {
|
40
|
-
'& $radio
|
41
|
-
|
42
|
-
borderWidth: '3px'
|
50
|
+
'& $radio $radioOuter': {
|
51
|
+
boxShadow: "inset 0 0 0 3px ".concat(radio.selected.border.hover, " !important")
|
43
52
|
},
|
44
|
-
'& $radio
|
45
|
-
background: radio
|
53
|
+
'& $radio $radioInner': {
|
54
|
+
background: radio.selected.bg.hover
|
46
55
|
}
|
47
56
|
}
|
48
|
-
},
|
49
|
-
'&:not($active)': {
|
50
|
-
'&:hover $radio:before': {
|
51
|
-
borderColor: radio['unselected']['border']['hover'],
|
52
|
-
boxShadow: 'initial'
|
53
|
-
},
|
54
|
-
'&:active $radio:before': {
|
55
|
-
borderColor: radio['unselected']['border']['hover'],
|
56
|
-
borderWidth: '2px',
|
57
|
-
boxShadow: 'initial'
|
58
|
-
},
|
59
|
-
'&:focus $radio:before': {
|
60
|
-
borderColor: radio['unselected']['border']['default'],
|
61
|
-
boxShadow: _shadows["default"]['focus-bright-blue']
|
62
|
-
}
|
63
57
|
}
|
64
58
|
},
|
65
|
-
|
66
|
-
width:
|
67
|
-
height:
|
68
|
-
position: 'relative',
|
59
|
+
radioWrap: {
|
60
|
+
width: radioWidth,
|
61
|
+
height: contentHeight,
|
69
62
|
display: 'flex',
|
70
63
|
alignItems: 'center',
|
71
|
-
'
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
64
|
+
justifyContent: 'center',
|
65
|
+
flexShrink: 0
|
66
|
+
},
|
67
|
+
radio: {
|
68
|
+
width: radioSize,
|
69
|
+
height: radioSize,
|
70
|
+
borderRadius: _borderRadius["default"]['br-full'],
|
71
|
+
transition: transition,
|
72
|
+
display: 'grid',
|
73
|
+
alignItems: 'center',
|
74
|
+
justifyContent: 'center'
|
75
|
+
},
|
76
|
+
radioOuter: {
|
77
|
+
width: radioSize,
|
78
|
+
height: radioSize,
|
79
|
+
borderRadius: _borderRadius["default"]['br-full'],
|
80
|
+
boxShadow: "inset 0 0 0 1px ".concat(radio.unselected.border["default"]),
|
81
|
+
background: radio.bg["default"],
|
82
|
+
transition: transition,
|
83
|
+
gridRowStart: 1,
|
84
|
+
gridColumnStart: 1
|
85
|
+
},
|
86
|
+
radioInner: {
|
87
|
+
width: radioInnerSize,
|
88
|
+
height: radioInnerSize,
|
89
|
+
margin: 5,
|
90
|
+
borderRadius: _borderRadius["default"]['br-full'],
|
91
|
+
background: radio.bg["default"],
|
92
|
+
transition: transition,
|
93
|
+
gridRowStart: 1,
|
94
|
+
gridColumnStart: 1
|
98
95
|
},
|
99
96
|
active: {
|
100
97
|
'& $radio': {
|
101
|
-
'
|
102
|
-
|
103
|
-
borderColor: radio['selected']['border']['default']
|
98
|
+
'& $radioOuter': {
|
99
|
+
boxShadow: "inset 0 0 0 2px ".concat(radio.selected.border["default"])
|
104
100
|
},
|
105
|
-
'
|
106
|
-
background: radio
|
101
|
+
'& $radioInner': {
|
102
|
+
background: radio.selected.bg["default"]
|
107
103
|
}
|
108
104
|
}
|
109
105
|
},
|
110
106
|
disabled: {
|
111
107
|
pointerEvents: 'none',
|
112
|
-
'&
|
113
|
-
|
108
|
+
'& $radio $radioOuter': {
|
109
|
+
background: radio.bg.disabled
|
114
110
|
},
|
115
|
-
'
|
116
|
-
|
117
|
-
borderColor: radio['selected']['border']['disabled']
|
118
|
-
},
|
119
|
-
'& $radio:after': {
|
120
|
-
background: radio['selected']['bg']['disabled']
|
121
|
-
}
|
111
|
+
'& $radio $radioInner': {
|
112
|
+
background: radio.bg.disabled
|
122
113
|
},
|
123
|
-
'
|
124
|
-
'& $radio
|
125
|
-
|
114
|
+
'&$active': {
|
115
|
+
'& $radio $radioOuter': {
|
116
|
+
boxShadow: "inset 0 0 0 2px ".concat(radio.selected.border.disabled)
|
126
117
|
},
|
127
|
-
'& $radio
|
128
|
-
background: radio
|
118
|
+
'& $radio $radioInner': {
|
119
|
+
background: radio.selected.bg.disabled
|
129
120
|
}
|
130
121
|
}
|
131
122
|
},
|
123
|
+
labelWrap: {
|
124
|
+
minHeight: contentHeight,
|
125
|
+
display: 'flex',
|
126
|
+
alignItems: 'center',
|
127
|
+
paddingTop: _spacing["default"]['size-1'],
|
128
|
+
paddingBottom: _spacing["default"]['size-1'],
|
129
|
+
overflow: 'hidden',
|
130
|
+
flex: 1
|
131
|
+
},
|
132
132
|
label: {
|
133
|
-
marginLeft: _spacing["default"]['size-
|
133
|
+
marginLeft: _spacing["default"]['size-3'],
|
134
|
+
pointerEvents: 'none',
|
134
135
|
cursor: 'pointer',
|
135
|
-
|
136
|
-
flex: '1'
|
136
|
+
flex: 1
|
137
137
|
},
|
138
138
|
right: {
|
139
139
|
marginLeft: _spacing["default"]['size-2'],
|
140
|
-
"float": 'right',
|
141
140
|
pointerEvents: 'none'
|
142
141
|
},
|
143
142
|
overflow: {
|
@@ -13,6 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
14
14
|
var _Text = _interopRequireDefault(require("../Text"));
|
15
15
|
|
16
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
17
|
+
|
18
|
+
var _colors = _interopRequireDefault(require("../tokens/colors.json"));
|
19
|
+
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
17
21
|
|
18
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
@@ -103,6 +107,7 @@ var SlideToggle = /*#__PURE__*/function (_React$Component) {
|
|
103
107
|
name = _this$props2.name,
|
104
108
|
trk = _this$props2.trk,
|
105
109
|
testId = _this$props2.testId;
|
110
|
+
var iconColor = disabled ? _colors["default"].icon["default"].disabled : value ? _colors["default"].icon.brand.bold : _colors["default"].icon.brand.disabled;
|
106
111
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
107
112
|
id: id,
|
108
113
|
tabIndex: disabled ? -1 : 0,
|
@@ -112,6 +117,8 @@ var SlideToggle = /*#__PURE__*/function (_React$Component) {
|
|
112
117
|
onClick: this.toggle,
|
113
118
|
className: "".concat(classes.cont).concat(disabled ? " ".concat(classes.disabled) : '').concat(className ? " ".concat(className) : ''),
|
114
119
|
style: style
|
120
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
121
|
+
className: classes.switchWrap
|
115
122
|
}, /*#__PURE__*/_react["default"].createElement("div", _extends({
|
116
123
|
id: trk,
|
117
124
|
name: name,
|
@@ -119,14 +126,22 @@ var SlideToggle = /*#__PURE__*/function (_React$Component) {
|
|
119
126
|
"data-testid": testId
|
120
127
|
}, testId && {
|
121
128
|
'data-value': value ? 1 : 0
|
122
|
-
}), /*#__PURE__*/_react["default"].createElement("
|
123
|
-
className: classes.
|
129
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
130
|
+
className: classes.switchBg
|
124
131
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
132
|
+
className: classes.slider
|
133
|
+
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
134
|
+
iconName: value ? 'check' : 'x',
|
135
|
+
width: 16,
|
136
|
+
height: 16,
|
137
|
+
colors: [iconColor],
|
125
138
|
className: classes.icon
|
126
|
-
}))), label && /*#__PURE__*/_react["default"].createElement(
|
139
|
+
}))))), label && /*#__PURE__*/_react["default"].createElement("div", {
|
140
|
+
className: classes.labelWrap
|
141
|
+
}, /*#__PURE__*/_react["default"].createElement(_Text["default"], {
|
127
142
|
tag: "label",
|
128
143
|
className: classes.label
|
129
|
-
}, label));
|
144
|
+
}, label)));
|
130
145
|
}
|
131
146
|
}]);
|
132
147
|
|
@@ -5,76 +5,91 @@ exports[`SlideToggle matches the snapshot 1`] = `ShallowWrapper {}`;
|
|
5
5
|
exports[`SlideToggle styles matches the snapshot 1`] = `
|
6
6
|
Object {
|
7
7
|
"checked": Object {
|
8
|
-
"& $icon": Object {
|
9
|
-
"background": "url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJCQkgdmlld0JveD0iMCAwIDI0IDI0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNCAyNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgoJCTxwYXRoIGZpbGw9IiMwMDZFRkYiIGQ9Ik0xOC4zLDcuM2wxLjQsMS40bC04LjcsOWMtMC40LDAuNC0xLDAuNC0xLjQsMC4xbC00LjMtMy42bDEuMy0xLjVsMy42LDNDMTAuMiwxNS42LDE4LjMsNy4zLDE4LjMsNy4zeiIvPgoJCTwvc3ZnPg==)",
|
10
|
-
},
|
11
8
|
"& $slider": Object {
|
12
|
-
"left":
|
9
|
+
"left": "calc(100% - 28px)",
|
10
|
+
},
|
11
|
+
"& $switchBg": Object {
|
12
|
+
"background": "#0059CD",
|
13
13
|
},
|
14
|
-
"background": "#0059CD",
|
15
14
|
},
|
16
15
|
"cont": Object {
|
17
|
-
"&:
|
18
|
-
"
|
19
|
-
"boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
|
16
|
+
"&:active $switch $switchBg": Object {
|
17
|
+
"boxShadow": "inset 0 0 0 2px rgba(255,255,255,0.2)",
|
20
18
|
},
|
21
|
-
"&:focus $switch
|
22
|
-
"background": "#E9EEF8",
|
19
|
+
"&:focus-visible $switch": Object {
|
23
20
|
"boxShadow": "0 0 0 8px hsl(221 91.2% 35.7% / 0.3)",
|
24
21
|
},
|
25
|
-
"&:
|
26
|
-
"
|
22
|
+
"&:focus-visible $switch$checked": Object {
|
23
|
+
"boxShadow": "0 0 0 8px rgba(0,110,255,0.3)",
|
27
24
|
},
|
28
|
-
"&:hover $switch
|
29
|
-
"background": "#CAD5EE
|
25
|
+
"&:hover $switch $switchBg, &:active $switch $switchBg": Object {
|
26
|
+
"background": "#CAD5EE",
|
27
|
+
},
|
28
|
+
"&:hover $switch$checked $switchBg, &:active $switch$checked $switchBg": Object {
|
29
|
+
"background": "#083CAE",
|
30
30
|
},
|
31
|
-
"alignItems": "start",
|
31
|
+
"alignItems": "flex-start",
|
32
32
|
"boxSizing": "border-box",
|
33
33
|
"cursor": "pointer",
|
34
34
|
"display": "flex",
|
35
35
|
"outline": 0,
|
36
|
-
"paddingBottom": "8px",
|
37
|
-
"paddingTop": "8px",
|
38
36
|
},
|
39
37
|
"disabled": Object {
|
40
|
-
"& $
|
41
|
-
"background": "url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgogICAgICAgIAkgdmlld0JveD0iMCAwIDI0IDI0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNCAyNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgogICAgICAgIDxwYXRoIGZpbGw9IiNEM0Q0REMiIGQ9Ik0xMi4xLDEwLjhsNC42LTQuNkwxOCw3LjRMMTMuNCwxMmw0LjYsNC42TDE2LjcsMThsLTQuNi00LjZMNy40LDE4bC0xLjMtMS4zbDQuNi00LjZMNi4yLDcuNGwxLjMtMS4zTDEyLjEsMTAuOHoiLz4KICAgICAgICA8L3N2Zz4=)",
|
42
|
-
},
|
43
|
-
"& $switch": Object {
|
38
|
+
"& $switch $switchBg": Object {
|
44
39
|
"background": "#EDEDF1",
|
40
|
+
"boxShadow": "inset 0 0 0 1px #D3D4DC",
|
45
41
|
},
|
46
42
|
"pointerEvents": "none",
|
47
43
|
},
|
48
44
|
"icon": Object {
|
49
|
-
"
|
50
|
-
"display": "block",
|
51
|
-
"height": "100%",
|
52
|
-
"transition": "0.3s all",
|
53
|
-
"width": "100%",
|
45
|
+
"margin": 4,
|
54
46
|
},
|
55
47
|
"label": Object {
|
56
48
|
"cursor": "pointer",
|
57
|
-
"marginLeft": "
|
49
|
+
"marginLeft": "12px",
|
50
|
+
},
|
51
|
+
"labelWrap": Object {
|
52
|
+
"alignItems": "center",
|
53
|
+
"display": "flex",
|
54
|
+
"minHeight": 48,
|
55
|
+
"overflow": "hidden",
|
56
|
+
"paddingBottom": "4px",
|
57
|
+
"paddingTop": "4px",
|
58
58
|
},
|
59
59
|
"slider": Object {
|
60
60
|
"background": "#fff",
|
61
61
|
"borderRadius": "50%",
|
62
|
-
"height":
|
63
|
-
"left":
|
62
|
+
"height": 24,
|
63
|
+
"left": 4,
|
64
64
|
"position": "absolute",
|
65
|
-
"top":
|
66
|
-
"
|
67
|
-
"
|
65
|
+
"top": "50%",
|
66
|
+
"transform": "translateY(-50%)",
|
67
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
68
|
+
"width": 24,
|
68
69
|
},
|
69
70
|
"switch": Object {
|
70
|
-
"
|
71
|
-
"borderRadius": 34,
|
71
|
+
"borderRadius": "9999px",
|
72
72
|
"display": "inline-block",
|
73
73
|
"flexShrink": 0,
|
74
|
-
"height":
|
74
|
+
"height": 32,
|
75
75
|
"position": "relative",
|
76
|
-
"transition": "0.
|
77
|
-
"width":
|
76
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
77
|
+
"width": 52,
|
78
|
+
},
|
79
|
+
"switchBg": Object {
|
80
|
+
"background": "#E9EEF8",
|
81
|
+
"borderRadius": "9999px",
|
82
|
+
"boxShadow": "inset 0 0 0 1px rgba(255,255,255,0.2)",
|
83
|
+
"height": 32,
|
84
|
+
"transition": "all cubic-bezier(0.25,0.46,0.45,0.94) 0.2s",
|
85
|
+
"width": 52,
|
86
|
+
},
|
87
|
+
"switchWrap": Object {
|
88
|
+
"alignItems": "center",
|
89
|
+
"display": "flex",
|
90
|
+
"flexShrink": 0,
|
91
|
+
"height": 48,
|
92
|
+
"width": 52,
|
78
93
|
},
|
79
94
|
}
|
80
95
|
`;
|