lightning-base-components 1.18.1-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 (298) hide show
  1. package/metadata/raptor.json +9 -0
  2. package/package.json +57 -1
  3. package/src/lightning/accordion/__docs__/accordion.md +2 -2
  4. package/src/lightning/accordion/accordion.css +12 -0
  5. package/src/lightning/accordion/accordion.html +3 -1
  6. package/src/lightning/accordion/accordion.js +4 -2
  7. package/src/lightning/accordion/accordion.slds.css +671 -0
  8. package/src/lightning/accordionSection/accordion-section.slds.css +647 -0
  9. package/src/lightning/accordionSection/accordionSection.css +14 -0
  10. package/src/lightning/accordionSection/accordionSection.html +23 -19
  11. package/src/lightning/accordionSection/accordionSection.js +29 -2
  12. package/src/lightning/ariaObserver/__docs__/ariaObserver.md +21 -9
  13. package/src/lightning/ariaObserver/ariaObserver.js +185 -154
  14. package/src/lightning/ariaObserver/polyfill.js +639 -0
  15. package/src/lightning/avatar/__docs__/avatar.md +7 -7
  16. package/src/lightning/avatar/avatar.css +2 -0
  17. package/src/lightning/avatar/avatar.html +2 -0
  18. package/src/lightning/avatar/avatar.js +18 -15
  19. package/src/lightning/avatar/avatar.slds.css +272 -0
  20. package/src/lightning/badge/__docs__/badge.md +2 -2
  21. package/src/lightning/baseCombobox/base-combobox.slds.css +1585 -0
  22. package/src/lightning/baseCombobox/baseCombobox.css +11 -1
  23. package/src/lightning/baseCombobox/baseCombobox.html +154 -146
  24. package/src/lightning/baseCombobox/baseCombobox.js +122 -46
  25. package/src/lightning/baseCombobox/spinner.slds.css +438 -0
  26. package/src/lightning/baseComboboxItem/baseComboboxItem.js +4 -2
  27. package/src/lightning/baseComboboxItem/inline.css +2 -0
  28. package/src/lightning/breadcrumb/breadcrumb.css +2 -2
  29. package/src/lightning/breadcrumb/breadcrumb.js +4 -2
  30. package/src/lightning/breadcrumb/breadcrumb.slds.css +2 -7
  31. package/src/lightning/breadcrumbs/__docs__/breadcrumbs.md +3 -3
  32. package/src/lightning/breadcrumbs/breadcrumbs.css +2 -2
  33. package/src/lightning/breadcrumbs/breadcrumbs.js +3 -2
  34. package/src/lightning/breadcrumbs/breadcrumbs.slds.css +7 -1
  35. package/src/lightning/button/__docs__/button.md +15 -15
  36. package/src/lightning/button/__examples__/inverse/inverse.css +8 -0
  37. package/src/lightning/button/__examples__/inverse/inverse.html +3 -2
  38. package/src/lightning/button/button.css +2 -0
  39. package/src/lightning/button/button.html +4 -2
  40. package/src/lightning/button/button.js +21 -0
  41. package/src/lightning/button/button.slds.css +527 -0
  42. package/src/lightning/buttonGroup/buttonGroup.css +2 -2
  43. package/src/lightning/buttonGroup/buttonGroup.js +3 -2
  44. package/src/lightning/buttonIcon/__docs__/buttonIcon.md +9 -9
  45. package/src/lightning/buttonIcon/button-icon.slds.css +215 -453
  46. package/src/lightning/buttonIcon/buttonIcon.css +2 -2
  47. package/src/lightning/buttonIcon/buttonIcon.js +4 -0
  48. package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +9 -9
  49. package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +215 -453
  50. package/src/lightning/buttonIconStateful/buttonIconStateful.css +2 -2
  51. package/src/lightning/buttonMenu/__docs__/buttonMenu.md +8 -8
  52. package/src/lightning/buttonMenu/{dropdown.slds.css → button-menu.slds.css} +853 -217
  53. package/src/lightning/buttonMenu/buttonMenu.css +2 -2
  54. package/src/lightning/buttonMenu/buttonMenu.html +2 -2
  55. package/src/lightning/buttonMenu/buttonMenu.js +10 -14
  56. package/src/lightning/buttonStateful/__docs__/buttonStateful.md +12 -12
  57. package/src/lightning/buttonStateful/button-stateful.slds.css +225 -457
  58. package/src/lightning/buttonStateful/buttonStateful.css +2 -2
  59. package/src/lightning/buttonStateful/buttonStateful.js +3 -2
  60. package/src/lightning/calendar/__examples__/basic/basic.html +7 -0
  61. package/src/lightning/calendar/__examples__/basic/basic.js +3 -0
  62. package/src/lightning/calendar/calendar.css +3 -0
  63. package/src/lightning/calendar/calendar.html +12 -9
  64. package/src/lightning/calendar/calendar.js +18 -2
  65. package/src/lightning/calendar/calendar.slds.css +2048 -0
  66. package/src/lightning/card/__docs__/card.md +3 -3
  67. package/src/lightning/card/card.css +2 -2
  68. package/src/lightning/card/card.js +3 -2
  69. package/src/lightning/card/card.slds.css +141 -88
  70. package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +2 -2
  71. package/src/lightning/colorPickerCustom/colorPickerCustom.css +2 -2
  72. package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -2
  73. package/src/lightning/colorPickerPanel/color-picker-panel.slds.css +11 -38
  74. package/src/lightning/colorPickerPanel/colorPickerPanel.css +3 -2
  75. package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -2
  76. package/src/lightning/colorPickerPanel/popover.slds.css +121 -0
  77. package/src/lightning/combobox/combobox.css +4 -0
  78. package/src/lightning/combobox/combobox.html +31 -29
  79. package/src/lightning/combobox/combobox.js +21 -4
  80. package/src/lightning/combobox/combobox.slds.css +13 -0
  81. package/src/lightning/combobox/form-element.slds.css +281 -0
  82. package/src/lightning/configProvider/defaultConfig.js +2 -1
  83. package/src/lightning/datatable/__docs__/datatable.md +45 -35
  84. package/src/lightning/datatable/autoWidthStrategy.js +3 -0
  85. package/src/lightning/datatable/columnWidthManager.js +1 -1
  86. package/src/lightning/datatable/datatable.js +8 -7
  87. package/src/lightning/datatable/rowSelection.js +7 -4
  88. package/src/lightning/datatable/templates/table/table.html +1 -0
  89. package/src/lightning/datepicker/datepicker.css +3 -0
  90. package/src/lightning/datepicker/datepicker.html +7 -4
  91. package/src/lightning/datepicker/datepicker.js +76 -20
  92. package/src/lightning/datepicker/form-element.slds.css +281 -0
  93. package/src/lightning/datepicker/input-text.slds.css +398 -0
  94. package/src/lightning/datetimepicker/datetimepicker.css +3 -0
  95. package/src/lightning/datetimepicker/datetimepicker.html +9 -3
  96. package/src/lightning/datetimepicker/datetimepicker.js +42 -36
  97. package/src/lightning/datetimepicker/form-element.slds.css +281 -0
  98. package/src/lightning/datetimepicker/input-text.slds.css +398 -0
  99. package/src/lightning/dualListbox/dualListbox.css +2 -2
  100. package/src/lightning/dualListbox/dualListbox.html +3 -3
  101. package/src/lightning/dualListbox/dualListbox.js +47 -13
  102. package/src/lightning/dualListbox/form-element.slds.css +83 -34
  103. package/src/lightning/dualListbox/keyboard.js +20 -1
  104. package/src/lightning/dynamicIcon/dynamicIcon.js +3 -2
  105. package/src/lightning/dynamicIcon/ellie.css +1 -1
  106. package/src/lightning/dynamicIcon/eq.css +1 -1
  107. package/src/lightning/dynamicIcon/score.css +1 -1
  108. package/src/lightning/dynamicIcon/strength.css +1 -1
  109. package/src/lightning/dynamicIcon/trend.css +1 -1
  110. package/src/lightning/dynamicIcon/waffle.css +1 -1
  111. package/src/lightning/formattedRichText/formatted-rich-text.slds.css +230 -0
  112. package/src/lightning/formattedRichText/formattedRichText.css +2 -0
  113. package/src/lightning/formattedRichText/formattedRichText.js +4 -2
  114. package/src/lightning/formattedRichText/linkify.js +2 -2
  115. package/src/lightning/formattedText/formattedText.css +1 -0
  116. package/src/lightning/formattedText/formattedText.js +3 -2
  117. package/src/lightning/helptext/__docs__/helptext.md +2 -2
  118. package/src/lightning/helptext/form-element.slds.css +83 -34
  119. package/src/lightning/helptext/help-text.slds.css +215 -453
  120. package/src/lightning/helptext/helptext.css +2 -2
  121. package/src/lightning/helptext/helptext.js +3 -2
  122. package/src/lightning/i18nCldrOptions/README.md +5 -0
  123. package/src/lightning/i18nService/README.md +5 -0
  124. package/src/lightning/icon/__docs__/icon.md +5 -5
  125. package/src/lightning/icon/icon.css +2 -2
  126. package/src/lightning/icon/icon.js +21 -2
  127. package/src/lightning/icon/icon.slds.css +29 -17
  128. package/src/lightning/icon/iconColors.js +1 -0
  129. package/src/lightning/iconUtils/iconUtils.js +0 -12
  130. package/src/lightning/iconUtils/polyfill.js +5 -90
  131. package/src/lightning/input/__docs__/input.md +7 -7
  132. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.css +6 -0
  133. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.html +2 -1
  134. package/src/lightning/input/__examples__/checkboxbutton/checkboxbutton.js +1 -1
  135. package/src/lightning/input/__examples__/number/number.html +0 -5
  136. package/src/lightning/input/__examples__/text/text.html +0 -1
  137. package/src/lightning/input/form-element.slds.css +281 -0
  138. package/src/lightning/input/input.css +2 -3
  139. package/src/lightning/input/input.html +154 -244
  140. package/src/lightning/input/input.js +306 -595
  141. package/src/lightning/inputAddress/__docs__/inputAddress.md +3 -3
  142. package/src/lightning/inputUtils/inputUtils.js +15 -20
  143. package/src/lightning/inputUtils/normalize.js +7 -0
  144. package/src/lightning/{input/numberUtil.js → inputUtils/number.js} +1 -1
  145. package/src/lightning/inputUtils/utils.js +18 -0
  146. package/src/lightning/internationalizationLibrary/README.md +24 -0
  147. package/src/lightning/internationalizationLibrary/utils.js +4 -1
  148. package/src/lightning/layout/__docs__/layout.md +1 -1
  149. package/src/lightning/layout/__examples__/simple/simple.css +1 -1
  150. package/src/lightning/layout/layout.css +5 -1
  151. package/src/lightning/layout/layout.js +4 -2
  152. package/src/lightning/layoutItem/__examples__/alignmentBump/alignmentBump.css +1 -1
  153. package/src/lightning/layoutItem/__examples__/sizePerDevice/sizePerDevice.css +0 -1
  154. package/src/lightning/layoutItem/layoutItem.css +5 -0
  155. package/src/lightning/layoutItem/layoutItem.js +4 -2
  156. package/src/lightning/menuDivider/menu-divider.slds.css +15 -0
  157. package/src/lightning/menuDivider/menuDivider.css +3 -0
  158. package/src/lightning/menuDivider/menuDivider.html +1 -1
  159. package/src/lightning/menuDivider/menuDivider.js +4 -2
  160. package/src/lightning/menuItem/menu-item.slds.css +140 -0
  161. package/src/lightning/menuItem/menuItem.css +3 -0
  162. package/src/lightning/menuItem/menuItem.html +43 -41
  163. package/src/lightning/menuItem/menuItem.js +4 -4
  164. package/src/lightning/menuSubheader/menu-subheader.slds.css +22 -0
  165. package/src/lightning/menuSubheader/menuSubheader.css +3 -0
  166. package/src/lightning/menuSubheader/menuSubheader.html +3 -1
  167. package/src/lightning/menuSubheader/menuSubheader.js +4 -6
  168. package/src/lightning/modal/__docs__/modal.md +3 -1
  169. package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +267 -0
  170. package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +1165 -0
  171. package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +131 -0
  172. package/src/lightning/modal/modal.js +1 -1
  173. package/src/lightning/modalBody/__docs__/modalBody.md +9 -9
  174. package/src/lightning/modalFooter/__docs__/modalFooter.md +9 -9
  175. package/src/lightning/modalHeader/__docs__/modalHeader.md +9 -9
  176. package/src/lightning/overlayContainer/overlayContainer.js +4 -2
  177. package/src/lightning/pill/__docs__/pill.md +3 -3
  178. package/src/lightning/pill/avatar.slds.css +272 -0
  179. package/src/lightning/pill/link.css +3 -0
  180. package/src/lightning/pill/link.html +1 -1
  181. package/src/lightning/pill/pill.js +29 -9
  182. package/src/lightning/pill/pill.slds.css +168 -0
  183. package/src/lightning/pill/plain.css +3 -0
  184. package/src/lightning/pill/plain.html +1 -1
  185. package/src/lightning/pill/plainLink.css +3 -0
  186. package/src/lightning/pill/plainLink.html +1 -1
  187. package/src/lightning/pillContainer/__docs__/pillContainer.md +14 -14
  188. package/src/lightning/pillContainer/barePillContainer.css +3 -0
  189. package/src/lightning/pillContainer/barePillContainer.html +1 -2
  190. package/src/lightning/pillContainer/listbox.slds.css +267 -0
  191. package/src/lightning/pillContainer/pill-container.slds.css +22 -0
  192. package/src/lightning/pillContainer/pill.slds.css +168 -0
  193. package/src/lightning/pillContainer/pillContainer.js +7 -3
  194. package/src/lightning/pillContainer/standardPillContainer.css +4 -0
  195. package/src/lightning/pillContainer/standardPillContainer.html +2 -2
  196. package/src/lightning/popup/popover.slds.css +119 -119
  197. package/src/lightning/popup/popup.css +1 -2
  198. package/src/lightning/popup/popup.js +3 -2
  199. package/src/lightning/positionLibrary/elementProxy.js +7 -2
  200. package/src/lightning/positionLibrary/util.js +8 -0
  201. package/src/lightning/primitiveBubble/primitiveBubble.css +2 -2
  202. package/src/lightning/primitiveBubble/primitiveBubble.js +4 -2
  203. package/src/lightning/primitiveButton/primitiveButton.js +5 -4
  204. package/src/lightning/primitiveCellFactory/cellWithStandardLayout.html +29 -21
  205. package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -0
  206. package/src/lightning/primitiveColorpickerButton/color-picker-button.slds.css +31 -19
  207. package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.css +2 -2
  208. package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +5 -3
  209. package/src/lightning/primitiveIcon/icon.slds.css +209 -0
  210. package/src/lightning/primitiveIcon/primitiveIcon.css +2 -1
  211. package/src/lightning/primitiveIcon/primitiveIcon.html +1 -1
  212. package/src/lightning/primitiveIcon/primitiveIcon.js +26 -16
  213. package/src/lightning/progressStep/progressStep.js +10 -13
  214. package/src/lightning/radioGroup/__docs__/radioGroup.md +4 -4
  215. package/src/lightning/radioGroup/radioGroup.css +2 -1
  216. package/src/lightning/radioGroup/radioGroup.js +4 -2
  217. package/src/lightning/select/__docs__/select.md +2 -2
  218. package/src/lightning/select/form-element.slds.css +83 -34
  219. package/src/lightning/select/select.css +2 -2
  220. package/src/lightning/select/select.js +4 -2
  221. package/src/lightning/select/select.slds.css +86 -34
  222. package/src/lightning/shadowBaseClassPrivate/shadowBaseClassPrivate.js +1 -1
  223. package/src/lightning/sldsCommon/sldsCommon.css +251 -89
  224. package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.css +10 -0
  225. package/src/lightning/sldsUtilsAlignment/sldsUtilsAlignment.js-meta.xml +4 -0
  226. package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.css +18 -0
  227. package/src/lightning/sldsUtilsBorders/sldsUtilsBorders.js-meta.xml +4 -0
  228. package/src/lightning/sldsUtilsBox/sldsUtilsBox.css +24 -0
  229. package/src/lightning/sldsUtilsBox/sldsUtilsBox.js-meta.xml +4 -0
  230. package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.css +20 -0
  231. package/src/lightning/sldsUtilsFloats/sldsUtilsFloats.js-meta.xml +4 -0
  232. package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.css +259 -0
  233. package/src/lightning/sldsUtilsGrid/sldsUtilsGrid.js-meta.xml +4 -0
  234. package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.css +8 -0
  235. package/src/lightning/sldsUtilsHyphenation/sldsUtilsHyphenation.js-meta.xml +4 -0
  236. package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.css +57 -0
  237. package/src/lightning/sldsUtilsLineClamp/sldsUtilsLineClamp.js-meta.xml +4 -0
  238. package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.css +313 -0
  239. package/src/lightning/sldsUtilsMargin/sldsUtilsMargin.js-meta.xml +4 -0
  240. package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.css +308 -0
  241. package/src/lightning/sldsUtilsPadding/sldsUtilsPadding.js-meta.xml +4 -0
  242. package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.css +18 -0
  243. package/src/lightning/sldsUtilsPosition/sldsUtilsPosition.js-meta.xml +4 -0
  244. package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.css +1408 -0
  245. package/src/lightning/sldsUtilsSizing/sldsUtilsSizing.js-meta.xml +4 -0
  246. package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.css +295 -0
  247. package/src/lightning/sldsUtilsThemes/sldsUtilsThemes.js-meta.xml +4 -0
  248. package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.css +14 -0
  249. package/src/lightning/sldsUtilsTruncation/sldsUtilsTruncation.js-meta.xml +4 -0
  250. package/src/lightning/slider/__docs__/slider.md +2 -2
  251. package/src/lightning/spinner/spinner.css +2 -2
  252. package/src/lightning/spinner/spinner.js +4 -2
  253. package/src/lightning/tabBar/tab-bar.slds.css +334 -0
  254. package/src/lightning/tabBar/tabBar.css +2 -0
  255. package/src/lightning/tabBar/tabBar.html +4 -3
  256. package/src/lightning/tabBar/tabBar.js +30 -3
  257. package/src/lightning/tabset/__docs__/tabset.md +2 -2
  258. package/src/lightning/tabset/tabset.html +5 -4
  259. package/src/lightning/tabset/tabset.js +29 -11
  260. package/src/lightning/textarea/__docs__/textarea.md +2 -2
  261. package/src/lightning/timepicker/form-element.slds.css +281 -0
  262. package/src/lightning/timepicker/timepicker.css +3 -0
  263. package/src/lightning/timepicker/timepicker.html +5 -1
  264. package/src/lightning/timepicker/timepicker.js +22 -17
  265. package/src/lightning/timepicker/timepicker.slds.css +18 -0
  266. package/src/lightning/toast/toast.js-meta.xml +2 -0
  267. package/src/lightning/toastContainer/__docs__/toastContainer.md +14 -34
  268. package/src/lightning/toastContainer/toastContainer.js +10 -15
  269. package/src/lightning/tooltipLibrary/tooltipLibrary.js +32 -23
  270. package/src/lightning/utilsPrivate/browser.js +5 -3
  271. package/src/lightning/utilsPrivate/os.js +6 -4
  272. package/src/lightning/utilsPrivate/ssr.js +4 -0
  273. package/src/lightning/utilsPrivate/utilsPrivate.js +2 -0
  274. package/src/lightning/verticalNavigation/verticalNavigation.css +2 -1
  275. package/src/lightning/verticalNavigation/verticalNavigation.js +3 -2
  276. package/src/lightning/verticalNavigationSection/verticalNavigationSection.css +2 -1
  277. package/src/lightning/verticalNavigationSection/verticalNavigationSection.js +3 -2
  278. package/src/lightning/accordion/__perf__DISABLED/accordion-perf-utils.js +0 -76
  279. package/src/lightning/accordion/__perf__DISABLED/accordion10Multiple25SectionEach.perf.js +0 -57
  280. package/src/lightning/accordion/__perf__DISABLED/accordion10Simple25SectionEach.perf.js +0 -37
  281. package/src/lightning/accordion/__perf__DISABLED/accordionMultiple50Section.perf.js +0 -45
  282. package/src/lightning/accordion/__perf__DISABLED/accordionSimple50Section.perf.js +0 -35
  283. package/src/lightning/accordion/__perf__DISABLED/container/container.html +0 -15
  284. package/src/lightning/accordion/__perf__DISABLED/container/container.js +0 -7
  285. package/src/lightning/iconUtils/isIframeInEdge.js +0 -7
  286. package/src/lightning/iconUtils/supportsSvg.js +0 -16
  287. package/src/lightning/input/input-checkbox.slds.css +0 -404
  288. package/src/lightning/input/input-text.slds.css +0 -287
  289. package/src/lightning/input/normalize.js +0 -6
  290. package/src/lightning/input/selection.js +0 -131
  291. package/src/lightning/positionLibrary/__component__/positionLibraryBounding.spec.js +0 -319
  292. package/src/lightning/positionLibrary/__component__/x/bounding/bounding.css +0 -16
  293. package/src/lightning/positionLibrary/__component__/x/bounding/bounding.html +0 -36
  294. package/src/lightning/positionLibrary/__component__/x/bounding/bounding.js +0 -122
  295. /package/src/lightning/{baseCombobox → baseComboboxItem}/listbox.slds.css +0 -0
  296. /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.html +0 -0
  297. /package/src/lightning/formattedRichText/{__examples__disabled → __examples__}/basic/basic.js +0 -0
  298. /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
+ }
@@ -0,0 +1,24 @@
1
+ # internationalizationLibrary
2
+
3
+ Currently, the code base contains logic that directs execution in two different paths, depending whether a component is being executed on the platform vs off. That logic, was intented to aid the migration off the current Aura's localization service, in favor of an unified and universal solution based on standards, that could be consumed on any enviroment.
4
+
5
+ Such logic can be detailed, on a high level as follows, at run time a path execution decides that:
6
+
7
+ if a component is run on the platform, it will make use of Aura's localization Service to format and parse dates/times.
8
+ if a component is run anywhere else, it will use the globalization i18n-service
9
+
10
+ ## When to use this utility
11
+
12
+ Because of our legacy support and backward compatiblity contracts, we use this utility as a facade, with the hope that once we are able to fully deprecate Aura's Localization service, this utility will help us to transition into [localizerjs](https://git.soma.salesforce.com/Globalization/localizerjs).
13
+
14
+ If you have an existing component that maps to any of the Aura's localization service methods, this module will aid with that.
15
+
16
+ ## Our recommmended approach
17
+
18
+ - For declarative usage, use our localization specific components, they will work both off/on platform.
19
+ - For low level, programatic usage, dealing with dates/times/numbers etc. use [localizerjs](https://git.soma.salesforce.com/Globalization/localizerjs). The next section covers more on usage and how these utiltiies are exposed.
20
+
21
+ ## Access/Exposure/Usage
22
+
23
+ 1. [internationalizationLibrary](https://github.com/salesforce-experience-platform-emu/lightning-components/tree/master/ui-lightning-components/src/main/modules/lightning/internationalizationLibrary) as a module is not exposed on the platform, but it's part of our NPM package.
24
+ 2. [localizerjs](https://git.soma.salesforce.com/Globalization/localizerjs) is maintained by the Globalization team, however, we expose it as part of Lightning. For example [i18nService](https://github.com/salesforce-experience-platform-emu/lightning-components/tree/master/ui-lightning-components/src/main/modules/lightning/i18nService). All usage of `localizerjs` should be consumed as `lightning/i18nService` and `lightning/i18nCldrOptions`. This is exposed on the platform internally and available as part of our NPM package.
@@ -1,9 +1,12 @@
1
+ import { isCSR } from 'lightning/utilsPrivate';
2
+
1
3
  /**
2
4
  * Used to determine if aura localization service is available
3
5
  * This should be true on-core and false off-core, and will
4
6
  * no longer be needed when we fully migrate off aura's service
5
7
  */
6
- export const isAuraL10NAvailable = window.$A && window.$A.localizationService;
8
+ export const isAuraL10NAvailable =
9
+ isCSR && window.$A && window.$A.localizationService;
7
10
 
8
11
  /**
9
12
  * Returns string to use when throwing an error message
@@ -121,7 +121,7 @@ To create columns with fixed widths, use the `size` attribute on `lightning-layo
121
121
  </lightning-layout>
122
122
  ```
123
123
 
124
- For more information, see the [SLDS grid utility classes](https://lightningdesignsystem.com/utilities/grid/).
124
+ For more information, see the [SLDS grid utility classes](https://lightningdesignsystem.com/utilities/grid/), and [SLDS sizing utility classes](https://www.lightningdesignsystem.com/utilities/sizing/).
125
125
 
126
126
  #### Usage Considerations
127
127
 
@@ -12,4 +12,4 @@
12
12
  line-height: 1.25;
13
13
  color: #54698d;
14
14
  margin-bottom: .25rem;
15
- }
15
+ }
@@ -1,4 +1,8 @@
1
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
1
+ @import 'lightning/sldsCommon';
2
+ @import 'lightning/sldsUtilsGrid';
3
+
4
+ @media all and (-ms-high-contrast: none),
5
+ (-ms-high-contrast: active) {
2
6
  .slds-slot {
3
7
  display: flex;
4
8
  }
@@ -1,4 +1,5 @@
1
- import { LightningElement, api, track } from 'lwc';
1
+ import { api, track } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
  import {
3
4
  normalizeParam,
4
5
  computeLayoutClass,
@@ -11,7 +12,7 @@ import { normalizeBoolean } from 'lightning/utilsPrivate';
11
12
  /**
12
13
  * Represents a responsive grid system for arranging containers on a page.
13
14
  */
14
- export default class LightningLayout extends LightningElement {
15
+ export default class LightningLayout extends LightningShadowBaseClass {
15
16
  /**
16
17
  * Determines how to spread the layout items horizontally.
17
18
  * The alignment options are center, space, spread, and end.
@@ -79,6 +80,7 @@ export default class LightningLayout extends LightningElement {
79
80
  _layoutClass = [];
80
81
 
81
82
  connectedCallback() {
83
+ super.connectedCallback();
82
84
  this.updateClassList();
83
85
  }
84
86
 
@@ -1,3 +1,3 @@
1
1
  .custom-box {
2
- background-color: #f4f6f9;
2
+ background-color: #f4f6f9;
3
3
  }
@@ -1,4 +1,3 @@
1
1
  .custom-box {
2
2
  background-color: #f4f6f9;
3
-
4
3
  }
@@ -0,0 +1,5 @@
1
+ @import 'lightning/sldsCommon';
2
+ @import 'lightning/sldsUtilsBox';
3
+ @import 'lightning/sldsUtilsGrid';
4
+ @import 'lightning/sldsUtilsPadding';
5
+ @import 'lightning/sldsUtilsSizing';
@@ -1,4 +1,5 @@
1
- import { LightningElement, api, track } from 'lwc';
1
+ import { api, track } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
  import {
3
4
  normalizeFlexibility,
4
5
  normalizePadding,
@@ -13,7 +14,7 @@ import {
13
14
  * A layout item groups information together to define visual grids, spacing, and sections.
14
15
  * @slot default Placeholder for your content in lightning-layout-item.
15
16
  */
16
- export default class LightningLayoutItem extends LightningElement {
17
+ export default class LightningLayoutItem extends LightningShadowBaseClass {
17
18
  /**
18
19
  * Make the item fluid so that it absorbs any extra space in its
19
20
  * container or shrinks when there is less space. Allowed values are:
@@ -136,6 +137,7 @@ export default class LightningLayoutItem extends LightningElement {
136
137
  _layoutClass = [];
137
138
 
138
139
  connectedCallback() {
140
+ super.connectedCallback();
139
141
  this.updateClassList();
140
142
  }
141
143
 
@@ -0,0 +1,15 @@
1
+
2
+ /* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
3
+ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
4
+
5
+ @supports (--styling-hooks: '') {
6
+ :host([data-render-mode="shadow"]) .slds-has-divider_top {
7
+ border-top: var(--sds-g-sizing-border-1, 1px) solid var(--sds-g-color-neutral-base-90, #e5e5e5);
8
+ }
9
+
10
+ :host([data-render-mode="shadow"]) .slds-has-divider_top-space {
11
+ border-top: var(--sds-g-sizing-border-1, 1px) solid var(--sds-g-color-neutral-base-90, #e5e5e5);
12
+ margin-top: var(--sds-g-spacing-2, 0.5rem);
13
+ padding-top: var(--sds-g-spacing-2, 0.5rem);
14
+ }
15
+ }
@@ -1,3 +1,6 @@
1
+ @import 'lightning/sldsCommon';
2
+ @import './menu-divider.slds.css';
3
+
1
4
  :host {
2
5
  display: block;
3
6
  }
@@ -1,3 +1,3 @@
1
1
  <template>
2
- <div class={computedClass}></div>
2
+ <div class={computedClass} part="menu-divider"></div>
3
3
  </template>
@@ -1,14 +1,16 @@
1
- import { LightningElement, api, track } from 'lwc';
1
+ import { api, track } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
  import { classSet } from 'lightning/utils';
3
4
  import { normalizeString as normalize } from 'lightning/utilsPrivate';
4
5
 
5
6
  /**
6
7
  * Creates a divider in the list of items for lightning-button-menu.
7
8
  */
8
- export default class LightningMenuDivider extends LightningElement {
9
+ export default class LightningMenuDivider extends LightningShadowBaseClass {
9
10
  @track _variant = 'standard';
10
11
 
11
12
  connectedCallback() {
13
+ super.connectedCallback();
12
14
  this.setAttribute('role', 'separator');
13
15
  }
14
16
 
@@ -0,0 +1,140 @@
1
+
2
+ /* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
3
+ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
4
+
5
+ @supports (--styling-hooks: '') {
6
+ /**
7
+ * Note: .slds-dropdown__item class used to be on the host element. Moved to
8
+ * new containing element to prevent duplicate styles in mixed-mode.
9
+ */
10
+
11
+ /**
12
+ * Menu Item
13
+ */
14
+ :host([data-render-mode="shadow"]) a {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ gap: var(--sds-g-spacing-2, 0.5rem);
19
+ position: relative;
20
+ padding: var(--sds-g-spacing-2, 0.5rem) var(--sds-g-spacing-3, 0.75rem);
21
+ color: var(--sds-g-color-neutral-base-10, #181818);
22
+ line-height: var(--sds-g-font-lineheight-4, 1.5);
23
+ font-weight: var(--sds-g-font-weight-4, 400);
24
+ white-space: nowrap;
25
+ cursor: pointer;
26
+ }
27
+
28
+ :host([data-render-mode="shadow"]) a:hover,:host([data-render-mode="shadow"])
29
+ a:focus {
30
+ outline: 0;
31
+ text-decoration: none;
32
+ background-color: var(--sds-g-color-neutral-base-95, #f3f3f3);
33
+ }
34
+
35
+ :host([data-render-mode="shadow"]) a:active {
36
+ text-decoration: none;
37
+ background-color: var(--sds-g-color-neutral-base-95, #f3f3f3);
38
+ }
39
+
40
+ :host([data-render-mode="shadow"]) a[aria-disabled='true'] {
41
+ color: var(--sds-g-color-neutral-base-80, #c9c9c9);
42
+ cursor: default;
43
+
44
+ /* Reassignment - lightning-icon */
45
+ --slds-c-icon-color-foreground-default: var(--sds-g-color-neutral-base-80, #c9c9c9);
46
+ --slds-c-icon-boundary-spacing-inline-end: 25px;
47
+ }
48
+
49
+ /* TODO: bring in PostCSS fix and see if it fixes output CSS */
50
+ :host([data-render-mode="shadow"]) a[aria-disabled='true']:hover,:host([data-render-mode="shadow"])
51
+ a:host([data-render-mode="shadow"]) [aria-disabled='true']:focus {
52
+ background-color: transparent;
53
+ }
54
+
55
+ /**
56
+ * Note: these styles were originally on the "a" element above, but flex
57
+ * context was lost because the truncate span was added, so we hijack the
58
+ * span to get the layout control that we want. Display: flex on both the
59
+ * "a" and "span" is intended, add prefix and suffix icons to see the
60
+ * generated markup and it'll make sense.
61
+ */
62
+ :host([data-render-mode="shadow"]) .slds-truncate {
63
+ display: flex;
64
+ justify-content: space-between;
65
+ align-items: center;
66
+ gap: var(--sds-g-spacing-2, 0.5rem);
67
+ }
68
+
69
+ /**
70
+ * State - Error
71
+ *
72
+ * @TODO: currently not supported by LBC
73
+ */
74
+ :host([data-render-mode="shadow"].slds-has-error) a {
75
+ background: var(--sds-g-color-error-base-40, #ba0517);
76
+ }
77
+
78
+ /**
79
+ * State - Success
80
+ *
81
+ * @TODO: currently not supported by LBC
82
+ */
83
+ :host([data-render-mode="shadow"].slds-has-success) a {
84
+ background: var(--sds-g-color-success-base-70, #45c65a);
85
+ }
86
+
87
+ :host([data-render-mode="shadow"].slds-has-error) a,:host([data-render-mode="shadow"].slds-has-success) a {
88
+ color: var(--sds-g-color-neutral-base-100, #ffffff);
89
+ }
90
+
91
+ /**
92
+ * State - Warning
93
+ *
94
+ * @TODO: currently not supported by LBC
95
+ */
96
+ :host([data-render-mode="shadow"].slds-has-warning) a {
97
+ background: var(--sds-g-color-warning-base-70, #fe9339);
98
+ }
99
+
100
+ :host([data-render-mode="shadow"].slds-has-warning) .slds-indicator_unread {
101
+ background-color: currentColor;
102
+ }
103
+
104
+ :host([data-render-mode="shadow"].slds-has-warning) .slds-indicator_unsaved {
105
+ color: currentColor;
106
+ }
107
+
108
+ :host([data-render-mode="shadow"].slds-has-error) a:hover,:host([data-render-mode="shadow"].slds-has-error) a:focus,:host([data-render-mode="shadow"].slds-has-success) a:hover,:host([data-render-mode="shadow"].slds-has-success) a:focus,:host([data-render-mode="shadow"].slds-has-warning) a:hover,:host([data-render-mode="shadow"].slds-has-warning) a:focus {
109
+ text-decoration: underline;
110
+ }
111
+
112
+ /**
113
+ * State - Selected
114
+ *
115
+ * We scope to aria-checked so we don't accidentally toggle prefix icons
116
+ * which are a separate API.
117
+ */
118
+ :host([data-render-mode="shadow"]) [aria-checked='false'] lightning-primitive-icon::part(icon) {
119
+ opacity: 0;
120
+ }
121
+
122
+ :host([data-render-mode="shadow"]) [aria-checked='true'] lightning-primitive-icon::part(icon) {
123
+ opacity: 1;
124
+ }
125
+
126
+ /**
127
+ * Status Indicator
128
+ *
129
+ * @TODO: Look into viability of refactoring into utility
130
+ */
131
+ :host([data-render-mode="shadow"]) .slds-indicator_unsaved,:host([data-render-mode="shadow"])
132
+ .slds-indicator--unsaved {
133
+ color: var(--sds-g-color-brand-base-50, #0176d3);
134
+ align-self: center;
135
+ position: relative;
136
+
137
+ /* Unsaved indicator does not have gap spacing, everything else does */
138
+ margin-inline-end: calc(var(--sds-g-spacing-2, 0.5rem) * -1);
139
+ }
140
+ }
@@ -1,3 +1,6 @@
1
+ @import 'lightning/sldsCommon';
2
+ @import './menu-item.slds.css';
3
+
1
4
  :host {
2
5
  display: block;
3
6
  }
@@ -1,50 +1,52 @@
1
1
  <template>
2
- <a href={computedHref}
3
- target={_target}
4
- role={computedRole}
5
- tabindex={computedTabIndex}
6
- accesskey={computedAccessKey}
7
- aria-checked={computedAriaChecked}
8
- aria-disabled={computedAriaDisabled}
9
- download={download}
10
- onclick={handleClick}
11
- onfocus={handleFocus}
12
- onkeydown={handleKeyDown}
13
- onblur={handleBlur}>
2
+ <div class="slds-dropdown__item" part="menu-item">
3
+ <a href={computedHref}
4
+ target={_target}
5
+ role={computedRole}
6
+ tabindex={computedTabIndex}
7
+ accesskey={computedAccessKey}
8
+ aria-checked={computedAriaChecked}
9
+ aria-disabled={computedAriaDisabled}
10
+ download={download}
11
+ onclick={handleClick}
12
+ onfocus={handleFocus}
13
+ onkeydown={handleKeyDown}
14
+ onblur={handleBlur}>
14
15
 
15
- <span class="slds-truncate">
16
- <template if:true={isMenuItemCheckbox}>
17
- <lightning-primitive-icon
18
- icon-name='utility:check'
19
- size="x-small"
20
- svg-class={computedCheckedIconClass}
21
- variant="bare">
22
- </lightning-primitive-icon>
23
- </template>
16
+ <span class="slds-truncate">
17
+ <template if:true={isMenuItemCheckbox}>
18
+ <lightning-primitive-icon
19
+ icon-name='utility:check'
20
+ size="x-small"
21
+ svg-class={computedCheckedIconClass}
22
+ variant="bare">
23
+ </lightning-primitive-icon>
24
+ </template>
24
25
 
25
- <!-- draft marker -->
26
- <abbr if:true={isDraft} class="slds-indicator_unsaved" title={draftAlternativeText}>*</abbr>
26
+ <!-- draft marker -->
27
+ <abbr if:true={isDraft} class="slds-indicator_unsaved" title={draftAlternativeText}>*</abbr>
27
28
 
28
- <!-- Prefix icon -->
29
- <template if:true={prefixIconName}>
30
- <lightning-primitive-icon
31
- icon-name={prefixIconName}
29
+ <!-- Prefix icon -->
30
+ <template if:true={prefixIconName}>
31
+ <lightning-primitive-icon
32
+ icon-name={prefixIconName}
33
+ size="x-small"
34
+ svg-class="slds-icon slds-icon_x-small slds-icon-text-default slds-m-right_x-small"
35
+ variant="bare">
36
+ </lightning-primitive-icon>
37
+ </template>
38
+
39
+ {label}
40
+ </span>
41
+
42
+ <!-- Suffix icon -->
43
+ <template if:true={iconName}>
44
+ <lightning-primitive-icon icon-name={iconName}
32
45
  size="x-small"
33
- svg-class="slds-icon slds-icon_x-small slds-icon-text-default slds-m-right_x-small"
46
+ svg-class="slds-icon-text-default slds-m-left_small slds-shrink-none"
34
47
  variant="bare">
35
48
  </lightning-primitive-icon>
36
49
  </template>
37
-
38
- {label}
39
- </span>
40
-
41
- <!-- Suffix icon -->
42
- <template if:true={iconName}>
43
- <lightning-primitive-icon icon-name={iconName}
44
- size="x-small"
45
- svg-class="slds-icon-text-default slds-m-left_small slds-shrink-none"
46
- variant="bare">
47
- </lightning-primitive-icon>
48
- </template>
49
- </a>
50
+ </a>
51
+ </div>
50
52
  </template>
@@ -1,4 +1,5 @@
1
- import { LightningElement, api, track } from 'lwc';
1
+ import { api, track } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
  import { classSet } from 'lightning/utils';
3
4
  import {
4
5
  normalizeBoolean,
@@ -10,7 +11,7 @@ import { sanitizeURL, FALLBACK_URL } from 'lightning/utilsPrivate';
10
11
  /**
11
12
  * Represents a list item in a menu.
12
13
  */
13
- export default class LightningMenuItem extends LightningElement {
14
+ export default class LightningMenuItem extends LightningShadowBaseClass {
14
15
  /**
15
16
  * A value associated with the menu item.
16
17
  * @type {string}
@@ -62,8 +63,7 @@ export default class LightningMenuItem extends LightningElement {
62
63
  @api draftAlternativeText;
63
64
 
64
65
  connectedCallback() {
65
- this.classList.add('slds-dropdown__item');
66
-
66
+ super.connectedCallback();
67
67
  this.setAttribute('role', 'presentation');
68
68
  }
69
69
 
@@ -0,0 +1,22 @@
1
+
2
+ /* Copyright (c) 2015-present, Salesforce, Inc. All rights reserved
3
+ Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
4
+
5
+ @supports (--styling-hooks: '') {
6
+ :host([data-render-mode="shadow"]) .slds-dropdown__header {
7
+ font-size: var(--sds-g-font-scale-neg-1, 0.875rem);
8
+ font-weight: var(--sds-g-font-weight-7, 700);
9
+ padding-block: var(--sds-g-spacing-2, 0.5rem);
10
+ padding-inline: var(--sds-g-spacing-3, 0.75rem);
11
+ }
12
+
13
+ /**
14
+ * @TODO: refactor when utility is available
15
+ */
16
+ :host([data-render-mode="shadow"]) .slds-truncate {
17
+ max-width: 100%;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap;
21
+ }
22
+ }
@@ -1,3 +1,6 @@
1
+ @import 'lightning/sldsCommon';
2
+ @import './menu-subheader.slds.css';
3
+
1
4
  :host {
2
5
  display: block;
3
6
  }
@@ -1,3 +1,5 @@
1
1
  <template>
2
- <span>{label}</span>
2
+ <div class="slds-dropdown__header slds-truncate" part="menu-subheader">
3
+ <span>{label}</span>
4
+ </div>
3
5
  </template>
@@ -1,9 +1,10 @@
1
- import { LightningElement, api } from 'lwc';
1
+ import { api } from 'lwc';
2
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
3
 
3
4
  /**
4
5
  * Creates a subheader in the list of items in lightning-button-menu.
5
6
  */
6
- export default class LightningMenuSubheader extends LightningElement {
7
+ export default class LightningMenuSubheader extends LightningShadowBaseClass {
7
8
  /**
8
9
  * The text displayed in the subheader.
9
10
  * @type {string}
@@ -11,10 +12,7 @@ export default class LightningMenuSubheader extends LightningElement {
11
12
  @api label;
12
13
 
13
14
  connectedCallback() {
14
- // add default CSS classes to custom element tag
15
- this.classList.add('slds-dropdown__header');
16
- this.classList.add('slds-truncate');
17
-
15
+ super.connectedCallback();
18
16
  this.setAttribute('role', 'separator');
19
17
  }
20
18
  }
@@ -58,7 +58,7 @@ The `.open()` method lets you assign values to the modal's properties. `Lightnin
58
58
 
59
59
  * `label` - Required. Sets the modal's title and assistive device label. If the modal has a header, set `label` in the `lightning-modal-header` component. If the modal doesn't have a header, set the `label` property when opening the modal.
60
60
 
61
- * `size` - Determines how much of the viewport width the modal uses. Supported values are `small`, `medium`, and `large`, which you can set when you open the modal. Default value is `medium`. The length of the modal is determined by the amount of content.
61
+ * `size` - Determines how much of the viewport width the modal uses. Supported values are `small`, `medium`, `large`, and `full`. You can set the `size` attribute when you open the modal. Default value is `medium`. The height of the modal is determined by the amount of content in the `lightning-modal-body` component, and the `size` value. For more information on the `full` variant, see the **Styling Variants** section.
62
62
 
63
63
  * `description` - Sets the modal's accessible description. It uses the `aria-description` attribute where supported, or falls back to `aria-describedby`. If you set a custom description value, include the label name at the beginning of your description, because some screen readers only read the description, and not the label.
64
64
 
@@ -560,6 +560,8 @@ The headerless variant of `LightningModal` has these additional requirements.
560
560
  - The `label` property is required for all variants of `LightningModal`. Assistive devices read the `label` value, even though the headerless modal variant doesn't display the label.
561
561
  - Because this variant doesn't use `lightning-modal-header`, you have to manually create an `<h1>` heading in `lightning-modal-body`. Provide accessible structure by starting with heading level `<h1>` and using levels up to `<h6>` appropriately. For more information, see [Semantic Structure, Headings on WebAim.org](https://webaim.org/techniques/semanticstructure/#headings).
562
562
 
563
+ You can also create a full-screen modal component by setting the `size` attribute to `full`. This variant resizes the modal to the full width and height of the viewport on screens with 767 pixels or less, like mobile phone devices. On screens 768 pixels or larger, like desktop monitors or tablets, a `size=full` modal has the same behavior as a modal with `size=large` set.
564
+
563
565
  The `LightningModal` component also supports the SLDS [Directional variant](https://www.lightningdesignsystem.com/components/modals/#Directional) modal blueprint pattern.
564
566
 
565
567
  To achieve the directional button layout, place the buttons in a `div` with the `slds-modal__footer_directional` class.