@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.
@@ -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';
@@ -3,6 +3,8 @@ import { error } from '@broxus/js-utils';
3
3
  import * as React from 'react';
4
4
  export const ConfigContext = React.createContext({
5
5
  breakpoints: {
6
+ '2xl': 2560,
7
+ '3xl': 3440,
6
8
  l: 1200,
7
9
  m: 960,
8
10
  s: 640,
@@ -62,8 +62,7 @@
62
62
  border-radius: var(--switch-handle-border-radius);
63
63
  bottom: 0;
64
64
  content: '';
65
- inset-inline-end: 0;
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-end: calc((var(--switch-height) + var(--switch-handle-offset)) / 2.6666);
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-end: calc(100% - var(--switch-height) + ((var(--switch-height) + var(--switch-handle-offset)) * 2));
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-end: 0;
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-end: -30%;
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-end: 0;
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-end: calc(var(--switch-handle-offset) * -2);
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-end: calc(var(--switch-handle-offset) * 2);
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-end: calc(var(--switch-height) + var(--switch-handle-offset));
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-end: 0;
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-end: calc(-100% + var(--switch-height) - ((var(--switch-height) + var(--switch-handle-offset)) * 2));
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
@@ -47,7 +47,7 @@
47
47
  @import 'breadcrumb.scss';
48
48
 
49
49
  // @import 'pagination.scss';
50
- @import 'tabs';
50
+ @import 'tabs.scss';
51
51
  @import 'dotnav.scss';
52
52
 
53
53
  // @import 'thumbnav.scss';
@@ -62,7 +62,7 @@
62
62
  @import 'breadcrumb.scss';
63
63
 
64
64
  // @import 'pagination.scss';
65
- @import 'tabs';
65
+ @import 'tabs.scss';
66
66
  @import 'dotnav.scss';
67
67
 
68
68
  // @import 'thumbnav.scss';
@@ -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-xsmall-max: #{$breakpoint-small - 1};
18
- --breakpoint-small-max: #{$breakpoint-medium - 1};
19
- --breakpoint-medium-max: #{$breakpoint-large - 1};
20
- --breakpoint-large-max: #{$breakpoint-xlarge - 1};
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