@brightspace-ui/core 3.130.0 → 3.131.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.
@@ -9,6 +9,14 @@ import { ifDefined } from 'lit/directives/if-defined.js';
9
9
  import { InputInlineHelpMixin } from './input-inline-help.js';
10
10
  import { offscreenStyles } from '../offscreen/offscreen.js';
11
11
  import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
12
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
13
+
14
+ export const inputCheck = svgToCSS(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
15
+ <path fill="#494C4E" d="M8.4 16.6c.6.6 1.5.6 2.1 0l8-8c.6-.6.6-1.5 0-2.1-.6-.6-1.5-.6-2.1 0l-6.9 7-1.9-1.9c-.6-.6-1.5-.6-2.1 0-.6.6-.6 1.5 0 2.1l2.9 2.9z"/>\
16
+ </svg>`);
17
+ export const inputCheckIndeterminate = svgToCSS(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
18
+ <path fill="#494C4E" d="M7.5,11h9c0.8,0,1.5,0.7,1.5,1.5l0,0c0,0.8-0.7,1.5-1.5,1.5h-9C6.7,14,6,13.3,6,12.5l0,0C6,11.7,6.7,11,7.5,11z"/>
19
+ </svg>`);
12
20
 
13
21
  export const cssSizes = {
14
22
  inputBoxSize: 1.2,
@@ -35,10 +43,10 @@ export const checkboxStyles = css`
35
43
  width: ${cssSizes.inputBoxSize}rem;
36
44
  }
37
45
  input[type="checkbox"].d2l-input-checkbox:checked {
38
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23494C4E%22%20d%3D%22M8.4%2016.6c.6.6%201.5.6%202.1%200l8-8c.6-.6.6-1.5%200-2.1-.6-.6-1.5-.6-2.1%200l-6.9%207-1.9-1.9c-.6-.6-1.5-.6-2.1%200-.6.6-.6%201.5%200%202.1l2.9%202.9z%22/%3E%3C/svg%3E%0A");
46
+ background-image: ${inputCheck};
39
47
  }
40
48
  input[type="checkbox"].d2l-input-checkbox:indeterminate {
41
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23494C4E%22%20d%3D%22M7.5%2C11h9c0.8%2C0%2C1.5%2C0.7%2C1.5%2C1.5l0%2C0c0%2C0.8-0.7%2C1.5-1.5%2C1.5h-9C6.7%2C14%2C6%2C13.3%2C6%2C12.5l0%2C0%0A%09C6%2C11.7%2C6.7%2C11%2C7.5%2C11z%22/%3E%3C/svg%3E%0A");
49
+ background-image: ${inputCheckIndeterminate};
42
50
  }
43
51
  input[type="checkbox"].d2l-input-checkbox,
44
52
  input[type="checkbox"].d2l-input-checkbox:hover:disabled {
@@ -15,6 +15,7 @@ import { inputLabelStyles } from './input-label-styles.js';
15
15
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
16
16
  import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
17
17
  import { styleMap } from 'lit/directives/style-map.js';
18
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
18
19
 
19
20
  const DEFAULT_VALUE = '#000000';
20
21
  const DEFAULT_VALUE_BG = '#FFFFFF';
@@ -194,7 +195,7 @@ class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(F
194
195
  height: 1rem;
195
196
  }
196
197
  .swatch-transparent {
197
- background-image: url("data:image/svg+xml;base64,${unsafeCSS(btoa(SWATCH_TRANSPARENT))}");
198
+ background-image: ${svgToCSS(SWATCH_TRANSPARENT)};
198
199
  background-position-y: -1.5px;
199
200
  background-size: cover;
200
201
  }
@@ -1,4 +1,9 @@
1
1
  import { css } from 'lit';
2
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
3
+
4
+ const requiredIcon = svgToCSS(`<svg width="5" height="6" viewBox="0 0 5 6" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="M2.38 5.141V3.86c0-.093.006-.184.018-.273.011-.089.031-.173.059-.252a.927.927 0 0 1-.182.175c-.07.051-.145.103-.224.154l-1.106.644-.413-.7 1.113-.644c.084-.051.167-.093.248-.126.082-.033.167-.056.256-.07a.816.816 0 0 1-.256-.07 2.356 2.356 0 0 1-.248-.133L.532 1.914l.406-.7 1.113.658c.08.051.155.104.228.157a.966.966 0 0 1 .185.179 1.002 1.002 0 0 1-.066-.252 2.091 2.091 0 0 1-.018-.273V.388h.826v1.281c0 .098-.006.192-.017.283a1.003 1.003 0 0 1-.067.256c.051-.065.112-.125.182-.179.07-.053.147-.106.231-.157l1.106-.644.413.7-1.113.637a1.954 1.954 0 0 1-.248.13 1.07 1.07 0 0 1-.256.073c.159.028.327.093.504.196l1.113.651-.406.7-1.113-.651a3.307 3.307 0 0 1-.231-.154 1.122 1.122 0 0 1-.189-.175c.06.15.091.322.091.518v1.288H2.38z" fill="#494C4E" fill-rule="evenodd"/>
6
+ </svg>`);
2
7
 
3
8
  export const inputLabelStyles = css`
4
9
  .d2l-input-label {
@@ -14,7 +19,7 @@ export const inputLabelStyles = css`
14
19
  }
15
20
  :host([required]) .d2l-input-label::after,
16
21
  .d2l-input-label-required::after {
17
- background-image: url("data:image/svg+xml,%3Csvg%20width%3D%225%22%20height%3D%226%22%20viewBox%3D%220%200%205%206%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.38%205.141V3.86c0-.093.006-.184.018-.273.011-.089.031-.173.059-.252a.927.927%200%200%201-.182.175c-.07.051-.145.103-.224.154l-1.106.644-.413-.7%201.113-.644c.084-.051.167-.093.248-.126.082-.033.167-.056.256-.07a.816.816%200%200%201-.256-.07%202.356%202.356%200%200%201-.248-.133L.532%201.914l.406-.7%201.113.658c.08.051.155.104.228.157a.966.966%200%200%201%20.185.179%201.002%201.002%200%200%201-.066-.252%202.091%202.091%200%200%201-.018-.273V.388h.826v1.281c0%20.098-.006.192-.017.283a1.003%201.003%200%200%201-.067.256c.051-.065.112-.125.182-.179.07-.053.147-.106.231-.157l1.106-.644.413.7-1.113.637a1.954%201.954%200%200%201-.248.13%201.07%201.07%200%200%201-.256.073c.159.028.327.093.504.196l1.113.651-.406.7-1.113-.651a3.307%203.307%200%200%201-.231-.154%201.122%201.122%200%200%201-.189-.175c.06.15.091.322.091.518v1.288H2.38z%22%20fill%3D%22%23494C4E%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");
22
+ background-image: ${requiredIcon};
18
23
  bottom: 0.25rem;
19
24
  content: "";
20
25
  display: inline-block;
@@ -42,7 +47,7 @@ export const inputLabelStyles = css`
42
47
  .d2l-input-label-required::after {
43
48
  background-color: FieldText;
44
49
  background-image: none;
45
- mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%225%22%20height%3D%226%22%20viewBox%3D%220%200%205%206%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.38%205.141V3.86c0-.093.006-.184.018-.273.011-.089.031-.173.059-.252a.927.927%200%200%201-.182.175c-.07.051-.145.103-.224.154l-1.106.644-.413-.7%201.113-.644c.084-.051.167-.093.248-.126.082-.033.167-.056.256-.07a.816.816%200%200%201-.256-.07%202.356%202.356%200%200%201-.248-.133L.532%201.914l.406-.7%201.113.658c.08.051.155.104.228.157a.966.966%200%200%201%20.185.179%201.002%201.002%200%200%201-.066-.252%202.091%202.091%200%200%201-.018-.273V.388h.826v1.281c0%20.098-.006.192-.017.283a1.003%201.003%200%200%201-.067.256c.051-.065.112-.125.182-.179.07-.053.147-.106.231-.157l1.106-.644.413.7-1.113.637a1.954%201.954%200%200%201-.248.13%201.07%201.07%200%200%201-.256.073c.159.028.327.093.504.196l1.113.651-.406.7-1.113-.651a3.307%203.307%200%200%201-.231-.154%201.122%201.122%200%200%201-.189-.175c.06.15.091.322.091.518v1.288H2.38z%22%20fill%3D%22%23FFFFFF%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");
50
+ mask-image: ${requiredIcon};
46
51
  }
47
52
  }
48
53
  `;
@@ -1,5 +1,10 @@
1
1
  import '../colors/colors.js';
2
2
  import { css } from 'lit';
3
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
4
+
5
+ const radioCheck = svgToCSS(`<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
6
+ <circle cx="5" cy="5" r="5" fill="#494c4e"></circle>
7
+ </svg>`);
3
8
 
4
9
  export const radioStyles = css`
5
10
  .d2l-input-radio,
@@ -23,7 +28,7 @@ export const radioStyles = css`
23
28
  .d2l-input-radio[aria-checked="true"],
24
29
  .d2l-input-radio:checked,
25
30
  .d2l-input-radio-label > input[type="radio"]:checked {
26
- background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%0A%09%3Ccircle%20cx%3D%225%22%20cy%3D%225%22%20r%3D%225%22%20fill%3D%22%23494c4e%22%3E%3C/circle%3E%0A%3C/svg%3E");
31
+ background-image: ${radioCheck};
27
32
  }
28
33
  .d2l-input-radio,
29
34
  .d2l-input-radio:hover:disabled,
@@ -1,16 +1,22 @@
1
1
  import '../colors/colors.js';
2
2
  import { css, unsafeCSS } from 'lit';
3
3
  import { getFocusPseudoClass } from '../../helpers/focus.js';
4
+ import { invalidIcon } from './input-styles.js';
5
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
4
6
 
5
7
  const focusClass = unsafeCSS(getFocusPseudoClass());
6
8
 
9
+ const chevron = svgToCSS(`<svg width="11" height="7" viewBox="0 0 11 7" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M1 2l4.5 4M10 2L5.5 6" stroke="#565A5C" stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="round"/>
11
+ </svg>`);
12
+
7
13
  export const selectStyles = css`
8
14
  .d2l-input-select {
9
15
  -webkit-appearance: none;
10
16
  -moz-appearance: none;
11
17
  appearance: none;
12
18
  background-color: #ffffff;
13
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDExIDciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTEgMmw0LjUgNE0xMCAyTDUuNSA2IiBzdHJva2U9IiM1NjVBNUMiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+");
19
+ background-image: ${chevron};
14
20
  background-origin: border-box;
15
21
  background-position: center right 17px;
16
22
  background-repeat: no-repeat;
@@ -45,7 +51,7 @@ export const selectStyles = css`
45
51
  outline-offset: -2px;
46
52
  }
47
53
  .d2l-input-select[aria-invalid="true"] {
48
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDExIDciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTEgMmw0LjUgNE0xMCAyTDUuNSA2IiBzdHJva2U9IiM1NjVBNUMiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+"), url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICA8cGF0aCBmaWxsPSIjY2QyMDI2IiBkPSJNMTcuNzkgMTUuMTFsLTctMTRhMiAyIDAgMCAwLTMuNTggMGwtNyAxNGExLjk3NSAxLjk3NSAwIDAgMCAuMDkgMS45NEEyIDIgMCAwIDAgMiAxOGgxNGExLjk5NCAxLjk5NCAwIDAgMCAxLjctLjk1IDEuOTY3IDEuOTY3IDAgMCAwIC4wOS0xLjk0ek05IDE2YTEuNSAxLjUgMCAxIDEgMS41LTEuNUExLjUgMS41IDAgMCAxIDkgMTZ6bS45OC00LjgwNmExIDEgMCAwIDEtMS45NiAwbC0uOTktNUExIDEgMCAwIDEgOC4wMSA1aDEuOTgzYTEgMSAwIDAgMSAuOTggMS4xOTR6Ii8+Cjwvc3ZnPgo=");
54
+ background-image: ${chevron}, ${invalidIcon};
49
55
  background-position: center right 17px, center right calc(1px + 11px + 17px);
50
56
  background-repeat: no-repeat, no-repeat;
51
57
  background-size: 11px 7px, 0.8rem 0.8rem;
@@ -88,7 +94,7 @@ export const selectStyles = css`
88
94
  }
89
95
 
90
96
  .d2l-input-select[aria-invalid="true"] {
91
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICA8cGF0aCBmaWxsPSIjY2QyMDI2IiBkPSJNMTcuNzkgMTUuMTFsLTctMTRhMiAyIDAgMCAwLTMuNTggMGwtNyAxNGExLjk3NSAxLjk3NSAwIDAgMCAuMDkgMS45NEEyIDIgMCAwIDAgMiAxOGgxNGExLjk5NCAxLjk5NCAwIDAgMCAxLjctLjk1IDEuOTY3IDEuOTY3IDAgMCAwIC4wOS0xLjk0ek05IDE2YTEuNSAxLjUgMCAxIDEgMS41LTEuNUExLjUgMS41IDAgMCAxIDkgMTZ6bS45OC00LjgwNmExIDEgMCAwIDEtMS45NiAwbC0uOTktNUExIDEgMCAwIDEgOC4wMSA1aDEuOTgzYTEgMSAwIDAgMSAuOTggMS4xOTR6Ii8+Cjwvc3ZnPgo=");
97
+ background-image: ${invalidIcon};
92
98
  background-position: center right calc(1px + 11px + 17px);
93
99
  background-repeat: no-repeat;
94
100
  background-size: 0.8rem 0.8rem;
@@ -1,9 +1,15 @@
1
1
  import '../colors/colors.js';
2
2
  import { css, unsafeCSS } from 'lit';
3
3
  import { getFocusPseudoClass } from '../../helpers/focus.js';
4
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
4
5
 
5
6
  const focusClass = unsafeCSS(getFocusPseudoClass());
6
7
 
8
+ export const invalidIcon = svgToCSS(`<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
9
+ <path fill="#cd2026" d="M17.79 15.11l-7-14a2 2 0 0 0-3.58 0l-7 14a1.975 1.975 0 0 0 .09 1.94A2 2 0 0 0 2 18h14a1.994 1.994 0 0 0 1.7-.95 1.967 1.967 0 0 0 .09-1.94zM9 16a1.5 1.5 0 1 1 1.5-1.5A1.5 1.5 0 0 1 9 16zm.98-4.806a1 1 0 0 1-1.96 0l-.99-5A1 1 0 0 1 8.01 5h1.983a1 1 0 0 1 .98 1.194z"/>
10
+ <path fill="#FFF" d="M9 16a1.5 1.5 0 1 1 1.5-1.5A1.5 1.5 0 0 1 9 16zm.98-4.806a1 1 0 0 1-1.96 0l-.99-5A1 1 0 0 1 8.01 5h1.983a1 1 0 0 1 .98 1.194z"/>
11
+ </svg>`);
12
+
7
13
  export const inputStyles = css`
8
14
  .d2l-input {
9
15
  background-color: var(--d2l-input-background-color, #ffffff);
@@ -85,12 +91,13 @@ export const inputStyles = css`
85
91
  padding-block: calc(0.5rem - 1px);
86
92
  }
87
93
  textarea.d2l-input[aria-invalid="true"] {
88
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICA8cGF0aCBmaWxsPSIjY2QyMDI2IiBkPSJNMTcuNzkgMTUuMTFsLTctMTRhMiAyIDAgMCAwLTMuNTggMGwtNyAxNGExLjk3NSAxLjk3NSAwIDAgMCAuMDkgMS45NEEyIDIgMCAwIDAgMiAxOGgxNGExLjk5NCAxLjk5NCAwIDAgMCAxLjctLjk1IDEuOTY3IDEuOTY3IDAgMCAwIC4wOS0xLjk0ek05IDE2YTEuNSAxLjUgMCAxIDEgMS41LTEuNUExLjUgMS41IDAgMCAxIDkgMTZ6bS45OC00LjgwNmExIDEgMCAwIDEtMS45NiAwbC0uOTktNUExIDEgMCAwIDEgOC4wMSA1aDEuOTgzYTEgMSAwIDAgMSAuOTggMS4xOTR6Ii8+Cjwvc3ZnPgo=");
94
+ background-image: ${invalidIcon};
89
95
  background-position: top 12px right 18px;
90
96
  background-repeat: no-repeat;
91
97
  background-size: 0.8rem 0.8rem;
92
98
  padding-inline-end: calc(18px + 0.8rem);
93
99
  }
100
+ textarea.d2l-input-focus[aria-invalid="true"],
94
101
  textarea.d2l-input[aria-invalid="true"]:hover,
95
102
  textarea.d2l-input[aria-invalid="true"]:${focusClass} {
96
103
  background-position: top calc(12px - 1px) right calc(18px - 1px);
@@ -99,6 +106,7 @@ export const inputStyles = css`
99
106
  :host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"] {
100
107
  background-position: top 12px left 18px;
101
108
  }
109
+ :host([dir="rtl"]) textarea.d2l-input-focus[aria-invalid="true"],
102
110
  :host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"]:${focusClass},
103
111
  :host([dir="rtl"]) textarea.d2l-input[aria-invalid="true"]:hover {
104
112
  background-position: top calc(12px - 1px) left calc(18px - 1px);
@@ -1,6 +1,7 @@
1
1
  import '../colors/colors.js';
2
2
  import '../tooltip/tooltip.js';
3
3
  import { css, html, LitElement, nothing } from 'lit';
4
+ import { inputStyles, invalidIcon } from './input-styles.js';
4
5
  import { classMap } from 'lit/directives/class-map.js';
5
6
  import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
6
7
  import { formatNumber } from '@brightspace-ui/intl/lib/number.js';
@@ -9,7 +10,6 @@ import { getUniqueId } from '../../helpers/uniqueId.js';
9
10
  import { ifDefined } from 'lit/directives/if-defined.js';
10
11
  import { InputInlineHelpMixin } from './input-inline-help.js';
11
12
  import { inputLabelStyles } from './input-label-styles.js';
12
- import { inputStyles } from './input-styles.js';
13
13
  import { LabelledMixin } from '../../mixins/labelled/labelled-mixin.js';
14
14
  import { offscreenStyles } from '../offscreen/offscreen.js';
15
15
  import { PerfMonitor } from '../../helpers/perfMonitor.js';
@@ -258,7 +258,10 @@ class InputText extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(La
258
258
  opacity: 0.5;
259
259
  }
260
260
  .d2l-input-text-invalid-icon {
261
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxwYXRoIGQ9Ik0xOC44NjQgMTYuNDdMMTIuNjIzIDMuOTg5YTEuNzgzIDEuNzgzIDAgMDAtMy4xOTIgMEwzLjE4OSAxNi40N2ExLjc2MSAxLjc2MSAwIDAwLjA4IDEuNzNjLjMyNS41MjUuODk4Ljc5OCAxLjUxNi43OTloMTIuNDgzYy42MTggMCAxLjE5Mi0uMjczIDEuNTE2LS44LjIzNy0uMzM1LjI2NS0xLjM3LjA4LTEuNzN6IiBmaWxsPSIjQ0QyMDI2IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz4KICAgIDxwYXRoIGQ9Ik0xMS4wMjcgMTcuMjY0YTEuMzM3IDEuMzM3IDAgMTEwLTIuNjc1IDEuMzM3IDEuMzM3IDAgMDEwIDIuNjc1ek0xMS45IDEyLjk4YS44OTIuODkyIDAgMDEtMS43NDcgMEw5LjI3IDguNTJhLjg5Mi44OTIgMCAwMS44NzQtMS4wNjRoMS43NjhhLjg5Mi44OTIgMCAwMS44NzQgMS4wNjVsLS44ODYgNC40NTh6IiBmaWxsPSIjRkZGIi8+CiAgPC9nPgo8L3N2Zz4=");
261
+ background-image: ${invalidIcon};
262
+ background-position: center center;
263
+ background-repeat: no-repeat;
264
+ background-size: 0.8rem 0.8rem;
262
265
  display: flex;
263
266
  height: 22px;
264
267
  position: absolute;
@@ -1,5 +1,6 @@
1
1
  import '../colors/colors.js';
2
2
  import { css, unsafeCSS } from 'lit';
3
+ import { svgToCSS } from '../../helpers/svg-to-css.js';
3
4
 
4
5
  export const _isValidCssSelector = (selector) => {
5
6
  const partIsValid = (part) => {
@@ -361,6 +362,16 @@ export const _generateLabelStyles = (selector, includeSkeleton = true) => {
361
362
  };
362
363
  export const labelStyles = _generateLabelStyles('.d2l-label-text', true);
363
364
 
365
+ const quoteIcon = svgToCSS(`<svg width="11" height="11" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
366
+ <defs>
367
+ <path id="a" d="M0 0h24v24H0z"/>
368
+ </defs>
369
+ <g transform="translate(-1 -1)" fill="none" fill-rule="evenodd">
370
+ <mask id="b" fill="#fff"><use xlink:href="#a"/></mask>
371
+ <path d="M6 22.667A4.667 4.667 0 0 0 10.667 18c0-1.227-.559-2.5-1.334-3.333C8.481 13.75 7.35 13.333 6 13.333c-.411 0 1.333-6.666 3-9 1.667-2.333 1.333-3 .333-3C8 1.333 5.253 4.586 4 7.255 1.773 12 1.333 15.392 1.333 18A4.667 4.667 0 0 0 6 22.667zm12 0A4.667 4.667 0 0 0 22.667 18c0-1.227-.559-2.5-1.334-3.333-.852-.917-1.983-1.334-3.333-1.334-.411 0 1.333-6.666 3-9 1.667-2.333 1.333-3 .333-3-1.333 0-4.08 3.253-5.333 5.922C13.773 12 13.333 15.392 13.333 18A4.667 4.667 0 0 0 18 22.667z" fill="#D3D9E3" mask="url(#b)"/>
372
+ </g>
373
+ </svg>`);
374
+
364
375
  /**
365
376
  * A private helper method that should not be used by general consumers
366
377
  */
@@ -380,7 +391,7 @@ export const _generateBlockquoteStyles = (selector) => {
380
391
  position: relative;
381
392
  }
382
393
  ${selector}::before {
383
- content: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iMTEiIHZpZXdCb3g9IjAgMCAyMiAyMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMHoiLz48L2RlZnM+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEgLTEpIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjxwYXRoIGQ9Ik02IDIyLjY2N0E0LjY2NyA0LjY2NyAwIDAgMCAxMC42NjcgMThjMC0xLjIyNy0uNTU5LTIuNS0xLjMzNC0zLjMzM0M4LjQ4MSAxMy43NSA3LjM1IDEzLjMzMyA2IDEzLjMzM2MtLjQxMSAwIDEuMzMzLTYuNjY2IDMtOSAxLjY2Ny0yLjMzMyAxLjMzMy0zIC4zMzMtM0M4IDEuMzMzIDUuMjUzIDQuNTg2IDQgNy4yNTUgMS43NzMgMTIgMS4zMzMgMTUuMzkyIDEuMzMzIDE4QTQuNjY3IDQuNjY3IDAgMCAwIDYgMjIuNjY3em0xMiAwQTQuNjY3IDQuNjY3IDAgMCAwIDIyLjY2NyAxOGMwLTEuMjI3LS41NTktMi41LTEuMzM0LTMuMzMzLS44NTItLjkxNy0xLjk4My0xLjMzNC0zLjMzMy0xLjMzNC0uNDExIDAgMS4zMzMtNi42NjYgMy05IDEuNjY3LTIuMzMzIDEuMzMzLTMgLjMzMy0zLTEuMzMzIDAtNC4wOCAzLjI1My01LjMzMyA1LjkyMkMxMy43NzMgMTIgMTMuMzMzIDE1LjM5MiAxMy4zMzMgMThBNC42NjcgNC42NjcgMCAwIDAgMTggMjIuNjY3eiIgZmlsbD0iI0QzRDlFMyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=");
394
+ content: ${quoteIcon};
384
395
  inset-block-start: 0;
385
396
  inset-inline-start: 0;
386
397
  position: absolute;
package/helpers/prism.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { css, unsafeCSS } from 'lit';
2
+ import { svgToCSS } from './svg-to-css.js';
2
3
 
3
4
  const prismLocation = 'https://s.brightspace.com/lib/prismjs/1.28.0';
4
5
  //const prismLocation = '/node_modules/prismjs'; // for local debugging
@@ -145,6 +146,11 @@ const generateColorVariables = (mode, theme) => {
145
146
  `;
146
147
  };
147
148
 
149
+ const transparentIcon = svgToCSS(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2">
150
+ <path fill="gray" d="M0 0h2v2H0z"/>
151
+ <path fill="white" d="M0 0h1v1H0zM1 1h1v1H1z"/>
152
+ </svg>`);
153
+
148
154
  export const codeStyles = css`
149
155
 
150
156
  ${unsafeCSS(generateColorVariables(colorModes.LIGHT))}
@@ -301,7 +307,7 @@ export const codeStyles = css`
301
307
  * <path fill="white" d="M0 0h1v1H0zM1 1h1v1H1z"/>
302
308
  * </svg>
303
309
  */
304
- background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9ImdyYXkiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDBoMXYxSDB6TTEgMWgxdjFIMXoiLz48L3N2Zz4=");
310
+ background: ${transparentIcon};
305
311
  /* Prevent visual glitches where one pixel from the repeating pattern could be seen */
306
312
  background-position: center;
307
313
  background-size: 110%;
@@ -0,0 +1,5 @@
1
+ import { unsafeCSS } from 'lit';
2
+
3
+ export function svgToCSS(svg) {
4
+ return unsafeCSS(`url("data:image/svg+xml;base64,${btoa(svg)}")`);
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.130.0",
3
+ "version": "3.131.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",