@epam/uui 5.13.0 → 5.14.0-beta.0

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.
@@ -1,70 +0,0 @@
1
- @use './text-size' as *;
2
- @use './icons' as *;
3
-
4
- @mixin button-layout($size, $borderWidth) {
5
- @include button-horizontal-layout($size, $borderWidth);
6
- @include button-vertical-layout($size, $borderWidth);
7
- @include scalable-icon-size($size);
8
- }
9
-
10
- @mixin link-button-layout($size) {
11
- @include link-button-horizontal-layout($size);
12
- @include button-vertical-layout($size, 0);
13
- @include scalable-icon-size($size);
14
- }
15
-
16
- @mixin button-vertical-layout($size, $borderWidth) {
17
- &:global(.uui-button-box) {
18
- min-height: $size;
19
- border-width: $borderWidth;
20
- }
21
-
22
- :global(.uui-caption) {
23
- @include text-size($size, $borderWidth);
24
-
25
- @if ($size == 42px or $size == 48px) {
26
- font-size: 16px;
27
- }
28
- }
29
- }
30
-
31
- @mixin button-horizontal-layout($size, $borderWidth) {
32
- min-width: $size;
33
-
34
- @if ($size == 18px) {
35
- @include button-padding(3px, 3px, $borderWidth);
36
- } @else if ($size == 24px) {
37
- @include button-padding(6px, 6px, $borderWidth);
38
- } @else if ($size == 30px) {
39
- @include button-padding(6px, 6px, $borderWidth);
40
- } @else if ($size == 36px) {
41
- @include button-padding(6px, 6px, $borderWidth);
42
- } @else if ($size == 42px) {
43
- @include button-padding(12px, 6px, $borderWidth);
44
- } @else if ($size == 48px) {
45
- @include button-padding(12px, 6px, $borderWidth);
46
- } @else {
47
- @include button-padding(6px, 6px, $borderWidth); }
48
- }
49
-
50
- @mixin button-padding($controlPadding, $captionPadding, $borderWidth) {
51
- padding-left: $controlPadding - $borderWidth;
52
- padding-right: $controlPadding - $borderWidth;
53
-
54
- :global(.uui-caption) {
55
- padding-left: $captionPadding;
56
- padding-right: $captionPadding;
57
- }
58
- }
59
-
60
- @mixin link-button-horizontal-layout($size) {
61
- min-width: $size;
62
-
63
- &:global(.uui-has-left-icon) :global(.uui-caption) {
64
- padding-left: 6px;
65
- }
66
-
67
- &:global(.uui-has-right-icon) :global(.uui-caption) {
68
- padding-right: 6px;
69
- }
70
- }
@@ -1,28 +0,0 @@
1
- @use 'text-size' as *;
2
-
3
- @mixin control-vertical-layout($size, $borderWidth) {
4
- :global(.uui-caption), :global(.uui-input) {
5
- @include text-size($size, $borderWidth);
6
- }
7
-
8
- &:global(.uui-button-box), &:global(.uui-input-box) {
9
- min-height: $size;
10
- border-width: $borderWidth;
11
- }
12
- }
13
-
14
- @mixin control-box-layout($size, $borderWidth) {
15
- min-width: $size;
16
- padding-left: 5px;
17
- padding-right: 5px;
18
-
19
- :global(.uui-caption), :global(.uui-input) {
20
- padding-left: 6px;
21
- padding-right: 6px;
22
- }
23
-
24
- &:global(.uui-button-box), &:global(.uui-input-box) {
25
- min-height: $size;
26
- border-width: $borderWidth;
27
- }
28
- }
@@ -1,55 +0,0 @@
1
- @use 'sass:math';
2
- @use 'sass:meta';
3
-
4
- @mixin icon-layout($size) {
5
- :global(.uui-icon) {
6
- svg {
7
- height: math.div($size, 36) * 24;
8
- max-width: math.div($size, 36) * 24;
9
- }
10
- }
11
- }
12
-
13
- @mixin icon-size($size) {
14
- $striped-size: strip-unit($size);
15
-
16
- :global(.uui-icon) {
17
- svg {
18
- height: #{$striped-size}px;
19
- width: #{$striped-size}px;
20
- }
21
- }
22
- }
23
-
24
- @function strip-unit($number) {
25
- @if meta.type-of($number) == 'number' and not math.is-unitless($number) {
26
- @return math.div($number, $number * 0 + 1);
27
- }
28
-
29
- @return $number;
30
- }
31
-
32
- @mixin scalable-icon-size($size, $additionalClass: '') {
33
- $striped-size: strip-unit($size);
34
-
35
- #{$additionalClass}:global(.uui-icon) {
36
- svg {
37
- @if ($striped-size == 18) {
38
- height: 12px;
39
- } @else if ($striped-size == 24) {
40
- height: 12px;
41
- } @else if ($striped-size == 30) {
42
- height: 18px;
43
- } @else if ($striped-size == 36) {
44
- height: 18px;
45
- } @else if ($striped-size == 42) {
46
- height: 18px;
47
- } @else if ($striped-size == 48) {
48
- height: 24px;
49
- } @else if ($striped-size == 60) {
50
- height: 24px;
51
- }
52
- width: inherit;
53
- }
54
- }
55
- }
@@ -1,42 +0,0 @@
1
- @function vpadding($size, $border-width) {
2
- @if ($size == 18px or $size == 24px) {
3
- @return (3px - $border-width);
4
- } @else if ($size == 30px) {
5
- @return (6px - $border-width);
6
- } @else if ($size == 36px or $size == 42px) {
7
- @return (9px - $border-width);
8
- } @else if ($size == 48px) {
9
- @return (12px - $border-width);
10
- } @else if ($size == 60px) {
11
- @return (15px - $border-width);
12
- }
13
-
14
- @return (null);
15
- }
16
-
17
- @mixin text-size($size, $border-width: 0) {
18
- @if ($size == 18px) {
19
- line-height: 12px;
20
- font-size: 10px;
21
- } @else if ($size == 24px) {
22
- line-height: 18px;
23
- font-size: 12px;
24
- } @else if ($size == 30px) {
25
- line-height: 18px;
26
- font-size: 14px;
27
- } @else if ($size == 36px) {
28
- line-height: 18px;
29
- font-size: 14px;
30
- } @else if ($size == 42px) {
31
- line-height: 24px;
32
- font-size: 16px;
33
- } @else if ($size == 48px) {
34
- line-height: 24px;
35
- font-size: 16px;
36
- } @else if ($size == 60px) {
37
- line-height: 24px;
38
- font-size: 20px;
39
- }
40
- padding-top: vpadding($size, $border-width);
41
- padding-bottom: vpadding($size, $border-width);
42
- }