@brightspace-ui/core 2.71.1 → 2.71.3

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.
@@ -1,3 +1,4 @@
1
+ import '../colors/colors.js';
1
2
  import '../tooltip/tooltip.js';
2
3
  import { css, html, LitElement } from 'lit';
3
4
  import { classMap } from 'lit/directives/class-map.js';
@@ -224,7 +225,9 @@ class InputText extends FocusMixin(LabelledMixin(FormElementMixin(SkeletonMixin(
224
225
  right: 0;
225
226
  }
226
227
  .d2l-input-unit {
227
- font-size: 0.8rem;
228
+ color: var(--d2l-color-galena);
229
+ font-size: 0.7rem;
230
+ margin-top: 0.05rem;
228
231
  }
229
232
  .d2l-input-inside-before .d2l-input-unit {
230
233
  margin-left: 12px;
@@ -49,7 +49,7 @@ The corresponding `*-clear` event must be listened to for whatever component (`d
49
49
  console.log('d2l-tag-list-clear event dispatched');
50
50
  });
51
51
  </script>
52
- <d2l-tag-list description="Example Tags">
52
+ <d2l-tag-list description="Example Tags" clearable>
53
53
  <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
54
54
  <d2l-tag-list-item text="Reprehenderit in voluptate velit esse lorem ipsum dolor"></d2l-tag-list-item>
55
55
  <d2l-tag-list-item text="Sit amet"></d2l-tag-list-item>
@@ -70,9 +70,17 @@ The `d2l-tag-list-item` provides the appropriate `listitem` semantics and stylin
70
70
  e.target.parentNode.removeChild(e.target);
71
71
  console.log(`d2l-tag-list-item-clear event dispatched. Value: ${e.detail.value}`);
72
72
  });
73
+
74
+ document.addEventListener('d2l-tag-list-clear', (e) => {
75
+ const items = e.target.querySelectorAll('[role="listitem"]');
76
+ items.forEach((item) => {
77
+ item.parentNode.removeChild(item);
78
+ });
79
+ console.log('d2l-tag-list-clear event dispatched');
80
+ });
73
81
  </script>
74
82
 
75
- <d2l-tag-list description="Example Tags">
83
+ <d2l-tag-list description="Example Tags" clearable>
76
84
  <d2l-tag-list-item text="Tag"></d2l-tag-list-item>
77
85
  </d2l-tag-list>
78
86
  ```
@@ -11,36 +11,9 @@
11
11
  </head>
12
12
  <body unresolved>
13
13
  <d2l-demo-page page-title="localize-mixin">
14
-
15
- <div style="margin-bottom: 1rem;">
16
- <label>Language:
17
- <select id="langSwitcher">
18
- <option value="ar">Arabic</option>
19
- <option value="de">German</option>
20
- <option value="en" selected="">English</option>
21
- <option value="en-CA">English (Canada)</option>
22
- <option value="es">Spanish</option>
23
- <option value="fr">French</option>
24
- <option value="ja">Japanese</option>
25
- <option value="ko">Korean</option>
26
- <option value="pt-BR">Portuguese</option>
27
- <option value="tr">Turkish</option>
28
- <option value="zh-CN">Chinese (Simplified)</option>
29
- <option value="zh-TW">Chinese (Traditional)</option>
30
- </select>
31
- </label>
32
- </div>
33
14
  <d2l-demo-snippet>
34
15
  <d2l-test-localize name="Bill"></d2l-test-localize>
35
16
  </d2l-demo-snippet>
36
-
37
17
  </d2l-demo-page>
38
- <script>
39
- const langSwitcher = document.getElementById('langSwitcher');
40
- langSwitcher.addEventListener('change', () => {
41
- const value = langSwitcher.options[langSwitcher.selectedIndex].value;
42
- document.documentElement.setAttribute('lang', value);
43
- });
44
- </script>
45
18
  </body>
46
19
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.71.1",
3
+ "version": "2.71.3",
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",
@@ -921,12 +921,13 @@ class TemplatePrimarySecondary extends FocusVisiblePolyfillMixin(RtlMixin(Locali
921
921
 
922
922
  render() {
923
923
  let tabindex;
924
+ const size = this._size ?? 0;
924
925
  const secondaryPanelStyles = {};
925
926
  if (this._isResizable()) {
926
- secondaryPanelStyles[this._isMobile ? 'height' : 'width'] = `${this._size}px`;
927
+ secondaryPanelStyles[this._isMobile ? 'height' : 'width'] = `${size}px`;
927
928
  tabindex = 0;
928
929
  }
929
- const separatorVal = this._size && Math.round(this._size);
930
+ const separatorVal = size && Math.round(size);
930
931
  const separatorMax = this._contentBounds && Math.round(this._isMobile ? this._contentBounds.maxHeight : this._contentBounds.maxWidth);
931
932
  const scrollClasses = {
932
933
  'd2l-template-scroll': isWindows
@@ -954,7 +955,7 @@ class TemplatePrimarySecondary extends FocusVisiblePolyfillMixin(RtlMixin(Locali
954
955
  </d2l-icon-custom>
955
956
  </div>
956
957
  <div class="d2l-template-primary-secondary-divider-handle-mobile">
957
- ${this._size === 0 ? html`<d2l-icon icon="tier1:chevron-up"></d2l-icon>` : html`<d2l-icon icon="tier1:chevron-down"></d2l-icon>`}
958
+ ${size === 0 ? html`<d2l-icon icon="tier1:chevron-up"></d2l-icon>` : html`<d2l-icon icon="tier1:chevron-down"></d2l-icon>`}
958
959
  </div>
959
960
  </div>
960
961
  </div>