@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
|
@@ -51,215 +51,211 @@ const SCROLLBAR_WIDTH = (() => {
|
|
|
51
51
|
|
|
52
52
|
export const PopoverMixin = superclass => class extends superclass {
|
|
53
53
|
|
|
54
|
-
static
|
|
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
|
-
|
|
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
|
-
bottom: 0;
|
|
126
|
-
top: auto;
|
|
127
|
-
}
|
|
54
|
+
static properties = {
|
|
55
|
+
_contentHeight: { state: true },
|
|
56
|
+
_location: { type: String, reflect: true, attribute: '_location' },
|
|
57
|
+
_margin: { state: true },
|
|
58
|
+
_maxHeight: { state: true },
|
|
59
|
+
_maxWidth: { state: true },
|
|
60
|
+
_minHeight: { state: true },
|
|
61
|
+
_minWidth: { state: true },
|
|
62
|
+
_mobile: { type: Boolean, reflect: true, attribute: '_mobile' },
|
|
63
|
+
_mobileBreakpoint: { state: true },
|
|
64
|
+
_mobileTrayLocation: { type: String, reflect: true, attribute: '_mobile-tray-location' },
|
|
65
|
+
_noAutoClose: { state: true },
|
|
66
|
+
_noAutoFit: { state: true },
|
|
67
|
+
_noAutoFocus: { state: true },
|
|
68
|
+
_noPointer: { state: true },
|
|
69
|
+
_offscreen: { type: Boolean, reflect: true, attribute: '_offscreen' },
|
|
70
|
+
_offset: { state: true },
|
|
71
|
+
_opened: { type: Boolean, reflect: true, attribute: '_opened' },
|
|
72
|
+
_pointerPosition: { state: true },
|
|
73
|
+
_position: { state: true },
|
|
74
|
+
_preferredPosition: { state: true },
|
|
75
|
+
_rtl: { state: true },
|
|
76
|
+
_showBackdrop: { state: true },
|
|
77
|
+
_trapFocus: { state: true },
|
|
78
|
+
_useNativePopover: { type: String, reflect: true, attribute: 'popover' },
|
|
79
|
+
_width: { state: true }
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
static styles = css`
|
|
83
|
+
:host {
|
|
84
|
+
--d2l-popover-default-animation-name: d2l-popover-animation;
|
|
85
|
+
--d2l-popover-default-background-color: var(--d2l-theme-background-color-base);
|
|
86
|
+
--d2l-popover-default-border-color: var(--d2l-theme-border-color-standard);
|
|
87
|
+
--d2l-popover-default-border-radius: 0.3rem;
|
|
88
|
+
--d2l-popover-default-foreground-color: var(--d2l-theme-text-color-static-standard);
|
|
89
|
+
--d2l-popover-default-shadow-color: var(--d2l-theme-shadow-floating-color);
|
|
90
|
+
background-color: transparent; /* override popover default */
|
|
91
|
+
border: none; /* override popover */
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
color: var(--d2l-popover-foreground-color, var(--d2l-popover-default-foreground-color));
|
|
94
|
+
display: none;
|
|
95
|
+
height: fit-content; /* normalize popover */
|
|
96
|
+
inset: 0; /* normalize popover */
|
|
97
|
+
margin: 0; /* override popover */
|
|
98
|
+
overflow: visible; /* override popover */
|
|
99
|
+
padding: 0; /* override popover */
|
|
100
|
+
position: fixed; /* normalize popover */
|
|
101
|
+
text-align: start;
|
|
102
|
+
width: fit-content; /* normalize popover */
|
|
103
|
+
}
|
|
104
|
+
:host([theme="dark"]) {
|
|
105
|
+
--d2l-popover-default-animation-name: d2l-popover-animation-dark;
|
|
106
|
+
--d2l-popover-default-background-color: #333536; /* tungsten @ 70% */
|
|
107
|
+
--d2l-popover-default-border-color: var(--d2l-color-tungsten);
|
|
108
|
+
--d2l-popover-default-foreground-color: var(--d2l-color-sylvite);
|
|
109
|
+
--d2l-popover-default-shadow-color: rgba(0, 0, 0, 1);
|
|
110
|
+
opacity: 0.9;
|
|
111
|
+
}
|
|
112
|
+
:host([hidden]) {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
:host(:not([popover])) {
|
|
116
|
+
z-index: 998; /* position on top of floating buttons */
|
|
117
|
+
}
|
|
118
|
+
:host([_opened]) {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
}
|
|
121
|
+
:host([_location="block-start"]) {
|
|
122
|
+
bottom: 0;
|
|
123
|
+
top: auto;
|
|
124
|
+
}
|
|
128
125
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
126
|
+
.content-position {
|
|
127
|
+
display: inline-block;
|
|
128
|
+
position: absolute;
|
|
129
|
+
}
|
|
130
|
+
.content-width {
|
|
131
|
+
background-color: var(--d2l-popover-background-color, var(--d2l-popover-default-background-color));
|
|
132
|
+
border: 1px solid var(--d2l-popover-border-color, var(--d2l-popover-default-border-color));
|
|
133
|
+
border-radius: var(--d2l-popover-border-radius, var(--d2l-popover-default-border-radius));
|
|
134
|
+
box-shadow: var(--d2l-theme-shadow-floating-offset-x) var(--d2l-theme-shadow-floating-offset-y) var(--d2l-theme-shadow-floating-blur-radius) var(--d2l-theme-shadow-floating-spread-radius) var(--d2l-popover-shadow-color, var(--d2l-popover-default-shadow-color));
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
display: flex;
|
|
137
|
+
max-width: 370px;
|
|
138
|
+
min-width: 70px;
|
|
139
|
+
outline: var(--d2l-popover-outline-width, 0) solid var(--d2l-popover-outline-color, transparent);
|
|
140
|
+
width: 100vw;
|
|
141
|
+
}
|
|
142
|
+
.content-container {
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
display: inline-block;
|
|
145
|
+
max-width: 100%;
|
|
146
|
+
min-width: inherit;
|
|
147
|
+
outline: none;
|
|
148
|
+
overflow-y: auto;
|
|
149
|
+
}
|
|
153
150
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
151
|
+
.pointer {
|
|
152
|
+
clip: rect(-5px, 21px, 8px, -7px);
|
|
153
|
+
display: inline-block;
|
|
154
|
+
position: absolute;
|
|
155
|
+
z-index: 1;
|
|
156
|
+
}
|
|
157
|
+
:host([_location="block-start"]) .pointer {
|
|
158
|
+
clip: rect(9px, 21px, 22px, -3px);
|
|
159
|
+
}
|
|
160
|
+
:host([_location="inline-start"]) .pointer,
|
|
161
|
+
:host([_location="inline-end"]) .pointer.pointer-mirror {
|
|
162
|
+
clip: rect(-3px, 21px, 21px, 10px);
|
|
163
|
+
}
|
|
164
|
+
:host([_location="inline-end"]) .pointer,
|
|
165
|
+
:host([_location="inline-start"]) .pointer.pointer-mirror {
|
|
166
|
+
clip: rect(-3px, 8px, 21px, -3px);
|
|
167
|
+
}
|
|
171
168
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
.pointer > div {
|
|
170
|
+
background-color: var(--d2l-popover-background-color, var(--d2l-popover-default-background-color));
|
|
171
|
+
border: 1px solid var(--d2l-popover-border-color, var(--d2l-popover-default-border-color));
|
|
172
|
+
border-radius: 0.1rem;
|
|
173
|
+
box-shadow: -4px -4px 12px -5px var(--d2l-theme-shadow-floating-color);
|
|
174
|
+
height: ${pointerLength}px;
|
|
175
|
+
outline: var(--d2l-popover-outline-width, 0) solid var(--d2l-popover-outline-color, transparent);
|
|
176
|
+
transform: rotate(45deg);
|
|
177
|
+
width: ${pointerLength}px;
|
|
178
|
+
}
|
|
182
179
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
:host([_location="block-start"]) .pointer > div {
|
|
181
|
+
box-shadow: 4px 4px 12px -5px var(--d2l-theme-shadow-floating-color);
|
|
182
|
+
}
|
|
186
183
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
184
|
+
@keyframes d2l-popover-animation {
|
|
185
|
+
0% { opacity: 0; transform: translate(0, -10px); }
|
|
186
|
+
100% { opacity: 1; transform: translate(0, 0); }
|
|
187
|
+
}
|
|
188
|
+
@keyframes d2l-popover-animation-dark {
|
|
189
|
+
0% { opacity: 0; transform: translate(0, -10px); }
|
|
190
|
+
100% { opacity: 0.9; transform: translate(0, 0); }
|
|
191
|
+
}
|
|
192
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
193
|
+
:host([_opened]) {
|
|
194
|
+
animation: var(--d2l-popover-animation-name, var(--d2l-popover-default-animation-name)) 300ms ease;
|
|
199
195
|
}
|
|
196
|
+
}
|
|
200
197
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
198
|
+
:host([_mobile][_mobile-tray-location]) .content-width {
|
|
199
|
+
position: fixed;
|
|
200
|
+
z-index: 1000;
|
|
201
|
+
}
|
|
205
202
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
:host([_mobile][_mobile-tray-location="inline-start"]) .content-width,
|
|
204
|
+
:host([_mobile][_mobile-tray-location="inline-end"]) .content-width {
|
|
205
|
+
inset-block-end: 0;
|
|
206
|
+
inset-block-start: 0;
|
|
207
|
+
}
|
|
211
208
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
209
|
+
:host([_mobile][_mobile-tray-location="inline-start"]) .content-width {
|
|
210
|
+
border-end-start-radius: 0;
|
|
211
|
+
border-start-start-radius: 0;
|
|
212
|
+
}
|
|
216
213
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
:host([_mobile][_mobile-tray-location="inline-end"]) .content-width {
|
|
215
|
+
border-end-end-radius: 0;
|
|
216
|
+
border-start-end-radius: 0;
|
|
217
|
+
}
|
|
221
218
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
:host([_mobile][_mobile-tray-location="block-end"]) .content-width {
|
|
220
|
+
border-end-end-radius: 0;
|
|
221
|
+
border-end-start-radius: 0;
|
|
222
|
+
inset-inline-start: 0;
|
|
223
|
+
}
|
|
227
224
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
:host([_mobile][_mobile-tray-location="inline-end"][opened]) .content-width {
|
|
226
|
+
inset-inline-end: 0;
|
|
227
|
+
}
|
|
231
228
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
229
|
+
:host([_mobile][_mobile-tray-location="inline-start"][opened]) .content-width {
|
|
230
|
+
inset-inline-start: 0;
|
|
231
|
+
}
|
|
235
232
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
:host([_mobile][_mobile-tray-location="block-end"][opened]) .content-width {
|
|
234
|
+
inset-block-end: 0;
|
|
235
|
+
}
|
|
239
236
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
237
|
+
:host([_mobile][_mobile-tray-location="inline-start"][opened]) .content-container,
|
|
238
|
+
:host([_mobile][_mobile-tray-location="inline-end"][opened]) .content-container {
|
|
239
|
+
height: calc(var(--d2l-vh, 1vh) * 100);
|
|
240
|
+
height: 100dvh;
|
|
241
|
+
}
|
|
245
242
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
:host([_mobile][_mobile-tray-location]) > .pointer {
|
|
244
|
+
display: none;
|
|
245
|
+
}
|
|
249
246
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
:host([_mobile][_mobile-tray-location][opened]) {
|
|
248
|
+
animation: none;
|
|
249
|
+
}
|
|
253
250
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
251
|
+
:host([_offscreen]) {
|
|
252
|
+
${_offscreenStyleDeclarations}
|
|
253
|
+
}
|
|
257
254
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
255
|
+
d2l-focus-trap {
|
|
256
|
+
display: block;
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
263
259
|
|
|
264
260
|
constructor() {
|
|
265
261
|
super();
|