@tedi-design-system/core 2.0.0 → 2.2.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.
package/_base.scss CHANGED
@@ -14,11 +14,10 @@ html {
14
14
 
15
15
  body {
16
16
  box-sizing: border-box;
17
+ font-family: var(--family-default);
18
+ font-size: var(--body-regular-size);
19
+ line-height: var(--body-regular-line-height);
17
20
  color: var(--general-text-primary);
18
-
19
- @include mixins.responsive-styles(font-family, family-primary, $exclude: tablet);
20
- @include mixins.responsive-styles(line-height, body-regular-line-height, $exclude: tablet);
21
- @include mixins.responsive-styles(font-size, body-regular-size, $exclude: tablet);
22
21
  }
23
22
 
24
23
  *,
package/_fonts.scss CHANGED
@@ -251,3 +251,13 @@
251
251
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
252
252
  U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
253
253
  }
254
+
255
+ @font-face {
256
+ font-family: "Space Grotesk";
257
+ font-style: normal;
258
+ font-weight: 300;
259
+ src: url('/fonts/SpaceGrotesk-Light.woff2') format('woff2');
260
+ font-display: swap;
261
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
262
+ U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
263
+ }
package/_mixins.scss CHANGED
@@ -15,36 +15,15 @@ $breakpoints: (
15
15
  $result: '';
16
16
 
17
17
  @each $name in $variable-names {
18
- $result: #{$result} var(--#{$name}-#{$suffix});
18
+ $prefixed: var(--#{$name});
19
+ $result: #{$result} #{$prefixed};
19
20
  }
20
21
 
21
22
  @return $result;
22
23
  }
23
24
 
24
- @mixin responsive-styles($property, $names, $exclude: null) {
25
- $variable-names: ();
26
-
27
- @if meta.type-of($names) == 'string' {
28
- $variable-names: (string.slice($names, 1, -1));
29
- } @else {
30
- $variable-names: $names;
31
- }
32
-
33
- & {
34
- #{$property}: #{construct-variables($variable-names, mobile)};
35
- }
36
-
37
- @if $exclude != 'tablet' {
38
- @media (min-width: map.get($breakpoints, sm)) {
39
- #{$property}: #{construct-variables($variable-names, tablet)};
40
- }
41
- }
42
-
43
- @if $exclude != 'desktop' {
44
- @media (min-width: map.get($breakpoints, lg)) {
45
- #{$property}: #{construct-variables($variable-names, desktop)};
46
- }
47
- }
25
+ @mixin responsive-styles($property, $name, $exclude: null) {
26
+ #{$property}: var(--#{$name});
48
27
  }
49
28
 
50
29
  @mixin print-grayscale {
package/_typography.scss CHANGED
@@ -2,13 +2,14 @@
2
2
 
3
3
  $headings: (h1, h2, h3, h4, h5, h6);
4
4
 
5
- // Mixin for heading styles
5
+ // Mixin for heading styles (simplified variable usage)
6
6
  @mixin heading-styles($level) {
7
- @include mixins.responsive-styles(font-size, heading-#{$level}-size, $exclude: tablet);
8
- @include mixins.responsive-styles(font-weight, heading-#{$level}-weight, $exclude: tablet);
9
- @include mixins.responsive-styles(line-height, heading-#{$level}-line-height, $exclude: tablet);
7
+ font-size: var(--heading-#{$level}-size);
8
+ font-weight: var(--heading-#{$level}-weight);
9
+ line-height: var(--heading-#{$level}-line-height);
10
10
  }
11
11
 
12
+ // Apply heading styles to semantic and utility selectors
12
13
  @each $level in $headings {
13
14
  #{$level},
14
15
  .#{$level},
@@ -27,57 +28,54 @@ $headings: (h1, h2, h3, h4, h5, h6);
27
28
  }
28
29
 
29
30
  &--default {
31
+ font-family: var(--family-default);
32
+ font-size: var(--body-regular-size);
33
+ font-weight: var(--body-regular-weight);
34
+ line-height: var(--body-regular-line-height);
30
35
  color: var(--general-text-primary);
31
-
32
- @include mixins.responsive-styles(font-family, family-primary, $exclude: tablet);
33
- @include mixins.responsive-styles(font-size, body-regular-size, $exclude: tablet);
34
- @include mixins.responsive-styles(font-weight, body-regular-weight, $exclude: tablet);
35
- @include mixins.responsive-styles(line-height, body-regular-line-height, $exclude: tablet);
36
36
  }
37
37
 
38
38
  &--small {
39
- @include mixins.responsive-styles(font-size, body-small-regular-size, $exclude: tablet);
40
- @include mixins.responsive-styles(font-weight, body-small-regular-weight, $exclude: tablet);
41
- @include mixins.responsive-styles(line-height, body-small-regular-line-height, $exclude: tablet);
39
+ font-size: var(--body-small-regular-size);
40
+ font-weight: var(--body-small-regular-weight);
41
+ line-height: var(--body-small-regular-line-height);
42
42
  }
43
43
  }
44
44
 
45
45
  .text-subtitle {
46
+ font-size: var(--heading-subtitle-regular-size);
47
+ font-weight: var(--heading-subtitle-regular-weight);
48
+ line-height: var(--heading-subtitle-regular-line-height);
46
49
  text-transform: uppercase;
47
50
 
48
- @include mixins.responsive-styles(font-size, heading-subtitle-regular-size, $exclude: tablet);
49
- @include mixins.responsive-styles(font-weight, heading-subtitle-regular-weight, $exclude: tablet);
50
- @include mixins.responsive-styles(line-height, heading-subtitle-regular-line-height, $exclude: tablet);
51
-
52
51
  &.text-small {
53
- @include mixins.responsive-styles(font-size, heading-subtitle-small-size, $exclude: tablet);
54
- @include mixins.responsive-styles(font-weight, heading-subtitle-small-weight, $exclude: tablet);
55
- @include mixins.responsive-styles(line-height, heading-subtitle-small-line-height, $exclude: tablet);
52
+ font-size: var(--heading-subtitle-small-size);
53
+ font-weight: var(--heading-subtitle-small-weight);
54
+ line-height: var(--heading-subtitle-small-line-height);
56
55
  }
57
56
  }
58
57
 
59
58
  label {
59
+ line-height: var(--body-regular-line-height);
60
60
  color: var(--general-text-secondary);
61
-
62
- @include mixins.responsive-styles(line-height, body-regular-line-height);
63
61
  }
64
62
 
65
63
  .text-normal {
64
+ font-family: var(--family-default);
65
+ font-size: var(--body-regular-size);
66
+ font-weight: var(--body-regular-weight);
67
+ line-height: var(--body-regular-line-height);
66
68
  color: var(--general-text-primary);
67
-
68
- @include mixins.responsive-styles(font-family, family-primary, $exclude: tablet);
69
- @include mixins.responsive-styles(font-size, body-regular-size, $exclude: tablet);
70
- @include mixins.responsive-styles(font-weight, body-regular-weight, $exclude: tablet);
71
- @include mixins.responsive-styles(line-height, body-regular-line-height, $exclude: tablet);
72
69
  }
73
70
 
74
71
  small,
75
72
  .text-small {
76
- @include mixins.responsive-styles(font-size, body-small-regular-size, $exclude: tablet);
77
- @include mixins.responsive-styles(font-weight, body-small-regular-weight, $exclude: tablet);
78
- @include mixins.responsive-styles(line-height, body-small-regular-line-height, $exclude: tablet);
73
+ font-size: var(--body-small-regular-size);
74
+ font-weight: var(--body-small-regular-weight);
75
+ line-height: var(--body-small-regular-line-height);
79
76
  }
80
77
 
78
+ // Text color variants
81
79
  @each $color,
82
80
  $var
83
81
  in (
@@ -100,6 +98,7 @@ small,
100
98
  }
101
99
  }
102
100
 
101
+ // Text utilities
103
102
  .text-nowrap {
104
103
  white-space: nowrap;
105
104
  }
Binary file
Binary file