@muraldevkit/ds-foundation 1.0.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.
Files changed (50) hide show
  1. package/README.md +99 -0
  2. package/assets/fonts/proximanova-bold.woff2 +0 -0
  3. package/assets/fonts/proximanova-extrabold.woff2 +0 -0
  4. package/assets/fonts/proximanova-medium.woff2 +0 -0
  5. package/assets/fonts/proximanova-regular.woff2 +0 -0
  6. package/assets/fonts/proximanova-semibold.woff2 +0 -0
  7. package/dist/android/mrl_colors.xml +9 -0
  8. package/dist/android/mrl_font_dimens.xml +9 -0
  9. package/dist/fonts.css +36 -0
  10. package/dist/fonts.css.map +1 -0
  11. package/dist/fonts.min.css +1 -0
  12. package/dist/fonts.min.css.map +1 -0
  13. package/dist/foundation.css +748 -0
  14. package/dist/foundation.css.map +1 -0
  15. package/dist/foundation.min.css +1 -0
  16. package/dist/foundation.min.css.map +1 -0
  17. package/dist/ios-swift/Mrl.swift +183 -0
  18. package/dist/tokens/border.json +39 -0
  19. package/dist/tokens/color.json +296 -0
  20. package/dist/tokens/motion.json +41 -0
  21. package/dist/tokens/shadows.json +21 -0
  22. package/dist/tokens/spacing.json +46 -0
  23. package/dist/tokens/typography.json +148 -0
  24. package/package.json +1 -0
  25. package/src/styles/_functions.scss +18 -0
  26. package/src/styles/_mixins.scss +152 -0
  27. package/src/styles/baseline.scss +157 -0
  28. package/src/styles/contextual-variables/border.scss +100 -0
  29. package/src/styles/contextual-variables/color.scss +165 -0
  30. package/src/styles/contextual-variables/index.scss +6 -0
  31. package/src/styles/contextual-variables/shadows.scss +28 -0
  32. package/src/styles/contextual-variables/spacing.scss +63 -0
  33. package/src/styles/contextual-variables/typography.scss +167 -0
  34. package/src/styles/contextual-variables/z-index.scss +24 -0
  35. package/src/styles/focus.scss +87 -0
  36. package/src/styles/fonts.scss +19 -0
  37. package/src/styles/global-variables/border.scss +40 -0
  38. package/src/styles/global-variables/breakpoints.scss +14 -0
  39. package/src/styles/global-variables/color.scss +156 -0
  40. package/src/styles/global-variables/index.scss +7 -0
  41. package/src/styles/global-variables/motion.scss +40 -0
  42. package/src/styles/global-variables/shadows.scss +28 -0
  43. package/src/styles/global-variables/spacing.scss +32 -0
  44. package/src/styles/global-variables/typography.scss +86 -0
  45. package/src/styles/grid.scss +4 -0
  46. package/src/styles/index.scss +17 -0
  47. package/src/styles/skeletons/button.scss +84 -0
  48. package/src/styles/skeletons/index.scss +10 -0
  49. package/src/styles/spacing.scss +24 -0
  50. package/src/styles/typography.scss +19 -0
@@ -0,0 +1,165 @@
1
+ ////
2
+ /// Contextual Color Tokens
3
+ /// @group variables
4
+ ////
5
+
6
+ $mrl-contextual-color-vars: (
7
+ // --------- Misc --------------
8
+ // Miscellaneous color tokens
9
+ "focus": "blue-70",
10
+ "focus-inverse": "white",
11
+ "shadows": "black",
12
+ "brand": "red-70",
13
+ "brand-hover": "red-80",
14
+ "brand-active": "red-90",
15
+ "accent": "blue-70",
16
+ "skeleton": "gray-20",
17
+ "skeleton-inverse": "white",
18
+
19
+ // --------- Background --------------
20
+ "background": "white",
21
+ "background-secondary": "gray-80",
22
+ "background-decorative": "gray-20",
23
+
24
+ // Status use cases
25
+ "background-info": "status-info",
26
+ "background-success": "status-success",
27
+ "background-warning": "status-warning",
28
+ "background-error": "status-error",
29
+ "background-private": "status-private",
30
+
31
+ // This is our primary inverse background color
32
+ // but our status colors also use inverse text colors
33
+ "background-inverse": "gray-100",
34
+
35
+ // Used only when the background is using "background-inverse"
36
+ // other colored backgrounds will have a different rule set that's TBD
37
+ "background-inverse-hover": "gray-90",
38
+
39
+ // Used only when there is a background on the element being disabled
40
+ "background-disabled": "gray-40",
41
+
42
+ // Used for Highlight
43
+ "background-highlight-hover": "gray-20",
44
+ "background-highlight-active": "gray-90",
45
+ "background-highlight-selected": "gray-90",
46
+
47
+ // Use to extend Highlight to add emphasis
48
+ "background-highlight-emph-active": "gray-30",
49
+
50
+ // --------- Line --------------
51
+ "line": "gray-70",
52
+ "line-hover": "gray-90",
53
+ "line-active": "gray-100",
54
+ "line-selected": "gray-90",
55
+ "line-disabled": "gray-40",
56
+
57
+ // Design calls this "Light" but it's semantically used for dividers
58
+ "line-divider": "gray-20",
59
+ // Design calls this "Dark" but it's semantically used for dividers. This is intended for use on dark or saturated backgrounds
60
+ "line-divider-inverse": "gray-80",
61
+
62
+ // Used for Base with Emphasis
63
+ "line-emph": "gray-20",
64
+ "line-emph-hover": "gray-90",
65
+ "line-emph-active": "black",
66
+
67
+ // Inverse
68
+ "line-inverse": "white",
69
+ "line-inverse-disabled": "white",
70
+ // @todo active and selected are TBD as Design finishes the inverse-secondary button
71
+
72
+ // --------- Text --------------
73
+ "text": "gray-80",
74
+ "text-hover": "gray-90",
75
+ "text-active": "gray-90",
76
+ "text-selected": "gray-90",
77
+ "text-disabled": "gray-40",
78
+ // Used when the background of the element uses the disabled color
79
+ "text-disabled-inverse": "white",
80
+
81
+ // Use for Base with Emphasis
82
+ "text-emph": "gray-20",
83
+ "text-emph-hover": "gray-90",
84
+ "text-emph-active": "black",
85
+
86
+ // Use for Highlight
87
+ "text-highlight": "gray-80",
88
+ "text-highlight-hover": "gray-90",
89
+ "text-highlight-active": "white",
90
+ "text-highlight-selected": "white",
91
+
92
+ // Alternative to add emphasis to Highlight
93
+ "text-highlight-emph": "gray-90",
94
+ "text-highlight-emph-hover": "gray-100",
95
+ "text-highlight-emph-active": "black",
96
+ "text-highlight-emph-selected": "white",
97
+
98
+ // Use for Inverse or any saturated background color (e.g. statuses)
99
+ "text-inverse": "white",
100
+ "text-inverse-secondary": "gray-10",
101
+ "text-inverse-hover": "white",
102
+ "text-inverse-active": "white",
103
+ "text-inverse-selected": "white",
104
+
105
+ // Static text color options
106
+ "text-02": "gray-90",
107
+ // Also used for placeholders
108
+ "text-secondary": "gray-70",
109
+ "text-label": "gray-90",
110
+ "text-heading": "gray-100",
111
+
112
+ // Status colors
113
+ "text-success": "gray-90", // For success messages on a white background
114
+ "text-warning": "gray-90", // For warning messages on a white background
115
+ "text-error": "status-error", // For error messages on a white background
116
+ "text-info": "gray-90", // For info messages on a white background
117
+ "text-private": "status-private", // For private messages on a white background
118
+
119
+ // --------- Icon --------------
120
+ // Used when there is an icon and you're following the Base with Emphasis style set
121
+ // for all other states, the icon is the same color as the text
122
+ "icon-emph-selected": "gray-100"
123
+ );
124
+
125
+ // These variables are referencing other contextual tokens and should not be wrapped by rgba
126
+ $mrl-contextual-color-vars-2: (
127
+ // --------- Background --------------
128
+
129
+ // Used only when the background is using "background-inverse"
130
+ // other colored backgrounds will have a different rule set that's TBD
131
+ "background-inverse-active": "color-accent",
132
+ "background-inverse-selected": "color-accent",
133
+
134
+ // Use to extend Highlight to add emphasis
135
+ "background-highlight-emph-selected": "color-accent",
136
+
137
+ // --------- Line --------------
138
+
139
+ // Used for Base with Emphasis
140
+ "line-emph-selected": "color-accent",
141
+
142
+ // --------- Text --------------
143
+
144
+ // Use for Base with Emphasis
145
+ "text-emph-selected": "color-accent"
146
+ );
147
+
148
+ :root {
149
+ /* Color */
150
+ @each $token-name, $token-value in $mrl-contextual-color-vars {
151
+ --mrl-color-#{$token-name}: rgba(var(--mrl-#{$token-value}), 1);
152
+ }
153
+
154
+ /* Color tokens that are set to non-global tokens */
155
+ @each $token-name, $token-value in $mrl-contextual-color-vars-2 {
156
+ --mrl-color-#{$token-name}: var(--mrl-#{$token-value});
157
+ }
158
+
159
+ // This is an intentional one-off contextual token
160
+ --mrl-color-background-page: rgb(245, 245, 245);
161
+
162
+ /* Colors with opacity */
163
+ --mrl-color-background-hover-opacity: rgba(var(--mrl-gray-30), 0.2);
164
+ --mrl-color-background-inverse-hover-opacity: rgba(var(--mrl-black), 0.2);
165
+ }
@@ -0,0 +1,6 @@
1
+ @forward 'color';
2
+ @forward 'spacing';
3
+ @forward 'border';
4
+ @forward 'typography';
5
+ @forward 'shadows';
6
+ @forward 'z-index';
@@ -0,0 +1,28 @@
1
+ ////
2
+ /// Contextual Shadow Tokens
3
+ /// @group variables
4
+ ////
5
+
6
+ /**
7
+ * Please note!
8
+ * If you make a change to these tokens, please make sure that the
9
+ * mrl-shadow mixin is changed as well. We need the tokens
10
+ * to map to the drop-shadow filter!
11
+ */
12
+
13
+ /* Contextual Shadow Tokens */
14
+ $mrl-contextual-shadow-vars: (
15
+ /* Base */
16
+ "lifted": "01",
17
+ "raised": "02",
18
+ "floating": "03",
19
+ /* Interactive */
20
+ "hover": "interactive-01",
21
+ "drag": "interactive-02"
22
+ );
23
+
24
+ :root {
25
+ @each $token-name, $token-value in $mrl-contextual-shadow-vars {
26
+ --mrl-shadows-#{$token-name}: var(--mrl-shadow-#{$token-value});
27
+ }
28
+ }
@@ -0,0 +1,63 @@
1
+ ////
2
+ /// Contextual Spacing Tokens
3
+ /// Source: see internal documentation on "Spacing"
4
+ /// (NOTE: these values are not finalized yet)
5
+ /// @group variables
6
+ ////
7
+ $mrl-contextual-spacing-vars: (
8
+ // Vertical spacing (stack)
9
+ 'stack-components': '06',
10
+ 'stack-controls': '05',
11
+ 'stack-controls-small': '04',
12
+ 'stack-section': '07',
13
+ 'stack-section-divider': '04',
14
+ 'stack-section-divider-small': '03',
15
+ 'stack-section-divider-large': '06',
16
+ 'stack-section-divider-label': '05',
17
+ 'stack-siblings': '04',
18
+ 'stack-related': '03',
19
+ 'stack-related-small': '02',
20
+
21
+ // Internal spacing (inset, squish, and stretch)
22
+ 'inset': '03',
23
+ 'inset-container': '08',
24
+ // ↓ Default value here is for mobile, desktop value overrides below under media section
25
+ 'inset-container-large': '05',
26
+ 'inset-large': '05',
27
+ 'inset-control': '06',
28
+ 'inset-control-large': '05',
29
+
30
+ // Horizontal spacing (inline)
31
+ 'inline-related': '03',
32
+ 'inline-sibling': '04',
33
+ 'inline-sibling-small': '02',
34
+
35
+ // Grid spacing (gutter)
36
+ 'gutter': '04',
37
+ 'gutter-label': '05',
38
+
39
+ // Miscellaneous spacing tokens
40
+ 'offset-focus': '01',
41
+
42
+ // Type related spacing
43
+ 'stack-subheading': '05',
44
+ 'stack-title': '07',
45
+ 'stack-title-related': '05'
46
+ );
47
+
48
+ :root {
49
+ /* Spacing */
50
+ @each $token-name, $token-value in $mrl-contextual-spacing-vars {
51
+ --mrl-space-#{$token-name}: var(--mrl-spacing-#{$token-value});
52
+ }
53
+ @media only screen and (min-width: 600px) {
54
+ --mrl-space-inset-container-large: var(--mrl-spacing-08);
55
+ }
56
+
57
+ --mrl-space-inline-sibling-xsmall: var(--mrl-space-inline-sibling-small);
58
+
59
+ // Exception in Foundation used for controls like form inputs and buttons
60
+ --mrl-space-inset-control-small: calc(
61
+ var(--mrl-spacing-03) + var(--mrl-spacing-01)
62
+ );
63
+ }
@@ -0,0 +1,167 @@
1
+ ////
2
+ /// Contextual Typography Tokens
3
+ /// @group variables
4
+ ////
5
+
6
+ // We have 6 different use cases for text: poster, display, headlines, titles, body copy (text),
7
+ // and interactive UI elements. For each category, the default is the medium, [primary] variation.
8
+ // For use cases that have differences between mobile and desktop (poster, display, and headline),
9
+ // we implement mobile as the default since our implementation follows a mobile-first philosophy
10
+ // for performance.
11
+
12
+ /* Font Size Tokens */
13
+ $mrl-contextual-font-size-vars: (
14
+ "poster": "10",
15
+ "poster-large": "11",
16
+ "poster-small": "09",
17
+
18
+ "display": "08",
19
+ "display-large": "09",
20
+ "display-small": "07",
21
+
22
+ "headline": "05",
23
+ "headline-large": "06",
24
+ "headline-small": "02",
25
+
26
+ // Title & Interactive use cases follow Text's scale
27
+ "text": "04",
28
+ "text-large": "05",
29
+ "text-small": "03",
30
+ "text-xsmall": "02",
31
+ "text-xxsmall": "01",
32
+ );
33
+ $mrl-contextual-font-size-vars-large-viewport: (
34
+ "poster": "12",
35
+ "poster-large": "13",
36
+ "poster-small": "11",
37
+
38
+ "display": "09",
39
+ "display-large": "10",
40
+ "display-small": "08",
41
+
42
+ "headline": "06",
43
+ "headline-large": "07",
44
+ "headline-small": "04"
45
+ );
46
+
47
+ /* Line Height Tokens */
48
+ $mrl-contextual-line-height-vars: (
49
+ "poster": "04",
50
+ "poster-large": "03",
51
+ "poster-small": "05",
52
+
53
+ "display": "03",
54
+ "display-large": "05",
55
+ "display-small": "06",
56
+
57
+ "headline": "09",
58
+ "headline-large": "07",
59
+ "headline-small": "09",
60
+
61
+ // Title use cases follow Text's scale
62
+ "text": "09",
63
+ "text-large": "10",
64
+ "text-small": "08",
65
+ "text-xsmall": "06",
66
+ "text-xxsmall": "08",
67
+
68
+ "interactive": "09",
69
+ "interactive-large": "10",
70
+ "interactive-small": "08",
71
+ "interactive-xsmall": "06"
72
+ );
73
+ $mrl-contextual-line-height-vars-large-viewport: (
74
+ "poster": "02",
75
+ "poster-large": "02",
76
+ "poster-small": "02",
77
+
78
+ "display": "05",
79
+ "display-large": "04",
80
+ "display-small": "03",
81
+
82
+ "headline": "07",
83
+ "headline-large": "06",
84
+ "headline-small": "03"
85
+ );
86
+
87
+ /* Font Weight Tokens */
88
+ $mrl-contextual-font-weight-vars: (
89
+ "poster": "05",
90
+ "display": "05",
91
+ "headline": "05",
92
+ "title": "04",
93
+ "title-secondary": "03",
94
+ "text": "02",
95
+ "text-secondary": "01",
96
+ "interactive": "04"
97
+ );
98
+
99
+ /* Letter Spacing Tokens */
100
+ $mrl-contextual-letter-spacing-vars: (
101
+ "poster": "02",
102
+ "poster-large": "01",
103
+ "poster-small": "02",
104
+
105
+ "display": "03",
106
+ "display-large": "02",
107
+ "display-small": "03",
108
+
109
+ "headline": "03",
110
+ "headline-large": "03",
111
+ "headline-small": "04",
112
+
113
+ // title and interactive use cases follow the same scale as text
114
+ "text": "03",
115
+ "interactive-xsmall": "04"
116
+ );
117
+ $mrl-contextual-letter-spacing-vars-large-viewport: (
118
+ "headline-small": "03"
119
+ );
120
+
121
+ :root {
122
+ // Typography - Font Size
123
+ @each $token-name, $token-value in $mrl-contextual-font-size-vars {
124
+ --mrl-type-size-#{$token-name}: var(--mrl-font-size-#{$token-value});
125
+ }
126
+
127
+ // Typography - Line Height
128
+ @each $token-name, $token-value in $mrl-contextual-line-height-vars {
129
+ --mrl-type-line-height-#{$token-name}: var(--mrl-line-height-#{$token-value});
130
+ }
131
+
132
+ // Typography - Font Weight
133
+ @each $token-name, $token-value in $mrl-contextual-font-weight-vars {
134
+ --mrl-type-weight-#{$token-name}: var(--mrl-font-weight-#{$token-value});
135
+ }
136
+
137
+ // Typography - Letter Spacing
138
+ @each $token-name, $token-value in $mrl-contextual-letter-spacing-vars {
139
+ --mrl-type-spacing-#{$token-name}: var(--mrl-letter-spacing-#{$token-value});
140
+ }
141
+
142
+ // Toggleable label mixin variables
143
+ // Exceptional value: this mixin renders a 10px font, which we have no variable for
144
+ --mrl-type-size-toggleable-label: calc(10 / var(--mrl-baseline) * 1rem);
145
+ --mrl-type-weight-toggleable-label: var(--mrl-font-weight-03);
146
+ }
147
+
148
+ // @todo - 1779 - Responsive Grid, Phase 1
149
+ // Waiting on Design before we can setup our breakpoint variables with proper values
150
+ @media screen and (min-width: 600px) {
151
+ :root {
152
+ // Typography - Font Size
153
+ @each $token-name, $token-value in $mrl-contextual-font-size-vars-large-viewport {
154
+ --mrl-type-size-#{$token-name}: var(--mrl-font-size-#{$token-value});
155
+ }
156
+
157
+ // Typography - Line Height
158
+ @each $token-name, $token-value in $mrl-contextual-line-height-vars-large-viewport {
159
+ --mrl-type-line-height-#{$token-name}: var(--mrl-line-height-#{$token-value});
160
+ }
161
+
162
+ // Typography - Letter Spacing
163
+ @each $token-name, $token-value in $mrl-contextual-letter-spacing-vars-large-viewport {
164
+ --mrl-type-spacing-#{$token-name}: var(--mrl-letter-spacing-#{$token-value});
165
+ }
166
+ }
167
+ }
@@ -0,0 +1,24 @@
1
+ ////
2
+ /// Contextual z-index tokens
3
+ /// @group variables
4
+ ///
5
+ /// Note: this file uses Sass variables so developers can perform calculations to create scalable extensions
6
+ ////
7
+
8
+ $mrl-zIndex-increment: 100;
9
+ $mrl-zIndex-base: 0;
10
+ $mrl-zIndex-focus: $mrl-zIndex-base + 1;
11
+ $mrl-zIndex-notifications: $mrl-zIndex-base + $mrl-zIndex-increment !default;
12
+
13
+ // @todo - once integrated in in the product, we need to determine if these are higher or lower
14
+ // than panels for animations but we are keeping this as a separate category to prevent a future
15
+ // breaking change if needed.
16
+ $mrl-zIndex-toolbars: $mrl-zIndex-notifications + $mrl-zIndex-increment !default;
17
+ $mrl-zIndex-toolbars-contextual: $mrl-zIndex-toolbars + $mrl-zIndex-increment !default;
18
+ $mrl-zIndex-panels: $mrl-zIndex-toolbars-contextual + $mrl-zIndex-increment !default;
19
+ $mrl-zIndex-menus: $mrl-zIndex-panels + $mrl-zIndex-increment !default;
20
+ $mrl-zIndex-popovers: $mrl-zIndex-menus + $mrl-zIndex-increment !default;
21
+ $mrl-zIndex-menus-contextual: $mrl-zIndex-popovers + $mrl-zIndex-increment !default;
22
+ $mrl-zIndex-notifications-toast: $mrl-zIndex-menus-contextual + $mrl-zIndex-increment !default;
23
+ $mrl-zIndex-tooltips: $mrl-zIndex-notifications-toast + $mrl-zIndex-increment !default;
24
+ $mrl-zIndex-overlays: $mrl-zIndex-tooltips + $mrl-zIndex-increment !default;
@@ -0,0 +1,87 @@
1
+ @use "sass:string";
2
+ @use './contextual-variables/z-index.scss' as *;
3
+
4
+ .mrl-u-focus-wrapper {
5
+ position: relative;
6
+ }
7
+
8
+ /// Used to create a consistent focus indicator for interactive elements
9
+ /// @group mixins
10
+ /// @param {String} $style - Determines how the focus indicator is implemented. Options are to use the traditional
11
+ /// outline setup or to use a custom pseudo-element. Available options are: "outline" and "element" (default)
12
+ /// @param {String} $is-inverse - Used when the element is an inverse use case so colors are updated accordingly.
13
+ /// Available options are "false" (default) and "true"
14
+ /// @param {String} $element-radius - Used with "element" setup to apply a border radius to the focus indicator
15
+ /// Should be set to a CSS token. Default is var(--mrl-border-radius-functional).
16
+ /// @param {String} $pseudo-element - Used with the "element" setup to allow developers to choose which pseudo element
17
+ /// is used. Available options are "before" (default) and "after"
18
+ /// @param {String} $is-inline-element - Used with the "element" setup with a self-closing element. Requires wrapping the
19
+ /// element with `div.mrl-u-focus-wrapper` and have an immediate sibling `span.mrl-u-focus-indicator`. See the text-input
20
+ /// as an example. Available options are "true", "false" (default)
21
+ /// @param {String} $focus-selector - Allows overwriting the default ":focus-visible" CSS selector for when to apply the styles.
22
+ /// Typical use includes ":focus" or ":focus-within"
23
+ ///
24
+ /// @example @include mrl-focus; // Generates the default outline version
25
+ /// @example @include mrl-focus($is-inverse: 'true'); // Generates an inverse outline
26
+ /// Generate the element version in the default color on a control element that has a border using the after pseudo element
27
+ /// @example @include mrl-focus('element', 'false', 'var(--mrl-border-radius-control)', 'after');
28
+ @mixin mrl-focus($style: 'element', $is-inverse: 'false', $element-radius: 'var(--mrl-border-radius-functional)', $pseudo-element: 'after', $is-inline-element: 'false', $focus-selector: ':focus-visible') {
29
+ $color-token: '';
30
+
31
+ @if $is-inverse == 'true' {
32
+ $color-token: '-inverse';
33
+ }
34
+
35
+ @if $is-inline-element == 'true' {
36
+ $focus-selector: ':focus-visible + .mrl-u-focus-indicator';
37
+
38
+ + .mrl-u-focus-indicator {
39
+ display: block;
40
+ height: 100%;
41
+ left: 0;
42
+ top: 0;
43
+ width: 100%;
44
+ }
45
+ }
46
+
47
+ @if $style == 'element' {
48
+ position: relative;
49
+ }
50
+
51
+ &#{string.unquote($focus-selector)} {
52
+ @if $style == 'outline' {
53
+ outline: var(--mrl-line-width-focus) solid var(--mrl-color-focus#{$color-token});
54
+ outline-offset: var(--mrl-space-offset-focus);
55
+ }
56
+
57
+ @if $style == 'element' {
58
+ &::#{string.unquote($pseudo-element)} {
59
+ @include mrl-focus-pseudo-element($element-radius, $color-token);
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ /// Used to create a consistent focus indicator for shadow DOM elements using the mrl-focus "element" technique
66
+ /// Important: For internal use only as there are likely breaking changes coming.
67
+ /// @group mixins
68
+ /// @param {String} $element-radius - Applies a border radius to the focus indicator
69
+ /// Should be set to a CSS token. Default is var(--mrl-border-radius-functional).
70
+ /// @param {String} $color-token - Suffix applied to the color token to change it to the inverse color if needed.
71
+ /// Default is '' which uses the default focus color. To change to the inverse base '-inverse'
72
+ /// @param {String} $border-width - the border width of the element having focus applied to ensure the offset
73
+ /// is correct. Default is '0px'
74
+ ///
75
+ /// @example :host(:focus-visible)::after { @include mrl-focus-shadow(); } // Generates the default version
76
+ @mixin mrl-focus-pseudo-element($element-radius: 'var(--mrl-border-radius-functional)', $color-token: '', $border-width: '0px') {
77
+ border: var(--mrl-line-width-focus) solid var(--mrl-color-focus#{$color-token});
78
+ border-radius: calc(#{string.unquote($element-radius)} + var(--mrl-line-width-focus) + var(--mrl-space-offset-focus));
79
+ bottom: calc((var(--mrl-space-offset-focus) + var(--mrl-line-width-focus) + #{string.unquote($border-width)}) * -1);
80
+ content: '';
81
+ display: block;
82
+ left: calc((var(--mrl-space-offset-focus) + var(--mrl-line-width-focus) + #{string.unquote($border-width)}) * -1);
83
+ position: absolute;
84
+ right: calc((var(--mrl-space-offset-focus) + var(--mrl-line-width-focus) + #{string.unquote($border-width)}) * -1);
85
+ top: calc((var(--mrl-space-offset-focus) + var(--mrl-line-width-focus) + #{string.unquote($border-width)}) * -1);
86
+ z-index: $mrl-zIndex-focus;
87
+ }
@@ -0,0 +1,19 @@
1
+ @use "mixins" as *;
2
+
3
+ // SCSS map of proxima-nova font weights
4
+ $mrl-font-weights: (
5
+ "regular": 400,
6
+ "medium": 500,
7
+ "semibold": 600,
8
+ "bold": 700,
9
+ "extrabold": 800,
10
+ );
11
+ $mrl-font-dir: '../assets/fonts' !default;
12
+
13
+ @each $font-weight-name, $font-weight-value in $mrl-font-weights {
14
+ // we can't use var(--mrl-font-family-01) in here
15
+ // because of how sass handles this string value
16
+ $font-family: proxima-nova;
17
+ $font-path: "#{$mrl-font-dir}/proximanova-#{$font-weight-name}";
18
+ @include font-face($font-family, $font-path, $font-weight-value);
19
+ }
@@ -0,0 +1,40 @@
1
+ ////
2
+ /// Global Border Tokens
3
+ /// @group variables
4
+ ////
5
+
6
+ /* Border Radius Tokens */
7
+ // Values in the map is the number of pixels provided by design.
8
+ $mrl-global-border-radius-vars: (
9
+ "01": 2,
10
+ "02": 4,
11
+ "03": 8,
12
+ "04": 12,
13
+ "05": 16,
14
+ "06": 24,
15
+ "07": 32,
16
+ "08": 40,
17
+ );
18
+
19
+ /* Border Width Tokens */
20
+ // Values in the map is the number of pixels provided by design.
21
+ // Note: We have to add 02 and 03 to have parity with Classic theme, which has 3
22
+ // different line widths. We set them all to the same value (2px) in Foundation and these tokens are then overwritten in Classic.
23
+ // This approach reduces the risk of breaking visual updates when Classic is disabled. When Classic
24
+ // is deprecated, we should be able to deprecate and remove these tokens.
25
+ $mrl-global-border-width-vars: (
26
+ "01": 2,
27
+ "02": 2,
28
+ "03": 2,
29
+ );
30
+
31
+ :root {
32
+ @each $token-name, $token-value in $mrl-global-border-radius-vars {
33
+ --mrl-radii-#{$token-name}: #{$token-value}px;
34
+ }
35
+
36
+ @each $token-name, $token-value in $mrl-global-border-width-vars {
37
+ --mrl-stroke-#{$token-name}: #{$token-value}px;
38
+ }
39
+ }
40
+
@@ -0,0 +1,14 @@
1
+ ////
2
+ /// Global Breakpoint Tokens
3
+ /// @group variables
4
+ ////
5
+
6
+ @use '../functions' as *;
7
+
8
+ // Media queries do NOT support CSS Variables so breakpoint tokens
9
+ // are delivered as Sass variables intentionally.
10
+ $mrl-breakpoint-01: mrl-rem(600) !default;
11
+ $mrl-breakpoint-02: mrl-rem(834) !default;
12
+ $mrl-breakpoint-03: mrl-rem(1024) !default;
13
+ $mrl-breakpoint-04: mrl-rem(1280) !default;
14
+ $mrl-breakpoint-05: mrl-rem(1440) !default;