@brightspace-ui/core 3.267.3 → 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/inputs/input-select-styles.js +30 -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/helpers/focus.js +5 -1
- 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
package/components/menu/menu.js
CHANGED
|
@@ -23,62 +23,58 @@ const keyCodes = {
|
|
|
23
23
|
*/
|
|
24
24
|
class Menu extends PropertyRequiredMixin(ThemeMixin(HierarchicalViewMixin(LitElement))) {
|
|
25
25
|
|
|
26
|
-
static
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
padding-top: 1px;
|
|
59
|
-
width: 100%;
|
|
60
|
-
}
|
|
26
|
+
static properties = {
|
|
27
|
+
/**
|
|
28
|
+
* @ignore
|
|
29
|
+
*/
|
|
30
|
+
active: { type: Boolean, reflect: true },
|
|
31
|
+
/**
|
|
32
|
+
* ACCESSIBILITY: Acts as the primary label for the menu (REQUIRED for root menu)
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
label: { type: String, required: true },
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
// eslint-disable-next-line lit/no-native-attributes
|
|
40
|
+
role: { type: String, attribute: 'role' }
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
static styles = [super.styles, css`
|
|
44
|
+
:host {
|
|
45
|
+
--d2l-menu-background-color: var(--d2l-theme-background-color-base);
|
|
46
|
+
--d2l-menu-background-color-hover: var(--d2l-theme-brand-color-highlight);
|
|
47
|
+
--d2l-menu-border-color: var(--d2l-theme-border-color-subtle);
|
|
48
|
+
--d2l-menu-border-color-hover: var(--d2l-theme-border-color-focus);
|
|
49
|
+
--d2l-menu-foreground-color: var(--d2l-theme-text-color-static-standard);
|
|
50
|
+
--d2l-menu-foreground-color-hover: var(--d2l-theme-brand-color-primary-hover);
|
|
51
|
+
--d2l-menu-separator-color: var(--d2l-theme-border-color-emphasized);
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
display: block;
|
|
54
|
+
min-width: 180px;
|
|
55
|
+
padding-top: 1px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
:host([active]) .d2l-menu-items d2l-menu-item-return[role="menuitem"],
|
|
60
|
+
:host([active]) .d2l-menu-items ::slotted([role="menuitem"]),
|
|
61
|
+
:host([active]) .d2l-menu-items ::slotted([role="menuitemcheckbox"]),
|
|
62
|
+
:host([active]) .d2l-menu-items ::slotted([role="menuitemradio"]) {
|
|
63
|
+
position: relative;
|
|
64
|
+
}
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
66
|
+
:host([theme="dark"]) {
|
|
67
|
+
--d2l-menu-background-color: #333536; /* tungsten @ 70% */
|
|
68
|
+
--d2l-menu-background-color-hover: #123559; /* celestine-1 @ 50% */
|
|
69
|
+
--d2l-menu-border-color: var(--d2l-color-tungsten);
|
|
70
|
+
--d2l-menu-border-color-hover: #ffffff;
|
|
71
|
+
--d2l-menu-foreground-color: var(--d2l-color-sylvite);
|
|
72
|
+
--d2l-menu-foreground-color-hover: #ffffff;
|
|
73
|
+
--d2l-menu-separator-color: var(--d2l-color-galena);
|
|
74
|
+
--d2l-icon-fill-color: var(--d2l-color-mica);
|
|
75
|
+
background-color: var(--d2l-menu-background-color); /* so that opacity on disabled items works */
|
|
76
|
+
}
|
|
77
|
+
`];
|
|
82
78
|
|
|
83
79
|
constructor() {
|
|
84
80
|
super();
|
|
@@ -9,8 +9,8 @@ import { meterStyles } from './meter-styles.js';
|
|
|
9
9
|
* A circular progress indicator.
|
|
10
10
|
*/
|
|
11
11
|
class MeterCircle extends MeterMixin(LitElement) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
static styles = [bodySmallStyles, bodyStandardStyles, meterStyles, css`
|
|
14
14
|
:host {
|
|
15
15
|
display: inline-block;
|
|
16
16
|
width: 2.4rem;
|
|
@@ -25,8 +25,7 @@ class MeterCircle extends MeterMixin(LitElement) {
|
|
|
25
25
|
.d2l-meter-circle-text {
|
|
26
26
|
font-size: 0.55rem;
|
|
27
27
|
}
|
|
28
|
-
`
|
|
29
|
-
}
|
|
28
|
+
`];
|
|
30
29
|
|
|
31
30
|
render() {
|
|
32
31
|
const lengthOfLine = 21 * Math.PI * 2; // approximation perimeter of circle
|
|
@@ -7,94 +7,92 @@ import { MeterMixin } from './meter-mixin.js';
|
|
|
7
7
|
* A horizontal progress bar.
|
|
8
8
|
*/
|
|
9
9
|
class MeterLinear extends MeterMixin(LitElement) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
`];
|
|
97
|
-
}
|
|
10
|
+
|
|
11
|
+
static properties = {
|
|
12
|
+
/**
|
|
13
|
+
* Keeps the meter to a single line
|
|
14
|
+
* @type {boolean}
|
|
15
|
+
*/
|
|
16
|
+
textInline: { type: Boolean, attribute: 'text-inline', reflect: true },
|
|
17
|
+
/**
|
|
18
|
+
* Force text to be aligned to the end of the meter
|
|
19
|
+
* @type {boolean}
|
|
20
|
+
*/
|
|
21
|
+
textAlignEnd: { type: Boolean, attribute: 'text-align-end', reflect: true }
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
static styles = [bodySmallStyles, css`
|
|
25
|
+
:host {
|
|
26
|
+
display: block;
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host > div {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: 0.45rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([text-inline]) > div {
|
|
37
|
+
align-items: center;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.d2l-meter-linear-full-bar,
|
|
42
|
+
.d2l-meter-linear-inner-bar {
|
|
43
|
+
border-radius: 0.225rem;
|
|
44
|
+
flex-grow: 1;
|
|
45
|
+
flex-shrink: 1;
|
|
46
|
+
height: 0.45rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.d2l-meter-linear-full-bar {
|
|
50
|
+
background-color: var(--d2l-color-gypsum);
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([foreground-light]) .d2l-meter-linear-full-bar {
|
|
55
|
+
background-color: rgba(255, 255, 255, 0.5);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.d2l-meter-linear-inner-bar {
|
|
59
|
+
background-color: var(--d2l-color-celestine);
|
|
60
|
+
inset-inline-start: 0;
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
}
|
|
65
|
+
:host([foreground-light]) .d2l-meter-linear-inner-bar {
|
|
66
|
+
background-color: white;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.d2l-meter-linear-text {
|
|
70
|
+
color: var(--d2l-color-ferrite);
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
gap: 0.45rem;
|
|
74
|
+
line-height: 1em;
|
|
75
|
+
width: 100%;
|
|
76
|
+
}
|
|
77
|
+
:host([foreground-light]) .d2l-meter-linear-text {
|
|
78
|
+
color: white;
|
|
79
|
+
}
|
|
80
|
+
:host([text-inline]) .d2l-meter-linear-text {
|
|
81
|
+
width: auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.d2l-meter-linear-text-space-between {
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.d2l-meter-linear-secondary {
|
|
89
|
+
align-self: flex-end;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.d2l-meter-linear-primary-ltr {
|
|
93
|
+
direction: ltr;
|
|
94
|
+
}
|
|
95
|
+
`];
|
|
98
96
|
|
|
99
97
|
constructor() {
|
|
100
98
|
super();
|
|
@@ -3,42 +3,40 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
|
3
3
|
|
|
4
4
|
export const MeterMixin = superclass => class extends LocalizeCoreElement(superclass) {
|
|
5
5
|
|
|
6
|
-
static
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
}
|
|
6
|
+
static properties = {
|
|
7
|
+
/**
|
|
8
|
+
* Max number of units that are being measured by this meter.
|
|
9
|
+
* Valid values: A number > 0
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
max: { type: Number },
|
|
13
|
+
/**
|
|
14
|
+
* Shows a percentage instead of "value/max"
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
*/
|
|
17
|
+
percent: { type: Boolean },
|
|
18
|
+
/**
|
|
19
|
+
* Rounding mode for percentage text values
|
|
20
|
+
* @type {"round" | "ceil" | "floor"}
|
|
21
|
+
*/
|
|
22
|
+
percentRoundingMode: { type: String, attribute: 'percent-rounding-mode' },
|
|
23
|
+
/**
|
|
24
|
+
* Context information for the meter. If the text contains {%} or {x/y}, they will be replaced with a percentage or fraction respectively.
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
text: { type: String },
|
|
28
|
+
/**
|
|
29
|
+
* Hides the text visually
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
*/
|
|
32
|
+
textHidden: { type: Boolean, attribute: 'text-hidden' },
|
|
33
|
+
/**
|
|
34
|
+
* REQUIRED: Current number of completed units.
|
|
35
|
+
* Valid values: A number between 0 and max
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
value: { type: Number }
|
|
39
|
+
};
|
|
42
40
|
|
|
43
41
|
constructor() {
|
|
44
42
|
super();
|
|
@@ -9,8 +9,8 @@ import { meterStyles } from './meter-styles.js';
|
|
|
9
9
|
* A half-circle progress indicator.
|
|
10
10
|
*/
|
|
11
11
|
class MeterRadial extends MeterMixin(LitElement) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
static styles = [heading4Styles, bodySmallStyles, meterStyles, css`
|
|
14
14
|
:host {
|
|
15
15
|
display: inline-block;
|
|
16
16
|
width: 4.2rem;
|
|
@@ -19,8 +19,7 @@ class MeterRadial extends MeterMixin(LitElement) {
|
|
|
19
19
|
.d2l-meter-progress-bar {
|
|
20
20
|
stroke-width: 9;
|
|
21
21
|
}
|
|
22
|
-
`
|
|
23
|
-
}
|
|
22
|
+
`];
|
|
24
23
|
|
|
25
24
|
render() {
|
|
26
25
|
const lengthOfLine = 115; // found by approximating half the perimeter of the ellipse with radii 38 and 35
|
|
@@ -17,71 +17,67 @@ const transitionDur = matchMedia('(prefers-reduced-motion: reduce)').matches ? 0
|
|
|
17
17
|
*/
|
|
18
18
|
class MoreLess extends LocalizeCoreElement(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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
:host {
|
|
53
|
-
display: flow-root;
|
|
54
|
-
}
|
|
20
|
+
static properties = {
|
|
21
|
+
/**
|
|
22
|
+
* Indicates whether element is in "more" state
|
|
23
|
+
* @type {boolean}
|
|
24
|
+
*/
|
|
25
|
+
expanded: { type: Boolean, reflect: true },
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Aligns the leading edge of more/less button text if value is set to "text" for left-aligned layouts, the trailing edge of text if value is set to "text-end" for right-aligned layouts
|
|
29
|
+
* @type {'text'|'text-end'|''}
|
|
30
|
+
*/
|
|
31
|
+
hAlign: { type: String, attribute: 'h-align' },
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The maximum height of the content when in "less" state
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
37
|
+
height: { type: String },
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Whether the component is active or inactive
|
|
41
|
+
* @type {boolean}
|
|
42
|
+
*/
|
|
43
|
+
inactive: { type: Boolean, reflect: true },
|
|
44
|
+
__maxHeight: { state: true },
|
|
45
|
+
__transitionAdded: { state: true }
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
static styles = css`
|
|
49
|
+
:host {
|
|
50
|
+
display: flow-root;
|
|
51
|
+
}
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
53
|
+
.d2l-more-less-content {
|
|
54
|
+
display: flow-root;
|
|
55
|
+
margin: -1em -1em 0;
|
|
56
|
+
padding: 1em 1em 0;
|
|
57
|
+
${overflowHiddenDeclarations}
|
|
58
|
+
}
|
|
59
|
+
.d2l-more-less-transition {
|
|
60
|
+
transition: max-height ${transitionDur}ms cubic-bezier(0, 0.7, 0.5, 1);
|
|
61
|
+
}
|
|
62
|
+
:host(:not([expanded]):not([inactive])) .d2l-more-less-content {
|
|
63
|
+
-webkit-mask-image: linear-gradient(to top, transparent, #000000 1em);
|
|
64
|
+
mask-image: linear-gradient(to top, transparent, #000000 1em);
|
|
65
|
+
}
|
|
66
|
+
:host([inactive]) .d2l-more-less-toggle {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
.force-margin-scroll {
|
|
71
|
+
height: 1px;
|
|
72
|
+
margin-top: -1px;
|
|
73
|
+
}
|
|
77
74
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
75
|
+
@media (prefers-reduced-motion: reduce) {
|
|
76
|
+
.d2l-more-less-transition {
|
|
77
|
+
transition: none;
|
|
82
78
|
}
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
85
81
|
|
|
86
82
|
constructor() {
|
|
87
83
|
super();
|
|
@@ -9,25 +9,24 @@ import { ObjectPropertyListItem } from './object-property-list-item.js';
|
|
|
9
9
|
* rendered as a link and with an optional icon.
|
|
10
10
|
*/
|
|
11
11
|
class ObjectPropertyListItemLink extends FocusMixin(ObjectPropertyListItem) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
12
|
+
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* Download a URL instead of navigating to it
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
download: { type: Boolean },
|
|
19
|
+
/**
|
|
20
|
+
* REQUIRED: URL or URL fragment of the link
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
href: { type: String },
|
|
24
|
+
/**
|
|
25
|
+
* Where to display the linked URL
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
target: { type: String },
|
|
29
|
+
};
|
|
31
30
|
|
|
32
31
|
static get focusElementSelector() {
|
|
33
32
|
return 'd2l-link';
|
|
@@ -11,15 +11,14 @@ import { ObjectPropertyListItem } from './object-property-list-item.js';
|
|
|
11
11
|
* @slot icon - Optional slot for a custom icon
|
|
12
12
|
*/
|
|
13
13
|
class ObjectPropertyListItemTooltipHelp extends FocusMixin(ObjectPropertyListItem) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
14
|
+
|
|
15
|
+
static properties = {
|
|
16
|
+
/**
|
|
17
|
+
* Preset icon key (e.g. "tier1:gear")
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
icon: { type: String, reflect: true, },
|
|
21
|
+
};
|
|
23
22
|
|
|
24
23
|
static get focusElementSelector() {
|
|
25
24
|
return 'd2l-tooltip-help';
|