lightning-base-components 1.21.3-alpha → 1.21.5-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.
Files changed (233) hide show
  1. package/metadata/raptor.json +49 -0
  2. package/package.json +96 -21
  3. package/scopedImports/@salesforce-label-LightningDatatable.showActions.js +1 -1
  4. package/scopedImports/@salesforce-label-LightningForm.controllerFieldsMessage.js +1 -0
  5. package/scopedImports/@salesforce-label-LightningForm.dependentFieldsHeader.js +1 -0
  6. package/scopedImports/@salesforce-label-LightningForm.dependentFieldsListHeading.js +1 -0
  7. package/scopedImports/@salesforce-label-LightningForm.generalDependentFieldsMessage.js +1 -0
  8. package/scopedImports/@salesforce-label-LightningForm.learnMore.js +1 -0
  9. package/scopedImports/@salesforce-label-LightningForm.okButton.js +1 -0
  10. package/scopedImports/@salesforce-label-LightningLookup.messageWhenSearchTermTooShort.js +1 -0
  11. package/scopedImports/@salesforce-label-LightningLookup.modalCancel.js +1 -0
  12. package/scopedImports/@salesforce-label-LightningLookup.modalSelect.js +1 -0
  13. package/scopedImports/@salesforce-label-LightningProgressIndicator.currentStage.js +1 -1
  14. package/scopedImports/@salesforce-label-LightningProgressIndicator.errorStage.js +1 -0
  15. package/scopedImports/@salesforce-label-LightningProgressIndicator.stageComplete.js +1 -1
  16. package/scopedImports/@salesforce-label-LightningProgressIndicator.stageNotStarted.js +1 -1
  17. package/src/lightning/accordion/__docs__/accordion.md +0 -4
  18. package/src/lightning/accordionSection/__docs__/accordionSection.md +0 -4
  19. package/src/lightning/avatar/__docs__/avatar.md +0 -4
  20. package/src/lightning/avatar/avatar.html +1 -0
  21. package/src/lightning/badge/__docs__/badge.md +0 -4
  22. package/src/lightning/badge/badge.html +3 -3
  23. package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +0 -4
  24. package/src/lightning/baseCombobox/baseCombobox.html +4 -1
  25. package/src/lightning/baseCombobox/baseCombobox.js +5 -18
  26. package/src/lightning/baseComboboxItem/baseComboboxItem.js +6 -10
  27. package/src/lightning/button/__docs__/button.md +5 -8
  28. package/src/lightning/button/button.js +3 -4
  29. package/src/lightning/buttonGroup/__docs__/buttonGroup.md +0 -4
  30. package/src/lightning/buttonIcon/__docs__/buttonIcon.md +1 -4
  31. package/src/lightning/buttonIcon/buttonIcon.html +1 -1
  32. package/src/lightning/buttonIcon/buttonIcon.js +18 -17
  33. package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +0 -4
  34. package/src/lightning/buttonMenu/__docs__/buttonMenu.md +0 -4
  35. package/src/lightning/buttonMenu/buttonMenu.css +5 -0
  36. package/src/lightning/buttonMenu/buttonMenu.js +2 -0
  37. package/src/lightning/buttonStateful/__docs__/buttonStateful.md +0 -4
  38. package/src/lightning/buttonStateful/buttonStateful.html +5 -3
  39. package/src/lightning/buttonStateful/buttonStateful.js +4 -0
  40. package/src/lightning/card/__docs__/card.md +0 -4
  41. package/src/lightning/card/card.js-meta.xml +3 -0
  42. package/src/lightning/carousel/__docs__/carousel.md +0 -4
  43. package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +0 -4
  44. package/src/lightning/colorPickerCustom/colorPickerCustom.js +12 -0
  45. package/src/lightning/colorPickerPanel/colorPickerPanel.js +11 -1
  46. package/src/lightning/combobox/__docs__/combobox.md +0 -4
  47. package/src/lightning/combobox/combobox.html +1 -0
  48. package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.html +11 -0
  49. package/src/lightning/datatable/__examples__disabled/customComponentWrapper/customComponentWrapper.js +25 -0
  50. package/src/lightning/datatable/__examples__disabled/customComponentWrapper/generateData.js +15 -0
  51. package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/customInput.html +4 -0
  52. package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/myCustomTypeDatatable.js +17 -0
  53. package/src/lightning/datatable/__examples__disabled/myCustomTypeDatatable/nestedSimpleComponentParent.html +7 -0
  54. package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.html +9 -0
  55. package/src/lightning/datatable/__examples__disabled/simpleComponentNested/simpleComponentNested.js +6 -0
  56. package/src/lightning/datatable/autoWidthStrategy.js +8 -36
  57. package/src/lightning/datatable/columnResizer.js +51 -161
  58. package/src/lightning/datatable/columnWidthManager.js +25 -81
  59. package/src/lightning/datatable/columns.js +180 -302
  60. package/src/lightning/datatable/datatable.js +454 -441
  61. package/src/lightning/datatable/errors.js +17 -29
  62. package/src/lightning/datatable/fixedWidthStrategy.js +7 -22
  63. package/src/lightning/datatable/headerActions.js +8 -38
  64. package/src/lightning/datatable/indexes.js +42 -0
  65. package/src/lightning/datatable/infiniteLoading.js +16 -35
  66. package/src/lightning/datatable/inlineEdit.js +126 -156
  67. package/src/lightning/datatable/keyboard.js +226 -282
  68. package/src/lightning/datatable/renderManager.js +0 -4
  69. package/src/lightning/datatable/resizeObserver.js +4 -13
  70. package/src/lightning/datatable/rowLevelActions.js +2 -2
  71. package/src/lightning/datatable/rowNumber.js +21 -59
  72. package/src/lightning/datatable/rowSelection.js +95 -178
  73. package/src/lightning/datatable/rowSelectionShared.js +13 -27
  74. package/src/lightning/datatable/rows.js +171 -418
  75. package/src/lightning/datatable/sort.js +16 -75
  76. package/src/lightning/datatable/templates/div/div.html +12 -4
  77. package/src/lightning/datatable/templates/div/div.lbc.synthetic.css +10 -16
  78. package/src/lightning/datatable/templates/table/table.html +15 -5
  79. package/src/lightning/datatable/tree.js +17 -35
  80. package/src/lightning/datatable/types.js +10 -31
  81. package/src/lightning/datatable/utils.js +48 -24
  82. package/src/lightning/datatable/virtualization.js +2 -5
  83. package/src/lightning/datatable/widthManagerShared.js +0 -20
  84. package/src/lightning/datatable/wrapText.js +29 -60
  85. package/src/lightning/dualListbox/__docs__/dualListbox.md +0 -4
  86. package/src/lightning/dualListbox/dualListbox.js +7 -8
  87. package/src/lightning/dynamicIcon/__docs__/dynamicIcon.md +0 -4
  88. package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +0 -4
  89. package/src/lightning/formattedLocation/__docs__/formattedLocation.md +0 -4
  90. package/src/lightning/formattedName/__docs__/formattedName.md +0 -4
  91. package/src/lightning/formattedName/formattedName.js +3 -2
  92. package/src/lightning/formattedName/formattedName.js-meta.xml +3 -0
  93. package/src/lightning/formattedNumber/__docs__/formattedNumber.md +0 -4
  94. package/src/lightning/formattedNumber/formattedNumber.js +3 -2
  95. package/src/lightning/formattedNumber/formattedNumber.js-meta.xml +3 -0
  96. package/src/lightning/formattedPhone/__docs__/formattedPhone.md +0 -4
  97. package/src/lightning/formattedRichText/richTextConfig.js +1 -0
  98. package/src/lightning/formattedText/__docs__/formattedText.md +0 -4
  99. package/src/lightning/formattedTime/__docs__/formattedTime.md +0 -4
  100. package/src/lightning/formattedUrl/__docs__/formattedUrl.md +0 -4
  101. package/src/lightning/helptext/helptext.css +7 -0
  102. package/src/lightning/helptext/helptext.js +3 -4
  103. package/src/lightning/icon/__docs__/icon.md +0 -4
  104. package/src/lightning/icon/icon.html +1 -1
  105. package/src/lightning/input/input.html +5 -0
  106. package/src/lightning/inputAddress/addressFormat.js +31 -4
  107. package/src/lightning/inputAddress/fieldsLayout.js +6 -0
  108. package/src/lightning/inputAddress/inputAddress.html +19 -1
  109. package/src/lightning/inputAddress/inputAddress.js +80 -3
  110. package/src/lightning/inputLocation/__docs__/inputLocation.md +0 -4
  111. package/src/lightning/internationalizationLibrary/address/AddressFormat.js +553 -610
  112. package/src/lightning/layout/__docs__/layout.md +0 -4
  113. package/src/lightning/layoutItem/__docs__/layoutItem.md +0 -4
  114. package/src/lightning/lookupAddress/lookupAddress.html +6 -1
  115. package/src/lightning/lookupAddress/lookupAddress.js +25 -0
  116. package/src/lightning/menuItem/__docs__/menuItem.md +0 -4
  117. package/src/lightning/menuSubheader/menu-subheader.slds.css +1 -1
  118. package/src/lightning/modal/__docs__/modal.md +10 -1
  119. package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +3 -7
  120. package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +39 -133
  121. package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +1 -1
  122. package/src/lightning/modal/modal.js +1 -1
  123. package/src/lightning/modalBase/modalBase.html +15 -10
  124. package/src/lightning/modalBase/modalBase.js +132 -147
  125. package/src/lightning/modalBody/modalBody.css +6 -0
  126. package/src/lightning/modalHeader/modalHeader.html +16 -4
  127. package/src/lightning/modalHeader/modalHeader.js +61 -14
  128. package/src/lightning/pill/__docs__/pill.md +0 -4
  129. package/src/lightning/pill/link.html +1 -0
  130. package/src/lightning/pill/plain.html +1 -0
  131. package/src/lightning/pill/plainLink.html +1 -0
  132. package/src/lightning/pillContainer/__docs__/pillContainer.md +0 -4
  133. package/src/lightning/primitiveBubble/primitiveBubble.js +42 -0
  134. package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +1 -1
  135. package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.html +1 -1
  136. package/src/lightning/primitiveHeaderActions/primitiveHeaderActions.js +13 -0
  137. package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +19 -6
  138. package/src/lightning/primitiveHeaderFactory/sortableHeader.html +3 -1
  139. package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.css +11 -0
  140. package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.html +2 -1
  141. package/src/lightning/primitiveResizeHandler/primitiveResizeHandler.js +1 -0
  142. package/src/lightning/progressStep/base.html +5 -6
  143. package/src/lightning/progressStep/progressStep.js +14 -9
  144. package/src/lightning/prompt/__docs__/prompt.md +1 -1
  145. package/src/lightning/radioGroup/__docs__/radioGroup.md +0 -4
  146. package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +0 -4
  147. package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +0 -2
  148. package/src/lightning/sldsCommon/sldsCommon.css +134 -98
  149. package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +1 -1
  150. package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +14 -13
  151. package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +95 -92
  152. package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +1 -1
  153. package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +77 -75
  154. package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +73 -73
  155. package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +552 -558
  156. package/src/lightning/sldsUtilsVisibility/sldsUtilsVisibility.css +2 -2
  157. package/src/lightning/slider/__docs__/slider.md +0 -4
  158. package/src/lightning/spinner/__docs__/spinner.md +0 -4
  159. package/src/lightning/staticMap/staticMap.js +3 -2
  160. package/src/lightning/tab/__docs__/tab.md +0 -4
  161. package/src/lightning/tab/tab.js +6 -3
  162. package/src/lightning/tab/tab.js-meta.xml +3 -0
  163. package/src/lightning/tabBar/tabBar.js +10 -5
  164. package/src/lightning/tabset/__docs__/tabset.md +0 -4
  165. package/src/lightning/tabset/tabset.html +2 -0
  166. package/src/lightning/tabset/tabset.js-meta.xml +3 -0
  167. package/src/lightning/textarea/__docs__/textarea.md +0 -4
  168. package/src/lightning/textarea/textarea.js +6 -1
  169. package/src/lightning/tile/__docs__/tile.md +0 -4
  170. package/src/lightning/toastContainer/__docs__/toastContainer.md +3 -2
  171. package/src/lightning/tooltipLibrary/tooltipLibrary.js +24 -15
  172. package/src/lightning/tree/__docs__/tree.md +0 -4
  173. package/src/lightning/tree/tree.js +5 -1
  174. package/src/lightning/verticalNavigation/__docs__/verticalNavigation.md +0 -4
  175. package/src/lightning/verticalNavigation/vertical-navigation.slds.css +14 -0
  176. package/src/lightning/verticalNavigation/verticalNavigation.css +1 -1
  177. package/src/lightning/verticalNavigation/verticalNavigation.html +1 -1
  178. package/src/lightning/verticalNavigation/verticalNavigation.js +66 -28
  179. package/src/lightning/verticalNavigation/verticalNavigation.js-meta.xml +3 -0
  180. package/src/lightning/verticalNavigationItem/__docs__/verticalNavigationItem.md +0 -4
  181. package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +63 -0
  182. package/src/lightning/verticalNavigationItem/verticalNavigationItem.css +2 -3
  183. package/src/lightning/verticalNavigationItem/verticalNavigationItem.js +29 -15
  184. package/src/lightning/verticalNavigationItem/verticalNavigationItem.js-meta.xml +3 -0
  185. package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.native.css +2 -0
  186. package/src/lightning/verticalNavigationItem/verticalNavigationItem.lbc.synthetic.css +3 -0
  187. package/src/lightning/verticalNavigationItemBadge/__docs__/verticalNavigationItemBadge.md +0 -4
  188. package/src/lightning/verticalNavigationItemBadge/badge.slds.css +76 -0
  189. package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +63 -0
  190. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.css +2 -3
  191. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.html +1 -1
  192. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js +28 -15
  193. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.js-meta.xml +3 -0
  194. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.native.css +5 -0
  195. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.lbc.synthetic.css +3 -0
  196. package/src/lightning/verticalNavigationItemIcon/__docs__/verticalNavigationItemIcon.md +0 -4
  197. package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +63 -0
  198. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.css +2 -3
  199. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js +29 -15
  200. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.js-meta.xml +3 -0
  201. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.native.css +3 -0
  202. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.lbc.synthetic.css +3 -0
  203. package/src/lightning/verticalNavigationOverflow/button.slds.css +503 -0
  204. package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +63 -0
  205. package/src/lightning/verticalNavigationOverflow/vertical-navigation-section.slds.css +17 -0
  206. package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.css +2 -1
  207. package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.html +2 -0
  208. package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js +18 -13
  209. package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.js-meta.xml +3 -0
  210. package/src/lightning/verticalNavigationOverflow/verticalNavigationOverflow.lbc.native.css +5 -0
  211. package/src/lightning/verticalNavigationSection/vertical-navigation-section.slds.css +14 -14
  212. package/src/lightning/verticalNavigationSection/verticalNavigationSection.js-meta.xml +3 -0
  213. package/src/lightning/datatable/inlineEditShared.js +0 -26
  214. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatableWrapper/customDatatableWrapper.html +0 -0
  215. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatableWrapper/customDatatableWrapper.js +0 -0
  216. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.html +0 -0
  217. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.js +0 -0
  218. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeLink/customDatatypeLink.html +0 -0
  219. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeLink/customDatatypeLink.js +0 -0
  220. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.html +0 -0
  221. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeNumber/customDatatypeNumber.js +0 -0
  222. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.html +0 -0
  223. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.js +0 -0
  224. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customDatatypeTable.js +0 -0
  225. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customLink.html +0 -0
  226. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customName.html +0 -0
  227. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customNumber.html +0 -0
  228. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/customNumberEdit.html +0 -0
  229. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/deleteRow.html +0 -0
  230. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/iconPill.html +0 -0
  231. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customDatatypeTable/orderingButtons.html +0 -0
  232. /package/src/lightning/datatable/{__examples__ → __examples__disabled}/customNestedComponent/customNestedComponent.html +0 -0
  233. /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
  }
@@ -107,7 +107,3 @@ value.
107
107
 
108
108
  For precise numerical values, we recommend using the `lightning-input`
109
109
  component of `type="number"` instead.
110
-
111
- #### Source Code
112
-
113
- `lightning-slider` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -66,7 +66,3 @@ export default class DemoSpinner extends LightningElement {
66
66
  }
67
67
  }
68
68
  ```
69
-
70
- #### Source Code
71
-
72
- `lightning-spinner` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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 { LightningElement, api, track } from 'lwc';
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 LightningElement {
29
+ export default class LightningStaticMap extends LightningShadowBaseClass {
29
30
  @api width;
30
31
  @api height;
31
32
  @api street;
@@ -50,7 +50,3 @@ The event properties are as follows.
50
50
  | bubbles | true | This event bubbles up through the DOM. |
51
51
  | cancelable | true | This event can be canceled. You can call `preventDefault()` on this event. |
52
52
  | composed | true | This event propagates outside of the component in which it was dispatched. |
53
-
54
- #### Source Code
55
-
56
- `lightning-tab` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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
- this.dispatchEvent(new CustomEvent('active'));
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,
@@ -3,4 +3,7 @@
3
3
  <isExposed>true</isExposed>
4
4
  <support>GA</support>
5
5
  <minApiVersion>44.0</minApiVersion>
6
+ <capabilities>
7
+ <capability>lightning__ServerRenderableWithHydration</capability>
8
+ </capabilities>
6
9
  </LightningComponentBundle>
@@ -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
- this.ariaObserver = new AriaObserver(this);
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
- // eslint-disable-next-line @lwc/lwc/no-async-operation
477
- requestAnimationFrame(this._recomputeOverflow.bind(this));
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() {
@@ -179,7 +179,3 @@ This example sets custom assistive text for a heading, specifies `heading-level`
179
179
  </lightning-tabset>
180
180
  </template>
181
181
  ```
182
-
183
- #### Source Code
184
-
185
- `lightning-tabset` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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}
@@ -3,4 +3,7 @@
3
3
  <isExposed>true</isExposed>
4
4
  <support>GA</support>
5
5
  <minApiVersion>44.0</minApiVersion>
6
+ <capabilities>
7
+ <capability>lightning__ServerRenderableWithHydration</capability>
8
+ </capabilities>
6
9
  </LightningComponentBundle>
@@ -241,7 +241,3 @@ See [Styling Hooks Overview](https://www.lightningdesignsystem.com/components/ri
241
241
  Use the `label` attribute to identify the text area for users of assistive technology.
242
242
  The `label` attribute creates an HTML label element on the input element. To hide a
243
243
  label from view and make it available to assistive technology, use the `label-hidden` variant.
244
-
245
- #### Source Code
246
-
247
- `lightning-textarea` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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
- this.ariaObserver.sync(this._isNativeShadow);
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) {
@@ -165,7 +165,3 @@ The event properties are as follows.
165
165
  | bubbles | false | This event does not bubble. |
166
166
  | cancelable | false | This event has no default behavior that can be canceled. You can't call `preventDefault()` on this event. |
167
167
  | composed | false | This event does not propagate outside the template in which it was dispatched. |
168
-
169
- #### Source Code
170
-
171
- `lightning-tile` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -1,4 +1,4 @@
1
- Use the `lightning/toastContainer` module (Beta) to manage a list of toast components and their order. Pages support a single page-level toast container.
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
- target.addEventListener('touchstart', (e) => {
232
- e.stopPropagation();
233
- this.toggle();
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
- ['mouseleave', 'blur'].forEach((name) =>
239
- target.addEventListener(name, (event) =>
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.keyCode === 13 && !this._visible) {
246
- this.toggle();
247
- } else if (this._visible) {
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();
@@ -339,7 +339,3 @@ The event properties are as follows.
339
339
  The [LWC Recipes GitHub repository](https://github.com/trailheadapps/lwc-recipes) contains code examples for Lightning Web Components that you can test in an org.
340
340
 
341
341
  For a recipe that uses `lightning-tree`, see the `c-wire-get-picklist-values-by-record-type` component in the LWC Recipes repo.
342
-
343
- #### Source Code
344
-
345
- `lightning-tree` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -263,7 +263,11 @@ export default class LightningTree extends LightningElement {
263
263
  // Need to dispatch a change event specifically for interop to pick up the change to node.expanded
264
264
  this.dispatchEvent(
265
265
  new CustomEvent('change', {
266
- detail: { items: deepCopy(this._items) },
266
+ detail: {
267
+ items: deepCopy(this._items),
268
+ key: node.nodeRef.name,
269
+ expand: node.nodeRef.expanded,
270
+ },
267
271
  })
268
272
  );
269
273
  }
@@ -194,7 +194,3 @@ The event properties are as follows.
194
194
  | bubbles | false | This event does not bubble. |
195
195
  | cancelable | false | This event has no default behavior that can be canceled. You can't call `preventDefault()` on this event. |
196
196
  | composed | false | This event does not propagate outside the template in which it was dispatched. |
197
-
198
- #### Source Code
199
-
200
- `lightning-vertical-navigation` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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} onprivateitemselect={handleItemSelect} onprivateitemregister={handleItemRegister} aria-label={ariaLabel} part="vertical-navigation">
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
- // dispatch before events
146
- const beforeselectevent = new CustomEvent('beforeselect', {
147
- cancelable: true,
148
- detail: {
149
- name: itemName,
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
- // update state
164
- this._selectedItem = itemName;
165
-
166
- // fire after events
167
- this.dispatchEvent(
168
- new CustomEvent('select', {
169
- detail: {
170
- name: itemName,
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
  }
@@ -3,4 +3,7 @@
3
3
  <isExposed>true</isExposed>
4
4
  <minApiVersion>41.0</minApiVersion>
5
5
  <support>GA</support>
6
+ <capabilities>
7
+ <capability>lightning__ServerRenderableWithHydration</capability>
8
+ </capabilities>
6
9
  </LightningComponentBundle>
@@ -9,7 +9,3 @@ A `lightning-vertical-navigation-item` component is a navigation item within `li
9
9
 
10
10
  For more information, see the
11
11
  [lightning-vertical-navigation](bundle/lightning-vertical-navigation/documentation) documentation.
12
-
13
- #### Source Code
14
-
15
- `lightning-vertical-navigation-item` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
@@ -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
- :host {
2
- display: list-item;
3
- }
1
+ @import './verticalNavigationItem.lbc.synthetic.css';
2
+ @import './verticalNavigationItem.lbc.native.css';