lightning-base-components 1.20.2-alpha → 1.21.1-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 (55) hide show
  1. package/metadata/raptor.json +1 -0
  2. package/package.json +10 -1
  3. package/scopedImports/@salesforce-label-LightningCombobox.currentSelection.js +1 -1
  4. package/scopedImports/@salesforce-label-LightningDualListbox.moveToAssistiveText.js +1 -0
  5. package/scopedImports/@salesforce-label-LightningDualListbox.verticallyMovedOptions.js +1 -0
  6. package/src/lightning/ariaObserver/ariaObserver.js-meta.xml +4 -0
  7. package/src/lightning/baseCombobox/baseCombobox.js +3 -2
  8. package/src/lightning/datatable/__examples__/customDatatableWrapper/customDatatableWrapper.html +11 -0
  9. package/src/lightning/datatable/__examples__/customDatatableWrapper/customDatatableWrapper.js +158 -0
  10. package/src/lightning/datatable/__examples__/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.html +6 -0
  11. package/src/lightning/datatable/__examples__/customDatatypeDeleteRowBtn/customDatatypeDeleteRowBtn.js +28 -0
  12. package/src/lightning/datatable/__examples__/customDatatypeLink/customDatatypeLink.html +9 -0
  13. package/src/lightning/datatable/__examples__/customDatatypeLink/customDatatypeLink.js +15 -0
  14. package/src/lightning/datatable/__examples__/customDatatypeNumber/customDatatypeNumber.html +10 -0
  15. package/src/lightning/datatable/__examples__/customDatatypeNumber/customDatatypeNumber.js +21 -0
  16. package/src/lightning/datatable/__examples__/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.html +10 -0
  17. package/src/lightning/datatable/__examples__/customDatatypeRowOrderingBtn/customDatatypeRowOrderingBtn.js +40 -0
  18. package/src/lightning/datatable/__examples__/customDatatypeTable/customDatatypeTable.js +38 -0
  19. package/src/lightning/datatable/__examples__/customDatatypeTable/customLink.html +9 -0
  20. package/src/lightning/datatable/__examples__/customDatatypeTable/customName.html +4 -0
  21. package/src/lightning/datatable/__examples__/customDatatypeTable/customNumber.html +3 -0
  22. package/src/lightning/datatable/__examples__/customDatatypeTable/customNumberEdit.html +10 -0
  23. package/src/lightning/datatable/__examples__/customDatatypeTable/deleteRow.html +8 -0
  24. package/src/lightning/datatable/__examples__/customDatatypeTable/iconPill.html +17 -0
  25. package/src/lightning/datatable/__examples__/customDatatypeTable/orderingButtons.html +10 -0
  26. package/src/lightning/datatable/__examples__/withAllColumnTypes/generateData.js +23 -0
  27. package/src/lightning/datatable/__examples__/withAllColumnTypes/withAllColumnTypes.html +11 -0
  28. package/src/lightning/datatable/__examples__/withAllColumnTypes/withAllColumnTypes.js +71 -0
  29. package/src/lightning/datatable/__examples__/withColResizing/generateData.js +14 -0
  30. package/src/lightning/datatable/__examples__/withColResizing/withColResizing.html +47 -0
  31. package/src/lightning/datatable/__examples__/withColResizing/withColResizing.js +42 -0
  32. package/src/lightning/datatable/__examples__/withErrors/generateData.js +14 -0
  33. package/src/lightning/datatable/__examples__/withErrors/withErrors.html +13 -0
  34. package/src/lightning/datatable/__examples__/withErrors/withErrors.js +44 -0
  35. package/src/lightning/datatable/__examples__/withInfiniteLoading/withInfiniteLoading.html +2 -1
  36. package/src/lightning/datatable/__examples__/withInfiniteLoading/withInfiniteLoading.js +1 -0
  37. package/src/lightning/datatable/__examples__/withInlineEdit/withInlineEdit.html +1 -0
  38. package/src/lightning/datatable/__examples__/withInlineEdit/withInlineEdit.js +1 -0
  39. package/src/lightning/datatable/__examples__/withRowSelection/generateData.js +14 -0
  40. package/src/lightning/datatable/__examples__/withRowSelection/withRowSelection.html +21 -0
  41. package/src/lightning/datatable/__examples__/withRowSelection/withRowSelection.js +34 -0
  42. package/src/lightning/datatable/__examples__/withTextWrapping/generateData.js +16 -0
  43. package/src/lightning/datatable/__examples__/withTextWrapping/withTextWrapping.html +14 -0
  44. package/src/lightning/datatable/__examples__/withTextWrapping/withTextWrapping.js +31 -0
  45. package/src/lightning/datatable/__examples__/withVirtualization/generateData.js +14 -0
  46. package/src/lightning/datatable/__examples__/withVirtualization/withVirtualization.html +12 -0
  47. package/src/lightning/datatable/__examples__/withVirtualization/withVirtualization.js +27 -0
  48. package/src/lightning/datatable/__examples__/withoutTableHeader/generateData.js +14 -0
  49. package/src/lightning/datatable/__examples__/withoutTableHeader/withoutTableHeader.html +10 -0
  50. package/src/lightning/datatable/__examples__/withoutTableHeader/withoutTableHeader.js +22 -0
  51. package/src/lightning/dualListbox/dualListbox.html +2 -2
  52. package/src/lightning/dualListbox/dualListbox.js +56 -2
  53. package/src/lightning/menuDivider/menuDivider.js +1 -0
  54. package/src/lightning/pill/__docs__/pill.md +6 -2
  55. package/src/lightning/pillContainer/__docs__/pillContainer.md +16 -8
@@ -16,7 +16,7 @@ To specify the pills, set the `items` attribute to an array of values in your co
16
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
- This example creates three pills: a text-only pill, a pill with an avatar, and
19
+ This example creates three pills: a text-only pill, a pill with a link and an avatar, and
20
20
  a pill with an icon.
21
21
 
22
22
  ```html
@@ -37,6 +37,7 @@ export default class PillContainerExample extends LightningElement {
37
37
  {
38
38
  type: 'avatar',
39
39
  label: 'Avatar Pill',
40
+ href: 'https://www.example.com',
40
41
  name: 'avatarpill',
41
42
  src: '/my/path/avatar.jpg',
42
43
  fallbackIconName: 'standard:user',
@@ -60,11 +61,15 @@ be used to create a pill with an avatar or icon.
60
61
  - `label`: Required. The text label that displays in the pill.
61
62
  - `name`: The name for the pill. This value is optional and can be used to identify the pill in a callback.
62
63
 
64
+ To create a pill with a link, use the following attribute.
65
+
66
+ - `href`: Required. The URL for the link.
67
+
63
68
  To create a pill with an avatar, use the following attributes.
64
69
 
65
70
  - `type`: The media type. Use `avatar`.
66
71
  - `src`: Required. The URL of the avatar.
67
- - `fallbackIconName`: The Lightning Design System name of the icon used as a fallback when the image fails to load. The initials fallback relies on this icon for its background color. Names are written in the format 'standard:account' where 'standard' is the category, and 'account' is the specific icon to be displayed. Only icons from the standard and custom categories are allowed.
72
+ - `fallbackIconName`: The Lightning Design System name of the icon to use as a fallback when the image fails to load. Names are written in the format 'standard:account' where 'standard' is the category, and 'account' is the specific icon to be displayed. Only icons from the standard and custom categories are allowed.
68
73
  - `variant`: Changes the shape of the avatar. Valid values are empty, circle, and square. This value defaults to square.
69
74
  - `alternativeText`: The alternative text used to describe the avatar, which is displayed as hover text on the image.
70
75
 
@@ -74,7 +79,7 @@ To create a pill with an icon, use the following attributes.
74
79
  - `iconName`: Required. The Lightning Design System name of the icon. Names are written in the format 'utility:down' where 'utility' is the category, and 'down' is the specific icon to be displayed. Only utility icons can be used for the `iconName`.
75
80
  - `alternativeText`: The alternative text used to describe the icon. Describe what happens when you click the button, for example 'Upload File', not what the icon looks like, 'Paperclip'.
76
81
 
77
- `lightning-pill-container` provides two variants: `bare` and `standard` (default). They are visually the same. However, the `standard` variant renders pills in an unordered list element. For more information, see the **Accessibility** section.
82
+ `lightning-pill-container` provides two variants: `bare` and `standard` (default). They’re visually the same. However, the `standard` variant renders pills in an unordered list element. For more information, see the **Accessibility** section.
78
83
 
79
84
  #### Removing Pills
80
85
 
@@ -133,7 +138,7 @@ set to false by default, which makes all pills display and wrap to multiple line
133
138
 
134
139
  - `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
140
  - `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
- - `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`.
141
+ - `single-line`: Specifies that the pill container can display one line of pills. By default, if pills can't fit on one line, they’re 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
142
 
138
143
  If all pills aren't displayed, the component shows a text button indicating how many more pills there are.
139
144
  For example, if there are five more pills that aren’t displayed, the text button shows `+5 more`. The text button fires the `focus` event when you click it.
@@ -255,13 +260,16 @@ To understand how we implemented SLDS in `lightning-pill-container`, see the **S
255
260
 
256
261
  #### Accessibility
257
262
 
258
- By default, `lightning-pill-container` renders pills using the `standard` variant, which uses an unordered list element to display pills. Press the Tab key to focus on the first pill and use the Left Arrow and Right Arrow keys to navigate through the pills. Tabbing and navigating with arrow keys puts focus only on the pill borders, not on the remove buttons. The `standard` variant renders `aria` and `role` attributes in the list elements.
263
+ By default, `lightning-pill-container` renders pills using the `standard` variant, which uses an unordered list element to display pills. Press the Tab key to focus on the first pill and use the Left Arrow and Right Arrow keys to navigate through the pills. Use the Tab key to navigate to the remove button in a pill with a link. Use arrow keys to navigate between pills.
264
+ The focus goes to a link if present, otherwise focus goes to the remove button.
265
+
266
+ The `bare` variant only supports the Tab key for navigating between focusable elements in the container's pills. The arrow keys aren't supported.
259
267
 
260
- The `bare` variant provides a focusable remove button. Tab to focus on the pill and tab again to focus on the remove button. The `bare` variant doesn't render `aria` and `role` attributes.
268
+ On mobile devices, both container variants display pills with the close button as a focusable element for accessibility.
261
269
 
262
- On mobile devices, both variants display the close button as a focusable element for accessibility.
270
+ To remove a pill, press Enter or the space bar when the pill's remove button receives focus. On mobile devices, you can tap the remove button to remove a pill.
263
271
 
264
- To remove a pill, press the Delete or Backspace key when the pill receives focus. On mobile devices, you can tap the remove button to remove a pill.
272
+ For pills with links, use the Tab key or arrow keys to focus on the pill's link, then press Enter to navigate to the link target. If you don't navigate away from the pill, tabbing again puts focus on the remove button.
265
273
 
266
274
  #### Custom Events
267
275