@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.
Files changed (113) 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-select-styles.js +30 -25
  88. package/components/inputs/input-text.js +245 -251
  89. package/components/inputs/input-textarea.js +128 -132
  90. package/components/inputs/input-time-range.js +100 -104
  91. package/components/inputs/input-time.js +107 -113
  92. package/components/link/link-mixin.js +37 -41
  93. package/components/link/link.js +113 -119
  94. package/components/list/list-controls.js +25 -29
  95. package/components/list/list-item-button-mixin.js +10 -12
  96. package/components/list/list-item-checkbox-mixin.js +35 -37
  97. package/components/list/list-item-content.js +33 -35
  98. package/components/list/list-item-drag-drop-mixin.js +45 -47
  99. package/components/list/list-item-drag-handle.js +80 -84
  100. package/components/list/list-item-drag-image.js +77 -81
  101. package/components/list/list-item-expand-collapse-mixin.js +17 -19
  102. package/components/list/list-item-generic-layout.js +222 -226
  103. package/components/list/list-item-link-mixin.js +10 -12
  104. package/components/list/list-item-mixin.js +68 -70
  105. package/components/list/list-item-nav-mixin.js +17 -19
  106. package/components/list/list-item-placement-marker.js +65 -67
  107. package/components/list/list-item-role-mixin.js +9 -11
  108. package/components/list/list-item.js +7 -9
  109. package/components/list/list.js +121 -125
  110. package/components/loading-spinner/loading-spinner.js +93 -97
  111. package/custom-elements.json +1920 -6694
  112. package/helpers/focus.js +5 -1
  113. package/package.json +3 -2
@@ -38,119 +38,115 @@ let ALERT_HAS_HOVER = false; // if this alert or sibling alert is hovered on
38
38
  */
39
39
  class AlertToast extends LitElement {
40
40
 
41
- static get properties() {
42
- return {
43
- /**
44
- * Text that is displayed within the alert's action button. If no text is provided the button is not displayed.
45
- * @type {string}
46
- */
47
- buttonText: { type: String, attribute: 'button-text' },
48
-
49
- /**
50
- * Hide the close button to prevent users from manually closing the alert
51
- * @type {boolean}
52
- */
53
- hideCloseButton: { type: Boolean, attribute: 'hide-close-button' },
54
-
55
- /**
56
- * Prevents the alert from automatically closing 4 seconds after opening
57
- * @type {boolean}
58
- */
59
- noAutoClose: { type: Boolean, attribute: 'no-auto-close' },
60
-
61
- /**
62
- * Open or close the toast alert
63
- * @type {boolean}
64
- */
65
- open: { type: Boolean, reflect: true },
66
-
67
- /**
68
- * The text that is displayed below the main alert message
69
- * @type {string}
70
- */
71
- subtext: { type: String },
72
-
73
- /**
74
- * Type of the alert being displayed
75
- * @type {'default'|'critical'|'success'|'warning'}
76
- * @default "default"
77
- */
78
- type: { type: String, reflect: true },
79
- _closeClicked: { state: true },
80
- _numAlertsBelow: { state: true },
81
- _smallWidth: { state: true },
82
- _state: { type: String },
83
- _totalSiblingHeightBelow: { state: true }
84
- };
85
- }
41
+ static properties = {
42
+ /**
43
+ * Text that is displayed within the alert's action button. If no text is provided the button is not displayed.
44
+ * @type {string}
45
+ */
46
+ buttonText: { type: String, attribute: 'button-text' },
86
47
 
87
- static get styles() {
88
- return css`
89
- :host {
90
- display: block;
91
- }
48
+ /**
49
+ * Hide the close button to prevent users from manually closing the alert
50
+ * @type {boolean}
51
+ */
52
+ hideCloseButton: { type: Boolean, attribute: 'hide-close-button' },
92
53
 
93
- .d2l-alert-toast-container {
94
- border-radius: 0.3rem;
95
- box-shadow: 0 0.1rem 0.6rem 0 rgba(0, 0, 0, 0.1);
96
- display: none;
97
- left: 0;
98
- margin: 0 auto 1.5rem;
99
- max-width: 600px;
100
- position: fixed;
101
- right: 0;
102
- width: 100%;
103
- z-index: 10000;
104
- }
54
+ /**
55
+ * Prevents the alert from automatically closing 4 seconds after opening
56
+ * @type {boolean}
57
+ */
58
+ noAutoClose: { type: Boolean, attribute: 'no-auto-close' },
105
59
 
106
- .d2l-alert-toast-container:not([data-state="closed"]) {
107
- display: block;
108
- }
60
+ /**
61
+ * Open or close the toast alert
62
+ * @type {boolean}
63
+ */
64
+ open: { type: Boolean, reflect: true },
109
65
 
110
- .d2l-alert-toast-container[data-state="opening"],
111
- .d2l-alert-toast-container.d2l-alert-toast-container-lowest[data-state="closing"] {
112
- transition-duration: 600ms;
113
- transition-property: opacity, transform;
114
- transition-timing-function: ease;
115
- }
116
- .d2l-alert-toast-container[data-state="closing"] {
117
- transition: opacity 200ms ease;
118
- }
66
+ /**
67
+ * The text that is displayed below the main alert message
68
+ * @type {string}
69
+ */
70
+ subtext: { type: String },
119
71
 
120
- .d2l-alert-toast-container.d2l-alert-toast-container-close-clicked[data-state="closing"] {
121
- transition-duration: 200ms;
122
- }
72
+ /**
73
+ * Type of the alert being displayed
74
+ * @type {'default'|'critical'|'success'|'warning'}
75
+ * @default "default"
76
+ */
77
+ type: { type: String, reflect: true },
78
+ _closeClicked: { state: true },
79
+ _numAlertsBelow: { state: true },
80
+ _smallWidth: { state: true },
81
+ _state: { type: String },
82
+ _totalSiblingHeightBelow: { state: true }
83
+ };
84
+
85
+ static styles = css`
86
+ :host {
87
+ display: block;
88
+ }
123
89
 
124
- .d2l-alert-toast-container[data-state="preopening"],
125
- .d2l-alert-toast-container[data-state="closing"] {
126
- opacity: 0;
127
- }
128
- .d2l-alert-toast-container[data-state="preopening"],
129
- .d2l-alert-toast-container.d2l-alert-toast-container-lowest[data-state="closing"] {
130
- transform: translateY(calc(100% + 1.5rem));
131
- }
90
+ .d2l-alert-toast-container {
91
+ border-radius: 0.3rem;
92
+ box-shadow: 0 0.1rem 0.6rem 0 rgba(0, 0, 0, 0.1);
93
+ display: none;
94
+ left: 0;
95
+ margin: 0 auto 1.5rem;
96
+ max-width: 600px;
97
+ position: fixed;
98
+ right: 0;
99
+ width: 100%;
100
+ z-index: 10000;
101
+ }
132
102
 
133
- .d2l-alert-toast-container[data-state="opening"] {
134
- opacity: 1;
135
- transform: translateY(0);
136
- }
103
+ .d2l-alert-toast-container:not([data-state="closed"]) {
104
+ display: block;
105
+ }
137
106
 
138
- .d2l-alert-toast-container[data-state="sliding"] {
139
- transition: bottom 600ms ease;
140
- }
107
+ .d2l-alert-toast-container[data-state="opening"],
108
+ .d2l-alert-toast-container.d2l-alert-toast-container-lowest[data-state="closing"] {
109
+ transition-duration: 600ms;
110
+ transition-property: opacity, transform;
111
+ transition-timing-function: ease;
112
+ }
113
+ .d2l-alert-toast-container[data-state="closing"] {
114
+ transition: opacity 200ms ease;
115
+ }
141
116
 
142
- d2l-alert {
143
- animation: none;
144
- }
117
+ .d2l-alert-toast-container.d2l-alert-toast-container-close-clicked[data-state="closing"] {
118
+ transition-duration: 200ms;
119
+ }
145
120
 
146
- @media (max-width: 615px) {
147
- .d2l-alert-toast-container {
148
- margin-bottom: 12px;
149
- width: calc(100% - 16px);
150
- }
121
+ .d2l-alert-toast-container[data-state="preopening"],
122
+ .d2l-alert-toast-container[data-state="closing"] {
123
+ opacity: 0;
124
+ }
125
+ .d2l-alert-toast-container[data-state="preopening"],
126
+ .d2l-alert-toast-container.d2l-alert-toast-container-lowest[data-state="closing"] {
127
+ transform: translateY(calc(100% + 1.5rem));
128
+ }
129
+
130
+ .d2l-alert-toast-container[data-state="opening"] {
131
+ opacity: 1;
132
+ transform: translateY(0);
133
+ }
134
+
135
+ .d2l-alert-toast-container[data-state="sliding"] {
136
+ transition: bottom 600ms ease;
137
+ }
138
+
139
+ d2l-alert {
140
+ animation: none;
141
+ }
142
+
143
+ @media (max-width: 615px) {
144
+ .d2l-alert-toast-container {
145
+ margin-bottom: 12px;
146
+ width: calc(100% - 16px);
151
147
  }
152
- `;
153
- }
148
+ }
149
+ `;
154
150
 
155
151
  constructor() {
156
152
  super();
@@ -14,134 +14,130 @@ import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
14
14
  */
15
15
  class Alert extends LocalizeCoreElement(LitElement) {
16
16
 
17
- static get properties() {
18
- return {
19
- /**
20
- * Text that is displayed within the alert's action button. If no text is provided the button is not displayed.
21
- * @type {string}
22
- */
23
- buttonText: { type: String, attribute: 'button-text' },
24
-
25
- /**
26
- * Gives the alert a close button that will close the alert when clicked
27
- * @type {boolean}
28
- */
29
- hasCloseButton: { type: Boolean, attribute: 'has-close-button' },
30
-
31
- /**
32
- * Opt out of default padding/whitespace around the alert
33
- * @type {boolean}
34
- */
35
- noPadding: { type: Boolean, attribute: 'no-padding', reflect: true },
36
-
37
- /**
38
- * The text that is displayed below the main alert message
39
- * @type {string}
40
- */
41
- subtext: { type: String },
42
-
43
- /**
44
- * Type of the alert being displayed
45
- * @type {'default'|'critical'|'success'|'warning'}
46
- */
47
- type: { type: String, reflect: true }
48
- };
49
- }
50
- static get styles() {
51
- return [bodyCompactStyles, bodyStandardStyles, css`
17
+ static properties = {
18
+ /**
19
+ * Text that is displayed within the alert's action button. If no text is provided the button is not displayed.
20
+ * @type {string}
21
+ */
22
+ buttonText: { type: String, attribute: 'button-text' },
23
+
24
+ /**
25
+ * Gives the alert a close button that will close the alert when clicked
26
+ * @type {boolean}
27
+ */
28
+ hasCloseButton: { type: Boolean, attribute: 'has-close-button' },
29
+
30
+ /**
31
+ * Opt out of default padding/whitespace around the alert
32
+ * @type {boolean}
33
+ */
34
+ noPadding: { type: Boolean, attribute: 'no-padding', reflect: true },
35
+
36
+ /**
37
+ * The text that is displayed below the main alert message
38
+ * @type {string}
39
+ */
40
+ subtext: { type: String },
41
+
42
+ /**
43
+ * Type of the alert being displayed
44
+ * @type {'default'|'critical'|'success'|'warning'}
45
+ */
46
+ type: { type: String, reflect: true }
47
+ };
48
+ static styles = [bodyCompactStyles, bodyStandardStyles, css`
49
+
50
+ :host {
51
+ animation: 600ms ease drop-in;
52
+ background: var(--d2l-theme-background-color-base);
53
+ border: 1px solid var(--d2l-theme-border-color-standard);
54
+ border-inline-start-width: 0.3rem;
55
+ border-radius: 0.3rem;
56
+ box-sizing: border-box;
57
+ display: flex;
58
+ flex: 1;
59
+ max-width: 710px;
60
+ position: relative;
61
+ width: 100%;
62
+ }
52
63
 
53
- :host {
54
- animation: 600ms ease drop-in;
55
- background: var(--d2l-theme-background-color-base);
56
- border: 1px solid var(--d2l-theme-border-color-standard);
57
- border-inline-start-width: 0.3rem;
58
- border-radius: 0.3rem;
59
- box-sizing: border-box;
60
- display: flex;
61
- flex: 1;
62
- max-width: 710px;
63
- position: relative;
64
- width: 100%;
65
- }
64
+ :host([hidden]) {
65
+ display: none;
66
+ }
66
67
 
67
- :host([hidden]) {
68
- display: none;
69
- }
68
+ :host([type="critical"]),
69
+ :host([type="error"]) {
70
+ border-inline-start-color: var(--d2l-theme-status-color-error);
71
+ }
72
+ :host([type="warning"]) {
73
+ border-inline-start-color: var(--d2l-theme-status-color-warning);
74
+ }
75
+ :host([type="default"]),
76
+ :host([type="call-to-action"]) {
77
+ border-inline-start-color: var(--d2l-theme-status-color-default);
78
+ }
79
+ :host([type="success"]) {
80
+ border-inline-start-color: var(--d2l-theme-status-color-success);
81
+ }
70
82
 
71
- :host([type="critical"]),
72
- :host([type="error"]) {
73
- border-inline-start-color: var(--d2l-theme-status-color-error);
74
- }
75
- :host([type="warning"]) {
76
- border-inline-start-color: var(--d2l-theme-status-color-warning);
77
- }
78
- :host([type="default"]),
79
- :host([type="call-to-action"]) {
80
- border-inline-start-color: var(--d2l-theme-status-color-default);
81
- }
82
- :host([type="success"]) {
83
- border-inline-start-color: var(--d2l-theme-status-color-success);
84
- }
83
+ .d2l-alert-text {
84
+ flex: 1;
85
+ padding-block: 0.9rem;
86
+ padding-inline-end: 1.5rem;
87
+ padding-inline-start: 1.2rem;
88
+ position: relative;
89
+ }
90
+ .d2l-alert-text-with-actions {
91
+ padding-inline-end: 0.9rem;
92
+ }
85
93
 
94
+ :host([no-padding]) .d2l-alert-text,
95
+ :host([no-padding]) .d2l-alert-text-with-actions {
96
+ padding-block: 0;
97
+ padding-inline-end: 0;
98
+ padding-inline-start: 0;
99
+ }
100
+
101
+ .d2l-alert-subtext {
102
+ margin: 0.5rem 0 0;
103
+ }
104
+
105
+ .d2l-alert-action {
106
+ margin-block: 0.6rem;
107
+ margin-inline-end: 0.6rem;
108
+ margin-inline-start: 0;
109
+ }
110
+ :host([no-padding]) .d2l-alert-action {
111
+ margin: 0;
112
+ }
113
+
114
+ @media (max-width: 615px) {
86
115
  .d2l-alert-text {
87
116
  flex: 1;
88
- padding-block: 0.9rem;
89
- padding-inline-end: 1.5rem;
90
- padding-inline-start: 1.2rem;
91
117
  position: relative;
92
118
  }
93
- .d2l-alert-text-with-actions {
94
- padding-inline-end: 0.9rem;
95
- }
96
-
97
- :host([no-padding]) .d2l-alert-text,
98
- :host([no-padding]) .d2l-alert-text-with-actions {
99
- padding-block: 0;
100
- padding-inline-end: 0;
101
- padding-inline-start: 0;
102
- }
103
-
104
- .d2l-alert-subtext {
105
- margin: 0.5rem 0 0;
106
- }
107
-
108
119
  .d2l-alert-action {
109
- margin-block: 0.6rem;
110
- margin-inline-end: 0.6rem;
111
- margin-inline-start: 0;
112
- }
113
- :host([no-padding]) .d2l-alert-action {
114
- margin: 0;
120
+ margin: 0.45rem;
115
121
  }
122
+ }
116
123
 
117
- @media (max-width: 615px) {
118
- .d2l-alert-text {
119
- flex: 1;
120
- position: relative;
121
- }
122
- .d2l-alert-action {
123
- margin: 0.45rem;
124
- }
124
+ @keyframes drop-in {
125
+ from {
126
+ opacity: 0;
127
+ transform: translate(0, -10px);
125
128
  }
126
-
127
- @keyframes drop-in {
128
- from {
129
- opacity: 0;
130
- transform: translate(0, -10px);
131
- }
132
- to {
133
- opacity: 1;
134
- transform: translate(0, 0);
135
- }
129
+ to {
130
+ opacity: 1;
131
+ transform: translate(0, 0);
136
132
  }
133
+ }
137
134
 
138
- @media (prefers-reduced-motion: reduce) {
139
- :host {
140
- animation: none;
141
- }
135
+ @media (prefers-reduced-motion: reduce) {
136
+ :host {
137
+ animation: none;
142
138
  }
143
- `];
144
- }
139
+ }
140
+ `];
145
141
 
146
142
  constructor() {
147
143
  super();
@@ -34,25 +34,21 @@ const overlayStyles = css`
34
34
  */
35
35
  class BackdropDirtyOverlay extends LitElement {
36
36
 
37
- static get properties() {
38
- return {
39
- /**
40
- * The text displayed on the dirty state overlay.
41
- * @type {string}
42
- */
43
- description: { type: String, required: true },
37
+ static properties = {
38
+ /**
39
+ * The text displayed on the dirty state overlay.
40
+ * @type {string}
41
+ */
42
+ description: { type: String, required: true },
44
43
 
45
- /**
46
- * The text displayed on the button of the dirty state overlay when the 'dirty' dataState is set.
47
- * @type {string}
48
- */
49
- action: { type: String, required: true }
50
- };
51
- }
44
+ /**
45
+ * The text displayed on the button of the dirty state overlay when the 'dirty' dataState is set.
46
+ * @type {string}
47
+ */
48
+ action: { type: String, required: true }
49
+ };
52
50
 
53
- static get styles() {
54
- return [bodyCompactStyles, overlayStyles, getFocusRingStyles('.d2l-backdrop-dirty-overlay')];
55
- }
51
+ static styles = [bodyCompactStyles, overlayStyles, getFocusRingStyles('.d2l-backdrop-dirty-overlay')];
56
52
 
57
53
  render() {
58
54
  return html`