lightning-base-components 1.19.1-alpha → 1.19.2-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 (47) hide show
  1. package/metadata/raptor.json +488 -0
  2. package/package.json +1 -1
  3. package/src/lightning/alert/__docs__/alert.md +1 -1
  4. package/src/lightning/baseCombobox/baseCombobox.js +8 -1
  5. package/src/lightning/combobox/combobox.css +2 -0
  6. package/src/lightning/combobox/combobox.html +1 -1
  7. package/src/lightning/combobox/combobox.js +0 -2
  8. package/src/lightning/confirm/__docs__/confirm.md +1 -1
  9. package/src/lightning/datepicker/datepicker.html +2 -2
  10. package/src/lightning/datepicker/datepicker.js +29 -25
  11. package/src/lightning/datetimepicker/datetimepicker.html +1 -1
  12. package/src/lightning/f6Controller/f6Controller.js +9 -9
  13. package/src/lightning/formattedAddress/formattedAddress.js +0 -4
  14. package/src/lightning/input/__docs__/input.md +11 -0
  15. package/src/lightning/input/__examples__/file/file.html +1 -1
  16. package/src/lightning/input/input.css +2 -0
  17. package/src/lightning/input/input.html +2 -1
  18. package/src/lightning/input/input.js +38 -1
  19. package/src/lightning/menuSubheader/menuSubheader.js +1 -1
  20. package/src/lightning/modal/__docs__/modal.md +10 -0
  21. package/src/lightning/overlayContainer/overlayContainer.js +5 -6
  22. package/src/lightning/overlayUtils/overlayUtils.js +59 -0
  23. package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +1 -1
  24. package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +2 -4
  25. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +1 -1
  26. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +2 -4
  27. package/src/lightning/primitiveInputColor/primitiveInputColor.html +1 -1
  28. package/src/lightning/primitiveInputColor/primitiveInputColor.js +2 -4
  29. package/src/lightning/primitiveInputFile/primitiveInputFile.html +1 -1
  30. package/src/lightning/primitiveInputFile/primitiveInputFile.js +2 -4
  31. package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +1 -1
  32. package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +2 -2
  33. package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +3 -8
  34. package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +1 -1
  35. package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +2 -4
  36. package/src/lightning/progressBar/progressBar.html +4 -3
  37. package/src/lightning/prompt/__docs__/prompt.md +1 -1
  38. package/src/lightning/sldsGenAiUtils/sldsGenAiUtils.css +4 -0
  39. package/src/lightning/tab/tab.js +2 -4
  40. package/src/lightning/textarea/textarea.css +2 -0
  41. package/src/lightning/textarea/textarea.html +1 -1
  42. package/src/lightning/textarea/textarea.js +1 -4
  43. package/src/lightning/timepicker/timepicker.html +1 -1
  44. package/src/lightning/toast/__docs__/toast.md +18 -20
  45. package/src/lightning/toast/toast.js-meta.xml +1 -1
  46. package/src/lightning/toastContainer/toastContainer.js-meta.xml +1 -1
  47. package/src/lightning/utilsPrivate/videoUtils.js +12 -1
@@ -345,10 +345,10 @@ export class F6Controller {
345
345
  );
346
346
 
347
347
  while (treeWalker.nextNode()) {
348
- if (treeWalker.currentNode.shadowRoot) {
349
- this.shadowTreeWalker(treeWalker.currentNode.shadowRoot);
350
- } else {
348
+ if (this.isF6Region(treeWalker.currentNode)) {
351
349
  this.regions.push(treeWalker.currentNode);
350
+ } else if (treeWalker.currentNode.shadowRoot) {
351
+ this.shadowTreeWalker(treeWalker.currentNode.shadowRoot);
352
352
  }
353
353
  }
354
354
  }
@@ -393,6 +393,11 @@ export class F6Controller {
393
393
  }
394
394
  };
395
395
 
396
+ isF6Region = (element) =>
397
+ element.matches(`*[${this.config.f6RegionAttribute}]`) &&
398
+ this.isVisible(element) &&
399
+ !this.isEmpty(element);
400
+
396
401
  elementFilter = (element) => {
397
402
  if (
398
403
  element.parentElement &&
@@ -401,12 +406,7 @@ export class F6Controller {
401
406
  return NodeFilter.FILTER_REJECT;
402
407
  }
403
408
 
404
- if (
405
- (element.matches(`*[${this.config.f6RegionAttribute}]`) &&
406
- this.isVisible(element) &&
407
- !this.isEmpty(element)) ||
408
- element.shadowRoot
409
- ) {
409
+ if (this.isF6Region(element) || element.shadowRoot) {
410
410
  return NodeFilter.FILTER_ACCEPT;
411
411
  }
412
412
 
@@ -226,8 +226,4 @@ export default class LightningFormattedAddress extends LightningElement {
226
226
  get addressLink() {
227
227
  return this.template.querySelector('a');
228
228
  }
229
-
230
- handleReady(event) {
231
- this.href = (event.detail && event.detail.href) || this.mapUrl;
232
- }
233
229
  }
@@ -608,6 +608,17 @@ To apply custom styling, use the `:host` selector. Use SLDS styling hooks to cus
608
608
 
609
609
  See [Styling Hooks Overview](https://www.lightningdesignsystem.com/components/checkbox-toggle/#Styling-Hooks-Overview) for a list of CSS custom properties.
610
610
 
611
+ By default, the toggle component expands to 100% of the available width. To limit the size of the toggle component, wrap it with an element that specifies the appropriate width.
612
+
613
+ ```html
614
+ <template>
615
+ <div style="width:fit-content">
616
+ <lightning-input type="toggle" label="Toggle value" checked>
617
+ </lightning-input>
618
+ </div>
619
+ </template>
620
+ ```
621
+
611
622
  #### URL
612
623
 
613
624
  An input field for entering a URL. The address must include the protocol, such
@@ -17,7 +17,7 @@
17
17
 
18
18
  <!-- Multiple files -->
19
19
  <div class="slds-p-around_medium lgc-bg">
20
- <lightning-input type="file" label="Attachments"></lightning-input>
20
+ <lightning-input type="file" label="Attachments" multiple></lightning-input>
21
21
  </div>
22
22
  </div>
23
23
 
@@ -1,6 +1,8 @@
1
1
  /* @import 'lightning/sldsCommon';
2
2
  @import './form-element.slds.css'; */
3
3
 
4
+ @import 'lightning/sldsGenAiUtils';
5
+
4
6
  :host {
5
7
  display: block;
6
8
  }
@@ -150,6 +150,7 @@
150
150
  onblur={handleBlur}
151
151
  oncommit={handleCommit}
152
152
  onfocus={handleFocus}
153
+ onchange={handleChange}
153
154
  has-external-label={hasExternalLabel}
154
155
  required={required}
155
156
  accesskey={accesskey}
@@ -253,6 +254,6 @@
253
254
  </template>
254
255
 
255
256
  <template if:true={shouldShowHelpMessage}>
256
- <div id="help-message" class={computedHelpMessageClass} data-help-message role="alert" part="help-text">{_helpMessage}</div>
257
+ <div id="help-message" class={computedHelpMessageClass} data-help-message part="help-text">{_helpMessage}</div>
257
258
  </template>
258
259
  </template>
@@ -81,6 +81,25 @@ const ARIA_DESCRIBEDBY = 'aria-describedby';
81
81
  *
82
82
  * */
83
83
 
84
+ const VALID_INPUT_TYPES = [
85
+ 'checkbox',
86
+ 'checkbox-button',
87
+ 'date',
88
+ 'datetime',
89
+ 'time',
90
+ 'email',
91
+ 'file',
92
+ 'password',
93
+ 'search',
94
+ 'tel',
95
+ 'url',
96
+ 'number',
97
+ 'text',
98
+ 'radio',
99
+ 'toggle',
100
+ 'color',
101
+ 'range',
102
+ ];
84
103
  const VALID_NUMBER_FORMATTERS = [
85
104
  'decimal',
86
105
  'percent',
@@ -641,7 +660,10 @@ export default class LightningInput extends LightningElement {
641
660
  this._type =
642
661
  normalizedValue === 'datetime' ? 'datetime-local' : normalizedValue;
643
662
 
644
- this._validateType(normalizedValue);
663
+ // preserve old behavior of defaulting to 'text' if user supplies an invalid type.
664
+ if (!this._validateType(normalizedValue)) {
665
+ this._type = 'text';
666
+ }
645
667
 
646
668
  this._inputElementRefreshNeeded = true;
647
669
 
@@ -1692,6 +1714,15 @@ export default class LightningInput extends LightningElement {
1692
1714
  );
1693
1715
  }
1694
1716
 
1717
+ /**
1718
+ * This function determines if a type is supported by this component or not.
1719
+ *
1720
+ * We assert against the types we explicitly don't support. We also throw a warning
1721
+ * when users make common mistakes, like type phone instead of tel.
1722
+ *
1723
+ * @param {string} type - the type being set via api
1724
+ * @returns {boolean} - wether the value is valid or not
1725
+ */
1695
1726
  _validateType(type) {
1696
1727
  assert(
1697
1728
  type !== 'hidden',
@@ -1710,6 +1741,12 @@ export default class LightningInput extends LightningElement {
1710
1741
  `<lightning-input> The required attribute is not supported on radio inputs directly. It should be implemented at the radio group level.`
1711
1742
  );
1712
1743
  }
1744
+ if (type === 'phone') {
1745
+ console.warn(
1746
+ `<lightning-input> The type attribute value "phone" is invalid. Please use <lightning-input type="tel"> instead. Defaulting to text type.`
1747
+ );
1748
+ }
1749
+ return VALID_INPUT_TYPES.includes(type);
1713
1750
  }
1714
1751
 
1715
1752
  /**
@@ -11,6 +11,6 @@ export default class LightningMenuSubheader extends LightningElement {
11
11
  @api label;
12
12
 
13
13
  connectedCallback() {
14
- this.setAttribute('role', 'separator');
14
+ this.setAttribute('role', 'presentation');
15
15
  }
16
16
  }
@@ -584,6 +584,16 @@ To achieve the directional button layout, place the buttons in a `div` with the
584
584
 
585
585
  The `lightning-modal-*` helper components support [style hooks](https://www.lightningdesignsystem.com/components/modals/#Styling-Hooks-Overview). The styling hooks for the template that invokes the helper components doesn't carry over to them, so you must style each helper component individually.
586
586
 
587
+ Use styling hooks to add styles to modal components. Any other values for the `style` attribute are ignored.
588
+
589
+ ```javascript
590
+ MyModal.open({
591
+ style: {
592
+ '--slds-c-modal-color-border': 'red'
593
+ }
594
+ })`
595
+ ```
596
+
587
597
  Customizing the styling on the white modal frame and background, close button, or gray backdrop isn't supported.
588
598
 
589
599
  #### Accessibility
@@ -1,6 +1,5 @@
1
- import { api, createElement } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
3
- import { parent, instanceName } from 'lightning/overlayUtils';
1
+ import { LightningElement, api, createElement } from 'lwc';
2
+ import { parent, instanceName, normalizeApis } from 'lightning/overlayUtils';
4
3
  import { guid } from 'lightning/utilsPrivate';
5
4
  import {
6
5
  addOverlayToSharedState,
@@ -17,7 +16,7 @@ import {
17
16
  LWC_OVERLAY_ENGINE,
18
17
  } from 'lightning/overlayManager';
19
18
 
20
- export default class LightningOverlayContainer extends LightningShadowBaseClass {
19
+ export default class LightningOverlayContainer extends LightningElement {
21
20
  // overlayContainer has this.stack, which holds the details, and actual
22
21
  // DOM elements of local (this file) LWC overlays only, while
23
22
  // overlayManager has this.state.stack, which only tracks details of
@@ -51,8 +50,9 @@ export default class LightningOverlayContainer extends LightningShadowBaseClass
51
50
  return Promise.reject();
52
51
  }
53
52
  const element = createElement(overlayInstanceName, { is: scope });
53
+ const normalizedApis = normalizeApis(apis);
54
54
 
55
- Object.entries(apis).forEach(([key, value]) => {
55
+ Object.entries(normalizedApis).forEach(([key, value]) => {
56
56
  const keyLower = key.toLowerCase();
57
57
  const match = keyLower.match(/^on(.+)/);
58
58
  if (match) {
@@ -189,7 +189,6 @@ export default class LightningOverlayContainer extends LightningShadowBaseClass
189
189
  }
190
190
 
191
191
  connectedCallback() {
192
- super.connectedCallback();
193
192
  // Notified anytime an overlay is added/removed
194
193
  // LWC overlays start on z-index 9000; always even z-index (9000, 9002)
195
194
  // Aura overlays start on z-index 9001; always on odd z-index (9001, 9003)
@@ -29,3 +29,62 @@ export const properties = Symbol('properties');
29
29
  * This will be used verifying if required attributes have value assigned.
30
30
  */
31
31
  export const requiredProperties = Symbol('requiredProperties');
32
+
33
+ /**
34
+ * Only allow CSS Variables
35
+ * @param {string|Object} style Style string or object
36
+ * @returns {string} sanitized style string
37
+ */
38
+ export function normalizeStyle(style) {
39
+ const props = {};
40
+ if (typeof style === 'string') {
41
+ const regex = /([\w-]*)\s*:\s*([^;]*)/g;
42
+ let match;
43
+ while ((match = regex.exec(style))) {
44
+ if (match[1].startsWith('--')) {
45
+ props[match[1]] = match[2].trim();
46
+ } else {
47
+ // eslint-disable-next-line no-console
48
+ console.warn(
49
+ `Overlay 'style' only supports CSS Variables (invalid '${match[1]}' set)`
50
+ );
51
+ }
52
+ }
53
+ } else if (style && typeof style === 'object') {
54
+ Object.keys(style).forEach((property) => {
55
+ if (
56
+ property.startsWith('--') &&
57
+ typeof style[property] === 'string'
58
+ ) {
59
+ props[property] = style[property];
60
+ } else {
61
+ // eslint-disable-next-line no-console
62
+ console.warn(
63
+ `Overlay 'style' only supports CSS Variables (invalid '${property}' set)`
64
+ );
65
+ }
66
+ });
67
+ }
68
+ return Object.keys(props)
69
+ .map((property) => {
70
+ return `${property}:${props[property]}`;
71
+ })
72
+ .join(';');
73
+ }
74
+
75
+ /**
76
+ * Normalize the overlay apis.
77
+ * @param {Object} apis Apis passed to overlay
78
+ * @returns {Object} Normalized object of apis
79
+ */
80
+ export function normalizeApis(apis) {
81
+ if (apis && typeof apis === 'object') {
82
+ const normalizedApis = { ...apis };
83
+ // Normalize Style
84
+ if (apis.style) {
85
+ normalizedApis.style = normalizeStyle(apis.style);
86
+ }
87
+ return normalizedApis;
88
+ }
89
+ return {};
90
+ }
@@ -43,6 +43,6 @@
43
43
  </span>
44
44
  </div>
45
45
  <template if:true={helpMessage}>
46
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{helpMessage}</div>
46
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{helpMessage}</div>
47
47
  </template>
48
48
  </template>
@@ -1,12 +1,11 @@
1
1
  import { classSet } from 'lightning/utils';
2
2
  import { VARIANT } from 'lightning/inputUtils';
3
3
  import labelRequired from '@salesforce/label/LightningControl.required';
4
- import { api } from 'lwc';
5
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
4
+ import { LightningElement, api } from 'lwc';
6
5
 
7
6
  import { isNativeComponent, reflectAttribute } from 'lightning/utilsPrivate';
8
7
 
9
- export default class LightningPrimitiveInputCheckbox extends LightningShadowBaseClass {
8
+ export default class LightningPrimitiveInputCheckbox extends LightningElement {
10
9
  @api required;
11
10
  @api readOnly;
12
11
  @api label;
@@ -120,7 +119,6 @@ export default class LightningPrimitiveInputCheckbox extends LightningShadowBase
120
119
  }
121
120
 
122
121
  connectedCallback() {
123
- super.connectedCallback();
124
122
  this._isNativeShadow = isNativeComponent(this);
125
123
  }
126
124
 
@@ -19,6 +19,6 @@
19
19
  </label>
20
20
  </div>
21
21
  <template if:true={_helpMessage}>
22
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{_helpMessage}</div>
22
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{_helpMessage}</div>
23
23
  </template>
24
24
  </template>
@@ -1,11 +1,10 @@
1
- import { api } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
1
+ import { LightningElement, api } from 'lwc';
3
2
  import {
4
3
  reflectAttribute,
5
4
  normalizeBoolean,
6
5
  isNativeComponent,
7
6
  } from 'lightning/utilsPrivate';
8
- export default class LightningPrimitiveInputColor extends LightningShadowBaseClass {
7
+ export default class LightningPrimitiveInputColor extends LightningElement {
9
8
  @api ariaLabel;
10
9
  @api ariaInvalid;
11
10
  @api accessKey;
@@ -92,7 +91,6 @@ export default class LightningPrimitiveInputColor extends LightningShadowBaseCla
92
91
  /********* COMPONENT CALLBACKS *********/
93
92
 
94
93
  connectedCallback() {
95
- super.connectedCallback();
96
94
  this._isNativeShadow = isNativeComponent(this);
97
95
  }
98
96
 
@@ -45,6 +45,6 @@
45
45
  </div>
46
46
  </div>
47
47
  <template if:true={helpMessage}>
48
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{helpMessage}</div>
48
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{helpMessage}</div>
49
49
  </template>
50
50
  </template>
@@ -1,9 +1,8 @@
1
- import { api } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
1
+ import { LightningElement, api } from 'lwc';
3
2
  import { classSet } from 'lightning/utils';
4
3
  import { VARIANT } from 'lightning/inputUtils';
5
4
  import { reflectAttribute, isNativeComponent } from 'lightning/utilsPrivate';
6
- export default class LightningPrimitiveInputColor extends LightningShadowBaseClass {
5
+ export default class LightningPrimitiveInputColor extends LightningElement {
7
6
  @api hasExternalLabel;
8
7
  @api required;
9
8
  @api accessKey;
@@ -66,7 +65,6 @@ export default class LightningPrimitiveInputColor extends LightningShadowBaseCla
66
65
  /********* COMPONENT CALLBACKS *********/
67
66
 
68
67
  connectedCallback() {
69
- super.connectedCallback();
70
68
  this._isNativeShadow = isNativeComponent(this);
71
69
  }
72
70
 
@@ -40,6 +40,6 @@
40
40
  </div>
41
41
  </div>
42
42
  <template if:true={_helpMessage}>
43
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{_helpMessage}</div>
43
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{_helpMessage}</div>
44
44
  </template>
45
45
  </template>
@@ -1,5 +1,4 @@
1
- import { api } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
1
+ import { LightningElement, api } from 'lwc';
3
2
  import { isNativeComponent, reflectAttribute } from 'lightning/utilsPrivate';
4
3
  import labelRequired from '@salesforce/label/LightningControl.required';
5
4
  import labelInputFileBodyText from '@salesforce/label/LightningInputFile.bodyText';
@@ -11,7 +10,7 @@ const i18n = {
11
10
  inputFileButtonLabel: labelInputFileButtonLabel,
12
11
  };
13
12
 
14
- export default class LightningPrimitiveInputFile extends LightningShadowBaseClass {
13
+ export default class LightningPrimitiveInputFile extends LightningElement {
15
14
  _files = null;
16
15
  _helpMessage = '';
17
16
 
@@ -98,7 +97,6 @@ export default class LightningPrimitiveInputFile extends LightningShadowBaseClas
98
97
  /************************** LIFECYCLE HOOKS **************************/
99
98
 
100
99
  connectedCallback() {
101
- super.connectedCallback();
102
100
  this._isNativeShadow = isNativeComponent(this);
103
101
  this.dispatchEvent(
104
102
  new CustomEvent('privateprimitiveconnected', {
@@ -19,6 +19,6 @@
19
19
  </span>
20
20
  </div>
21
21
  <template if:true={helpMessage}>
22
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{helpMessage}</div>
22
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{helpMessage}</div>
23
23
  </template>
24
24
  </template>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div part="input-text">
3
3
  <template if:false={hasExternalLabel}>
4
- <label class={computedLabelClass} for="input" part="label" data-form-label id="input-text-label" >
4
+ <label class={computedLabelClass} for="input" part="label">
5
5
  <template if:true={required}>
6
6
  <abbr class="slds-required" title={i18n.required}>*</abbr>
7
7
  </template>
@@ -60,6 +60,6 @@
60
60
  </div>
61
61
  </div>
62
62
  <template if:true={_helpMessage}>
63
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{_helpMessage}</div>
63
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{_helpMessage}</div>
64
64
  </template>
65
65
  </template>
@@ -1,5 +1,4 @@
1
- import { api } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
1
+ import { LightningElement, api } from 'lwc';
3
2
  import labelRequired from '@salesforce/label/LightningControl.required';
4
3
  import labelClearInput from '@salesforce/label/LightningControl.clear';
5
4
  import labelLoadingIndicator from '@salesforce/label/LightningControl.loading';
@@ -50,7 +49,7 @@ const VALID_NUMBER_FORMATTERS = [
50
49
  ];
51
50
  const DEFAULT_FORMATTER = VALID_NUMBER_FORMATTERS[0];
52
51
 
53
- export default class LightningPrimitiveInputSimple extends LightningShadowBaseClass {
52
+ export default class LightningPrimitiveInputSimple extends LightningElement {
54
53
  @api hasExternalLabel;
55
54
  @api computedLabelClass;
56
55
  @api required;
@@ -81,10 +80,7 @@ export default class LightningPrimitiveInputSimple extends LightningShadowBaseCl
81
80
 
82
81
  @api
83
82
  get ariaDescribedByElements() {
84
- const lable = this._helpMessage
85
- ? this.template.querySelector('[data-form-label]')
86
- : null;
87
- return [lable, this.template.querySelector('[data-help-message]')];
83
+ return this.template.querySelector('[data-help-message]');
88
84
  }
89
85
 
90
86
  @api
@@ -608,7 +604,6 @@ export default class LightningPrimitiveInputSimple extends LightningShadowBaseCl
608
604
  }
609
605
 
610
606
  connectedCallback() {
611
- super.connectedCallback();
612
607
  if (this.isTypeNumber) {
613
608
  this.updateNumberValue(this._value);
614
609
  }
@@ -29,6 +29,6 @@
29
29
  </label>
30
30
  </div>
31
31
  <template if:true={_helpMessage}>
32
- <div id="help-message" class="slds-form-element__help" data-help-message role="alert" part="help-text">{_helpMessage}</div>
32
+ <div id="help-message" class="slds-form-element__help" data-help-message part="help-text">{_helpMessage}</div>
33
33
  </template>
34
34
  </template>
@@ -1,5 +1,4 @@
1
- import { api } from 'lwc';
2
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
1
+ import { LightningElement, api } from 'lwc';
3
2
  import {
4
3
  isNativeComponent,
5
4
  normalizeAriaAttribute,
@@ -12,7 +11,7 @@ const i18n = {
12
11
  required: labelRequired,
13
12
  };
14
13
 
15
- export default class LightningPrimitiveInputToggle extends LightningShadowBaseClass {
14
+ export default class LightningPrimitiveInputToggle extends LightningElement {
16
15
  _checked;
17
16
  _value = '';
18
17
  _ariaLabel;
@@ -146,7 +145,6 @@ export default class LightningPrimitiveInputToggle extends LightningShadowBaseCl
146
145
  }
147
146
 
148
147
  connectedCallback() {
149
- super.connectedCallback();
150
148
  this._isNativeShadow = isNativeComponent(this);
151
149
  }
152
150
 
@@ -4,10 +4,11 @@
4
4
  aria-valuemax="100"
5
5
  aria-valuenow={percentValue}
6
6
  aria-busy={ariaBusy}
7
- role="progressbar"
8
- aria-label={computeAriaLabel}>
7
+ role="progressbar"
8
+ aria-label={computeAriaLabel}
9
+ aria-labelledby="progress-bar-assistive-text">
9
10
  <span class="slds-progress-bar__value" style={computedStyle}>
10
- <span class="slds-assistive-text">{assistiveText}</span>
11
+ <span class="slds-assistive-text" id="progress-bar-assistive-text">{assistiveText}</span>
11
12
  </span>
12
13
  </div>
13
14
  </template>
@@ -55,7 +55,7 @@ This component uses the Salesforce Lightning Design System (SLDS) [`prompt` blue
55
55
  - `error`: red
56
56
  - `offline`: ​black​
57
57
 
58
- If an invalid value is provided, `LightningPrompt` uses the `default` theme.
58
+ If an invalid value is provided, `LightningPrompt` uses the `default` theme. `LightningPrompt` ignores the `style` attribute.
59
59
 
60
60
  #### Testing Your Component's Prompt
61
61
 
@@ -0,0 +1,4 @@
1
+ :host([class*="gen-ai-enabled"]) {
2
+ padding: 0;
3
+ margin-bottom: 0;
4
+ }
@@ -1,16 +1,14 @@
1
- import { api, track } from 'lwc';
1
+ import { LightningElement, api, track } from 'lwc';
2
2
  import { normalizeBoolean } from 'lightning/utilsPrivate';
3
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
4
3
  /**
5
4
  * A single tab in a tabset component.
6
5
  * @slot default Placeholder for your content in lightning-tab.
7
6
  */
8
- export default class LightningTab extends LightningShadowBaseClass {
7
+ export default class LightningTab extends LightningElement {
9
8
  @track _loadContent = false;
10
9
  _registered = false;
11
10
 
12
11
  connectedCallback() {
13
- super.connectedCallback();
14
12
  this._connected = true;
15
13
  if (this.template.synthetic) {
16
14
  this.dispatchEvent(
@@ -1,3 +1,5 @@
1
+ @import 'lightning/sldsGenAiUtils';
2
+
1
3
  :host,
2
4
  textarea {
3
5
  display: block;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <label class={computedLabelClass} for="input" id="textarea-label" data-form-label>
2
+ <label class={computedLabelClass} for="input">
3
3
  <template if:true={required}>
4
4
  <abbr class="slds-required" title={i18n.required}>*</abbr>
5
5
  </template>
@@ -438,11 +438,8 @@ export default class LightningTextarea extends LightningElement {
438
438
  }
439
439
 
440
440
  get computedUniqueHelpElementId() {
441
- const label = this.template.querySelector('[data-form-label]');
442
441
  const helpMessage = this.template.querySelector('[data-help-message]');
443
- let spaceSeperatedDescribedByIds = `${getRealDOMId(
444
- label
445
- )} ${getRealDOMId(helpMessage)}`;
442
+ let spaceSeperatedDescribedByIds = getRealDOMId(helpMessage);
446
443
  if (this.ariaDescribedBy && spaceSeperatedDescribedByIds) {
447
444
  spaceSeperatedDescribedByIds += ` ${this.ariaDescribedBy}`;
448
445
  } else if (this.ariaDescribedBy) {
@@ -40,5 +40,5 @@
40
40
  >
41
41
  </lightning-base-combobox>
42
42
  </div>
43
- <div id="error-message" data-error-message class={computedClass} aria-live="assertive">{_errorMessage}</div>
43
+ <div id="error-message" data-error-message class={computedClass}>{_errorMessage}</div>
44
44
  </template>