@eui/eds-styles 22.0.0-alpha.5 → 22.0.0-alpha.51

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.
Files changed (39) hide show
  1. package/dist/base/01-base/mixins.scss +93 -20
  2. package/dist/base/02-tokens/colors-primitive.scss +72 -767
  3. package/dist/base/02-tokens/colors-semantic-dark-theme.scss +101 -322
  4. package/dist/base/02-tokens/colors-semantic.scss +107 -322
  5. package/dist/base/02-tokens/dimensions-primitive.scss +10 -23
  6. package/dist/base/02-tokens/dimensions-semantic.scss +1 -0
  7. package/dist/base/02-tokens/ecl/primitives/_breakpoint.scss +16 -0
  8. package/dist/base/02-tokens/ecl/primitives/_color-domain.scss +189 -0
  9. package/dist/base/02-tokens/ecl/primitives/_color.scss +190 -0
  10. package/dist/base/02-tokens/ecl/primitives/_dimension.scss +31 -0
  11. package/dist/base/02-tokens/ecl/primitives/_grid.scss +25 -0
  12. package/dist/base/02-tokens/ecl/primitives/_index.scss +14 -0
  13. package/dist/base/02-tokens/ecl/primitives/_typography.scss +58 -0
  14. package/dist/base/02-tokens/ecl/semantic/_border.scss +22 -0
  15. package/dist/base/02-tokens/ecl/semantic/_color-dark.scss +187 -0
  16. package/dist/base/02-tokens/ecl/semantic/_color-domain-dark.scss +172 -0
  17. package/dist/base/02-tokens/ecl/semantic/_color-domain.scss +172 -0
  18. package/dist/base/02-tokens/ecl/semantic/_color.scss +187 -0
  19. package/dist/base/02-tokens/ecl/semantic/_index.scss +17 -0
  20. package/dist/base/02-tokens/ecl/semantic/_opacity.scss +21 -0
  21. package/dist/base/02-tokens/ecl/semantic/_shadow-dark.scss +43 -0
  22. package/dist/base/02-tokens/ecl/semantic/_shadow.scss +41 -0
  23. package/dist/base/02-tokens/ecl/semantic/_spacing.scss +60 -0
  24. package/dist/base/02-tokens/ecl/semantic/_typography.scss +288 -0
  25. package/dist/base/02-tokens/maps.scss +29 -71
  26. package/dist/base/02-tokens/typography-primitive.scss +29 -59
  27. package/dist/base/02-tokens/typography-semantic.scss +3 -122
  28. package/dist/base/03-vars/typography.scss +5 -3
  29. package/dist/base/04-elements/table.scss +2 -1
  30. package/dist/base/99-utilities/typography.scss +3 -0
  31. package/dist/eds-showcase-exports.css +1 -1
  32. package/dist/eds-showcase-exports.css.map +1 -1
  33. package/dist/eds-utilities.css +1 -1
  34. package/dist/eds-utilities.css.map +1 -1
  35. package/dist/eds-vars.css +1 -1
  36. package/dist/eds-vars.css.map +1 -1
  37. package/dist/eds.css +1 -1
  38. package/dist/eds.css.map +1 -1
  39. package/package.json +1 -1
@@ -1,87 +1,45 @@
1
1
  @use 'sass:map';
2
2
  @use '../01-base' as base;
3
- @use './colors-primitive' as colors-primitive;
3
+ @use './ecl/primitives/breakpoint' as ecl-breakpoint;
4
+ @use './ecl/semantic/border' as ecl-border;
5
+ @use './ecl/semantic/opacity' as ecl-opacity;
6
+ @use './ecl/semantic/shadow' as ecl-shadow;
4
7
 
5
- // BORDER RADIUS
6
-
7
- $border-radius-map: (
8
- none: 0,
9
- xs: 2px,
10
- s: 4px,
11
- m: 8px,
12
- l: 12px,
13
- full: 999px
14
- );
8
+ // BORDER RADIUS / BORDER WIDTH
9
+ //
10
+ // Sourced from the ecl-eds foundations semantic layer (single source of truth).
11
+ // The `$border-radius-map` / `$border-width-map` names are retained as the
12
+ // consumer-facing aliases; their values come verbatim from
13
+ // `ecl/semantic/_border.scss` ($border-radius / $border-width).
14
+ // To change a value, edit the upstream source and re-run tools/ecl-import.mjs.
15
15
 
16
+ $border-radius-map: ecl-border.$border-radius;
16
17
 
17
- // BORDER WIDTH
18
-
19
- $border-width-map: (
20
- none: 0,
21
- xs: 1px,
22
- s: 2px,
23
- m: 4px
24
- );
18
+ $border-width-map: ecl-border.$border-width;
25
19
 
26
20
  // OPACITY
27
21
 
28
- $opacity-map: (
29
- none: 0,
30
- 10: 0.1,
31
- 20: 0.2,
32
- 30: 0.3,
33
- 40: 0.4,
34
- 50: 0.5,
35
- 60: 0.6,
36
- 70: 0.7,
37
- 80: 0.8,
38
- 90: 0.9,
39
- 100: 1
40
- );
22
+ // Sourced from the ecl-eds foundations semantic layer (single source of truth).
23
+ // The `$opacity-map` name is retained as the consumer-facing alias; its values
24
+ // come verbatim from `ecl/semantic/_opacity.scss` ($opacity).
25
+ // To change a value, edit the upstream source and re-run tools/ecl-import.mjs.
26
+ $opacity-map: ecl-opacity.$opacity;
41
27
 
42
28
  // SHADOWS
43
-
44
- $shadow-map: (
45
- 1: (
46
- offset-x: 0px,
47
- offset-y: 6px,
48
- blur: 12px,
49
- spread: 0px,
50
- color: map.get(colors-primitive.$color-map, 'alpha-silver-fog-950-8'),
51
- ),
52
- 2: (
53
- offset-x: 0px,
54
- offset-y: 10px,
55
- blur: 22px,
56
- spread: 0px,
57
- color: map.get(colors-primitive.$color-map, 'alpha-silver-fog-950-10'),
58
- ),
59
- 3: (
60
- offset-x: 0px,
61
- offset-y: 12px,
62
- blur: 32px,
63
- spread: 0px,
64
- color: map.get(colors-primitive.$color-map, 'alpha-silver-fog-950-12'),
65
- ),
66
- 4: (
67
- offset-x: 0px,
68
- offset-y: 14px,
69
- blur: 42px,
70
- spread: 0px,
71
- color: map.get(colors-primitive.$color-map, 'alpha-silver-fog-950-14'),
72
- )
73
- );
29
+ //
30
+ // Sourced from the ecl-eds foundations semantic layer (single source of truth).
31
+ // The `$shadow-map` name is retained as the consumer-facing alias; its values
32
+ // (offset/blur/spread + alpha color) come verbatim from `ecl/semantic/_shadow.scss`
33
+ // ($shadow). To change a value, edit the upstream source and re-run tools/ecl-import.mjs.
34
+ $shadow-map: ecl-shadow.$shadow;
74
35
 
75
36
  // BREAKPOINTS
76
37
 
77
- $breakpoint-size-map: (
78
- xs: 480px,
79
- s: 768px,
80
- m: 996px,
81
- l: 1140px,
82
- xl: 1440px,
83
- 2xl: 1600px,
84
- );
38
+ // Sourced from the ecl-eds foundations primitives (single source of truth).
39
+ // The `$breakpoint-size-map` name is retained as the consumer-facing alias; its
40
+ // values come verbatim from `ecl/primitives/_breakpoint.scss` ($breakpoint).
41
+ // To change a value, edit the upstream primitive and re-run tools/ecl-import.mjs.
42
+ $breakpoint-size-map: ecl-breakpoint.$breakpoint;
85
43
 
86
44
  $breakpoint-map: (
87
45
  mobile-s: base.new-breakpoint(max-width map.get($breakpoint-size-map, 'xs') - 1),
@@ -1,69 +1,39 @@
1
1
  @use 'sass:map';
2
- @use '../02-tokens/dimensions-primitive' as dimensions-primitive;
2
+ @use './ecl/primitives/typography' as ecl-typography;
3
3
 
4
- $font-size-list: ('2xs', 'xs', 's', 'm', 'l', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl', '8xl', '9xl');
5
-
6
- $font-size-map: (
7
- '9xl': 6rem, // 96px
8
- '8xl': 4rem, // 64px
9
- '7xl': 3.25rem, // 52px
10
- '6xl': 2.75rem, // 44px
11
- '5xl': 2.25rem, // 36px
12
- '4xl': 1.75rem, // 28px
13
- '3xl': 1.5rem, // 24px
14
- '2xl': 1.375rem, // 22px
15
- 'xl': 1.25rem, // 20px
16
- 'l': 1.125rem, // 18px
17
- 'm': 1rem, // 16px
18
- 's': 0.875rem, // 14px
19
- 'xs': 0.75rem, // 12px
20
- '2xs': 0.625rem // 10px
21
- );
22
-
23
- // font weight map
4
+ // PRIMITIVE TYPOGRAPHY MAPS
5
+ //
6
+ // Sourced from the ecl-eds foundations primitives (single source of truth):
7
+ // ecl/primitives/_typography.scss ($font-size, $font-line-height, $font-weight).
8
+ // Consumer-facing names are retained as aliases. To change a value, edit the
9
+ // upstream primitive and re-run tools/ecl-import.mjs.
24
10
 
25
- $font-weight-map: (
26
- 'light': 300,
27
- 'regular': 400,
28
- 'medium': 500,
29
- 'semi-bold': 600,
30
- 'bold': 700
31
- );
11
+ // Not present upstream — kept local (used by the showcase typography exports).
12
+ $font-size-list: ('2xs', 'xs', 's', 'm', 'l', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl', '8xl', '9xl');
32
13
 
33
- $font-line-height-map: (
34
- '10xl': map.get(dimensions-primitive.$dimension-map, 96),
35
- '9xl': map.get(dimensions-primitive.$dimension-map, 64),
36
- '8xl': map.get(dimensions-primitive.$dimension-map, 60),
37
- '7xl': map.get(dimensions-primitive.$dimension-map, 56),
38
- '6xl': map.get(dimensions-primitive.$dimension-map, 52),
39
- '5xl': map.get(dimensions-primitive.$dimension-map, 48),
40
- '4xl': map.get(dimensions-primitive.$dimension-map, 44),
41
- '3xl': map.get(dimensions-primitive.$dimension-map, 40),
42
- '2xl': map.get(dimensions-primitive.$dimension-map, 36),
43
- 'xl': map.get(dimensions-primitive.$dimension-map, 32),
44
- 'l': map.get(dimensions-primitive.$dimension-map, 28),
45
- 'm': map.get(dimensions-primitive.$dimension-map, 24),
46
- 's': map.get(dimensions-primitive.$dimension-map, 20),
47
- 'xs': map.get(dimensions-primitive.$dimension-map, 16),
48
- '2xs': map.get(dimensions-primitive.$dimension-map, 12)
49
- );
14
+ // Direct aliases — values and keys are identical to the upstream maps.
15
+ // EDS uses the CSS-spec weight keyword `semibold` (matching the upstream), so the
16
+ // weight map passes through with no re-keying.
17
+ $font-size-map: ecl-typography.$font-size;
18
+ $font-line-height-map: ecl-typography.$font-line-height;
19
+ $font-weight-map: ecl-typography.$font-weight;
50
20
 
51
21
  // semantic font-size link to letter-spacing map
52
22
  $font-size-letter-spacing-map: (
53
- '9xl': -2%,
54
- '8xl': -2%,
55
- '7xl': -2%,
56
- '6xl': -1%,
57
- '5xl': -1%,
58
- '4xl': -1%,
59
- '3xl': -1%,
60
- '2xl': normal,
61
- 'xl': normal,
62
- 'l': normal,
63
- 'm': normal,
64
- 's': normal,
65
- 'xs': normal,
66
- '2xs': normal
23
+ '9xl': map.get(ecl-typography.$letter-spacing, 'neg-s'),
24
+ '8xl': map.get(ecl-typography.$letter-spacing, 'neg-s'),
25
+ '7xl': map.get(ecl-typography.$letter-spacing, 'neg-s'),
26
+ '6xl': map.get(ecl-typography.$letter-spacing, 'neg-xs'),
27
+ '5xl': map.get(ecl-typography.$letter-spacing, 'neg-xs'),
28
+ '4xl': map.get(ecl-typography.$letter-spacing, 'neg-xs'),
29
+ '3xl': map.get(ecl-typography.$letter-spacing, 'neg-xs'),
30
+ '2xl': map.get(ecl-typography.$letter-spacing, 'default'),
31
+ 'xl': map.get(ecl-typography.$letter-spacing, 'default'),
32
+ 'l': map.get(ecl-typography.$letter-spacing, 'default'),
33
+ 'm': map.get(ecl-typography.$letter-spacing, 'default'),
34
+ 's': map.get(ecl-typography.$letter-spacing, 'default'),
35
+ 'xs': map.get(ecl-typography.$letter-spacing, 'default'),
36
+ '2xs': map.get(ecl-typography.$letter-spacing, 'default')
67
37
  );
68
38
 
69
39
 
@@ -1,122 +1,3 @@
1
- $typography-semantic-map: (
2
- desktop: (
3
- display: (
4
- xl: ( size: 9xl, line-height: 10xl, weight: regular ),
5
- l: ( size: 8xl, line-height: 9xl, weight: semi-bold ),
6
- ),
7
- heading: (
8
- 2xl: ( size: 6xl, line-height: 6xl, weight: semi-bold ),
9
- xl: ( size: 5xl, line-height: 4xl, weight: semi-bold ),
10
- l: ( size: 4xl, line-height: 2xl, weight: semi-bold ),
11
- m: ( size: 3xl, line-height: xl, weight: semi-bold ),
12
- s: ( size: xl, line-height: l, weight: semi-bold ),
13
- s-medium: ( size: xl, line-height: l, weight: medium ),
14
- xs: ( size: l, line-height: l, weight: bold ),
15
- ),
16
- paragraph: (
17
- xl: ( size: 3xl, line-height: 2xl, weight: regular ),
18
- l: ( size: l, line-height: l, weight: regular ),
19
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
20
- l-bold: ( size: l, line-height: l, weight: bold ),
21
- m: ( size: m, line-height: m, weight: regular ),
22
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
23
- m-bold: ( size: m, line-height: m, weight: bold ),
24
- s: ( size: s, line-height: s, weight: regular ),
25
- s-semi-bold: ( size: s, line-height: s, weight: semi-bold ),
26
- s-bold: ( size: s, line-height: s, weight: bold ),
27
- ),
28
- label: (
29
- l: ( size: l, line-height: l, weight: regular ),
30
- l-medium: ( size: l, line-height: l, weight: medium ),
31
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
32
- m: ( size: m, line-height: m, weight: regular ),
33
- m-medium: ( size: m, line-height: m, weight: medium ),
34
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
35
- s: ( size: s, line-height: s, weight: regular ),
36
- ),
37
- microcopy: (
38
- xs: ( size: xs, line-height: xs, weight: medium ),
39
- 2xs: ( size: 2xs, line-height: 2xs, weight: regular ),
40
- ),
41
- ),
42
- tablet: (
43
- display: (
44
- xl: ( size: 8xl, line-height: 9xl, weight: regular ),
45
- l: ( size: 7xl, line-height: 6xl, weight: semi-bold ),
46
- ),
47
- heading: (
48
- 2xl: ( size: 5xl, line-height: 4xl, weight: semi-bold ),
49
- xl: ( size: 4xl, line-height: 2xl, weight: semi-bold ),
50
- l: ( size: 2xl, line-height: l, weight: semi-bold ),
51
- m: ( size: xl, line-height: l, weight: semi-bold ),
52
- s: ( size: l, line-height: m, weight: semi-bold ),
53
- s-medium: ( size: l, line-height: m, weight: medium ),
54
- xs: ( size: m, line-height: m, weight: bold ),
55
- ),
56
- paragraph: (
57
- xl: ( size: 2xl, line-height: xl, weight: regular ),
58
- l: ( size: l, line-height: l, weight: regular ),
59
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
60
- l-bold: ( size: l, line-height: l, weight: bold ),
61
- m: ( size: m, line-height: m, weight: regular ),
62
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
63
- m-bold: ( size: m, line-height: m, weight: bold ),
64
- s: ( size: s, line-height: s, weight: regular ),
65
- s-semi-bold: ( size: s, line-height: s, weight: semi-bold ),
66
- s-bold: ( size: s, line-height: s, weight: bold ),
67
- ),
68
- label: (
69
- l: ( size: l, line-height: l, weight: regular ),
70
- l-medium: ( size: l, line-height: l, weight: medium ),
71
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
72
- m: ( size: m, line-height: m, weight: regular ),
73
- m-medium: ( size: m, line-height: m, weight: medium ),
74
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
75
- s: ( size: s, line-height: s, weight: regular ),
76
- ),
77
- microcopy: (
78
- xs: ( size: xs, line-height: xs, weight: medium ),
79
- 2xs: ( size: 2xs, line-height: 2xs, weight: regular ),
80
- ),
81
- ),
82
- mobile: (
83
- display: (
84
- xl: ( size: 6xl, line-height: 4xl, weight: regular ),
85
- l: ( size: 5xl, line-height: 2xl, weight: semi-bold ),
86
- ),
87
- heading: (
88
- 2xl: ( size: 4xl, line-height: 2xl, weight: semi-bold ),
89
- xl: ( size: 2xl, line-height: l, weight: semi-bold ),
90
- l: ( size: xl, line-height: m, weight: semi-bold ),
91
- m: ( size: l, line-height: m, weight: semi-bold ),
92
- s: ( size: m, line-height: m, weight: semi-bold ),
93
- s-medium: ( size: m, line-height: m, weight: medium ),
94
- xs: ( size: m, line-height: m, weight: bold ),
95
- ),
96
- paragraph: (
97
- xl: ( size: xl, line-height: l, weight: regular ),
98
- l: ( size: l, line-height: l, weight: regular ),
99
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
100
- l-bold: ( size: l, line-height: l, weight: bold ),
101
- m: ( size: m, line-height: m, weight: regular ),
102
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
103
- m-bold: ( size: m, line-height: m, weight: bold ),
104
- s: ( size: s, line-height: s, weight: regular ),
105
- s-semi-bold: ( size: s, line-height: s, weight: semi-bold ),
106
- s-bold: ( size: s, line-height: s, weight: bold ),
107
- ),
108
- label: (
109
- l: ( size: l, line-height: l, weight: regular ),
110
- l-medium: ( size: l, line-height: l, weight: medium ),
111
- l-semi-bold: ( size: l, line-height: l, weight: semi-bold ),
112
- m: ( size: m, line-height: m, weight: regular ),
113
- m-medium: ( size: m, line-height: m, weight: medium ),
114
- m-semi-bold: ( size: m, line-height: m, weight: semi-bold ),
115
- s: ( size: s, line-height: s, weight: regular ),
116
- ),
117
- microcopy: (
118
- xs: ( size: xs, line-height: xs, weight: medium ),
119
- 2xs: ( size: 2xs, line-height: 2xs, weight: regular ),
120
- ),
121
- ),
122
- );
1
+ @use './ecl/semantic/typography' as ecl-typography;
2
+
3
+ $typography-semantic-map: ecl-typography.$typography;
@@ -45,9 +45,11 @@
45
45
  }
46
46
 
47
47
  // EDS typography
48
+ // Weightless `font` shorthand: `font-size / line-height font-family`.
49
+ // Apply weight separately at the call site via `--eds-f-w-<weight>`.
48
50
  @each $type, $typeDef in map.get(typography-semantic.$typography-semantic-map, 'desktop') {
49
51
  @each $size, $sizeDef in $typeDef {
50
- --eds-f-#{$type}-#{$size}: normal normal var(--eds-f-w-#{map.get($sizeDef, 'weight')}) var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
52
+ --eds-f-#{$type}-#{$size}: var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
51
53
  }
52
54
  }
53
55
 
@@ -58,7 +60,7 @@
58
60
  $desktopSizeDef: map.get($desktopTypeDef, $size);
59
61
  // Only emit override if size or line-height differs from desktop
60
62
  @if map.get($sizeDef, 'size') != map.get($desktopSizeDef, 'size') or map.get($sizeDef, 'line-height') != map.get($desktopSizeDef, 'line-height') {
61
- --eds-f-#{$type}-#{$size}: normal normal var(--eds-f-w-#{map.get($sizeDef, 'weight')}) var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
63
+ --eds-f-#{$type}-#{$size}: var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
62
64
  }
63
65
  }
64
66
  }
@@ -71,7 +73,7 @@
71
73
  $tabletSizeDef: map.get($tabletTypeDef, $size);
72
74
  // Only emit override if size or line-height differs from tablet
73
75
  @if map.get($sizeDef, 'size') != map.get($tabletSizeDef, 'size') or map.get($sizeDef, 'line-height') != map.get($tabletSizeDef, 'line-height') {
74
- --eds-f-#{$type}-#{$size}: normal normal var(--eds-f-w-#{map.get($sizeDef, 'weight')}) var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
76
+ --eds-f-#{$type}-#{$size}: var(--eds-f-s-#{map.get($sizeDef, 'size')})/var(--eds-f-lh-#{map.get($sizeDef, 'line-height')}) var(--eds-f-family);
75
77
  }
76
78
  }
77
79
  }
@@ -37,7 +37,8 @@
37
37
  color: var(--eds-c-foreground-default);
38
38
  padding: var(--eds-sp-m) var(--eds-sp-s);
39
39
  vertical-align: middle;
40
- font: var(--eds-f-label-m-semi-bold);
40
+ font: var(--eds-f-label-m);
41
+ font-weight: var(--eds-f-w-semibold);
41
42
  }
42
43
 
43
44
  tr {
@@ -16,6 +16,9 @@
16
16
  @each $type, $typeDef in map.get(typography-semantic.$typography-semantic-map, 'desktop') {
17
17
  @each $size, $sizeDef in $typeDef {
18
18
  .eds-u-f-#{$type}-#{$size} {
19
+ // Size / line-height / letter-spacing only — NOT weight.
20
+ // `--eds-f-*` is a weightless shorthand; weight is applied separately
21
+ // (e.g. via `.eds-u-f-weight-*`).
19
22
  font: var(--eds-f-#{$type}-#{$size}) !important;
20
23
  letter-spacing: var(--eds-f-ls-#{map.get($sizeDef, 'size')}) !important;
21
24
  }