@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,139 +22,135 @@ import { styleMap } from 'lit/directives/style-map.js';
22
22
  */
23
23
  class InputTextArea extends InputInlineHelpMixin(FocusMixin(LabelledMixin(FormElementMixin(SkeletonMixin(LitElement))))) {
24
24
 
25
- static get properties() {
26
- return {
27
- /**
28
- * ADVANCED: Indicates that the input value is invalid
29
- * @type {string}
30
- */
31
- ariaInvalid: { type: String, attribute: 'aria-invalid' },
32
- /**
33
- * Additional information communicated in the aria-describedby on the input
34
- * @type {string}
35
- */
36
- description: { type: String, reflect: true },
37
- /**
38
- * Disables the input
39
- * @type {boolean}
40
- */
41
- disabled: { type: Boolean, reflect: true },
42
- /**
43
- * Restricts the maximum width of the input box without restricting the width of the label.
44
- * @type {string}
45
- */
46
- inputWidth: { attribute: 'input-width', type: String },
47
- /**
48
- * Hides the label visually (moves it to the input's "aria-label" attribute)
49
- * @type {boolean}
50
- */
51
- labelHidden: { type: Boolean, attribute: 'label-hidden' },
52
- /**
53
- * Imposes an upper character limit
54
- * @type {number}
55
- */
56
- maxlength: { type: Number },
57
- /**
58
- * Maximum number of rows before scrolling
59
- * @type {number}
60
- */
61
- maxRows: { type: Number, attribute: 'max-rows' },
62
- /**
63
- * Imposes a lower character limit
64
- * @type {number}
65
- */
66
- minlength: { type: Number },
67
- /**
68
- * Hides the border
69
- * @type {boolean}
70
- */
71
- noBorder: { type: Boolean, attribute: 'no-border' },
72
- /**
73
- * Removes default left/right padding
74
- * @type {boolean}
75
- */
76
- noPadding: { type: Boolean, attribute: 'no-padding' },
77
- /**
78
- * @ignore
79
- */
80
- placeholder: { type: String },
81
- /**
82
- * Indicates that a value is required
83
- * @type {boolean}
84
- */
85
- required: { type: Boolean, reflect: true },
86
- /**
87
- * Minimum number of rows
88
- * @type {number}
89
- */
90
- rows: { type: Number },
91
- /**
92
- * Value of the input
93
- * @type {string}
94
- */
95
- value: { type: String }
96
- };
97
- }
25
+ static properties = {
26
+ /**
27
+ * ADVANCED: Indicates that the input value is invalid
28
+ * @type {string}
29
+ */
30
+ ariaInvalid: { type: String, attribute: 'aria-invalid' },
31
+ /**
32
+ * Additional information communicated in the aria-describedby on the input
33
+ * @type {string}
34
+ */
35
+ description: { type: String, reflect: true },
36
+ /**
37
+ * Disables the input
38
+ * @type {boolean}
39
+ */
40
+ disabled: { type: Boolean, reflect: true },
41
+ /**
42
+ * Restricts the maximum width of the input box without restricting the width of the label.
43
+ * @type {string}
44
+ */
45
+ inputWidth: { attribute: 'input-width', type: String },
46
+ /**
47
+ * Hides the label visually (moves it to the input's "aria-label" attribute)
48
+ * @type {boolean}
49
+ */
50
+ labelHidden: { type: Boolean, attribute: 'label-hidden' },
51
+ /**
52
+ * Imposes an upper character limit
53
+ * @type {number}
54
+ */
55
+ maxlength: { type: Number },
56
+ /**
57
+ * Maximum number of rows before scrolling
58
+ * @type {number}
59
+ */
60
+ maxRows: { type: Number, attribute: 'max-rows' },
61
+ /**
62
+ * Imposes a lower character limit
63
+ * @type {number}
64
+ */
65
+ minlength: { type: Number },
66
+ /**
67
+ * Hides the border
68
+ * @type {boolean}
69
+ */
70
+ noBorder: { type: Boolean, attribute: 'no-border' },
71
+ /**
72
+ * Removes default left/right padding
73
+ * @type {boolean}
74
+ */
75
+ noPadding: { type: Boolean, attribute: 'no-padding' },
76
+ /**
77
+ * @ignore
78
+ */
79
+ placeholder: { type: String },
80
+ /**
81
+ * Indicates that a value is required
82
+ * @type {boolean}
83
+ */
84
+ required: { type: Boolean, reflect: true },
85
+ /**
86
+ * Minimum number of rows
87
+ * @type {number}
88
+ */
89
+ rows: { type: Number },
90
+ /**
91
+ * Value of the input
92
+ * @type {string}
93
+ */
94
+ value: { type: String }
95
+ };
98
96
 
99
- static get styles() {
100
- return [ super.styles, inputStyles, inputLabelStyles, offscreenStyles, css`
101
- :host {
102
- display: block;
103
- }
104
- :host([hidden]) {
105
- display: none;
106
- }
107
- .d2l-input-label {
108
- display: inline-block;
109
- vertical-align: bottom;
110
- }
111
- :host(:not([skeleton])) .d2l-input-label {
112
- margin: 0;
113
- padding-block: 0 0.4rem;
114
- padding-inline: 0;
115
- }
116
- :host(:not([skeleton]):not([input-width])) .d2l-input-label {
117
- width: 100%;
118
- }
119
- .d2l-input-textarea-container {
120
- height: 100%;
121
- max-width: 100%;
122
- position: relative;
123
- }
124
- textarea.d2l-input {
125
- height: 100%;
126
- left: 0;
127
- line-height: 1rem;
128
- position: absolute;
129
- resize: none;
130
- top: 0;
131
- }
132
- :host([no-border]) textarea.d2l-input {
133
- border-color: transparent;
134
- box-shadow: none;
135
- }
136
- /* mirror dimensions must match textarea - match border + padding */
137
- .d2l-input-textarea-mirror {
138
- line-height: 1rem;
139
- overflow: hidden;
140
- overflow-wrap: anywhere; /* prevent width from growing */
141
- padding-bottom: 0.5rem;
142
- padding-top: 0.5rem;
143
- visibility: hidden;
144
- }
145
- :host([no-padding]) .d2l-input {
146
- padding-inline: 0;
147
- }
148
- :host([no-border][no-padding]) textarea.d2l-input:hover,
149
- :host([no-border][no-padding]) textarea.d2l-input:focus {
150
- border-left-width: 1px;
151
- border-right-width: 1px;
152
- }
153
- .d2l-input-textarea-mirror[aria-invalid="true"] {
154
- padding-inline-end: calc(18px + 0.8rem);
155
- }
156
- `];
157
- }
97
+ static styles = [super.styles, inputStyles, inputLabelStyles, offscreenStyles, css`
98
+ :host {
99
+ display: block;
100
+ }
101
+ :host([hidden]) {
102
+ display: none;
103
+ }
104
+ .d2l-input-label {
105
+ display: inline-block;
106
+ vertical-align: bottom;
107
+ }
108
+ :host(:not([skeleton])) .d2l-input-label {
109
+ margin: 0;
110
+ padding-block: 0 0.4rem;
111
+ padding-inline: 0;
112
+ }
113
+ :host(:not([skeleton]):not([input-width])) .d2l-input-label {
114
+ width: 100%;
115
+ }
116
+ .d2l-input-textarea-container {
117
+ height: 100%;
118
+ max-width: 100%;
119
+ position: relative;
120
+ }
121
+ textarea.d2l-input {
122
+ height: 100%;
123
+ left: 0;
124
+ line-height: 1rem;
125
+ position: absolute;
126
+ resize: none;
127
+ top: 0;
128
+ }
129
+ :host([no-border]) textarea.d2l-input {
130
+ border-color: transparent;
131
+ box-shadow: none;
132
+ }
133
+ /* mirror dimensions must match textarea - match border + padding */
134
+ .d2l-input-textarea-mirror {
135
+ line-height: 1rem;
136
+ overflow: hidden;
137
+ overflow-wrap: anywhere; /* prevent width from growing */
138
+ padding-bottom: 0.5rem;
139
+ padding-top: 0.5rem;
140
+ visibility: hidden;
141
+ }
142
+ :host([no-padding]) .d2l-input {
143
+ padding-inline: 0;
144
+ }
145
+ :host([no-border][no-padding]) textarea.d2l-input:hover,
146
+ :host([no-border][no-padding]) textarea.d2l-input:focus {
147
+ border-left-width: 1px;
148
+ border-right-width: 1px;
149
+ }
150
+ .d2l-input-textarea-mirror[aria-invalid="true"] {
151
+ padding-inline-end: calc(18px + 0.8rem);
152
+ }
153
+ `];
158
154
 
159
155
  constructor() {
160
156
  super();
@@ -41,111 +41,107 @@ function getValidISOTimeAtInterval(val, timeInterval) {
41
41
 
42
42
  class InputTimeRange extends FocusMixin(SkeletonMixin(FormElementMixin(LocalizeCoreElement(LitElement)))) {
43
43
 
44
- static get properties() {
45
- return {
46
- /**
47
- * ADVANCED: Automatically shifts end time when start time changes to keep same range
48
- * @type {boolean}
49
- */
50
- autoShiftTimes: { attribute: 'auto-shift-times', reflect: true, type: Boolean },
51
- /**
52
- * Hides the start and end labels visually. Hidden labels are still read by screen readers so make sure to set appropriate start and end labels.
53
- * @type {boolean}
54
- */
55
- childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
56
- /**
57
- * Disables the inputs
58
- * @type {boolean}
59
- */
60
- disabled: { type: Boolean, reflect: true },
61
- /**
62
- * ACCESSIBILITY: Label for the end time input. Defaults to localized "End Time".
63
- * @type {string}
64
- * @default "End Time"
65
- */
66
- endLabel: { attribute: 'end-label', reflect: true, type: String },
67
- /**
68
- * ADVANCED: Indicates if the end dropdown is open
69
- * @type {boolean}
70
- */
71
- endOpened: { attribute: 'end-opened', type: Boolean },
72
- /**
73
- * Value of the end time input
74
- * @type {string}
75
- */
76
- endValue: { attribute: 'end-value', reflect: true, type: String },
77
- /**
78
- * Rounds typed input up to nearest valid interval time (specified with "time-interval")
79
- * @type {boolean}
80
- */
81
- enforceTimeIntervals: { attribute: 'enforce-time-intervals', reflect: true, type: Boolean },
82
- /**
83
- * Validates on inclusive range (i.e., it is valid for start and end times to be equal)
84
- * @type {boolean}
85
- */
86
- inclusiveTimeRange: { attribute: 'inclusive-time-range', reflect: true, type: Boolean },
87
- /**
88
- * ACCESSIBILITY: REQUIRED: Label for the input fieldset that wraps the time inputs
89
- * @type {string}
90
- */
91
- label: { type: String, reflect: true },
92
- /**
93
- * Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
94
- * @type {boolean}
95
- */
96
- labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
97
- /**
98
- * Indicates that values are required
99
- * @type {boolean}
100
- */
101
- required: { type: Boolean, reflect: true },
102
- /**
103
- * ACCESSIBILITY: Label for the start time input. Defaults to localized "Start Time".
104
- * @type {string}
105
- * @default "Start Time"
106
- */
107
- startLabel: { attribute: 'start-label', reflect: true, type: String },
108
- /**
109
- * ADVANCED: Indicates if the start dropdown is open
110
- * @type {boolean}
111
- */
112
- startOpened: { attribute: 'start-opened', type: Boolean },
113
- /**
114
- * Value of the start time input
115
- * @type {string}
116
- */
117
- startValue: { attribute: 'start-value', reflect: true, type: String },
118
- /**
119
- * Number of minutes between times shown in dropdown menu
120
- * @type {'five'|'ten'|'fifteen'|'twenty'|'thirty'|'sixty'}
121
- */
122
- timeInterval: { attribute: 'time-interval', reflect: true, type: String },
123
- /**
124
- * Time zone identifier for the inputs to use.
125
- * @type {string}
126
- */
127
- timeZoneId: { type: String },
128
- /**
129
- * Hides the time zone inside the selection dropdowns. Should only be used when the input values are not related to any one time zone
130
- * @type {Boolean}
131
- */
132
- timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
133
- };
134
- }
44
+ static properties = {
45
+ /**
46
+ * ADVANCED: Automatically shifts end time when start time changes to keep same range
47
+ * @type {boolean}
48
+ */
49
+ autoShiftTimes: { attribute: 'auto-shift-times', reflect: true, type: Boolean },
50
+ /**
51
+ * Hides the start and end labels visually. Hidden labels are still read by screen readers so make sure to set appropriate start and end labels.
52
+ * @type {boolean}
53
+ */
54
+ childLabelsHidden: { attribute: 'child-labels-hidden', reflect: true, type: Boolean },
55
+ /**
56
+ * Disables the inputs
57
+ * @type {boolean}
58
+ */
59
+ disabled: { type: Boolean, reflect: true },
60
+ /**
61
+ * ACCESSIBILITY: Label for the end time input. Defaults to localized "End Time".
62
+ * @type {string}
63
+ * @default "End Time"
64
+ */
65
+ endLabel: { attribute: 'end-label', reflect: true, type: String },
66
+ /**
67
+ * ADVANCED: Indicates if the end dropdown is open
68
+ * @type {boolean}
69
+ */
70
+ endOpened: { attribute: 'end-opened', type: Boolean },
71
+ /**
72
+ * Value of the end time input
73
+ * @type {string}
74
+ */
75
+ endValue: { attribute: 'end-value', reflect: true, type: String },
76
+ /**
77
+ * Rounds typed input up to nearest valid interval time (specified with "time-interval")
78
+ * @type {boolean}
79
+ */
80
+ enforceTimeIntervals: { attribute: 'enforce-time-intervals', reflect: true, type: Boolean },
81
+ /**
82
+ * Validates on inclusive range (i.e., it is valid for start and end times to be equal)
83
+ * @type {boolean}
84
+ */
85
+ inclusiveTimeRange: { attribute: 'inclusive-time-range', reflect: true, type: Boolean },
86
+ /**
87
+ * ACCESSIBILITY: REQUIRED: Label for the input fieldset that wraps the time inputs
88
+ * @type {string}
89
+ */
90
+ label: { type: String, reflect: true },
91
+ /**
92
+ * Hides the fieldset label visually. Hidden labels are still read by screen readers so make sure to set an appropriate label.
93
+ * @type {boolean}
94
+ */
95
+ labelHidden: { attribute: 'label-hidden', reflect: true, type: Boolean },
96
+ /**
97
+ * Indicates that values are required
98
+ * @type {boolean}
99
+ */
100
+ required: { type: Boolean, reflect: true },
101
+ /**
102
+ * ACCESSIBILITY: Label for the start time input. Defaults to localized "Start Time".
103
+ * @type {string}
104
+ * @default "Start Time"
105
+ */
106
+ startLabel: { attribute: 'start-label', reflect: true, type: String },
107
+ /**
108
+ * ADVANCED: Indicates if the start dropdown is open
109
+ * @type {boolean}
110
+ */
111
+ startOpened: { attribute: 'start-opened', type: Boolean },
112
+ /**
113
+ * Value of the start time input
114
+ * @type {string}
115
+ */
116
+ startValue: { attribute: 'start-value', reflect: true, type: String },
117
+ /**
118
+ * Number of minutes between times shown in dropdown menu
119
+ * @type {'five'|'ten'|'fifteen'|'twenty'|'thirty'|'sixty'}
120
+ */
121
+ timeInterval: { attribute: 'time-interval', reflect: true, type: String },
122
+ /**
123
+ * Time zone identifier for the inputs to use.
124
+ * @type {string}
125
+ */
126
+ timeZoneId: { type: String },
127
+ /**
128
+ * Hides the time zone inside the selection dropdowns. Should only be used when the input values are not related to any one time zone
129
+ * @type {Boolean}
130
+ */
131
+ timeZoneHidden: { type: Boolean, attribute: 'time-zone-hidden' },
132
+ };
135
133
 
136
- static get styles() {
137
- return [super.styles, css`
138
- :host {
139
- display: inline-block;
140
- }
141
- :host([hidden]) {
142
- display: none;
143
- }
144
- d2l-input-time {
145
- display: block;
146
- }
147
- `];
148
- }
134
+ static styles = [super.styles, css`
135
+ :host {
136
+ display: inline-block;
137
+ }
138
+ :host([hidden]) {
139
+ display: none;
140
+ }
141
+ d2l-input-time {
142
+ display: block;
143
+ }
144
+ `];
149
145
 
150
146
  constructor() {
151
147
  super();