@brightspace-ui/core 3.268.0 → 3.268.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/helpers/flags.js +7 -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
|
@@ -32,64 +32,60 @@ async function filterAsync(arr, callback) {
|
|
|
32
32
|
|
|
33
33
|
class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitElement))) {
|
|
34
34
|
|
|
35
|
-
static
|
|
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
|
-
visibility: hidden;
|
|
90
|
-
}
|
|
91
|
-
`];
|
|
92
|
-
}
|
|
35
|
+
static properties = {
|
|
36
|
+
/**
|
|
37
|
+
* Enables the option to clear all inner tag list items. The `d2l-tag-list-item-clear` event will be dispatched for each list item when the user selects to Clear All. The consumer must handle the actual item deletion.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
*/
|
|
40
|
+
clearable: { type: Boolean },
|
|
41
|
+
/**
|
|
42
|
+
* ADVANCED: When an item is `clearable`, optionally add a timeout before the focus happens on clear. This is useful if the consumer has some operations that will reload the list items prior to wanting focus to occur.
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
45
|
+
clearFocusTimeout: { type: Number, attribute: 'clear-focus-timeout' },
|
|
46
|
+
/**
|
|
47
|
+
* REQUIRED: A description of the tag list for additional accessibility context
|
|
48
|
+
* @type {string}
|
|
49
|
+
*/
|
|
50
|
+
description: { type: String },
|
|
51
|
+
_chompIndex: { type: Number },
|
|
52
|
+
_contentReady: { type: Boolean },
|
|
53
|
+
_lines: { type: Number },
|
|
54
|
+
_showHiddenTags: { type: Boolean }
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
static styles = [...super.styles, css`
|
|
58
|
+
:host {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
:host([hidden]) {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
.tag-list-container {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
gap: 6px;
|
|
68
|
+
padding: 0;
|
|
69
|
+
}
|
|
70
|
+
::slotted([data-is-chomped]) {
|
|
71
|
+
display: none !important;
|
|
72
|
+
}
|
|
73
|
+
.d2l-tag-list-hidden-button {
|
|
74
|
+
position: absolute;
|
|
75
|
+
visibility: hidden;
|
|
76
|
+
}
|
|
77
|
+
.d2l-tag-list-clear-button {
|
|
78
|
+
position: absolute;
|
|
79
|
+
visibility: hidden;
|
|
80
|
+
}
|
|
81
|
+
.d2l-tag-list-clear-button.d2l-tag-list-clear-button-visible {
|
|
82
|
+
position: static;
|
|
83
|
+
visibility: visible;
|
|
84
|
+
}
|
|
85
|
+
.tag-list-hidden {
|
|
86
|
+
visibility: hidden;
|
|
87
|
+
}
|
|
88
|
+
`];
|
|
93
89
|
|
|
94
90
|
constructor() {
|
|
95
91
|
super();
|
|
@@ -16,79 +16,75 @@ import { SlottedIconMixin } from '../icons/slotted-icon-mixin.js';
|
|
|
16
16
|
*/
|
|
17
17
|
class TooltipHelp extends SlottedIconMixin(SkeletonMixin(FocusMixin(LitElement))) {
|
|
18
18
|
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
}
|
|
19
|
+
static properties = {
|
|
20
|
+
/**
|
|
21
|
+
* Allows this component to inherit certain font properties
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
*/
|
|
24
|
+
inheritFontStyle: { type: Boolean, attribute: 'inherit-font-style' },
|
|
25
|
+
/**
|
|
26
|
+
* ADVANCED: Force the internal tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
|
|
27
|
+
* @type {'top'|'bottom'|'left'|'right'}
|
|
28
|
+
*/
|
|
29
|
+
position: { type: String },
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
showing: { type: Boolean, reflect: true },
|
|
34
|
+
/**
|
|
35
|
+
* REQUIRED: Text that will render as the Help Tooltip opener
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
text: { type: String }
|
|
39
|
+
};
|
|
42
40
|
|
|
43
|
-
static
|
|
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
|
-
}
|
|
41
|
+
static styles = [super.styles, bodySmallStyles, css`
|
|
42
|
+
:host {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
}
|
|
45
|
+
:host([hidden]) {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
#d2l-tooltip-help-text {
|
|
49
|
+
--d2l-focus-ring-offset: 0.05rem;
|
|
50
|
+
align-items: baseline;
|
|
51
|
+
background: none;
|
|
52
|
+
border: none;
|
|
53
|
+
column-gap: 0.3rem;
|
|
54
|
+
cursor: inherit;
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
font-family: inherit;
|
|
57
|
+
padding: 0;
|
|
58
|
+
text-align: start;
|
|
59
|
+
text-decoration-line: underline;
|
|
60
|
+
text-decoration-style: dashed;
|
|
61
|
+
text-decoration-thickness: 1px;
|
|
62
|
+
text-underline-offset: 0.1rem;
|
|
63
|
+
}
|
|
64
|
+
d2l-icon,
|
|
65
|
+
slot[name="icon"]::slotted(d2l-icon-custom) {
|
|
66
|
+
align-self: center;
|
|
67
|
+
}
|
|
71
68
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
69
|
+
${getFocusRingStyles('#d2l-tooltip-help-text', { extraStyles: css`border-radius: 0.05rem; text-underline-offset: 0.1rem;` })}
|
|
70
|
+
:host([inherit-font-style]) #d2l-tooltip-help-text {
|
|
71
|
+
color: inherit;
|
|
72
|
+
font-size: inherit;
|
|
73
|
+
font-weight: inherit;
|
|
74
|
+
letter-spacing: inherit;
|
|
75
|
+
line-height: inherit;
|
|
76
|
+
margin: inherit;
|
|
77
|
+
}
|
|
78
|
+
d2l-tooltip {
|
|
79
|
+
cursor: text;
|
|
80
|
+
}
|
|
81
|
+
:host([skeleton]) #d2l-tooltip-help-text.d2l-skeletize {
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
}
|
|
84
|
+
:host([skeleton]) slot[name="icon"]::slotted(d2l-icon-custom) {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
`];
|
|
92
88
|
|
|
93
89
|
constructor() {
|
|
94
90
|
super();
|
|
@@ -58,115 +58,111 @@ let activeTooltip = null;
|
|
|
58
58
|
*/
|
|
59
59
|
class Tooltip extends PopoverMixin(LitElement) {
|
|
60
60
|
|
|
61
|
-
static
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
61
|
+
static properties = {
|
|
62
|
+
/**
|
|
63
|
+
* Align the tooltip with either the start or end of its target. If not set, the tooltip will attempt be centered.
|
|
64
|
+
* @type {'start'|'end'}
|
|
65
|
+
*/
|
|
66
|
+
align: { type: String, reflect: true },
|
|
67
|
+
/**
|
|
68
|
+
* ADVANCED: Announce the tooltip innerText when applicable (for use with custom elements)
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
*/
|
|
71
|
+
announced: { type: Boolean },
|
|
72
|
+
/**
|
|
73
|
+
* ADVANCED: Causes the tooltip to close when its target is clicked
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
*/
|
|
76
|
+
closeOnClick: { type: Boolean, attribute: 'close-on-click' },
|
|
77
|
+
/**
|
|
78
|
+
* Provide a delay in milliseconds to prevent the tooltip from opening immediately when hovered. This delay will only apply to hover, not focus.
|
|
79
|
+
* @type {number}
|
|
80
|
+
*/
|
|
81
|
+
delay: { type: Number },
|
|
82
|
+
/**
|
|
83
|
+
* ADVANCED: Disables focus lock so the tooltip will automatically close when no longer hovered even if it still has focus
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
*/
|
|
86
|
+
disableFocusLock: { type: Boolean, attribute: 'disable-focus-lock' },
|
|
87
|
+
/**
|
|
88
|
+
* REQUIRED: The "id" of the tooltip's target element. Both elements must be within the same shadow root. If not provided, the tooltip's parent element will be used as its target.
|
|
89
|
+
* @type {string}
|
|
90
|
+
*/
|
|
91
|
+
for: { type: String },
|
|
92
|
+
/**
|
|
93
|
+
* ADVANCED: Force the tooltip to stay open as long as it remains "true"
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
*/
|
|
96
|
+
forceShow: { type: Boolean, attribute: 'force-show' },
|
|
97
|
+
/**
|
|
98
|
+
* ADVANCED: Accessibility type for the tooltip to specify whether it is the primary label for the target or a secondary descriptor.
|
|
99
|
+
* @type {'label'|'descriptor'}
|
|
100
|
+
*/
|
|
101
|
+
forType: { type: String, attribute: 'for-type' },
|
|
102
|
+
/**
|
|
103
|
+
* Adjust the size of the gap between the tooltip and its target (px)
|
|
104
|
+
* @type {number}
|
|
105
|
+
*/
|
|
106
|
+
offset: { type: Number },
|
|
107
|
+
/**
|
|
108
|
+
* ADVANCED: Force the tooltip to open in a certain direction. If no position is provided, the tooltip will open in the first position that has enough space for it in the order: bottom, top, right, left.
|
|
109
|
+
* @type {'top'|'bottom'|'left'|'right'}
|
|
110
|
+
*/
|
|
111
|
+
positionLocation: { type: String, attribute: 'position' },
|
|
112
|
+
/**
|
|
113
|
+
* @ignore
|
|
114
|
+
*/
|
|
115
|
+
showing: { type: Boolean, reflect: true },
|
|
116
|
+
/**
|
|
117
|
+
* ADVANCED: Only show the tooltip if we detect the target element is truncated
|
|
118
|
+
* @type {boolean}
|
|
119
|
+
*/
|
|
120
|
+
showTruncatedOnly: { type: Boolean, attribute: 'show-truncated-only' },
|
|
121
|
+
/**
|
|
122
|
+
* The style of the tooltip based on the type of information it displays
|
|
123
|
+
* @type {'info'|'error'}
|
|
124
|
+
*/
|
|
125
|
+
state: { type: String, reflect: true }
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
static styles = [super.styles, bodySmallStyles, css`
|
|
129
|
+
:host {
|
|
130
|
+
--d2l-tooltip-background-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
|
|
131
|
+
--d2l-tooltip-border-color: var(--d2l-color-ferrite); /* Deprecated, use state attribute instead */
|
|
132
|
+
--d2l-tooltip-outline-color: rgba(255, 255, 255, 0.32);
|
|
133
|
+
--d2l-popover-background-color: var(--d2l-tooltip-background-color);
|
|
134
|
+
--d2l-popover-border-color: var(--d2l-tooltip-border-color);
|
|
135
|
+
--d2l-popover-border-radius: 0.3rem;
|
|
136
|
+
--d2l-popover-outline-color: var(--d2l-tooltip-outline-color);
|
|
137
|
+
--d2l-popover-outline-width: 1px;
|
|
138
|
+
}
|
|
139
|
+
:host([state="error"]) {
|
|
140
|
+
--d2l-tooltip-background-color: var(--d2l-color-cinnabar);
|
|
141
|
+
--d2l-tooltip-border-color: var(--d2l-color-cinnabar);
|
|
142
|
+
}
|
|
143
|
+
.d2l-tooltip-content {
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
color: white;
|
|
146
|
+
max-width: 17.5rem;
|
|
147
|
+
min-height: 1.85rem;
|
|
148
|
+
min-width: 2.1rem;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
overflow-wrap: anywhere;
|
|
151
|
+
padding-block: ${10 - contentBorderSize}px ${11 - contentBorderSize}px;
|
|
152
|
+
padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
|
|
153
|
+
white-space: normal;
|
|
154
|
+
}
|
|
155
|
+
::slotted(ul),
|
|
156
|
+
::slotted(ol) {
|
|
157
|
+
padding-inline-start: 1rem;
|
|
158
|
+
}
|
|
159
|
+
@media (max-width: 615px) {
|
|
146
160
|
.d2l-tooltip-content {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
max-width: 17.5rem;
|
|
150
|
-
min-height: 1.85rem;
|
|
151
|
-
min-width: 2.1rem;
|
|
152
|
-
overflow: hidden;
|
|
153
|
-
overflow-wrap: anywhere;
|
|
154
|
-
padding-block: ${10 - contentBorderSize}px ${11 - contentBorderSize}px;
|
|
155
|
-
padding-inline: ${contentHorizontalPadding - contentBorderSize}px;
|
|
156
|
-
white-space: normal;
|
|
157
|
-
}
|
|
158
|
-
::slotted(ul),
|
|
159
|
-
::slotted(ol) {
|
|
160
|
-
padding-inline-start: 1rem;
|
|
161
|
-
}
|
|
162
|
-
@media (max-width: 615px) {
|
|
163
|
-
.d2l-tooltip-content {
|
|
164
|
-
padding-bottom: ${12 - contentBorderSize}px;
|
|
165
|
-
padding-top: ${12 - contentBorderSize}px;
|
|
166
|
-
}
|
|
161
|
+
padding-bottom: ${12 - contentBorderSize}px;
|
|
162
|
+
padding-top: ${12 - contentBorderSize}px;
|
|
167
163
|
}
|
|
168
|
-
|
|
169
|
-
|
|
164
|
+
}
|
|
165
|
+
`];
|
|
170
166
|
|
|
171
167
|
constructor() {
|
|
172
168
|
super();
|
|
@@ -52,13 +52,11 @@ import { heading2Styles } from '@brightspace-ui/core/components/typography/style
|
|
|
52
52
|
|
|
53
53
|
class MyComponent extends LitElement {
|
|
54
54
|
|
|
55
|
-
static
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
` ];
|
|
61
|
-
}
|
|
55
|
+
static styles = [heading2Styles, css`
|
|
56
|
+
:host {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
}
|
|
59
|
+
`];
|
|
62
60
|
|
|
63
61
|
render() {
|
|
64
62
|
return html `<h1 class="d2l-heading-2"> ... </h1>`;
|
|
@@ -2,12 +2,10 @@ import { isCustomFormElement } from '../form/form-helper.js';
|
|
|
2
2
|
|
|
3
3
|
export const ValidationCustomMixin = superclass => class extends superclass {
|
|
4
4
|
|
|
5
|
-
static
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
}
|
|
5
|
+
static properties = {
|
|
6
|
+
failureText: { type: String, attribute: 'failure-text' },
|
|
7
|
+
for: { type: String }
|
|
8
|
+
};
|
|
11
9
|
|
|
12
10
|
constructor() {
|
|
13
11
|
super();
|
|
@@ -12,57 +12,53 @@ import { PropertyRequiredMixin } from '../../mixins/property-required/property-r
|
|
|
12
12
|
*/
|
|
13
13
|
class ViewSwitcherButton extends PropertyRequiredMixin(FocusMixin(LitElement)) {
|
|
14
14
|
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
}
|
|
15
|
+
static properties = {
|
|
16
|
+
/**
|
|
17
|
+
* REQUIRED: Key for the button
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
key: { type: String, required: true },
|
|
21
|
+
/**
|
|
22
|
+
* REQUIRED: Text for the button
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
text: { type: String, required: true },
|
|
26
|
+
/**
|
|
27
|
+
* Indicates if the item is selected
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
selected: { type: Boolean, reflect: true },
|
|
31
|
+
};
|
|
34
32
|
|
|
35
|
-
static
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
33
|
+
static styles = [labelStyles, buttonStyles, css`
|
|
34
|
+
/* Firefox includes a hidden border which messes up button dimensions */
|
|
35
|
+
button::-moz-focus-inner {
|
|
36
|
+
border: 0;
|
|
37
|
+
}
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
button {
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
border-radius: 0.2rem;
|
|
42
|
+
display: block;
|
|
43
|
+
font-family: inherit;
|
|
44
|
+
min-height: auto;
|
|
45
|
+
padding-block: 0.3rem;
|
|
46
|
+
padding-inline: 1rem;
|
|
47
|
+
}
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
button:hover {
|
|
50
|
+
background-color: var(--d2l-color-mica);
|
|
51
|
+
}
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
button:${unsafeCSS(getFocusPseudoClass())} {
|
|
54
|
+
box-shadow: 0 0 0 2px #ffffff;
|
|
55
|
+
}
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
57
|
+
:host([selected]) button {
|
|
58
|
+
background-color: var(--d2l-color-tungsten);
|
|
59
|
+
color: #ffffff;
|
|
60
|
+
}
|
|
61
|
+
`];
|
|
66
62
|
|
|
67
63
|
constructor() {
|
|
68
64
|
super();
|