@snyk-mktg/brand-ui 2.2.0 → 2.3.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.
@@ -5,6 +5,27 @@
5
5
  not read the '@use' directive.
6
6
  */
7
7
 
8
+ /**
9
+ * Typically, we would want this color map lower (in the evo theme) but these themes were not
10
+ * built in a scale friendly way. So it needs to be up here. Everything will remain the same
11
+ * aside and I will import the evo colors into the evo colors file.
12
+ */
13
+ $evoui-colors: (
14
+ 'pink': #ff0ff3,
15
+ 'orange': #ff7f00,
16
+ 'blue': #003cff,
17
+ 'red': #ff003f,
18
+ 'teal': #00ff7f,
19
+ 'yellow': #ffff00,
20
+ 'purple': #7f00ff,
21
+ 'light-blue': #00ffff,
22
+ 'steel': #3f3f7f,
23
+ 'white': #ffffff,
24
+ 'black': #000000,
25
+ 'grey': #1e1e1e,
26
+ 'silver': #797979,
27
+ );
28
+
8
29
  /* Color variables */
9
30
  $brandui-colors: (
10
31
  'dark-purple': #441c99,
@@ -70,6 +70,70 @@ $brandui-default-themes: (
70
70
  ),
71
71
  ),
72
72
  ),
73
+ // Adding the evo theme here rather than in the evo folder
74
+ // Moving the theme down would involve bringinng a ton of imports down as well.
75
+ // This is an issue with BUI that we should resolve. But for now, its here.
76
+ evo:
77
+ (
78
+ light: (
79
+ text-solid: map.get($evoui-colors, 'white'),
80
+ // deprecate
81
+ solid: map.get($evoui-colors, 'white'),
82
+ solid-primary: map.get($evoui-colors, 'orange'),
83
+ solid-secondary: map.get($evoui-colors, 'pink'),
84
+ solid-tertiary: map.get($evoui-colors, 'blue'),
85
+ contrast: map.get($evoui-colors, 'black'),
86
+ base: map.get($evoui-colors, 'black'),
87
+ spotlight: map.get($evoui-colors, 'grey'),
88
+ highlight: map.get($evoui-colors, 'orange'),
89
+ text-gradient: (
90
+ // We don't want text gradients for the evo theme
91
+ start: map.get($evoui-colors, 'white'),
92
+ end: map.get($evoui-colors, 'white'),
93
+ ),
94
+ gradient-primary: (
95
+ start: map.get($evoui-colors, 'orange'),
96
+ end: map.get($evoui-colors, 'pink'),
97
+ ),
98
+ gradient-secondary: (
99
+ start: map.get($evoui-colors, 'blue'),
100
+ end: map.get($evoui-colors, 'light-blue'),
101
+ ),
102
+ gradient-tertiary: (
103
+ start: map.get($evoui-colors, 'purple'),
104
+ end: map.get($evoui-colors, 'pink'),
105
+ ),
106
+ ),
107
+ dark: (
108
+ text-solid: map.get($evoui-colors, 'white'),
109
+ // deprecate
110
+ solid: map.get($evoui-colors, 'white'),
111
+ solid-primary: map.get($evoui-colors, 'orange'),
112
+ solid-secondary: map.get($evoui-colors, 'pink'),
113
+ solid-tertiary: map.get($evoui-colors, 'blue'),
114
+ contrast: map.get($evoui-colors, 'black'),
115
+ base: map.get($evoui-colors, 'black'),
116
+ spotlight: map.get($evoui-colors, 'grey'),
117
+ highlight: map.get($evoui-colors, 'orange'),
118
+ text-gradient: (
119
+ // We don't want text gradients for the evo theme
120
+ start: map.get($evoui-colors, 'white'),
121
+ end: map.get($evoui-colors, 'white'),
122
+ ),
123
+ gradient-primary: (
124
+ start: map.get($evoui-colors, 'orange'),
125
+ end: map.get($evoui-colors, 'pink'),
126
+ ),
127
+ gradient-secondary: (
128
+ start: map.get($evoui-colors, 'blue'),
129
+ end: map.get($evoui-colors, 'light-blue'),
130
+ ),
131
+ gradient-tertiary: (
132
+ start: map.get($evoui-colors, 'purple'),
133
+ end: map.get($evoui-colors, 'pink'),
134
+ ),
135
+ ),
136
+ ),
73
137
  ) !default;
74
138
 
75
139
  $brandui-extended-themes: () !default; // Leave empty. Used to override or extend at the project-level
@@ -0,0 +1,12 @@
1
+ @use 'sass:map';
2
+ @use '../../base/variables/sizing' as *;
3
+
4
+ .text-grid-item {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: map.get($brandui-padding, 'extra-small');
8
+
9
+ &.center {
10
+ text-align: center;
11
+ }
12
+ }
@@ -177,6 +177,7 @@
177
177
  .nav-link {
178
178
  text-decoration: none;
179
179
  display: flex;
180
+ position: relative;
180
181
 
181
182
  &:hover,
182
183
  &:focus {
@@ -49,6 +49,7 @@
49
49
  @use '../scss/components/molecules/tables' as *;
50
50
  @use '../scss/components/molecules/table-of-contents' as *;
51
51
  @use '../scss/components/molecules/title-text' as *;
52
+ @use '../scss/components/molecules/text-grid-item' as *;
52
53
  @use '../scss/components/molecules/text-media' as *;
53
54
  @use '../scss/components/molecules/quote' as *;
54
55
  @use '../scss/components/organisms/breadcrumbs' as *;
@@ -0,0 +1,32 @@
1
+ // Base modules
2
+ @use '../../scss/base/fonts' as *; // Must be first to load Google fonts asap
3
+ @use '../../scss/base/functions' as *;
4
+ @use '../../scss/base/mixins' as *;
5
+ @use '../../scss/base/links' as *;
6
+ @use '../../scss/base/layout' as *;
7
+ @use '../../scss/base/spacing' as *;
8
+ @use '../../scss/base/sizing' as *;
9
+ @use '../../scss/base/decorations/decorations' as *;
10
+ @use '../../scss/base/decorations/glows' as *;
11
+ @use '../../scss/base/decorations/flourishes' as *;
12
+ @use '../../scss/base/decorations/markers' as *;
13
+ @use '../../scss/base/decorations/separators' as *;
14
+ @use '../../scss/base/decorations/sparkles' as *;
15
+
16
+ // Variables - The web version imports this differently. I'm
17
+ // putting it in this file to make thing more concise but if this gets so large it
18
+ // needs to be imported the same way, refer to that project
19
+
20
+ @use '../base/variables/themes' as *;
21
+ // @use '../base/variables/icons' as *;
22
+ @use './base/variables/colors' as *;
23
+
24
+ // Mixins, see comment above
25
+ @use './base/mixins/glass' as *;
26
+
27
+ // @use './base/variables/colors' as *;
28
+ @use './base/baseline' as *;
29
+ @use './base/typography' as *;
30
+ @use './base/decorations/backgrounds' as *;
31
+ @use './base/color' as *;
32
+ @use './base/variables/typography' as *;
@@ -4,7 +4,6 @@
4
4
  @use '../components/atoms/checkbox' as *;
5
5
  @use '../components/atoms/chip' as *;
6
6
  @use '../components/atoms/dropdown' as *;
7
- @use '../components/atoms/feature-checkmark' as *;
8
7
  @use '../components/atoms/icons' as *;
9
8
  @use '../components/atoms/input' as *;
10
9
  @use '../components/atoms/locale-selector' as *;
@@ -31,7 +30,6 @@
31
30
  @use '../components/molecules/announcements' as *;
32
31
  @use '../components/molecules/avatar-grid-item' as *;
33
32
  @use '../components/molecules/avatar-username' as *;
34
- @use '../components/molecules/cards/card' as *;
35
33
  @use '../components/molecules/cards/card-bg-image' as *;
36
34
  @use '../components/molecules/charts/charts' as *;
37
35
  @use '../components/molecules/charts/vertical-chart' as *;
@@ -67,7 +65,6 @@
67
65
  @use '../components/organisms/heroes/hero-form' as *;
68
66
  @use '../components/organisms/heroes/hero-text-media' as *;
69
67
  @use '../components/organisms/heroes/hero-title-text' as *;
70
- @use '../components/organisms/navigation' as *;
71
68
  @use '../components/organisms/split-content' as *;
72
69
  @use '../components/organisms/sticky-media' as *;
73
70
  @use '../components/organisms/sub-navigation' as *;
@@ -76,3 +73,7 @@
76
73
  // evo overwrites
77
74
 
78
75
  @use './components/atoms/button' as *;
76
+ @use './components/atoms/feature-checkmark' as *;
77
+ @use './components/molecules/cards/card' as *;
78
+ @use './components/molecules/text-grid-item' as *;
79
+ @use './components/organisms/navigation' as *;
@@ -0,0 +1,21 @@
1
+ @use '../../scss/utilities/accessibility.scss' as *;
2
+ @use '../../scss/utilities/animations.scss' as *;
3
+ @use '../../scss/utilities/backgrounds.scss' as *;
4
+ @use '../../scss/utilities/borders.scss' as *;
5
+ @use '../../scss/utilities/effects.scss' as *;
6
+ @use '../../scss/utilities/elevation.scss' as *;
7
+ @use '../../scss/utilities/filters.scss' as *;
8
+ @use '../../scss/utilities/flex.scss' as *;
9
+ @use '../../scss/utilities/flip.scss' as *;
10
+ @use '../../scss/utilities/grid.scss' as *;
11
+ @use '../../scss/utilities/interactions.scss' as *;
12
+ @use '../../scss/utilities/list-styles.scss' as *;
13
+ @use '../../scss/utilities/media.scss' as *;
14
+ @use '../../scss/utilities/scrollbar.scss' as *;
15
+ @use '../../scss/utilities/shape.scss' as *;
16
+ @use '../../scss/utilities/transforms.scss' as *;
17
+ @use '../../scss/utilities/transitions.scss' as *;
18
+ @use '../../scss/utilities/visibility.scss' as *;
19
+ @use '../../scss/utilities/keyframes.scss' as *;
20
+
21
+ @use './utilities/rich-text.scss' as *;
@@ -0,0 +1,50 @@
1
+ @use 'sass:map';
2
+ @use '../../base/baseline' as *;
3
+ @use './variables/typography' as *;
4
+
5
+ * {
6
+ // outline: none;
7
+ margin: 0;
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ html,
13
+ body {
14
+ height: 100%;
15
+ font-variant-numeric: proportional-nums;
16
+ -webkit-font-smoothing: antialiased;
17
+ /* Disable scroll behavior until can figure out why it
18
+ scrolls when clicking interactive HTML tags (select, checkbox) */
19
+ // scroll-behavior: smooth;
20
+ // scroll-padding-top: 200px;
21
+ }
22
+
23
+ body {
24
+ font-size: 1rem;
25
+ font-family: map.get($brandui-font-family, roboto), sans-serif;
26
+ color: brandui-color-labels(ui-body);
27
+
28
+ &.dark-mode,
29
+ & .dark-mode {
30
+ color: brandui-color-labels(ui-body-dark);
31
+ }
32
+ -webkit-font-smoothing: antialiased;
33
+ }
34
+
35
+ body {
36
+ font-family: map.get($brandui-font-family, geist-mono), monospace;
37
+ }
38
+
39
+ h1,
40
+ h2,
41
+ h3,
42
+ h4,
43
+ h5,
44
+ h6 {
45
+ font-family: map.get($brandui-font-family, geist), sans-serif;
46
+ }
47
+
48
+ code:not([class]) {
49
+ font-family: map.get($brandui-font-family, geist), sans-serif;
50
+ }
@@ -0,0 +1,8 @@
1
+ @use '../../base/color' as *;
2
+ @use '../../base/mixins/color-mode' as colors;
3
+ @use '../base/variables/colors' as *;
4
+ @use '../../base/functions' as *;
5
+
6
+ .bg-page {
7
+ // @include colors.color-mode(background-color, brandui-color-labels(default), brandui-color-labels(default-dark));
8
+ }
@@ -0,0 +1,352 @@
1
+ @use 'sass:map';
2
+ @use 'sass:string';
3
+ @use '../../base/variables/colors' as *;
4
+ @use '../base/variables/typography' as *;
5
+ @use '../../base/variables/breakpoints' as *;
6
+ @use '../../base/variables/sizing' as *;
7
+ @use '../../base/mixins/page-theme' as theme;
8
+ @use '../../base/mixins/typography' as font;
9
+ @use '../../base/functions' as *;
10
+
11
+ @each $element-key, $element-val in $text-elements {
12
+ // Text Styles
13
+ .txt-#{$element-key} {
14
+ font-family: map.get($element-val, 'family'), map.get($element-val, 'type');
15
+ font-size: map.get($brandui-font-size, $element-key);
16
+ font-weight: map.get($element-val, 'weight');
17
+ letter-spacing: map.get($element-val, letter-spacing);
18
+ line-height: map.get($brandui-line-height, $element-key);
19
+ padding: 0;
20
+ text-transform: map.get($element-val, text-transform);
21
+
22
+ @if ($element-key == 'body' or $element-key == 'body-bold') {
23
+ strong,
24
+ b {
25
+ font-weight: 700;
26
+
27
+ strong,
28
+ b {
29
+ font-weight: 700;
30
+ }
31
+ }
32
+ }
33
+
34
+ @if ($element-key == 'body-small' or $element-key == 'body-small-medium') {
35
+ strong,
36
+ b {
37
+ font-weight: 500;
38
+
39
+ strong,
40
+ b {
41
+ font-weight: 500;
42
+ }
43
+ }
44
+ }
45
+
46
+ // Responsive font values
47
+ @if (map.get($text-elements-responsive, $element-key)) {
48
+ $responsive-val: map.get($text-elements-responsive, $element-key);
49
+ $responsive-key: map.get($responsive-val, 'target');
50
+
51
+ @media (max-width: '#{map.get($brandui-device-breakpoints-new, mobile, value)}px') {
52
+ font-family: map.get($responsive-val, 'family'), map.get($responsive-val, 'type');
53
+ font-size: map.get($brandui-font-size, $responsive-key);
54
+ font-weight: map.get($responsive-val, 'weight');
55
+ letter-spacing: map.get($responsive-val, letter-spacing);
56
+ line-height: map.get($brandui-line-height, $responsive-key);
57
+ text-transform: map.get($responsive-val, text-transform);
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ .code-wrap {
64
+ background: map.get($brandui-colors, 'snow');
65
+ border: 0.0625rem solid RGBA(brandui-rgb-labels(neutral-1), 0.1);
66
+ border-radius: 0.375rem;
67
+ box-sizing: border-box;
68
+ color: map.get($brandui-colors, 'rose');
69
+ display: inline-block;
70
+ font-family: map.get($brandui-font-family, roboto-mono), monospace;
71
+ font-size: map.get($brandui-font-size, code);
72
+ line-height: map.get($brandui-line-height, code);
73
+ padding: 0.1875rem 0.375rem;
74
+ position: relative;
75
+
76
+ &.code-block {
77
+ display: block;
78
+ padding: 0.375rem 0.75rem;
79
+ width: 100%;
80
+ }
81
+
82
+ &.dark-mode {
83
+ background: map.get($brandui-colors, 'space');
84
+ color: map.get($brandui-colors, 'white');
85
+ }
86
+ }
87
+
88
+ @each $device-key, $device-map in $brandui-device-breakpoints-new {
89
+ $device-value: map.get($device-map, 'value');
90
+ $device-prefix: map.get($device-map, 'prefix');
91
+
92
+ @media (max-width: string.unquote('#{$device-value}px')) {
93
+ // Device Breakpoints Start
94
+
95
+ @for $i from 1 through 10 {
96
+ .#{$device-prefix}txt-line-clamp-#{$i} {
97
+ -webkit-line-clamp: #{$i};
98
+ }
99
+ }
100
+
101
+ .#{$device-prefix}txt-left {
102
+ text-align: left;
103
+ }
104
+
105
+ .#{$device-prefix}hover\:txt-left {
106
+ &:hover {
107
+ text-align: left;
108
+ }
109
+ }
110
+
111
+ .#{$device-prefix}txt-center {
112
+ text-align: center;
113
+ }
114
+
115
+ .#{$device-prefix}hover\:txt-center {
116
+ &:hover {
117
+ text-align: center;
118
+ }
119
+ }
120
+
121
+ .#{$device-prefix}txt-right {
122
+ text-align: right;
123
+ }
124
+
125
+ .#{$device-prefix}hover\:txt-right {
126
+ &:hover {
127
+ text-align: right;
128
+ }
129
+ }
130
+
131
+ .#{$device-prefix}white-space-nowrap {
132
+ white-space: nowrap;
133
+ }
134
+
135
+ .#{$device-prefix}hover\:white-space-nowrap {
136
+ &:hover {
137
+ white-space: nowrap;
138
+ }
139
+ }
140
+
141
+ .#{$device-prefix}white-space-initial {
142
+ white-space: initial;
143
+ }
144
+
145
+ .#{$device-prefix}hover\:white-space-initial {
146
+ &:hover {
147
+ white-space: initial;
148
+ }
149
+ }
150
+
151
+ .#{$device-prefix}txt-break-all {
152
+ word-break: break-all;
153
+ }
154
+
155
+ .#{$device-prefix}txt-keep-all {
156
+ word-break: keep-all;
157
+ }
158
+
159
+ .#{$device-prefix}txt-normal {
160
+ word-break: normal;
161
+ }
162
+
163
+ .#{$device-prefix}txt-overflow-wrap-normal {
164
+ overflow-wrap: normal;
165
+ }
166
+
167
+ .#{$device-prefix}txt-overflow-wrap-break-word {
168
+ overflow-wrap: break-word;
169
+ }
170
+
171
+ .#{$device-prefix}txt-overflow-wrap-anywhere {
172
+ overflow-wrap: anywhere;
173
+ }
174
+
175
+ .#{$device-prefix}txt-overflow-ellipsis {
176
+ text-overflow: ellipsis;
177
+ }
178
+
179
+ .#{$device-prefix}hover\:txt-overflow-ellipsis {
180
+ &:hover {
181
+ text-overflow: ellipsis;
182
+ }
183
+ }
184
+
185
+ .#{$device-prefix}txt-uppercase {
186
+ text-transform: uppercase;
187
+ }
188
+
189
+ .#{$device-prefix}hover\:txt-uppercase {
190
+ &:hover {
191
+ text-transform: uppercase;
192
+ }
193
+ }
194
+
195
+ .#{$device-prefix}txt-lowercase {
196
+ text-transform: lowercase;
197
+ }
198
+
199
+ .#{$device-prefix}hover\:txt-lowercase {
200
+ &:hover {
201
+ text-transform: lowercase;
202
+ }
203
+ }
204
+
205
+ .#{$device-prefix}txt-capitalize {
206
+ text-transform: capitalize;
207
+ }
208
+
209
+ .#{$device-prefix}hover\:txt-capitalize {
210
+ &:hover {
211
+ text-transform: capitalize;
212
+ }
213
+ }
214
+
215
+ .#{$device-prefix}txt-transform-none {
216
+ text-transform: none;
217
+ }
218
+
219
+ .#{$device-prefix}hover\:txt-transform-none {
220
+ &:hover {
221
+ text-transform: none;
222
+ }
223
+ }
224
+
225
+ .#{$device-prefix}txt-transform-initial {
226
+ text-transform: initial;
227
+ }
228
+
229
+ .#{$device-prefix}hover\:txt-transform-initial {
230
+ &:hover {
231
+ text-transform: initial;
232
+ }
233
+ }
234
+
235
+ // Device Breakpoints End
236
+ }
237
+ }
238
+
239
+ .txt-decoration-style-dashed {
240
+ text-decoration-style: dashed;
241
+ }
242
+
243
+ .txt-decoration-style-dotted {
244
+ text-decoration-style: dotted;
245
+ }
246
+
247
+ .txt-decoration-style-double {
248
+ text-decoration-style: double;
249
+ }
250
+
251
+ .txt-decoration-style-wavy {
252
+ text-decoration-style: wavy;
253
+ }
254
+
255
+ .txt-decoration-style-solid {
256
+ text-decoration-style: solid;
257
+ }
258
+
259
+ .txt-decoration-style-none {
260
+ text-decoration-style: none;
261
+ }
262
+
263
+ .txt-decoration-none {
264
+ text-decoration: none;
265
+ }
266
+
267
+ .group:hover .group-hover\:txt-decoration-none {
268
+ text-decoration: none;
269
+ }
270
+
271
+ .hover\:txt-decoration-none {
272
+ &:hover {
273
+ text-decoration: none;
274
+ }
275
+ }
276
+
277
+ .txt-decoration-underline {
278
+ text-decoration: underline;
279
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
280
+ text-underline-offset: map.get($brandui-padding, slim);
281
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
282
+ text-decoration-thickness: map.get($brandui-padding, hairline);
283
+ }
284
+
285
+ .group:hover .group-hover\:txt-decoration-underline {
286
+ text-decoration: underline;
287
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
288
+ text-underline-offset: map.get($brandui-padding, slim);
289
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
290
+ text-decoration-thickness: map.get($brandui-padding, hairline);
291
+ }
292
+
293
+ .hover\:txt-decoration-underline {
294
+ &:hover {
295
+ text-decoration: underline;
296
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
297
+ text-underline-offset: map.get($brandui-padding, slim);
298
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
299
+ text-decoration-thickness: map.get($brandui-padding, hairline);
300
+ }
301
+ }
302
+
303
+ .link-decoration-underline a {
304
+ text-decoration: underline;
305
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
306
+ text-underline-offset: map.get($brandui-padding, slim);
307
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
308
+ text-decoration-thickness: map.get($brandui-padding, hairline);
309
+ }
310
+
311
+ .group:hover .group-hover\:link-decoration-underline a {
312
+ text-decoration: underline;
313
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
314
+ text-underline-offset: map.get($brandui-padding, slim);
315
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
316
+ text-decoration-thickness: map.get($brandui-padding, hairline);
317
+ }
318
+
319
+ .hover\:link-decoration-underline a {
320
+ &:hover {
321
+ text-decoration: underline;
322
+ -moz-text-underline-offset: map.get($brandui-padding, slim);
323
+ text-underline-offset: map.get($brandui-padding, slim);
324
+ -moz-text-decoration-thickness: map.get($brandui-padding, hairline);
325
+ text-decoration-thickness: map.get($brandui-padding, hairline);
326
+ }
327
+ }
328
+
329
+ // Used in the Labs site in place of the section intro
330
+ .scrolling-ticker {
331
+ width: max-content;
332
+ margin-bottom: string.unquote('-#{map.get($brandui-padding, extra-large)}');
333
+ display: flex;
334
+ gap: map.get($brandui-padding, small);
335
+ @include font.get-typography(mini-header);
336
+ @include theme.theme-color(color, 'text-solid');
337
+
338
+ p {
339
+ min-width: fit-content;
340
+ display: flex;
341
+ font-family: map.get($brandui-font-family, space-mono), monospace;
342
+ }
343
+
344
+ p + p:before {
345
+ content: '✷';
346
+ margin-right: map.get($brandui-padding, small);
347
+ font-family: 'brandui-icons';
348
+ font-style: normal;
349
+ font-size: map.get($brandui-font-size, 'subhead-small');
350
+ font-weight: 600;
351
+ }
352
+ }