@brightspace-ui/core 3.31.1 → 3.33.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.
@@ -318,3 +318,65 @@ export const blockquoteStyles = css`
318
318
  }
319
319
  }
320
320
  `;
321
+
322
+ const importUrl = 'https://s.brightspace.com/lib/fonts/0.6.1/assets/';
323
+ const fonts = {
324
+ LatoRegular: 'Lato-400',
325
+ LatoBold: 'Lato-700',
326
+ BCSansLight: 'BCSans-Light',
327
+ BCSansRegular: 'BCSans-Regular',
328
+ BCSansBold: 'BCSans-Bold',
329
+ BCSansLightItalic: 'BCSans-LightItalic',
330
+ BCSansItalic: 'BCSans-Italic',
331
+ BCSansBoldItalic: 'BCSans-BoldItalic'
332
+ };
333
+ export const fontFacesCss = `
334
+ @font-face {
335
+ font-family: 'Lato';
336
+ font-style: normal;
337
+ font-weight: 400;
338
+ src: local('Lato Regular'), local('Lato-Regular'), url(${new URL(`${fonts.LatoRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoRegular}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoRegular}.ttf`, importUrl)}) format('truetype');
339
+ }
340
+ @font-face {
341
+ font-family: 'Lato';
342
+ font-style: normal;
343
+ font-weight: 700;
344
+ src: local('Lato Bold'), local('Lato-Bold'), url(${new URL(`${fonts.LatoBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoBold}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoBold}.ttf`, importUrl)}) format('truetype');
345
+ }
346
+ @font-face {
347
+ font-family: 'BC Sans';
348
+ font-style: normal;
349
+ font-weight: 300;
350
+ src: url(${new URL(`${fonts.BCSansLight}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLight}.woff`, importUrl)}) format('woff');
351
+ }
352
+ @font-face {
353
+ font-family: 'BC Sans';
354
+ font-style: normal;
355
+ font-weight: 400;
356
+ src: url(${new URL(`${fonts.BCSansRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansRegular}.woff`, importUrl)}) format('woff');
357
+ }
358
+ @font-face {
359
+ font-family: 'BC Sans';
360
+ font-style: normal;
361
+ font-weight: 700;
362
+ src: url(${new URL(`${fonts.BCSansBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBold}.woff`, importUrl)}) format('woff');
363
+ }
364
+ @font-face {
365
+ font-family: 'BC Sans';
366
+ font-style: italic;
367
+ font-weight: 300;
368
+ src: url(${new URL(`${fonts.BCSansLightItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLightItalic}.woff`, importUrl)}) format('woff');
369
+ }
370
+ @font-face {
371
+ font-family: 'BC Sans';
372
+ font-style: italic;
373
+ font-weight: 400;
374
+ src: url(${new URL(`${fonts.BCSansItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansItalic}.woff`, importUrl)}) format('woff');
375
+ }
376
+ @font-face {
377
+ font-family: 'BC Sans';
378
+ font-style: italic;
379
+ font-weight: 700;
380
+ src: url(${new URL(`${fonts.BCSansBoldItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBoldItalic}.woff`, importUrl)}) format('woff');
381
+ }
382
+ `;
@@ -1,16 +1,5 @@
1
1
  import '../colors/colors.js';
2
-
3
- export const importUrl = 'https://s.brightspace.com/lib/fonts/0.6.1/assets/';
4
- export const fonts = {
5
- LatoRegular: 'Lato-400',
6
- LatoBold: 'Lato-700',
7
- BCSansLight: 'BCSans-Light',
8
- BCSansRegular: 'BCSans-Regular',
9
- BCSansBold: 'BCSans-Bold',
10
- BCSansLightItalic: 'BCSans-LightItalic',
11
- BCSansItalic: 'BCSans-Italic',
12
- BCSansBoldItalic: 'BCSans-BoldItalic'
13
- };
2
+ import { fontFacesCss } from './styles.js';
14
3
 
15
4
  if (!document.head.querySelector('#d2l-typography-font-face')) {
16
5
  const style = document.createElement('style');
@@ -24,54 +13,7 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
24
13
  --d2l-document-direction: rtl;
25
14
  }
26
15
 
27
- @font-face {
28
- font-family: 'Lato';
29
- font-style: normal;
30
- font-weight: 400;
31
- src: local('Lato Regular'), local('Lato-Regular'), url(${new URL(`${fonts.LatoRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoRegular}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoRegular}.ttf`, importUrl)}) format('truetype');
32
- }
33
- @font-face {
34
- font-family: 'Lato';
35
- font-style: normal;
36
- font-weight: 700;
37
- src: local('Lato Bold'), local('Lato-Bold'), url(${new URL(`${fonts.LatoBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.LatoBold}.woff`, importUrl)}) format('woff'), url(${new URL(`${fonts.LatoBold}.ttf`, importUrl)}) format('truetype');
38
- }
39
- @font-face {
40
- font-family: 'BC Sans';
41
- font-style: normal;
42
- font-weight: 300;
43
- src: url(${new URL(`${fonts.BCSansLight}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLight}.woff`, importUrl)}) format('woff');
44
- }
45
- @font-face {
46
- font-family: 'BC Sans';
47
- font-style: normal;
48
- font-weight: 400;
49
- src: url(${new URL(`${fonts.BCSansRegular}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansRegular}.woff`, importUrl)}) format('woff');
50
- }
51
- @font-face {
52
- font-family: 'BC Sans';
53
- font-style: normal;
54
- font-weight: 700;
55
- src: url(${new URL(`${fonts.BCSansBold}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBold}.woff`, importUrl)}) format('woff');
56
- }
57
- @font-face {
58
- font-family: 'BC Sans';
59
- font-style: italic;
60
- font-weight: 300;
61
- src: url(${new URL(`${fonts.BCSansLightItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansLightItalic}.woff`, importUrl)}) format('woff');
62
- }
63
- @font-face {
64
- font-family: 'BC Sans';
65
- font-style: italic;
66
- font-weight: 400;
67
- src: url(${new URL(`${fonts.BCSansItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansItalic}.woff`, importUrl)}) format('woff');
68
- }
69
- @font-face {
70
- font-family: 'BC Sans';
71
- font-style: italic;
72
- font-weight: 700;
73
- src: url(${new URL(`${fonts.BCSansBoldItalic}.woff2`, importUrl)}) format('woff2'), url(${new URL(`${fonts.BCSansBoldItalic}.woff`, importUrl)}) format('woff');
74
- }
16
+ ${fontFacesCss}
75
17
 
76
18
  .d2l-typography {
77
19
  color: var(--d2l-color-ferrite);