@brightspace-ui/core 3.267.1 → 3.268.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/alert-toast.js +98 -102
- package/components/alert/alert.js +109 -113
- package/components/backdrop/backdrop-dirty-overlay.js +13 -17
- package/components/backdrop/backdrop-loading.js +105 -109
- package/components/backdrop/backdrop.js +50 -54
- package/components/breadcrumbs/breadcrumb-current-page.js +19 -23
- package/components/breadcrumbs/breadcrumb.js +50 -54
- package/components/breadcrumbs/breadcrumbs.js +34 -38
- package/components/button/button-add.js +156 -164
- package/components/button/button-copy-mixin.js +9 -11
- package/components/button/button-copy.js +15 -19
- package/components/button/button-icon.js +110 -114
- package/components/button/button-move.js +153 -157
- package/components/button/button-split-item.js +16 -20
- package/components/button/button-split.js +70 -74
- package/components/button/button-subtle-copy.js +17 -19
- package/components/button/button-subtle.js +145 -149
- package/components/button/button-toggle.js +25 -29
- package/components/button/button.js +70 -74
- package/components/button/floating-buttons.js +63 -67
- package/components/calendar/calendar.js +244 -248
- package/components/card/card-content-meta.js +13 -15
- package/components/card/card-content-title.js +9 -11
- package/components/card/card-footer-link.js +76 -80
- package/components/card/card-loading-shimmer.js +35 -39
- package/components/card/card.js +188 -192
- package/components/collapsible-panel/collapsible-panel-group.js +17 -21
- package/components/collapsible-panel/collapsible-panel-summary-item.js +27 -31
- package/components/collapsible-panel/collapsible-panel.js +258 -262
- package/components/count-badge/count-badge-icon.js +12 -16
- package/components/count-badge/count-badge-mixin.js +124 -128
- package/components/count-badge/count-badge.js +2 -4
- package/components/description-list/description-list-wrapper.js +27 -31
- package/components/dialog/dialog-confirm.js +55 -59
- package/components/dialog/dialog-fullscreen.js +128 -132
- package/components/dialog/dialog-mixin.js +39 -41
- package/components/dialog/dialog.js +61 -65
- package/components/dropdown/dropdown-button-subtle.js +21 -25
- package/components/dropdown/dropdown-button.js +31 -35
- package/components/dropdown/dropdown-context-menu.js +28 -31
- package/components/dropdown/dropdown-menu.js +27 -31
- package/components/dropdown/dropdown-more.js +23 -26
- package/components/dropdown/dropdown-opener-mixin.js +44 -46
- package/components/dropdown/dropdown-popover-mixin.js +155 -159
- package/components/dropdown/dropdown-tabs.js +5 -7
- package/components/dropdown/dropdown.js +1 -3
- package/components/empty-state/empty-state-action-button.js +18 -22
- package/components/empty-state/empty-state-action-link.js +14 -18
- package/components/empty-state/empty-state-illustrated.js +21 -25
- package/components/empty-state/empty-state-simple.js +8 -12
- package/components/expand-collapse/expand-collapse-content.js +48 -52
- package/components/filter/filter-dimension-set-date-text-value.js +34 -36
- package/components/filter/filter-dimension-set-date-time-range-value.js +45 -47
- package/components/filter/filter-dimension-set-empty-state.js +17 -19
- package/components/filter/filter-dimension-set-value.js +27 -29
- package/components/filter/filter-dimension-set.js +65 -67
- package/components/filter/filter-overflow-group.js +15 -19
- package/components/filter/filter-tags.js +16 -19
- package/components/filter/filter.js +115 -119
- package/components/focus-trap/focus-trap.js +17 -21
- package/components/form/form-element-mixin.js +33 -35
- package/components/form/form-error-summary.js +37 -42
- package/components/form/form.js +33 -37
- package/components/hierarchical-view/hierarchical-view-mixin.js +76 -80
- package/components/hierarchical-view/hierarchical-view.js +5 -7
- package/components/html-block/html-block.js +45 -49
- package/components/icons/icon-custom.js +20 -24
- package/components/icons/icon.js +20 -24
- package/components/icons/slotted-icon-mixin.js +16 -18
- package/components/inputs/input-checkbox-group.js +34 -38
- package/components/inputs/input-checkbox.js +106 -110
- package/components/inputs/input-color.js +142 -148
- package/components/inputs/input-date-range.js +90 -94
- package/components/inputs/input-date-time-range-to.js +70 -74
- package/components/inputs/input-date-time-range.js +110 -115
- package/components/inputs/input-date-time.js +75 -79
- package/components/inputs/input-date.js +101 -105
- package/components/inputs/input-fieldset.js +37 -43
- package/components/inputs/input-group.js +10 -12
- package/components/inputs/input-inline-help.js +4 -6
- package/components/inputs/input-number.js +112 -118
- package/components/inputs/input-percent.js +52 -58
- package/components/inputs/input-radio-group.js +45 -49
- package/components/inputs/input-radio-spacer.js +11 -13
- package/components/inputs/input-radio.js +62 -66
- package/components/inputs/input-search.js +63 -68
- package/components/inputs/input-select-styles.js +30 -25
- package/components/inputs/input-text.js +245 -251
- package/components/inputs/input-textarea.js +128 -132
- package/components/inputs/input-time-range.js +100 -104
- package/components/inputs/input-time.js +107 -113
- package/components/link/link-mixin.js +37 -41
- package/components/link/link.js +113 -119
- package/components/list/list-controls.js +25 -29
- package/components/list/list-item-button-mixin.js +10 -12
- package/components/list/list-item-checkbox-mixin.js +35 -37
- package/components/list/list-item-content.js +33 -35
- package/components/list/list-item-drag-drop-mixin.js +45 -47
- package/components/list/list-item-drag-handle.js +80 -84
- package/components/list/list-item-drag-image.js +77 -81
- package/components/list/list-item-expand-collapse-mixin.js +17 -19
- package/components/list/list-item-generic-layout.js +222 -226
- package/components/list/list-item-link-mixin.js +10 -12
- package/components/list/list-item-mixin.js +68 -70
- package/components/list/list-item-nav-mixin.js +17 -19
- package/components/list/list-item-placement-marker.js +65 -67
- package/components/list/list-item-role-mixin.js +9 -11
- package/components/list/list-item.js +7 -9
- package/components/list/list.js +121 -125
- package/components/loading-spinner/loading-spinner.js +93 -97
- package/custom-elements.json +1920 -6694
- package/helpers/focus.js +5 -1
- package/package.json +3 -2
|
@@ -22,172 +22,168 @@ const mediaQueryList = window.matchMedia('(max-width: 615px), (max-height: 420px
|
|
|
22
22
|
*/
|
|
23
23
|
class DialogFullscreen extends PropertyRequiredMixin(LocalizeCoreElement(AsyncContainerMixin(DialogMixin(LitElement)))) {
|
|
24
24
|
|
|
25
|
-
static
|
|
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
|
-
|
|
25
|
+
static properties = {
|
|
26
|
+
/**
|
|
27
|
+
* Whether to render a loading-spinner and wait for state changes via AsyncContainerMixin
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
async: { type: Boolean },
|
|
31
|
+
/**
|
|
32
|
+
* Render with no content padding
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
*/
|
|
35
|
+
noPadding: { type: Boolean, reflect: true, attribute: 'no-padding' },
|
|
36
|
+
/**
|
|
37
|
+
* REQUIRED: the title for the dialog
|
|
38
|
+
*/
|
|
39
|
+
titleText: { type: String, attribute: 'title-text', required: true },
|
|
40
|
+
/**
|
|
41
|
+
* The preferred width (unit-less) for the dialog. Minimum 1170 (anything smaller will have no effect).
|
|
42
|
+
*/
|
|
43
|
+
width: { type: Number },
|
|
44
|
+
_autoSize: { state: true }, /* DE52039 This is only redefined here to suppress a lit-analyzer linting issue */
|
|
45
|
+
_hasFooterContent: { state: true },
|
|
46
|
+
_icon: { state: true },
|
|
47
|
+
_headerStyle: { state: true },
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
static styles = [_generateResetStyles(':host'), dialogStyles, heading2Styles, heading3Styles, css`
|
|
51
|
+
|
|
52
|
+
.d2l-dialog-footer.d2l-footer-no-content {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
.d2l-dialog-content-loading {
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
.d2l-dialog-outer {
|
|
61
|
+
max-width: calc(100% - 3rem);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([no-padding]) .d2l-dialog-content {
|
|
65
|
+
--d2l-list-controls-padding: 0px; /* stylelint-disable-line length-zero-no-unit */
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 616px) {
|
|
70
|
+
|
|
71
|
+
.d2l-dialog-header {
|
|
72
|
+
border-bottom: 1px solid var(--d2l-theme-border-color-subtle);
|
|
73
|
+
padding-bottom: 0.9rem;
|
|
74
|
+
padding-top: 1rem;
|
|
57
75
|
}
|
|
58
76
|
|
|
59
|
-
.d2l-dialog-content
|
|
60
|
-
|
|
77
|
+
.d2l-dialog-content > div {
|
|
78
|
+
/* required to properly calculate preferred height when there are bottom
|
|
79
|
+
margins at the end of the slotted content */
|
|
80
|
+
border-bottom: 1px solid transparent;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
height: calc(100% - 1rem);
|
|
83
|
+
padding-top: 1rem;
|
|
61
84
|
}
|
|
62
85
|
|
|
63
|
-
.d2l-dialog-
|
|
64
|
-
|
|
86
|
+
:host([no-padding]) .d2l-dialog-content > div {
|
|
87
|
+
height: 100%;
|
|
88
|
+
padding-top: 0;
|
|
65
89
|
}
|
|
66
90
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
91
|
+
.d2l-dialog-header > div > d2l-button-icon {
|
|
92
|
+
flex: none;
|
|
93
|
+
margin-block: -2px 0;
|
|
94
|
+
margin-inline: 0 -12px;
|
|
70
95
|
}
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
dialog.d2l-dialog-outer,
|
|
98
|
+
div.d2l-dialog-outer {
|
|
99
|
+
animation: d2l-dialog-fullscreen-close 200ms ease-in;
|
|
100
|
+
border-radius: 8px;
|
|
101
|
+
margin: 1.5rem;
|
|
102
|
+
top: 0;
|
|
103
|
+
width: auto;
|
|
104
|
+
}
|
|
73
105
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
106
|
+
@keyframes d2l-dialog-fullscreen-close {
|
|
107
|
+
0% { opacity: 1; transform: translateY(0); }
|
|
108
|
+
100% { opacity: 0; transform: translateY(-50px) scale(0.97); }
|
|
109
|
+
}
|
|
79
110
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
box-sizing: border-box;
|
|
85
|
-
height: calc(100% - 1rem);
|
|
86
|
-
padding-top: 1rem;
|
|
87
|
-
}
|
|
111
|
+
@keyframes d2l-dialog-fullscreen-open {
|
|
112
|
+
0% { opacity: 0; transform: translateY(-50px) scale(0.97); }
|
|
113
|
+
100% { opacity: 1; transform: translateY(0); }
|
|
114
|
+
}
|
|
88
115
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
116
|
+
dialog.d2l-dialog-outer.d2l-dialog-fullscreen-within,
|
|
117
|
+
div.d2l-dialog-outer.d2l-dialog-fullscreen-within {
|
|
118
|
+
/* no margins when there is a fullscreen element within */
|
|
119
|
+
margin: 0;
|
|
120
|
+
}
|
|
93
121
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
122
|
+
:host(:not([in-iframe])) dialog.d2l-dialog-outer,
|
|
123
|
+
:host(:not([in-iframe])) div.d2l-dialog-outer {
|
|
124
|
+
height: calc(100% - 3rem);
|
|
125
|
+
}
|
|
99
126
|
|
|
127
|
+
/* for screens wider than 1170px + 60px margins */
|
|
128
|
+
@media (min-width: 1230px) {
|
|
100
129
|
dialog.d2l-dialog-outer,
|
|
101
130
|
div.d2l-dialog-outer {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
margin:
|
|
105
|
-
top: 0;
|
|
106
|
-
width: auto;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@keyframes d2l-dialog-fullscreen-close {
|
|
110
|
-
0% { opacity: 1; transform: translateY(0); }
|
|
111
|
-
100% { opacity: 0; transform: translateY(-50px) scale(0.97); }
|
|
131
|
+
/* center the dialog */
|
|
132
|
+
margin-left: auto;
|
|
133
|
+
margin-right: auto;
|
|
112
134
|
}
|
|
135
|
+
}
|
|
113
136
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
137
|
+
:host([_state="showing"]) dialog.d2l-dialog-outer,
|
|
138
|
+
:host([_state="showing"]) div.d2l-dialog-outer {
|
|
139
|
+
animation: d2l-dialog-fullscreen-open 400ms ease-out;
|
|
140
|
+
}
|
|
118
141
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
margin: 0;
|
|
123
|
-
}
|
|
142
|
+
:host([_state="showing"]) dialog::backdrop {
|
|
143
|
+
transition-duration: 400ms;
|
|
144
|
+
}
|
|
124
145
|
|
|
125
|
-
|
|
126
|
-
:
|
|
127
|
-
|
|
128
|
-
|
|
146
|
+
.d2l-dialog-footer {
|
|
147
|
+
border-top: 1px solid var(--d2l-theme-border-color-subtle);
|
|
148
|
+
padding-bottom: 0; /* 0.9rem padding included on button */
|
|
149
|
+
padding-top: 0.9rem;
|
|
150
|
+
}
|
|
129
151
|
|
|
130
|
-
|
|
131
|
-
@media (min-width: 1230px) {
|
|
132
|
-
dialog.d2l-dialog-outer,
|
|
133
|
-
div.d2l-dialog-outer {
|
|
134
|
-
/* center the dialog */
|
|
135
|
-
margin-left: auto;
|
|
136
|
-
margin-right: auto;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
152
|
+
@media (prefers-reduced-motion: reduce) {
|
|
139
153
|
|
|
154
|
+
dialog.d2l-dialog-outer,
|
|
155
|
+
div.d2l-dialog-outer,
|
|
140
156
|
:host([_state="showing"]) dialog.d2l-dialog-outer,
|
|
141
157
|
:host([_state="showing"]) div.d2l-dialog-outer {
|
|
142
|
-
animation:
|
|
158
|
+
animation: none;
|
|
143
159
|
}
|
|
144
160
|
|
|
145
|
-
|
|
146
|
-
transition
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.d2l-dialog-footer {
|
|
150
|
-
border-top: 1px solid var(--d2l-theme-border-color-subtle);
|
|
151
|
-
padding-bottom: 0; /* 0.9rem padding included on button */
|
|
152
|
-
padding-top: 0.9rem;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@media (prefers-reduced-motion: reduce) {
|
|
156
|
-
|
|
157
|
-
dialog.d2l-dialog-outer,
|
|
158
|
-
div.d2l-dialog-outer,
|
|
159
|
-
:host([_state="showing"]) dialog.d2l-dialog-outer,
|
|
160
|
-
:host([_state="showing"]) div.d2l-dialog-outer {
|
|
161
|
-
animation: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
dialog::backdrop {
|
|
165
|
-
transition: none;
|
|
166
|
-
}
|
|
161
|
+
dialog::backdrop {
|
|
162
|
+
transition: none;
|
|
167
163
|
}
|
|
168
164
|
}
|
|
165
|
+
}
|
|
169
166
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
.d2l-dialog-header {
|
|
173
|
-
padding-bottom: 15px;
|
|
174
|
-
}
|
|
167
|
+
@media (max-width: 615px), (max-height: 420px) and (max-width: 900px) {
|
|
175
168
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
169
|
+
.d2l-dialog-header {
|
|
170
|
+
padding-bottom: 15px;
|
|
171
|
+
}
|
|
179
172
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
border-bottom: 1px solid transparent;
|
|
184
|
-
/* required to render full height in an i-Frame */
|
|
185
|
-
height: calc(100% - 1px);
|
|
186
|
-
}
|
|
173
|
+
.d2l-dialog-footer.d2l-footer-no-content {
|
|
174
|
+
padding: 0 0 5px 0;
|
|
175
|
+
}
|
|
187
176
|
|
|
177
|
+
.d2l-dialog-content > div {
|
|
178
|
+
/* required to properly calculate preferred height when there are bottom
|
|
179
|
+
margins at the end of the slotted content */
|
|
180
|
+
border-bottom: 1px solid transparent;
|
|
181
|
+
/* required to render full height in an i-Frame */
|
|
182
|
+
height: calc(100% - 1px);
|
|
188
183
|
}
|
|
189
|
-
|
|
190
|
-
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
`];
|
|
191
187
|
|
|
192
188
|
constructor() {
|
|
193
189
|
super();
|
|
@@ -30,47 +30,45 @@ const closeDialogWhenDisconnectedFlag = getFlag('GAUD-10113-close-dialog-when-di
|
|
|
30
30
|
|
|
31
31
|
export const DialogMixin = superclass => class extends superclass {
|
|
32
32
|
|
|
33
|
-
static
|
|
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
|
-
}
|
|
33
|
+
static properties = {
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
focusableContentElemPresent: { state: true },
|
|
38
|
+
/**
|
|
39
|
+
* Whether or not the dialog is open
|
|
40
|
+
*/
|
|
41
|
+
opened: { type: Boolean, reflect: true },
|
|
42
|
+
/**
|
|
43
|
+
* ADVANCED: Opt out of dialog content scrolling
|
|
44
|
+
*/
|
|
45
|
+
noContentScroll: { type: Boolean, attribute: 'no-content-scroll', reflect: true },
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
* Do NOT use this
|
|
49
|
+
*/
|
|
50
|
+
preferNative: { type: Boolean, attribute: 'prefer-native' },
|
|
51
|
+
/**
|
|
52
|
+
* The optional title for the dialog
|
|
53
|
+
*/
|
|
54
|
+
titleText: { type: String, attribute: 'title-text' },
|
|
55
|
+
_autoSize: { state: true },
|
|
56
|
+
_fullscreenWithin: { state: true },
|
|
57
|
+
_height: { state: true },
|
|
58
|
+
_inIframe: { type: Boolean, attribute: 'in-iframe', reflect: true },
|
|
59
|
+
_isFullHeight: { state: true },
|
|
60
|
+
_left: { state: true },
|
|
61
|
+
_margin: { state: true },
|
|
62
|
+
_nestedShowing: { state: true },
|
|
63
|
+
_overflowBottom: { state: true },
|
|
64
|
+
_overflowTop: { state: true },
|
|
65
|
+
_parentDialog: { state: true },
|
|
66
|
+
_scroll: { state: true },
|
|
67
|
+
_state: { type: String, reflect: true },
|
|
68
|
+
_top: { state: true },
|
|
69
|
+
_width: { state: true },
|
|
70
|
+
_useNative: { state: true }
|
|
71
|
+
};
|
|
74
72
|
|
|
75
73
|
constructor() {
|
|
76
74
|
super();
|
|
@@ -22,80 +22,76 @@ const mediaQueryList = window.matchMedia('(max-width: 615px), (max-height: 420px
|
|
|
22
22
|
*/
|
|
23
23
|
class Dialog extends PropertyRequiredMixin(LocalizeCoreElement(AsyncContainerMixin(DialogMixin(LitElement)))) {
|
|
24
24
|
|
|
25
|
-
static
|
|
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
|
-
|
|
25
|
+
static properties = {
|
|
26
|
+
/**
|
|
27
|
+
* Whether to render a loading-spinner and wait for state changes via AsyncContainerMixin
|
|
28
|
+
*/
|
|
29
|
+
async: { type: Boolean },
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Whether the dialog should indicate that its message is important to the user
|
|
33
|
+
*/
|
|
34
|
+
critical: { type: Boolean },
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Causes screen readers to announce the content of the dialog on open. Only use if the content is concise and contains only text since screen readers ignore HTML semantics and some have a ~250 character limit.
|
|
38
|
+
*/
|
|
39
|
+
describeContent: { type: Boolean, attribute: 'describe-content' },
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Whether to render the dialog at the maximum height
|
|
43
|
+
*/
|
|
44
|
+
fullHeight: { type: Boolean, attribute: 'full-height' },
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* REQUIRED: the title for the dialog
|
|
48
|
+
*/
|
|
49
|
+
titleText: { type: String, attribute: 'title-text', required: true },
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The preferred width (unit-less) for the dialog
|
|
53
|
+
*/
|
|
54
|
+
width: { type: Number },
|
|
55
|
+
_hasFooterContent: { type: Boolean, attribute: false }
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
static styles = [_generateResetStyles(':host'), dialogStyles, heading3Styles, css`
|
|
59
|
+
|
|
60
|
+
.d2l-dialog-header,
|
|
61
|
+
:host([critical]) .d2l-dialog-header {
|
|
62
|
+
padding-bottom: 15px;
|
|
63
|
+
}
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
.d2l-dialog-header > div > d2l-button-icon {
|
|
66
|
+
flex: none;
|
|
67
|
+
margin-block: -4px 0;
|
|
68
|
+
margin-inline: 15px -15px;
|
|
69
|
+
}
|
|
62
70
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
.d2l-dialog-content > div {
|
|
72
|
+
/* required to properly calculate preferred height when there are bottom
|
|
73
|
+
margins at the end of the slotted content */
|
|
74
|
+
border-bottom: 1px solid transparent;
|
|
75
|
+
}
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
margin-inline: 15px -15px;
|
|
72
|
-
}
|
|
77
|
+
.d2l-dialog-content-loading {
|
|
78
|
+
text-align: center;
|
|
79
|
+
}
|
|
73
80
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
border-bottom: 1px solid transparent;
|
|
78
|
-
}
|
|
81
|
+
.d2l-dialog-footer.d2l-footer-no-content {
|
|
82
|
+
padding: 0 0 5px 0;
|
|
83
|
+
}
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
text-align: center;
|
|
82
|
-
}
|
|
85
|
+
@media (max-width: 615px), (max-height: 420px) and (max-width: 900px) {
|
|
83
86
|
|
|
84
|
-
.d2l-dialog-
|
|
85
|
-
|
|
87
|
+
.d2l-dialog-header,
|
|
88
|
+
:host([critical]) .d2l-dialog-header {
|
|
89
|
+
padding-bottom: 9px;
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.d2l-dialog-header,
|
|
91
|
-
:host([critical]) .d2l-dialog-header {
|
|
92
|
-
padding-bottom: 9px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
}
|
|
92
|
+
}
|
|
96
93
|
|
|
97
|
-
|
|
98
|
-
}
|
|
94
|
+
`];
|
|
99
95
|
|
|
100
96
|
constructor() {
|
|
101
97
|
super();
|
|
@@ -10,31 +10,27 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
10
10
|
*/
|
|
11
11
|
class DropdownButtonSubtle extends DropdownOpenerMixin(LitElement) {
|
|
12
12
|
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
static get styles() {
|
|
36
|
-
return dropdownOpenerStyles;
|
|
37
|
-
}
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* A description to be added to the opener button for accessibility when text on button does not provide enough context
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
description: { type: String },
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Aligns the leading edge of 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
|
|
22
|
+
* @type {'text'|'text-end'|''}
|
|
23
|
+
*/
|
|
24
|
+
hAlign: { type: String, reflect: true, attribute: 'h-align' },
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* REQUIRED: Text for the button
|
|
28
|
+
* @type {string}
|
|
29
|
+
*/
|
|
30
|
+
text: { type: String }
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
static styles = dropdownOpenerStyles;
|
|
38
34
|
|
|
39
35
|
render() {
|
|
40
36
|
return html`
|
|
@@ -10,43 +10,39 @@ import { dropdownOpenerStyles } from './dropdown-opener-styles.js';
|
|
|
10
10
|
*/
|
|
11
11
|
class DropdownButton extends DropdownOpenerMixin(LitElement) {
|
|
12
12
|
|
|
13
|
-
static
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
13
|
+
static properties = {
|
|
14
|
+
/**
|
|
15
|
+
* Optionally render button as primary button
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
primary: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
reflect: true
|
|
21
|
+
},
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
23
|
+
/**
|
|
24
|
+
* REQUIRED: Text for the button
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
text: {
|
|
28
|
+
type: String
|
|
29
|
+
}
|
|
30
|
+
};
|
|
33
31
|
|
|
34
|
-
static
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`];
|
|
49
|
-
}
|
|
32
|
+
static styles = [dropdownOpenerStyles, css`
|
|
33
|
+
d2l-icon {
|
|
34
|
+
height: 0.8rem;
|
|
35
|
+
margin-inline-start: 0.6rem;
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
width: 0.8rem;
|
|
38
|
+
}
|
|
39
|
+
:host([primary]) d2l-icon {
|
|
40
|
+
color: var(--d2l-theme-text-color-static-inverted);
|
|
41
|
+
}
|
|
42
|
+
d2l-button {
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
`];
|
|
50
46
|
|
|
51
47
|
constructor() {
|
|
52
48
|
super();
|