@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
@@ -9,21 +9,18 @@ import { ifDefined } from 'lit/directives/if-defined.js';
9
9
 
10
10
  class CountBadgeIcon extends FocusMixin(CountBadgeMixin(LitElement)) {
11
11
 
12
- static get properties() {
13
- return {
14
- /**
15
- * REQUIRED: Preset icon key (e.g. "tier1:gear")
16
- * @type {string}
17
- */
18
- icon: {
19
- type: String,
20
- reflect: true
21
- }
22
- };
23
- }
12
+ static properties = {
13
+ /**
14
+ * REQUIRED: Preset icon key (e.g. "tier1:gear")
15
+ * @type {string}
16
+ */
17
+ icon: {
18
+ type: String,
19
+ reflect: true
20
+ }
21
+ };
24
22
 
25
- static get styles() {
26
- return [super.styles, css`
23
+ static styles = [super.styles, css`
27
24
  ${getFocusRingStyles(pseudoClass => `:host([focus-ring]) d2l-icon, d2l-icon:${pseudoClass}`)}
28
25
  :host {
29
26
  display: inline-block;
@@ -52,8 +49,7 @@ class CountBadgeIcon extends FocusMixin(CountBadgeMixin(LitElement)) {
52
49
  border: 2px solid transparent;
53
50
  border-radius: 6px;
54
51
  }
55
- `];
56
- }
52
+ `];
57
53
 
58
54
  constructor() {
59
55
  super();
@@ -12,135 +12,131 @@ const maxBadgeDigits = 5;
12
12
 
13
13
  export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(SkeletonMixin(superclass)) {
14
14
 
15
- static get properties() {
16
- return {
17
- /**
18
- * ACCESSIBILITY: When `true`, changes to the badge will be announced to screen reader users
19
- * @type {boolean}
20
- */
21
- announceChanges: {
22
- type: Boolean,
23
- attribute: 'announce-changes'
24
- },
25
- /**
26
- * Forces the focus ring around the badge
27
- * @type {boolean}
28
- */
29
- forceFocusRing: {
30
- type: Boolean,
31
- attribute: 'focus-ring',
32
- reflect: true
33
- },
34
- /**
35
- * ACCESSIBILITY: Adds a tooltip on the badge, which will be visible on hover and keyboard interaction
36
- * @type {boolean}
37
- */
38
- hasTooltip: {
39
- type: Boolean,
40
- attribute: 'has-tooltip'
41
- },
42
- /**
43
- * Hides the count badge when `number` is zero
44
- * @type {boolean}
45
- */
46
- hideZero: {
47
- type: Boolean,
48
- attribute: 'hide-zero'
49
- },
50
- /**
51
- * Specifies a digit limit, after which numbers are truncated. Defaults to two for "notification" type and five for "count" type.
52
- * @type {number}
53
- */
54
- maxDigits: {
55
- type: Number,
56
- attribute: 'max-digits'
57
- },
58
- /**
59
- * REQUIRED: The number to be displayed on the badge; must be a positive integer
60
- * @type {number}
61
- */
62
- number: {
63
- type: Number,
64
- attribute: 'number'
65
- },
66
- /**
67
- * The size of the badge
68
- * @type {'small'|'large'}
69
- */
70
- size: {
71
- type: String,
72
- reflect: true,
73
- attribute: 'size'
74
- },
75
- /**
76
- * ACCESSIBILITY: Adds a tab stop to the badge, which allows screen reader and keyboard users to easily tab to the badge
77
- * @type {boolean}
78
- */
79
- tabStop: {
80
- type: Boolean,
81
- attribute: 'tab-stop'
82
- },
83
- /**
84
- * ACCESSIBILITY: REQUIRED: Descriptive text for the badge which will act as an accessible label and tooltip text when tooltips are enabled
85
- * @type {string}
86
- */
87
- text: {
88
- type: String
89
- },
90
- /**
91
- * The type of the badge
92
- * @type {'count'|'notification'}
93
- */
94
- type: {
95
- type: String,
96
- reflect: true,
97
- attribute: 'type'
98
- }
99
- };
100
- }
15
+ static properties = {
16
+ /**
17
+ * ACCESSIBILITY: When `true`, changes to the badge will be announced to screen reader users
18
+ * @type {boolean}
19
+ */
20
+ announceChanges: {
21
+ type: Boolean,
22
+ attribute: 'announce-changes'
23
+ },
24
+ /**
25
+ * Forces the focus ring around the badge
26
+ * @type {boolean}
27
+ */
28
+ forceFocusRing: {
29
+ type: Boolean,
30
+ attribute: 'focus-ring',
31
+ reflect: true
32
+ },
33
+ /**
34
+ * ACCESSIBILITY: Adds a tooltip on the badge, which will be visible on hover and keyboard interaction
35
+ * @type {boolean}
36
+ */
37
+ hasTooltip: {
38
+ type: Boolean,
39
+ attribute: 'has-tooltip'
40
+ },
41
+ /**
42
+ * Hides the count badge when `number` is zero
43
+ * @type {boolean}
44
+ */
45
+ hideZero: {
46
+ type: Boolean,
47
+ attribute: 'hide-zero'
48
+ },
49
+ /**
50
+ * Specifies a digit limit, after which numbers are truncated. Defaults to two for "notification" type and five for "count" type.
51
+ * @type {number}
52
+ */
53
+ maxDigits: {
54
+ type: Number,
55
+ attribute: 'max-digits'
56
+ },
57
+ /**
58
+ * REQUIRED: The number to be displayed on the badge; must be a positive integer
59
+ * @type {number}
60
+ */
61
+ number: {
62
+ type: Number,
63
+ attribute: 'number'
64
+ },
65
+ /**
66
+ * The size of the badge
67
+ * @type {'small'|'large'}
68
+ */
69
+ size: {
70
+ type: String,
71
+ reflect: true,
72
+ attribute: 'size'
73
+ },
74
+ /**
75
+ * ACCESSIBILITY: Adds a tab stop to the badge, which allows screen reader and keyboard users to easily tab to the badge
76
+ * @type {boolean}
77
+ */
78
+ tabStop: {
79
+ type: Boolean,
80
+ attribute: 'tab-stop'
81
+ },
82
+ /**
83
+ * ACCESSIBILITY: REQUIRED: Descriptive text for the badge which will act as an accessible label and tooltip text when tooltips are enabled
84
+ * @type {string}
85
+ */
86
+ text: {
87
+ type: String
88
+ },
89
+ /**
90
+ * The type of the badge
91
+ * @type {'count'|'notification'}
92
+ */
93
+ type: {
94
+ type: String,
95
+ reflect: true,
96
+ attribute: 'type'
97
+ }
98
+ };
101
99
 
102
- static get styles() {
103
- return [super.styles, offscreenStyles, css`
104
- :host([hidden]) {
105
- display: none;
106
- }
107
-
108
- :host {
109
- display: inline-block;
110
- min-width: 0.9rem;
111
- }
112
-
113
- .d2l-count-badge-number {
114
- font-weight: bold;
115
- }
116
-
117
- :host([type="notification"]) .d2l-count-badge-number {
118
- background-color: var(--d2l-theme-notification-background-color);
119
- color: var(--d2l-theme-notification-text-color);
120
- }
121
-
122
- :host([type="count"]) .d2l-count-badge-number {
123
- background-color: var(--d2l-count-badge-background-color, var(--d2l-theme-badge-background-color));
124
- color: var(--d2l-count-badge-foreground-color, var(--d2l-theme-badge-text-color));
125
- }
126
-
127
- :host([size="small"]) .d2l-count-badge-number {
128
- border-radius: 0.55rem;
129
- font-size: 0.6rem;
130
- line-height: 0.9rem;
131
- padding-left: 0.3rem;
132
- padding-right: 0.3rem;
133
- }
134
-
135
- :host([size="large"]) .d2l-count-badge-number {
136
- border-radius: 0.7rem;
137
- font-size: 0.8rem;
138
- line-height: 1.2rem;
139
- padding-left: 0.4rem;
140
- padding-right: 0.4rem;
141
- }
142
- `];
143
- }
100
+ static styles = [super.styles, offscreenStyles, css`
101
+ :host([hidden]) {
102
+ display: none;
103
+ }
104
+
105
+ :host {
106
+ display: inline-block;
107
+ min-width: 0.9rem;
108
+ }
109
+
110
+ .d2l-count-badge-number {
111
+ font-weight: bold;
112
+ }
113
+
114
+ :host([type="notification"]) .d2l-count-badge-number {
115
+ background-color: var(--d2l-theme-notification-background-color);
116
+ color: var(--d2l-theme-notification-text-color);
117
+ }
118
+
119
+ :host([type="count"]) .d2l-count-badge-number {
120
+ background-color: var(--d2l-count-badge-background-color, var(--d2l-theme-badge-background-color));
121
+ color: var(--d2l-count-badge-foreground-color, var(--d2l-theme-badge-text-color));
122
+ }
123
+
124
+ :host([size="small"]) .d2l-count-badge-number {
125
+ border-radius: 0.55rem;
126
+ font-size: 0.6rem;
127
+ line-height: 0.9rem;
128
+ padding-left: 0.3rem;
129
+ padding-right: 0.3rem;
130
+ }
131
+
132
+ :host([size="large"]) .d2l-count-badge-number {
133
+ border-radius: 0.7rem;
134
+ font-size: 0.8rem;
135
+ line-height: 1.2rem;
136
+ padding-left: 0.4rem;
137
+ padding-right: 0.4rem;
138
+ }
139
+ `];
144
140
 
145
141
  constructor() {
146
142
  super();
@@ -8,8 +8,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
8
8
 
9
9
  class CountBadge extends FocusMixin(CountBadgeMixin(LitElement)) {
10
10
 
11
- static get styles() {
12
- return [super.styles, css`
11
+ static styles = [super.styles, css`
13
12
  ${getFocusRingStyles(pseudoClass => `:host([focus-ring]) .d2l-count-badge-wrapper, .d2l-count-badge-wrapper:${pseudoClass}`)}
14
13
  .d2l-count-badge-wrapper {
15
14
  --d2l-focus-ring-offset: 0;
@@ -23,8 +22,7 @@ class CountBadge extends FocusMixin(CountBadgeMixin(LitElement)) {
23
22
  :host([size="large"]) .d2l-count-badge-wrapper {
24
23
  border-radius: 0.8rem;
25
24
  }
26
- `];
27
- }
25
+ `];
28
26
 
29
27
  constructor() {
30
28
  super();
@@ -36,38 +36,34 @@ export const descriptionListStyles = [
36
36
  * @slot - Content to wrap
37
37
  */
38
38
  class DescriptionListWrapper extends LitElement {
39
- static get properties() {
40
- return {
41
- /**
42
- * Width for component to use a stacked layout
43
- * @type {number}
44
- */
45
- breakpoint: { type: Number, reflect: true },
46
- /**
47
- * Force the component to always use a stacked layout; will override breakpoint attribute
48
- * @type {boolean}
49
- */
50
- forceStacked: { type: Boolean, reflect: true, attribute: 'force-stacked' },
51
- _stacked: { state: true },
52
- };
53
- }
39
+ static properties = {
40
+ /**
41
+ * Width for component to use a stacked layout
42
+ * @type {number}
43
+ */
44
+ breakpoint: { type: Number, reflect: true },
45
+ /**
46
+ * Force the component to always use a stacked layout; will override breakpoint attribute
47
+ * @type {boolean}
48
+ */
49
+ forceStacked: { type: Boolean, reflect: true, attribute: 'force-stacked' },
50
+ _stacked: { state: true },
51
+ };
54
52
 
55
- static get styles() {
56
- return css`
57
- :host {
58
- display: block;
59
- }
60
- :host([hidden]) {
61
- display: none;
62
- }
63
- .stacked {
64
- --d2l-dl-wrapper-dl-display: block;
65
- --d2l-dl-wrapper-dt-max-width: none;
66
- --d2l-dl-wrapper-dt-margin: 0 0 0.3rem 0;
67
- --d2l-dl-wrapper-dd-margin: 0 0 0.9rem 0;
68
- }
69
- `;
70
- }
53
+ static styles = css`
54
+ :host {
55
+ display: block;
56
+ }
57
+ :host([hidden]) {
58
+ display: none;
59
+ }
60
+ .stacked {
61
+ --d2l-dl-wrapper-dl-display: block;
62
+ --d2l-dl-wrapper-dt-max-width: none;
63
+ --d2l-dl-wrapper-dt-margin: 0 0 0.3rem 0;
64
+ --d2l-dl-wrapper-dd-margin: 0 0 0.9rem 0;
65
+ }
66
+ `;
71
67
 
72
68
  constructor() {
73
69
  super();
@@ -15,79 +15,75 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
15
15
  */
16
16
  class DialogConfirm extends LocalizeCoreElement(DialogMixin(LitElement)) {
17
17
 
18
- static get properties() {
19
- return {
20
- /**
21
- * Whether the dialog should indicate that its message is important to the user
22
- */
23
- critical: { type: Boolean },
24
-
25
- /**
26
- * REQUIRED: The text content for the confirmation dialog. Newline characters (`
` in HTML or `\n` in JavaScript) will render as multiple paragraphs.
27
- * @type {string}
28
- */
29
- text: { type: String }
30
- };
31
- }
18
+ static properties = {
19
+ /**
20
+ * Whether the dialog should indicate that its message is important to the user
21
+ */
22
+ critical: { type: Boolean },
23
+
24
+ /**
25
+ * REQUIRED: The text content for the confirmation dialog. Newline characters (`
` in HTML or `\n` in JavaScript) will render as multiple paragraphs.
26
+ * @type {string}
27
+ */
28
+ text: { type: String }
29
+ };
30
+
31
+ static styles = [_generateResetStyles(':host'), dialogStyles, heading3Styles, css`
32
+
33
+ .d2l-dialog-outer {
34
+ max-width: 420px;
35
+ }
32
36
 
33
- static get styles() {
34
- return [ _generateResetStyles(':host'), dialogStyles, heading3Styles, css`
37
+ .d2l-dialog-header > h2 {
38
+ margin: 0;
39
+ width: fit-content;
40
+ }
35
41
 
36
- .d2l-dialog-outer {
37
- max-width: 420px;
38
- }
42
+ ${getFocusRingStyles(pseudoClass => `.d2l-dialog-content:${pseudoClass} > div`, { extraStyles: css`
39
43
 
40
- .d2l-dialog-header > h2 {
41
- margin: 0;
42
- width: fit-content;
43
- }
44
+ --d2l-focus-ring-offset: -1px; border-radius: 6px;`
45
+ })}
46
+ .d2l-dialog-content:focus,
47
+ .d2l-dialog-content:focus-visible {
48
+ outline: none;
49
+ }
44
50
 
45
- ${getFocusRingStyles(pseudoClass => `.d2l-dialog-content:${pseudoClass} > div`, { extraStyles: css`
51
+ .d2l-dialog-content {
52
+ padding-top: 30px;
53
+ }
46
54
 
47
- --d2l-focus-ring-offset: -1px; border-radius: 6px;`
48
- })}
49
- .d2l-dialog-content:focus,
50
- .d2l-dialog-content:focus-visible {
51
- outline: none;
52
- }
55
+ .d2l-dialog-header + .d2l-dialog-content {
56
+ padding-top: 0;
57
+ }
53
58
 
54
- .d2l-dialog-content {
55
- padding-top: 30px;
56
- }
59
+ .d2l-dialog-content p {
60
+ margin: 1rem 0;
61
+ }
57
62
 
58
- .d2l-dialog-header + .d2l-dialog-content {
59
- padding-top: 0;
60
- }
63
+ .d2l-dialog-content p:first-child {
64
+ margin-top: 0;
65
+ }
61
66
 
62
- .d2l-dialog-content p {
63
- margin: 1rem 0;
64
- }
67
+ .d2l-dialog-content p:last-child {
68
+ margin-bottom: 0;
69
+ }
65
70
 
66
- .d2l-dialog-content p:first-child {
67
- margin-top: 0;
68
- }
71
+ @media (max-width: 615px), (max-height: 420px) and (max-width: 900px) {
69
72
 
70
- .d2l-dialog-content p:last-child {
71
- margin-bottom: 0;
73
+ dialog.d2l-dialog-outer,
74
+ .d2l-dialog-outer {
75
+ bottom: 0;
76
+ margin: auto;
77
+ top: 0;
72
78
  }
73
79
 
74
- @media (max-width: 615px), (max-height: 420px) and (max-width: 900px) {
75
-
76
- dialog.d2l-dialog-outer,
77
- .d2l-dialog-outer {
78
- bottom: 0;
79
- margin: auto;
80
- top: 0;
81
- }
82
-
83
- .d2l-dialog-content {
84
- padding-top: 20px;
85
- }
86
-
80
+ .d2l-dialog-content {
81
+ padding-top: 20px;
87
82
  }
88
83
 
89
- `];
90
- }
84
+ }
85
+
86
+ `];
91
87
 
92
88
  constructor() {
93
89
  super();