lightning-base-components 1.18.4-alpha → 1.18.6-alpha
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/metadata/raptor.json +21 -0
- package/package.json +4 -2
- package/src/lightning/baseCombobox/baseCombobox.js +20 -14
- package/src/lightning/button/button.js +3 -2
- package/src/lightning/buttonIcon/buttonIcon.js +19 -16
- package/src/lightning/combobox/combobox.js +17 -16
- package/src/lightning/f6Controller/f6Controller.js +49 -3
- package/src/lightning/formattedRichText/formatted-rich-text.slds.css +1 -1
- package/src/lightning/formattedRichText/formattedRichText.css +1 -0
- package/src/lightning/formattedRichText/formattedRichText.html +1 -1
- package/src/lightning/formattedRichText/formattedRichText.js +1 -0
- package/src/lightning/layout/layout.js +2 -0
- package/src/lightning/layoutItem/layoutItem.js +2 -0
- package/src/lightning/primitiveButton/primitiveButton.js +8 -8
- package/src/lightning/sldsCommon/sldsCommon.css +14 -6
- package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +4 -4
- package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +50 -19
- package/src/lightning/spinner/spinner.js +7 -3
- package/src/lightning/toast/button-icon.slds.css +909 -0
- package/src/lightning/toast/formatted-rich-text.slds.css +230 -0
- package/src/lightning/toast/icon.slds.css +209 -0
- package/src/lightning/toast/toast.css +22 -6
- package/src/lightning/toast/toast.html +1 -1
- package/src/lightning/toast/toast.js +9 -7
- package/src/lightning/toast/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toast.slds.css +97 -0
- package/src/lightning/toastContainer/toastContainer.css +17 -6
- package/src/lightning/toastContainer/toastContainer.js +4 -0
- package/src/lightning/utilsPrivate/url.js +4 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +8 -4
- package/src/lightning/button/__wdio__/utam/utam.html +0 -3
- package/src/lightning/button/__wdio__/utam/utam.js +0 -3
- package/src/lightning/button/__wdio__/utam/utam.spec.js +0 -20
- package/src/lightning/datatable/__wdio__/utam/utam.html +0 -32
- package/src/lightning/datatable/__wdio__/utam/utam.js +0 -91
- package/src/lightning/datatable/__wdio__/utam/utam.spec.js +0 -214
package/metadata/raptor.json
CHANGED
|
@@ -3169,6 +3169,27 @@
|
|
|
3169
3169
|
{
|
|
3170
3170
|
"name": "value"
|
|
3171
3171
|
}
|
|
3172
|
+
],
|
|
3173
|
+
"methods": [
|
|
3174
|
+
{
|
|
3175
|
+
"name": "blur"
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"name": "focus"
|
|
3179
|
+
}
|
|
3180
|
+
]
|
|
3181
|
+
},
|
|
3182
|
+
"recordPickerGetRecord": {
|
|
3183
|
+
"properties": [
|
|
3184
|
+
{
|
|
3185
|
+
"name": "displayInfo"
|
|
3186
|
+
},
|
|
3187
|
+
{
|
|
3188
|
+
"name": "objectApiName"
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
"name": "recordId"
|
|
3192
|
+
}
|
|
3172
3193
|
]
|
|
3173
3194
|
},
|
|
3174
3195
|
"recordUtils": {},
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightning-base-components",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.6-alpha",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"external",
|
|
7
7
|
"scopedImports",
|
|
8
8
|
"metadata",
|
|
9
|
-
"src/lightning/*/!(__container__|
|
|
9
|
+
"src/lightning/*/!(__container__|__perf__|__raptorMocks__|__test__|__tests__)",
|
|
10
10
|
"package.json"
|
|
11
11
|
],
|
|
12
12
|
"engines": {
|
|
@@ -1307,6 +1307,8 @@
|
|
|
1307
1307
|
"lightning-select",
|
|
1308
1308
|
"lightning-spinner",
|
|
1309
1309
|
"lightning-tab-bar",
|
|
1310
|
+
"lightning-toast",
|
|
1311
|
+
"lightning-toast-container",
|
|
1310
1312
|
"lightning-timepicker",
|
|
1311
1313
|
"lightning-vertical-navigation",
|
|
1312
1314
|
"lightning-vertical-navigation-section"
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
22
22
|
import { VARIANT } from 'lightning/inputUtils';
|
|
23
23
|
import AriaObserver from 'lightning/ariaObserver';
|
|
24
|
-
|
|
24
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
25
25
|
const i18n = {
|
|
26
26
|
ariaSelectedOptions: labelAriaSelectedOptions,
|
|
27
27
|
deselectOptionKeyboard: labelDeselectOptionKeyboard,
|
|
@@ -51,6 +51,7 @@ const ARIA_INVALID = 'aria-invalid';
|
|
|
51
51
|
|
|
52
52
|
export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
53
53
|
static delegatesFocus = true;
|
|
54
|
+
static validationOptOut = ['class'];
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Controls auto-filling of the input. Set the attribute to pass
|
|
@@ -82,17 +83,16 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
82
83
|
@api attributionLogoUrl;
|
|
83
84
|
@api attributionLogoAssistiveText;
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
_showDropdownActivityIndicator = false;
|
|
86
87
|
@track _items = [];
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
_disabled = false;
|
|
89
|
+
_dropdownVisible = false;
|
|
90
|
+
_hasDropdownOpened = false;
|
|
91
|
+
_highlightedOptionElementId = null;
|
|
92
|
+
_variant;
|
|
93
|
+
_dropdownHeight = 'standard';
|
|
94
|
+
_readonly = false;
|
|
95
|
+
_logoLoaded = false;
|
|
96
96
|
_inputDescribedBy = [];
|
|
97
97
|
_inputAriaControls;
|
|
98
98
|
_activeElementDomId;
|
|
@@ -126,7 +126,9 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
126
126
|
connectedCallback() {
|
|
127
127
|
super.connectedCallback();
|
|
128
128
|
this.setupAriaObserverIfAbsent();
|
|
129
|
-
|
|
129
|
+
if (isCSR) {
|
|
130
|
+
this.overrideDropdownAlignment();
|
|
131
|
+
}
|
|
130
132
|
this.classList.add('slds-combobox_container');
|
|
131
133
|
this._connected = true;
|
|
132
134
|
this._keyboardInterface = this.dropdownKeyboardInterface();
|
|
@@ -597,7 +599,9 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
597
599
|
}
|
|
598
600
|
|
|
599
601
|
get dropdownElement() {
|
|
600
|
-
return
|
|
602
|
+
return isCSR
|
|
603
|
+
? this.template.querySelector('[data-dropdown-element]')
|
|
604
|
+
: null;
|
|
601
605
|
}
|
|
602
606
|
|
|
603
607
|
get i18n() {
|
|
@@ -942,7 +946,9 @@ export default class LightningBaseCombobox extends LightningShadowBaseClass {
|
|
|
942
946
|
}
|
|
943
947
|
|
|
944
948
|
get inputElement() {
|
|
945
|
-
return
|
|
949
|
+
return isCSR
|
|
950
|
+
? this.template.querySelector(INPUT_ELEMENT_SELECTOR)
|
|
951
|
+
: null;
|
|
946
952
|
}
|
|
947
953
|
|
|
948
954
|
// remove-next-line-for-c-namespace
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
normalizeString as normalize,
|
|
5
5
|
normalizeBoolean,
|
|
6
6
|
reflectAttribute,
|
|
7
|
+
isCSR,
|
|
7
8
|
} from 'lightning/utilsPrivate';
|
|
8
9
|
import LightningPrimitiveButton from 'lightning/primitiveButton';
|
|
9
10
|
import template from './button.html';
|
|
@@ -230,7 +231,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
get button() {
|
|
233
|
-
return this.template.querySelector('button');
|
|
234
|
+
return isCSR ? this.template.querySelector('button') : null;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
/**
|
|
@@ -240,7 +241,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
240
241
|
connectedCallback() {
|
|
241
242
|
// Set `data-render-mode` attribute in native shadow mode
|
|
242
243
|
if (!this.template.synthetic) {
|
|
243
|
-
this.
|
|
244
|
+
this.setAttribute('data-render-mode', 'shadow');
|
|
244
245
|
}
|
|
245
246
|
if (!this._connected) {
|
|
246
247
|
reflectAttribute(this, 'variant', this._normalizedVariant);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api } from 'lwc';
|
|
2
2
|
import { classSet } from 'lightning/utils';
|
|
3
|
-
import { normalizeString as normalize } from 'lightning/utilsPrivate';
|
|
3
|
+
import { normalizeString as normalize, isCSR } from 'lightning/utilsPrivate';
|
|
4
4
|
// remove-next-line-for-c-namespace
|
|
5
5
|
import { Tooltip, TooltipType } from 'lightning/tooltipLibrary';
|
|
6
6
|
import LightningPrimitiveButton from 'lightning/primitiveButton';
|
|
@@ -89,6 +89,7 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
|
|
|
89
89
|
* @default medium
|
|
90
90
|
*/
|
|
91
91
|
_size = DEFAULT_SIZE;
|
|
92
|
+
|
|
92
93
|
@api
|
|
93
94
|
get size() {
|
|
94
95
|
return this._originalSize;
|
|
@@ -319,22 +320,24 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
|
|
|
319
320
|
connectedCallback() {
|
|
320
321
|
super.connectedCallback();
|
|
321
322
|
this._connected = true;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
323
|
+
if (isCSR) {
|
|
324
|
+
this.dispatchEvent(
|
|
325
|
+
new CustomEvent('privatebuttoniconregister', {
|
|
326
|
+
cancelable: true,
|
|
327
|
+
bubbles: true,
|
|
328
|
+
detail: {
|
|
329
|
+
// Tooltip type should be toggle for some consumers like helptext
|
|
330
|
+
setTooltipType: (tooltipType) => {
|
|
331
|
+
this.tooltipType = tooltipType;
|
|
332
|
+
},
|
|
333
|
+
// Title should not be set for some consumers like helptext (see W-12496300)
|
|
334
|
+
showTitle: (showTitle) => {
|
|
335
|
+
this.showTitle = showTitle;
|
|
336
|
+
},
|
|
334
337
|
},
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
+
})
|
|
339
|
+
);
|
|
340
|
+
}
|
|
338
341
|
}
|
|
339
342
|
|
|
340
343
|
renderedCallback() {
|
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
VARIANT,
|
|
20
20
|
} from 'lightning/inputUtils';
|
|
21
21
|
|
|
22
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
23
|
+
|
|
22
24
|
const i18n = {
|
|
23
25
|
required: labelRequired,
|
|
24
26
|
placeholder: labelPlaceholder,
|
|
@@ -30,15 +32,20 @@ const i18n = {
|
|
|
30
32
|
*/
|
|
31
33
|
export default class LightningCombobox extends LightningShadowBaseClass {
|
|
32
34
|
static delegatesFocus = true;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
static validationOptOut = ['class'];
|
|
36
|
+
|
|
37
|
+
_ariaLabelledBy = '';
|
|
38
|
+
_ariaDescribedBy = '';
|
|
39
|
+
_fieldLevelHelp = '';
|
|
40
|
+
_selectedLabel = '';
|
|
41
|
+
_disabled = false;
|
|
42
|
+
_readOnly = false;
|
|
43
|
+
_spinnerActive = false;
|
|
44
|
+
_required = false;
|
|
45
|
+
_variant;
|
|
46
|
+
_helpMessage;
|
|
47
|
+
_labelForId;
|
|
48
|
+
@track _items = [];
|
|
42
49
|
|
|
43
50
|
/**
|
|
44
51
|
* Reserved for internal use. Controls auto-filling of the field.
|
|
@@ -84,12 +91,6 @@ export default class LightningCombobox extends LightningShadowBaseClass {
|
|
|
84
91
|
*/
|
|
85
92
|
@api name;
|
|
86
93
|
|
|
87
|
-
@track _items = [];
|
|
88
|
-
@track _variant;
|
|
89
|
-
@track _helpMessage;
|
|
90
|
-
|
|
91
|
-
_labelForId;
|
|
92
|
-
|
|
93
94
|
renderedCallback() {
|
|
94
95
|
this.synchronizeA11y();
|
|
95
96
|
}
|
|
@@ -376,7 +377,7 @@ export default class LightningCombobox extends LightningShadowBaseClass {
|
|
|
376
377
|
}
|
|
377
378
|
|
|
378
379
|
get templateRootNode() {
|
|
379
|
-
return this.template.host.getRootNode();
|
|
380
|
+
return isCSR ? this.template.host.getRootNode() : null;
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
get i18n() {
|
|
@@ -5,6 +5,7 @@ const DEBOUNCE_KEY_DOWN = 300;
|
|
|
5
5
|
export const DEFAULT_CONFIG = {
|
|
6
6
|
navKey: 'F6',
|
|
7
7
|
f6RegionAttribute: 'data-f6-region',
|
|
8
|
+
f6RegionHighlightClass: 'f6-highlight',
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -33,7 +34,7 @@ export const getActiveElement = (element) => {
|
|
|
33
34
|
* quickly move to designated regions in a page.
|
|
34
35
|
* It handles logic for:
|
|
35
36
|
* - Globally detecting F6 regions (i.e. registered components must have the data attribute stored in config - f6RegionAttribute
|
|
36
|
-
*
|
|
37
|
+
* in their tag, by default, 'data-f6-region')
|
|
37
38
|
* - Handling F6 keypresses by focusing and highlighting F6 regions
|
|
38
39
|
* Supported keyboard shortcuts:
|
|
39
40
|
* - Ctrl/Cmd + F6 to move focus to the next available registered region.
|
|
@@ -71,10 +72,32 @@ export class F6Controller {
|
|
|
71
72
|
appendStyleElement() {
|
|
72
73
|
// all F6 regions must be position relative.
|
|
73
74
|
this._styleElement = document.createElement('style');
|
|
74
|
-
|
|
75
|
+
const selector = `[${this.config.f6RegionAttribute}].${this.config.f6RegionHighlightClass}`;
|
|
76
|
+
this._styleElement.innerText = `${selector} { position: relative; } ${selector}::after { width: 100%; height: 100%; content: ''; outline: rgb(94, 158, 214) 3px solid; outline-offset: -3px; position: absolute; top: 0; left: 0; z-index: 9999; }`;
|
|
75
77
|
this._styleElement.setAttribute('type', 'text/css');
|
|
76
78
|
document.head.appendChild(this._styleElement);
|
|
77
79
|
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Clears all regions of outlines.
|
|
83
|
+
*/
|
|
84
|
+
clearRegionHighlights() {
|
|
85
|
+
if (!this.regions || !this.regions.length) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.regions.forEach((region) => {
|
|
89
|
+
region.classList.remove(this.config.f6RegionHighlightClass);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Outlines the given element with a dashed line.
|
|
95
|
+
* @param {Element} element, element to highlight
|
|
96
|
+
*/
|
|
97
|
+
addRegionHighlight(element) {
|
|
98
|
+
element.classList.add(this.config.f6RegionHighlightClass);
|
|
99
|
+
}
|
|
100
|
+
|
|
78
101
|
/**
|
|
79
102
|
* Find the first focusable element inside of the input element.
|
|
80
103
|
* If no focusable element, set the input element to be focusable.
|
|
@@ -130,7 +153,9 @@ export class F6Controller {
|
|
|
130
153
|
if (adjacentRegionIndex === -1) {
|
|
131
154
|
return;
|
|
132
155
|
}
|
|
133
|
-
this.
|
|
156
|
+
const regionToFocus = this.regions[adjacentRegionIndex];
|
|
157
|
+
this.focusIn(regionToFocus);
|
|
158
|
+
this.addRegionHighlight(regionToFocus);
|
|
134
159
|
}
|
|
135
160
|
|
|
136
161
|
/**
|
|
@@ -320,6 +345,7 @@ export class F6Controller {
|
|
|
320
345
|
*/
|
|
321
346
|
initialize(config = {}) {
|
|
322
347
|
document.addEventListener('keydown', this._debounceKeyDownHandler);
|
|
348
|
+
document.addEventListener('click', this.handleClick);
|
|
323
349
|
this.regions = [];
|
|
324
350
|
this.config = {
|
|
325
351
|
...this.config,
|
|
@@ -331,6 +357,7 @@ export class F6Controller {
|
|
|
331
357
|
/** Removes the event listeners bound in initialize(). */
|
|
332
358
|
cleanUp() {
|
|
333
359
|
document.removeEventListener('keydown', this._debounceKeyDownHandler);
|
|
360
|
+
document.removeEventListener('click', this.handleClick);
|
|
334
361
|
this._regions = [];
|
|
335
362
|
this._config = DEFAULT_CONFIG;
|
|
336
363
|
this._debounceKeyDownHandler = null;
|
|
@@ -340,12 +367,17 @@ export class F6Controller {
|
|
|
340
367
|
}
|
|
341
368
|
}
|
|
342
369
|
|
|
370
|
+
handleClick = () => {
|
|
371
|
+
this.clearRegionHighlights();
|
|
372
|
+
};
|
|
373
|
+
|
|
343
374
|
/**
|
|
344
375
|
* handle document keydown event, move focus to the adjacent region if it detects CTRL/CMD + F6
|
|
345
376
|
* @param {KeyDown} event
|
|
346
377
|
*/
|
|
347
378
|
|
|
348
379
|
handleKeyDown = (event) => {
|
|
380
|
+
this.clearRegionHighlights();
|
|
349
381
|
const { key, ctrlKey, metaKey } = event;
|
|
350
382
|
if (key === this.config.navKey && (ctrlKey || metaKey)) {
|
|
351
383
|
this.populateRegions();
|
|
@@ -371,6 +403,10 @@ export class F6Controller {
|
|
|
371
403
|
|
|
372
404
|
return NodeFilter.FILTER_SKIP;
|
|
373
405
|
};
|
|
406
|
+
|
|
407
|
+
getConfig() {
|
|
408
|
+
return Object.freeze(this.config);
|
|
409
|
+
}
|
|
374
410
|
}
|
|
375
411
|
|
|
376
412
|
let f6Controller;
|
|
@@ -380,3 +416,13 @@ export const createF6Controller = (config) => {
|
|
|
380
416
|
}
|
|
381
417
|
return f6Controller;
|
|
382
418
|
};
|
|
419
|
+
|
|
420
|
+
export const getCurrentRegionAttributeName = () => {
|
|
421
|
+
if (f6Controller) {
|
|
422
|
+
const config = f6Controller.getConfig();
|
|
423
|
+
if (config) {
|
|
424
|
+
return config.f6RegionAttribute;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return undefined;
|
|
428
|
+
};
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
* Other tags and attributes are removed and only their text content is displayed.
|
|
15
15
|
*/
|
|
16
16
|
export default class LightningFormattedRichText extends LightningShadowBaseClass {
|
|
17
|
+
static validationOptOut = ['class'];
|
|
17
18
|
/**
|
|
18
19
|
* If present, the component does not create links in the rich text.
|
|
19
20
|
* @type {boolean}
|
|
@@ -13,6 +13,8 @@ import { normalizeBoolean } from 'lightning/utilsPrivate';
|
|
|
13
13
|
* Represents a responsive grid system for arranging containers on a page.
|
|
14
14
|
*/
|
|
15
15
|
export default class LightningLayout extends LightningShadowBaseClass {
|
|
16
|
+
static validationOptOut = ['class'];
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Determines how to spread the layout items horizontally.
|
|
18
20
|
* The alignment options are center, space, spread, and end.
|
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
* @slot default Placeholder for your content in lightning-layout-item.
|
|
16
16
|
*/
|
|
17
17
|
export default class LightningLayoutItem extends LightningShadowBaseClass {
|
|
18
|
+
static validationOptOut = ['class'];
|
|
19
|
+
|
|
18
20
|
/**
|
|
19
21
|
* Make the item fluid so that it absorbs any extra space in its
|
|
20
22
|
* container or shrinks when there is less space. Allowed values are:
|
|
@@ -2,6 +2,7 @@ import { api, track } from 'lwc';
|
|
|
2
2
|
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
3
|
import {
|
|
4
4
|
isIE11,
|
|
5
|
+
isCSR,
|
|
5
6
|
normalizeBoolean,
|
|
6
7
|
normalizeString,
|
|
7
8
|
buttonGroupOrderClass,
|
|
@@ -149,7 +150,7 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
149
150
|
@api
|
|
150
151
|
set ariaControls(value) {
|
|
151
152
|
this.originalAriaControls = value;
|
|
152
|
-
this.
|
|
153
|
+
this.setAttribute('aria-controls', value);
|
|
153
154
|
this.setHostRoleAttribute(BUTTON);
|
|
154
155
|
}
|
|
155
156
|
|
|
@@ -165,7 +166,7 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
165
166
|
@api
|
|
166
167
|
set ariaOwns(value) {
|
|
167
168
|
this.originalAriaOwns = value;
|
|
168
|
-
this.
|
|
169
|
+
this.setAttribute('aria-owns', value);
|
|
169
170
|
this.setHostRoleAttribute(BUTTON);
|
|
170
171
|
}
|
|
171
172
|
|
|
@@ -181,7 +182,7 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
181
182
|
@api
|
|
182
183
|
set ariaDetails(value) {
|
|
183
184
|
this.originalAriaDetails = value;
|
|
184
|
-
this.
|
|
185
|
+
this.setAttribute('aria-details', value);
|
|
185
186
|
this.setHostRoleAttribute(BUTTON);
|
|
186
187
|
}
|
|
187
188
|
|
|
@@ -197,7 +198,7 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
197
198
|
@api
|
|
198
199
|
set ariaFlowTo(value) {
|
|
199
200
|
this.originalAriaFlowTo = value;
|
|
200
|
-
this.
|
|
201
|
+
this.setAttribute('aria-flowto', value);
|
|
201
202
|
this.setHostRoleAttribute(BUTTON);
|
|
202
203
|
}
|
|
203
204
|
|
|
@@ -453,7 +454,7 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
453
454
|
// Workaround for an IE11 bug where click handlers on button ancestors
|
|
454
455
|
// receive the click event even if the button element has the `disabled`
|
|
455
456
|
// attribute set.
|
|
456
|
-
if (isIE11) {
|
|
457
|
+
if (isIE11 && isCSR) {
|
|
457
458
|
this.template.addEventListener('click', (event) => {
|
|
458
459
|
if (this.disabled) {
|
|
459
460
|
event.stopImmediatePropagation();
|
|
@@ -487,9 +488,8 @@ export default class LightningPrimitiveButton extends LightningShadowBaseClass {
|
|
|
487
488
|
* @default undefined
|
|
488
489
|
*/
|
|
489
490
|
setHostRoleAttribute(value) {
|
|
490
|
-
|
|
491
|
-
let ariaRoleValue = hostElement.getAttribute(ROLE) || value;
|
|
491
|
+
let ariaRoleValue = this.getAttribute(ROLE) || value;
|
|
492
492
|
|
|
493
|
-
|
|
493
|
+
this.setAttribute(ROLE, ariaRoleValue);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
@@ -24,8 +24,8 @@ h6 {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
a {
|
|
27
|
-
color: var(--slds-g-color-brand-base-50, #0176d3);
|
|
28
|
-
text-decoration: none;
|
|
27
|
+
color: var(--slds-g-link-color, var(--slds-g-color-brand-base-50, #0176d3));
|
|
28
|
+
text-decoration: var(--_slds-g-font-decoration, none);
|
|
29
29
|
transition: color 0.1s linear;
|
|
30
30
|
background-color: transparent;
|
|
31
31
|
}
|
|
@@ -37,16 +37,24 @@ a:hover {
|
|
|
37
37
|
|
|
38
38
|
a:hover,
|
|
39
39
|
a:focus {
|
|
40
|
-
text-decoration: underline;
|
|
41
|
-
color: var(--slds-g-color-brand-base-30, #014486);
|
|
40
|
+
text-decoration: var(--_slds-g-font-decoration-hover, underline);
|
|
41
|
+
color: var(--slds-g-link-color-hover, var(--slds-g-color-brand-base-30, #014486));
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
a:active {
|
|
45
|
-
color: var(--slds-g-color-brand-base-30, #014486);
|
|
45
|
+
color: var(--slds-g-link-color-active, var(--slds-g-color-brand-base-30, #014486));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
a:focus-visible {
|
|
49
|
-
outline-color: var(--slds-g-color-brand-base-50, #0176d3);
|
|
49
|
+
outline-color: var(--_slds-g-color-outline, var(--slds-g-color-brand-base-50, #0176d3));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
a:focus {
|
|
53
|
+
box-shadow: var(--_slds-g-shadow);
|
|
54
|
+
border-color: var(--_slds-g-color-border);
|
|
55
|
+
border-width: var(--_slds-g-sizing-border);
|
|
56
|
+
border-style: var(--_slds-g-style-border);
|
|
57
|
+
outline: var(--_slds-g-font-decoration-hover);
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
a,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
|
|
2
2
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
3
3
|
|
|
4
|
-
.slds-is-static {
|
|
4
|
+
:host([data-render-mode="shadow"]) .slds-is-static {
|
|
5
5
|
position: static;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.slds-is-relative {
|
|
8
|
+
:host([data-render-mode="shadow"]) .slds-is-relative {
|
|
9
9
|
position: relative;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.slds-is-fixed {
|
|
12
|
+
:host([data-render-mode="shadow"]) .slds-is-fixed {
|
|
13
13
|
position: fixed;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.slds-is-absolute {
|
|
16
|
+
:host([data-render-mode="shadow"]) .slds-is-absolute {
|
|
17
17
|
position: absolute;
|
|
18
18
|
}
|