@brightspace-ui/core 3.268.0 → 3.268.1
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/collapsible-panel/README.md +11 -15
- package/components/demo/code-view.js +6 -10
- package/components/demo/demo-page-settings.js +25 -29
- package/components/demo/demo-page.js +32 -36
- package/components/demo/demo-snippet.js +95 -99
- package/components/description-list/README.md +25 -33
- package/components/description-list/demo/description-list-test.js +36 -39
- package/components/dialog/README.md +3 -5
- package/components/form/docs/form-element-mixin.md +11 -14
- package/components/form/docs/form-element-nesting.md +4 -6
- package/components/form/docs/form-element-wrapping.md +1 -3
- package/components/hierarchical-view/README.md +8 -11
- package/components/inputs/docs/input-select-styles.md +4 -9
- package/components/inputs/docs/styling-native-inputs.md +11 -25
- package/components/link/README.md +1 -1
- package/components/list/README.md +8 -16
- package/components/menu/menu-item-checkbox.js +1 -3
- package/components/menu/menu-item-link.js +27 -33
- package/components/menu/menu-item-mixin.js +52 -54
- package/components/menu/menu-item-radio.js +1 -3
- package/components/menu/menu-item-return.js +18 -22
- package/components/menu/menu-item-selectable-mixin.js +12 -14
- package/components/menu/menu-item-separator.js +9 -11
- package/components/menu/menu-item.js +11 -15
- package/components/menu/menu.js +50 -54
- package/components/meter/meter-circle.js +3 -4
- package/components/meter/meter-linear.js +86 -88
- package/components/meter/meter-mixin.js +34 -36
- package/components/meter/meter-radial.js +3 -4
- package/components/more-less/more-less.js +57 -61
- package/components/object-property-list/object-property-list-item-link.js +18 -19
- package/components/object-property-list/object-property-list-item-tooltip-help.js +8 -9
- package/components/object-property-list/object-property-list-item.js +52 -55
- package/components/object-property-list/object-property-list.js +24 -27
- package/components/offscreen/README.md +1 -1
- package/components/offscreen/offscreen.js +13 -15
- package/components/offscreen/screen-reader-pause.js +1 -3
- package/components/overflow-group/README.md +1 -3
- package/components/overflow-group/overflow-group-mixin.js +55 -59
- package/components/overflow-group/overflow-group.js +38 -42
- package/components/page/page-header-button.js +41 -45
- package/components/page/page-header-custom.js +108 -112
- package/components/page/page-header-immersive.js +65 -69
- package/components/page/page-header-separator.js +12 -14
- package/components/paging/pageable-mixin.js +3 -5
- package/components/paging/pageable-subscriber-mixin.js +8 -10
- package/components/paging/pager-load-more.js +47 -51
- package/components/popover/popover-mixin.js +186 -190
- package/components/progress/progress.js +160 -164
- package/components/scroll-wrapper/scroll-wrapper.js +109 -113
- package/components/selection/README.md +5 -7
- package/components/selection/demo/demo-selection.js +5 -7
- package/components/selection/selection-action-dropdown.js +9 -13
- package/components/selection/selection-action-menu-item.js +11 -15
- package/components/selection/selection-action.js +20 -24
- package/components/selection/selection-controls.js +92 -96
- package/components/selection/selection-input.js +40 -44
- package/components/selection/selection-mixin.js +11 -13
- package/components/selection/selection-observer-mixin.js +14 -16
- package/components/selection/selection-select-all-pages.js +8 -10
- package/components/selection/selection-select-all.js +16 -20
- package/components/selection/selection-summary.js +18 -22
- package/components/skeleton/README.md +2 -6
- package/components/skeleton/skeleton-group-mixin.js +3 -5
- package/components/skeleton/skeleton-mixin.js +7 -9
- package/components/skip-nav/skip-nav-custom.js +33 -37
- package/components/sorting/sort.js +11 -13
- package/components/status-indicator/status-indicator.js +75 -79
- package/components/switch/switch-mixin.js +145 -149
- package/components/switch/switch-visibility.js +11 -15
- package/components/switch/switch.js +5 -7
- package/components/table/README.md +19 -37
- package/components/table/demo/table-test.js +27 -31
- package/components/table/table-col-sort-button-item.js +1 -3
- package/components/table/table-col-sort-button.js +105 -109
- package/components/table/table-controls.js +18 -21
- package/components/table/table-wrapper.js +124 -128
- package/components/tabs/tab-internal.js +72 -76
- package/components/tabs/tab-mixin.js +22 -24
- package/components/tabs/tab-panel-mixin.js +47 -51
- package/components/tabs/tab.js +7 -9
- package/components/tabs/tabs.js +171 -175
- package/components/tag-list/tag-list-item-mixin.js +103 -107
- package/components/tag-list/tag-list-item.js +13 -15
- package/components/tag-list/tag-list.js +54 -58
- package/components/tooltip/tooltip-help.js +67 -71
- package/components/tooltip/tooltip.js +103 -107
- package/components/typography/README.md +5 -7
- package/components/validation/validation-custom-mixin.js +4 -6
- package/components/view-switcher/view-switcher-button.js +42 -46
- package/components/view-switcher/view-switcher.js +26 -29
- package/controllers/subscriber/README.md +7 -11
- package/custom-elements.json +1026 -3850
- package/mixins/arrow-keys/arrow-keys-mixin.js +10 -12
- package/mixins/async-container/async-container-mixin.js +10 -12
- package/mixins/collection/collection-mixin.js +7 -9
- package/mixins/interactive/interactive-mixin.js +10 -14
- package/mixins/labelled/README.md +3 -5
- package/mixins/labelled/labelled-mixin.js +26 -30
- package/mixins/provider/README.md +5 -7
- package/mixins/rtl/README.md +5 -7
- package/mixins/rtl/rtl-mixin.js +7 -9
- package/mixins/theme/theme-mixin.js +6 -8
- package/mixins/visible-on-ancestor/README.md +1 -3
- package/mixins/visible-on-ancestor/visible-on-ancestor-mixin.js +11 -13
- package/package.json +1 -1
- package/templates/primary-secondary/primary-secondary.js +373 -377
|
@@ -219,21 +219,17 @@ import { selectStyles } from '@brightspace-ui/core/components/inputs/input-selec
|
|
|
219
219
|
|
|
220
220
|
class CollapsiblePanelDaylightDemo extends LitElement {
|
|
221
221
|
|
|
222
|
-
static
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
width: 500px;
|
|
234
|
-
}
|
|
235
|
-
`];
|
|
236
|
-
}
|
|
222
|
+
static properties = {
|
|
223
|
+
_addons: { state: true },
|
|
224
|
+
_icingType: { state: true },
|
|
225
|
+
_icingTypes: { state: true },
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
static styles = [labelStyles, selectStyles, css`
|
|
229
|
+
d2l-collapsible-panel {
|
|
230
|
+
width: 500px;
|
|
231
|
+
}
|
|
232
|
+
`];
|
|
237
233
|
|
|
238
234
|
constructor() {
|
|
239
235
|
super();
|
|
@@ -6,17 +6,13 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
|
6
6
|
|
|
7
7
|
class CodeView extends LitElement {
|
|
8
8
|
|
|
9
|
-
static
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
}
|
|
9
|
+
static properties = {
|
|
10
|
+
hideLanguage: { type: Boolean, reflect: true, attribute: 'hide-language' },
|
|
11
|
+
language: { type: String, reflect: true },
|
|
12
|
+
_code: { type: String }
|
|
13
|
+
};
|
|
16
14
|
|
|
17
|
-
static
|
|
18
|
-
return [ themeStyles, styles ];
|
|
19
|
-
}
|
|
15
|
+
static styles = [themeStyles, styles];
|
|
20
16
|
|
|
21
17
|
constructor() {
|
|
22
18
|
super();
|
|
@@ -17,35 +17,31 @@ const localeSettings = getDocumentLocaleSettings();
|
|
|
17
17
|
|
|
18
18
|
class DemoPageSettings extends LitElement {
|
|
19
19
|
|
|
20
|
-
static
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
margin-block-end: 0;
|
|
46
|
-
}
|
|
47
|
-
`];
|
|
48
|
-
}
|
|
20
|
+
static properties = {
|
|
21
|
+
panelTitle: { type: String, attribute: 'panel-title' },
|
|
22
|
+
_language: { state: true }
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
static styles = [inputLabelStyles, selectStyles, css`
|
|
26
|
+
:host {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
:host[hidden] {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
d2l-collapsible-panel {
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
35
|
+
.color-mode-group {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
}
|
|
38
|
+
#applyFlagsButton {
|
|
39
|
+
max-width: max-content;
|
|
40
|
+
}
|
|
41
|
+
#useAsDefaultColorMode {
|
|
42
|
+
margin-block-end: 0;
|
|
43
|
+
}
|
|
44
|
+
`];
|
|
49
45
|
|
|
50
46
|
constructor() {
|
|
51
47
|
super();
|
|
@@ -21,44 +21,40 @@ window.isD2LDemoPage = true;
|
|
|
21
21
|
|
|
22
22
|
class DemoPage extends LitElement {
|
|
23
23
|
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
}
|
|
24
|
+
static properties = {
|
|
25
|
+
pageTitle: { type: String, attribute: 'page-title' },
|
|
26
|
+
_noScroll: { state: true }
|
|
27
|
+
};
|
|
30
28
|
|
|
31
|
-
static
|
|
32
|
-
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
29
|
+
static styles = [css`
|
|
30
|
+
:host {
|
|
31
|
+
background-color: var(--d2l-theme-background-color-sunken);
|
|
32
|
+
display: block;
|
|
33
|
+
padding: 30px;
|
|
34
|
+
}
|
|
35
|
+
main.no-scroll {
|
|
36
|
+
height: 0;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
padding: 0;
|
|
39
|
+
}
|
|
40
|
+
header {
|
|
41
|
+
margin-bottom: 1.5rem;
|
|
42
|
+
max-width: 900px;
|
|
43
|
+
}
|
|
44
|
+
.d2l-demo-page-content > ::slotted(h2),
|
|
45
|
+
.d2l-demo-page-content > ::slotted(h3) {
|
|
46
|
+
color: var(--d2l-theme-text-color-static-standard);
|
|
47
|
+
font-size: 0.8rem;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
line-height: 1.2rem;
|
|
50
|
+
margin: 1.5rem 0 1.5rem 0;
|
|
51
|
+
}
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
53
|
+
.d2l-demo-page-content > ::slotted(d2l-code-view),
|
|
54
|
+
.d2l-demo-page-content > ::slotted(d2l-demo-snippet) {
|
|
55
|
+
margin-bottom: 36px;
|
|
56
|
+
}
|
|
57
|
+
`];
|
|
62
58
|
|
|
63
59
|
connectedCallback() {
|
|
64
60
|
super.connectedCallback();
|
|
@@ -15,108 +15,104 @@ function setIndent(text, indent = 0, skipFirstLine = false) {
|
|
|
15
15
|
|
|
16
16
|
class DemoSnippet extends LitElement {
|
|
17
17
|
|
|
18
|
-
static
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
}
|
|
18
|
+
static properties = {
|
|
19
|
+
codeViewHidden: { type: Boolean, reflect: true, attribute: 'code-view-hidden' },
|
|
20
|
+
fullWidth: { type: Boolean, reflect: true, attribute: 'full-width' },
|
|
21
|
+
noPadding: { type: Boolean, reflect: true, attribute: 'no-padding' },
|
|
22
|
+
overflowHidden: { type: Boolean, reflect: true, attribute: 'overflow-hidden' },
|
|
23
|
+
_code: { type: String },
|
|
24
|
+
_fullscreen: { state: true },
|
|
25
|
+
_hasSkeleton: { type: Boolean, attribute: false },
|
|
26
|
+
_settingsPeek: { state: true },
|
|
27
|
+
_skeletonOn: { type: Boolean, reflect: false }
|
|
28
|
+
};
|
|
31
29
|
|
|
32
|
-
static
|
|
33
|
-
|
|
34
|
-
:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
30
|
+
static styles = css`
|
|
31
|
+
:host {
|
|
32
|
+
background-color: var(--d2l-theme-background-color-base);
|
|
33
|
+
border: 1px solid var(--d2l-theme-border-color-standard);
|
|
34
|
+
border-radius: 6px;
|
|
35
|
+
box-shadow: var(--d2l-theme-shadow-floating);
|
|
36
|
+
display: block;
|
|
37
|
+
max-width: 900px;
|
|
38
|
+
}
|
|
39
|
+
:host([hidden]) {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
:host([full-width]) {
|
|
43
|
+
max-width: unset;
|
|
44
|
+
}
|
|
45
|
+
.d2l-demo-snippet-demo-wrapper {
|
|
46
|
+
display: flex;
|
|
47
|
+
}
|
|
48
|
+
.d2l-demo-snippet-demo-wrapper.fullscreen {
|
|
49
|
+
background-color: var(--d2l-theme-background-color-base);
|
|
50
|
+
height: 100vh;
|
|
51
|
+
inset: 0;
|
|
52
|
+
overflow: auto;
|
|
53
|
+
position: absolute;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
}
|
|
56
|
+
.d2l-demo-snippet-demo {
|
|
57
|
+
flex: 1 1 auto;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
position: relative;
|
|
60
|
+
}
|
|
61
|
+
:host([full-width]) .d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo {
|
|
62
|
+
width: 100vw;
|
|
63
|
+
}
|
|
64
|
+
:host([overflow-hidden]) .d2l-demo-snippet-demo {
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
67
|
+
.d2l-demo-snippet-demo-padding {
|
|
68
|
+
padding: 18px;
|
|
69
|
+
}
|
|
70
|
+
:host([no-padding]) .d2l-demo-snippet-demo-padding,
|
|
71
|
+
.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-demo-padding {
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
.d2l-demo-snippet-settings {
|
|
75
|
+
border-inline-start: 1px solid var(--d2l-theme-border-color-standard);
|
|
76
|
+
flex: 0 0 auto;
|
|
77
|
+
padding: 6px;
|
|
78
|
+
}
|
|
79
|
+
.d2l-demo-snippet-demo-wrapper.fullscreen .d2l-demo-snippet-settings {
|
|
80
|
+
position: sticky;
|
|
81
|
+
top: 0;
|
|
82
|
+
}
|
|
83
|
+
d2l-dropdown.settings-dropdown {
|
|
84
|
+
background-color: var(--d2l-theme-background-color-base);
|
|
85
|
+
border-radius: 6px;
|
|
86
|
+
outline: 1px solid var(--d2l-color-celestine-minus-1);
|
|
87
|
+
position: fixed;
|
|
88
|
+
right: 1rem;
|
|
89
|
+
top: -0.25rem;
|
|
90
|
+
translate: 0 -1.5rem;
|
|
91
|
+
z-index: 9999; /* stack on top of sticky headers */
|
|
92
|
+
}
|
|
93
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
86
94
|
d2l-dropdown.settings-dropdown {
|
|
87
|
-
|
|
88
|
-
border-radius: 6px;
|
|
89
|
-
outline: 1px solid var(--d2l-color-celestine-minus-1);
|
|
90
|
-
position: fixed;
|
|
91
|
-
right: 1rem;
|
|
92
|
-
top: -0.25rem;
|
|
93
|
-
translate: 0 -1.5rem;
|
|
94
|
-
z-index: 9999; /* stack on top of sticky headers */
|
|
95
|
-
}
|
|
96
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
97
|
-
d2l-dropdown.settings-dropdown {
|
|
98
|
-
transition: translate 0.15s, box-shadow 0.15s;
|
|
99
|
-
}
|
|
95
|
+
transition: translate 0.15s, box-shadow 0.15s;
|
|
100
96
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
}
|
|
98
|
+
d2l-dropdown.settings-dropdown.peek,
|
|
99
|
+
d2l-dropdown.settings-dropdown:hover,
|
|
100
|
+
d2l-dropdown.settings-dropdown:focus-within {
|
|
101
|
+
box-shadow: 0 -1px 0 1px white;
|
|
102
|
+
translate: 0;
|
|
103
|
+
}
|
|
104
|
+
d2l-code-view {
|
|
105
|
+
border: none;
|
|
106
|
+
border-top-left-radius: 0;
|
|
107
|
+
border-top-right-radius: 0;
|
|
108
|
+
box-shadow: none;
|
|
109
|
+
margin: 0;
|
|
110
|
+
max-width: 100%;
|
|
111
|
+
}
|
|
112
|
+
:host([code-view-hidden]) d2l-code-view {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
120
116
|
|
|
121
117
|
constructor() {
|
|
122
118
|
super();
|
|
@@ -38,9 +38,7 @@ For very long values, or very small container sizes, the description list can us
|
|
|
38
38
|
|
|
39
39
|
class TestDescriptionList extends LitElement {
|
|
40
40
|
|
|
41
|
-
static
|
|
42
|
-
return descriptionListStyles;
|
|
43
|
-
}
|
|
41
|
+
static styles = descriptionListStyles;
|
|
44
42
|
|
|
45
43
|
render() {
|
|
46
44
|
return html`
|
|
@@ -77,15 +75,11 @@ The `d2l-dl-wrapper` component can be combined with `descriptionListStyles` to a
|
|
|
77
75
|
|
|
78
76
|
class TestDescriptionList extends LitElement {
|
|
79
77
|
|
|
80
|
-
static
|
|
81
|
-
return descriptionListStyles;
|
|
82
|
-
}
|
|
78
|
+
static styles = descriptionListStyles;
|
|
83
79
|
|
|
84
|
-
static
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
80
|
+
static properties = {
|
|
81
|
+
breakpoint: { type: Number },
|
|
82
|
+
};
|
|
89
83
|
|
|
90
84
|
render() {
|
|
91
85
|
return html`
|
|
@@ -133,28 +127,26 @@ The `dt` and `dd` elements can contain non-text content such as links or profile
|
|
|
133
127
|
|
|
134
128
|
class TestDescriptionList extends LitElement {
|
|
135
129
|
|
|
136
|
-
static
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
`];
|
|
157
|
-
}
|
|
130
|
+
static styles = [
|
|
131
|
+
descriptionListStyles, css`
|
|
132
|
+
.user {
|
|
133
|
+
align-items: center;
|
|
134
|
+
display: flex;
|
|
135
|
+
gap: 0.5rem;
|
|
136
|
+
}
|
|
137
|
+
.avatar {
|
|
138
|
+
align-items: center;
|
|
139
|
+
background-color: var(--d2l-color-cinnabar-minus-1);
|
|
140
|
+
border-radius: 0.25rem;
|
|
141
|
+
color: white;
|
|
142
|
+
display: flex;
|
|
143
|
+
font-size: 0.7rem;
|
|
144
|
+
font-weight: 700;
|
|
145
|
+
height: 1.5rem;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
width: 1.5rem;
|
|
148
|
+
}
|
|
149
|
+
`];
|
|
158
150
|
|
|
159
151
|
render() {
|
|
160
152
|
return html`
|
|
@@ -4,46 +4,43 @@ import { descriptionListStyles } from '../description-list-wrapper.js';
|
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
|
|
6
6
|
class TestDescriptionList extends LitElement {
|
|
7
|
-
static get properties() {
|
|
8
|
-
return {
|
|
9
|
-
/**
|
|
10
|
-
* Width for component to use a stacked layout
|
|
11
|
-
* @type {number}
|
|
12
|
-
*/
|
|
13
|
-
breakpoint: { type: Number, reflect: true },
|
|
14
|
-
/**
|
|
15
|
-
* Force the component to always use a stacked layout; will override breakpoint attribute
|
|
16
|
-
* @type {boolean}
|
|
17
|
-
*/
|
|
18
|
-
forceStacked: { type: Boolean, reflect: true, attribute: 'force-stacked' },
|
|
19
|
-
/**
|
|
20
|
-
* @ignore
|
|
21
|
-
*/
|
|
22
|
-
type: { type: String, reflect: true },
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
7
|
|
|
26
|
-
static
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
8
|
+
static properties = {
|
|
9
|
+
/**
|
|
10
|
+
* Width for component to use a stacked layout
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
breakpoint: { type: Number, reflect: true },
|
|
14
|
+
/**
|
|
15
|
+
* Force the component to always use a stacked layout; will override breakpoint attribute
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
forceStacked: { type: Boolean, reflect: true, attribute: 'force-stacked' },
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
type: { type: String, reflect: true },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
static styles = [descriptionListStyles, css`
|
|
26
|
+
.user {
|
|
27
|
+
align-items: center;
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 0.5rem;
|
|
30
|
+
}
|
|
31
|
+
.avatar {
|
|
32
|
+
align-items: center;
|
|
33
|
+
background-color: var(--d2l-color-cinnabar-minus-1);
|
|
34
|
+
border-radius: 0.25rem;
|
|
35
|
+
color: white;
|
|
36
|
+
display: flex;
|
|
37
|
+
font-size: 0.7rem;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
height: 1.5rem;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
width: 1.5rem;
|
|
42
|
+
}
|
|
43
|
+
`];
|
|
47
44
|
|
|
48
45
|
constructor() {
|
|
49
46
|
super();
|
|
@@ -278,11 +278,9 @@ Notes on this example:
|
|
|
278
278
|
|
|
279
279
|
class DialogAsyncContentUntil extends LoadingCompleteMixin(LitElement) {
|
|
280
280
|
|
|
281
|
-
static
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
};
|
|
285
|
-
}
|
|
281
|
+
static properties = {
|
|
282
|
+
key: { type: String }
|
|
283
|
+
};
|
|
286
284
|
|
|
287
285
|
constructor() {
|
|
288
286
|
super();
|
|
@@ -67,20 +67,17 @@ import { FormElementMixin } from '@brightspace-ui/core/form/form-element-mixin.j
|
|
|
67
67
|
// Use the FormElementMixin
|
|
68
68
|
class MyFormElement extends FormElementMixin(LitElement) {
|
|
69
69
|
|
|
70
|
-
static
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
}
|
|
70
|
+
static properties = {
|
|
71
|
+
_val1: { type: String },
|
|
72
|
+
_val2: { type: String }
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
static styles = css`
|
|
76
|
+
/* Add our invalid styles */
|
|
77
|
+
:host([invalid]) {
|
|
78
|
+
border: 2px solid var(--d2l-color-cinnabar);
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
84
81
|
|
|
85
82
|
constructor() {
|
|
86
83
|
super();
|
|
@@ -35,12 +35,10 @@ import { FormElementMixin } from '@brightspace-ui/core/form/form-element-mixin.j
|
|
|
35
35
|
// Use the FormElementMixin
|
|
36
36
|
class MyNestingFormElement extends FormElementMixin(LitElement) {
|
|
37
37
|
|
|
38
|
-
static
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
}
|
|
38
|
+
static properties = {
|
|
39
|
+
_firstName: { type: String },
|
|
40
|
+
_lastName: { type: String }
|
|
41
|
+
};
|
|
44
42
|
|
|
45
43
|
firstUpdated(changedProperties) {
|
|
46
44
|
super.firstUpdated(changedProperties);
|
|
@@ -23,9 +23,7 @@ import { FormElementMixin } from '@brightspace-ui/core/form/form-element-mixin.j
|
|
|
23
23
|
// Use the FormElementMixin
|
|
24
24
|
class MyWrappingFormElement extends FormElementMixin(LitElement) {
|
|
25
25
|
|
|
26
|
-
static
|
|
27
|
-
return { value: { type: String } };
|
|
28
|
-
}
|
|
26
|
+
static properties = { value: { type: String } };
|
|
29
27
|
|
|
30
28
|
render() {
|
|
31
29
|
// Conditionally render our validation error message if there is one
|