@brightspace-ui/core 1.199.1 → 1.202.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.
@@ -120,7 +120,7 @@ export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(S
120
120
 
121
121
  :host([type="count"]) .d2l-count-badge-number {
122
122
  background-color: var(--d2l-color-gypsum);
123
- color: var(--d2l-color-tungsten);
123
+ color: var(--d2l-color-ferrite);
124
124
  }
125
125
 
126
126
  :host([size="small"]) .d2l-count-badge-number {
@@ -8,6 +8,7 @@ class DemoSnippet extends LitElement {
8
8
  static get properties() {
9
9
  return {
10
10
  codeViewHidden: { type: Boolean, reflect: true, attribute: 'code-view-hidden' },
11
+ fullscreen: { type: Boolean, reflect: true },
11
12
  noPadding: { type: Boolean, reflect: true, attribute: 'no-padding' },
12
13
  overflowHidden: { type: Boolean, reflect: true, attribute: 'overflow-hidden' },
13
14
  _code: { type: String },
@@ -30,6 +31,9 @@ class DemoSnippet extends LitElement {
30
31
  :host([hidden]) {
31
32
  display: none;
32
33
  }
34
+ :host([fullscreen]) {
35
+ max-width: unset;
36
+ }
33
37
  .d2l-demo-snippet-demo-wrapper {
34
38
  display: flex;
35
39
  }
@@ -66,6 +70,7 @@ class DemoSnippet extends LitElement {
66
70
 
67
71
  constructor() {
68
72
  super();
73
+ this.fullscreen = false;
69
74
  this._dir = document.documentElement.dir;
70
75
  this._hasSkeleton = false;
71
76
  this._skeletonOn = false;
@@ -244,10 +244,10 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
244
244
  const countBadgeId = `filters-applied-count-${dimension.key}`;
245
245
  const filtersAppliedText = `${this.localize('components.filter.filterCountDescription', { number: dimension.appliedCount })}`;
246
246
  return html`<d2l-menu-item text="${dimension.text}" description="${dimension.text}." aria-describedby="${countBadgeId}">
247
- ${builtDimension}
248
247
  <div slot="supporting">
249
248
  <d2l-count-badge id="${countBadgeId}" number="${dimension.appliedCount}" max-digits="2" text="${filtersAppliedText}" hide-zero></d2l-count-badge>
250
249
  </div>
250
+ ${builtDimension}
251
251
  </d2l-menu-item>`;
252
252
  });
253
253
  }
@@ -364,6 +364,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
364
364
  id="${SET_DIMENSION_ID_PREFIX}${dimension.key}"
365
365
  @d2l-list-selection-change="${this._handleChangeSetDimension}"
366
366
  extend-separators
367
+ grid
367
368
  ?selection-single="${dimension.selectionSingle}">
368
369
  ${dimension.values.map(item => html`
369
370
  <d2l-list-item
@@ -1386,6 +1386,11 @@
1386
1386
  {
1387
1387
  "name": "overflow-hidden",
1388
1388
  "type": "boolean"
1389
+ },
1390
+ {
1391
+ "name": "fullscreen",
1392
+ "type": "boolean",
1393
+ "default": "false"
1389
1394
  }
1390
1395
  ],
1391
1396
  "properties": [
@@ -1403,6 +1408,12 @@
1403
1408
  "name": "overflowHidden",
1404
1409
  "attribute": "overflow-hidden",
1405
1410
  "type": "boolean"
1411
+ },
1412
+ {
1413
+ "name": "fullscreen",
1414
+ "attribute": "fullscreen",
1415
+ "type": "boolean",
1416
+ "default": "false"
1406
1417
  }
1407
1418
  ]
1408
1419
  },
package/helpers/README.md CHANGED
@@ -21,6 +21,25 @@ import { AsyncStateEvent } from '@brightspace-ui/core/helpers/asyncStateEvent.js
21
21
  const asyncStateEvent = new AsyncStateEvent(pendingPromise);
22
22
  ```
23
23
 
24
+ ## composeMixins
25
+
26
+ A helper function for cleanly incorporating a list of mixins into a base class. Designed for use with Lit components with a large amount of reusable functionality.
27
+
28
+ ```js
29
+ // other imports...
30
+ import { composeMixins } from '@brightspace-ui/core/helpers/composeMixins.js';
31
+
32
+ class ExampleComponent extends composeMixins(
33
+ LitElement,
34
+ EntityMixin,
35
+ LocalizeMixin,
36
+ ) {
37
+ // ...
38
+ }
39
+ ```
40
+
41
+ Read more about mixins on [the `open-wc` docs](https://open-wc.org/docs/development/dedupe-mixin/#what-is-a-mixin).
42
+
24
43
  ## Dismissible
25
44
 
26
45
  Dismissible components are those that should be dismissible when the user presses
@@ -196,4 +215,3 @@ import '@brightspace-ui/core/helpers/viewport-size.js';
196
215
  min-width: calc(var(--d2l-vw, 1vw) * 100);
197
216
  }
198
217
  ```
199
-
@@ -0,0 +1,2 @@
1
+ export const composeMixins = (base, ...mixins) =>
2
+ mixins.reduce((subclass, superclass) => superclass(subclass), base);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.199.1",
3
+ "version": "1.202.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "repository": "https://github.com/BrightspaceUI/core.git",
6
6
  "publishConfig": {
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-sort-class-members": "^1",
58
58
  "lit-analyzer": "^1",
59
59
  "node-sass": "^6",
60
- "sinon": "^11",
60
+ "sinon": "^12",
61
61
  "stylelint": "^13"
62
62
  },
63
63
  "dependencies": {