@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.
- 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-select-styles.js +30 -25
- 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/helpers/focus.js +5 -1
- package/package.json +3 -2
|
@@ -17,74 +17,69 @@ export const SUPPRESS_ENTER_TIMEOUT_MS = 1000;
|
|
|
17
17
|
*/
|
|
18
18
|
class InputSearch extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
|
19
19
|
|
|
20
|
-
static
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
margin-inline: 0.3rem;
|
|
84
|
-
}
|
|
85
|
-
`
|
|
86
|
-
];
|
|
87
|
-
}
|
|
20
|
+
static properties = {
|
|
21
|
+
/**
|
|
22
|
+
* ACCESSIBILITY: Additional information communicated to screenreader users when focusing on the input
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
description: { type: String, reflect: true },
|
|
26
|
+
/**
|
|
27
|
+
* Disables the input
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
disabled: { type: Boolean },
|
|
31
|
+
/**
|
|
32
|
+
* ACCESSIBILITY: REQUIRED: Acts as the primary label for the input. Not visible.
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
label: { type: String },
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
lastSearchValue: { type: String, attribute: false },
|
|
40
|
+
/**
|
|
41
|
+
* Imposes an upper character limit
|
|
42
|
+
* @type {number}
|
|
43
|
+
*/
|
|
44
|
+
maxlength: { type: Number },
|
|
45
|
+
/**
|
|
46
|
+
* Prevents the "clear" button from appearing
|
|
47
|
+
* @type {boolean}
|
|
48
|
+
*/
|
|
49
|
+
noClear: { type: Boolean, attribute: 'no-clear' },
|
|
50
|
+
/**
|
|
51
|
+
* Placeholder text (default: "Search...")
|
|
52
|
+
* @type {string}
|
|
53
|
+
*/
|
|
54
|
+
placeholder: { type: String },
|
|
55
|
+
/**
|
|
56
|
+
* Dispatch search events after each input event
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
*/
|
|
59
|
+
searchOnInput: { type: Boolean, attribute: 'search-on-input' },
|
|
60
|
+
/**
|
|
61
|
+
* Value of the input
|
|
62
|
+
* @type {string}
|
|
63
|
+
*/
|
|
64
|
+
value: { type: String }
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
static styles = [inputStyles, css`
|
|
68
|
+
:host {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
:host([hidden]) {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
d2l-button-icon {
|
|
76
|
+
--d2l-button-icon-min-height: 1.5rem;
|
|
77
|
+
--d2l-button-icon-min-width: 1.5rem;
|
|
78
|
+
--d2l-button-icon-border-radius: 4px;
|
|
79
|
+
--d2l-focus-ring-offset: 1px;
|
|
80
|
+
margin-inline: 0.3rem;
|
|
81
|
+
}
|
|
82
|
+
`];
|
|
88
83
|
|
|
89
84
|
constructor() {
|
|
90
85
|
super();
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import './input-styles.js';
|
|
2
2
|
import { css, unsafeCSS } from 'lit';
|
|
3
|
+
import { getFocusRingStyles, getFocusVisibleStyles } from '../../helpers/focus.js';
|
|
3
4
|
import { _isValidCssSelector } from '../../helpers/internal/css.js';
|
|
4
|
-
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
5
5
|
import { registerSemanticVariableForSvgImageUrl } from '../colors/colors.js';
|
|
6
6
|
|
|
7
|
-
const focusClass = unsafeCSS(getFocusPseudoClass());
|
|
8
|
-
|
|
9
7
|
registerSemanticVariableForSvgImageUrl(
|
|
10
8
|
'--d2l-input-select-chevron-image',
|
|
11
9
|
`<svg width="11" height="7" viewBox="0 0 11 7" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -13,12 +11,36 @@ registerSemanticVariableForSvgImageUrl(
|
|
|
13
11
|
</svg>`
|
|
14
12
|
);
|
|
15
13
|
|
|
14
|
+
function _getSelectFocusStyles(selector) {
|
|
15
|
+
const notDisabledSelector = (focusSelector) => `
|
|
16
|
+
${selector}:not([disabled]):hover,
|
|
17
|
+
${selector}:not([disabled]):${focusSelector}`;
|
|
18
|
+
const ariaInvalidSelector = (focusSelector) => `
|
|
19
|
+
${selector}[aria-invalid="true"],
|
|
20
|
+
${selector}[aria-invalid="true"]:${focusSelector},
|
|
21
|
+
${selector}[aria-invalid="true"]:hover`;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
notDisabled: getFocusRingStyles(notDisabledSelector, {
|
|
25
|
+
extraStyles: css`
|
|
26
|
+
box-shadow: inset var(--d2l-theme-shadow-inset-offset-x) var(--d2l-theme-shadow-inset-offset-y) var(--d2l-theme-shadow-inset-blur-radius) 2px var(--d2l-theme-shadow-inset-color);
|
|
27
|
+
|
|
28
|
+
--d2l-focus-ring-offset: -2px;`,
|
|
29
|
+
preferContrastMediaQueryExtraStyles: css`box-shadow: none;`
|
|
30
|
+
}),
|
|
31
|
+
ariaInvalid: getFocusVisibleStyles(ariaInvalidSelector, (selector) => css`${selector} {
|
|
32
|
+
outline-color: var(--d2l-theme-status-color-error);
|
|
33
|
+
}`)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
16
37
|
/**
|
|
17
38
|
* A private helper method that should not be used by general consumers
|
|
18
39
|
*/
|
|
19
40
|
export function _generateSelectStyles(selector) {
|
|
20
41
|
if (!_isValidCssSelector(selector)) return '';
|
|
21
42
|
const finalSelector = unsafeCSS(selector);
|
|
43
|
+
const selectFocusStyles = _getSelectFocusStyles(finalSelector);
|
|
22
44
|
|
|
23
45
|
return css`
|
|
24
46
|
${finalSelector} {
|
|
@@ -51,23 +73,16 @@ export function _generateSelectStyles(selector) {
|
|
|
51
73
|
vertical-align: middle;
|
|
52
74
|
}
|
|
53
75
|
|
|
54
|
-
${
|
|
55
|
-
|
|
56
|
-
box-shadow: inset var(--d2l-theme-shadow-inset-offset-x) var(--d2l-theme-shadow-inset-offset-y) var(--d2l-theme-shadow-inset-blur-radius) 2px var(--d2l-theme-shadow-inset-color);
|
|
57
|
-
outline: 2px solid var(--d2l-theme-border-color-focus);
|
|
58
|
-
outline-offset: -2px;
|
|
59
|
-
}
|
|
76
|
+
${selectFocusStyles.notDisabled}
|
|
77
|
+
|
|
60
78
|
${finalSelector}[aria-invalid="true"] {
|
|
61
79
|
background-image: var(--d2l-input-select-chevron-image), var(--d2l-input-invalid-image);
|
|
62
80
|
background-position: center var(--d2l-inline-end, right) 17px, center var(--d2l-inline-end, right) calc(1px + 11px + 17px);
|
|
63
81
|
background-repeat: no-repeat, no-repeat;
|
|
64
82
|
background-size: 11px 7px, 0.8rem 0.8rem;
|
|
65
83
|
}
|
|
66
|
-
${
|
|
67
|
-
|
|
68
|
-
${finalSelector}[aria-invalid="true"]:hover {
|
|
69
|
-
outline-color: var(--d2l-theme-status-color-error);
|
|
70
|
-
}
|
|
84
|
+
${selectFocusStyles.ariaInvalid}
|
|
85
|
+
|
|
71
86
|
${finalSelector}:disabled {
|
|
72
87
|
opacity: var(--d2l-theme-opacity-disabled-control);
|
|
73
88
|
}
|
|
@@ -87,12 +102,6 @@ export function _generateSelectStyles(selector) {
|
|
|
87
102
|
padding-inline: 0.6rem 16px;
|
|
88
103
|
}
|
|
89
104
|
|
|
90
|
-
${finalSelector}:not([disabled]):${focusClass},
|
|
91
|
-
${finalSelector}:not([disabled]):hover {
|
|
92
|
-
box-shadow: none;
|
|
93
|
-
outline: 2px solid Highlight;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
105
|
${finalSelector}:disabled {
|
|
97
106
|
outline: 1px solid GrayText;
|
|
98
107
|
}
|
|
@@ -104,11 +113,7 @@ export function _generateSelectStyles(selector) {
|
|
|
104
113
|
background-size: 0.8rem 0.8rem;
|
|
105
114
|
}
|
|
106
115
|
|
|
107
|
-
${
|
|
108
|
-
${finalSelector}[aria-invalid="true"]:${focusClass},
|
|
109
|
-
${finalSelector}[aria-invalid="true"]:hover {
|
|
110
|
-
outline-color: var(--d2l-theme-status-color-error);
|
|
111
|
-
}
|
|
116
|
+
${selectFocusStyles.ariaInvalid}
|
|
112
117
|
}
|
|
113
118
|
`;
|
|
114
119
|
};
|