@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.
- package/components/alert/alert-toast.js +98 -102
- package/components/alert/alert.js +109 -113
- package/components/backdrop/backdrop-dirty-overlay.js +13 -17
- package/components/backdrop/backdrop-loading.js +105 -109
- package/components/backdrop/backdrop.js +50 -54
- package/components/breadcrumbs/breadcrumb-current-page.js +19 -23
- package/components/breadcrumbs/breadcrumb.js +50 -54
- package/components/breadcrumbs/breadcrumbs.js +34 -38
- package/components/button/button-add.js +156 -164
- package/components/button/button-copy-mixin.js +9 -11
- package/components/button/button-copy.js +15 -19
- package/components/button/button-icon.js +110 -114
- package/components/button/button-move.js +153 -157
- package/components/button/button-split-item.js +16 -20
- package/components/button/button-split.js +70 -74
- package/components/button/button-subtle-copy.js +17 -19
- package/components/button/button-subtle.js +145 -149
- package/components/button/button-toggle.js +25 -29
- package/components/button/button.js +70 -74
- package/components/button/floating-buttons.js +63 -67
- package/components/calendar/calendar.js +244 -248
- package/components/card/card-content-meta.js +13 -15
- package/components/card/card-content-title.js +9 -11
- package/components/card/card-footer-link.js +76 -80
- package/components/card/card-loading-shimmer.js +35 -39
- package/components/card/card.js +188 -192
- package/components/collapsible-panel/collapsible-panel-group.js +17 -21
- package/components/collapsible-panel/collapsible-panel-summary-item.js +27 -31
- package/components/collapsible-panel/collapsible-panel.js +258 -262
- package/components/count-badge/count-badge-icon.js +12 -16
- package/components/count-badge/count-badge-mixin.js +124 -128
- package/components/count-badge/count-badge.js +2 -4
- package/components/description-list/description-list-wrapper.js +27 -31
- package/components/dialog/dialog-confirm.js +55 -59
- package/components/dialog/dialog-fullscreen.js +128 -132
- package/components/dialog/dialog-mixin.js +39 -41
- package/components/dialog/dialog.js +61 -65
- package/components/dropdown/dropdown-button-subtle.js +21 -25
- package/components/dropdown/dropdown-button.js +31 -35
- package/components/dropdown/dropdown-context-menu.js +28 -31
- package/components/dropdown/dropdown-menu.js +27 -31
- package/components/dropdown/dropdown-more.js +23 -26
- package/components/dropdown/dropdown-opener-mixin.js +44 -46
- package/components/dropdown/dropdown-popover-mixin.js +155 -159
- package/components/dropdown/dropdown-tabs.js +5 -7
- package/components/dropdown/dropdown.js +1 -3
- package/components/empty-state/empty-state-action-button.js +18 -22
- package/components/empty-state/empty-state-action-link.js +14 -18
- package/components/empty-state/empty-state-illustrated.js +21 -25
- package/components/empty-state/empty-state-simple.js +8 -12
- package/components/expand-collapse/expand-collapse-content.js +48 -52
- package/components/filter/filter-dimension-set-date-text-value.js +34 -36
- package/components/filter/filter-dimension-set-date-time-range-value.js +45 -47
- package/components/filter/filter-dimension-set-empty-state.js +17 -19
- package/components/filter/filter-dimension-set-value.js +27 -29
- package/components/filter/filter-dimension-set.js +65 -67
- package/components/filter/filter-overflow-group.js +15 -19
- package/components/filter/filter-tags.js +16 -19
- package/components/filter/filter.js +115 -119
- package/components/focus-trap/focus-trap.js +17 -21
- package/components/form/form-element-mixin.js +33 -35
- package/components/form/form-error-summary.js +37 -42
- package/components/form/form.js +33 -37
- package/components/hierarchical-view/hierarchical-view-mixin.js +76 -80
- package/components/hierarchical-view/hierarchical-view.js +5 -7
- package/components/html-block/html-block.js +45 -49
- package/components/icons/icon-custom.js +20 -24
- package/components/icons/icon.js +20 -24
- package/components/icons/slotted-icon-mixin.js +16 -18
- package/components/inputs/input-checkbox-group.js +34 -38
- package/components/inputs/input-checkbox.js +106 -110
- package/components/inputs/input-color.js +142 -148
- package/components/inputs/input-date-range.js +90 -94
- package/components/inputs/input-date-time-range-to.js +70 -74
- package/components/inputs/input-date-time-range.js +110 -115
- package/components/inputs/input-date-time.js +75 -79
- package/components/inputs/input-date.js +101 -105
- package/components/inputs/input-fieldset.js +37 -43
- package/components/inputs/input-group.js +10 -12
- package/components/inputs/input-inline-help.js +4 -6
- package/components/inputs/input-number.js +112 -118
- package/components/inputs/input-percent.js +52 -58
- package/components/inputs/input-radio-group.js +45 -49
- package/components/inputs/input-radio-spacer.js +11 -13
- package/components/inputs/input-radio.js +62 -66
- package/components/inputs/input-search.js +63 -68
- package/components/inputs/input-text.js +245 -251
- package/components/inputs/input-textarea.js +128 -132
- package/components/inputs/input-time-range.js +100 -104
- package/components/inputs/input-time.js +107 -113
- package/components/link/link-mixin.js +37 -41
- package/components/link/link.js +113 -119
- package/components/list/list-controls.js +25 -29
- package/components/list/list-item-button-mixin.js +10 -12
- package/components/list/list-item-checkbox-mixin.js +35 -37
- package/components/list/list-item-content.js +33 -35
- package/components/list/list-item-drag-drop-mixin.js +45 -47
- package/components/list/list-item-drag-handle.js +80 -84
- package/components/list/list-item-drag-image.js +77 -81
- package/components/list/list-item-expand-collapse-mixin.js +17 -19
- package/components/list/list-item-generic-layout.js +222 -226
- package/components/list/list-item-link-mixin.js +10 -12
- package/components/list/list-item-mixin.js +68 -70
- package/components/list/list-item-nav-mixin.js +17 -19
- package/components/list/list-item-placement-marker.js +65 -67
- package/components/list/list-item-role-mixin.js +9 -11
- package/components/list/list-item.js +7 -9
- package/components/list/list.js +121 -125
- package/components/loading-spinner/loading-spinner.js +93 -97
- package/custom-elements.json +1920 -6694
- 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
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
100
|
-
|
|
101
|
-
:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
137
|
-
|
|
138
|
-
:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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();
|