@smart-react-components/ui 2.0.0-alpha-79 → 2.0.0-alpha-81
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.
|
@@ -8,7 +8,9 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const css_1 = require("../../util/css");
|
|
10
10
|
const radio_1 = require("../../util/radio");
|
|
11
|
-
const Container = styled_components_1.default.div(
|
|
11
|
+
const Container = styled_components_1.default.div.attrs({
|
|
12
|
+
className: 'src-radio-container',
|
|
13
|
+
})(({ theme }) => `
|
|
12
14
|
align-items: center;
|
|
13
15
|
border: solid 2px ${theme.$.color.dynamic.accent};
|
|
14
16
|
border-radius: 100%;
|
|
@@ -17,7 +19,9 @@ const Container = styled_components_1.default.div(({ theme }) => `
|
|
|
17
19
|
justify-content: center;
|
|
18
20
|
height: 100%;
|
|
19
21
|
`);
|
|
20
|
-
const OuterCircle = styled_components_1.default.div
|
|
22
|
+
const OuterCircle = styled_components_1.default.div.attrs({
|
|
23
|
+
className: 'src-radio-outer-circle',
|
|
24
|
+
}) `
|
|
21
25
|
align-items: center;
|
|
22
26
|
border-radius: 100%;
|
|
23
27
|
display: flex;
|
|
@@ -27,7 +31,9 @@ const OuterCircle = styled_components_1.default.div `
|
|
|
27
31
|
transition: 200ms 0s ease-in-out;
|
|
28
32
|
transition-property: height, width;
|
|
29
33
|
`;
|
|
30
|
-
const InnerCircle = styled_components_1.default.div(
|
|
34
|
+
const InnerCircle = styled_components_1.default.div.attrs({
|
|
35
|
+
className: 'src-radio-inner-circle',
|
|
36
|
+
})(({ theme }) => `
|
|
31
37
|
background: ${theme.$.color.dynamic.background};
|
|
32
38
|
border-radius: 100%;
|
|
33
39
|
flex: 0 0 auto;
|
|
@@ -42,7 +48,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ child
|
|
|
42
48
|
height: ${t.$.size.radio[v]};
|
|
43
49
|
width: ${t.$.size.radio[v]};
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
.src-radio-inner-circle {
|
|
46
52
|
height: ${(0, css_1.toCSSValue)(t.$.size.radio[v])(v => (0, radio_1.calculateRadioInnerCircleSize)(v))};
|
|
47
53
|
width: ${(0, css_1.toCSSValue)(t.$.size.radio[v])(v => (0, radio_1.calculateRadioInnerCircleSize)(v))};
|
|
48
54
|
}
|
|
@@ -52,13 +58,13 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ child
|
|
|
52
58
|
|
|
53
59
|
${!isOutline
|
|
54
60
|
? `
|
|
55
|
-
|
|
61
|
+
.src-radio-container {
|
|
56
62
|
background: ${theme.$.color.dynamic.accent};
|
|
57
63
|
}
|
|
58
64
|
`
|
|
59
65
|
: ''}
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
.src-radio-outer-circle {
|
|
62
68
|
background: ${!isSoft ? theme.$.palette[palette].main : theme.$.palette[palette].soft};
|
|
63
69
|
|
|
64
70
|
${!isChecked
|
|
@@ -7,7 +7,9 @@ const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const css_1 = require("../../util/css");
|
|
10
|
-
const Slider = styled_components_1.default.div(
|
|
10
|
+
const Slider = styled_components_1.default.div.attrs({
|
|
11
|
+
className: 'switch-slider',
|
|
12
|
+
})(({ theme }) => `
|
|
11
13
|
background: ${theme.$.color.dynamic.background};
|
|
12
14
|
border-radius: 100%;
|
|
13
15
|
box-shadow: 0 1px 3px rgba(0,0,0,.4);
|
|
@@ -25,7 +27,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ child
|
|
|
25
27
|
height: ${t.$.size.switch[v].height};
|
|
26
28
|
width: ${t.$.size.switch[v].width};
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
.switch-slider {
|
|
29
31
|
height: ${t.$.size.switch[v].slider};
|
|
30
32
|
width: ${t.$.size.switch[v].slider};
|
|
31
33
|
|