@brightspace-ui/labs 2.56.0 → 2.56.2

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.
Files changed (51) hide show
  1. package/demo/components/ou-filter/ouFilterDemoPage.js +14 -16
  2. package/package.json +4 -3
  3. package/src/components/accessibility-disability-simulator/accessibility-disability-simulator.js +70 -74
  4. package/src/components/accordion/accordion-collapse.js +161 -164
  5. package/src/components/accordion/accordion.js +14 -17
  6. package/src/components/attribute-picker/attribute-picker-item.js +63 -66
  7. package/src/components/attribute-picker/attribute-picker.js +118 -121
  8. package/src/components/card-overlay/card-overlay.js +53 -55
  9. package/src/components/checkbox-drawer/checkbox-drawer.js +32 -36
  10. package/src/components/community/community-base.js +3 -5
  11. package/src/components/community/community-button.js +3 -5
  12. package/src/components/community/community-link.js +4 -6
  13. package/src/components/file-uploader/file-uploader.js +148 -151
  14. package/src/components/grade-result/grade-result-icon-button.js +5 -6
  15. package/src/components/grade-result/grade-result-letter-score.js +18 -22
  16. package/src/components/grade-result/grade-result-numeric-score.js +25 -28
  17. package/src/components/grade-result/grade-result-presentational.js +133 -136
  18. package/src/components/grade-result/grade-result-student-grade-preview.js +38 -42
  19. package/src/components/media-player/media-player-audio-bars.js +28 -31
  20. package/src/components/media-player/media-player.js +471 -475
  21. package/src/components/media-player/slider-bar.js +119 -122
  22. package/src/components/navigation/navigation-band.js +69 -71
  23. package/src/components/navigation/navigation-button-icon.js +51 -55
  24. package/src/components/navigation/navigation-dropdown-button-custom.js +13 -17
  25. package/src/components/navigation/navigation-dropdown-button-icon.js +21 -25
  26. package/src/components/navigation/navigation-immersive.js +128 -132
  27. package/src/components/navigation/navigation-iterator.js +21 -25
  28. package/src/components/navigation/navigation-link-back.js +13 -17
  29. package/src/components/navigation/navigation-link-icon.js +36 -40
  30. package/src/components/navigation/navigation-link-image.js +31 -35
  31. package/src/components/navigation/navigation-link.js +34 -38
  32. package/src/components/navigation/navigation-main-footer.js +7 -9
  33. package/src/components/navigation/navigation-main-header.js +34 -36
  34. package/src/components/navigation/navigation-notification-icon.js +30 -34
  35. package/src/components/navigation/navigation.js +19 -23
  36. package/src/components/opt-in-flyout/flyout-impl.js +138 -146
  37. package/src/components/opt-in-flyout/opt-in-flyout.js +14 -18
  38. package/src/components/opt-in-flyout/opt-out-dialog.js +63 -67
  39. package/src/components/opt-in-flyout/opt-out-flyout.js +15 -19
  40. package/src/components/opt-in-flyout/opt-out-reason-selector.js +38 -45
  41. package/src/components/opt-in-flyout/opt-out-reason.js +9 -13
  42. package/src/components/ou-filter/ou-filter.js +14 -18
  43. package/src/components/ou-filter/tree-filter.js +22 -26
  44. package/src/components/ou-filter/tree-selector-node.js +62 -66
  45. package/src/components/ou-filter/tree-selector.js +55 -62
  46. package/src/components/pagination/pager-numeric.js +35 -39
  47. package/src/components/view-toggle/view-toggle.js +79 -81
  48. package/src/components/wizard/single-step-header.js +106 -110
  49. package/src/components/wizard/wizard-step.js +65 -68
  50. package/src/components/wizard/wizard.js +30 -33
  51. package/src/utilities/reactive-store/README.md +10 -15
@@ -16,22 +16,20 @@ function parseHash(hash) {
16
16
  /* eslint-disable no-console */
17
17
  class OuFilterDemoPage extends MobxLitElement {
18
18
 
19
- static get styles() {
20
- return [
21
- css`
22
- :host {
23
- display: inline-block;
24
- }
25
- div {
26
- padding: 30px;
27
- }
28
- label {
29
- display: block;
30
- margin-top: 25px;
31
- }
32
- `
33
- ];
34
- }
19
+ static styles = [
20
+ css`
21
+ :host {
22
+ display: inline-block;
23
+ }
24
+ div {
25
+ padding: 30px;
26
+ }
27
+ label {
28
+ display: block;
29
+ margin-top: 25px;
30
+ }
31
+ `
32
+ ];
35
33
 
36
34
  constructor() {
37
35
  super();
package/package.json CHANGED
@@ -80,7 +80,7 @@
80
80
  "@web/dev-server": "^0.4",
81
81
  "@web/rollup-plugin-html": "^3",
82
82
  "eslint": "^9",
83
- "eslint-config-brightspace": "^3",
83
+ "eslint-config-brightspace": "^4",
84
84
  "glob-all": "^3",
85
85
  "messageformat-validator": "^3.0.0-beta.5",
86
86
  "rollup": "^4",
@@ -96,7 +96,8 @@
96
96
  "/demo/components/ou-filter/*.js"
97
97
  ],
98
98
  "publishConfig": {
99
- "access": "public"
99
+ "access": "public",
100
+ "registry": "https://registry.npmjs.org/"
100
101
  },
101
102
  "dependencies": {
102
103
  "@adobe/lit-mobx": "^2",
@@ -111,5 +112,5 @@
111
112
  "parse-srt": "^1.0.0-alpha",
112
113
  "webvtt-parser": "^2"
113
114
  },
114
- "version": "2.56.0"
115
+ "version": "2.56.2"
115
116
  }
@@ -23,81 +23,77 @@ const otherTypes = Object.entries(DISABILITY_TYPES).filter(value => !value[0].in
23
23
 
24
24
  class AccessibilityDisabilitySimulator extends LocalizeLabsElement(LitElement) {
25
25
 
26
- static get properties() {
27
- return {
28
- /**
29
- * The level of blurriness when the low-vision filter is being used, should range between 1 and 100
30
- * @type {Number}
31
- */
32
- blurLevel: { type: Number, attribute: 'blur-level', reflect: true },
33
- /**
34
- * The type of disability to simulate
35
- * @type {'no-vision'|'low-vision'|'keyboard-only'|'colorblind-achromatopsia'|'colorblind-deuteranopia'|'colorblind-protanopia'|'colorblind-tritanopia'}
36
- */
37
- disabilityType: { type: String, attribute: 'disability-type', reflect: true },
38
- /**
39
- * Whether or not the alert should be shown
40
- * @type {Boolean}
41
- */
42
- hideAlert: { type: Boolean, attribute: 'hide-alert' },
43
- /**
44
- * Whether or not to show the disability type selection and blur level controls
45
- * @type {Boolean}
46
- */
47
- hideControls: { type: Boolean, attribute: 'hide-controls' }
48
- };
49
- }
26
+ static properties = {
27
+ /**
28
+ * The level of blurriness when the low-vision filter is being used, should range between 1 and 100
29
+ * @type {Number}
30
+ */
31
+ blurLevel: { type: Number, attribute: 'blur-level', reflect: true },
32
+ /**
33
+ * The type of disability to simulate
34
+ * @type {'no-vision'|'low-vision'|'keyboard-only'|'colorblind-achromatopsia'|'colorblind-deuteranopia'|'colorblind-protanopia'|'colorblind-tritanopia'}
35
+ */
36
+ disabilityType: { type: String, attribute: 'disability-type', reflect: true },
37
+ /**
38
+ * Whether or not the alert should be shown
39
+ * @type {Boolean}
40
+ */
41
+ hideAlert: { type: Boolean, attribute: 'hide-alert' },
42
+ /**
43
+ * Whether or not to show the disability type selection and blur level controls
44
+ * @type {Boolean}
45
+ */
46
+ hideControls: { type: Boolean, attribute: 'hide-controls' }
47
+ };
48
+
49
+ static styles = [bodyCompactStyles, bodyStandardStyles, offscreenStyles, selectStyles, css`
50
+ .simulator-controls {
51
+ align-items: center;
52
+ display: flex;
53
+ gap: 0.5rem;
54
+ margin-bottom: 1rem;
55
+ }
50
56
 
51
- static get styles() {
52
- return [ bodyCompactStyles, bodyStandardStyles, offscreenStyles, selectStyles, css`
53
- .simulator-controls {
54
- align-items: center;
55
- display: flex;
56
- gap: 0.5rem;
57
- margin-bottom: 1rem;
58
- }
59
-
60
- .low-vision-slider {
61
- align-items: center;
62
- display: flex;
63
- gap: 0.5rem;
64
- }
65
-
66
- .alert-message {
67
- display: inline-block;
68
- margin-bottom: 1rem;
69
- padding: 0.5rem;
70
- }
71
-
72
- .svg-filter {
73
- display: none;
74
- }
75
-
76
- :host([disability-type="keyboard-only"]) .wrapper-slot {
77
- pointer-events: none;
78
- }
79
-
80
- :host([disability-type="no-vision"]) .wrapper-slot {
81
- filter: grayscale(1);
82
- }
83
-
84
- :host([disability-type="colorblind-achromatopsia"]) .wrapper-slot {
85
- filter: grayscale(1);
86
- }
87
-
88
- :host([disability-type="colorblind-deuteranopia"]) .wrapper-slot {
89
- filter: url("#deuteranopia");
90
- }
91
-
92
- :host([disability-type="colorblind-protanopia"]) .wrapper-slot {
93
- filter: url("#protanopia");
94
- }
95
-
96
- :host([disability-type="colorblind-tritanopia"]) .wrapper-slot {
97
- filter: url("#tritanopia");
98
- }
99
- ` ];
100
- }
57
+ .low-vision-slider {
58
+ align-items: center;
59
+ display: flex;
60
+ gap: 0.5rem;
61
+ }
62
+
63
+ .alert-message {
64
+ display: inline-block;
65
+ margin-bottom: 1rem;
66
+ padding: 0.5rem;
67
+ }
68
+
69
+ .svg-filter {
70
+ display: none;
71
+ }
72
+
73
+ :host([disability-type="keyboard-only"]) .wrapper-slot {
74
+ pointer-events: none;
75
+ }
76
+
77
+ :host([disability-type="no-vision"]) .wrapper-slot {
78
+ filter: grayscale(1);
79
+ }
80
+
81
+ :host([disability-type="colorblind-achromatopsia"]) .wrapper-slot {
82
+ filter: grayscale(1);
83
+ }
84
+
85
+ :host([disability-type="colorblind-deuteranopia"]) .wrapper-slot {
86
+ filter: url("#deuteranopia");
87
+ }
88
+
89
+ :host([disability-type="colorblind-protanopia"]) .wrapper-slot {
90
+ filter: url("#protanopia");
91
+ }
92
+
93
+ :host([disability-type="colorblind-tritanopia"]) .wrapper-slot {
94
+ filter: url("#tritanopia");
95
+ }
96
+ `];
101
97
 
102
98
  constructor() {
103
99
  super();
@@ -6,172 +6,169 @@ import { findComposedAncestor, isComposedAncestor } from '@brightspace-ui/core/h
6
6
  import { offscreenStyles } from '@brightspace-ui/core/components/offscreen/offscreen.js';
7
7
 
8
8
  class LabsAccordionCollapse extends LitElement {
9
- static get properties() {
10
- return {
11
- /**
12
- * Label. Does not apply title to entire accordion
13
- */
14
- label: { type: String },
15
- /**
16
- * Header text hidden on the screen, but to be read by a screen reader
17
- */
18
- screenReaderHeaderText: { type: String, attribute: 'screen-reader-header-text' },
19
- /**
20
- * Corresponds to the iron-collapse's noAnimation property.
21
- */
22
- noAnimation: { type: Boolean, attribute: 'no-animation' },
23
- /**
24
- * Whether currently expanded.
25
- */
26
- opened: { type: Boolean, reflect: true },
27
- /**
28
- * The icon when collapsed.
29
- */
30
- expandIcon: { type: String, attribute: 'expand-icon' },
31
- /**
32
- * The icon when expanded.
33
- */
34
- collapseIcon: { type: String, attribute: 'collapse-icon' },
35
- /**
36
- * Whether to hide the expand/collapse icon.
37
- */
38
- noIcons: { type: Boolean, attribute: 'no-icons' },
39
- /**
40
- * Whether or not to use flex layout.
41
- */
42
- flex: { type: Boolean, reflect: true },
43
- /**
44
- * Whether or not to add extra padding for icon.
45
- */
46
- iconHasPadding: { type: Boolean, attribute: 'icon-has-padding', reflect: true },
47
- /**
48
- * Whether or not to add a border between the header and the content.
49
- */
50
- headerBorder: { type: Boolean, attribute: 'header-border' },
51
- /**
52
- * Whether the accordion's expand/collapse function is disabled.
53
- */
54
- disabled: { type: Boolean, reflect: true },
55
- /**
56
- * Whether or not to disable default focus styles
57
- */
58
- disableDefaultTriggerFocus: { type: Boolean, attribute: 'disable-default-trigger-focus', reflect: true },
59
- /**
60
- * Whether or not the header contains an interactive element inside it (e.g. clickable)
61
- */
62
- headerHasInteractiveContent: { type: Boolean, attribute: 'header-has-interactive-content', reflect: true },
63
- /**
64
- * Listener for state changes.
65
- */
66
- _boundListener: { type: Function, attribute: '_bound-listener' },
67
- /**
68
- * The current state of the accordion (opened, closed)
69
- */
70
- _state: { type: String, reflect: true }
71
- };
72
- }
73
9
 
74
- static get styles() {
75
- return [offscreenStyles, css`
76
- :host {
77
- display: block;
78
- }
79
- #interactive-header-content {
80
- align-items: center;
81
- display: flex;
82
- }
83
- #trigger {
84
- align-items: center;
85
- display: flex;
86
- text-decoration: none;
87
- }
88
- #trigger:focus-visible {
89
- outline-offset: 3px;
90
- }
91
- #trigger[data-border] {
92
- border-bottom: solid 1px var(--d2l-color-corundum);
93
- margin-bottom: 0.4rem;
94
- padding-bottom: 0.4rem;
95
- }
96
- #trigger, #trigger:visited, #trigger:hover, #trigger:active {
97
- color: inherit;
98
- }
99
- :host([flex]) .collapse-title {
100
- flex: 1;
101
- flex-basis: 0.000000001px;
102
- overflow: hidden;
103
- }
104
- :host([icon-has-padding]) d2l-icon {
105
- padding-left: 1.25rem;
106
- padding-right: 0;
107
- }
108
- :host([icon-has-padding][dir="rtl"]) d2l-icon {
109
- padding-left: 0;
110
- padding-right: 1.25rem;
111
- }
112
- :host([flex][icon-has-padding]) d2l-icon {
113
- padding-left: 0;
114
- padding-right: 1.25rem;
115
- }
116
- :host([flex][icon-has-padding][dir="rtl"]) d2l-icon {
117
- padding-left: 1.25rem;
118
- padding-right: 0;
119
- }
120
- .content {
121
- height: auto;
122
- margin: -1px;
123
- padding: 1px;
124
- position: relative;
125
- }
126
- .summary {
127
- transition: opacity 500ms ease;
128
- }
129
- :host([_state="closing"]) .content,
130
- :host([_state="opening"]) .content {
131
- overflow: hidden;
132
- }
133
- :host([_state="closed"]) .summary,
134
- :host([_state="closing"]) .summary {
135
- transition-delay: 500ms;
136
- }
137
- :host([_state="opening"]) .summary,
138
- :host([_state="opened"]) .summary {
139
- opacity: 0;
140
- }
141
- :host([_state="closing"]) .summary,
142
- :host([_state="opening"]) .summary,
143
- :host([_state="opened"]) .summary {
144
- pointer-events: none;
145
- position: absolute;
146
- }
147
- :host([_state="closing"]) .summary,
148
- :host([_state="opened"]) .summary {
149
- transition-property: none;
150
- }
151
- :host([disabled]) a {
152
- cursor: default;
153
- }
154
- :host([disabled]) d2l-icon {
155
- color: var(--d2l-color-chromite);
156
- }
157
- :host([disable-default-trigger-focus]) #trigger:focus {
158
- outline: none;
159
- }
10
+ static properties = {
11
+ /**
12
+ * Label. Does not apply title to entire accordion
13
+ */
14
+ label: { type: String },
15
+ /**
16
+ * Header text hidden on the screen, but to be read by a screen reader
17
+ */
18
+ screenReaderHeaderText: { type: String, attribute: 'screen-reader-header-text' },
19
+ /**
20
+ * Corresponds to the iron-collapse's noAnimation property.
21
+ */
22
+ noAnimation: { type: Boolean, attribute: 'no-animation' },
23
+ /**
24
+ * Whether currently expanded.
25
+ */
26
+ opened: { type: Boolean, reflect: true },
27
+ /**
28
+ * The icon when collapsed.
29
+ */
30
+ expandIcon: { type: String, attribute: 'expand-icon' },
31
+ /**
32
+ * The icon when expanded.
33
+ */
34
+ collapseIcon: { type: String, attribute: 'collapse-icon' },
35
+ /**
36
+ * Whether to hide the expand/collapse icon.
37
+ */
38
+ noIcons: { type: Boolean, attribute: 'no-icons' },
39
+ /**
40
+ * Whether or not to use flex layout.
41
+ */
42
+ flex: { type: Boolean, reflect: true },
43
+ /**
44
+ * Whether or not to add extra padding for icon.
45
+ */
46
+ iconHasPadding: { type: Boolean, attribute: 'icon-has-padding', reflect: true },
47
+ /**
48
+ * Whether or not to add a border between the header and the content.
49
+ */
50
+ headerBorder: { type: Boolean, attribute: 'header-border' },
51
+ /**
52
+ * Whether the accordion's expand/collapse function is disabled.
53
+ */
54
+ disabled: { type: Boolean, reflect: true },
55
+ /**
56
+ * Whether or not to disable default focus styles
57
+ */
58
+ disableDefaultTriggerFocus: { type: Boolean, attribute: 'disable-default-trigger-focus', reflect: true },
59
+ /**
60
+ * Whether or not the header contains an interactive element inside it (e.g. clickable)
61
+ */
62
+ headerHasInteractiveContent: { type: Boolean, attribute: 'header-has-interactive-content', reflect: true },
63
+ /**
64
+ * Listener for state changes.
65
+ */
66
+ _boundListener: { type: Function, attribute: '_bound-listener' },
67
+ /**
68
+ * The current state of the accordion (opened, closed)
69
+ */
70
+ _state: { type: String, reflect: true }
71
+ };
160
72
 
161
- :host([header-has-interactive-content]) #header-container {
162
- display: grid;
163
- grid-template-columns: auto;
164
- grid-template-rows: auto;
165
- }
166
- :host([header-has-interactive-content]) .header-grid-item {
167
- grid-column: 1;
168
- grid-row: 1;
169
- }
170
- :host([header-has-interactive-content]) #interactive-header-content {
171
- cursor: pointer;
172
- }
173
- `];
174
- }
73
+ static styles = [offscreenStyles, css`
74
+ :host {
75
+ display: block;
76
+ }
77
+ #interactive-header-content {
78
+ align-items: center;
79
+ display: flex;
80
+ }
81
+ #trigger {
82
+ align-items: center;
83
+ display: flex;
84
+ text-decoration: none;
85
+ }
86
+ #trigger:focus-visible {
87
+ outline-offset: 3px;
88
+ }
89
+ #trigger[data-border] {
90
+ border-bottom: solid 1px var(--d2l-color-corundum);
91
+ margin-bottom: 0.4rem;
92
+ padding-bottom: 0.4rem;
93
+ }
94
+ #trigger, #trigger:visited, #trigger:hover, #trigger:active {
95
+ color: inherit;
96
+ }
97
+ :host([flex]) .collapse-title {
98
+ flex: 1;
99
+ flex-basis: 0.000000001px;
100
+ overflow: hidden;
101
+ }
102
+ :host([icon-has-padding]) d2l-icon {
103
+ padding-left: 1.25rem;
104
+ padding-right: 0;
105
+ }
106
+ :host([icon-has-padding][dir="rtl"]) d2l-icon {
107
+ padding-left: 0;
108
+ padding-right: 1.25rem;
109
+ }
110
+ :host([flex][icon-has-padding]) d2l-icon {
111
+ padding-left: 0;
112
+ padding-right: 1.25rem;
113
+ }
114
+ :host([flex][icon-has-padding][dir="rtl"]) d2l-icon {
115
+ padding-left: 1.25rem;
116
+ padding-right: 0;
117
+ }
118
+ .content {
119
+ height: auto;
120
+ margin: -1px;
121
+ padding: 1px;
122
+ position: relative;
123
+ }
124
+ .summary {
125
+ transition: opacity 500ms ease;
126
+ }
127
+ :host([_state="closing"]) .content,
128
+ :host([_state="opening"]) .content {
129
+ overflow: hidden;
130
+ }
131
+ :host([_state="closed"]) .summary,
132
+ :host([_state="closing"]) .summary {
133
+ transition-delay: 500ms;
134
+ }
135
+ :host([_state="opening"]) .summary,
136
+ :host([_state="opened"]) .summary {
137
+ opacity: 0;
138
+ }
139
+ :host([_state="closing"]) .summary,
140
+ :host([_state="opening"]) .summary,
141
+ :host([_state="opened"]) .summary {
142
+ pointer-events: none;
143
+ position: absolute;
144
+ }
145
+ :host([_state="closing"]) .summary,
146
+ :host([_state="opened"]) .summary {
147
+ transition-property: none;
148
+ }
149
+ :host([disabled]) a {
150
+ cursor: default;
151
+ }
152
+ :host([disabled]) d2l-icon {
153
+ color: var(--d2l-color-chromite);
154
+ }
155
+ :host([disable-default-trigger-focus]) #trigger:focus {
156
+ outline: none;
157
+ }
158
+
159
+ :host([header-has-interactive-content]) #header-container {
160
+ display: grid;
161
+ grid-template-columns: auto;
162
+ grid-template-rows: auto;
163
+ }
164
+ :host([header-has-interactive-content]) .header-grid-item {
165
+ grid-column: 1;
166
+ grid-row: 1;
167
+ }
168
+ :host([header-has-interactive-content]) #interactive-header-content {
169
+ cursor: pointer;
170
+ }
171
+ `];
175
172
 
176
173
  constructor() {
177
174
  super();
@@ -2,24 +2,21 @@ import './accordion-collapse.js';
2
2
  import { css, html, LitElement } from 'lit';
3
3
 
4
4
  class LabsAccordion extends LitElement {
5
- static get properties() {
6
- return {
7
- /**
8
- * Whether to automatically close other opened branches
9
- */
10
- autoClose: { type: Boolean, attribute: 'auto-close' },
11
- _selected: { type: Number }
12
- };
13
- }
14
5
 
15
- static get styles() {
16
- return css`
17
- :host {
18
- box-sizing: border-box;
19
- display: block;
20
- }
21
- `;
22
- }
6
+ static properties = {
7
+ /**
8
+ * Whether to automatically close other opened branches
9
+ */
10
+ autoClose: { type: Boolean, attribute: 'auto-close' },
11
+ _selected: { type: Number }
12
+ };
13
+
14
+ static styles = css`
15
+ :host {
16
+ box-sizing: border-box;
17
+ display: block;
18
+ }
19
+ `;
23
20
 
24
21
  constructor() {
25
22
  super();