@orangesk/orange-design-system 2.0.0-beta.37 → 2.0.0-beta.38
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/build/components/Loader/style.css +1 -1
- package/build/components/Loader/style.css.map +1 -1
- package/build/components/Table/style.css +1 -1
- package/build/components/Table/style.css.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +10 -2
- package/build/components/types/src/components/Accordion/Accordion.static.d.ts +2 -0
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.d.ts +3 -1
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +1 -0
- package/build/components/types/src/components/Loader/LoaderFullscreen.d.ts +7 -0
- package/build/components/types/src/components/Loader/index.d.ts +1 -0
- package/build/components/types/src/components/index.d.ts +2 -2
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.js.map +1 -1
- package/build/lib/megamenu.js.map +1 -1
- package/build/lib/scripts.js +1 -1
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -10
- package/src/components/Accordion/Accordion.static.ts +44 -1
- package/src/components/Accordion/tests/Accordion.unit.test.jsx +109 -0
- package/src/components/BlockAction/styles/config.scss +6 -6
- package/src/components/CartTable/styles/mixins.scss +46 -49
- package/src/components/Container/styles/config.scss +2 -2
- package/src/components/Container/styles/mixins.scss +4 -4
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +1 -0
- package/src/components/Forms/Autocomplete/Autocomplete.tsx +6 -1
- package/src/components/Forms/Autocomplete/styles/config.scss +3 -3
- package/src/components/Forms/Checkbox/styles/mixins.scss +2 -2
- package/src/components/Forms/File/styles/config.scss +5 -5
- package/src/components/Forms/Hint/styles/config.scss +1 -1
- package/src/components/Forms/Hint/styles/mixins.scss +2 -2
- package/src/components/Forms/Label/styles/mixins.scss +2 -2
- package/src/components/Forms/Radio/styles/mixins.scss +2 -2
- package/src/components/Forms/Select/styles/mixins.scss +6 -6
- package/src/components/Forms/TextInput/styles/mixins.scss +10 -10
- package/src/components/Hero/styles/config.scss +0 -1
- package/src/components/Icon/styles/export/size.scss +2 -2
- package/src/components/Icon/styles/mixins.scss +3 -3
- package/src/components/IconList/styles/config.scss +2 -2
- package/src/components/IconList/styles/style.scss +1 -1
- package/src/components/Loader/LoaderFullscreen.tsx +32 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Loader/styles/config.scss +5 -5
- package/src/components/Loader/styles/mixins.scss +24 -0
- package/src/components/Loader/styles/style.scss +9 -0
- package/src/components/Loader/tests/LoaderFullscreen.conformance.test.jsx +21 -0
- package/src/components/Loader/tests/LoaderFullscreen.unit.test.jsx +41 -0
- package/src/components/Loader/tests/test.scss +1 -1
- package/src/components/PromotionCard/styles/config.scss +2 -4
- package/src/components/Skeleton/styles/mixins.scss +3 -3
- package/src/components/Sticker/styles/mixins.scss +2 -2
- package/src/components/Table/docsData.ts +0 -1
- package/src/components/Table/styles/mixins.scss +5 -0
- package/src/components/Tag/styles/mixins.scss +1 -1
- package/src/components/Testimonial/styles/config.scss +25 -22
- package/src/components/Testimonial/styles/mixins.scss +36 -32
- package/src/components/Tooltip/styles/mixins.scss +14 -13
- package/src/components/index.ts +2 -1
- package/src/styles/export/breakpoint.scss +1 -1
- package/src/styles/export/space.scss +1 -1
- package/src/styles/tokens/breakpoint.scss +64 -49
- package/src/styles/tokens/space.scss +9 -9
- package/src/styles/tools/generate.scss +6 -6
- package/src/styles/tools/layout.scss +3 -3
- package/src/styles/tools/map.scss +2 -2
- package/src/styles/tools/text.scss +1 -1
- package/src/styles/utilities/index.scss +7 -7
- package/build/search-index.json +0 -426
|
@@ -6,34 +6,37 @@ $black: var(--color-background-contrast);
|
|
|
6
6
|
$orange: var(--color-surface-secondary);
|
|
7
7
|
|
|
8
8
|
$quotation-mark-bottom: (
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
-webkit-mask-image:
|
|
10
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>'),
|
|
11
|
+
mask-image:
|
|
12
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>')
|
|
11
13
|
);
|
|
12
14
|
|
|
13
15
|
$quotation-mark-top: (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
mask-image:
|
|
17
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
18
|
+
-webkit-mask-image:
|
|
19
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
16
20
|
);
|
|
17
21
|
|
|
18
22
|
$quotation-mark-top-position: (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
default: (
|
|
24
|
+
top: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
),
|
|
27
|
+
oneline: (
|
|
28
|
+
top: 0,
|
|
29
|
+
right: 0,
|
|
30
|
+
),
|
|
27
31
|
);
|
|
28
32
|
|
|
29
33
|
$quotation-mark-bottom-position: (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
34
|
+
default: (
|
|
35
|
+
left: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
),
|
|
38
|
+
oneline: (
|
|
39
|
+
left: 0,
|
|
40
|
+
bottom: 0,
|
|
41
|
+
),
|
|
42
|
+
);
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
1
|
+
@use "./config";
|
|
2
|
+
@use "../../../styles/tokens/base";
|
|
3
|
+
@use "../../../styles/tokens/space";
|
|
4
|
+
@use "../../../styles/tools/generate";
|
|
5
|
+
@use "../../../styles/tools/convert";
|
|
6
6
|
|
|
7
7
|
@mixin base {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
padding: space.get("small") space.get("large") space.get("small")
|
|
9
|
+
convert.to-rem(40px);
|
|
10
|
+
width: fit-content;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@mixin quotation-mark {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
font-size: convert.to-rem(14px);
|
|
15
|
+
position: relative;
|
|
16
|
+
&::before,
|
|
17
|
+
&::after {
|
|
18
|
+
content: "";
|
|
19
|
+
display: block;
|
|
20
|
+
position: absolute;
|
|
21
|
+
height: convert.to-rem(18px);
|
|
22
|
+
width: convert.to-rem(20px);
|
|
23
|
+
background-repeat: no-repeat;
|
|
24
|
+
background-color: config.$black;
|
|
25
|
+
}
|
|
26
|
+
&::before {
|
|
27
|
+
@include generate.css-map(config.$quotation-mark-bottom);
|
|
28
|
+
@include generate.css-map(
|
|
29
|
+
config.$quotation-mark-bottom-position,
|
|
30
|
+
"default"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
&::after {
|
|
34
|
+
@include generate.css-map(config.$quotation-mark-top);
|
|
35
|
+
@include generate.css-map(config.$quotation-mark-top-position, "default");
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
@mixin orange {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
40
|
+
&::before,
|
|
41
|
+
&::after {
|
|
42
|
+
background-color: config.$orange;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
1
|
+
@use "sass:math" as math;
|
|
2
|
+
@use "../../../styles/tokens/base";
|
|
3
|
+
@use "../../../styles/tools/generate";
|
|
4
|
+
@use "../../../styles/tools/convert";
|
|
5
|
+
@use "../../../styles/tools/layout";
|
|
6
|
+
@use "./config";
|
|
7
7
|
|
|
8
8
|
@mixin tooltip($config: config.$layout, $offset: config.$offset) {
|
|
9
9
|
position: absolute;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@each $direction, $opposite in config.$direction-opposites {
|
|
21
|
-
&[data-popper-placement^=
|
|
21
|
+
&[data-popper-placement^="#{$direction}"] {
|
|
22
22
|
padding-#{$opposite}: $offset;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -42,13 +42,14 @@
|
|
|
42
42
|
$size-unitless: convert.strip-units($size);
|
|
43
43
|
$hypotenuse: math.sqrt(
|
|
44
44
|
math.pow($size-unitless, 2) + math.pow($size-unitless, 2)
|
|
45
|
-
) *
|
|
45
|
+
) *
|
|
46
|
+
1rem;
|
|
46
47
|
$arrow-position: $offset - math.div($hypotenuse, 4);
|
|
47
48
|
|
|
48
49
|
display: block;
|
|
49
50
|
|
|
50
51
|
&::before {
|
|
51
|
-
content:
|
|
52
|
+
content: "";
|
|
52
53
|
display: block;
|
|
53
54
|
width: $size;
|
|
54
55
|
height: $size;
|
|
@@ -59,13 +60,13 @@
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
@each $direction, $opposite in config.$direction-opposites {
|
|
62
|
-
[data-popper-placement^=
|
|
63
|
+
[data-popper-placement^="#{$direction}"] & {
|
|
63
64
|
#{$opposite}: $arrow-position;
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
@each $direction, $reset-directions in config.$direction-border-color-reset {
|
|
68
|
-
[data-popper-placement^=
|
|
69
|
+
[data-popper-placement^="#{$direction}"] &:before {
|
|
69
70
|
@each $reset-direction in $reset-directions {
|
|
70
71
|
border-#{$reset-direction}-color: transparent;
|
|
71
72
|
}
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
@include base.focusring-round;
|
|
81
82
|
|
|
82
83
|
&::before {
|
|
83
|
-
content:
|
|
84
|
+
content: "";
|
|
84
85
|
position: absolute;
|
|
85
86
|
top: convert.to-rem(-10px);
|
|
86
87
|
left: convert.to-rem(-10px);
|
|
@@ -91,4 +92,4 @@
|
|
|
91
92
|
|
|
92
93
|
@mixin info-tooltip-active-icon {
|
|
93
94
|
color: config.$icon-active-color;
|
|
94
|
-
}
|
|
95
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -60,7 +60,7 @@ import { IconList, Item } from "./IconList";
|
|
|
60
60
|
import { Image } from "./Image";
|
|
61
61
|
import { Link } from "./Link";
|
|
62
62
|
import { List, ListItem } from "./List";
|
|
63
|
-
import { Loader } from "./Loader";
|
|
63
|
+
import { Loader, LoaderFullscreen } from "./Loader";
|
|
64
64
|
import { Megamenu, MegamenuBlog } from "./Megamenu";
|
|
65
65
|
import {
|
|
66
66
|
Modal,
|
|
@@ -155,6 +155,7 @@ export {
|
|
|
155
155
|
List,
|
|
156
156
|
ListItem,
|
|
157
157
|
Loader,
|
|
158
|
+
LoaderFullscreen,
|
|
158
159
|
Megamenu,
|
|
159
160
|
MegamenuBlog,
|
|
160
161
|
Message,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
2
|
@use "sass:meta";
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
3
|
+
@use "sass:map" as sassmap;
|
|
4
|
+
@use "../tools/map";
|
|
5
5
|
|
|
6
6
|
$map: (
|
|
7
7
|
xs: 0,
|
|
@@ -12,78 +12,93 @@ $map: (
|
|
|
12
12
|
xxl: 1380px,
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
@mixin get(
|
|
16
|
-
@if (not sassmap.has-key($map, $breakpoint) and $breakpoint !=
|
|
15
|
+
@mixin get($breakpoint, $param: false) {
|
|
16
|
+
@if (not sassmap.has-key($map, $breakpoint) and $breakpoint != "default") {
|
|
17
17
|
@warn 'Breakpoint "#{$breakpoint}" is not defined.';
|
|
18
18
|
|
|
19
|
-
@debug
|
|
19
|
+
@debug "Available breakpoints:"; // stylelint-disable-line at-rule-disallowed-list
|
|
20
20
|
@debug $map; // stylelint-disable-line at-rule-disallowed-list
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@if (
|
|
24
24
|
($breakpoint == list.nth(sassmap.keys($map), 1) and not $param) or
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(not $breakpoint) or
|
|
26
|
+
($breakpoint == "default")
|
|
27
27
|
) {
|
|
28
28
|
@content;
|
|
29
29
|
} @else if not $param {
|
|
30
30
|
// no param, just a standard mobile first media query
|
|
31
|
-
@if sassmap.has-key(
|
|
31
|
+
@if sassmap.has-key($map, $breakpoint) {
|
|
32
32
|
// breakpoint is in breakpoint map, let's use stored value
|
|
33
|
-
@media screen and (min-width: sassmap.get($map, $breakpoint)) {
|
|
33
|
+
@media screen and (min-width: sassmap.get($map, $breakpoint)) {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
34
36
|
} @else {
|
|
35
37
|
// breakpoint is not in breakpoint map, let's use custom value
|
|
36
|
-
@media screen and (min-width: $breakpoint) {
|
|
38
|
+
@media screen and (min-width: $breakpoint) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
37
41
|
}
|
|
38
|
-
} @else if (
|
|
39
|
-
$param == 'down' and
|
|
40
|
-
map.next($map, $breakpoint)
|
|
41
|
-
) {
|
|
42
|
+
} @else if ($param == "down" and map.next($map, $breakpoint)) {
|
|
42
43
|
@media screen and (max-width: map.next($map, $breakpoint) - 0.02px) {
|
|
43
44
|
@content;
|
|
44
45
|
}
|
|
45
|
-
} @else if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
} @else if ($param == "down" and not sassmap.has-key($map, $breakpoint)) {
|
|
47
|
+
@media screen and (max-width: $breakpoint) {
|
|
48
|
+
@content;
|
|
49
|
+
}
|
|
50
|
+
} @else if ($param == "only" and map.next($map, $breakpoint)) {
|
|
51
|
+
@media screen and (min-width: sassmap.get($map, $breakpoint)) and (max-width: map.next($map, $breakpoint) - 0.02px) {
|
|
52
|
+
@content;
|
|
53
|
+
}
|
|
54
|
+
} @else if
|
|
55
|
+
(sassmap.has-key($map, $param) and sassmap.has-key($map, $breakpoint))
|
|
56
|
+
{
|
|
57
|
+
@media screen and (min-width: sassmap.get($map, $breakpoint)) and (max-width: sassmap.get($map, $param) - 0.02px) {
|
|
58
|
+
@content;
|
|
59
|
+
}
|
|
60
|
+
} @else if
|
|
61
|
+
(
|
|
62
|
+
$param ==
|
|
63
|
+
"downfrom" and
|
|
64
|
+
sassmap.get($map, $breakpoint) >
|
|
65
|
+
0 and
|
|
66
|
+
$breakpoint !=
|
|
67
|
+
"xs"
|
|
68
|
+
)
|
|
69
|
+
{
|
|
69
70
|
@media screen and (max-width: sassmap.get($map, $breakpoint) - 0.02px) {
|
|
70
71
|
@content;
|
|
71
72
|
} // -1
|
|
72
|
-
} @else if (meta.type-of($param) ==
|
|
73
|
+
} @else if (meta.type-of($param) == "number") {
|
|
73
74
|
@if sassmap.has-key($map, $breakpoint) {
|
|
74
75
|
// breakpoint is in breakpoint map
|
|
75
|
-
@media screen and
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
@media screen and (min-width: sassmap.get($map, $breakpoint)) and (max-width: $param) {
|
|
77
|
+
@content;
|
|
78
|
+
}
|
|
78
79
|
} @else {
|
|
79
80
|
// breakpoint is not in breakpoint map, let's use custom value
|
|
80
|
-
@media screen and (min-width: $breakpoint) and (max-width: $param) {
|
|
81
|
+
@media screen and (min-width: $breakpoint) and (max-width: $param) {
|
|
82
|
+
@content;
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
|
-
} @else if
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
} @else if
|
|
86
|
+
(
|
|
87
|
+
not
|
|
88
|
+
(
|
|
89
|
+
$breakpoint == list.nth(sassmap.keys($map), -1) and $param == "down"
|
|
90
|
+
) and not
|
|
91
|
+
(
|
|
92
|
+
$breakpoint == list.nth(sassmap.keys($map), -1) and $param == "only"
|
|
93
|
+
) and not
|
|
94
|
+
(
|
|
95
|
+
$breakpoint ==
|
|
96
|
+
list.nth(sassmap.keys($map), 1) and
|
|
97
|
+
$param ==
|
|
98
|
+
"downfrom"
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
{
|
|
87
102
|
// do nothing on known edge cases. we just dont generate any code.
|
|
88
103
|
@warn 'Breakpoint is not configured properly #{$breakpoint}, #{$param}';
|
|
89
104
|
}
|
|
@@ -92,7 +107,7 @@ $map: (
|
|
|
92
107
|
@mixin each() {
|
|
93
108
|
@each $breakpoint, $size in $map {
|
|
94
109
|
@include get($breakpoint) {
|
|
95
|
-
@content($breakpoint);
|
|
110
|
+
@content ($breakpoint);
|
|
96
111
|
}
|
|
97
112
|
}
|
|
98
113
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "sass:math";
|
|
3
|
-
@use
|
|
3
|
+
@use "../tools/convert";
|
|
4
4
|
|
|
5
5
|
$map: (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
"none": 0,
|
|
7
|
+
"xsmall": 5px,
|
|
8
|
+
"small": 10px,
|
|
9
|
+
"medium": 20px,
|
|
10
|
+
"large": 30px,
|
|
11
|
+
"xlarge": 60px,
|
|
12
12
|
);
|
|
13
13
|
|
|
14
14
|
/// Get space size from $space
|
|
@@ -16,11 +16,11 @@ $map: (
|
|
|
16
16
|
/// @example
|
|
17
17
|
/// get-space();
|
|
18
18
|
/// get-space('small');
|
|
19
|
-
@function get($size:
|
|
19
|
+
@function get($size: "medium") {
|
|
20
20
|
@if map.has-key($map, $size) {
|
|
21
21
|
$space: map.get($map, $size);
|
|
22
22
|
|
|
23
|
-
@return if(math.unit($space) ==
|
|
23
|
+
@return if(math.unit($space) == "rem", $space, convert.to-rem($space));
|
|
24
24
|
} @else {
|
|
25
25
|
@error 'Cannot find key ($size) \'#{$size}\' in $space \'#{$space}\'';
|
|
26
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use "../tokens/breakpoint";
|
|
2
|
+
@use "./map" as *;
|
|
3
3
|
|
|
4
4
|
/// Get css propeties from map
|
|
5
5
|
///
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
/// @param {Map} $map - map
|
|
69
69
|
/// @param {Map} $className - class name of element
|
|
70
70
|
/// @param {Map} $classSuffix - suffix for class name of element
|
|
71
|
-
@mixin variants($map, $className:
|
|
71
|
+
@mixin variants($map, $className: "", $classSuffix: "") {
|
|
72
72
|
@each $variant, $props in $map {
|
|
73
73
|
#{if(&, "&", "")}#{$className + variant-name($variant) + $classSuffix} {
|
|
74
74
|
@include css-map($props);
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
/// @param {Map} $map - map
|
|
82
82
|
/// @param {Map} $className - class name of element
|
|
83
83
|
/// @param {Map} $classSuffix - suffix for class name of element
|
|
84
|
-
@mixin responsive-variants($map, $className:
|
|
84
|
+
@mixin responsive-variants($map, $className: "", $classSuffix: "") {
|
|
85
85
|
@each $breakpoint, $props in $map {
|
|
86
86
|
@include breakpoint.get($breakpoint) {
|
|
87
87
|
@include variants($props, $className, $classSuffix);
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
/// // -primary
|
|
98
98
|
/// variant-name('default')
|
|
99
99
|
///
|
|
100
|
-
@function variant-name($name, $prefix:
|
|
100
|
+
@function variant-name($name, $prefix: "--", $suffix: "") {
|
|
101
101
|
@if not $name or $name == default or $name == xs {
|
|
102
|
-
@return
|
|
102
|
+
@return "";
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
@return #{$prefix + $name + $suffix};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../tokens/base";
|
|
2
2
|
|
|
3
3
|
// -- Nicolas Gallagher's micro clearfix
|
|
4
4
|
@mixin clearfix {
|
|
5
5
|
&::before,
|
|
6
6
|
&::after {
|
|
7
7
|
// For modern browsers
|
|
8
|
-
content:
|
|
8
|
+
content: "";
|
|
9
9
|
display: table;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Resets margin-bottom of the last child to zero
|
|
19
19
|
*/
|
|
20
20
|
@mixin reset-last-child-margin-bottom {
|
|
21
|
-
> :not([class*=
|
|
21
|
+
> :not([class*="mb\-"]):last-child {
|
|
22
22
|
margin-bottom: 0;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/// @param {Mixed} $key - Key to use as a starting point.
|
|
10
10
|
///
|
|
11
11
|
/// @returns {Mixed} The value for the key after `$key`, if `$key` was found. If `$key` was not found, or `$key` was the last value in the map, returns `null`.
|
|
12
|
-
@function next($map, $key, $return:
|
|
12
|
+
@function next($map, $key, $return: "value") {
|
|
13
13
|
// Store the keys of the map as a list
|
|
14
14
|
$values: map.keys($map);
|
|
15
15
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
// Otherwise, return the value
|
|
28
28
|
@else {
|
|
29
|
-
@if $return ==
|
|
29
|
+
@if $return == "value" {
|
|
30
30
|
@return map.get($map, list.nth($values, $i));
|
|
31
31
|
} @else {
|
|
32
32
|
@return list.nth($values, $i);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/// @param {String} $search - Substring to replace
|
|
13
13
|
/// @param {String} $replace ('') - New value
|
|
14
14
|
/// @return {String} - Updated string
|
|
15
|
-
@function str-replace($string, $search, $replace:
|
|
15
|
+
@function str-replace($string, $search, $replace: "") {
|
|
16
16
|
$index: string.index($string, $search);
|
|
17
17
|
|
|
18
18
|
@if $index {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@forward
|
|
2
|
-
@forward
|
|
3
|
-
@forward
|
|
4
|
-
@forward
|
|
5
|
-
@forward
|
|
6
|
-
@forward
|
|
7
|
-
@forward
|
|
1
|
+
@forward "color";
|
|
2
|
+
@forward "text";
|
|
3
|
+
@forward "border";
|
|
4
|
+
@forward "layout";
|
|
5
|
+
@forward "visibility";
|
|
6
|
+
@forward "ordering";
|
|
7
|
+
@forward "horizontal-scroll";
|