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
@@ -43,10 +43,9 @@ export default class LightningButton extends LightningPrimitiveButton {
43
43
  @api label;
44
44
 
45
45
  /**
46
- * Reserved for internal use only.
47
- * Should be set to -1 if button should not
48
- * be focused during tab navigation and should
49
- * be set to 0 if button should be focused.
46
+ * Reserved for internal use only. Use the global tabindex attribute instead.
47
+ * Set tab index to -1 to prevent focus on the button during tab navigation.
48
+ * The default value is 0, which makes the button focusable during tab navigation.
50
49
  * @type {number}
51
50
  */
52
51
  @api tabIndex;
@@ -73,10 +73,6 @@ To apply additional styling, use SLDS [utility classes](https://www.lightningdes
73
73
 
74
74
  You can customize the `lightning-button-*` base components you use within `lightning-button-group` using SLDS styling hooks. For more information, see the corresponding base component documentation.
75
75
 
76
- #### Source Code
77
-
78
- `lightning-button-group` 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.
79
-
80
76
  #### See Also
81
77
 
82
78
  [lightning-navigation](bundle/lightning-navigation/documentation)
@@ -205,9 +205,6 @@ Use the following accessibility and `aria` attributes on `lightning-button-icon`
205
205
  | aria-haspopup | token | Indicates that the button has an interactive popup element. Valid values are 'true', 'dialog', 'menu', 'listbox', 'tree', and 'grid'. To create a button that displays a list of menu items when clicked, use `lightning-button-menu` instead. |
206
206
  | aria-label | string | Provides an assistive label where a visible label cannot be used. |
207
207
  | aria-live | token | Indicates the button can dynamically update without a page reload, and specifies how the change is announced by assistive technologies. Possible values include `off`, `polite`, and `assertive`. The default is `off`. For the screen reader to announce changes when the user is idle, use `polite`. For immediate notifications, use `assertive`. |
208
+ | tabindex | integer | Specifies whether the button is focusable during tab navigation. Set tab index to -1 to prevent focus on the button during tab navigation. The default value is 0, which makes the button focusable during tab navigation. For more information, see [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex). |
208
209
 
209
210
  For more information, see the [WAI-ARIA Specification](https://www.w3.org/TR/wai-aria/).
210
-
211
- #### Source Code
212
-
213
- `lightning-button-icon` 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.
@@ -16,7 +16,7 @@
16
16
  part="button button-icon"
17
17
  tabindex={tabIndex}>
18
18
 
19
- <lightning-primitive-icon icon-name={iconName} svg-class={computedIconClass} variant="bare"></lightning-primitive-icon>
19
+ <lightning-primitive-icon icon-name={iconName} svg-class={computedIconClass} variant="bare" exportparts="icon"></lightning-primitive-icon>
20
20
 
21
21
  <template if:true={alternativeText}>
22
22
  <span class="slds-assistive-text">{alternativeText}</span>
@@ -35,14 +35,15 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
35
35
  @api value;
36
36
 
37
37
  /**
38
- * Reserved for internal use only.
39
- * Should be set to -1 if button should not
40
- * be focused during tab navigation and should
41
- * be set to 0 if button should be focused.
38
+ * Reserved for internal use only. Use the global tabindex attribute instead.
39
+ * Set tab index to -1 to prevent focus on the button during tab navigation.
40
+ * The default value is 0, which makes the button focusable during tab navigation.
42
41
  * @type {number}
43
42
  */
44
43
  @api tabIndex;
45
44
 
45
+ _variant = DEFAULT_VARIANT;
46
+
46
47
  /**
47
48
  * The variant changes the appearance of button-icon.
48
49
  * Accepted variants include bare, container, brand, border, border-filled, bare-inverse, and border-inverse.
@@ -51,11 +52,11 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
51
52
  * @type {string}
52
53
  * @default border
53
54
  */
54
- _variant = DEFAULT_VARIANT;
55
55
  @api
56
56
  get variant() {
57
57
  return this._originalVariant;
58
58
  }
59
+
59
60
  set variant(val) {
60
61
  this._originalVariant = val;
61
62
  this._variant = this.normalizeVariant(val);
@@ -82,6 +83,8 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
82
83
  */
83
84
  @api iconClass;
84
85
 
86
+ _size = DEFAULT_SIZE;
87
+
85
88
  /**
86
89
  * The size of the button-icon. For the bare variant, options include x-small, small, medium, and large.
87
90
  * For non-bare variants, options include xx-small, x-small, small, and medium.
@@ -90,8 +93,6 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
90
93
  * @type {string}
91
94
  * @default medium
92
95
  */
93
- _size = DEFAULT_SIZE;
94
-
95
96
  @api
96
97
  get size() {
97
98
  return this._originalSize;
@@ -119,16 +120,6 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
119
120
  */
120
121
  @api alternativeText;
121
122
 
122
- // remove-next-line-for-c-namespace
123
- set tooltip(value) {
124
- this.tooltipValue = value;
125
- if (this._tooltip) {
126
- this._tooltip.value = value;
127
- } else if (value && this.rendered) {
128
- this.createTooltip(value);
129
- }
130
- }
131
-
132
123
  // remove-next-line-for-c-namespace
133
124
  /**
134
125
  * Text to display when the user mouses over or focuses on the button.
@@ -141,6 +132,16 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
141
132
  return this._tooltip ? this._tooltip.value : undefined;
142
133
  }
143
134
 
135
+ // remove-next-line-for-c-namespace
136
+ set tooltip(value) {
137
+ this.tooltipValue = value;
138
+ if (this._tooltip) {
139
+ this._tooltip.value = value;
140
+ } else if (value && this.rendered) {
141
+ this.createTooltip(value);
142
+ }
143
+ }
144
+
144
145
  // remove-next-line-for-c-namespace
145
146
  _tooltip = null;
146
147
  tooltipValue = null;
@@ -179,7 +179,3 @@ Use the following accessibility and `aria` attributes on `lightning-button-icon-
179
179
  | aria-live | string | Indicates whether the button will be updated, and describes the types of updates assistive technologies will make. Possible values include `off`, `polite`, and `assertive`. The default is `off`. For the screen reader to announce changes when the user is idle, use `polite`. For immediate notifications, use `assertive`. |
180
180
 
181
181
  For more information, see the [WAI-ARIA Specification](https://www.w3.org/TR/wai-aria/).
182
-
183
- #### Source Code
184
-
185
- `lightning-button-icon-stateful` 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.
@@ -327,7 +327,3 @@ The event properties are as follows.
327
327
  | bubbles | false | This event does not bubble. |
328
328
  | cancelable | false | This event has no default behavior that can be canceled. You cannot call `preventDefault()` on this event. |
329
329
  | composed | false | This event does not propagate outside of the component in which it was dispatched. |
330
-
331
- #### Source Code
332
-
333
- `lightning-button-menu` 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 +1,6 @@
1
1
  @import './buttonMenu.lbc.native.css';
2
+
3
+ .fix-slds-button_icon-border-filled {
4
+ height: unset;
5
+ line-height: var(--slds-c-button-line-height, var(--sds-c-button-line-height, 1.875rem));
6
+ }
@@ -473,6 +473,8 @@ export default class LightningButtonMenu extends LightningShadowBaseClass {
473
473
  this.variant === 'border' && isDropdownIcon,
474
474
  'slds-button_icon-border-filled':
475
475
  this.variant === 'border-filled',
476
+ 'fix-slds-button_icon-border-filled':
477
+ this.variant === 'border-filled' && this.groupOrder !== '',
476
478
  'slds-button_icon-border-inverse':
477
479
  this.variant === 'border-inverse',
478
480
  'slds-button_icon-inverse': this.variant === 'bare-inverse',
@@ -162,7 +162,3 @@ This component has usage differences from its Aura counterpart. See [Base Compon
162
162
  This component uses `aria-live="polite"`, which means the button label is read after the current user task or content.
163
163
 
164
164
  To inform screen readers that a button is disabled, set the `disabled` attribute to true.
165
-
166
- #### Source Code
167
-
168
- `lightning-button-stateful` 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.
@@ -4,24 +4,26 @@
4
4
  onblur={handleButtonBlur}
5
5
  onclick={handleButtonClick}
6
6
  aria-live="polite"
7
+ aria-relevant="additions"
8
+ aria-pressed={computedAriaPressed}
7
9
  part="button"
8
10
  disabled={disabled}>
9
11
 
10
12
  <span class="slds-text-not-selected">
11
13
  <template if:true={iconNameWhenOff}>
12
- <lightning-primitive-icon part="start" icon-name={iconNameWhenOff} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
14
+ <lightning-primitive-icon aria-hidden="true" part="start" icon-name={iconNameWhenOff} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
13
15
  </template>
14
16
  {privateLabelWhenOff}
15
17
  </span>
16
18
  <span class="slds-text-selected">
17
19
  <template if:true={iconNameWhenOn}>
18
- <lightning-primitive-icon part="start" icon-name={iconNameWhenOn} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
20
+ <lightning-primitive-icon aria-hidden="true" part="start" icon-name={iconNameWhenOn} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
19
21
  </template>
20
22
  {privateLabelWhenOn}
21
23
  </span>
22
24
  <span class="slds-text-selected-focus">
23
25
  <template if:true={privateIconNameWhenHover}>
24
- <lightning-primitive-icon part="start" icon-name={privateIconNameWhenHover} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
26
+ <lightning-primitive-icon aria-hidden="true" part="start" icon-name={privateIconNameWhenHover} svg-class="slds-button__icon_stateful slds-button__icon_left" variant="bare"></lightning-primitive-icon>
25
27
  </template>
26
28
  {privateLabelWhenHover}
27
29
  </span>
@@ -239,6 +239,10 @@ export default class LightningButtonStateful extends LightningShadowBaseClass {
239
239
  this.dispatchEvent(new CustomEvent('focus'));
240
240
  }
241
241
 
242
+ get computedAriaPressed() {
243
+ return String(this.state.selected);
244
+ }
245
+
242
246
  // validate a label is a string and not zero length
243
247
  isValidLabel(labelVal) {
244
248
  // if not a string or of length 0 then label is not valid
@@ -108,7 +108,3 @@ To understand how we implemented SLDS in `lightning-card`, see the **Source Code
108
108
  Icons are not available in Lightning Out, but they are available in Lightning Components for Visualforce and other experiences.
109
109
 
110
110
  This component has usage differences from its Aura counterpart. See [Base Components: Aura Vs Lightning Web Components](https://developer.salesforce.com/docs/platform/lwc/guide/migrate-map-aura-lwc-components) in the Lightning Web Components Developer Guide.
111
-
112
- #### Source Code
113
-
114
- `lightning-card` 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.
@@ -3,4 +3,7 @@
3
3
  <isExposed>true</isExposed>
4
4
  <minApiVersion>0.0</minApiVersion>
5
5
  <support>GA</support>
6
+ <capabilities>
7
+ <capability>lightning__ServerRenderableWithHydration</capability>
8
+ </capabilities>
6
9
  </LightningComponentBundle>
@@ -88,7 +88,3 @@ This example creates a basic carousel with three images and disables automatic s
88
88
 
89
89
  Use the Tab key to move focus to the carousel, then tab again to focus on the indicator buttons.
90
90
  Use right and left arrow keys to scroll to the next or previous image.
91
-
92
- #### Source Code
93
-
94
- `lightning-carousel` 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.
@@ -194,7 +194,3 @@ element. The legend contains the `label` value. The `fieldset` element enables
194
194
  grouping of related checkboxes to facilitate tabbing navigation and speech
195
195
  navigation for accessibility purposes. Similarly, the `legend` element
196
196
  improves accessibility by enabling a caption to be assigned to the `fieldset`.
197
-
198
- #### Source Code
199
-
200
- `lightning-checkbox-group` 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.
@@ -95,6 +95,18 @@ export default class LightningColorPickerCustom extends LightningShadowBaseClass
95
95
  this._currentColor = value;
96
96
  this._hex = fullHex;
97
97
  this._rgb = hexToRgb(fullHex);
98
+
99
+ // W-13851481 bug-fix: if canvas open, update it
100
+ if (this._canvas) {
101
+ const hue = rgbToHsl(this._rgb).hue;
102
+ const position = this.rgbToPosition(this._rgb);
103
+ const selectedColor = `#${rgbToHex(this._rgb)}`;
104
+
105
+ this.updateRainbow(hue);
106
+ this.setCanvasColor(hue);
107
+ this.setCanvasCursor(position.x, position.y);
108
+ this.updateSelectedColor(selectedColor);
109
+ }
98
110
  }
99
111
 
100
112
  @api
@@ -5,7 +5,7 @@ import labelDoneButton from '@salesforce/label/LightningColorPicker.doneButton';
5
5
  import { api, track } from 'lwc';
6
6
  import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
7
7
  import { classSet } from 'lightning/utils';
8
- import { keyCodes } from 'lightning/utilsPrivate';
8
+ import { keyCodes, isCSR } from 'lightning/utilsPrivate';
9
9
 
10
10
  const i18n = {
11
11
  cancelButton: labelCancelButton,
@@ -26,6 +26,16 @@ export default class LightningColorPickerPanel extends LightningShadowBaseClass
26
26
  this._selectedColor = this.currentColor || DEFAULT_COLOR;
27
27
  }
28
28
 
29
+ renderedCallback() {
30
+ // W-14600421 bug fix: prevent panel from falling outside user focus,
31
+ // like when viewports are too small
32
+ if (isCSR && typeof document.body.scrollIntoView === 'function') {
33
+ this.template
34
+ .querySelector('lightning-color-picker-custom')
35
+ .scrollIntoView();
36
+ }
37
+ }
38
+
29
39
  get i18n() {
30
40
  return i18n;
31
41
  }
@@ -156,7 +156,3 @@ The `open` event does not return any parameters.
156
156
  | bubbles | false | This event does not bubble. |
157
157
  | cancelable | false | This event has no default behavior that can be canceled. You cannot call `preventDefault()` on this event. |
158
158
  | composed | false | This event does not propagate outside of the component in which it was dispatched. |
159
-
160
- #### Source Code
161
-
162
- `lightning-combobox` 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.
@@ -17,6 +17,7 @@
17
17
  root-aria-node={templateRootNode}
18
18
  required={required}
19
19
  disabled={disabled}
20
+ exportparts="dropdown, option"
20
21
  placeholder={placeholder}
21
22
  items={_items}
22
23
  input-text={_selectedLabel}
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <!-- Move this component to __examples__ -->
3
+ <!-- In playground add <datatable-custom-component-wrapper></datatable-custom-component-wrapper> -->
4
+ <datatable-my-custom-type-datatable
5
+ key-field="Id"
6
+ data={data}
7
+ columns={columns}
8
+ show-row-number-column
9
+ >
10
+ </datatable-my-custom-type-datatable>
11
+ </template>
@@ -0,0 +1,25 @@
1
+ import { LightningElement } from 'lwc';
2
+ import generateData from './generateData.js';
3
+ const columns = [
4
+ {
5
+ label: 'Custom input',
6
+ type: 'customInput',
7
+ },
8
+ {
9
+ label: 'Custom Component Buttons',
10
+ type: 'customComponent',
11
+ },
12
+ { label: 'Label', fieldName: 'name' },
13
+ { label: 'Website', fieldName: 'website', type: 'url' },
14
+ { label: 'Phone', fieldName: 'phone', type: 'phone' },
15
+ { label: 'Balance', fieldName: 'amount', type: 'currency' },
16
+ ];
17
+ export default class MyDatatable extends LightningElement {
18
+ data = [];
19
+ columns = columns;
20
+ rowOffset = 0;
21
+
22
+ connectedCallback() {
23
+ this.data = generateData({ amountOfRecords: 5 });
24
+ }
25
+ }
@@ -0,0 +1,15 @@
1
+ export default function generateData({ amountOfRecords }) {
2
+ return [...Array(amountOfRecords)].map((_, index) => {
3
+ return {
4
+ name: `Name (${index})`,
5
+ website: 'www.salesforce.com',
6
+ amount: Math.floor(Math.random() * 100),
7
+ phone: `${
8
+ Math.floor(Math.random() * 900 + 100) * 10000000 + 5551212
9
+ }`,
10
+ closeAt: new Date(
11
+ Date.now() + 86400000 * Math.ceil(Math.random() * 20)
12
+ ),
13
+ };
14
+ });
15
+ }
@@ -0,0 +1,4 @@
1
+ <template>
2
+ <!-- Since this is a top level component we don't need to pass tabindex down through shadowroots -->
3
+ <lightning-input type="text" label="Enter some text" tabindex={internalTabIndex} data-navigation="enable"></lightning-input>
4
+ </template>
@@ -0,0 +1,17 @@
1
+ //myCustomTypeDatatable.js
2
+ import LightningDatatable from 'lightning/datatable';
3
+ import customInputTemplate from './customInput.html';
4
+ import customComponentTemplate from './nestedSimpleComponentParent.html';
5
+
6
+ export default class MyCustomTypeDatatable extends LightningDatatable {
7
+ static customTypes = {
8
+ customInput: {
9
+ template: customInputTemplate,
10
+ standardCellLayout: true,
11
+ },
12
+ customComponent: {
13
+ template: customComponentTemplate,
14
+ standardCellLayout: false,
15
+ },
16
+ };
17
+ }
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <!-- We add an internal component here so that we can garner access to a full LWC component including access to a JS file. -->
3
+ <!-- This is common if a custom component needs some kind of wiring up. -->
4
+ <!-- We pass tabindex down as we don't want this component to be shown as accessible in the dom, but we want children of it to be -->
5
+ <!-- We set data-navigation here as this component has children that are navigable -->
6
+ <datatable-simple-component-nested internal-tab-index={internalTabIndex} data-navigation="enable"></datatable-simple-component-nested>
7
+ </template>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <!-- We don't need to set data-navigation on this div as we are not traversing a shadowroot -->
3
+ <div>
4
+ <!-- Since this component needs to be navigable we set data-navigation to enable navigation. -->
5
+ <!-- As it is navigable we also need to set the tabindex=0 so that from a dom structure perspective it shows as navgiable. -->
6
+ <lightning-button variant="base" label="Base" title="Looks like a link" class="slds-m-left_x-small" data-navigation="enable" tabindex={internalTabIndex}></lightning-button>
7
+ <lightning-button label="Neutral" title="Non-primary action" class="slds-m-left_x-small" data-navigation="enable" tabindex={internalTabIndex}></lightning-button>
8
+ </div>
9
+ </template>
@@ -0,0 +1,6 @@
1
+ import { LightningElement, api } from 'lwc';
2
+
3
+ export default class CustomComponent extends LightningElement {
4
+ // Passing internal tab index down from parent.
5
+ @api internalTabIndex;
6
+ }
@@ -4,17 +4,6 @@ import { getColumnWidth, getTotalWidthsData } from './widthManagerShared';
4
4
  const MIN_MAX_THRESHOLD = 0.5;
5
5
  const TRUNCATION_ALLOWANCE = 20;
6
6
 
7
- /**
8
- * Determines if a column exists at a specified index
9
- *
10
- * @param {Array} columns An array of columns
11
- * @param {Integer} colIndex The column index to locate
12
- * @returns {Boolean} Whether the column exists at the specified index
13
- */
14
- function hasColumn(columns, colIndex) {
15
- return columns.some((current) => current === colIndex);
16
- }
17
-
18
7
  /**
19
8
  * Calculates the total width of all columns
20
9
  *
@@ -61,34 +50,21 @@ function canAddWidth(currentWidth, widthToAdd, maxColumnWidth) {
61
50
  * @returns {Number} The expected width of the table
62
51
  */
63
52
  function getExpectedTableWidth(availableWidth, widthsData) {
64
- const minExpectedTableWidth = getMinExpectedTableWidth(widthsData);
65
- return widthsData.totalFlexibleColumns === 0
66
- ? minExpectedTableWidth
67
- : Math.max(minExpectedTableWidth, availableWidth);
68
- }
69
-
70
- /**
71
- * Determines the minimum expected table width
72
- *
73
- * @param {Object} widthsData The widths data
74
- * @returns {Number} The minimum expected table width
75
- */
76
- function getMinExpectedTableWidth(widthsData) {
77
53
  const minTotalFlexibleWidth =
78
54
  widthsData.totalFlexibleColumns * widthsData.minColumnWidth;
79
- return (
55
+ const minExpectedTableWidth =
80
56
  minTotalFlexibleWidth +
81
57
  widthsData.totalFixedWidth +
82
- widthsData.totalResizedWidth
83
- );
58
+ widthsData.totalResizedWidth;
59
+ return widthsData.totalFlexibleColumns === 0
60
+ ? minExpectedTableWidth
61
+ : Math.max(minExpectedTableWidth, availableWidth);
84
62
  }
85
63
 
86
64
  /**
87
65
  * Strategy for columns that automatically determine their widths.
88
66
  */
89
67
  export class AutoWidthStrategy {
90
- // Private variables
91
-
92
68
  // Instance array to hold column width ratios either calculated from visual distribution of column labels
93
69
  // or from distribution of data amongst the columns. These ratios are reused except when datatable reacts
94
70
  // to changes in data or columns and other variables at which point they are recalculated.
@@ -102,8 +78,6 @@ export class AutoWidthStrategy {
102
78
  // It is used in redistribution of extra space that is left or taken up while calculating auto widths
103
79
  columnWidthsDistribution = {};
104
80
 
105
- /************************** LIFECYCLE HOOKS **************************/
106
-
107
81
  constructor(minColumnWidth, maxColumnWidth, wrapTextMaxLines = 3) {
108
82
  this.columnWidthData = {
109
83
  minColumnWidth,
@@ -114,8 +88,6 @@ export class AutoWidthStrategy {
114
88
  this.columnWidthsDistribution.colsWithMaxWidth = [];
115
89
  }
116
90
 
117
- /************************** PRIVATE SETTERS **************************/
118
-
119
91
  /**
120
92
  * Sets the minimum column width
121
93
  *
@@ -182,7 +154,7 @@ export class AutoWidthStrategy {
182
154
  recomputeAutoWidthRatios &&
183
155
  this.columnWidthRatios.length !== columns.length
184
156
  ) {
185
- return { expectedTableWidth, columnWidths: [] };
157
+ return { columnWidths: [] };
186
158
  }
187
159
 
188
160
  // First pass - Distribute widths as per ratios or defined widths if there are any
@@ -213,7 +185,7 @@ export class AutoWidthStrategy {
213
185
  columns
214
186
  );
215
187
  }
216
- return { columnWidths, expectedTableWidth };
188
+ return { columnWidths };
217
189
  }
218
190
 
219
191
  /**
@@ -535,7 +507,7 @@ export class AutoWidthStrategy {
535
507
  const col = columns[colIndex];
536
508
  const currentWidth = columnWidths[colIndex];
537
509
  if (
538
- !hasColumn(colsWithMinWidth, colIndex) &&
510
+ !colsWithMinWidth.includes(colIndex) &&
539
511
  !getColumnWidth(col) &&
540
512
  canRemoveWidth(
541
513
  currentWidth,