prlg-ui 1.8.353 → 1.8.354

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,3 +1,5 @@
1
+ @use "sass:map";
2
+
1
3
  /**
2
4
  * Миксин для подключения шрифтов
3
5
  * @param {string} $font-family - Название семейства шрифтов
@@ -17,40 +19,22 @@
17
19
  */
18
20
 
19
21
  @mixin font-face($font-family, $weights) {
22
+ $weight-names: (
23
+ 100: "Thin",
24
+ 200: "ExtraLight",
25
+ 300: "Light",
26
+ 400: "Regular",
27
+ 500: "Medium",
28
+ 600: "SemiBold",
29
+ 700: "Bold",
30
+ 800: "ExtraBold",
31
+ 900: "Black",
32
+ );
33
+
20
34
  @each $weight in $weights {
21
- $weight-name: if(
22
- $weight == 100,
23
- "Thin",
24
- if(
25
- $weight == 200,
26
- "ExtraLight",
27
- if(
28
- $weight == 300,
29
- "Light",
30
- if(
31
- $weight == 400,
32
- "Regular",
33
- if(
34
- $weight == 500,
35
- "Medium",
36
- if(
37
- $weight == 600,
38
- "SemiBold",
39
- if(
40
- $weight == 700,
41
- "Bold",
42
- if(
43
- $weight == 800,
44
- "ExtraBold",
45
- if($weight == 900, "Black", $weight)
46
- )
47
- )
48
- )
49
- )
50
- )
51
- )
52
- )
53
- );
35
+ // Используем новый синтаксис map.get()
36
+ $weight-name: map.get($weight-names, $weight);
37
+
54
38
  @font-face {
55
39
  font-family: "#{$font-family}";
56
40
  font-weight: #{$weight};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prlg-ui",
3
3
  "private": false,
4
- "version": "1.8.353",
4
+ "version": "1.8.354",
5
5
  "type": "module",
6
6
  "main": "dist/prlg-ui.umd.js",
7
7
  "module": "dist/prlg-ui.es.js",
Binary file