@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
@@ -43,85 +43,81 @@ function _getFormattedDefaultTime(defaultValue) {
43
43
  */
44
44
  class InputDateTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
45
45
 
46
- static get properties() {
47
- return {
48
- /**
49
- * Disables the input
50
- * @type {boolean}
51
- */
52
- disabled: { type: Boolean },
53
- /**
54
- * Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
55
- * @type {boolean}
56
- */
57
- labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
58
- /**
59
- * Indicates that localization will be handled by the consumer. `*value` will not be converted from/to UTC.
60
- * @type {boolean}
61
- */
62
- localized: { reflect: true, type: Boolean },
63
- /**
64
- * Maximum valid date/time that could be selected by a user
65
- * @type {string}
66
- */
67
- maxValue: { attribute: 'max-value', reflect: true, type: String },
68
- /**
69
- * Minimum valid date/time that could be selected by a user
70
- * @type {string}
71
- */
72
- minValue: { attribute: 'min-value', reflect: true, type: String },
73
- /**
74
- * Indicates if the date or time dropdown is open
75
- * @type {boolean}
76
- */
77
- opened: { type: Boolean },
78
- /**
79
- * Indicates that a value is required
80
- * @type {boolean}
81
- */
82
- required: { type: Boolean, reflect: true },
83
- /**
84
- * Default value of time input. Accepts times formatted as "hh:mm:ss", and the keywords "startOfDay" and "endOfDay".
85
- * @type {string}
86
- */
87
- timeDefaultValue: { attribute: 'time-default-value', reflect: true, type: String },
88
- /**
89
- * Time zone identifier for the time input to use.
90
- * @type {string}
91
- */
92
- timeZoneId: { type: String, attribute: 'time-zone-id' },
93
- /**
94
- * Hides the time zone inside the time selection dropdown. Should only be used when the time input value is not related to any one time zone
95
- * @type {Boolean}
96
- */
97
- timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
98
- /**
99
- * Value of the input
100
- * @type {string}
101
- */
102
- value: { type: String },
103
- _maxValueLocalized: { type: String },
104
- _minValueLocalized: { type: String }
105
- };
106
- }
107
-
108
- static get styles() {
109
- return [super.styles, css`
110
- :host {
111
- display: inline-block;
112
- }
113
- :host([hidden]) {
114
- display: none;
115
- }
116
- .d2l-input-date-time-container {
117
- margin-top: -0.3rem;
118
- }
119
- d2l-input-date,
120
- d2l-input-time {
121
- margin-top: 0.3rem;
122
- }
123
- `];
124
- }
46
+ static properties = {
47
+ /**
48
+ * Disables the input
49
+ * @type {boolean}
50
+ */
51
+ disabled: { type: Boolean },
52
+ /**
53
+ * Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
54
+ * @type {boolean}
55
+ */
56
+ labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
57
+ /**
58
+ * Indicates that localization will be handled by the consumer. `*value` will not be converted from/to UTC.
59
+ * @type {boolean}
60
+ */
61
+ localized: { reflect: true, type: Boolean },
62
+ /**
63
+ * Maximum valid date/time that could be selected by a user
64
+ * @type {string}
65
+ */
66
+ maxValue: { attribute: 'max-value', reflect: true, type: String },
67
+ /**
68
+ * Minimum valid date/time that could be selected by a user
69
+ * @type {string}
70
+ */
71
+ minValue: { attribute: 'min-value', reflect: true, type: String },
72
+ /**
73
+ * Indicates if the date or time dropdown is open
74
+ * @type {boolean}
75
+ */
76
+ opened: { type: Boolean },
77
+ /**
78
+ * Indicates that a value is required
79
+ * @type {boolean}
80
+ */
81
+ required: { type: Boolean, reflect: true },
82
+ /**
83
+ * Default value of time input. Accepts times formatted as "hh:mm:ss", and the keywords "startOfDay" and "endOfDay".
84
+ * @type {string}
85
+ */
86
+ timeDefaultValue: { attribute: 'time-default-value', reflect: true, type: String },
87
+ /**
88
+ * Time zone identifier for the time input to use.
89
+ * @type {string}
90
+ */
91
+ timeZoneId: { type: String, attribute: 'time-zone-id' },
92
+ /**
93
+ * Hides the time zone inside the time selection dropdown. Should only be used when the time input value is not related to any one time zone
94
+ * @type {Boolean}
95
+ */
96
+ timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
97
+ /**
98
+ * Value of the input
99
+ * @type {string}
100
+ */
101
+ value: { type: String },
102
+ _maxValueLocalized: { type: String },
103
+ _minValueLocalized: { type: String }
104
+ };
105
+
106
+ static styles = [super.styles, css`
107
+ :host {
108
+ display: inline-block;
109
+ }
110
+ :host([hidden]) {
111
+ display: none;
112
+ }
113
+ .d2l-input-date-time-container {
114
+ margin-top: -0.3rem;
115
+ }
116
+ d2l-input-date,
117
+ d2l-input-time {
118
+ margin-top: 0.3rem;
119
+ }
120
+ `];
125
121
 
126
122
  constructor() {
127
123
  super();
@@ -30,111 +30,107 @@ export function formatISODateInUserCalDescriptor(val) {
30
30
  */
31
31
  class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement))))) {
32
32
 
33
- static get properties() {
34
- return {
35
- /**
36
- * Disables the input
37
- * @type {boolean}
38
- */
39
- disabled: { type: Boolean },
40
- /**
41
- * @ignore
42
- * Optionally add a 'Now' button to be used in date-time pickers only.
43
- */
44
- hasNow: { attribute: 'has-now', type: Boolean },
45
- /**
46
- * Hides the label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
47
- * @type {boolean}
48
- */
49
- labelHidden: { type: Boolean, attribute: 'label-hidden' },
50
- /**
51
- * Maximum valid date that could be selected by a user
52
- * @type {string}
53
- */
54
- maxValue: { attribute: 'max-value', reflect: true, type: String },
55
- /**
56
- * Minimum valid date that could be selected by a user
57
- * @type {string}
58
- */
59
- minValue: { attribute: 'min-value', reflect: true, type: String },
60
- /**
61
- * @ignore
62
- * Disables validation of max and min value. The min and max value will still be enforced but the component will not be put into an error state or show an error tooltip.
63
- */
64
- noValidateMinMax: { attribute: 'novalidateminmax', type: Boolean },
65
- /**
66
- * Indicates if the calendar dropdown is open
67
- * @type {boolean}
68
- */
69
- opened: { type: Boolean, reflect: true },
70
- /**
71
- * Indicates that a value is required
72
- * @type {boolean}
73
- */
74
- required: { type: Boolean, reflect: true },
75
- /**
76
- * Value of the input
77
- * @type {string}
78
- */
79
- value: { type: String },
80
- _hiddenContentWidth: { type: String },
81
- _dateTimeDescriptor: { type: Object },
82
- _dropdownFirstOpened: { type: Boolean },
83
- _formattedValue: { type: String },
84
- _inputTextFocusShowTooltip: { type: Boolean },
85
- _showInfoTooltip: { type: Boolean },
86
- _shownValue: { type: String },
87
- _showRevertInstructions: { state: true },
88
- _showRevertTooltip: { state: true }
89
- };
90
- }
91
-
92
- static get styles() {
93
- return [super.styles, css`
94
- :host {
95
- display: inline-block;
96
- width: 100%;
97
- }
98
- :host([hidden]) {
99
- display: none;
100
- }
101
- d2l-dropdown {
102
- width: 100%;
103
- }
104
- d2l-icon {
105
- --d2l-icon-height: 0.8rem;
106
- --d2l-icon-width: 0.8rem;
107
- margin-left: 0.6rem;
108
- margin-right: 0.6rem;
109
- }
110
- :host([disabled]) d2l-icon {
111
- opacity: 0.5;
112
- }
113
- .d2l-input-date-hidden-text {
114
- font-family: inherit;
115
- font-size: 0.8rem;
116
- font-weight: 400;
117
- letter-spacing: 0.02rem;
118
- line-height: 1.4rem;
119
- position: absolute;
120
- visibility: hidden;
121
- width: auto;
122
- }
123
- .d2l-input-date-hidden-text > div {
124
- padding-left: 2rem; /* simulates space taken up by the icon */
125
- }
126
- d2l-calendar {
127
- padding: 0.25rem 0.6rem;
128
- }
129
- .d2l-calendar-slot-buttons {
130
- border-top: 1px solid var(--d2l-color-gypsum);
131
- display: flex;
132
- justify-content: center;
133
- margin-top: 0.3rem;
134
- padding-top: 0.3rem;
135
- }
136
- `];
137
- }
33
+ static properties = {
34
+ /**
35
+ * Disables the input
36
+ * @type {boolean}
37
+ */
38
+ disabled: { type: Boolean },
39
+ /**
40
+ * @ignore
41
+ * Optionally add a 'Now' button to be used in date-time pickers only.
42
+ */
43
+ hasNow: { attribute: 'has-now', type: Boolean },
44
+ /**
45
+ * Hides the label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
46
+ * @type {boolean}
47
+ */
48
+ labelHidden: { type: Boolean, attribute: 'label-hidden' },
49
+ /**
50
+ * Maximum valid date that could be selected by a user
51
+ * @type {string}
52
+ */
53
+ maxValue: { attribute: 'max-value', reflect: true, type: String },
54
+ /**
55
+ * Minimum valid date that could be selected by a user
56
+ * @type {string}
57
+ */
58
+ minValue: { attribute: 'min-value', reflect: true, type: String },
59
+ /**
60
+ * @ignore
61
+ * Disables validation of max and min value. The min and max value will still be enforced but the component will not be put into an error state or show an error tooltip.
62
+ */
63
+ noValidateMinMax: { attribute: 'novalidateminmax', type: Boolean },
64
+ /**
65
+ * Indicates if the calendar dropdown is open
66
+ * @type {boolean}
67
+ */
68
+ opened: { type: Boolean, reflect: true },
69
+ /**
70
+ * Indicates that a value is required
71
+ * @type {boolean}
72
+ */
73
+ required: { type: Boolean, reflect: true },
74
+ /**
75
+ * Value of the input
76
+ * @type {string}
77
+ */
78
+ value: { type: String },
79
+ _hiddenContentWidth: { type: String },
80
+ _dateTimeDescriptor: { type: Object },
81
+ _dropdownFirstOpened: { type: Boolean },
82
+ _formattedValue: { type: String },
83
+ _inputTextFocusShowTooltip: { type: Boolean },
84
+ _showInfoTooltip: { type: Boolean },
85
+ _shownValue: { type: String },
86
+ _showRevertInstructions: { state: true },
87
+ _showRevertTooltip: { state: true }
88
+ };
89
+
90
+ static styles = [super.styles, css`
91
+ :host {
92
+ display: inline-block;
93
+ width: 100%;
94
+ }
95
+ :host([hidden]) {
96
+ display: none;
97
+ }
98
+ d2l-dropdown {
99
+ width: 100%;
100
+ }
101
+ d2l-icon {
102
+ --d2l-icon-height: 0.8rem;
103
+ --d2l-icon-width: 0.8rem;
104
+ margin-left: 0.6rem;
105
+ margin-right: 0.6rem;
106
+ }
107
+ :host([disabled]) d2l-icon {
108
+ opacity: 0.5;
109
+ }
110
+ .d2l-input-date-hidden-text {
111
+ font-family: inherit;
112
+ font-size: 0.8rem;
113
+ font-weight: 400;
114
+ letter-spacing: 0.02rem;
115
+ line-height: 1.4rem;
116
+ position: absolute;
117
+ visibility: hidden;
118
+ width: auto;
119
+ }
120
+ .d2l-input-date-hidden-text > div {
121
+ padding-left: 2rem; /* simulates space taken up by the icon */
122
+ }
123
+ d2l-calendar {
124
+ padding: 0.25rem 0.6rem;
125
+ }
126
+ .d2l-calendar-slot-buttons {
127
+ border-top: 1px solid var(--d2l-color-gypsum);
128
+ display: flex;
129
+ justify-content: center;
130
+ margin-top: 0.3rem;
131
+ padding-top: 0.3rem;
132
+ }
133
+ `];
138
134
 
139
135
  constructor() {
140
136
  super();
@@ -16,50 +16,44 @@ import { SkeletonMixin } from '../skeleton/skeleton-mixin.js';
16
16
  */
17
17
  class InputFieldset extends PropertyRequiredMixin(InputInlineHelpMixin(SkeletonMixin(LitElement))) {
18
18
 
19
- static get properties() {
20
- return {
21
- /**
22
- * REQUIRED: Label for the fieldset
23
- * @type {string}
24
- */
25
- label: { type: String, required: true },
26
- /**
27
- * Hides the label visually
28
- * @type {boolean}
29
- */
30
- labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
31
- /**
32
- * Style of the fieldset label
33
- * @type {'default'|'heading'}
34
- */
35
- labelStyle: { type: String, attribute: 'label-style', reflect: true },
36
- /**
37
- * Indicates that a value is required for inputs in the fieldset
38
- * @type {boolean}
39
- */
40
- required: { type: Boolean, reflect: true }
41
- };
42
- }
19
+ static properties = {
20
+ /**
21
+ * REQUIRED: Label for the fieldset
22
+ * @type {string}
23
+ */
24
+ label: { type: String, required: true },
25
+ /**
26
+ * Hides the label visually
27
+ * @type {boolean}
28
+ */
29
+ labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
30
+ /**
31
+ * Style of the fieldset label
32
+ * @type {'default'|'heading'}
33
+ */
34
+ labelStyle: { type: String, attribute: 'label-style', reflect: true },
35
+ /**
36
+ * Indicates that a value is required for inputs in the fieldset
37
+ * @type {boolean}
38
+ */
39
+ required: { type: Boolean, reflect: true }
40
+ };
43
41
 
44
- static get styles() {
45
- return [ super.styles, heading4Styles, inputLabelStyles, offscreenStyles,
46
- css`
47
- :host {
48
- display: block;
49
- }
50
- :host([hidden]) {
51
- display: none;
52
- }
53
- :host([label-style="heading"]:not([label-hidden])) {
54
- margin-block-start: 0.3rem;
55
- }
56
- legend.d2l-heading-4 {
57
- margin-block: 0 0.6rem;
58
- padding: 0;
59
- }
60
- `
61
- ];
62
- }
42
+ static styles = [super.styles, heading4Styles, inputLabelStyles, offscreenStyles, css`
43
+ :host {
44
+ display: block;
45
+ }
46
+ :host([hidden]) {
47
+ display: none;
48
+ }
49
+ :host([label-style="heading"]:not([label-hidden])) {
50
+ margin-block-start: 0.3rem;
51
+ }
52
+ legend.d2l-heading-4 {
53
+ margin-block: 0 0.6rem;
54
+ padding: 0;
55
+ }
56
+ `];
63
57
 
64
58
  constructor() {
65
59
  super();
@@ -6,18 +6,16 @@ import { css, html, LitElement } from 'lit';
6
6
  */
7
7
  class InputGroup extends LitElement {
8
8
 
9
- static get styles() {
10
- return css`
11
- :host {
12
- display: flex;
13
- flex-direction: column;
14
- gap: 0.9rem;
15
- }
16
- :host([hidden]) {
17
- display: none;
18
- }
19
- `;
20
- }
9
+ static styles = css`
10
+ :host {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: 0.9rem;
14
+ }
15
+ :host([hidden]) {
16
+ display: none;
17
+ }
18
+ `;
21
19
 
22
20
  render() {
23
21
  return html`<slot></slot>`;
@@ -14,14 +14,12 @@ export const inlineHelpStyles = [
14
14
 
15
15
  export const InputInlineHelpMixin = superclass => class extends SkeletonMixin(superclass) {
16
16
 
17
- static get properties() {
18
- return {
19
- _hasInlineHelp: { type: Boolean, reflect: true, attribute: '_has-inline-help' }
20
- };
21
- }
17
+ static properties = {
18
+ _hasInlineHelp: { type: Boolean, reflect: true, attribute: '_has-inline-help' }
19
+ };
22
20
 
23
21
  static get styles() {
24
- const styles = [ inlineHelpStyles, css`
22
+ const styles = [inlineHelpStyles, css`
25
23
  :host([_has-inline-help]) .d2l-input-inline-help {
26
24
  display: block;
27
25
  }