@onereach/styles 0.1.2 → 0.1.3
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": "@onereach/styles",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Styles for or-ui components",
|
|
5
5
|
"main": "./dist/index.min.css",
|
|
6
6
|
"unpkg": "./dist/index.css",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"sass": "^1.35.1",
|
|
42
42
|
"stylelint": "^13.13.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "74e91e4d630b99224b429fa4091cfe6b1ebeafd8"
|
|
45
45
|
}
|
|
@@ -14,6 +14,7 @@ $checkbox-bg-color: var(--c-white) !default;
|
|
|
14
14
|
$checkbox-text-color: inherit !default;
|
|
15
15
|
$checkbox-font-size: inherit !default;
|
|
16
16
|
$checkbox-line-height: inherit !default;
|
|
17
|
+
$checkbox-content-spacing: get-spacing(3) !default;
|
|
17
18
|
|
|
18
19
|
// checked
|
|
19
20
|
$checkbox-icon-color-checked: var(--c-white) !default;
|
|
@@ -83,7 +84,7 @@ $checkbox-bg-color-checked-disabled: var(--c-primary-lighten-20) !default;
|
|
|
83
84
|
min-width: $checkbox-size;
|
|
84
85
|
height: $checkbox-size;
|
|
85
86
|
min-height: $checkbox-size;
|
|
86
|
-
margin-right:
|
|
87
|
+
margin-right: $checkbox-content-spacing;
|
|
87
88
|
background-color: $checkbox-bg-color;
|
|
88
89
|
border: $checkbox-border-width solid $checkbox-border-color;
|
|
89
90
|
border-radius: $checkbox-border-radius;
|
|
@@ -18,6 +18,7 @@ $radio-icon-bg-hover: var(--c-white-darken-3) !default;
|
|
|
18
18
|
$radio-icon-bg-active: var(--c-white-darken-5) !default;
|
|
19
19
|
$radio-icon-bg-checked: var(--c-primary) !default;
|
|
20
20
|
|
|
21
|
+
$radio-content-spacing: get-spacing(3) !default;
|
|
21
22
|
$radio-content-color: var(--c-neutral-6) !default;
|
|
22
23
|
$radio-content-color-disabled: var(--c-neutral-4) !default;
|
|
23
24
|
|
|
@@ -54,7 +55,7 @@ $radio-transition-time: get-transition-time() !default;
|
|
|
54
55
|
min-width: $radio-icon-size;
|
|
55
56
|
height: $radio-icon-size;
|
|
56
57
|
min-height: $radio-icon-size;
|
|
57
|
-
margin-right:
|
|
58
|
+
margin-right: $radio-content-spacing;
|
|
58
59
|
background-color: $radio-icon-bg;
|
|
59
60
|
border: $radio-icon-border-width solid $radio-icon-border-color;
|
|
60
61
|
border-radius: $radio-icon-radius;
|
|
@@ -31,6 +31,10 @@ $switch-knob-border-color: var(--c-neutral-1) !default;
|
|
|
31
31
|
$switch-loader-size: calc(#{$switch-knob-size} - #{px-to-rem(5)});
|
|
32
32
|
$switch-loader-color: var(--c-primary) !default;
|
|
33
33
|
|
|
34
|
+
$switch-content-spacing: get-spacing(3) !default;
|
|
35
|
+
$switch-content-color: var(--c-neutral-6) !default;
|
|
36
|
+
$switch-content-color-disabled: var(--c-neutral-4) !default;
|
|
37
|
+
|
|
34
38
|
@mixin is-checked() {
|
|
35
39
|
&.is-checked {
|
|
36
40
|
.#{$switch-prefix}-switch {
|
|
@@ -62,14 +66,20 @@ $switch-loader-color: var(--c-primary) !default;
|
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
.#{$switch-prefix}-switch {
|
|
65
|
-
position: relative;
|
|
66
69
|
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
67
71
|
cursor: pointer;
|
|
68
72
|
|
|
69
73
|
&--input {
|
|
70
74
|
@include visually-hidden;
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
&--switcher {
|
|
78
|
+
position: relative;
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
margin-right: $switch-content-spacing;
|
|
81
|
+
}
|
|
82
|
+
|
|
73
83
|
&--layer {
|
|
74
84
|
width: $switch-layer-width;
|
|
75
85
|
min-width: $switch-layer-width;
|
|
@@ -104,6 +114,13 @@ $switch-loader-color: var(--c-primary) !default;
|
|
|
104
114
|
transform: translate(-3px, -50%);
|
|
105
115
|
}
|
|
106
116
|
|
|
117
|
+
&--content {
|
|
118
|
+
color: $switch-content-color;
|
|
119
|
+
transition-timing-function: $switch-transition-func;
|
|
120
|
+
transition-duration: $switch-transition-time;
|
|
121
|
+
transition-property: color;
|
|
122
|
+
}
|
|
123
|
+
|
|
107
124
|
&--loader {
|
|
108
125
|
&.base-loader {
|
|
109
126
|
&::after {
|
|
@@ -138,11 +155,16 @@ $switch-loader-color: var(--c-primary) !default;
|
|
|
138
155
|
opacity: 0.5;
|
|
139
156
|
}
|
|
140
157
|
|
|
141
|
-
|
|
158
|
+
&--knob {
|
|
142
159
|
box-shadow: $switch-knob-box-shadow-disabled;
|
|
143
160
|
}
|
|
161
|
+
|
|
162
|
+
&--content {
|
|
163
|
+
color: $switch-content-color-disabled;
|
|
164
|
+
}
|
|
144
165
|
}
|
|
145
166
|
}
|
|
146
167
|
|
|
147
168
|
@include is-checked;
|
|
169
|
+
@include loading;
|
|
148
170
|
}
|