lightning-base-components 1.18.2-alpha → 1.18.3-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 (105) hide show
  1. package/metadata/raptor.json +4 -0
  2. package/package.json +15 -1
  3. package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
  4. package/src/lightning/accordion/__docs__/accordion.md +2 -2
  5. package/src/lightning/avatar/__docs__/avatar.md +7 -7
  6. package/src/lightning/badge/__docs__/badge.md +2 -2
  7. package/src/lightning/baseCombobox/baseCombobox.js +62 -22
  8. package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +3 -3
  9. package/src/lightning/button/__docs__/button.md +15 -15
  10. package/src/lightning/buttonIcon/__docs__/buttonIcon.md +9 -9
  11. package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +9 -9
  12. package/src/lightning/buttonMenu/__docs__/buttonMenu.md +8 -8
  13. package/src/lightning/buttonStateful/__docs__/buttonStateful.md +12 -12
  14. package/src/lightning/calendar/calendar.css +2 -2
  15. package/src/lightning/calendar/calendar.js +4 -2
  16. package/src/lightning/card/__docs__/card.md +3 -3
  17. package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +2 -2
  18. package/src/lightning/datatable/__docs__/datatable.md +45 -35
  19. package/src/lightning/datatable/autoWidthStrategy.js +3 -0
  20. package/src/lightning/datatable/columnWidthManager.js +1 -1
  21. package/src/lightning/datatable/datatable.js +8 -7
  22. package/src/lightning/datatable/rowSelection.js +7 -4
  23. package/src/lightning/datatable/templates/table/table.html +1 -0
  24. package/src/lightning/datepicker/datepicker.css +2 -2
  25. package/src/lightning/datepicker/datepicker.js +4 -2
  26. package/src/lightning/datetimepicker/datetimepicker.css +2 -2
  27. package/src/lightning/datetimepicker/datetimepicker.js +4 -2
  28. package/src/lightning/dualListbox/dualListbox.js +16 -7
  29. package/src/lightning/formattedRichText/formatted-rich-text.slds.css +230 -0
  30. package/src/lightning/formattedRichText/formattedRichText.css +2 -0
  31. package/src/lightning/formattedRichText/formattedRichText.js +4 -2
  32. package/src/lightning/formattedText/formattedText.css +1 -0
  33. package/src/lightning/formattedText/formattedText.js +3 -2
  34. package/src/lightning/helptext/__docs__/helptext.md +2 -2
  35. package/src/lightning/icon/__docs__/icon.md +5 -5
  36. package/src/lightning/icon/icon.js +6 -1
  37. package/src/lightning/iconUtils/iconUtils.js +0 -12
  38. package/src/lightning/iconUtils/polyfill.js +5 -90
  39. package/src/lightning/input/__docs__/input.md +7 -7
  40. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -0
  41. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +2 -1
  42. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
  43. package/src/lightning/input/__examples__/number/number.html +0 -5
  44. package/src/lightning/input/input.css +2 -4
  45. package/src/lightning/input/input.html +149 -239
  46. package/src/lightning/input/input.js +209 -532
  47. package/src/lightning/inputAddress/__docs__/inputAddress.md +3 -3
  48. package/src/lightning/inputUtils/inputUtils.js +15 -20
  49. package/src/lightning/inputUtils/normalize.js +7 -0
  50. package/src/lightning/{input/numberUtil.js → inputUtils/number.js} +1 -1
  51. package/src/lightning/inputUtils/utils.js +18 -0
  52. package/src/lightning/modalBody/__docs__/modalBody.md +9 -9
  53. package/src/lightning/modalFooter/__docs__/modalFooter.md +9 -9
  54. package/src/lightning/modalHeader/__docs__/modalHeader.md +9 -9
  55. package/src/lightning/overlayContainer/overlayContainer.js +4 -2
  56. package/src/lightning/pill/__docs__/pill.md +3 -3
  57. package/src/lightning/pillContainer/__docs__/pillContainer.md +14 -14
  58. package/src/lightning/primitiveIcon/primitiveIcon.js +8 -5
  59. package/src/lightning/radioGroup/__docs__/radioGroup.md +4 -4
  60. package/src/lightning/select/__docs__/select.md +2 -2
  61. package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +1 -1
  62. package/src/lightning/sldsCommon/sldsCommon.css +144 -42
  63. package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +10 -0
  64. package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.js-meta.xml +4 -0
  65. package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +18 -0
  66. package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.js-meta.xml +4 -0
  67. package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +24 -0
  68. package/src/lightning/sldsUtilsBox/sldsUtilsBox.js-meta.xml +4 -0
  69. package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +20 -0
  70. package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.js-meta.xml +4 -0
  71. package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +259 -0
  72. package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.js-meta.xml +4 -0
  73. package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +8 -0
  74. package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.js-meta.xml +4 -0
  75. package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +57 -0
  76. package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.js-meta.xml +4 -0
  77. package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +313 -0
  78. package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.js-meta.xml +4 -0
  79. package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +308 -0
  80. package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.js-meta.xml +4 -0
  81. package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +18 -0
  82. package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.js-meta.xml +4 -0
  83. package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +1408 -0
  84. package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.js-meta.xml +4 -0
  85. package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +295 -0
  86. package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.js-meta.xml +4 -0
  87. package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +14 -0
  88. package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.js-meta.xml +4 -0
  89. package/src/lightning/slider/__docs__/slider.md +2 -2
  90. package/src/lightning/tabset/__docs__/tabset.md +2 -2
  91. package/src/lightning/textarea/__docs__/textarea.md +2 -2
  92. package/src/lightning/timepicker/timepicker.js +4 -2
  93. package/src/lightning/toast/toast.js-meta.xml +2 -0
  94. package/src/lightning/toastContainer/__docs__/toastContainer.md +14 -34
  95. package/src/lightning/toastContainer/toastContainer.js +10 -15
  96. package/src/lightning/tooltipLibrary/tooltipLibrary.js +12 -5
  97. package/src/lightning/iconUtils/isIframeInEdge.js +0 -7
  98. package/src/lightning/iconUtils/supportsSvg.js +0 -16
  99. package/src/lightning/input/input-checkbox.slds.css +0 -395
  100. package/src/lightning/input/input-text.slds.css +0 -398
  101. package/src/lightning/input/normalize.js +0 -6
  102. package/src/lightning/input/selection.js +0 -131
  103. /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.html +0 -0
  104. /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.js +0 -0
  105. /package/src/lightning/{input/emailUtil.js → inputUtils/email.js} +0 -0
@@ -60,7 +60,7 @@ This example creates an address compound field with attributes to specify values
60
60
  onchange={handleChange} ></lightning-input-address>
61
61
  ```
62
62
 
63
- To bind the input value on the address fields, use the `event.target` property.
63
+ To bind the input value on the address fields, use the `event.target` property.
64
64
 
65
65
  ```js
66
66
  import { LightningElement } from 'lwc';
@@ -270,8 +270,8 @@ For example, change the minimum height of the textarea and change the background
270
270
 
271
271
  ```css
272
272
  :host {
273
- --sds-c-textarea-sizing-min-height: 200px;
274
- --sds-c-input-color-background: orange;
273
+ --slds-c-textarea-sizing-min-height: 200px;
274
+ --slds-c-input-color-background: orange;
275
275
  }
276
276
  ```
277
277
 
@@ -6,23 +6,18 @@ export {
6
6
  FieldConstraintApiWithProxyInput,
7
7
  FieldConstraintApi,
8
8
  } from './validity';
9
- export { normalizeVariant, VARIANT } from './normalize';
10
-
11
- export function isEmptyString(s) {
12
- return (
13
- s === undefined ||
14
- s === null ||
15
- (typeof s === 'string' && s.trim() === '')
16
- );
17
- }
18
-
19
- export function isEmptyObject(obj) {
20
- if (obj === undefined || obj === null || typeof obj !== 'object') {
21
- return false;
22
- }
23
- // eslint-disable-next-line guard-for-in
24
- for (const name in obj) {
25
- return false;
26
- }
27
- return true;
28
- }
9
+ export { normalizeInput, normalizeVariant, VARIANT } from './normalize';
10
+ export { isValidEmail, isValidMultipleEmails } from './email';
11
+ export {
12
+ calculateFractionDigitsFromStep,
13
+ formatNumber,
14
+ fromIsoDecimal,
15
+ hasValidNumberShortcut,
16
+ hasValidNumberSymbol,
17
+ increaseNumberByStep,
18
+ isValidNumber,
19
+ isValidNumberCharacter,
20
+ stringifyNumber,
21
+ toIsoDecimal,
22
+ } from './number';
23
+ export { isEmptyString, isEmptyObject } from './utils';
@@ -23,3 +23,10 @@ export function normalizeVariant(value) {
23
23
  ],
24
24
  });
25
25
  }
26
+
27
+ export function normalizeInput(value) {
28
+ if (typeof value === 'number' || typeof value === 'string') {
29
+ return String(value);
30
+ }
31
+ return '';
32
+ }
@@ -5,7 +5,7 @@ import {
5
5
  toLocalizedDigits,
6
6
  numberFormat,
7
7
  } from 'lightning/internationalizationLibrary';
8
- import { isEmptyString } from 'lightning/inputUtils';
8
+ import { isEmptyString } from './utils';
9
9
  import { normalizeNumber } from 'lightning/utilsPrivate';
10
10
 
11
11
  const VALID_NUMBER_CHARACTERS_EXPRESSION = new RegExp(
@@ -0,0 +1,18 @@
1
+ export function isEmptyString(s) {
2
+ return (
3
+ s === undefined ||
4
+ s === null ||
5
+ (typeof s === 'string' && s.trim() === '')
6
+ );
7
+ }
8
+
9
+ export function isEmptyObject(obj) {
10
+ if (obj === undefined || obj === null || typeof obj !== 'object') {
11
+ return false;
12
+ }
13
+ // eslint-disable-next-line guard-for-in
14
+ for (const name in obj) {
15
+ return false;
16
+ }
17
+ return true;
18
+ }
@@ -1,10 +1,10 @@
1
1
  The `lightning-modal-body` component renders the content of a modal.
2
2
 
3
- The modal components render in the order they appear in the template. Place the `lightning-modal-body`
4
- component after `lightning-modal-header` and before `lightning-modal-footer` components, if you're providing them.
3
+ The modal components render in the order they appear in the template. Place the `lightning-modal-body`
4
+ component after `lightning-modal-header` and before `lightning-modal-footer` components, if you're providing them.
5
5
 
6
6
  This sample code shows the expected order of the modal components. The modal content is
7
- created in a separate component extended from `LightningModal`. See
7
+ created in a separate component extended from `LightningModal`. See
8
8
  [Lightning Web Components Developer Guide](docs/component-library/documentation/en/lwc/)
9
9
 
10
10
  ```html
@@ -24,8 +24,8 @@ created in a separate component extended from `LightningModal`. See
24
24
  </template>
25
25
  ```
26
26
 
27
- You can nest content in `lightning-modal-body` or
28
- `lightning-modal-body` automatically scrolls the modal's content when necessary.
27
+ You can nest content in `lightning-modal-body` or
28
+ `lightning-modal-body` automatically scrolls the modal's content when necessary.
29
29
  The modal's maximum height is calculated to prevent the content from exceeding the screen height,
30
30
  and scroll bars are automatically added.
31
31
  #### Component Styling
@@ -36,18 +36,18 @@ To apply custom styling, use the `:host` selector or define a custom class using
36
36
 
37
37
  ```html
38
38
  <lightning-modal-body class="my-modal-body">
39
-
39
+
40
40
  </lightning-modal-body>
41
41
  ```
42
42
 
43
- Use SLDS styling hooks to customize the component's styles. The `--sds-c-modal-content-*` hooks
44
- enable you to customize the background color and text color of the modal body.
43
+ Use SLDS styling hooks to customize the component's styles. The `--slds-c-modal-content-*` hooks
44
+ enable you to customize the background color and text color of the modal body.
45
45
 
46
46
  For example, specify the background color on the modal using the `sds-c-modal-content-color-background` custom property.
47
47
 
48
48
  ```css
49
49
  .my-modal-body {
50
- --sds-c-modal-content-color-background: LightBlue;
50
+ --slds-c-modal-content-color-background: LightBlue;
51
51
  }
52
52
  ```
53
53
 
@@ -1,14 +1,14 @@
1
- The `lightning-modal-footer` component creates a footer at the bottom of a modal dialog.
1
+ The `lightning-modal-footer` component creates a footer at the bottom of a modal dialog.
2
2
  Use of a footer is optional.
3
3
 
4
4
  The modal components render in the order they appear in the template.
5
5
  Place the `lightning-modal-footer` component after the `lightning-modal-body` component.
6
6
 
7
7
  This sample code shows the expected order of the modal components. The modal content is
8
- created in a separate component extended from `LightningModal`. See
8
+ created in a separate component extended from `LightningModal`. See
9
9
  [Lightning Web Components Developer Guide](docs/component-library/documentation/en/lwc/)
10
10
 
11
- This sample's `lightning-modal-footer` includes two `lightning-button` components,
11
+ This sample's `lightning-modal-footer` includes two `lightning-button` components,
12
12
  but you can also use `<button>` elements.
13
13
 
14
14
  ```html
@@ -25,7 +25,7 @@ but you can also use `<button>` elements.
25
25
  variant="neutral"
26
26
  label="Cancel"
27
27
  onclick={handleDismiss}
28
- ></lightning-button>
28
+ ></lightning-button>
29
29
  <lightning-button
30
30
  class="slds-button slds-m-left_x-small"
31
31
  variant="brand"
@@ -42,18 +42,18 @@ To apply custom styling, use the `:host` selector or define a custom class using
42
42
 
43
43
  ```html
44
44
  <lightning-modal-footer class="my-modal-footer">
45
-
45
+
46
46
  </lightning-modal-footer>
47
47
  ```
48
48
 
49
- Use SLDS styling hooks to customize the component's styles. Several `--sds-c-modal-footer-*` hooks
50
- enable you to customize the footer spacing, background color, and text color.
49
+ Use SLDS styling hooks to customize the component's styles. Several `--slds-c-modal-footer-*` hooks
50
+ enable you to customize the footer spacing, background color, and text color.
51
51
 
52
52
  For example, specify the background color on the footer using the `sds-c-modal-footer-color-background` custom property.
53
53
 
54
54
  ```css
55
55
  .my-modal-footer {
56
- --sds-c-modal-footer-color-background: LightGray;
56
+ --slds-c-modal-footer-color-background: LightGray;
57
57
  }
58
58
  ```
59
59
 
@@ -66,7 +66,7 @@ For more information, see [Style Components Using Lightning Design System Stylin
66
66
  If you add buttons to the footer, you can use the accessibility attributes described in [`lightning-button`](bundle/lightning-button/documentation).
67
67
 
68
68
  When the modal opens, focus goes to the first interactive element in the modal. If there are no links in the header or any interactive elements
69
- in the modal body, the first footer button gets initial focus.
69
+ in the modal body, the first footer button gets initial focus.
70
70
 
71
71
  See [Lightning Web Components Developer Guide](docs/component-library/documentation/en/lwc/) for more information about accessibility in modals.
72
72
 
@@ -1,18 +1,18 @@
1
1
  The `lightning-modal-header` component displays header text in a panel at the top of a modal dialog.
2
- Use of a header is optional, but when you provide a header you must specify the header text with the `label` attribute.
2
+ Use of a header is optional, but when you provide a header you must specify the header text with the `label` attribute.
3
3
 
4
4
  If you don't use the `lightning-modal-header` component, you must set a label
5
5
  in the modal you create by extending `LightningModal`. A label is required for accessibility.
6
6
 
7
- The modal components render in the order they appear in the template. Place the `lightning-modal-header`
7
+ The modal components render in the order they appear in the template. Place the `lightning-modal-header`
8
8
  component before the `lightning-modal-body` component in the template.
9
9
 
10
10
  `lightning-modal-header` supports optional tagline text, which displays in smaller text below the heading. Enclose the
11
11
  tagline text directly in the `lightning-modal-header` component, no HTML tag or attribute is needed. You can include links with `<a>`
12
- tags, which are the only HTML elements permitted. If the header text is too long to fit on one line, it wraps in the modal header.
12
+ tags, which are the only HTML elements permitted. If the header text is too long to fit on one line, it wraps in the modal header.
13
13
 
14
14
  This sample code shows the expected order of the modal components. The modal content is
15
- created in a separate component extended from `LightningModal`. See
15
+ created in a separate component extended from `LightningModal`. See
16
16
  [Lightning Web Components Developer Guide](docs/component-library/documentation/en/lwc/)
17
17
 
18
18
  ```html
@@ -34,18 +34,18 @@ To apply custom styling, use the `:host` selector or define a custom class using
34
34
 
35
35
  ```html
36
36
  <lightning-modal-header label="My Modal" class="my-modal-header">
37
-
37
+
38
38
  </lightning-modal-header>
39
39
  ```
40
40
 
41
- Use SLDS styling hooks to customize the component's styles. Several `--sds-c-modal-header-*` and `--sds-c-modal-heading-*` hooks
42
- enable you to customize the header.
41
+ Use SLDS styling hooks to customize the component's styles. Several `--slds-c-modal-header-*` and `--slds-c-modal-heading-*` hooks
42
+ enable you to customize the header.
43
43
 
44
44
  For example, specify the background color on the button using the `sds-c-modal-header-color-background` custom property.
45
45
 
46
46
  ```css
47
47
  .my-modal-header {
48
- --sds-c-modal-header-color-background: LightGray;
48
+ --slds-c-modal-header-color-background: LightGray;
49
49
  }
50
50
  ```
51
51
 
@@ -59,6 +59,6 @@ When you use `lightning-modal-header` in your modal, the rendered modal provides
59
59
  If you don't use `lightning-modal-header`, the accessible label is provided using `aria-label` set to the label you provide in the modal.
60
60
 
61
61
  When the modal opens, focus goes to the first interactive element in the modal. If the header includes a link in tagline text, the link
62
- gets initial focus.
62
+ gets initial focus.
63
63
 
64
64
  See [Lightning Web Components Developer Guide](docs/component-library/documentation/en/lwc/) for more information about accessibility in modals.
@@ -1,4 +1,5 @@
1
- import { LightningElement, api, createElement } from 'lwc';
1
+ import { api, createElement } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
  import { parent, instanceName } from 'lightning/overlayUtils';
3
4
  import { guid } from 'lightning/utilsPrivate';
4
5
  import {
@@ -16,7 +17,7 @@ import {
16
17
  LWC_OVERLAY_ENGINE,
17
18
  } from 'lightning/overlayManager';
18
19
 
19
- export default class LightningOverlayContainer extends LightningElement {
20
+ export default class LightningOverlayContainer extends LightningShadowBaseClass {
20
21
  // overlayContainer has this.stack, which holds the details, and actual
21
22
  // DOM elements of local (this file) LWC overlays only, while
22
23
  // overlayManager has this.state.stack, which only tracks details of
@@ -188,6 +189,7 @@ export default class LightningOverlayContainer extends LightningElement {
188
189
  }
189
190
 
190
191
  connectedCallback() {
192
+ super.connectedCallback();
191
193
  // Notified anytime an overlay is added/removed
192
194
  // LWC overlays start on z-index 9000; always even z-index (9000, 9002)
193
195
  // Aura overlays start on z-index 9001; always on odd z-index (9001, 9003)
@@ -159,15 +159,15 @@ To apply custom styling, define a custom class using the `class` attribute.
159
159
  <lightning-pill label="Astro" class="my-pill"></lightning-pill>
160
160
  ```
161
161
 
162
- Use SLDS styling hooks to customize the component's styles. For example, specify the background color on the pill using the `--sds-c-pill-color-background` custom property.
162
+ Use SLDS styling hooks to customize the component's styles. For example, specify the background color on the pill using the `--slds-c-pill-color-background` custom property.
163
163
 
164
164
  ```css
165
165
  .my-pill {
166
- --sds-c-pill-color-background: orange;
166
+ --slds-c-pill-color-background: orange;
167
167
  }
168
168
  ```
169
169
 
170
- Additionally, the remove button contains customizable elements similar to `lightning-button-icon`. You can customize the styles on the remove button using the `--sds-c-button-*` custom properties. See the [lightning-button-icon documentation](bundle/lightning-button-icon/documentation).
170
+ Additionally, the remove button contains customizable elements similar to `lightning-button-icon`. You can customize the styles on the remove button using the `--slds-c-button-*` custom properties. See the [lightning-button-icon documentation](bundle/lightning-button-icon/documentation).
171
171
 
172
172
  See [Styling Hooks Overview](https://www.lightningdesignsystem.com/components/pills/#Styling-Hooks-Overview) for a list of CSS custom properties.
173
173
 
@@ -11,9 +11,9 @@ selections when filtering a list, such as from a multi-select picklist.
11
11
 
12
12
  `lightning-pill-container` displays a pill using the `lightning-pill` component, which can display an icon or avatar next to the text label.
13
13
 
14
- To specify the pills, set the `items` attribute to an array of values in your component's JavaScript.
14
+ To specify the pills, set the `items` attribute to an array of values in your component's JavaScript.
15
15
 
16
- By default, all pills in the container are displayed and wrap to additional lines if they can't fit on one line.
16
+ By default, all pills in the container are displayed and wrap to additional lines if they can't fit on one line.
17
17
  For information about changing the behavior, see **Managing Pill Layout in the Container**.
18
18
 
19
19
  This example creates three pills: a text-only pill, a pill with an avatar, and
@@ -131,7 +131,7 @@ export default class PillContainerRemoveExample extends LightningElement {
131
131
  Several boolean attributes let you control the layout of pills in the container. These attributes are
132
132
  set to false by default, which makes all pills display and wrap to multiple lines.
133
133
 
134
- - `is-collapsible`: Determines whether the list of pills can be expanded and collapsed. If `is-collapsible` is true, `is-expanded` can determine whether a pill list displays all the pills or one line of pills. If `is-collapsible` is false or not specified, the `is-expanded` attribute has no effect regardless of its value.
134
+ - `is-collapsible`: Determines whether the list of pills can be expanded and collapsed. If `is-collapsible` is true, `is-expanded` can determine whether a pill list displays all the pills or one line of pills. If `is-collapsible` is false or not specified, the `is-expanded` attribute has no effect regardless of its value.
135
135
  - `is-expanded`: Determines whether the full list of pills is shown. Set `is-collapsible` to true if you want to set `is-expanded` to expand and collapse the list. If you set `is-expanded` to false and don't set `is-collapsible` to true, the list is expanded.
136
136
  - `single-line`: Specifies that the pill container can display one line of pills. By default, if pills can't fit on one line, they are wrapped to additional lines to fit the container. Set `single-line` to true to limit pill display to one line. This attribute overrides `is-collapsible` and `is-expanded`.
137
137
 
@@ -156,11 +156,11 @@ This example sets `is-collapsible` and uses a button to change the value of `is-
156
156
  >
157
157
  </lightning-pill-container>
158
158
  </div>
159
- <lightning-button onclick={setExpanded} label="Expand and Collapse"></lightning-button>
159
+ <lightning-button onclick={setExpanded} label="Expand and Collapse"></lightning-button>
160
160
  </template>
161
161
  ```
162
162
 
163
- The list of pills is initially collapsed. The button expands and collapses the list.
163
+ The list of pills is initially collapsed. The button expands and collapses the list.
164
164
 
165
165
  ```javascript
166
166
  import { LightningElement } from 'lwc';
@@ -173,7 +173,7 @@ export default class PillContainerCanCollapse extends LightningElement {
173
173
  }
174
174
 
175
175
  items = [
176
- {
176
+ {
177
177
  //define the pills
178
178
  }
179
179
  ];
@@ -213,7 +213,7 @@ handlePillExpansion(){
213
213
  }
214
214
 
215
215
  items = [
216
- {
216
+ {
217
217
  //define the pills
218
218
  }
219
219
  ];
@@ -234,18 +234,18 @@ To apply additional styling, use the SLDS [utility classes](https://www.lightnin
234
234
 
235
235
  To apply custom styling, use the `:host` selector or define a custom class using the `class` attribute. Use SLDS styling hooks to customize the component's styles.
236
236
 
237
- `lightning-pill-container` renders pills using `lightning-pill`. Use the `--sds-c-pill-*` custom properties on `lightning-pill`.
237
+ `lightning-pill-container` renders pills using `lightning-pill`. Use the `--slds-c-pill-*` custom properties on `lightning-pill`.
238
238
 
239
239
  Custom properties for pill containers work only with particular `lightning-pill-container` variants for the remove button.
240
240
 
241
241
  | CSS Custom Property | `lightning-pill-container` Variants |
242
242
  | --------------------------------------- | ----------------------------------- |
243
- | `--sds-c-icon-color-background` | `standard` (default) |
244
- | `--sds-c-icon-color-foreground-default` | `standard` (default) |
245
- | `--sds-c-button-color-background` | `bare` |
246
- | `--sds-c-button-color-border` | `bare` |
247
- | `--sds-c-button-radius-border` | `bare` |
248
- | `--sds-c-button-sizing-border` | `bare` |
243
+ | `--slds-c-icon-color-background` | `standard` (default) |
244
+ | `--slds-c-icon-color-foreground-default` | `standard` (default) |
245
+ | `--slds-c-button-color-background` | `bare` |
246
+ | `--slds-c-button-color-border` | `bare` |
247
+ | `--slds-c-button-radius-border` | `bare` |
248
+ | `--slds-c-button-sizing-border` | `bare` |
249
249
 
250
250
  See [Styling Hooks Overview](https://www.lightningdesignsystem.com/components/pills/#Styling-Hooks-Overview) for a list of CSS custom properties.
251
251
 
@@ -1,12 +1,12 @@
1
1
  import { api } from 'lwc';
2
2
  import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
3
3
  import { classSet } from 'lightning/utils';
4
- import { normalizeString as normalize } from 'lightning/utilsPrivate';
4
+ import { normalizeString as normalize, isCSR } from 'lightning/utilsPrivate';
5
5
 
6
6
  import standardTemplate from './primitiveIcon.html';
7
7
  import iconStylesheets from './primitiveIcon.css';
8
8
 
9
- import { getName, isValidName, polyfill } from 'lightning/iconUtils';
9
+ import { getName, isValidName } from 'lightning/iconUtils';
10
10
  import dir from '@salesforce/i18n/dir';
11
11
  import { fetchIconLibrary, hasIconLibrary, getIconLibrary } from './fetch';
12
12
 
@@ -70,7 +70,12 @@ export default class LightningPrimitiveIcon extends LightningShadowBaseClass {
70
70
  if (this.category) {
71
71
  try {
72
72
  this._iconLibrary = null;
73
- this._iconLibrary = await fetchIconLibrary(dir, this.category);
73
+ if (isCSR) {
74
+ this._iconLibrary = await fetchIconLibrary(
75
+ dir,
76
+ this.category
77
+ );
78
+ }
74
79
  } catch (e) {
75
80
  // eslint-disable-next-line no-console
76
81
  console.warn(
@@ -83,8 +88,6 @@ export default class LightningPrimitiveIcon extends LightningShadowBaseClass {
83
88
  renderedCallback() {
84
89
  if (this.isReady || this.iconName !== this.prevIconName) {
85
90
  this.prevIconName = this.iconName;
86
- const svgElement = this.template.querySelector('svg');
87
- polyfill(svgElement);
88
91
  }
89
92
  }
90
93
 
@@ -158,11 +158,11 @@ To apply custom styling, use the `:host` selector or define a custom class using
158
158
  </lightning-radio-group>
159
159
  ```
160
160
 
161
- When using `type="button"`, you can change the line height of the button label with SLDS styling hooks. For example, use `--sds-c-button-line-height` to reduce or increase the whitespace between lines of the text label.
161
+ When using `type="button"`, you can change the line height of the button label with SLDS styling hooks. For example, use `--slds-c-button-line-height` to reduce or increase the whitespace between lines of the text label.
162
162
 
163
163
  ```css
164
164
  .my-radio-group {
165
- --sds-c-button-line-height: 2.875rem;
165
+ --slds-c-button-line-height: 2.875rem;
166
166
  }
167
167
  ```
168
168
 
@@ -170,8 +170,8 @@ When using `type="radio"`, customize the component's styles using SLDS styling h
170
170
 
171
171
  ```css
172
172
  :host {
173
- --sds-c-radio-mark-color-foreground: #000000;
174
- --sds-c-radio-color-background-checked: orange;
173
+ --slds-c-radio-mark-color-foreground: #000000;
174
+ --slds-c-radio-color-background-checked: orange;
175
175
  }
176
176
  ```
177
177
 
@@ -238,11 +238,11 @@ Use the `variant` attribute with one of these values to position the labels diff
238
238
 
239
239
  To apply additional styling, use the SLDS [utility classes](https://www.lightningdesignsystem.com/utilities/alignment) with the `class` attribute. For example, you can add padding on the top of the component using the `slds-p-top_medium` SLDS class.
240
240
 
241
- To apply custom styling, define a custom class using the `class` attribute. Use SLDS styling hooks to customize the component's styles. For example, specify the border color on the `select` element using the `--sds-c-select-color-border` custom property.
241
+ To apply custom styling, define a custom class using the `class` attribute. Use SLDS styling hooks to customize the component's styles. For example, specify the border color on the `select` element using the `--slds-c-select-color-border` custom property.
242
242
 
243
243
  ```css
244
244
  .my-select {
245
- --sds-c-select-color-border: red;
245
+ --slds-c-select-color-border: red;
246
246
  }
247
247
  ```
248
248
 
@@ -5,7 +5,7 @@ export default class LightningShadowBaseClass extends LightningElement {
5
5
 
6
6
  connectedCallback() {
7
7
  if (!this.template.synthetic) {
8
- this.template.host.setAttribute('data-render-mode', 'shadow');
8
+ this.setAttribute('data-render-mode', 'shadow');
9
9
  }
10
10
  }
11
11
  }