@broxus/react-uikit 0.11.0 → 0.12.1
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/dist/cjs/components/ConfigProvider/index.js +2 -0
- package/dist/cjs/components/Switch/index.scss +11 -22
- package/dist/cjs/styles/_import.components.scss +1 -1
- package/dist/cjs/styles/_import.scss +1 -1
- package/dist/cjs/styles/variables.scss +4 -0
- package/dist/cjs/styles/vars.scss +8 -4
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +4 -0
- package/dist/esm/components/ConfigProvider/index.js +2 -0
- package/dist/esm/components/Switch/index.scss +11 -22
- package/dist/esm/styles/_import.components.scss +1 -1
- package/dist/esm/styles/_import.scss +1 -1
- package/dist/esm/styles/variables.scss +4 -0
- package/dist/esm/styles/vars.scss +8 -4
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +4 -0
- package/package.json +6 -6
package/dist/cjs/types.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export type BreakpointsConfig<T> = {
|
|
|
11
11
|
l?: T;
|
|
12
12
|
/** Extra large size: Large screens: 1600px by default */
|
|
13
13
|
xl?: T;
|
|
14
|
+
/** Wide size: Wide screens: 2560px by default */
|
|
15
|
+
'2xl'?: T;
|
|
16
|
+
/** Ultra wide size: Ultra Wide screens: 3440px by default */
|
|
17
|
+
'3xl'?: T;
|
|
14
18
|
};
|
|
15
19
|
export type HeadingSize = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
16
20
|
export type Direction = 'ltr' | 'rtl';
|
|
@@ -62,8 +62,7 @@
|
|
|
62
62
|
border-radius: var(--switch-handle-border-radius);
|
|
63
63
|
bottom: 0;
|
|
64
64
|
content: '';
|
|
65
|
-
inset-inline
|
|
66
|
-
inset-inline-start: 0;
|
|
65
|
+
inset-inline: 0 0;
|
|
67
66
|
position: absolute;
|
|
68
67
|
top: 0;
|
|
69
68
|
transition: all var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
@@ -79,8 +78,7 @@
|
|
|
79
78
|
display: block;
|
|
80
79
|
height: 100%;
|
|
81
80
|
overflow: hidden;
|
|
82
|
-
padding-inline
|
|
83
|
-
padding-inline-start: calc(var(--switch-height) + var(--switch-handle-offset));
|
|
81
|
+
padding-inline: calc(var(--switch-height) + var(--switch-handle-offset)) calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666);
|
|
84
82
|
transition: padding-inline-start var(--transition-medium-fast-duration) var(--ease-in-out), padding-inline-end var(--transition-medium-fast-duration) var(--ease-in-out);
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -92,13 +90,11 @@
|
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
.uk-switch-inner-checked {
|
|
95
|
-
margin-inline
|
|
96
|
-
margin-inline-start: calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
93
|
+
margin-inline: calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2)) calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
.uk-switch-inner-unchecked {
|
|
100
|
-
margin-inline
|
|
101
|
-
margin-inline-start: 0;
|
|
97
|
+
margin-inline: 0 0;
|
|
102
98
|
margin-top: calc(var(--switch-height) * -1);
|
|
103
99
|
}
|
|
104
100
|
|
|
@@ -108,23 +104,19 @@
|
|
|
108
104
|
|
|
109
105
|
// Active state
|
|
110
106
|
.uk-switch:not(.uk-switch-disabled):active .uk-switch-handle::before {
|
|
111
|
-
inset-inline
|
|
112
|
-
inset-inline-start: 0;
|
|
107
|
+
inset-inline: 0 -30%;
|
|
113
108
|
}
|
|
114
109
|
|
|
115
110
|
.uk-switch-checked:not(.uk-switch-disabled):active .uk-switch-handle::before {
|
|
116
|
-
inset-inline
|
|
117
|
-
inset-inline-start: -30%;
|
|
111
|
+
inset-inline: -30% 0;
|
|
118
112
|
}
|
|
119
113
|
|
|
120
114
|
.uk-switch:not(.uk-switch-disabled, .uk-switch-checked):active .uk-switch-inner-unchecked {
|
|
121
|
-
margin-inline
|
|
122
|
-
margin-inline-start: calc(var(--switch-handle-offset) * 2);
|
|
115
|
+
margin-inline: calc(var(--switch-handle-offset) * 2) calc(var(--switch-handle-offset) * -2);
|
|
123
116
|
}
|
|
124
117
|
|
|
125
118
|
.uk-switch-checked:not(.uk-switch-disabled):active .uk-switch-inner-checked {
|
|
126
|
-
margin-inline
|
|
127
|
-
margin-inline-start: calc(var(--switch-handle-offset) * -2);
|
|
119
|
+
margin-inline: calc(var(--switch-handle-offset) * -2) calc(var(--switch-handle-offset) * 2);
|
|
128
120
|
}
|
|
129
121
|
|
|
130
122
|
// Checked state
|
|
@@ -164,18 +156,15 @@
|
|
|
164
156
|
}
|
|
165
157
|
|
|
166
158
|
.uk-switch-checked .uk-switch-inner {
|
|
167
|
-
padding-inline
|
|
168
|
-
padding-inline-start: calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666);
|
|
159
|
+
padding-inline: calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666) calc(var(--switch-height) + var(--switch-handle-offset));
|
|
169
160
|
}
|
|
170
161
|
|
|
171
162
|
.uk-switch-checked .uk-switch-inner-checked {
|
|
172
|
-
margin-inline
|
|
173
|
-
margin-inline-start: 0;
|
|
163
|
+
margin-inline: 0 0;
|
|
174
164
|
}
|
|
175
165
|
|
|
176
166
|
.uk-switch-checked .uk-switch-inner-unchecked {
|
|
177
|
-
margin-inline
|
|
178
|
-
margin-inline-start: calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
167
|
+
margin-inline: calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2)) calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2));
|
|
179
168
|
}
|
|
180
169
|
|
|
181
170
|
// Disabled
|
|
@@ -21,11 +21,15 @@ $breakpoint-small: 640px !default;
|
|
|
21
21
|
$breakpoint-medium: 960px !default; // Tablet Landscape
|
|
22
22
|
$breakpoint-large: 1200px !default; // Desktop
|
|
23
23
|
$breakpoint-xlarge: 1600px !default; // Large Screens
|
|
24
|
+
$breakpoint-2xlarge: 2560px !default; // Wide Screens
|
|
25
|
+
$breakpoint-3xlarge: 3440px !default; // Ultra Wide Screens
|
|
24
26
|
|
|
25
27
|
$breakpoint-xsmall-max: ($breakpoint-small - 1) !default;
|
|
26
28
|
$breakpoint-small-max: ($breakpoint-medium - 1) !default;
|
|
27
29
|
$breakpoint-medium-max: ($breakpoint-large - 1) !default;
|
|
28
30
|
$breakpoint-large-max: ($breakpoint-xlarge - 1) !default;
|
|
31
|
+
$breakpoint-xlarge-max: ($breakpoint-2xlarge - 1) !default;
|
|
32
|
+
$breakpoint-2xlarge-max: ($breakpoint-3xlarge - 1) !default;
|
|
29
33
|
|
|
30
34
|
|
|
31
35
|
// Global variables
|
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
--breakpoint-medium: #{$breakpoint-medium};
|
|
15
15
|
--breakpoint-large: #{$breakpoint-large};
|
|
16
16
|
--breakpoint-xlarge: #{$breakpoint-xlarge};
|
|
17
|
-
--breakpoint-
|
|
18
|
-
--breakpoint-
|
|
19
|
-
--breakpoint-
|
|
20
|
-
--breakpoint-
|
|
17
|
+
--breakpoint-2xlarge: #{$breakpoint-2xlarge};
|
|
18
|
+
--breakpoint-3xlarge: #{$breakpoint-3xlarge};
|
|
19
|
+
--breakpoint-xsmall-max: #{$breakpoint-xsmall-max};
|
|
20
|
+
--breakpoint-small-max: #{$breakpoint-small-max};
|
|
21
|
+
--breakpoint-medium-max: #{$breakpoint-medium-max};
|
|
22
|
+
--breakpoint-large-max: #{$breakpoint-large-max};
|
|
23
|
+
--breakpoint-xlarge-max: #{$breakpoint-xlarge-max};
|
|
24
|
+
--breakpoint-2xlarge-max: #{$breakpoint-2xlarge-max};
|
|
21
25
|
|
|
22
26
|
|
|
23
27
|
// Global variables
|