@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.
- package/README.md +99 -0
- package/assets/fonts/proximanova-bold.woff2 +0 -0
- package/assets/fonts/proximanova-extrabold.woff2 +0 -0
- package/assets/fonts/proximanova-medium.woff2 +0 -0
- package/assets/fonts/proximanova-regular.woff2 +0 -0
- package/assets/fonts/proximanova-semibold.woff2 +0 -0
- package/dist/android/mrl_colors.xml +9 -0
- package/dist/android/mrl_font_dimens.xml +9 -0
- package/dist/fonts.css +36 -0
- package/dist/fonts.css.map +1 -0
- package/dist/fonts.min.css +1 -0
- package/dist/fonts.min.css.map +1 -0
- package/dist/foundation.css +748 -0
- package/dist/foundation.css.map +1 -0
- package/dist/foundation.min.css +1 -0
- package/dist/foundation.min.css.map +1 -0
- package/dist/ios-swift/Mrl.swift +183 -0
- package/dist/tokens/border.json +39 -0
- package/dist/tokens/color.json +296 -0
- package/dist/tokens/motion.json +41 -0
- package/dist/tokens/shadows.json +21 -0
- package/dist/tokens/spacing.json +46 -0
- package/dist/tokens/typography.json +148 -0
- package/package.json +1 -0
- package/src/styles/_functions.scss +18 -0
- package/src/styles/_mixins.scss +152 -0
- package/src/styles/baseline.scss +157 -0
- package/src/styles/contextual-variables/border.scss +100 -0
- package/src/styles/contextual-variables/color.scss +165 -0
- package/src/styles/contextual-variables/index.scss +6 -0
- package/src/styles/contextual-variables/shadows.scss +28 -0
- package/src/styles/contextual-variables/spacing.scss +63 -0
- package/src/styles/contextual-variables/typography.scss +167 -0
- package/src/styles/contextual-variables/z-index.scss +24 -0
- package/src/styles/focus.scss +87 -0
- package/src/styles/fonts.scss +19 -0
- package/src/styles/global-variables/border.scss +40 -0
- package/src/styles/global-variables/breakpoints.scss +14 -0
- package/src/styles/global-variables/color.scss +156 -0
- package/src/styles/global-variables/index.scss +7 -0
- package/src/styles/global-variables/motion.scss +40 -0
- package/src/styles/global-variables/shadows.scss +28 -0
- package/src/styles/global-variables/spacing.scss +32 -0
- package/src/styles/global-variables/typography.scss +86 -0
- package/src/styles/grid.scss +4 -0
- package/src/styles/index.scss +17 -0
- package/src/styles/skeletons/button.scss +84 -0
- package/src/styles/skeletons/index.scss +10 -0
- package/src/styles/spacing.scss +24 -0
- package/src/styles/typography.scss +19 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Global Color Tokens
|
|
3
|
+
/// @group variables
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
$mrl-global-color-vars: (
|
|
7
|
+
/* Gray */
|
|
8
|
+
"gray-10": "250, 250, 250", // #fafafa"
|
|
9
|
+
"gray-20": "238, 238, 238", // #eeeeee"
|
|
10
|
+
"gray-30": "222, 222, 222", // #dedede"
|
|
11
|
+
"gray-40": "187, 187, 187", // #bbbbbb"
|
|
12
|
+
"gray-50": "158, 158, 158", // #9e9e9e"
|
|
13
|
+
"gray-60": "145, 145, 145", // #919191"
|
|
14
|
+
"gray-70": "115, 115, 115", // #737373"
|
|
15
|
+
"gray-80": "78, 78, 78", // #4e4e4e"
|
|
16
|
+
"gray-90": "47, 47, 47", // #2f2f2f"
|
|
17
|
+
"gray-100": "31, 31, 31", // #1f1f1f"
|
|
18
|
+
/* Blue */
|
|
19
|
+
"blue-10": "245, 250, 255", // #f5faff
|
|
20
|
+
"blue-20": "230, 244, 254", // #e6f4fe
|
|
21
|
+
"blue-30": "205, 230, 254", // #cde6fe
|
|
22
|
+
"blue-40": "180, 217, 253", // #b4d9fd
|
|
23
|
+
"blue-50": "131, 191, 252", // #83bffc
|
|
24
|
+
"blue-60": "81, 143, 251", // #518ffb
|
|
25
|
+
"blue-70": "55, 112, 228", // #3770e4
|
|
26
|
+
"blue-80": "49, 99, 201", // #3163c9
|
|
27
|
+
"blue-90": "42, 86, 176", // #2a56b0
|
|
28
|
+
"blue-100": "30, 61, 125", // #1e3d7d
|
|
29
|
+
/* Coral */
|
|
30
|
+
"coral-10": "255, 230, 239", // #ffe6ef"
|
|
31
|
+
"coral-20": "254, 204, 223", // #feccdf"
|
|
32
|
+
"coral-30": "254, 154, 191", // #fe9abf"
|
|
33
|
+
"coral-40": "253, 103, 160", // #fd67a0"
|
|
34
|
+
"coral-50": "253, 53, 129", // #fd3581"
|
|
35
|
+
"coral-60": "255, 0, 102", // #ff0066"
|
|
36
|
+
"coral-70": "232, 0, 90", // #e8005a"
|
|
37
|
+
"coral-80": "214, 0, 87", // #d60057"
|
|
38
|
+
"coral-90": "192, 3, 77", // #c0034d"
|
|
39
|
+
"coral-100": "163, 0, 63", // #a3003f"
|
|
40
|
+
/* Red */
|
|
41
|
+
"red-10": "255, 245, 245", // #fff5f5"
|
|
42
|
+
"red-20": "255, 229, 229", // #ffe5e5"
|
|
43
|
+
"red-30": "255, 204, 204", // #ffcccc"
|
|
44
|
+
"red-40": "255, 179, 179", // #ffb3b3"
|
|
45
|
+
"red-50": "255, 128, 128", // #ff8080"
|
|
46
|
+
"red-60": "255, 75, 75", // #ff4b4b"
|
|
47
|
+
"red-70": "224, 41, 53", // #e02935"
|
|
48
|
+
"red-80": "179, 33, 42", // #b3212a"
|
|
49
|
+
"red-90": "140, 26, 33", // #8c1a21"
|
|
50
|
+
"red-100": "115, 21, 27", // #73151b"
|
|
51
|
+
/* Tomato */
|
|
52
|
+
"tomato-10": "249, 240, 242", // #f9f0f2"
|
|
53
|
+
"tomato-20": "242, 212, 219", // #f2d4db"
|
|
54
|
+
"tomato-30": "243, 192, 204", // #f3c0cc"
|
|
55
|
+
"tomato-40": "239, 169, 184", // #efa9b8"
|
|
56
|
+
"tomato-50": "233, 134, 156", // #e9869c"
|
|
57
|
+
"tomato-60": "231, 111, 138", // #e76f8a"
|
|
58
|
+
"tomato-70": "225, 89, 120", // #e15978"
|
|
59
|
+
"tomato-80": "220, 64, 100", // #dc4064"
|
|
60
|
+
"tomato-90": "203, 52, 95", // #cb345f"
|
|
61
|
+
"tomato-100": "182, 52, 93", // #b6345d"
|
|
62
|
+
/* Orange */
|
|
63
|
+
"orange-10": "251, 233, 198", // #fbe9c6"
|
|
64
|
+
"orange-20": "249, 224, 175", // #f9e0af"
|
|
65
|
+
"orange-30": "246, 207, 166", // #f6cfa6"
|
|
66
|
+
"orange-40": "243, 193, 153", // #f3c199"
|
|
67
|
+
"orange-50": "243, 180, 148", // #f3b494"
|
|
68
|
+
"orange-60": "247, 169, 125", // #f7a97d"
|
|
69
|
+
"orange-70": "245, 156, 120", // #f59c78"
|
|
70
|
+
"orange-80": "245, 135, 101", // #f58765"
|
|
71
|
+
"orange-90": "234, 116, 79", // #ea744f"
|
|
72
|
+
"orange-100": "220, 96, 70", // #dc6046"
|
|
73
|
+
/* Lemon */
|
|
74
|
+
"lemon-10": "254, 252, 215", // #fefcd7"
|
|
75
|
+
"lemon-20": "255, 250, 183", // #fffab7"
|
|
76
|
+
"lemon-30": "253, 246, 147", // #fdf693"
|
|
77
|
+
"lemon-40": "254, 239, 136", // #feef88"
|
|
78
|
+
"lemon-50": "251, 233, 122", // #fbe97a"
|
|
79
|
+
"lemon-60": "249, 223, 129", // #f9df81"
|
|
80
|
+
"lemon-70": "238, 206, 127", // #eece7f"
|
|
81
|
+
"lemon-80": "229, 191, 118", // #e5bf76"
|
|
82
|
+
"lemon-90": "221, 180, 102", // #ddb466"
|
|
83
|
+
"lemon-100": "207, 160, 81", // #cfa051"
|
|
84
|
+
/* Melon */
|
|
85
|
+
"melon-10": "230, 248, 225", // #e6f8e1"
|
|
86
|
+
"melon-20": "213, 245, 204", // #d5f5cc"
|
|
87
|
+
"melon-30": "196, 239, 185", // #c4efb9"
|
|
88
|
+
"melon-40": "177, 236, 161", // #b1eca1"
|
|
89
|
+
"melon-50": "158, 223, 151", // #9edf97"
|
|
90
|
+
"melon-60": "136, 213, 138", // #88d58a"
|
|
91
|
+
"melon-70": "125, 195, 125", // #7dc37d"
|
|
92
|
+
"melon-80": "108, 179, 109", // #6cb36d"
|
|
93
|
+
"melon-90": "91, 157, 94", // #5b9d5e"
|
|
94
|
+
"melon-100": "79, 145, 81", // #4f9151"
|
|
95
|
+
/* Blueberry */
|
|
96
|
+
"blueberry-10": "222, 236, 252", // #deecfc"
|
|
97
|
+
"blueberry-20": "207, 228, 251", // #cfe4fb"
|
|
98
|
+
"blueberry-30": "185, 215, 250", // #b9d7fa"
|
|
99
|
+
"blueberry-40": "160, 200, 249", // #a0c8f9"
|
|
100
|
+
"blueberry-50": "131, 181, 245", // #83b5f5"
|
|
101
|
+
"blueberry-60": "100, 165, 247", // #64a5f7"
|
|
102
|
+
"blueberry-70": "76, 151, 245", // #4c97f5"
|
|
103
|
+
"blueberry-80": "71, 126, 222", // #477ede"
|
|
104
|
+
"blueberry-90": "56, 112, 211", // #3870d3"
|
|
105
|
+
"blueberry-100": "50, 89, 153", // #325999"
|
|
106
|
+
/* Grape */
|
|
107
|
+
"grape-10": "231, 230, 250", // #e7e6fa"
|
|
108
|
+
"grape-20": "217, 215, 247", // #d9d7f7"
|
|
109
|
+
"grape-30": "205, 202, 248", // #cdcaf8"
|
|
110
|
+
"grape-40": "187, 187, 242", // #bbbbf2"
|
|
111
|
+
"grape-50": "162, 163, 240", // #a2a3f0"
|
|
112
|
+
"grape-60": "150, 146, 243", // #9692f3"
|
|
113
|
+
"grape-70": "134, 126, 231", // #867ee7"
|
|
114
|
+
"grape-80": "119, 104, 222", // #7768de"
|
|
115
|
+
"grape-90": "114, 86, 219", // #7256db"
|
|
116
|
+
"grape-100": "83, 71, 157", // #53479d"
|
|
117
|
+
/* Pure colors */
|
|
118
|
+
"white": "255, 255, 255", // #ffffff"
|
|
119
|
+
"black": "0, 0, 0", // #000000"
|
|
120
|
+
/* Status colors */
|
|
121
|
+
"status-info": "49, 99, 201", // #3163c9
|
|
122
|
+
"status-success": "0, 132, 63", // #00843f
|
|
123
|
+
"status-warning": "255, 170, 1", // #ffaa01
|
|
124
|
+
"status-error": "179, 33, 42" // #b3212a
|
|
125
|
+
);
|
|
126
|
+
$mrl-global-colors-opacity: (
|
|
127
|
+
"black": (
|
|
128
|
+
"00": ".08",
|
|
129
|
+
"01": ".16",
|
|
130
|
+
"02": ".24",
|
|
131
|
+
"03": ".32",
|
|
132
|
+
"06": ".64",
|
|
133
|
+
"08": ".80"
|
|
134
|
+
),
|
|
135
|
+
"white": (
|
|
136
|
+
"02": ".24",
|
|
137
|
+
"03": ".30",
|
|
138
|
+
"04": ".40",
|
|
139
|
+
"06": ".60",
|
|
140
|
+
"08": ".80"
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
:root {
|
|
145
|
+
@each $token-name, $token-value in $mrl-global-color-vars {
|
|
146
|
+
--mrl-#{$token-name}: #{$token-value};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@each $color-name, $opacity-map in $mrl-global-colors-opacity {
|
|
150
|
+
@each $token-name, $token-value in $opacity-map {
|
|
151
|
+
--mrl-#{$color-name}-opacity-#{$token-name}: rgba(var(--mrl-#{$color-name}), #{$token-value});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
--mrl-status-private: var(--mrl-gray-100); // #1f1f1f
|
|
156
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Global Motion Tokens
|
|
3
|
+
/// Source: see internal documentation on "Motion"
|
|
4
|
+
/// @group variables
|
|
5
|
+
////
|
|
6
|
+
|
|
7
|
+
$mrl-global-motion-timing-vars: (
|
|
8
|
+
"m1": "0.17, 0.00, 0.00, 1.00",
|
|
9
|
+
"m1r": "1.00, 0.00, 0.83, 1.00",
|
|
10
|
+
"m2": "0, 0.5, 0, 1",
|
|
11
|
+
"m3": "0.33, 0.00, 0.67, 1.00",
|
|
12
|
+
"m4": "0.00, 0.00, 0.00, 1.00"
|
|
13
|
+
);
|
|
14
|
+
$mrl-global-motion-duration-vars: (
|
|
15
|
+
"01": "17",
|
|
16
|
+
"02": "167",
|
|
17
|
+
"03": "333",
|
|
18
|
+
"04": "667"
|
|
19
|
+
);
|
|
20
|
+
$mrl-global-motion-distance-vars: (
|
|
21
|
+
"01": "4",
|
|
22
|
+
"02": "8"
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
:root {
|
|
26
|
+
/* Motion - Timing */
|
|
27
|
+
@each $token-name, $token-value in $mrl-global-motion-timing-vars {
|
|
28
|
+
--mrl-timing-#{$token-name}: cubic-bezier(#{$token-value});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Motion - Duration */
|
|
32
|
+
@each $token-name, $token-value in $mrl-global-motion-duration-vars {
|
|
33
|
+
--mrl-duration-#{$token-name}: #{$token-value}ms;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Motion - Distance */
|
|
37
|
+
@each $token-name, $token-value in $mrl-global-motion-distance-vars {
|
|
38
|
+
--mrl-distance-#{$token-name}: #{$token-value}px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Global Shadow/Elevation 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 contextual tokens
|
|
10
|
+
* to map to the drop-shadow filter!
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/* Shadow/Elevation Tokens */
|
|
14
|
+
$mrl-global-shadow-vars: (
|
|
15
|
+
/* Base */
|
|
16
|
+
"01": "0 0 0 1px rgba(var(--mrl-black), 0.08), 0 3px 4px rgba(var(--mrl-black), 0.08)",
|
|
17
|
+
"02": "0 0 0 1px rgba(var(--mrl-black), 0.08), 0 5px 8px rgba(var(--mrl-black), 0.08)",
|
|
18
|
+
"03": "0 0 0 1px rgba(var(--mrl-black), 0.08), 0 25px 20px rgba(var(--mrl-black), 0.12)",
|
|
19
|
+
/* Interactive */
|
|
20
|
+
"interactive-01": "0 4px 5px rgba(var(--mrl-black), 0.08)",
|
|
21
|
+
"interactive-02": "0 20px 12px rgba(var(--mrl-black), 0.20)"
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
:root {
|
|
25
|
+
@each $token-name, $token-value in $mrl-global-shadow-vars {
|
|
26
|
+
--mrl-shadow-#{$token-name}: #{$token-value};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Global Spacing Tokens
|
|
3
|
+
/// Source: see internal documentation on "Spacing"
|
|
4
|
+
/// @group variables
|
|
5
|
+
////
|
|
6
|
+
|
|
7
|
+
/* Spacing Tokens */
|
|
8
|
+
// Values in the map is the number of pixels provided by design.
|
|
9
|
+
// We use a calculation to convert the pixel values to rems for accessibility support.
|
|
10
|
+
$mrl-global-spacing-vars: (
|
|
11
|
+
"01": 2,
|
|
12
|
+
"02": 4,
|
|
13
|
+
"03": 8,
|
|
14
|
+
"04": 12,
|
|
15
|
+
"05": 16,
|
|
16
|
+
"06": 20,
|
|
17
|
+
"07": 24,
|
|
18
|
+
"08": 32,
|
|
19
|
+
"09": 40,
|
|
20
|
+
"10": 48,
|
|
21
|
+
"11": 64,
|
|
22
|
+
"12": 80,
|
|
23
|
+
"13": 96,
|
|
24
|
+
"14": 160,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
:root {
|
|
28
|
+
@each $token-name, $token-value in $mrl-global-spacing-vars {
|
|
29
|
+
--mrl-spacing-#{$token-name}: calc(#{$token-value} / var(--mrl-baseline) * 1rem);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Global Typography Tokens
|
|
3
|
+
/// Source: see internal documentation on "Typography Tokens"
|
|
4
|
+
/// @group variables
|
|
5
|
+
////
|
|
6
|
+
|
|
7
|
+
/* Font Size Tokens */
|
|
8
|
+
// Values in the map are the number of pixels provided by design.
|
|
9
|
+
// We use a calculation to convert the pixel values to rems for accessibility support.
|
|
10
|
+
$mrl-global-font-size-vars: (
|
|
11
|
+
"01": 11,
|
|
12
|
+
"02": 12,
|
|
13
|
+
"03": 14,
|
|
14
|
+
"04": 16,
|
|
15
|
+
"05": 18,
|
|
16
|
+
"06": 20,
|
|
17
|
+
"07": 24,
|
|
18
|
+
"08": 32,
|
|
19
|
+
"09": 40,
|
|
20
|
+
"10": 48,
|
|
21
|
+
"11": 64,
|
|
22
|
+
"12": 80,
|
|
23
|
+
"13": 96,
|
|
24
|
+
"14": 120
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/* Line-height Tokens */
|
|
29
|
+
$mrl-global-line-height-vars: (
|
|
30
|
+
"01": 0.875,
|
|
31
|
+
"02": 1,
|
|
32
|
+
"03": 1.125,
|
|
33
|
+
"04": 1.167,
|
|
34
|
+
"05": 1.2,
|
|
35
|
+
"06": 1.33,
|
|
36
|
+
"07": 1.4,
|
|
37
|
+
"08": 1.45,
|
|
38
|
+
"09": 1.5,
|
|
39
|
+
"10": 1.56,
|
|
40
|
+
"11": 1.75,
|
|
41
|
+
"12": 2
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/* Letter Spacing Tokens */
|
|
45
|
+
$mrl-global-letter-spacing-vars: (
|
|
46
|
+
"01": -2%,
|
|
47
|
+
"02": -1%,
|
|
48
|
+
"03": 0%,
|
|
49
|
+
"04": 1%,
|
|
50
|
+
"05": 2%
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/* Font Weight Tokens */
|
|
55
|
+
$mrl-global-font-weight-vars: (
|
|
56
|
+
"01": 400,
|
|
57
|
+
"02": 500,
|
|
58
|
+
"03": 600,
|
|
59
|
+
"04": 700,
|
|
60
|
+
"05": 800,
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
:root {
|
|
64
|
+
--mrl-baseline: 16;
|
|
65
|
+
--mrl-font-family-01: proxima-nova;
|
|
66
|
+
|
|
67
|
+
/* Typography - Font Size */
|
|
68
|
+
@each $token-name, $token-value in $mrl-global-font-size-vars {
|
|
69
|
+
--mrl-font-size-#{$token-name}: calc(#{$token-value} / var(--mrl-baseline) * 1rem);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Typography - Line Height */
|
|
73
|
+
@each $token-name, $token-value in $mrl-global-line-height-vars {
|
|
74
|
+
--mrl-line-height-#{$token-name}: #{$token-value};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Typography - Letter Spacing */
|
|
78
|
+
@each $token-name, $token-value in $mrl-global-letter-spacing-vars {
|
|
79
|
+
--mrl-letter-spacing-#{$token-name}: #{$token-value} ;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Typography - Font Weight */
|
|
83
|
+
@each $token-name, $token-value in $mrl-global-font-weight-vars {
|
|
84
|
+
--mrl-font-weight-#{$token-name}: #{$token-value} ;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Mural's design system foundation
|
|
3
|
+
/// @group foundation
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
// @todo - some of the following files export CSS, providing an option for adopters
|
|
7
|
+
// who do not want the full CSS output and prefer to use mixins directly without bloating their code base
|
|
8
|
+
@forward "global-variables/index";
|
|
9
|
+
@forward "contextual-variables/index";
|
|
10
|
+
@forward "mixins";
|
|
11
|
+
@forward "focus";
|
|
12
|
+
@forward "functions";
|
|
13
|
+
@forward "baseline";
|
|
14
|
+
@forward "grid";
|
|
15
|
+
@forward "spacing";
|
|
16
|
+
@forward "typography";
|
|
17
|
+
@forward "skeletons/index";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Mural's pre-hydration button skeleton styles
|
|
3
|
+
/// @group foundation
|
|
4
|
+
////
|
|
5
|
+
|
|
6
|
+
// Variables
|
|
7
|
+
// --------------------------------------------------
|
|
8
|
+
:root {
|
|
9
|
+
--mrl-button-background-color-skeleton: var(--mrl-color-skeleton);
|
|
10
|
+
--mrl-button-border-radius: var(--mrl-border-radius-functional);
|
|
11
|
+
--mrl-button-height: var(--mrl-spacing-09);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Mixins
|
|
15
|
+
// --------------------------------------------------
|
|
16
|
+
/// Styles for buttons prior to hydrating or when it's in `state="skeleton"` which represents
|
|
17
|
+
/// a hydrated button within an overall application loading state
|
|
18
|
+
/// @group button
|
|
19
|
+
/// @example mrl-button[state="skeleton"] { @include mrl-button-skeleton; }
|
|
20
|
+
@mixin mrl-button-skeleton() {
|
|
21
|
+
background: var(--mrl-button-background-color-skeleton);
|
|
22
|
+
border-radius: var(--mrl-button-border-radius);
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
color: transparent;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
font-family: var(--mrl-font-family-01);
|
|
27
|
+
min-height: var(--mrl-button-height);
|
|
28
|
+
|
|
29
|
+
// per Design, the minimum should be a square
|
|
30
|
+
min-width: var(--mrl-button-height);
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
visibility: inherit;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Styles
|
|
36
|
+
// --------------------------------------------------
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// We scope the actual skeleton state to a class to allow adopters control
|
|
40
|
+
// over when the skeleton is visible
|
|
41
|
+
.mrl-u-preHydrateSkeleton {
|
|
42
|
+
// @todo - v2 - Using the :not selector to ensure no regressions with existing
|
|
43
|
+
// buttons but we should review to see if we can reduce this weight as :not is
|
|
44
|
+
// one of the heaviest selector types
|
|
45
|
+
mrl-button:not(.hydrated),
|
|
46
|
+
mrl-icon-button:not(.hydrated),
|
|
47
|
+
mrl-shadow-button:not(.hydrated) {
|
|
48
|
+
@include mrl-button-skeleton;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Skeleton state for inverse buttons
|
|
52
|
+
// Note: if you change any of the following styles, the button
|
|
53
|
+
// component's [state="skeleton"] styles also need to be updated
|
|
54
|
+
mrl-button[kind="inverse"]:not(.hydrated),
|
|
55
|
+
mrl-button[kind="ghost-inverse"]:not(.hydrated),
|
|
56
|
+
mrl-icon-button[kind="inverse"]:not(.hydrated),
|
|
57
|
+
mrl-icon-button[kind="ghost-inverse"]:not(.hydrated),
|
|
58
|
+
mrl-shadow-button[kind="inverse"]:not(.hydrated),
|
|
59
|
+
mrl-shadow-button[kind="ghost-inverse"]:not(.hydrated) {
|
|
60
|
+
--mrl-button-background-color-skeleton: var(--mrl-color-skeleton-inverse);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// The following styles are used for both the skeleton and the final rendering
|
|
65
|
+
// of the component so they are not scoped to a class.
|
|
66
|
+
mrl-button[size="small"],
|
|
67
|
+
mrl-icon-button[size="small"],
|
|
68
|
+
mrl-shadow-button[size="small"] {
|
|
69
|
+
--mrl-button-height: var(--mrl-spacing-08);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
mrl-button[size="large"],
|
|
73
|
+
mrl-icon-button[size="large"],
|
|
74
|
+
mrl-shadow-button[size="large"] {
|
|
75
|
+
// We don't have a 44px spacing token so we need to calculate this as padding does not
|
|
76
|
+
// impact min-height
|
|
77
|
+
--mrl-button-height: calc(var(--mrl-spacing-09) + var(--mrl-spacing-02));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// XSmall size is only allowed on the ghost variants of Icon Buttons
|
|
81
|
+
mrl-icon-button[size="xsmall"][kind="ghost"],
|
|
82
|
+
mrl-icon-button[size="xsmall"][kind="ghost-inverse"] {
|
|
83
|
+
--mrl-button-height: var(--mrl-spacing-07);
|
|
84
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Mural's design system component skeletons
|
|
3
|
+
///
|
|
4
|
+
/// Due to the nature of Stencil, we have to have skeleton states defined globally
|
|
5
|
+
/// to have them render correctly during the hydration process.
|
|
6
|
+
/// @todo v2 - explore how we can keep this code with it's related component
|
|
7
|
+
/// @group foundation
|
|
8
|
+
////
|
|
9
|
+
|
|
10
|
+
@forward "button"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Mural's design system spacing foundations
|
|
3
|
+
/// @group foundation
|
|
4
|
+
////
|
|
5
|
+
@use "mixins" as *;
|
|
6
|
+
|
|
7
|
+
/// The design system provides utility classes for adopters that do not support Sass
|
|
8
|
+
/// and can not rely on our mixins.
|
|
9
|
+
|
|
10
|
+
.mrl-u-space-center-horizontal {
|
|
11
|
+
@include mrl-space-center-horizontal;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mrl-u-space-center-horizontal-inline {
|
|
15
|
+
@include mrl-space-center-horizontal('inline');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mrl-u-space-center-vertical {
|
|
19
|
+
@include mrl-space-center-vertical;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mrl-u-space-center-vertical-inline {
|
|
23
|
+
@include mrl-space-center-vertical('inline');
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
////
|
|
2
|
+
/// Mural's design system typography foundations
|
|
3
|
+
/// @group foundation
|
|
4
|
+
////
|
|
5
|
+
@use "mixins" as *;
|
|
6
|
+
|
|
7
|
+
/// The design system provides utility classes for adopters that do not support Sass
|
|
8
|
+
/// and can not rely on our mixins.
|
|
9
|
+
$mrl-utils-text-interactive-sizes: 'xsmall', 'small', 'medium', 'large';
|
|
10
|
+
|
|
11
|
+
@each $size in $mrl-utils-text-interactive-sizes {
|
|
12
|
+
.mrl-u-text-interactive-#{$size} {
|
|
13
|
+
@include mrl-text-interactive($size);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mrl-u-text-toggleable-label {
|
|
18
|
+
@include mrl-text-toggleable-label;
|
|
19
|
+
}
|