lightning-base-components 1.21.3-alpha → 1.21.4-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 +49 -0
- package/package.json +88 -21
- package/scopedImports/@salesforce-label-LightningDatatable.showActions.js +1 -1
- package/scopedImports/@salesforce-label-LightningForm.controllerFieldsMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.dependentFieldsHeader.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.dependentFieldsListHeading.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.generalDependentFieldsMessage.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.learnMore.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.okButton.js +1 -0
- package/scopedImports/@salesforce-label-LightningLookup.modalCancel.js +1 -0
- package/scopedImports/@salesforce-label-LightningLookup.modalSelect.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressIndicator.currentStage.js +1 -1
- package/scopedImports/@salesforce-label-LightningProgressIndicator.errorStage.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressIndicator.stageComplete.js +1 -1
- package/scopedImports/@salesforce-label-LightningProgressIndicator.stageNotStarted.js +1 -1
- package/src/lightning/avatar/avatar.html +1 -0
- package/src/lightning/badge/badge.html +3 -3
- package/src/lightning/baseCombobox/baseCombobox.html +4 -1
- package/src/lightning/baseCombobox/baseCombobox.js +3 -16
- package/src/lightning/button/__docs__/button.md +2 -1
- package/src/lightning/button/button.js +3 -4
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +1 -0
- package/src/lightning/buttonIcon/buttonIcon.html +1 -1
- package/src/lightning/buttonIcon/buttonIcon.js +18 -17
- package/src/lightning/buttonMenu/buttonMenu.css +5 -0
- package/src/lightning/buttonMenu/buttonMenu.js +2 -0
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +12 -0
- package/src/lightning/colorPickerPanel/colorPickerPanel.js +11 -1
- package/src/lightning/combobox/combobox.html +1 -0
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.html +11 -0
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.js +25 -0
- package/src/lightning/datatable/__examples__disabled/customComponentWrapper/generateData.js +15 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/customInput.html +4 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/myCustomTypeDatatable.js +17 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/nestedSimpleComponentParent.html +7 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.html +9 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.js +6 -0
- package/src/lightning/datatable/autoWidthStrategy.js +8 -36
- package/src/lightning/datatable/columnResizer.js +51 -161
- package/src/lightning/datatable/columnWidthManager.js +25 -81
- package/src/lightning/datatable/columns.js +180 -302
- package/src/lightning/datatable/datatable.js +455 -441
- package/src/lightning/datatable/errors.js +17 -29
- package/src/lightning/datatable/fixedWidthStrategy.js +7 -22
- package/src/lightning/datatable/headerActions.js +8 -38
- package/src/lightning/datatable/indexes.js +42 -0
- package/src/lightning/datatable/infiniteLoading.js +16 -35
- package/src/lightning/datatable/inlineEdit.js +125 -156
- package/src/lightning/datatable/keyboard.js +226 -282
- package/src/lightning/datatable/renderManager.js +0 -4
- package/src/lightning/datatable/resizeObserver.js +4 -13
- package/src/lightning/datatable/rowLevelActions.js +2 -2
- package/src/lightning/datatable/rowNumber.js +21 -59
- package/src/lightning/datatable/rowSelection.js +95 -178
- package/src/lightning/datatable/rowSelectionShared.js +13 -27
- package/src/lightning/datatable/rows.js +171 -418
- package/src/lightning/datatable/sort.js +16 -75
- package/src/lightning/datatable/templates/div/div.html +12 -4
- package/src/lightning/datatable/templates/div/div.lbc.synthetic.css +10 -16
- package/src/lightning/datatable/templates/table/table.html +15 -5
- package/src/lightning/datatable/tree.js +17 -35
- package/src/lightning/datatable/types.js +10 -31
- package/src/lightning/datatable/utils.js +49 -24
- package/src/lightning/datatable/virtualization.js +2 -5
- package/src/lightning/datatable/widthManagerShared.js +0 -20
- package/src/lightning/datatable/wrapText.js +29 -60
- package/src/lightning/dualListbox/dualListbox.js +7 -8
- package/src/lightning/formattedName/formattedName.js +3 -2
- package/src/lightning/formattedName/formattedName.js-meta.xml +3 -0
- package/src/lightning/formattedNumber/formattedNumber.js +3 -2
- package/src/lightning/formattedNumber/formattedNumber.js-meta.xml +3 -0
- package/src/lightning/formattedRichText/richTextConfig.js +1 -0
- package/src/lightning/helptext/helptext.css +7 -0
- package/src/lightning/helptext/helptext.js +3 -4
- package/src/lightning/icon/icon.html +1 -1
- package/src/lightning/input/input.html +5 -0
- package/src/lightning/inputAddress/addressFormat.js +31 -4
- package/src/lightning/inputAddress/fieldsLayout.js +6 -0
- package/src/lightning/inputAddress/inputAddress.html +19 -1
- package/src/lightning/inputAddress/inputAddress.js +74 -3
- package/src/lightning/internationalizationLibrary/address/AddressFormat.js +553 -610
- package/src/lightning/lookupAddress/lookupAddress.html +6 -1
- package/src/lightning/lookupAddress/lookupAddress.js +25 -0
- package/src/lightning/modal/__docs__/modal.md +10 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +3 -7
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +39 -133
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +1 -1
- package/src/lightning/modal/modal.js +1 -1
- package/src/lightning/modalBase/modalBase.html +15 -10
- package/src/lightning/modalBase/modalBase.js +131 -146
- package/src/lightning/modalBody/modalBody.css +6 -0
- package/src/lightning/modalHeader/modalHeader.html +16 -4
- package/src/lightning/modalHeader/modalHeader.js +61 -14
- package/src/lightning/pill/link.html +1 -0
- package/src/lightning/pill/plain.html +1 -0
- package/src/lightning/pill/plainLink.html +1 -0
- package/src/lightning/primitiveBubble/primitiveBubble.js +42 -0
- package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.html +1 -1
- package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.js +13 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +19 -6
- package/src/lightning/primitiveHeaderFactory/sortableHeader.html +3 -1
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.css +11 -0
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.html +2 -1
- package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.js +1 -0
- package/src/lightning/progressStep/base.html +5 -6
- package/src/lightning/progressStep/progressStep.js +14 -9
- package/src/lightning/prompt/__docs__/prompt.md +1 -1
- package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +0 -2
- package/src/lightning/sldsCommon/sldsCommon.css +134 -98
- package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +1 -1
- package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +14 -13
- package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +95 -92
- package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +1 -1
- package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +77 -75
- package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +73 -73
- package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +552 -558
- package/src/lightning/sldsUtilsVisibility/sldsUtilsVisibility.css +2 -2
- package/src/lightning/staticMap/staticMap.js +3 -2
- package/src/lightning/tab/tab.js +6 -3
- package/src/lightning/tab/tab.js-meta.xml +3 -0
- package/src/lightning/tabBar/tabBar.js +10 -5
- package/src/lightning/tabset/tabset.html +2 -0
- package/src/lightning/tabset/tabset.js-meta.xml +3 -0
- package/src/lightning/textarea/textarea.js +6 -1
- package/src/lightning/toastContainer/__docs__/toastContainer.md +3 -2
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +24 -15
- package/src/lightning/verticalNavigation/vertical-navigation.slds.css +14 -0
- package/src/lightning/verticalNavigation/verticalNavigation.css +1 -1
- package/src/lightning/verticalNavigation/verticalNavigation.html +1 -1
- package/src/lightning/verticalNavigation/verticalNavigation.js +66 -28
- package/src/lightning/verticalNavigation/verticalNavigation.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.css +2 -3
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.js +29 -15
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.native.css +2 -0
- package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationItemBadge/badge.slds.css +76 -0
- package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.css +2 -3
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.html +1 -1
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js +28 -15
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.native.css +5 -0
- package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.css +2 -3
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js +29 -15
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.native.css +3 -0
- package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.synthetic.css +3 -0
- package/src/lightning/verticalNavigationOverflow/button.slds.css +503 -0
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +63 -0
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-section.slds.css +17 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.css +2 -1
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.html +2 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js +18 -13
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js-meta.xml +3 -0
- package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.lbc.native.css +5 -0
- package/src/lightning/verticalNavigationSection/vertical-navigation-section.slds.css +14 -14
- package/src/lightning/verticalNavigationSection/verticalNavigationSection.js-meta.xml +3 -0
- package/src/lightning/datatable/inlineEditShared.js +0 -26
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatableWrapper/customDatatableWrapper.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatableWrapper/customDatatableWrapper.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeLink/customDatatypeLink.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeLink/customDatatypeLink.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customDatatypeTable.js +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customLink.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customName.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customNumber.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customNumberEdit.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/deleteRow.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/iconPill.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/orderingButtons.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customNestedComponent/customNestedComponent.html +0 -0
- /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customNestedComponent/customNestedComponent.js +0 -0
|
@@ -6,7 +6,7 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
6
6
|
Corresponding Work Item: W-14458332
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
.slds-assistive-text {
|
|
9
|
+
:host([data-render-mode='shadow']) .slds-assistive-text {
|
|
10
10
|
position: absolute !important;
|
|
11
11
|
margin: -1px !important;
|
|
12
12
|
border: 0 !important;
|
|
@@ -19,6 +19,6 @@ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
|
19
19
|
white-space: nowrap !important;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.slds-hide {
|
|
22
|
+
:host([data-render-mode='shadow']) .slds-hide {
|
|
23
23
|
display: none !important;
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@ import lang from '@salesforce/i18n/lang';
|
|
|
2
2
|
import formFactor from '@salesforce/client/formFactor';
|
|
3
3
|
import labelTitleWithAddress from '@salesforce/label/LightningMap.titleWithAddress';
|
|
4
4
|
import labelTitleWithoutAddress from '@salesforce/label/LightningMap.iframeTitle';
|
|
5
|
-
import {
|
|
5
|
+
import { api, track } from 'lwc';
|
|
6
6
|
import { ratioToScale, calculateSize } from './util';
|
|
7
7
|
import {
|
|
8
8
|
registerMessageHandler,
|
|
@@ -14,6 +14,7 @@ import { buildMapSourceUrl } from 'lightning/mapUtils';
|
|
|
14
14
|
import { isEmptyString } from 'lightning/inputUtils';
|
|
15
15
|
import { formatLabel } from 'lightning/utils';
|
|
16
16
|
import { isCSR } from 'lightning/utilsPrivate';
|
|
17
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
17
18
|
|
|
18
19
|
const EVENT_NAME = {
|
|
19
20
|
LOADING_MAP: 'loadingMap',
|
|
@@ -25,7 +26,7 @@ const i18n = {
|
|
|
25
26
|
titleWithoutAddress: labelTitleWithoutAddress,
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
export default class LightningStaticMap extends
|
|
29
|
+
export default class LightningStaticMap extends LightningShadowBaseClass {
|
|
29
30
|
@api width;
|
|
30
31
|
@api height;
|
|
31
32
|
@api street;
|
package/src/lightning/tab/tab.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { api, track } from 'lwc';
|
|
2
2
|
import { normalizeBoolean } from 'lightning/utilsPrivate';
|
|
3
3
|
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
4
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
4
5
|
/**
|
|
5
6
|
* A single tab in a tabset component.
|
|
6
7
|
* @slot default Placeholder for your content in lightning-tab.
|
|
@@ -12,7 +13,7 @@ export default class LightningTab extends LightningShadowBaseClass {
|
|
|
12
13
|
connectedCallback() {
|
|
13
14
|
super.connectedCallback();
|
|
14
15
|
this._connected = true;
|
|
15
|
-
if (this.template.synthetic) {
|
|
16
|
+
if (isCSR && this.template.synthetic) {
|
|
16
17
|
this.dispatchEvent(
|
|
17
18
|
new CustomEvent('privatetabregister', {
|
|
18
19
|
cancelable: true,
|
|
@@ -55,7 +56,9 @@ export default class LightningTab extends LightningShadowBaseClass {
|
|
|
55
56
|
loadContent() {
|
|
56
57
|
this._loadContent = true;
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
if (isCSR) {
|
|
60
|
+
this.dispatchEvent(new CustomEvent('active'));
|
|
61
|
+
}
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
disconnectedCallback() {
|
|
@@ -185,7 +188,7 @@ export default class LightningTab extends LightningShadowBaseClass {
|
|
|
185
188
|
}
|
|
186
189
|
|
|
187
190
|
_dispatchDataChangeEventIfConnected() {
|
|
188
|
-
if (this._connected) {
|
|
191
|
+
if (isCSR && this._connected) {
|
|
189
192
|
this.dispatchEvent(
|
|
190
193
|
new CustomEvent('privatetabdatachange', {
|
|
191
194
|
cancelable: true,
|
|
@@ -11,6 +11,7 @@ import { calculateOverflow } from 'lightning/overflowLibrary';
|
|
|
11
11
|
import { LightningResizeObserver } from 'lightning/resizeObserver';
|
|
12
12
|
import { handleKeyDownOnTabList } from './keyboard';
|
|
13
13
|
import AriaObserver from 'lightning/ariaObserver';
|
|
14
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
14
15
|
|
|
15
16
|
const i18n = {
|
|
16
17
|
more: labelOverflowMore,
|
|
@@ -44,7 +45,9 @@ export default class LightningTabBar extends LightningShadowBaseClass {
|
|
|
44
45
|
if (this.overflowSupported) {
|
|
45
46
|
this._queueOverflow();
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
+
if (isCSR) {
|
|
49
|
+
this.ariaObserver = new AriaObserver(this);
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
renderedCallback() {
|
|
@@ -74,7 +77,7 @@ export default class LightningTabBar extends LightningShadowBaseClass {
|
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
get tabLinks() {
|
|
77
|
-
return this.template.querySelectorAll(`a[role="tab"]`);
|
|
80
|
+
return isCSR ? this.template.querySelectorAll(`a[role="tab"]`) : null;
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
disconnectedCallback() {
|
|
@@ -169,7 +172,7 @@ export default class LightningTabBar extends LightningShadowBaseClass {
|
|
|
169
172
|
|
|
170
173
|
this._queueSynchronizeA11 = true;
|
|
171
174
|
|
|
172
|
-
if (this._connected && this.overflowSupported) {
|
|
175
|
+
if (isCSR && this._connected && this.overflowSupported) {
|
|
173
176
|
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
174
177
|
requestAnimationFrame(this._queueOverflow.bind(this));
|
|
175
178
|
}
|
|
@@ -473,8 +476,10 @@ export default class LightningTabBar extends LightningShadowBaseClass {
|
|
|
473
476
|
this._allTabs.forEach((tab) => {
|
|
474
477
|
tab.visible = true;
|
|
475
478
|
});
|
|
476
|
-
|
|
477
|
-
|
|
479
|
+
if (isCSR) {
|
|
480
|
+
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
481
|
+
requestAnimationFrame(this._recomputeOverflow.bind(this));
|
|
482
|
+
}
|
|
478
483
|
}
|
|
479
484
|
|
|
480
485
|
_recomputeOverflow() {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
onprivatetablinkregister={handleTabLinkRegister}
|
|
10
10
|
>{headingLabel}</div>
|
|
11
11
|
<lightning-tab-bar
|
|
12
|
+
exportparts="tab-bar, tab-item"
|
|
12
13
|
variant={variant}
|
|
13
14
|
onselect={handleTabSelected}
|
|
14
15
|
aria-labelledby="tabset-heading"
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
</template>
|
|
18
19
|
<template lwc:else>
|
|
19
20
|
<lightning-tab-bar
|
|
21
|
+
exportparts="tab-bar, tab-item"
|
|
20
22
|
variant={variant}
|
|
21
23
|
onselect={handleTabSelected}
|
|
22
24
|
aria-label={defaultAriaLabel}
|
|
@@ -424,6 +424,9 @@ export default class LightningTextarea extends LightningShadowBaseClass {
|
|
|
424
424
|
|
|
425
425
|
connectedCallback() {
|
|
426
426
|
super.connectedCallback();
|
|
427
|
+
if (!this.ariaObserver) {
|
|
428
|
+
this.ariaObserver = new AriaObserver(this);
|
|
429
|
+
}
|
|
427
430
|
this.updateHostClassList();
|
|
428
431
|
this._connected = true;
|
|
429
432
|
this.interactingState = new InteractingState();
|
|
@@ -431,7 +434,9 @@ export default class LightningTextarea extends LightningShadowBaseClass {
|
|
|
431
434
|
}
|
|
432
435
|
|
|
433
436
|
renderedCallback() {
|
|
434
|
-
|
|
437
|
+
if (this.isConnected) {
|
|
438
|
+
this.ariaObserver.sync(this._isNativeShadow);
|
|
439
|
+
}
|
|
435
440
|
// IE11: This is needed to work-around IE11 issue where it would append default value to the place holder,
|
|
436
441
|
// instead of actually setting the value on the textarea element.
|
|
437
442
|
if (!this._rendered) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Use the `lightning/toastContainer` module
|
|
1
|
+
Use the `lightning/toastContainer` module to manage a list of toast components and their order. Each site page supports a single toast container. You can create toast notifications with [lightning/toast](/docs/component-library/bundle/lightning-toast/documentation) and manage them using `lightning/toastContainer`.
|
|
2
2
|
|
|
3
3
|
This module is available only for LWR Sites for Experience Cloud. For more information, see [Create Components for LWR Sites](https://developer.salesforce.com/docs/atlas.en-us.exp_cloud_lwr.meta/exp_cloud_lwr/get_started_components.htm).
|
|
4
4
|
|
|
@@ -34,6 +34,7 @@ export default class MyApp extends LightningElement {
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
#### Accessibility
|
|
37
|
+
|
|
37
38
|
Toast container follows the SLDS [Global Focus Orchestration](https://www.lightningdesignsystem.com/accessibility/guidelines/global-focus/#global-orchestration) accessibility guidelines, which allow users to use the keyboard shortcut to navigate between toasts.
|
|
38
39
|
- Press `Control` + `F6` or `Command` + `F6` for Mac OS to move focus to next toast, if any.
|
|
39
|
-
- Press `Shift` + `Control` + `F6` or `Shift` + `Command` + `F6` for Mac OS to move focus to the previous toast, if any.
|
|
40
|
+
- Press `Shift` + `Control` + `F6` or `Shift` + `Command` + `F6` for Mac OS to move focus to the previous toast, if any.
|
|
@@ -228,31 +228,40 @@ export class Tooltip {
|
|
|
228
228
|
const target = this._target();
|
|
229
229
|
|
|
230
230
|
if (!this._initialized && target) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
['mouseenter', 'focus'].forEach((name) =>
|
|
236
|
-
target.addEventListener(name, (event) => this.show(event))
|
|
231
|
+
['touchstart', 'click'].forEach((eventName) =>
|
|
232
|
+
target.addEventListener(eventName, (event) =>
|
|
233
|
+
this.toggleIfTouchOrClick(event)
|
|
234
|
+
)
|
|
237
235
|
);
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
|
|
237
|
+
['mouseenter', 'focus'].forEach((eventName) =>
|
|
238
|
+
target.addEventListener(eventName, (event) => this.show(event))
|
|
239
|
+
);
|
|
240
|
+
['mouseleave', 'blur'].forEach((eventName) =>
|
|
241
|
+
target.addEventListener(eventName, (event) =>
|
|
240
242
|
this.hideIfNotSelfCover(event)
|
|
241
243
|
)
|
|
242
244
|
);
|
|
243
245
|
|
|
244
246
|
target.addEventListener('keydown', (event) => {
|
|
245
|
-
if (event.
|
|
246
|
-
this.
|
|
247
|
-
|
|
248
|
-
this.hide();
|
|
249
|
-
if (event.key === 'Escape') {
|
|
250
|
-
event.stopPropagation();
|
|
251
|
-
}
|
|
247
|
+
if (event.key === 'Escape' && this._visible) {
|
|
248
|
+
this.hideIfNotSelfCover(event);
|
|
249
|
+
event.stopPropagation();
|
|
252
250
|
}
|
|
253
251
|
});
|
|
254
252
|
}
|
|
255
253
|
}
|
|
254
|
+
|
|
255
|
+
/* mobile listens for both 'click' and 'touchstart', but we only want to listen to
|
|
256
|
+
either 'touchstart' and not 'click', otherwise it will double toggle. Call preventDefault() to prevent the
|
|
257
|
+
'click' event from bubbling after a 'touchstart' is detected on mobile.
|
|
258
|
+
*/
|
|
259
|
+
toggleIfTouchOrClick(e) {
|
|
260
|
+
e.preventDefault();
|
|
261
|
+
e.stopPropagation();
|
|
262
|
+
this.toggle();
|
|
263
|
+
}
|
|
264
|
+
|
|
256
265
|
handleEscape(e) {
|
|
257
266
|
if (e.key === 'Escape' && this._isFocusEvent) {
|
|
258
267
|
e.stopPropagation();
|
|
@@ -2,3 +2,17 @@
|
|
|
2
2
|
:host([data-render-mode="shadow"]) [part='vertical-navigation'] {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
|
+
|
|
6
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical_compact {
|
|
7
|
+
--slds-c-verticalnavigationitem-spacing-blockstart: var(--slds-g-spacing-1);
|
|
8
|
+
--slds-c-verticalnavigationitem-spacing-blockend: var(--slds-g-spacing-1);
|
|
9
|
+
--slds-c-verticalnavigationitem-spacing-inlinestart: var(--slds-g-spacing-5);
|
|
10
|
+
--slds-c-verticalnavigationsection-spacing-blockstart: var(--slds-g-spacing-1);
|
|
11
|
+
--slds-c-verticalnavigationsection-spacing-blockend: var(--slds-g-spacing-1);
|
|
12
|
+
--slds-c-verticalnavigationsection-spacing-inlinestart: var(--slds-g-spacing-5);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical_shade {
|
|
16
|
+
--slds-c-verticalnavigationitem-color: var(--slds-g-color-neutral-base-100);
|
|
17
|
+
--slds-c-verticalnavigationitem-border-color: var(--slds-g-color-neutral-base-90);
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './verticalNavigation.lbc.native.css';
|
|
1
|
+
@import './verticalNavigation.lbc.native.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<nav class={computedClass}
|
|
2
|
+
<nav class={computedClass} aria-label={ariaLabel} part="vertical-navigation">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</nav>
|
|
5
5
|
</template>
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
assert,
|
|
6
6
|
normalizeBoolean,
|
|
7
7
|
normalizeString,
|
|
8
|
+
isCSR,
|
|
8
9
|
} from 'lightning/utilsPrivate';
|
|
9
10
|
import subPage from '@salesforce/label/LightningVerticalNavigation.subPage';
|
|
10
11
|
|
|
@@ -98,6 +99,37 @@ export default class LightningVerticalNavigation extends LightningShadowBaseClas
|
|
|
98
99
|
return classes.toString();
|
|
99
100
|
}
|
|
100
101
|
|
|
102
|
+
connectedCallback() {
|
|
103
|
+
super.connectedCallback();
|
|
104
|
+
this.addItemEventListeners();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
addItemEventListeners() {
|
|
108
|
+
if (isCSR) {
|
|
109
|
+
this.addEventListener(
|
|
110
|
+
'privateitemregister',
|
|
111
|
+
this.handleItemRegister.bind(this)
|
|
112
|
+
);
|
|
113
|
+
this.addEventListener(
|
|
114
|
+
'privateitemselect',
|
|
115
|
+
this.handleItemSelect.bind(this)
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
removeItemEventListeners() {
|
|
121
|
+
if (isCSR) {
|
|
122
|
+
this.removeEventListener(
|
|
123
|
+
'privateitemregister',
|
|
124
|
+
this.handleItemRegister.bind(this)
|
|
125
|
+
);
|
|
126
|
+
this.removeEventListener(
|
|
127
|
+
'privateitemselect',
|
|
128
|
+
this.handleItemSelect.bind(this)
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
101
133
|
/**
|
|
102
134
|
* @name verticalNavigationItems
|
|
103
135
|
* @type {Array}
|
|
@@ -142,35 +174,41 @@ export default class LightningVerticalNavigation extends LightningShadowBaseClas
|
|
|
142
174
|
* @param {String} itemName - label of the selected child navigation item.
|
|
143
175
|
*/
|
|
144
176
|
selectNavigationItem(itemName) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.dispatchEvent(beforeselectevent);
|
|
153
|
-
|
|
154
|
-
if (!beforeselectevent.defaultPrevented) {
|
|
155
|
-
// select navigation item
|
|
156
|
-
this.verticalNavigationItems.forEach((navigationItem) => {
|
|
157
|
-
if (navigationItem.name === itemName) {
|
|
158
|
-
navigationItem.callbacks.select();
|
|
159
|
-
} else {
|
|
160
|
-
navigationItem.callbacks.deselect();
|
|
161
|
-
}
|
|
177
|
+
if (isCSR) {
|
|
178
|
+
// dispatch before events
|
|
179
|
+
const beforeselectevent = new CustomEvent('beforeselect', {
|
|
180
|
+
cancelable: true,
|
|
181
|
+
detail: {
|
|
182
|
+
name: itemName,
|
|
183
|
+
},
|
|
162
184
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
this.dispatchEvent(beforeselectevent);
|
|
186
|
+
|
|
187
|
+
if (!beforeselectevent.defaultPrevented) {
|
|
188
|
+
// select navigation item
|
|
189
|
+
this.verticalNavigationItems.forEach((navigationItem) => {
|
|
190
|
+
if (navigationItem.name === itemName) {
|
|
191
|
+
navigationItem.callbacks.select();
|
|
192
|
+
} else {
|
|
193
|
+
navigationItem.callbacks.deselect();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
// update state
|
|
197
|
+
this._selectedItem = itemName;
|
|
198
|
+
|
|
199
|
+
// fire after events
|
|
200
|
+
this.dispatchEvent(
|
|
201
|
+
new CustomEvent('select', {
|
|
202
|
+
detail: {
|
|
203
|
+
name: itemName,
|
|
204
|
+
},
|
|
205
|
+
})
|
|
206
|
+
);
|
|
207
|
+
}
|
|
174
208
|
}
|
|
175
209
|
}
|
|
210
|
+
|
|
211
|
+
disconnectedCallback() {
|
|
212
|
+
this.removeItemEventListeners();
|
|
213
|
+
}
|
|
176
214
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical__action {
|
|
3
|
+
--slds-c-icon-color-foreground-default: currentcolor;
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
width: 100%;
|
|
9
|
+
padding-block-start: var(--slds-c-verticalnavigationitem-spacing-blockstart, var(--slds-g-spacing-2));
|
|
10
|
+
padding-block-end: var(--slds-c-verticalnavigationitem-spacing-blockend, var(--slds-g-spacing-2));
|
|
11
|
+
padding-inline-start: var(--slds-c-verticalnavigationitem-spacing-inlinestart, var(--slds-g-spacing-6));
|
|
12
|
+
padding-inline-end: var(--slds-c-verticalnavigationitem-spacing-inlineend, var(--slds-g-spacing-5));
|
|
13
|
+
border-block-start: var(--slds-g-sizing-border-1) solid transparent;
|
|
14
|
+
border-block-end: var(--slds-g-sizing-border-1) solid transparent;
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
box-shadow: inset 0 0 0 var(--slds-g-color-brand-base-60);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
color: var(--slds-g-color-neutral-base-10);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical__action_overflow {
|
|
22
|
+
--slds-c-button-neutral-font-lineheight: default;
|
|
23
|
+
--slds-c-icon-color-foreground: var(--slds-g-color-neutral-base-50);
|
|
24
|
+
|
|
25
|
+
width: inherit;
|
|
26
|
+
border-block-start: 1px solid transparent;
|
|
27
|
+
border-block-end: 1px solid transparent;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical__action-text {
|
|
31
|
+
color: var(--slds-g-color-brand-base-50);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical__action:hover {
|
|
35
|
+
box-shadow: inset 2px 0 0 var(--slds-g-color-brand-base-60);
|
|
36
|
+
color: currentcolor;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([data-render-mode="shadow"]) .slds-nav-vertical__action:focus {
|
|
40
|
+
text-decoration: underline;
|
|
41
|
+
color: currentcolor;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([data-render-mode="shadow"].slds-nav-vertical__item) {
|
|
45
|
+
position: relative;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([data-render-mode="shadow"].slds-nav-vertical__item:focus-within) {
|
|
49
|
+
box-shadow: inset 0 0 0 1px var(--slds-g-color-brand-base-60);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([data-render-mode="shadow"].slds-nav-vertical__item:hover),:host([data-render-mode="shadow"].slds-nav-vertical__item.slds-is-active) {
|
|
53
|
+
background: var(--slds-c-verticalnavigationitem-color, var(--slds-g-color-brand-base-95));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-render-mode="shadow"].slds-is-active) .slds-nav-vertical__action:not(:focus) {
|
|
57
|
+
border-color: var(--slds-c-verticalnavigationitem-border-color, transparent);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([data-render-mode="shadow"].slds-nav-vertical__item.slds-is-active) .slds-nav-vertical__action {
|
|
61
|
+
font-weight: bold;
|
|
62
|
+
box-shadow: inset 4px 0 0 var(--slds-g-color-brand-base-60);
|
|
63
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
@import './verticalNavigationItem.lbc.synthetic.css';
|
|
2
|
+
@import './verticalNavigationItem.lbc.native.css';
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { api, track } from 'lwc';
|
|
2
|
+
import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
|
|
3
|
+
import { isCSR } from 'lightning/utilsPrivate';
|
|
2
4
|
|
|
3
5
|
const DEFAULT_HREF = 'javascript:void(0);'; // eslint-disable-line no-script-url
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* A text-only link within lightning-vertical-navigation-section or lightning-vertical-navigation-overflow.
|
|
7
9
|
*/
|
|
8
|
-
export default class LightningVerticalNavigationItem extends
|
|
10
|
+
export default class LightningVerticalNavigationItem extends LightningShadowBaseClass {
|
|
11
|
+
static validationOptOut = ['class'];
|
|
12
|
+
_rendered = false;
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* The text displayed for the navigation item.
|
|
11
16
|
* @type {string}
|
|
@@ -30,21 +35,30 @@ export default class LightningVerticalNavigationItem extends LightningElement {
|
|
|
30
35
|
@track _selected = false;
|
|
31
36
|
|
|
32
37
|
connectedCallback() {
|
|
38
|
+
super.connectedCallback();
|
|
33
39
|
this.setAttribute('role', 'listitem');
|
|
34
40
|
this.classList.add('slds-nav-vertical__item');
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
if (isCSR) {
|
|
42
|
+
this.dispatchEvent(
|
|
43
|
+
new CustomEvent('privateitemregister', {
|
|
44
|
+
bubbles: true,
|
|
45
|
+
cancelable: true,
|
|
46
|
+
detail: {
|
|
47
|
+
callbacks: {
|
|
48
|
+
select: this.select.bind(this),
|
|
49
|
+
deselect: this.deselect.bind(this),
|
|
50
|
+
},
|
|
51
|
+
name: this.name,
|
|
43
52
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
renderedCallback() {
|
|
59
|
+
if (!this._rendered) {
|
|
60
|
+
this._rendered = true;
|
|
61
|
+
}
|
|
48
62
|
}
|
|
49
63
|
|
|
50
64
|
select() {
|
|
@@ -58,7 +72,7 @@ export default class LightningVerticalNavigationItem extends LightningElement {
|
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
get ariaCurrent() {
|
|
61
|
-
return this._selected ? 'page' : null;
|
|
75
|
+
return this._selected && this._rendered ? 'page' : null;
|
|
62
76
|
}
|
|
63
77
|
|
|
64
78
|
handleClick(event) {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
:host([data-render-mode="shadow"]) [part="badge"] {
|
|
3
|
+
/**
|
|
4
|
+
* Remap to SLDS blueprint hooks for parity
|
|
5
|
+
* https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
/* stylelint-disable */
|
|
9
|
+
--slds-c-badge-font-lineheight: var(--slds-c-badge-line-height);
|
|
10
|
+
/* stylelint-enable */
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
|
|
14
|
+
color: var(--slds-c-badge-text-color, var(--slds-g-color-on-surface-3));
|
|
15
|
+
font-size: var(--slds-c-badge-font-size, var(--slds-g-font-scale-neg-2));
|
|
16
|
+
font-weight: var(--slds-g-font-weight-7);
|
|
17
|
+
/* stylelint-disable */
|
|
18
|
+
line-height: var(--slds-c-badge-font-lineheight, initial);
|
|
19
|
+
/* stylelint-enable */
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
border-width: var(--slds-c-badge-sizing-border, var(--slds-g-sizing-border-1));
|
|
22
|
+
border-style: solid;
|
|
23
|
+
border-color: var(--slds-c-badge-color-border, transparent);
|
|
24
|
+
border-radius: var(--slds-c-badge-radius-border, 15rem);
|
|
25
|
+
background-color: var(--slds-c-badge-color-background, var(--slds-g-color-neutral-base-95));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([data-render-mode="shadow"]) [part="badge"]:empty {
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
color: var(--slds-c-badge-icon-color-foreground, var(--slds-g-color-neutral-base-50, var(--slds-g-color-neutral-base-50)));
|
|
36
|
+
line-height: 1;
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_inverse {
|
|
41
|
+
--slds-c-badge-icon-color-foreground: var(--slds-c-badge-icon-inverse-color-foreground, currentColor);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_left {
|
|
45
|
+
margin-inline-end: var(--slds-g-spacing-1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([data-render-mode="shadow"]) [part="badge"] .slds-badge__icon.slds-badge__icon_right {
|
|
49
|
+
margin-inline-start: var(--slds-g-spacing-1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([data-render-mode="shadow"]) [part="badge"] lightning-primitive-icon {
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
57
|
+
However, the public API for this component does not expose an attribute for this class. Establishing a programmatic
|
|
58
|
+
mapping between the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
59
|
+
|
|
60
|
+
:host([data-render-mode="shadow"].slds-badge_inverse) {
|
|
61
|
+
--slds-c-badge-color-background: var(--slds-c-badge-inverse-color-background, var(--slds-g-color-neutral-base-50, var(--slds-g-color-neutral-base-50)));
|
|
62
|
+
--slds-c-badge-text-color: var(--slds-c-badge-inverse-text-color, var(--slds-g-color-neutral-base-100, var(--slds-g-color-neutral-base-100)));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* As a best practice for native shadow, we should use an attribute on the host rather than the SLDS class.
|
|
66
|
+
However, the public API for badge does not expose an attribute for this class. Establishing a programmatic mapping between
|
|
67
|
+
the class and an attribute is an antipattern, requiring MutationObserver and reducing performance */
|
|
68
|
+
|
|
69
|
+
:host([data-render-mode="shadow"].slds-badge_lightest) {
|
|
70
|
+
--slds-c-badge-color-background: var(--slds-c-badge-lightest-color-background, var(--slds-g-color-neutral-base-100, var(--slds-g-color-neutral-base-100)));
|
|
71
|
+
--slds-c-badge-color-border: var(--slds-c-badge-lightest-color-border, var(--slds-g-color-border-base-1, var(--slds-g-color-neutral-base-90)));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([data-render-mode="shadow"].slds-badge:not(:first-of-type)) {
|
|
75
|
+
margin-inline-start: var(--slds-g-spacing-2);
|
|
76
|
+
}
|