lightning-base-components 1.21.4-alpha → 1.21.6-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/metadata/raptor.json +2 -1
  2. package/package.json +9 -1
  3. package/scopedImports/@salesforce-label-LightningLookup.messageWhenSearchTermTooShort.js +1 -0
  4. package/src/lightning/accordion/__docs__/accordion.md +0 -4
  5. package/src/lightning/accordionSection/__docs__/accordionSection.md +0 -4
  6. package/src/lightning/avatar/__docs__/avatar.md +0 -4
  7. package/src/lightning/badge/__docs__/badge.md +0 -4
  8. package/src/lightning/badge/badge.slds.css +1 -1
  9. package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +0 -4
  10. package/src/lightning/baseCombobox/baseCombobox.js +2 -2
  11. package/src/lightning/baseComboboxItem/baseComboboxItem.js +6 -10
  12. package/src/lightning/button/__docs__/button.md +3 -7
  13. package/src/lightning/buttonGroup/__docs__/buttonGroup.md +0 -4
  14. package/src/lightning/buttonIcon/__docs__/buttonIcon.md +0 -4
  15. package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +0 -4
  16. package/src/lightning/buttonMenu/__docs__/buttonMenu.md +0 -4
  17. package/src/lightning/buttonStateful/__docs__/buttonStateful.md +0 -4
  18. package/src/lightning/buttonStateful/buttonStateful.html +5 -3
  19. package/src/lightning/buttonStateful/buttonStateful.js +4 -0
  20. package/src/lightning/card/__docs__/card.md +0 -4
  21. package/src/lightning/card/card.js-meta.xml +3 -0
  22. package/src/lightning/carousel/__docs__/carousel.md +0 -4
  23. package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +0 -4
  24. package/src/lightning/combobox/__docs__/combobox.md +0 -4
  25. package/src/lightning/combobox/form-element.slds.css +4 -1
  26. package/src/lightning/datatable/columnWidthManager.js +3 -3
  27. package/src/lightning/datatable/columns.js +17 -18
  28. package/src/lightning/datatable/datatable.js +146 -84
  29. package/src/lightning/datatable/indexes.js +1 -3
  30. package/src/lightning/datatable/infiniteLoading.js +1 -1
  31. package/src/lightning/datatable/inlineEdit.js +10 -7
  32. package/src/lightning/datatable/keyboard.js +21 -44
  33. package/src/lightning/datatable/renderManager.js +9 -18
  34. package/src/lightning/datatable/rows.js +112 -128
  35. package/src/lightning/datatable/sort.js +35 -14
  36. package/src/lightning/datatable/state.js +5 -0
  37. package/src/lightning/datatable/tree.js +0 -33
  38. package/src/lightning/datatable/utils.js +15 -5
  39. package/src/lightning/datepicker/datepicker.js +12 -3
  40. package/src/lightning/datepicker/form-element.slds.css +4 -1
  41. package/src/lightning/datetimepicker/form-element.slds.css +4 -1
  42. package/src/lightning/dualListbox/__docs__/dualListbox.md +0 -4
  43. package/src/lightning/dualListbox/form-element.slds.css +4 -1
  44. package/src/lightning/dynamicIcon/__docs__/dynamicIcon.md +0 -4
  45. package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +0 -4
  46. package/src/lightning/formattedLocation/__docs__/formattedLocation.md +0 -4
  47. package/src/lightning/formattedName/__docs__/formattedName.md +0 -4
  48. package/src/lightning/formattedNumber/__docs__/formattedNumber.md +0 -4
  49. package/src/lightning/formattedPhone/__docs__/formattedPhone.md +0 -4
  50. package/src/lightning/formattedText/__docs__/formattedText.md +0 -4
  51. package/src/lightning/formattedTime/__docs__/formattedTime.md +0 -4
  52. package/src/lightning/formattedUrl/__docs__/formattedUrl.md +0 -4
  53. package/src/lightning/groupedCombobox/form-element.slds.css +4 -1
  54. package/src/lightning/helptext/form-element.slds.css +4 -1
  55. package/src/lightning/icon/__docs__/icon.md +0 -4
  56. package/src/lightning/input/form-element.slds.css +4 -1
  57. package/src/lightning/inputAddress/form-element.slds.css +4 -1
  58. package/src/lightning/inputAddress/inputAddress.js +13 -7
  59. package/src/lightning/inputLocation/__docs__/inputLocation.md +0 -4
  60. package/src/lightning/inputLocation/form-element.slds.css +4 -1
  61. package/src/lightning/inputName/form-element.slds.css +4 -1
  62. package/src/lightning/layout/__docs__/layout.md +0 -4
  63. package/src/lightning/layoutItem/__docs__/layoutItem.md +0 -4
  64. package/src/lightning/lookupAddress/form-element.slds.css +4 -1
  65. package/src/lightning/menuItem/__docs__/menuItem.md +0 -4
  66. package/src/lightning/menuSubheader/menu-subheader.slds.css +1 -1
  67. package/src/lightning/modalBase/modalBase.js +14 -31
  68. package/src/lightning/pill/__docs__/pill.md +0 -4
  69. package/src/lightning/pillContainer/__docs__/pillContainer.md +0 -4
  70. package/src/lightning/primitiveBubble/primitiveBubble.js +26 -11
  71. package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +1 -1
  72. package/src/lightning/primitiveInputCheckbox/form-element.slds.css +4 -1
  73. package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +4 -1
  74. package/src/lightning/primitiveInputColor/form-element.slds.css +4 -1
  75. package/src/lightning/primitiveInputFile/form-element.slds.css +4 -1
  76. package/src/lightning/primitiveInputSimple/form-element.slds.css +4 -1
  77. package/src/lightning/primitiveInputToggle/form-element.slds.css +4 -1
  78. package/src/lightning/progressBar/progress-bar.slds.css +1 -1
  79. package/src/lightning/radioGroup/__docs__/radioGroup.md +0 -4
  80. package/src/lightning/radioGroup/form-element.slds.css +4 -1
  81. package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +0 -4
  82. package/src/lightning/select/form-element.slds.css +4 -1
  83. package/src/lightning/slider/__docs__/slider.md +0 -4
  84. package/src/lightning/spinner/__docs__/spinner.md +0 -4
  85. package/src/lightning/tab/__docs__/tab.md +0 -4
  86. package/src/lightning/tabset/__docs__/tabset.md +0 -4
  87. package/src/lightning/textarea/__docs__/textarea.md +0 -4
  88. package/src/lightning/textarea/__examples__/various/various.html +18 -1
  89. package/src/lightning/textarea/form-element.slds.css +4 -1
  90. package/src/lightning/textarea/textarea.js +25 -0
  91. package/src/lightning/tile/__docs__/tile.md +0 -4
  92. package/src/lightning/timepicker/form-element.slds.css +4 -1
  93. package/src/lightning/tree/__docs__/tree.md +0 -4
  94. package/src/lightning/tree/tree.js +5 -1
  95. package/src/lightning/verticalNavigation/__docs__/verticalNavigation.md +0 -4
  96. package/src/lightning/verticalNavigationItem/__docs__/verticalNavigationItem.md +0 -4
  97. package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +1 -1
  98. package/src/lightning/verticalNavigationItemBadge/__docs__/verticalNavigationItemBadge.md +0 -4
  99. package/src/lightning/verticalNavigationItemBadge/badge.slds.css +1 -1
  100. package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +1 -1
  101. package/src/lightning/verticalNavigationItemIcon/__docs__/verticalNavigationItemIcon.md +0 -4
  102. package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +1 -1
  103. package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +1 -1
  104. package/src/lightning/datatable/columns-shared.js +0 -12
@@ -26,11 +26,11 @@ const SIZE_SMALL = 'small';
26
26
  const SIZE_MEDIUM = 'medium';
27
27
  const SIZE_LARGE = 'large';
28
28
  const SIZE_FULL = 'full';
29
- const MODAL_BASE = 'lightning-modal-base';
29
+ const MODAL_CONTAINER = 'lightning-overlay-container';
30
30
 
31
31
  export default class LightningModalBase extends LightningShadowBaseClass {
32
32
  // this is visible in DOM, changed from 'lightning-modal-base'
33
- static [instanceName] = MODAL_BASE;
33
+ static [instanceName] = 'lightning-modal-base';
34
34
 
35
35
  // private tracked state
36
36
  initialRender = true;
@@ -73,8 +73,6 @@ export default class LightningModalBase extends LightningShadowBaseClass {
73
73
  focusinEventBound = false;
74
74
  focusinEventHandler = null;
75
75
  lastFocussedElementOnModal = null;
76
- previousSavedInertElementsSize = 0;
77
- allTabbableElements = null;
78
76
 
79
77
  // modalFooter, child
80
78
  footerRegistered = false;
@@ -388,7 +386,7 @@ export default class LightningModalBase extends LightningShadowBaseClass {
388
386
 
389
387
  // Modal with Header variant has close button icon on lightning-modal-header child component
390
388
  // where-as Headless Modal variant has close button icon on modal-base,
391
- if (!this.isHeadlessModalVariant) {
389
+ if (!this.isHeadlessModalVariant && this.headerTitleRef) {
392
390
  // dispatch secondary event to disable close button icon present on lightning-modal-header
393
391
  this.headerTitleRef.dispatchEvent(
394
392
  new CustomEvent('privatemodalheaderdisableclose', {
@@ -461,17 +459,20 @@ export default class LightningModalBase extends LightningShadowBaseClass {
461
459
  }
462
460
 
463
461
  /**
464
- * Handler for 'focusin' events responsible for following -
465
- * <ul>
466
- * <li>While the focus is on a Modal or stacked Modals, the handler tracks the last focussed element inside a Modal</li>
467
- * <li>If user's focus moves outside a Modal, the handler tries to bring user's focus back to last focussed element</li>
468
- * </ul>
462
+ * Handler for 'focusin' events, responsible for trapping user focus to open Modal
469
463
  * @param e - Event
470
464
  */
471
- handleFocusinEvents() {
465
+ handleFocusinEvents(e) {
472
466
  // eslint-disable-next-line @lwc/lwc/no-async-operation
473
467
  requestAnimationFrame(() => {
474
- // W-14998924 note: code revert to unblock 250R downstream
468
+ const isTargetModal =
469
+ e.target?.closest(MODAL_CONTAINER) ||
470
+ e.relatedTarget?.closest(MODAL_CONTAINER);
471
+ if (this.isModalOpen && isTargetModal) {
472
+ this.lastFocussedElementOnModal = getElementWithFocus();
473
+ } else {
474
+ returnFocusToElement(this.lastFocussedElementOnModal);
475
+ }
475
476
  });
476
477
  }
477
478
 
@@ -784,7 +785,7 @@ export default class LightningModalBase extends LightningShadowBaseClass {
784
785
 
785
786
  const fallbackFocusElem = this.disableCloseButton
786
787
  ? outerModalElem
787
- : closeButtonElem;
788
+ : closeButtonElem || outerModalElem;
788
789
 
789
790
  const focusElem = preferredFocusElem
790
791
  ? preferredFocusElem
@@ -1185,24 +1186,6 @@ export default class LightningModalBase extends LightningShadowBaseClass {
1185
1186
  }
1186
1187
  }
1187
1188
 
1188
- /**
1189
- * Helper method to determine when modals are being stacked.
1190
- *
1191
- * When stacked modals are present on the page,
1192
- * elements in savedInertElements will have 'ariaHidden' attribute with a boolean true
1193
- * @returns {boolean}
1194
- */
1195
- isStackedModal() {
1196
- const { savedInertElements } = this;
1197
- for (let i = 0; i < savedInertElements.length; i++) {
1198
- const isAriaHidden = savedInertElements[i].ariaHidden;
1199
- if (isAriaHidden) {
1200
- return true;
1201
- }
1202
- }
1203
- return false;
1204
- }
1205
-
1206
1189
  /**
1207
1190
  * == W-12654751 P1 a11y bug ==
1208
1191
  *
@@ -217,7 +217,3 @@ The event properties are as follows.
217
217
  | bubbles | false | This event does not bubble. |
218
218
  | cancelable | true | This event can be canceled. You can call `preventDefault()` on this event to prevent the `click` event from being fired. |
219
219
  | composed | false | This event does not propagate outside the template in which it was dispatched. |
220
-
221
- #### Source Code
222
-
223
- `lightning-pill` 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.
@@ -291,7 +291,3 @@ The event properties are as follows.
291
291
  | bubbles | false | This event does not bubble. |
292
292
  | cancelable | true | This event can be canceled. You can call `preventDefault()` on this event. |
293
293
  | composed | false | This event does not propagate outside the template in which it was dispatched. |
294
-
295
- #### Source Code
296
-
297
- `lightning-pill-container` 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,14 +9,14 @@ const DEFAULT_ALIGN = {
9
9
  vertical: 'bottom',
10
10
  };
11
11
 
12
+ // Set to px units for easier calculation
13
+ const POPOVER_MIN_HEIGHT = 32;
14
+
12
15
  const DEFAULT_INVISIBLE_DIV_STYLES = {
13
- height: '1.5rem',
16
+ height: '1rem',
14
17
  position: 'absolute',
15
18
  left: '0',
16
19
  marginLeft: '0',
17
- // add a little bit of offset to move the <div> closer to the target, that way the mouse
18
- // doesn't move into the small white space between the target and <div>, which would close the tooltip
19
- top: '-1.1rem',
20
20
  };
21
21
 
22
22
  export default class LightningPrimitiveBubble extends LightningShadowBaseClass {
@@ -127,26 +127,41 @@ export default class LightningPrimitiveBubble extends LightningShadowBaseClass {
127
127
  '.slds-popover__body'
128
128
  );
129
129
  const invisibleDiv = document.createElement('div');
130
+ const { vertical } = this.align;
130
131
 
131
132
  let computedStyle = null;
132
133
  if (window && popoverBody) {
133
134
  computedStyle = window.getComputedStyle(popoverBody);
134
135
  invisibleDiv.style.width =
135
136
  computedStyle.getPropertyValue('width');
137
+
138
+ /*
139
+ Position the <div> based on vertical alignment of tooltip.
140
+ When vertically aligned to the bottom (nubbin below tooltip), position the <div> to
141
+ the max of the popover min-height or the popover offset height. This is necessary so that
142
+ it always positions right below the popover, so that changes to line-height or other
143
+ distance related properties do not affect the positioning.
144
+ */
145
+ if (vertical === 'bottom') {
146
+ invisibleDiv.style.top =
147
+ Math.max(POPOVER_MIN_HEIGHT, popoverBody.offsetHeight) +
148
+ 'px';
149
+ invisibleDiv.style.height =
150
+ DEFAULT_INVISIBLE_DIV_STYLES.height;
151
+ } else {
152
+ /* add a little bit of offset to move the <div> closer to the target, that way the mouse
153
+ doesn't move into the small white space between the target and <div>, which would flicker the tooltip
154
+ */
155
+ invisibleDiv.style.top = '-1.1rem';
156
+ invisibleDiv.style.height = '1.125rem';
157
+ }
136
158
  }
137
159
 
138
- invisibleDiv.style.height = DEFAULT_INVISIBLE_DIV_STYLES.height;
139
160
  invisibleDiv.style.position = DEFAULT_INVISIBLE_DIV_STYLES.position;
140
161
  invisibleDiv.style.left = DEFAULT_INVISIBLE_DIV_STYLES.left;
141
162
  invisibleDiv.style.marginLeft =
142
163
  DEFAULT_INVISIBLE_DIV_STYLES.marginLeft;
143
164
 
144
- const { vertical } = this.align;
145
-
146
- // position <div> based on vertical alignment
147
- invisibleDiv.style.top =
148
- vertical === 'top' ? DEFAULT_INVISIBLE_DIV_STYLES.top : '';
149
-
150
165
  popoverBody.appendChild(invisibleDiv);
151
166
  }
152
167
  }
@@ -220,7 +220,7 @@ export default class PrimitiveHeaderFactory extends PrimitiveDatatableCell {
220
220
  ? 'slds-line-clamp_small '
221
221
  : 'slds-truncate';
222
222
  }
223
-
223
+
224
224
  /**
225
225
  * Get th Action styles (needed for wrapping headers)
226
226
  *
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -12,7 +12,7 @@
12
12
  display: block;
13
13
  width: 100%;
14
14
  height: var(--_slds-c-progressbar-height);
15
- background: var(--slds-g-color-surface-container-1);
15
+ background: var(--slds-g-color-neutral-base-80);
16
16
  border: 0;
17
17
  position: relative;
18
18
  }
@@ -184,7 +184,3 @@ element. The legend contains the `label` value. The `fieldset` element enables
184
184
  grouping of related radio buttons to facilitate tabbing navigation and speech
185
185
  navigation for accessibility purposes. Similarly, the `legend` element
186
186
  improves accessibility by enabling a caption to be assigned to the `fieldset`.
187
-
188
- #### Source Code
189
-
190
- `lightning-radio-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.
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -75,7 +75,3 @@ To obtain the language and locale information in your org, use the `@salesforce/
75
75
 
76
76
  The `lightning-relative-date-time` component is limited to the en-US locale when running in
77
77
  the Playground and Mini-Playground in the Examples tab of this Component Reference.
78
-
79
- #### Source Code
80
-
81
- `lightning-relative-date-time` 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.
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -3,7 +3,7 @@
3
3
  <h1 class="slds-text-heading_small">Various Textarea Examples</h1>
4
4
  <p class="slds-text-body_regular">The following examples show various ways to create a textarea component.</p>
5
5
  </div>
6
-
6
+
7
7
  <div class="row">
8
8
  <h2 class="header">Basic Examples</h2>
9
9
  <lightning-textarea name="input1" label="Enter some text" ></lightning-textarea>
@@ -18,4 +18,21 @@
18
18
  <lightning-textarea name="input6" required value="initial value" label="Required textarea field with a maximum length of 60 characters" maxlength="60" ></lightning-textarea>
19
19
  <lightning-textarea name="input7" required value="" placeholder="compose your tweet" label="Required textarea field with a maximum length of 140 characters" maxlength="140" message-when-too-long="A maximum of 140 characters are allowed in a tweet." message-when-value-missing="An empty tweet cannot be posted." ></lightning-textarea>
20
20
  </div>
21
+
22
+ <div class="row">
23
+ <h2 class="header">Textarea with aria-describedby example</h2>
24
+ <div class="aria-describedby slds-box slds-m-around__large">
25
+ <h3>Example of textarea aria-describedby with multiple descriptions rendered before textarea in reverse order</h3>
26
+ <span class="desc-1" id="desc-1">Description One</span>
27
+ <span class="desc-2" id="desc-2">Description Two</span>
28
+ <lightning-textarea label="Enter some text" aria-describedby="desc-2 desc-1"></lightning-textarea>
29
+ </div>
30
+ <h2 class="header">Textarea with aria-labelledby example</h2>
31
+ <div class="aria-describedby-later slds-box slds-m-around__large">
32
+ <h3>Example of textarea aria-labelledby with multiple descriptions rendered after textarea in reverse order</h3>
33
+ <lightning-textarea label="Enter some text" aria-labelledby="desc-4 desc-3"></lightning-textarea>
34
+ <span class="desc-3" id="desc-3">Description Three</span>
35
+ <span class="desc-4" id="desc-4">Description Four</span>
36
+ </div>
37
+ </div>
21
38
  </template>
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -48,6 +48,7 @@ export default class LightningTextarea extends LightningShadowBaseClass {
48
48
  @track _helpMessage;
49
49
  @track _fieldLevelHelp;
50
50
  _ariaDescribedBy = '';
51
+ _ariaLabelledBy = '';
51
52
  _helpMessageChanged = false;
52
53
  ariaObserver = null;
53
54
 
@@ -127,6 +128,21 @@ export default class LightningTextarea extends LightningShadowBaseClass {
127
128
  this.connectAriaDescribedBy();
128
129
  }
129
130
 
131
+ /**
132
+ * A space-separated list of element IDs that provide labels for the
133
+ * aria-labelled-by value on parent lighting-textarea.
134
+ * @type {string}
135
+ */
136
+ @api
137
+ get ariaLabelledBy() {
138
+ return this._ariaLabelledBy;
139
+ }
140
+
141
+ set ariaLabelledBy(references) {
142
+ this._ariaLabelledBy = references;
143
+ this.connectAriaLabelledBy();
144
+ }
145
+
130
146
  /**
131
147
  * The maximum number of characters allowed in the textarea.
132
148
  * @type {number}
@@ -441,6 +457,7 @@ export default class LightningTextarea extends LightningShadowBaseClass {
441
457
  // instead of actually setting the value on the textarea element.
442
458
  if (!this._rendered) {
443
459
  this.connectAriaDescribedBy();
460
+ this.connectAriaLabelledBy();
444
461
  this._rendered = true;
445
462
  this._setInputValue(this._defaultValue);
446
463
 
@@ -526,6 +543,14 @@ export default class LightningTextarea extends LightningShadowBaseClass {
526
543
  });
527
544
  }
528
545
 
546
+ connectAriaLabelledBy() {
547
+ this.ariaObserver.connect({
548
+ targetSelector: 'textarea',
549
+ attribute: 'aria-labelledby',
550
+ relatedNodeIds: this.ariaLabelledBy,
551
+ });
552
+ }
553
+
529
554
  _setInputValue(value) {
530
555
  // The underlying input has been modified to dispatch an 'input' event when a direct value set
531
556
  // is used to allow for Dragon Natural Speaking (which sets the value directly on the inputs instead
@@ -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.
@@ -187,7 +187,10 @@
187
187
  }
188
188
 
189
189
  :host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
190
- border-bottom: 0; /* Remove border when using legacy version of slds-form-element */
190
+ /* @W-14518344 The following line still exists in SLDS-internal
191
+ but it was removed here because it was causing the input
192
+ component to not display it's bottom border
193
+ border-bottom: 0; Remove border when using legacy version of slds-form-element */
191
194
  padding-inline-start: 0;
192
195
  }
193
196
 
@@ -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.
@@ -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.
@@ -15,7 +15,7 @@
15
15
  border-radius: 0;
16
16
  box-shadow: inset 0 0 0 var(--slds-g-color-brand-base-60);
17
17
  cursor: pointer;
18
- color: var(--slds-g-color-neutral-base-10);
18
+ color: var(--slds-g-color-neutral-base-40);
19
19
  }
20
20
 
21
21
  :host([data-render-mode="shadow"]) .slds-nav-vertical__action_overflow {
@@ -40,7 +40,3 @@ Here's an example that creates a navigation menu with an item containing a badge
40
40
  </lightning-vertical-navigation>
41
41
  </template>
42
42
  ```
43
-
44
- #### Source Code
45
-
46
- `lightning-vertical-navigation-item-badge` 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.
@@ -12,7 +12,7 @@
12
12
  align-items: center;
13
13
  padding: var(--slds-g-spacing-1) var(--slds-g-spacing-2);
14
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));
15
+ font-size: var(--slds-c-badge-font-size, var(--slds-g-font-scale-neg-1));
16
16
  font-weight: var(--slds-g-font-weight-7);
17
17
  /* stylelint-disable */
18
18
  line-height: var(--slds-c-badge-font-lineheight, initial);
@@ -15,7 +15,7 @@
15
15
  border-radius: 0;
16
16
  box-shadow: inset 0 0 0 var(--slds-g-color-brand-base-60);
17
17
  cursor: pointer;
18
- color: var(--slds-g-color-neutral-base-10);
18
+ color: var(--slds-g-color-neutral-base-40);
19
19
  }
20
20
 
21
21
  :host([data-render-mode="shadow"]) .slds-nav-vertical__action_overflow {
@@ -37,7 +37,3 @@ Icons from the Lightning Design System are supported. Visit [https://lightningde
37
37
  When applying Lightning Design System classes or icons, check that they are available in the
38
38
  Lightning Design System release tied to your org. The latest Lightning Design System
39
39
  resources become available only when the new release is available in your org.
40
-
41
- #### Source Code
42
-
43
- `lightning-vertical-navigation-item-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.
@@ -15,7 +15,7 @@
15
15
  border-radius: 0;
16
16
  box-shadow: inset 0 0 0 var(--slds-g-color-brand-base-60);
17
17
  cursor: pointer;
18
- color: var(--slds-g-color-neutral-base-10);
18
+ color: var(--slds-g-color-neutral-base-40);
19
19
  }
20
20
 
21
21
  :host([data-render-mode="shadow"]) .slds-nav-vertical__action_overflow {
@@ -15,7 +15,7 @@
15
15
  border-radius: 0;
16
16
  box-shadow: inset 0 0 0 var(--slds-g-color-brand-base-60);
17
17
  cursor: pointer;
18
- color: var(--slds-g-color-neutral-base-10);
18
+ color: var(--slds-g-color-neutral-base-40);
19
19
  }
20
20
 
21
21
  :host([data-render-mode="shadow"]) .slds-nav-vertical__action_overflow {
@@ -1,12 +0,0 @@
1
- /**
2
- * This file exists in order to get around circular dependencies.
3
- * For ex. the `columns.js` file has a dependency on `sort.js`,
4
- * which also has a dependency on `columns.js` for `getColumnName()`.
5
- *
6
- * We split out some of the functions that could cause circular dependencies with
7
- * `column.js` into the `*-shared.js` files. `inlineEditShared.js` is another.
8
- */
9
-
10
- export function getColumnName(column) {
11
- return column.columnKey || column.fieldName;
12
- }