@brightspace-ui/core 3.267.1 → 3.267.3

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