@brightspace-ui/core 2.129.0 → 2.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.
- package/components/alert/README.md +2 -2
- package/components/backdrop/README.md +1 -1
- package/components/breadcrumbs/README.md +3 -3
- package/components/button/README.md +3 -3
- package/components/button/floating-buttons.md +1 -1
- package/components/calendar/README.md +1 -1
- package/components/card/README.md +4 -4
- package/components/collapsible-panel/README.md +4 -4
- package/components/collapsible-panel/collapsible-panel.js +14 -5
- package/components/collapsible-panel/demo/collapsible-panel.html +11 -1
- package/components/count-badge/README.md +2 -2
- package/components/description-list/README.md +1 -1
- package/components/dialog/README.md +3 -3
- package/components/dropdown/README.md +8 -8
- package/components/empty-state/README.md +4 -4
- package/components/expand-collapse/README.md +1 -1
- package/components/filter/README.md +6 -6
- package/components/focus-trap/README.md +1 -1
- package/components/form/docs/form.md +2 -2
- package/components/html-block/README.md +1 -1
- package/components/inputs/docs/input-checkbox.md +1 -1
- package/components/inputs/docs/input-color.md +1 -1
- package/components/inputs/docs/input-date-time.md +6 -6
- package/components/inputs/docs/input-numeric.md +2 -2
- package/components/inputs/docs/input-radio.md +1 -1
- package/components/inputs/docs/input-search.md +1 -1
- package/components/inputs/docs/input-select-styles.md +1 -1
- package/components/inputs/docs/input-text.md +2 -2
- package/components/link/README.md +1 -1
- package/components/list/README.md +5 -5
- package/components/loading-spinner/README.md +1 -1
- package/components/menu/README.md +6 -6
- package/components/meter/README.md +3 -3
- package/components/more-less/README.md +1 -1
- package/components/object-property-list/README.md +4 -4
- package/components/offscreen/README.md +1 -1
- package/components/overflow-group/README.md +1 -1
- package/components/scroll-wrapper/README.md +1 -1
- package/components/selection/README.md +8 -8
- package/components/status-indicator/README.md +2 -2
- package/components/switch/README.md +2 -2
- package/components/table/README.md +2 -2
- package/components/tabs/README.md +2 -2
- package/components/tag-list/README.md +2 -2
- package/components/tooltip/README.md +2 -2
- package/custom-elements.json +4 -4
- package/package.json +2 -2
- package/templates/primary-secondary/README.md +1 -1
|
@@ -63,7 +63,7 @@ The `d2l-alert` component can be used to communicate important information relat
|
|
|
63
63
|
<!-- docs: end donts -->
|
|
64
64
|
<!-- docs: end best practices -->
|
|
65
65
|
|
|
66
|
-
<!-- docs: demo
|
|
66
|
+
<!-- docs: demo code properties name:d2l-alert autoSize:false -->
|
|
67
67
|
```html
|
|
68
68
|
<script type="module">
|
|
69
69
|
import '@brightspace-ui/core/components/alert/alert.js';
|
|
@@ -109,7 +109,7 @@ a pop-up at the bottom of the screen that automatically dismisses itself by defa
|
|
|
109
109
|
<!-- docs: end best practices -->
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
<!-- docs: demo
|
|
112
|
+
<!-- docs: demo code properties name:d2l-alert-toast autoSize:false -->
|
|
113
113
|
```html
|
|
114
114
|
<script type="module">
|
|
115
115
|
import '@brightspace-ui/core/components/alert/alert-toast.js';
|
|
@@ -4,7 +4,7 @@ The `d2l-backdrop` element is a web component to display a semi-transparent back
|
|
|
4
4
|
|
|
5
5
|
## Backdrop [d2l-backdrop]
|
|
6
6
|
|
|
7
|
-
<!-- docs: demo
|
|
7
|
+
<!-- docs: demo code properties name:d2l-backdrop size:small -->
|
|
8
8
|
```html
|
|
9
9
|
<script type="module">
|
|
10
10
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -81,7 +81,7 @@ Alternately, add the `compact` attribute to only display the last breadcrumb. Th
|
|
|
81
81
|
|
|
82
82
|
## Breadcrumbs [d2l-breadcrumbs]
|
|
83
83
|
|
|
84
|
-
<!-- docs: demo
|
|
84
|
+
<!-- docs: demo code properties name:d2l-breadcrumbs display:block -->
|
|
85
85
|
```html
|
|
86
86
|
<script type="module">
|
|
87
87
|
import '@brightspace-ui/core/components/breadcrumbs/breadcrumbs.js';
|
|
@@ -103,7 +103,7 @@ Alternately, add the `compact` attribute to only display the last breadcrumb. Th
|
|
|
103
103
|
|
|
104
104
|
## Breadcrumb (child) [d2l-breadcrumb]
|
|
105
105
|
|
|
106
|
-
<!-- docs: demo
|
|
106
|
+
<!-- docs: demo code properties name:d2l-breadcrumb display:block -->
|
|
107
107
|
```html
|
|
108
108
|
<script type="module">
|
|
109
109
|
import '@brightspace-ui/core/components/breadcrumbs/breadcrumbs.js';
|
|
@@ -136,7 +136,7 @@ To make your usage of `d2l-breadcrumb` (child) accessible, use the following att
|
|
|
136
136
|
|
|
137
137
|
Only include the current page in the breadcrumb if your page or view does not have a visible heading. You will notice that some older pages or tools in Brightspace still display the current page as the last breadcrumb despite having a visible page heading, but this is now a legacy pattern.
|
|
138
138
|
|
|
139
|
-
<!-- docs: demo
|
|
139
|
+
<!-- docs: demo code properties name:d2l-breadcrumb-current-page display:block -->
|
|
140
140
|
```html
|
|
141
141
|
<script type="module">
|
|
142
142
|
import '@brightspace-ui/core/components/breadcrumbs/breadcrumb-current-page.js';
|
|
@@ -34,7 +34,7 @@ A Button is used to communicate and perform an action.
|
|
|
34
34
|
|
|
35
35
|
The `d2l-button` element can be used just like the native button element, but also supports the `primary` attribute for denoting the primary button.
|
|
36
36
|
|
|
37
|
-
<!-- docs: demo
|
|
37
|
+
<!-- docs: demo code properties name:d2l-button -->
|
|
38
38
|
```html
|
|
39
39
|
<script type="module">
|
|
40
40
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -69,7 +69,7 @@ The `d2l-button-subtle` element can be used just like the native `button`, but f
|
|
|
69
69
|
|
|
70
70
|
**Note:** It is strongly recommended to use `text` and `icon` as opposed to putting content in the `slot` to ensure that the recommended subtle button style is maintained.
|
|
71
71
|
|
|
72
|
-
<!-- docs: demo
|
|
72
|
+
<!-- docs: demo code properties name:d2l-button-subtle -->
|
|
73
73
|
```html
|
|
74
74
|
<script type="module">
|
|
75
75
|
import '@brightspace-ui/core/components/button/button-subtle.js';
|
|
@@ -105,7 +105,7 @@ To make your `d2l-button-subtle` accessible, use the following properties when a
|
|
|
105
105
|
|
|
106
106
|
The `d2l-button-icon` element can be used just like the native `button`, for instances where only an icon is displayed.
|
|
107
107
|
|
|
108
|
-
<!-- docs: demo
|
|
108
|
+
<!-- docs: demo code properties name:d2l-button-icon -->
|
|
109
109
|
```html
|
|
110
110
|
<script type="module">
|
|
111
111
|
import '@brightspace-ui/core/components/button/button-icon.js';
|
|
@@ -27,7 +27,7 @@ Floating workflow buttons behavior can be added by using the `<d2l-floating-butt
|
|
|
27
27
|
|
|
28
28
|
## Floating Buttons [d2l-floating-buttons]
|
|
29
29
|
|
|
30
|
-
<!-- docs: demo
|
|
30
|
+
<!-- docs: demo code properties name:d2l-floating-buttons autoSize:false display:block size:medium -->
|
|
31
31
|
```html
|
|
32
32
|
<script type="module">
|
|
33
33
|
import '@brightspace-ui/core/components/button/floating-buttons.js';
|
|
@@ -4,7 +4,7 @@ The `d2l-calendar` component can be used to display a responsively sized calenda
|
|
|
4
4
|
|
|
5
5
|
## Calendar [d2l-calendar]
|
|
6
6
|
|
|
7
|
-
<!-- docs: demo
|
|
7
|
+
<!-- docs: demo code properties name:d2l-calendar display:block -->
|
|
8
8
|
```html
|
|
9
9
|
<script type="module">
|
|
10
10
|
import '@brightspace-ui/core/components/calendar/calendar.js';
|
|
@@ -107,7 +107,7 @@ Cards are composed of 3 sections. Each card will have a content section but is n
|
|
|
107
107
|
|
|
108
108
|
The `d2l-card` element is a container that provides specific layout using several slots such as `content`, `header`, `footer`, `badge`, and `actions`. It can also be configured as a link for navigation.
|
|
109
109
|
|
|
110
|
-
<!-- docs: demo
|
|
110
|
+
<!-- docs: demo code properties name:d2l-card size:large -->
|
|
111
111
|
```html
|
|
112
112
|
<script type="module">
|
|
113
113
|
import '@brightspace-ui/core/components/card/card.js';
|
|
@@ -162,7 +162,7 @@ See the [anchor element docs](https://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
|
162
162
|
|
|
163
163
|
The `d2l-card-content-title` element is a helper for providing layout/style for a title within the `content` slot.
|
|
164
164
|
|
|
165
|
-
<!-- docs: demo
|
|
165
|
+
<!-- docs: demo code properties name:d2l-card-content-title size:large -->
|
|
166
166
|
```html
|
|
167
167
|
<script type="module">
|
|
168
168
|
import '@brightspace-ui/core/components/card/card.js';
|
|
@@ -191,7 +191,7 @@ The `d2l-card-content-title` element is a helper for providing layout/style for
|
|
|
191
191
|
|
|
192
192
|
The `d2l-card-content-meta` element is a helper for providing layout/style for a meta data within the `content` slot.
|
|
193
193
|
|
|
194
|
-
<!-- docs: demo
|
|
194
|
+
<!-- docs: demo code properties name:d2l-card-content-meta size:large -->
|
|
195
195
|
```html
|
|
196
196
|
<script type="module">
|
|
197
197
|
import '@brightspace-ui/core/components/card/card.js';
|
|
@@ -220,7 +220,7 @@ The `d2l-card-content-meta` element is a helper for providing layout/style for a
|
|
|
220
220
|
|
|
221
221
|
The `d2l-card-footer-link` element is an icon link that can be placed in the `footer` slot.
|
|
222
222
|
|
|
223
|
-
<!-- docs: demo
|
|
223
|
+
<!-- docs: demo code properties name:d2l-card-footer-link size:large -->
|
|
224
224
|
```html
|
|
225
225
|
<script type="module">
|
|
226
226
|
import '@brightspace-ui/core/components/card/card.js';
|
|
@@ -90,7 +90,7 @@ The collapsible panel is a container that can show or hide additional content. I
|
|
|
90
90
|
|
|
91
91
|
The `d2l-collapsible-panel` element is a container that provides specific layout slots such as `before`, `header`, `summary`, `actions`, and a default slot for the expanded content.
|
|
92
92
|
|
|
93
|
-
<!-- docs: demo
|
|
93
|
+
<!-- docs: demo code properties name:d2l-collapsible-panel -->
|
|
94
94
|
```html
|
|
95
95
|
<script type="module">
|
|
96
96
|
import '@brightspace-ui/core/components/collapsible-panel/collapsible-panel.js';
|
|
@@ -206,7 +206,7 @@ Use an inline collapsible panel to progressively disclose sections of a complex
|
|
|
206
206
|
## Summary Items [d2l-collapsible-panel-summary-item]
|
|
207
207
|
An optional summary can help the user understand what’s inside the collapsible panel without having to expand it. This can be helpful if the user needs more than the heading to explain what’s inside.
|
|
208
208
|
|
|
209
|
-
<!-- docs: demo
|
|
209
|
+
<!-- docs: demo properties name:d2l-collapsible-panel-summary-item -->
|
|
210
210
|
```html
|
|
211
211
|
<script type="module">
|
|
212
212
|
import '@brightspace-ui/core/components/collapsible-panel/collapsible-panel.js';
|
|
@@ -314,7 +314,7 @@ More than one `d2l-collapsible-panel-summary-item` can be added to the `summary`
|
|
|
314
314
|
Collapsible panels have two optional slots, `header` and `actions` that can be used to add more information to the header area.
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
<!-- docs: demo
|
|
317
|
+
<!-- docs: demo -->
|
|
318
318
|
```html
|
|
319
319
|
<script type="module">
|
|
320
320
|
import '@brightspace-ui/core/components/button/button-icon.js';
|
|
@@ -363,7 +363,7 @@ Collapsible panels have two optional slots, `header` and `actions` that can be u
|
|
|
363
363
|
|
|
364
364
|
Use the `d2l-collapsible-panel-group` component to automatically handle spacing and layout for multiple panels.
|
|
365
365
|
|
|
366
|
-
<!-- docs: demo
|
|
366
|
+
<!-- docs: demo code properties name:d2l-collapsible-panel-group -->
|
|
367
367
|
```html
|
|
368
368
|
<script type="module">
|
|
369
369
|
import '@brightspace-ui/core/components/collapsible-panel/collapsible-panel.js';
|
|
@@ -9,13 +9,20 @@ import { offscreenStyles } from '../offscreen/offscreen.js';
|
|
|
9
9
|
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
|
10
10
|
import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const normalizeHeadingStyle = (number) => {
|
|
13
13
|
number = parseInt(number);
|
|
14
14
|
if (number < 1) { return 1; }
|
|
15
15
|
if (number > 4) { return 4; }
|
|
16
16
|
return number;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
const normalizeHeadingLevel = (number) => {
|
|
20
|
+
number = parseInt(number);
|
|
21
|
+
if (number < 1) { return 1; }
|
|
22
|
+
if (number > 6) { return 6; }
|
|
23
|
+
return number;
|
|
24
|
+
};
|
|
25
|
+
|
|
19
26
|
const defaultHeading = 3;
|
|
20
27
|
|
|
21
28
|
/**
|
|
@@ -38,8 +45,8 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
|
38
45
|
*/
|
|
39
46
|
panelTitle: { attribute: 'panel-title', type: String, reflect: true },
|
|
40
47
|
/**
|
|
41
|
-
* The semantic heading level (h1-
|
|
42
|
-
* @type {'1'|'2'|'3'|'4'}
|
|
48
|
+
* The semantic heading level (h1-h6)
|
|
49
|
+
* @type {'1'|'2'|'3'|'4'|'5'|'6'}
|
|
43
50
|
* @default "3"
|
|
44
51
|
*/
|
|
45
52
|
headingLevel: { attribute: 'heading-level', type: String, reflect: true },
|
|
@@ -453,7 +460,7 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
|
453
460
|
|
|
454
461
|
_renderPanelTitle() {
|
|
455
462
|
let headingStyle = (this.headingStyle === defaultHeading && this.headingLevel !== this.headingStyle) ? this.headingLevel : this.headingStyle;
|
|
456
|
-
headingStyle =
|
|
463
|
+
headingStyle = normalizeHeadingStyle(headingStyle);
|
|
457
464
|
|
|
458
465
|
const titleClasses = {
|
|
459
466
|
'd2l-collapsible-panel-title': true,
|
|
@@ -461,12 +468,14 @@ class CollapsiblePanel extends SkeletonMixin(FocusMixin(RtlMixin(LitElement))) {
|
|
|
461
468
|
[`d2l-heading-${headingStyle}`]: true,
|
|
462
469
|
};
|
|
463
470
|
|
|
464
|
-
const headingLevel =
|
|
471
|
+
const headingLevel = normalizeHeadingLevel(this.headingLevel);
|
|
465
472
|
switch (headingLevel) {
|
|
466
473
|
case 1: return html`<h1 class="${classMap(titleClasses)}">${this.panelTitle}</h1>`;
|
|
467
474
|
case 2: return html`<h2 class="${classMap(titleClasses)}">${this.panelTitle}</h2>`;
|
|
468
475
|
case 3: return html`<h3 class="${classMap(titleClasses)}">${this.panelTitle}</h3>`;
|
|
469
476
|
case 4: return html`<h4 class="${classMap(titleClasses)}">${this.panelTitle}</h4>`;
|
|
477
|
+
case 5: return html`<h5 class="${classMap(titleClasses)}">${this.panelTitle}</h5>`;
|
|
478
|
+
case 6: return html`<h6 class="${classMap(titleClasses)}">${this.panelTitle}</h6>`;
|
|
470
479
|
}
|
|
471
480
|
}
|
|
472
481
|
|
|
@@ -153,7 +153,8 @@
|
|
|
153
153
|
</d2l-demo-snippet>
|
|
154
154
|
|
|
155
155
|
<h2>Headings</h2>
|
|
156
|
-
<d2l-demo-snippet
|
|
156
|
+
<d2l-demo-snippet>
|
|
157
|
+
<d2l-collapsible-panel-group>
|
|
157
158
|
<d2l-collapsible-panel heading-level="1" panel-title="Heading Level 1">
|
|
158
159
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
159
160
|
</d2l-collapsible-panel>
|
|
@@ -170,6 +171,14 @@
|
|
|
170
171
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
171
172
|
</d2l-collapsible-panel>
|
|
172
173
|
|
|
174
|
+
<d2l-collapsible-panel heading-level="5" panel-title="Heading Level 5">
|
|
175
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
176
|
+
</d2l-collapsible-panel>
|
|
177
|
+
|
|
178
|
+
<d2l-collapsible-panel heading-level="6" panel-title="Heading Level 6">
|
|
179
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
180
|
+
</d2l-collapsible-panel>
|
|
181
|
+
|
|
173
182
|
<d2l-collapsible-panel heading-style="2" panel-title="Heading Style 2">
|
|
174
183
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
175
184
|
</d2l-collapsible-panel>
|
|
@@ -177,6 +186,7 @@
|
|
|
177
186
|
<d2l-collapsible-panel heading-style="4" heading-level="2" panel-title="Heading Style 4">
|
|
178
187
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas odio ligula, aliquam efficitur sollicitudin non, dignissim quis nisl. Nullam rutrum, lectus sed finibus consectetur, dolor leo blandit lorem, vitae consectetur arcu enim ornare tortor.
|
|
179
188
|
</d2l-collapsible-panel>
|
|
189
|
+
</d2l-collapsible-panel-group>
|
|
180
190
|
</d2l-demo-snippet>
|
|
181
191
|
|
|
182
192
|
<h2>Loooooong</h2>
|
|
@@ -17,7 +17,7 @@ Badges can be used to provide additional contextual information to users in rega
|
|
|
17
17
|
|
|
18
18
|
The `d2l-count-badge` element is a web component to display a number count, depending on your use case different styling options are available.
|
|
19
19
|
|
|
20
|
-
<!-- docs: demo
|
|
20
|
+
<!-- docs: demo code properties name:d2l-count-badge -->
|
|
21
21
|
```html
|
|
22
22
|
<script type="module">
|
|
23
23
|
import '@brightspace-ui/core/components/count-badge/count-badge.js';
|
|
@@ -54,7 +54,7 @@ The `d2l-count-badge` element is a web component to display a number count, depe
|
|
|
54
54
|
|
|
55
55
|
The `d2l-count-badge-icon` element is a web component to display a number count, either in a `"notification"` or `"count"` style with an icon.
|
|
56
56
|
|
|
57
|
-
<!-- docs: demo
|
|
57
|
+
<!-- docs: demo code properties name:d2l-count-badge-icon -->
|
|
58
58
|
```html
|
|
59
59
|
<script type="module">
|
|
60
60
|
import '@brightspace-ui/core/components/count-badge/count-badge-icon.js';
|
|
@@ -69,7 +69,7 @@ For very long values, or very small container sizes, the description list can us
|
|
|
69
69
|
|
|
70
70
|
The `d2l-dl-wrapper` component can be combined with `descriptionListStyles` to apply styling and resize behavior to native `dl` elements.
|
|
71
71
|
|
|
72
|
-
<!-- docs: demo
|
|
72
|
+
<!-- docs: demo code properties name:d2l-test-dl display:block -->
|
|
73
73
|
```html
|
|
74
74
|
<script type="module">
|
|
75
75
|
import { html, LitElement } from 'lit';
|
|
@@ -44,7 +44,7 @@ The `d2l-dialog` element is a generic dialog that provides a slot for arbitrary
|
|
|
44
44
|
<!-- docs: end donts -->
|
|
45
45
|
<!-- docs: end best practices -->
|
|
46
46
|
|
|
47
|
-
<!-- docs: demo
|
|
47
|
+
<!-- docs: demo code properties name:d2l-dialog autoSize:false display:block size:large -->
|
|
48
48
|
```html
|
|
49
49
|
<script type="module">
|
|
50
50
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -155,7 +155,7 @@ The `d2l-dialog-confirm` element is a simple confirmation dialog for prompting t
|
|
|
155
155
|
<!-- docs: end donts -->
|
|
156
156
|
<!-- docs: end best practices -->
|
|
157
157
|
|
|
158
|
-
<!-- docs: demo
|
|
158
|
+
<!-- docs: demo code properties name:d2l-dialog-confirm autoSize:false display:block size:large -->
|
|
159
159
|
```html
|
|
160
160
|
<script type="module">
|
|
161
161
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -208,7 +208,7 @@ document.querySelector('#open').addEventListener('click', () => {
|
|
|
208
208
|
|
|
209
209
|
The `d2l-dialog-fullscreen` element is a fullscreen variant of the generic `d2l-dialog`. It provides a slot for arbitrary content, and a `footer` slot for workflow buttons. Apply the `data-dialog-action` attribute to workflow buttons to automatically close the dialog with the action value.
|
|
210
210
|
|
|
211
|
-
<!-- docs: demo
|
|
211
|
+
<!-- docs: demo code properties name:d2l-dialog-fullscreen autoSize:false display:block size:large -->
|
|
212
212
|
```html
|
|
213
213
|
<script type="module">
|
|
214
214
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -17,7 +17,7 @@ A Dropdown is a button that opens a floating container to offer menu items or ot
|
|
|
17
17
|
|
|
18
18
|
`d2l-dropdown` is a generic opener for dropdown content (`d2l-dropdown-content`, `d2l-dropdown-menu` or `d2l-dropdown-tabs`) enabling alternate opener implementation using existing elements/components. Provide and indicate your own opener element with the class attribute value `d2l-dropdown-opener`. Wire-up is automatic.
|
|
19
19
|
|
|
20
|
-
<!-- docs: demo
|
|
20
|
+
<!-- docs: demo code properties name:d2l-dropdown align:flex-start autoOpen:true autoSize:false size:medium -->
|
|
21
21
|
```html
|
|
22
22
|
<script type="module">
|
|
23
23
|
import '@brightspace-ui/core/components/dropdown/dropdown.js';
|
|
@@ -58,7 +58,7 @@ If the dropdown is initially empty when it's opened, the dropdown pointer will n
|
|
|
58
58
|
## Opener: Dropdown Button [d2l-dropdown-button]
|
|
59
59
|
`d2l-dropdown-button` is a `d2l-button` opener for dropdown content (`d2l-dropdown-content`, `d2l-dropdown-menu` or `d2l-dropdown-tabs`).
|
|
60
60
|
|
|
61
|
-
<!-- docs: demo
|
|
61
|
+
<!-- docs: demo code properties name:d2l-dropdown-button align:flex-start autoOpen:true autoSize:false size:medium -->
|
|
62
62
|
```html
|
|
63
63
|
<script type="module">
|
|
64
64
|
import '@brightspace-ui/core/components/dropdown/dropdown-button.js';
|
|
@@ -86,7 +86,7 @@ If the dropdown is initially empty when it's opened, the dropdown pointer will n
|
|
|
86
86
|
## Opener: Button Subtle [d2l-dropdown-button-subtle]
|
|
87
87
|
`d2l-dropdown-button-subtle` is a `d2l-button-subtle` opener for dropdown content (`d2l-dropdown-content`, `d2l-dropdown-menu` or `d2l-dropdown-tabs`).
|
|
88
88
|
|
|
89
|
-
<!-- docs: demo
|
|
89
|
+
<!-- docs: demo code properties name:d2l-dropdown-button-subtle align:flex-start autoOpen:true autoSize:false size:medium -->
|
|
90
90
|
```html
|
|
91
91
|
<script type="module">
|
|
92
92
|
import '@brightspace-ui/core/components/dropdown/dropdown-button-subtle.js';
|
|
@@ -123,7 +123,7 @@ To make your `d2l-dropdown-button-subtle` accessible, use the following properti
|
|
|
123
123
|
## Opener: Context Menu [d2l-dropdown-context-menu]
|
|
124
124
|
`d2l-dropdown-context-menu` is a simple/minimal opener for dropdown content (`d2l-dropdown-content`, `d2l-dropdown-menu` or `d2l-dropdown-tabs`).
|
|
125
125
|
|
|
126
|
-
<!-- docs: demo
|
|
126
|
+
<!-- docs: demo code properties name:d2l-dropdown-context-menu align:flex-start autoOpen:true autoSize:false size:medium -->
|
|
127
127
|
```html
|
|
128
128
|
<script type="module">
|
|
129
129
|
import '@brightspace-ui/core/components/dropdown/dropdown-context-menu.js';
|
|
@@ -160,7 +160,7 @@ To make your usage of `d2l-dropdown-context-menu` accessible, use the following
|
|
|
160
160
|
## Opener: More [d2l-dropdown-more]
|
|
161
161
|
`d2l-dropdown-more` is a simple/minimal opener for dropdown content (`d2l-dropdown-content`, `d2l-dropdown-menu` or `d2l-dropdown-tabs`).
|
|
162
162
|
|
|
163
|
-
<!-- docs: demo
|
|
163
|
+
<!-- docs: demo code properties name:d2l-dropdown-more align:flex-start autoOpen:true autoSize:false size:medium -->
|
|
164
164
|
```html
|
|
165
165
|
<script type="module">
|
|
166
166
|
import '@brightspace-ui/core/components/dropdown/dropdown-more.js';
|
|
@@ -197,7 +197,7 @@ To make your usage of `d2l-dropdown-more` accessible, use the following property
|
|
|
197
197
|
## Content: Container [d2l-dropdown-content]
|
|
198
198
|
`d2l-dropdown-content` is a generic container for dropdown content. It provides behavior such as sizing, positioning, and managing focus gain/loss.
|
|
199
199
|
|
|
200
|
-
<!-- docs: demo
|
|
200
|
+
<!-- docs: demo code properties name:d2l-dropdown-content align:flex-start autoSize:false autoOpen:true size:medium -->
|
|
201
201
|
```html
|
|
202
202
|
<script type="module">
|
|
203
203
|
import '@brightspace-ui/core/components/dropdown/dropdown-button.js';
|
|
@@ -255,7 +255,7 @@ To make your usage of `d2l-dropdown-more` accessible, use the following property
|
|
|
255
255
|
## Content: Menu [d2l-dropdown-menu]
|
|
256
256
|
`d2l-dropdown-menu` is a container for a [d2l-menu](../menu/README.md) component. It provides additional support on top of `d2l-dropdown-content` for closing the menu when menu items are selected, resetting to the root of nested menus when reopening and automatic resizing when the menu resizes.
|
|
257
257
|
|
|
258
|
-
<!-- docs: demo
|
|
258
|
+
<!-- docs: demo code properties name:d2l-dropdown-menu align:flex-start autoSize:false size:medium -->
|
|
259
259
|
```html
|
|
260
260
|
<script type="module">
|
|
261
261
|
import '@brightspace-ui/core/components/dropdown/dropdown-button.js';
|
|
@@ -294,7 +294,7 @@ To make your usage of `d2l-dropdown-more` accessible, use the following property
|
|
|
294
294
|
## Content: Tabs [d2l-dropdown-tabs]
|
|
295
295
|
`d2l-dropdown-tabs` is a container for a [d2l-tabs](https://github.com/BrightspaceUI/tabs) component. It provides additional support on top of `d2l-dropdown-content` for automatic resizing when the tab changes.
|
|
296
296
|
|
|
297
|
-
<!-- docs: demo
|
|
297
|
+
<!-- docs: demo code properties name:d2l-dropdown-tabs autoOpen:true autoSize:false align:flex-start size:large -->
|
|
298
298
|
```html
|
|
299
299
|
<script type="module">
|
|
300
300
|
import '@brightspace-ui/core/components/dropdown/dropdown-button.js';
|
|
@@ -49,7 +49,7 @@ Empty state components are used to convey that there is no data available to be
|
|
|
49
49
|
|
|
50
50
|
The `d2l-empty-state-simple` component is an empty state component that displays a description. An [empty state action component](#d2l-empty-state-action-button) can be placed inside of the default slot to add an optional action.
|
|
51
51
|
|
|
52
|
-
<!-- docs: demo
|
|
52
|
+
<!-- docs: demo code properties name:d2l-empty-state-simple -->
|
|
53
53
|
```html
|
|
54
54
|
<script type="module">
|
|
55
55
|
import '@brightspace-ui/core/components/empty-state/empty-state-simple.js';
|
|
@@ -64,7 +64,7 @@ The `d2l-empty-state-illustrated` component is an empty state component that dis
|
|
|
64
64
|
|
|
65
65
|
The `illustration-name` property can be set to use one of the preset illustrations or a custom SVG illustration can be added in the `illustration` slot. The catalogue of preset empty state illustrations can be found [here](#preset-empty-state-illustrations).
|
|
66
66
|
|
|
67
|
-
<!-- docs: demo
|
|
67
|
+
<!-- docs: demo code properties name:d2l-empty-state-illustrated -->
|
|
68
68
|
```html
|
|
69
69
|
<script type="module">
|
|
70
70
|
import '@brightspace-ui/core/components/empty-state/empty-state-illustrated.js';
|
|
@@ -88,7 +88,7 @@ The `illustration-name` property can be set to use one of the preset illustratio
|
|
|
88
88
|
|
|
89
89
|
The `primary` attribute can be set to render a primary button in place of the default subtle button. Note that the `primary` attribute is only valid when placed within `empty-state-illustrated` components and will have no effect on `empty-state-simple`.
|
|
90
90
|
|
|
91
|
-
<!-- docs: demo
|
|
91
|
+
<!-- docs: demo code properties name:d2l-empty-state-action-button -->
|
|
92
92
|
```html
|
|
93
93
|
<script type="module">
|
|
94
94
|
import '@brightspace-ui/core/components/empty-state/empty-state-action-button.js';
|
|
@@ -119,7 +119,7 @@ The `primary` attribute can be set to render a primary button in place of the de
|
|
|
119
119
|
|
|
120
120
|
`d2l-empty-state-action-link` is an empty state action component that can be placed inside of the default slot of `empty-state-simple` or `empty-state-illustrated` to add a link action to the component. Only a single action can be placed within an empty state component.
|
|
121
121
|
|
|
122
|
-
<!-- docs: demo
|
|
122
|
+
<!-- docs: demo code properties name:d2l-empty-state-action-link -->
|
|
123
123
|
```html
|
|
124
124
|
<script type="module">
|
|
125
125
|
import '@brightspace-ui/core/components/empty-state/empty-state-action-link.js';
|
|
@@ -4,7 +4,7 @@ The `d2l-expand-collapse-content` element can be used to create expandable and c
|
|
|
4
4
|
|
|
5
5
|
## Expand Collapse Content [d2l-expand-collapse-content]
|
|
6
6
|
|
|
7
|
-
<!-- docs: demo
|
|
7
|
+
<!-- docs: demo code properties name:d2l-expand-collapse-content autoSize:false display:block size:small -->
|
|
8
8
|
```html
|
|
9
9
|
<script type="module">
|
|
10
10
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -33,7 +33,7 @@ Filter components are often used in conjuction with [tables](../../components/ta
|
|
|
33
33
|
|
|
34
34
|
The `d2l-filter` component allows a user to filter on one or more dimensions of data from a single dropdown.
|
|
35
35
|
|
|
36
|
-
<!-- docs: demo
|
|
36
|
+
<!-- docs: demo code properties name:d2l-filter align:start autoOpen:true autoSize:false size:large -->
|
|
37
37
|
```html
|
|
38
38
|
<script type="module">
|
|
39
39
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -164,7 +164,7 @@ The filter will announce changes to filter selections, search results, and when
|
|
|
164
164
|
|
|
165
165
|
The `d2l-filter-dimension-set` component is the main dimension type that will work for most use cases. Used alongside the [d2l-filter-dimension-set-value](#d2l-filter-dimension-set-value), this will give you a selectable list of filter values.
|
|
166
166
|
|
|
167
|
-
<!-- docs: demo
|
|
167
|
+
<!-- docs: demo code properties name:d2l-filter-dimension-set align:start autoOpen:true autoSize:false size:large -->
|
|
168
168
|
```html
|
|
169
169
|
<script type="module">
|
|
170
170
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -205,7 +205,7 @@ The `d2l-filter-dimension-set` component is the main dimension type that will wo
|
|
|
205
205
|
|
|
206
206
|
This component is built to be used alongside the [d2l-filter-dimension-set](#d2l-filter-dimension-set) component, this will give you a selectable list of filter values.
|
|
207
207
|
|
|
208
|
-
<!-- docs: demo
|
|
208
|
+
<!-- docs: demo code properties name:d2l-filter-dimension-set-value align:start autoOpen:true autoSize:false size:large -->
|
|
209
209
|
```html
|
|
210
210
|
<script type="module">
|
|
211
211
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -266,7 +266,7 @@ Note that when using multiple filter dimensions, the counts should be updated wh
|
|
|
266
266
|
|
|
267
267
|
The `d2l-filter-dimension-set-empty-state` component allows you to customize the empty state components that are rendered in [d2l-filter-dimension-set](#d2l-filter-dimension-set). When placed in the `d2l-filter-dimension-set` empty state slots, it will replace the component's default empty state. This component can be placed in either the `set-empty-state` or the `search-empty-state` slots.
|
|
268
268
|
|
|
269
|
-
<!-- docs: demo
|
|
269
|
+
<!-- docs: demo code properties name:d2l-filter-dimension-set-empty-state align:start autoOpen:true autoSize:false size:large -->
|
|
270
270
|
```html
|
|
271
271
|
<script type="module">
|
|
272
272
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -302,7 +302,7 @@ The `d2l-filter-dimension-set-empty-state` component allows you to customize the
|
|
|
302
302
|
|
|
303
303
|
A tag-list allowing the user to see (and remove) the currently applied filters. Works with the `d2l-filter`. It supports hooking up to multiple filters.
|
|
304
304
|
|
|
305
|
-
<!-- docs: demo
|
|
305
|
+
<!-- docs: demo code properties name:d2l-filter-tags align:start display:block autoSize:false size:medium -->
|
|
306
306
|
```html
|
|
307
307
|
<script type="module">
|
|
308
308
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -373,7 +373,7 @@ A tag-list allowing the user to see (and remove) the currently applied filters.
|
|
|
373
373
|
|
|
374
374
|
The `d2l-filter-overflow-group` is a container for multiple filters that handles overflow on smaller screens. Overflowing filters are displayed in a single filter.
|
|
375
375
|
|
|
376
|
-
<!-- docs: demo
|
|
376
|
+
<!-- docs: demo code properties name:d2l-filter-overflow-group align:start display:block autoSize:false size:medium -->
|
|
377
377
|
```html
|
|
378
378
|
<script type="module">
|
|
379
379
|
import '@brightspace-ui/core/components/filter/filter.js';
|
|
@@ -6,7 +6,7 @@ This component assists with managing user focus within your web application.
|
|
|
6
6
|
|
|
7
7
|
The `d2l-focus-trap` is a generic container that will trap user focus from leaving. Focus will cycle to the first or last focusable elements when tabbing forwards or backwards respectively. It will also capture focus from the document when actively trapping.
|
|
8
8
|
|
|
9
|
-
<!-- docs: demo
|
|
9
|
+
<!-- docs: demo code properties name:d2l-focus-trap -->
|
|
10
10
|
```html
|
|
11
11
|
<script type="module">
|
|
12
12
|
import '@brightspace-ui/core/components/button/button.js';
|
|
@@ -50,7 +50,7 @@ It differs from the native HTML `form` element in 4 ways:
|
|
|
50
50
|
|
|
51
51
|
If you're looking to emulate native form element submission, `d2l-form-native` may be more appropriate.
|
|
52
52
|
|
|
53
|
-
<!-- docs: demo
|
|
53
|
+
<!-- docs: demo code properties name:d2l-form autoSize:false display:block size:large -->
|
|
54
54
|
```html
|
|
55
55
|
<script type="module">
|
|
56
56
|
import '@brightspace-ui/core/components/form/form.js';
|
|
@@ -184,7 +184,7 @@ It differs from the native HTML `form` element in 2 ways:
|
|
|
184
184
|
|
|
185
185
|
If you're looking to submit form data via your own API calls or nest multiple forms within each other, `d2l-form` may be more appropriate.
|
|
186
186
|
|
|
187
|
-
<!-- docs: demo
|
|
187
|
+
<!-- docs: demo code properties name:d2l-form-native autoSize:false display:block size:medium -->
|
|
188
188
|
```html
|
|
189
189
|
<script type="module">
|
|
190
190
|
import '@brightspace-ui/core/components/form/form-native.js';
|
|
@@ -8,7 +8,7 @@ The `d2l-html-block` element is a web component for displaying user-authored HTM
|
|
|
8
8
|
|
|
9
9
|
Pass the user-authored HTML into the `html` attribute of the `d2l-html-block` and the component will stamp the content into its local DOM where styles will be applied, and math typeset.
|
|
10
10
|
|
|
11
|
-
<!-- docs: demo
|
|
11
|
+
<!-- docs: demo code properties name:d2l-html-block autoSize:false size:small -->
|
|
12
12
|
```html
|
|
13
13
|
<script type="module">
|
|
14
14
|
import '@brightspace-ui/core/components/html-block/html-block.js';
|
|
@@ -31,7 +31,7 @@ Checkboxes are used in forms to toggle an option or preference.
|
|
|
31
31
|
|
|
32
32
|
The `<d2l-input-checkbox>` element can be used to get a checkbox and optional visible label.
|
|
33
33
|
|
|
34
|
-
<!-- docs: demo
|
|
34
|
+
<!-- docs: demo code properties name:d2l-input-checkbox display:block -->
|
|
35
35
|
```html
|
|
36
36
|
<script type="module">
|
|
37
37
|
import '@brightspace-ui/core/components/inputs/input-checkbox.js';
|
|
@@ -16,7 +16,7 @@ Color inputs allow users to select a color from a palette and perform color cont
|
|
|
16
16
|
|
|
17
17
|
The `<d2l-input-color>` will open a dialog to allow the user to select a color from a palette.
|
|
18
18
|
|
|
19
|
-
<!-- docs: demo
|
|
19
|
+
<!-- docs: demo code properties name:d2l-input-color -->
|
|
20
20
|
```html
|
|
21
21
|
<script type="module">
|
|
22
22
|
import '@brightspace-ui/core/components/inputs/input-color.js';
|
|
@@ -31,7 +31,7 @@ Use the `<d2l-input-date>` component when users need to choose a single date. It
|
|
|
31
31
|
|
|
32
32
|
Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-MM-DD`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
|
33
33
|
|
|
34
|
-
<!-- docs: demo
|
|
34
|
+
<!-- docs: demo code properties name:d2l-input-date align:flex-start autoSize:false size:xlarge -->
|
|
35
35
|
```html
|
|
36
36
|
<script type="module">
|
|
37
37
|
import '@brightspace-ui/core/components/inputs/input-date.js';
|
|
@@ -77,7 +77,7 @@ Use the `<d2l-input-date-range>` component when users need to enter two dates i
|
|
|
77
77
|
|
|
78
78
|
Note: All `*value` properties should be in ISO 8601 calendar date format (`YYYY-MM-DD`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
|
79
79
|
|
|
80
|
-
<!-- docs: demo
|
|
80
|
+
<!-- docs: demo code properties name:d2l-input-date-range align:flex-start autoSize:false size:xlarge -->
|
|
81
81
|
```html
|
|
82
82
|
<script type="module">
|
|
83
83
|
import '@brightspace-ui/core/components/inputs/input-date-range.js';
|
|
@@ -129,7 +129,7 @@ Use the `<d2l-input-time>` component when users need to enter a time, without a
|
|
|
129
129
|
|
|
130
130
|
Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
|
131
131
|
|
|
132
|
-
<!-- docs: demo
|
|
132
|
+
<!-- docs: demo code properties name:d2l-input-time align:flex-start autoSize:false size:large -->
|
|
133
133
|
```html
|
|
134
134
|
<script type="module">
|
|
135
135
|
import '@brightspace-ui/core/components/inputs/input-time.js';
|
|
@@ -175,7 +175,7 @@ Use the `<d2l-input-time-range>` component when users need to enter two times in
|
|
|
175
175
|
|
|
176
176
|
Note: All `*value` properties should be in ISO 8601 time format (`hh:mm:ss`) and should be [localized to the user's timezone](#timezone) (if applicable).
|
|
177
177
|
|
|
178
|
-
<!-- docs: demo
|
|
178
|
+
<!-- docs: demo code properties name:d2l-input-time-range align:flex-start autoSize:false size:large -->
|
|
179
179
|
```html
|
|
180
180
|
<script type="module">
|
|
181
181
|
import '@brightspace-ui/core/components/inputs/input-time-range.js';
|
|
@@ -223,7 +223,7 @@ Use the `<d2l-input-date-time>` component when users need to enter a single dat
|
|
|
223
223
|
|
|
224
224
|
Note: All `*value` properties should be in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`) and in UTC time (i.e., do NOT localize to the user's timezone).
|
|
225
225
|
|
|
226
|
-
<!-- docs: demo
|
|
226
|
+
<!-- docs: demo code properties name:d2l-input-date-time align:flex-start autoSize:false size:xlarge -->
|
|
227
227
|
```html
|
|
228
228
|
<script type="module">
|
|
229
229
|
import '@brightspace-ui/core/components/inputs/input-date-time.js';
|
|
@@ -270,7 +270,7 @@ Use the `<d2l-input-date-time-range>` component when users need to enter two d
|
|
|
270
270
|
|
|
271
271
|
Note: All `*value` properties should be in ISO 8601 combined date and time format (`YYYY-MM-DDTHH:mm:ss.sssZ`) and in UTC time (i.e., do NOT localize to the user's timezone).
|
|
272
272
|
|
|
273
|
-
<!-- docs: demo
|
|
273
|
+
<!-- docs: demo code properties name:d2l-input-date-time-range align:flex-start autoSize:false size:xlarge -->
|
|
274
274
|
```html
|
|
275
275
|
<script type="module">
|
|
276
276
|
import '@brightspace-ui/core/components/inputs/input-date-time-range.js';
|
|
@@ -21,7 +21,7 @@ Numeric inputs allow users to input numbers. These include the more generic `d2l
|
|
|
21
21
|
|
|
22
22
|
The `<d2l-input-number>` element is similar to `<d2l-input-text>`, except it's intended for inputting numbers only.
|
|
23
23
|
|
|
24
|
-
<!-- docs: demo
|
|
24
|
+
<!-- docs: demo code properties name:d2l-input-number -->
|
|
25
25
|
```html
|
|
26
26
|
<script type="module">
|
|
27
27
|
import '@brightspace-ui/core/components/inputs/input-number.js';
|
|
@@ -99,7 +99,7 @@ To accept only integer numbers, set `max-fraction-digits` to zero:
|
|
|
99
99
|
|
|
100
100
|
The `<d2l-input-percent>` element is similar to `<d2l-input-number>`, except it provides a "%" symbol beside the number.
|
|
101
101
|
|
|
102
|
-
<!-- docs: demo
|
|
102
|
+
<!-- docs: demo code properties name:d2l-input-percent -->
|
|
103
103
|
```html
|
|
104
104
|
<script type="module">
|
|
105
105
|
import '@brightspace-ui/core/components/inputs/input-percent.js';
|
|
@@ -75,7 +75,7 @@ For disabled items, add the `d2l-input-radio-label-disabled` class on the label
|
|
|
75
75
|
|
|
76
76
|
If you'd like to manually link the radio input with a label, or use an ARIA label, place the `d2l-radio-input` CSS class on the input itself to style it. For example:
|
|
77
77
|
|
|
78
|
-
<!-- docs: demo
|
|
78
|
+
<!-- docs: demo code properties name:d2l-test-input-radio-solo display:block -->
|
|
79
79
|
```html
|
|
80
80
|
<script type="module">
|
|
81
81
|
import { html, LitElement } from 'lit';
|
|
@@ -35,7 +35,7 @@ Search inputs allow users to input text, execute a search, and clear results. A
|
|
|
35
35
|
|
|
36
36
|
For text searches use `<d2l-input-search>`, which wraps the native `<input type="search">` element.
|
|
37
37
|
|
|
38
|
-
<!-- docs: demo
|
|
38
|
+
<!-- docs: demo code properties name:d2l-input-search -->
|
|
39
39
|
```html
|
|
40
40
|
<script type="module">
|
|
41
41
|
import '@brightspace-ui/core/components/inputs/input-search.js';
|
|
@@ -52,7 +52,7 @@ Native `<select>` elements can be styled by importing `input-select-styles.js` i
|
|
|
52
52
|
|
|
53
53
|
Note: in order for RTL to function correctly, make sure your component uses the `RtlMixin`.
|
|
54
54
|
|
|
55
|
-
<!-- docs: demo
|
|
55
|
+
<!-- docs: demo code properties name:d2l-test-input-select -->
|
|
56
56
|
```html
|
|
57
57
|
<script type="module">
|
|
58
58
|
import { css, html, LitElement } from 'lit';
|
|
@@ -49,7 +49,7 @@ Therefore in text inputs, placeholder text is a light colour (Mica), which fails
|
|
|
49
49
|
|
|
50
50
|
The `<d2l-input-text>` element is a simple wrapper around the native `<input type="text">` tag. It's intended primarily for inputting generic text, email addresses and URLs.
|
|
51
51
|
|
|
52
|
-
<!-- docs: demo
|
|
52
|
+
<!-- docs: demo code properties name:d2l-input-text -->
|
|
53
53
|
```html
|
|
54
54
|
<script type="module">
|
|
55
55
|
import '@brightspace-ui/core/components/inputs/input-text.js';
|
|
@@ -168,7 +168,7 @@ As an alternative to using the `<d2l-input-text>` custom element, you can style
|
|
|
168
168
|
|
|
169
169
|
The `<d2l-input-textarea>` is a wrapper around the native `<textarea>` element that provides auto-grow and validation behaviours. It's intended for inputting unformatted multi-line text.
|
|
170
170
|
|
|
171
|
-
<!-- docs: demo
|
|
171
|
+
<!-- docs: demo code properties name:d2l-input-textarea -->
|
|
172
172
|
```html
|
|
173
173
|
<script type="module">
|
|
174
174
|
import '@brightspace-ui/core/components/inputs/input-textarea.js';
|
|
@@ -34,7 +34,7 @@ Same size as the standard link, but bolder.
|
|
|
34
34
|
|
|
35
35
|
Import and use the `<d2l-link>` web component instead of the native `<a>` element:
|
|
36
36
|
|
|
37
|
-
<!-- docs: demo
|
|
37
|
+
<!-- docs: demo code properties name:d2l-link -->
|
|
38
38
|
```html
|
|
39
39
|
<script type="module">
|
|
40
40
|
import '@brightspace-ui/core/components/link/link.js';
|
|
@@ -102,7 +102,7 @@ When using `d2l-list`, the `grid` attribute will enable the table-like keyboard
|
|
|
102
102
|
|
|
103
103
|
The `d2l-list` is the container to create a styled list of items using `d2l-list-item` or `d2l-list-item-button`. It provides the appropriate `list` semantics as well as options for displaying separators, etc.
|
|
104
104
|
|
|
105
|
-
<!-- docs: demo
|
|
105
|
+
<!-- docs: demo code properties name:d2l-list display:block autoSize:false size:medium -->
|
|
106
106
|
```html
|
|
107
107
|
<script type="module">
|
|
108
108
|
import '@brightspace-ui/core/components/list/list.js';
|
|
@@ -330,7 +330,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
|
|
|
330
330
|
|
|
331
331
|
The `d2l-list-controls` component can be placed in the `d2l-list`'s `controls` slot to provide a select-all checkbox, summary, a slot for `d2l-selection-action`s, and overflow-group behaviour.
|
|
332
332
|
|
|
333
|
-
<!-- docs: demo
|
|
333
|
+
<!-- docs: demo code properties name:d2l-list-controls display:block autoSize:false size:small -->
|
|
334
334
|
```html
|
|
335
335
|
<script type="module">
|
|
336
336
|
import '@brightspace-ui/core/components/list/list.js';
|
|
@@ -382,7 +382,7 @@ The `d2l-list-controls` component can be placed in the `d2l-list`'s `controls` s
|
|
|
382
382
|
|
|
383
383
|
The `d2l-list-item` provides the appropriate `listitem` semantics for children within a list. It also provides some basic layout, breakpoints for responsiveness, a navigation link for the primary action, and selection.
|
|
384
384
|
|
|
385
|
-
<!-- docs: demo
|
|
385
|
+
<!-- docs: demo code properties name:d2l-list-item autoSize:false size:small -->
|
|
386
386
|
```html
|
|
387
387
|
<script type="module">
|
|
388
388
|
import '@brightspace-ui/core/components/button/button-icon.js';
|
|
@@ -461,7 +461,7 @@ The `d2l-list-item` provides the appropriate `listitem` semantics for children w
|
|
|
461
461
|
|
|
462
462
|
The `d2l-list-item-button` provides the same functionality as `d2l-list-item` except with button semantics for its primary action.
|
|
463
463
|
|
|
464
|
-
<!-- docs: demo
|
|
464
|
+
<!-- docs: demo code properties name:d2l-list-item-button display:block -->
|
|
465
465
|
```html
|
|
466
466
|
<script type="module">
|
|
467
467
|
import '@brightspace-ui/core/components/list/list.js';
|
|
@@ -548,7 +548,7 @@ Where the parameters correspond to the slots of `d2l-list-item`:
|
|
|
548
548
|
|
|
549
549
|
The `d2l-list-item-content` provides additional consistent layout for primary and secondary text in item content. It may be used with or without the `illustration` and `action` slots mentioned above.
|
|
550
550
|
|
|
551
|
-
<!-- docs: demo
|
|
551
|
+
<!-- docs: demo code properties name:d2l-list-item-content display:block -->
|
|
552
552
|
```html
|
|
553
553
|
<script type="module">
|
|
554
554
|
import '@brightspace-ui/core/components/list/list.js';
|
|
@@ -28,7 +28,7 @@ A loading spinner indicates that something is happening and we don't know how lo
|
|
|
28
28
|
|
|
29
29
|
## Loading Spinner [d2l-loading-spinner]
|
|
30
30
|
|
|
31
|
-
<!-- docs: demo
|
|
31
|
+
<!-- docs: demo code properties name:d2l-loading-spinner -->
|
|
32
32
|
```html
|
|
33
33
|
<script type="module">
|
|
34
34
|
import '@brightspace-ui/core/components/loading-spinner/loading-spinner.js';
|
|
@@ -27,7 +27,7 @@ A basic menu can be defined using `d2l-menu` and a combination of menu items (e.
|
|
|
27
27
|
|
|
28
28
|
**Note:** `d2l-menu` renders without an outer border since it's typically used in a context where a containing element defines a border (ex. `d2l-dropdown-menu` or side nav).
|
|
29
29
|
|
|
30
|
-
<!-- docs: demo
|
|
30
|
+
<!-- docs: demo code properties name:d2l-menu -->
|
|
31
31
|
```html
|
|
32
32
|
<script type="module">
|
|
33
33
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -64,7 +64,7 @@ To make your usage of `d2l-menu` accessible, use the following property:
|
|
|
64
64
|
|
|
65
65
|
The `d2l-menu-item` component is used with JS handlers and can be wired-up to the `d2l-menu-item-select` event.
|
|
66
66
|
|
|
67
|
-
<!-- docs: demo
|
|
67
|
+
<!-- docs: demo code properties name:d2l-menu-item -->
|
|
68
68
|
```html
|
|
69
69
|
<script type="module">
|
|
70
70
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -116,7 +116,7 @@ To make your usage of `d2l-menu-item` accessible, use the following property:
|
|
|
116
116
|
|
|
117
117
|
This `d2l-menu-item-link` is used for navigating. It gives users the ability to right-click and open in a new tab.
|
|
118
118
|
|
|
119
|
-
<!-- docs: demo
|
|
119
|
+
<!-- docs: demo code properties name:d2l-menu-item-link -->
|
|
120
120
|
```html
|
|
121
121
|
<script type="module">
|
|
122
122
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -152,7 +152,7 @@ To make your usage of `d2l-menu-item-link` accessible, use the following propert
|
|
|
152
152
|
|
|
153
153
|
The `d2l-menu-item-checkbox` component is used for selection. It can be wired-up to the `d2l-menu-item-change` event. Multiple checkboxes can be selected at once.
|
|
154
154
|
|
|
155
|
-
<!-- docs: demo
|
|
155
|
+
<!-- docs: demo code properties name:d2l-menu-item-checkbox -->
|
|
156
156
|
```html
|
|
157
157
|
<script type="module">
|
|
158
158
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -198,7 +198,7 @@ To make your usage of `d2l-menu-item-checkbox` accessible, use the following pro
|
|
|
198
198
|
|
|
199
199
|
The `d2l-menu-item-radio` component is used for selection. It can be wired-up to the `d2l-menu-item-change` event. Only one radio item in a given `<d2l-menu>` may be selected at once (i.e., selecting one option will deselect the other selected `d2l-menu-item-radio` item).
|
|
200
200
|
|
|
201
|
-
<!-- docs: demo
|
|
201
|
+
<!-- docs: demo code properties name:d2l-menu-item-radio -->
|
|
202
202
|
```html
|
|
203
203
|
<script type="module">
|
|
204
204
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -244,7 +244,7 @@ To make your usage of `d2l-menu-item-radio` accessible, use the following proper
|
|
|
244
244
|
|
|
245
245
|
The `d2l-menu-item-separator` component can be used to semantically separate menu items.
|
|
246
246
|
|
|
247
|
-
<!-- docs: demo
|
|
247
|
+
<!-- docs: demo code properties name:d2l-menu-item-separator -->
|
|
248
248
|
```html
|
|
249
249
|
<script type="module">
|
|
250
250
|
import '@brightspace-ui/core/components/menu/menu.js';
|
|
@@ -36,7 +36,7 @@ Meters are a visually engaging way to communicate progress or measurements.
|
|
|
36
36
|
|
|
37
37
|
Linear meters show a horizontal progress bar.
|
|
38
38
|
|
|
39
|
-
<!-- docs: demo
|
|
39
|
+
<!-- docs: demo code properties name:d2l-meter-linear -->
|
|
40
40
|
```html
|
|
41
41
|
<script type="module">
|
|
42
42
|
import '@brightspace-ui/core/components/meter/meter-linear.js';
|
|
@@ -68,7 +68,7 @@ Linear meters show a horizontal progress bar.
|
|
|
68
68
|
|
|
69
69
|
Radial meters appear as a half circle. They have more visual weight than a linear meter and should only be used when the data is central to the user's task.
|
|
70
70
|
|
|
71
|
-
<!-- docs: demo
|
|
71
|
+
<!-- docs: demo code properties name:d2l-meter-radial size:medium -->
|
|
72
72
|
```html
|
|
73
73
|
<script type="module">
|
|
74
74
|
import '@brightspace-ui/core/components/meter/meter-radial.js';
|
|
@@ -92,7 +92,7 @@ Radial meters appear as a half circle. They have more visual weight than a line
|
|
|
92
92
|
|
|
93
93
|
Circle meters display data in a compact circle format, so they're useful when horizontal space is at a premium.
|
|
94
94
|
|
|
95
|
-
<!-- docs: demo
|
|
95
|
+
<!-- docs: demo code properties name:d2l-meter-circle -->
|
|
96
96
|
```html
|
|
97
97
|
<script type="module">
|
|
98
98
|
import '@brightspace-ui/core/components/meter/meter-circle.js';
|
|
@@ -4,7 +4,7 @@ The `d2l-more-less` element can be used to minimize the display of long content,
|
|
|
4
4
|
|
|
5
5
|
## More-Less [d2l-more-less]
|
|
6
6
|
|
|
7
|
-
<!-- docs: demo
|
|
7
|
+
<!-- docs: demo code properties name:d2l-more-less -->
|
|
8
8
|
```html
|
|
9
9
|
<script type="module">
|
|
10
10
|
import '@brightspace-ui/core/components/more-less/more-less.js';
|
|
@@ -36,7 +36,7 @@ Object property lists are simple dot-separated lists of text, displayed sequenti
|
|
|
36
36
|
|
|
37
37
|
An object property list can be defined using `d2l-object-property-list` and a combination of items (e.g., `d2l-object-property-list-item`, `d2l-object-property-list-item-link`).
|
|
38
38
|
|
|
39
|
-
<!-- docs: demo
|
|
39
|
+
<!-- docs: demo code properties name:d2l-object-property-list -->
|
|
40
40
|
```html
|
|
41
41
|
<script type="module">
|
|
42
42
|
import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
|
|
@@ -79,7 +79,7 @@ The object property list is designed to wrap in an inline manner if the items ar
|
|
|
79
79
|
|
|
80
80
|
The `d2l-object-property-list-item` component is the basic type of item for an object property list, displaying text and an optional leading icon.
|
|
81
81
|
|
|
82
|
-
<!-- docs: demo
|
|
82
|
+
<!-- docs: demo code properties name:d2l-object-property-list-item -->
|
|
83
83
|
```html
|
|
84
84
|
<script type="module">
|
|
85
85
|
import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
|
|
@@ -105,7 +105,7 @@ The `d2l-object-property-list-item` component is the basic type of item for an o
|
|
|
105
105
|
|
|
106
106
|
The `d2l-object-property-list-item-link` component is a link item for the object property list. It displays text as a hyperlink, with an optional leading icon.
|
|
107
107
|
|
|
108
|
-
<!-- docs: demo
|
|
108
|
+
<!-- docs: demo code properties name:d2l-object-property-list-item-link -->
|
|
109
109
|
```html
|
|
110
110
|
<script type="module">
|
|
111
111
|
import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
|
|
@@ -134,7 +134,7 @@ The `d2l-object-property-list-item-link` component is a link item for the object
|
|
|
134
134
|
|
|
135
135
|
Object property lists can optionally contain a single `d2l-status-indicator` inserted into the `status` slot.
|
|
136
136
|
|
|
137
|
-
<!-- docs: demo
|
|
137
|
+
<!-- docs: demo code properties name:d2l-status-indicator -->
|
|
138
138
|
```html
|
|
139
139
|
<script type="module">
|
|
140
140
|
import '@brightspace-ui/core/components/object-property-list/object-property-list.js';
|
|
@@ -6,7 +6,7 @@ Positioning content off-screen is a valuable accessibility technique that allows
|
|
|
6
6
|
|
|
7
7
|
Import the `<d2l-offscreen>` web component and place your content within the default slot to position it off-screen. The content will be hidden in the UI but still discoverable by screen reader users.
|
|
8
8
|
|
|
9
|
-
<!-- docs: demo
|
|
9
|
+
<!-- docs: demo code properties name:d2l-offscreen -->
|
|
10
10
|
```html
|
|
11
11
|
<!-- docs: start hidden content -->
|
|
12
12
|
<style>
|
|
@@ -30,7 +30,7 @@ The `d2l-overflow-group` element can be used to add responsiveness to a set of b
|
|
|
30
30
|
## Overflow Group [d2l-overflow-group]
|
|
31
31
|
Items added to this container element will no longer wrap onto a second line when the container becomes too small, but will be added to a dropdown menu with configurable styling.
|
|
32
32
|
|
|
33
|
-
<!-- docs: demo
|
|
33
|
+
<!-- docs: demo code properties name:d2l-overflow-group autoSize:false display:block size:medium -->
|
|
34
34
|
```html
|
|
35
35
|
<script type="module">
|
|
36
36
|
import '@brightspace-ui/core/components/overflow-group/overflow-group.js';
|
|
@@ -5,7 +5,7 @@ Scroll containers can be used to control how content acts when overflowing its c
|
|
|
5
5
|
|
|
6
6
|
The `d2l-scroll-wrapper` element can be used to wrap content which may overflow its horizontal boundaries, providing left/right scroll buttons.
|
|
7
7
|
|
|
8
|
-
<!-- docs: demo
|
|
8
|
+
<!-- docs: demo code properties name:d2l-scroll-wrapper -->
|
|
9
9
|
```html
|
|
10
10
|
<script type="module">
|
|
11
11
|
import '@brightspace-ui/core/components/scroll-wrapper/scroll-wrapper.js';
|
|
@@ -12,7 +12,7 @@ The `SelectionMixin` enables the creation of custom selection control components
|
|
|
12
12
|
|
|
13
13
|
The `SelectionMixin` defines the `selection-single` attribute that consumers can specify for single selection behaviour.
|
|
14
14
|
|
|
15
|
-
<!-- docs: demo
|
|
15
|
+
<!-- docs: demo code properties name:d2l-demo-selection display:block -->
|
|
16
16
|
```html
|
|
17
17
|
<script type="module">
|
|
18
18
|
import { css, html, LitElement } from 'lit';
|
|
@@ -107,7 +107,7 @@ Define a custom web component that extends the `SelectionMixin`. The selection c
|
|
|
107
107
|
|
|
108
108
|
The `d2l-selection-action` is an optional component that provides a button for actions associated with the [selection control](#selectionmixin) (ex. bulk actions). The `requires-selection` attribute may be specified to indicate that the button should be non-interactive if nothing is selected.
|
|
109
109
|
|
|
110
|
-
<!-- docs: demo
|
|
110
|
+
<!-- docs: demo code properties name:d2l-selection-action -->
|
|
111
111
|
```html
|
|
112
112
|
<script type="module">
|
|
113
113
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -136,7 +136,7 @@ The `d2l-selection-action` is an optional component that provides a button for a
|
|
|
136
136
|
|
|
137
137
|
The `d2l-selection-action-dropdown` is an optional component that provides a button opener for dropdown content associated with the [selection control](#selectionmixin) (ex. bulk actions). The `requires-selection` attribute may be specified to indicate that the opener should be non-interactive if nothing is selected.
|
|
138
138
|
|
|
139
|
-
<!-- docs: demo
|
|
139
|
+
<!-- docs: demo code properties name:d2l-selection-action-dropdown align:baseline -->
|
|
140
140
|
```html
|
|
141
141
|
<script type="module">
|
|
142
142
|
import '@brightspace-ui/core/components/dropdown/dropdown-menu.js';
|
|
@@ -166,7 +166,7 @@ The `d2l-selection-action-dropdown` is an optional component that provides a but
|
|
|
166
166
|
|
|
167
167
|
The `d2l-selection-action-menu-item` is an optional component that is a menu item for actions associated with the [selection control](#selectionmixin) (ex. bulk actions). The `requires-selection` attribute may be specified to indicate that the menu item should be non-interactive if nothing is selected. This component enables the app to define an opener that is enabled regardless of the selection state, while having a menu containing one or more menu items that `requires-selection`.
|
|
168
168
|
|
|
169
|
-
<!-- docs: demo
|
|
169
|
+
<!-- docs: demo code properties name:d2l-selection-action-menu-item autoSize:false size:medium align:baseline -->
|
|
170
170
|
```html
|
|
171
171
|
<script type="module">
|
|
172
172
|
import '@brightspace-ui/core/components/dropdown/dropdown-button-subtle.js';
|
|
@@ -208,7 +208,7 @@ If `d2l-selection-input` is placed within a selection control that specifies `se
|
|
|
208
208
|
|
|
209
209
|
Note: `d2l-list-item` already provides a selection input for selectable list items.
|
|
210
210
|
|
|
211
|
-
<!-- docs: demo
|
|
211
|
+
<!-- docs: demo code properties name:d2l-selection-input display:block -->
|
|
212
212
|
```html
|
|
213
213
|
<script type="module">
|
|
214
214
|
import '@brightspace-ui/core/components/selection/selection-input.js';
|
|
@@ -266,7 +266,7 @@ The `d2l-selection-select-all` is an optional component that provides a checkbox
|
|
|
266
266
|
|
|
267
267
|
The `d2l-selection-select-all` component may be placed inside the selection control, or in the same DOM scope with the `selection-for` attribute set to the id of that component. In the example below, setting `selection-for` to `other-list` demonstrates the ability to use `d2l-selection-select-all` from outside of the selection control component.
|
|
268
268
|
|
|
269
|
-
<!-- docs: demo
|
|
269
|
+
<!-- docs: demo code properties name:d2l-selection-select-all display:block -->
|
|
270
270
|
```html
|
|
271
271
|
<script type="module">
|
|
272
272
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -351,7 +351,7 @@ The `d2l-selection-summary` is an optional component that shows a simple count o
|
|
|
351
351
|
|
|
352
352
|
The `d2l-selection-summary` component may be placed inside the selection control, or in the same DOM scope with the `selection-for` attribute set to the id of that component. In the example below, setting `selection-for` to `other-list` demonstrates the ability to use `d2l-selection-summary` from outside of the selection control component.
|
|
353
353
|
|
|
354
|
-
<!-- docs: demo
|
|
354
|
+
<!-- docs: demo code properties name:d2l-selection-summary display:block -->
|
|
355
355
|
```html
|
|
356
356
|
<script type="module">
|
|
357
357
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -436,7 +436,7 @@ The `d2l-selection-controls` provides a standardized wrapper to display selectio
|
|
|
436
436
|
|
|
437
437
|
When using lists, use the list-specific `d2l-list-controls` instead, which extends this component's behaviour.
|
|
438
438
|
|
|
439
|
-
<!-- docs: demo
|
|
439
|
+
<!-- docs: demo code properties name:d2l-selection-controls display:block autoSize:false size:small -->
|
|
440
440
|
```html
|
|
441
441
|
<script type="module">
|
|
442
442
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -58,7 +58,7 @@ Status Indicators are used to communicate the status of an item. They are non-in
|
|
|
58
58
|
|
|
59
59
|
## Status Indicator [d2l-status-indicator]
|
|
60
60
|
|
|
61
|
-
<!-- docs: demo
|
|
61
|
+
<!-- docs: demo code properties name:d2l-status-indicator -->
|
|
62
62
|
```html
|
|
63
63
|
<script type="module">
|
|
64
64
|
import '@brightspace-ui/core/components/status-indicator/status-indicator.js';
|
|
@@ -81,7 +81,7 @@ Status Indicators are used to communicate the status of an item. They are non-in
|
|
|
81
81
|
|
|
82
82
|
Use the bold style if the state is central to the user's task and should have maximum prominence. Use the default style if the state is important but not critical to the user's workflow. It is acceptable to mix the styles if one particular state should stand out more than the rest.
|
|
83
83
|
|
|
84
|
-
<!-- docs: demo
|
|
84
|
+
<!-- docs: demo code properties -->
|
|
85
85
|
```html
|
|
86
86
|
<script type="module">
|
|
87
87
|
import '@brightspace-ui/core/components/status-indicator/status-indicator.js';
|
|
@@ -29,7 +29,7 @@ A switch is used to toggle between two states, on and off, just like a light swi
|
|
|
29
29
|
## Switch [d2l-switch]
|
|
30
30
|
The `d2l-switch` element is a generic switch with on/off semantics.
|
|
31
31
|
|
|
32
|
-
<!-- docs: demo
|
|
32
|
+
<!-- docs: demo code properties name:d2l-switch autoSize:false size:small -->
|
|
33
33
|
```html
|
|
34
34
|
<script type="module">
|
|
35
35
|
import '@brightspace-ui/core/components/switch/switch.js';
|
|
@@ -65,7 +65,7 @@ The d2l-switch-visibility component is a special variant for toggling the visibi
|
|
|
65
65
|
|
|
66
66
|
See also [Visibility Switch with Conditions](https://daylight.d2l.dev/components/switch/#visibility-switch-with-conditions).
|
|
67
67
|
|
|
68
|
-
<!-- docs: demo
|
|
68
|
+
<!-- docs: demo code properties name:d2l-switch-visibility autoSize:false size:small -->
|
|
69
69
|
```html
|
|
70
70
|
<script type="module">
|
|
71
71
|
import '@brightspace-ui/core/components/switch/switch-visibility.js';
|
|
@@ -45,7 +45,7 @@ If the viewport is very narrow — for example, on a mobile device — it may be
|
|
|
45
45
|
|
|
46
46
|
The `d2l-table-wrapper` element can be combined with table styles to apply default/light styling, row selection styles, overflow scrolling and sticky headers to native `<table>` elements within your Lit components.
|
|
47
47
|
|
|
48
|
-
<!-- docs: demo
|
|
48
|
+
<!-- docs: demo code properties name:d2l-table-wrapper display:block -->
|
|
49
49
|
```html
|
|
50
50
|
<script type="module">
|
|
51
51
|
import { html, LitElement } from 'lit';
|
|
@@ -300,7 +300,7 @@ Load-More paging functionality can be implemented in tables by placing a `d2l-pa
|
|
|
300
300
|
|
|
301
301
|
The `d2l-table-controls` component can be placed in the `d2l-table-wrapper`'s `controls` slot to provide a selection summary, a slot for `d2l-selection-action`s, and overflow-group behaviour.
|
|
302
302
|
|
|
303
|
-
<!-- docs: demo
|
|
303
|
+
<!-- docs: demo code properties name:d2l-table-controls display:block -->
|
|
304
304
|
```html
|
|
305
305
|
<script type="module">
|
|
306
306
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -39,7 +39,7 @@ Tabs are used to present related information in mutually exclusive panels, allow
|
|
|
39
39
|
|
|
40
40
|
The `d2l-tabs` element is a web component for tabbed content. It provides the `d2l-tab-panel` component for the content, renders tabs responsively, and provides virtual scrolling for large tab lists.
|
|
41
41
|
|
|
42
|
-
<!-- docs: demo
|
|
42
|
+
<!-- docs: demo code properties name:d2l-tabs display:block -->
|
|
43
43
|
```html
|
|
44
44
|
<script type="module">
|
|
45
45
|
import '@brightspace-ui/core/components/tabs/tabs.js';
|
|
@@ -69,7 +69,7 @@ The `d2l-tabs` element is a web component for tabbed content. It provides the `d
|
|
|
69
69
|
## Tab Panels [d2l-tab-panel]
|
|
70
70
|
Selecting a tab in the tab bar causes the relevant tab panel to be displayed. Tab panels can contain text, form controls, rich media, or just about anything else. There is an optional “slot” available for related controls such as a Settings button.
|
|
71
71
|
|
|
72
|
-
<!-- docs: demo
|
|
72
|
+
<!-- docs: demo code properties name:d2l-tab-panel display:block -->
|
|
73
73
|
```html
|
|
74
74
|
<script type="module">
|
|
75
75
|
import '@brightspace-ui/core/components/tabs/tabs.js';
|
|
@@ -30,7 +30,7 @@ The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-i
|
|
|
30
30
|
|
|
31
31
|
The corresponding `*-clear` event must be listened to for whatever component (`d2l-tag-list` or `d2l-tag-list-item`) has `clearable` on it and that listener must handle individual `d2l-tag-list-item` deletion as well as potentially focus behavior (see individual event descriptions).
|
|
32
32
|
|
|
33
|
-
<!-- docs: demo
|
|
33
|
+
<!-- docs: demo code properties name:d2l-tag-list autoSize:false display:block size:small -->
|
|
34
34
|
```html
|
|
35
35
|
<script type="module">
|
|
36
36
|
import '@brightspace-ui/core/components/tag-list/tag-list.js';
|
|
@@ -60,7 +60,7 @@ The corresponding `*-clear` event must be listened to for whatever component (`d
|
|
|
60
60
|
## Tag List Item [d2l-tag-list-item]
|
|
61
61
|
The `d2l-tag-list-item` provides the appropriate semantics and styling for children within a tag list. Tag List items do not work outside of a Tag List and should not be used on their own.
|
|
62
62
|
|
|
63
|
-
<!-- docs: demo
|
|
63
|
+
<!-- docs: demo code properties name:d2l-tag-list-item autoSize:false display:block size:small -->
|
|
64
64
|
```html
|
|
65
65
|
<script type="module">
|
|
66
66
|
import '@brightspace-ui/core/components/tag-list/tag-list.js';
|
|
@@ -74,7 +74,7 @@ The `d2l-tooltip` component is used to display additional information when users
|
|
|
74
74
|
<!-- docs: end donts -->
|
|
75
75
|
<!-- docs: end best practices -->
|
|
76
76
|
|
|
77
|
-
<!-- docs: demo
|
|
77
|
+
<!-- docs: demo code properties name:d2l-tooltip autoSize:false size:small -->
|
|
78
78
|
```html
|
|
79
79
|
<script type="module">
|
|
80
80
|
import '@brightspace-ui/core/components/inputs/input-text.js';
|
|
@@ -193,7 +193,7 @@ The `d2l-tooltip-help` component is used to display additional information when
|
|
|
193
193
|
<!-- docs: end donts -->
|
|
194
194
|
<!-- docs: end best practices -->
|
|
195
195
|
|
|
196
|
-
<!-- docs: demo
|
|
196
|
+
<!-- docs: demo code properties name:d2l-tooltip-help autoSize:false size:medium -->
|
|
197
197
|
```html
|
|
198
198
|
<script type="module">
|
|
199
199
|
import '@brightspace-ui/core/components/tooltip/tooltip-help.js';
|
package/custom-elements.json
CHANGED
|
@@ -1215,8 +1215,8 @@
|
|
|
1215
1215
|
},
|
|
1216
1216
|
{
|
|
1217
1217
|
"name": "heading-level",
|
|
1218
|
-
"description": "The semantic heading level (h1-
|
|
1219
|
-
"type": "'1'|'2'|'3'|'4'",
|
|
1218
|
+
"description": "The semantic heading level (h1-h6)",
|
|
1219
|
+
"type": "'1'|'2'|'3'|'4'|'5'|'6'",
|
|
1220
1220
|
"default": "\"\\\"3\\\"\""
|
|
1221
1221
|
},
|
|
1222
1222
|
{
|
|
@@ -1273,8 +1273,8 @@
|
|
|
1273
1273
|
{
|
|
1274
1274
|
"name": "headingLevel",
|
|
1275
1275
|
"attribute": "heading-level",
|
|
1276
|
-
"description": "The semantic heading level (h1-
|
|
1277
|
-
"type": "'1'|'2'|'3'|'4'",
|
|
1276
|
+
"description": "The semantic heading level (h1-h6)",
|
|
1277
|
+
"type": "'1'|'2'|'3'|'4'|'5'|'6'",
|
|
1278
1278
|
"default": "\"\\\"3\\\"\""
|
|
1279
1279
|
},
|
|
1280
1280
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/eslint-parser": "^7",
|
|
47
47
|
"@brightspace-ui/stylelint-config": "^0.8",
|
|
48
|
-
"@brightspace-ui/testing": "^0.
|
|
48
|
+
"@brightspace-ui/testing": "^0.9",
|
|
49
49
|
"@open-wc/semantic-dom-diff": "^0.20",
|
|
50
50
|
"@open-wc/testing": "^3",
|
|
51
51
|
"@rollup/plugin-dynamic-import-vars": "^2",
|
|
@@ -16,7 +16,7 @@ If no nodes are assigned to the `footer` slot, the footer is hidden.
|
|
|
16
16
|
|
|
17
17
|
Note: this template automatically includes `<header>`, `<main>`, `<aside>` and `<footer>` elements, so there's no need to include them inside the various slots.
|
|
18
18
|
|
|
19
|
-
<!-- docs: demo
|
|
19
|
+
<!-- docs: demo code properties name:d2l-template-primary-secondary autoSize:false size:large -->
|
|
20
20
|
```html
|
|
21
21
|
<script type="module">
|
|
22
22
|
import '@brightspace-ui/core/templates/primary-secondary/primary-secondary.js';
|