lightning-base-components 1.28.13-alpha → 1.28.15-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 (290) hide show
  1. package/metadata/raptor.json +13 -16
  2. package/package.json +106 -1
  3. package/{src/lightning/utilsPrivate/ssr.js → scopedImports/@salesforce-label-LightningDateTimePicker.dateFormatLabel.js} +1 -1
  4. package/scopedImports/@salesforce-label-LightningRichTextAssist.composeText.js +1 -1
  5. package/src/lightning/accordion/accordion.js-meta.xml +0 -5
  6. package/src/lightning/accordionSection/accordionSection.d.ts +1 -1
  7. package/src/lightning/accordionSection/accordionSection.js-meta.xml +0 -6
  8. package/src/lightning/alert/alert.d.ts +2 -2
  9. package/src/lightning/alert/alert.d.ts.map +1 -1
  10. package/src/lightning/alert/alert.js +2 -2
  11. package/src/lightning/ariaObserver/ariaObserver.d.ts.map +1 -1
  12. package/src/lightning/ariaObserver/ariaObserver.js +9 -1
  13. package/src/lightning/barcodeScanner/barcodeScanner.d.ts +1 -0
  14. package/src/lightning/barcodeScanner/barcodeScanner.d.ts.map +1 -1
  15. package/src/lightning/barcodeScanner/barcodeScanner.js +16 -0
  16. package/src/lightning/baseCombobox/baseCombobox.d.ts +1 -0
  17. package/src/lightning/baseCombobox/baseCombobox.d.ts.map +1 -1
  18. package/src/lightning/baseCombobox/baseCombobox.js +11 -2
  19. package/src/lightning/breadcrumbs/breadcrumbs.js-meta.xml +0 -3
  20. package/src/lightning/button/button.d.ts +1 -2
  21. package/src/lightning/button/button.d.ts.map +1 -1
  22. package/src/lightning/button/button.js-meta.xml +0 -12
  23. package/src/lightning/buttonIcon/buttonIcon.d.ts.map +1 -1
  24. package/src/lightning/buttonIcon/buttonIcon.js +3 -0
  25. package/src/lightning/buttonIconStateful/buttonIconStateful.d.ts.map +1 -1
  26. package/src/lightning/buttonStateful/buttonStateful.d.ts +1 -0
  27. package/src/lightning/buttonStateful/buttonStateful.d.ts.map +1 -1
  28. package/src/lightning/buttonStateful/buttonStateful.js +10 -0
  29. package/src/lightning/calendar/calendar.d.ts +1 -1
  30. package/src/lightning/calendar/calendar.d.ts.map +1 -1
  31. package/src/lightning/card/card.d.ts +1 -1
  32. package/src/lightning/card/card.d.ts.map +1 -1
  33. package/src/lightning/card/card.js-meta.xml +0 -8
  34. package/src/lightning/carousel/carousel.d.ts.map +1 -1
  35. package/src/lightning/carousel/carousel.js +20 -12
  36. package/src/lightning/carousel/carousel.js-meta.xml +0 -6
  37. package/src/lightning/carouselImage/carouselImage.d.ts.map +1 -1
  38. package/src/lightning/colorPickerCustom/color-picker-custom.slds.css +1 -0
  39. package/src/lightning/colorPickerCustom/colorPickerCustom.d.ts +1 -0
  40. package/src/lightning/colorPickerCustom/colorPickerCustom.d.ts.map +1 -1
  41. package/src/lightning/colorPickerCustom/colorPickerCustom.html +33 -15
  42. package/src/lightning/colorPickerCustom/colorPickerCustom.js +3 -0
  43. package/src/lightning/colorPickerPanel/colorPickerPanel.d.ts.map +1 -1
  44. package/src/lightning/colorPickerPanel/colorPickerPanel.js +4 -0
  45. package/src/lightning/colorSwatch/colorSwatch.d.ts.map +1 -1
  46. package/src/lightning/combobox/combobox.d.ts.map +1 -1
  47. package/src/lightning/confirm/confirm.d.ts +2 -2
  48. package/src/lightning/confirm/confirm.d.ts.map +1 -1
  49. package/src/lightning/confirm/confirm.js +2 -2
  50. package/src/lightning/datatable/datatable.d.ts +1 -1
  51. package/src/lightning/datatable/datatable.d.ts.map +1 -1
  52. package/src/lightning/datatable/datatable.js +3 -0
  53. package/src/lightning/datatable/keyboard.d.ts.map +1 -1
  54. package/src/lightning/datatable/keyboard.js +23 -12
  55. package/src/lightning/datatableKeyboardMixins/baseNavigation.d.ts.map +1 -1
  56. package/src/lightning/datatableKeyboardMixins/baseNavigation.js +4 -0
  57. package/src/lightning/datepicker/datepicker.d.ts.map +1 -1
  58. package/src/lightning/datepicker/datepicker.js +4 -1
  59. package/src/lightning/dualListbox/dualListbox.d.ts +4 -1
  60. package/src/lightning/dualListbox/dualListbox.d.ts.map +1 -1
  61. package/src/lightning/dualListbox/dualListbox.html +4 -4
  62. package/src/lightning/dualListbox/dualListbox.js +44 -9
  63. package/src/lightning/dualListbox/keyboard.d.ts.map +1 -1
  64. package/src/lightning/dualListbox/keyboard.js +11 -4
  65. package/src/lightning/features/features.d.ts +4 -2
  66. package/src/lightning/features/features.d.ts.map +1 -1
  67. package/src/lightning/features/features.js +1 -1
  68. package/src/lightning/features/gates/imports.d.ts +64 -39
  69. package/src/lightning/features/gates/imports.d.ts.map +1 -1
  70. package/src/lightning/features/gates/imports.js +25 -0
  71. package/src/lightning/features/gates/index.d.ts +2 -1
  72. package/src/lightning/features/gates/index.d.ts.map +1 -1
  73. package/src/lightning/features/gates/index.js +1 -1
  74. package/src/lightning/features/types.d.ts +77 -0
  75. package/src/lightning/features/types.d.ts.map +1 -0
  76. package/src/lightning/features/types.js +6 -0
  77. package/src/lightning/fileDownload/resourceResolver.d.ts.map +1 -1
  78. package/src/lightning/fileDownload/resourceResolver.js +3 -0
  79. package/src/lightning/formattedLocation/formattedLocation.html +1 -1
  80. package/src/lightning/formattedRichText/formattedRichText.d.ts.map +1 -1
  81. package/src/lightning/formattedRichTextRenderer/colorShiftUtil.d.ts +17 -0
  82. package/src/lightning/formattedRichTextRenderer/colorShiftUtil.d.ts.map +1 -0
  83. package/src/lightning/formattedRichTextRenderer/colorShiftUtil.js +118 -0
  84. package/src/lightning/formattedRichTextRenderer/formattedRichTextRenderer.d.ts +9 -0
  85. package/src/lightning/formattedRichTextRenderer/formattedRichTextRenderer.d.ts.map +1 -1
  86. package/src/lightning/formattedRichTextRenderer/formattedRichTextRenderer.js +70 -0
  87. package/src/lightning/formattedRichTextRenderer/richTextConfig.d.ts.map +1 -1
  88. package/src/lightning/formattedRichTextRenderer/richTextConfig.js +1 -0
  89. package/src/lightning/formattedTime/formattedTime.d.ts +1 -0
  90. package/src/lightning/formattedTime/formattedTime.d.ts.map +1 -1
  91. package/src/lightning/formattedTime/formattedTime.js +10 -0
  92. package/src/lightning/formattedUrl/formattedUrl.d.ts +1 -0
  93. package/src/lightning/formattedUrl/formattedUrl.d.ts.map +1 -1
  94. package/src/lightning/formattedUrl/formattedUrl.js +10 -0
  95. package/src/lightning/groupedCombobox/groupedCombobox.d.ts +4 -0
  96. package/src/lightning/groupedCombobox/groupedCombobox.d.ts.map +1 -1
  97. package/src/lightning/groupedCombobox/groupedCombobox.html +1 -0
  98. package/src/lightning/groupedCombobox/groupedCombobox.js +13 -1
  99. package/src/lightning/icon/icon.d.ts.map +1 -1
  100. package/src/lightning/input/input.d.ts +4 -0
  101. package/src/lightning/input/input.d.ts.map +1 -1
  102. package/src/lightning/input/input.js +27 -0
  103. package/src/lightning/inputAddress/inputAddress.d.ts.map +1 -1
  104. package/src/lightning/inputLocation/inputLocation.d.ts.map +1 -1
  105. package/src/lightning/inputName/inputName.d.ts +1 -0
  106. package/src/lightning/inputName/inputName.d.ts.map +1 -1
  107. package/src/lightning/inputName/inputName.html +1 -0
  108. package/src/lightning/inputName/inputName.js +3 -0
  109. package/src/lightning/inputUtils/interacting.d.ts +1 -1
  110. package/src/lightning/inputUtils/interacting.d.ts.map +1 -1
  111. package/src/lightning/inputUtils/interacting.js +17 -2
  112. package/src/lightning/internationalizationLibrary/datetime/dateTimeUtils.d.ts.map +1 -1
  113. package/src/lightning/internationalizationLibrary/datetime/dateTimeUtils.js +11 -0
  114. package/src/lightning/internationalizationLibrary/number/NumberFormat.d.ts.map +1 -1
  115. package/src/lightning/internationalizationLibrary/number/NumberFormat.js +4 -0
  116. package/src/lightning/menuItem/menuItem.js-meta.xml +0 -15
  117. package/src/lightning/modal/modal.d.ts +2 -2
  118. package/src/lightning/modal/modal.d.ts.map +1 -1
  119. package/src/lightning/modal/modal.js +2 -2
  120. package/src/lightning/modalBase/modalBase.d.ts.map +1 -1
  121. package/src/lightning/modalBase/modalBase.js +6 -0
  122. package/src/lightning/modalBody/modalBody.d.ts.map +1 -1
  123. package/src/lightning/modalHeader/modalHeader.lbc.synthetic.css +1 -0
  124. package/src/lightning/overlay/__examples__/edit/demo.css +2 -0
  125. package/src/lightning/overlay/__examples__/edit/demo.d.ts +10 -0
  126. package/src/lightning/overlay/__examples__/edit/demo.d.ts.map +1 -0
  127. package/src/lightning/overlay/__examples__/edit/demo.html +26 -0
  128. package/src/lightning/overlay/__examples__/edit/demo.js +23 -0
  129. package/src/lightning/overlay/__examples__/edit/edit.css +15 -0
  130. package/src/lightning/overlay/__examples__/edit/edit.d.ts +7 -0
  131. package/src/lightning/overlay/__examples__/edit/edit.d.ts.map +1 -0
  132. package/src/lightning/overlay/__examples__/edit/edit.html +20 -0
  133. package/src/lightning/overlay/__examples__/edit/edit.js +27 -0
  134. package/src/lightning/overlay/__examples__/info/demo.css +21 -0
  135. package/src/lightning/overlay/__examples__/info/demo.d.ts +6 -0
  136. package/src/lightning/overlay/__examples__/info/demo.d.ts.map +1 -0
  137. package/src/lightning/overlay/__examples__/info/demo.html +9 -0
  138. package/src/lightning/overlay/__examples__/info/demo.js +20 -0
  139. package/src/lightning/overlay/__examples__/info/info.css +7 -0
  140. package/src/lightning/overlay/__examples__/info/info.d.ts +5 -0
  141. package/src/lightning/overlay/__examples__/info/info.d.ts.map +1 -0
  142. package/src/lightning/overlay/__examples__/info/info.html +18 -0
  143. package/src/lightning/overlay/__examples__/info/info.js +19 -0
  144. package/src/lightning/overlay/__examples__/menu/demo.css +54 -0
  145. package/src/lightning/overlay/__examples__/menu/demo.d.ts +7 -0
  146. package/src/lightning/overlay/__examples__/menu/demo.d.ts.map +1 -0
  147. package/src/lightning/overlay/__examples__/menu/demo.html +44 -0
  148. package/src/lightning/overlay/__examples__/menu/demo.js +60 -0
  149. package/src/lightning/overlay/__examples__/menu/menu.css +8 -0
  150. package/src/lightning/overlay/__examples__/menu/menu.d.ts +7 -0
  151. package/src/lightning/overlay/__examples__/menu/menu.d.ts.map +1 -0
  152. package/src/lightning/overlay/__examples__/menu/menu.html +20 -0
  153. package/src/lightning/overlay/__examples__/menu/menu.js +30 -0
  154. package/src/lightning/overlay/overlay.d.ts +24 -5
  155. package/src/lightning/overlay/overlay.d.ts.map +1 -1
  156. package/src/lightning/overlay/overlay.html +3 -2
  157. package/src/lightning/overlay/overlay.js +63 -25
  158. package/src/lightning/overlay/overlay.js-meta.xml +2 -1
  159. package/src/lightning/overlayBase/overlayBase.css +21 -0
  160. package/src/lightning/overlayBase/overlayBase.d.ts +28 -0
  161. package/src/lightning/overlayBase/overlayBase.d.ts.map +1 -0
  162. package/src/lightning/overlayBase/overlayBase.html +24 -0
  163. package/src/lightning/overlayBase/overlayBase.js +125 -0
  164. package/src/lightning/overlayBase/overlayBase.js-meta.xml +8 -0
  165. package/src/lightning/overlayContainer/overlayContainer.js +1 -1
  166. package/src/lightning/overlayManager/overlayManager.d.ts +2 -2
  167. package/src/lightning/overlayManager/overlayManager.js +4 -4
  168. package/src/lightning/overlayPositionUtils/anchorPositioningAdapter.d.ts +24 -0
  169. package/src/lightning/overlayPositionUtils/anchorPositioningAdapter.d.ts.map +1 -0
  170. package/src/lightning/overlayPositionUtils/anchorPositioningAdapter.js +49 -0
  171. package/src/lightning/overlayPositionUtils/cssAnchorPositioning.d.ts +14 -0
  172. package/src/lightning/overlayPositionUtils/cssAnchorPositioning.d.ts.map +1 -0
  173. package/src/lightning/overlayPositionUtils/cssAnchorPositioning.js +94 -0
  174. package/src/lightning/overlayPositionUtils/overlayPositionUtils.d.ts +55 -0
  175. package/src/lightning/overlayPositionUtils/overlayPositionUtils.d.ts.map +1 -0
  176. package/src/lightning/overlayPositionUtils/overlayPositionUtils.js +107 -0
  177. package/src/lightning/overlayPositionUtils/overlayPositionUtils.js-meta.xml +6 -0
  178. package/src/lightning/overlayPositionUtils/positionLibraryFallback.d.ts +30 -0
  179. package/src/lightning/overlayPositionUtils/positionLibraryFallback.d.ts.map +1 -0
  180. package/src/lightning/overlayPositionUtils/positionLibraryFallback.js +435 -0
  181. package/src/lightning/pill/pill.d.ts.map +1 -1
  182. package/src/lightning/pill/pill.js +4 -0
  183. package/src/lightning/pill/pill.js-meta.xml +0 -10
  184. package/src/lightning/pillContainer/standardPillContainer.lbc.native.css +1 -1
  185. package/src/lightning/positionLibrary/elementProxy.d.ts.map +1 -1
  186. package/src/lightning/positionLibrary/elementProxy.js +6 -0
  187. package/src/lightning/positionLibrary/overlayDetector.d.ts +1 -1
  188. package/src/lightning/positionLibrary/overlayDetector.js +5 -5
  189. package/src/lightning/primitiveCellFactory/primitiveCellFactory.d.ts +2 -2
  190. package/src/lightning/primitiveCellFactory/primitiveCellFactory.d.ts.map +1 -1
  191. package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +4 -4
  192. package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.d.ts.map +1 -1
  193. package/src/lightning/primitiveDatatableCell/primitiveDatatableCell.js +3 -2
  194. package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.d.ts.map +1 -1
  195. package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +8 -0
  196. package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.d.ts.map +1 -1
  197. package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.js +8 -0
  198. package/src/lightning/primitiveHeaderFactory/selectableHeader.html +1 -0
  199. package/src/lightning/primitiveIcon/primitiveIcon.d.ts +1 -1
  200. package/src/lightning/primitiveIcon/primitiveIcon.d.ts.map +1 -1
  201. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.d.ts +2 -0
  202. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.d.ts.map +1 -1
  203. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +9 -5
  204. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +18 -1
  205. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButtonOld.html +30 -0
  206. package/src/lightning/primitiveInputSimple/input-compat.slds.css +42 -0
  207. package/src/lightning/primitiveInputSimple/primitiveInputSimple.d.ts.map +1 -1
  208. package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +2 -1
  209. package/src/lightning/primitiveInputSimple/primitiveInputSimple.lbc.native.css +1 -0
  210. package/src/lightning/{overlay → primitiveOverlay}/__examples__/alert/alert.d.ts +2 -2
  211. package/src/lightning/primitiveOverlay/__examples__/alert/alert.d.ts.map +1 -0
  212. package/src/lightning/{overlay → primitiveOverlay}/__examples__/alert/alert.js +2 -2
  213. package/src/lightning/primitiveOverlay/__examples__/basic/basic.d.ts.map +1 -0
  214. package/src/lightning/{overlay → primitiveOverlay}/__examples__/demo/demo.d.ts +2 -2
  215. package/src/lightning/primitiveOverlay/__examples__/demo/demo.d.ts.map +1 -0
  216. package/src/lightning/{overlay → primitiveOverlay}/__examples__/demo/demo.js +2 -2
  217. package/src/lightning/primitiveOverlay/__examples__/panel/panel.d.ts +9 -0
  218. package/src/lightning/primitiveOverlay/__examples__/panel/panel.d.ts.map +1 -0
  219. package/src/lightning/{overlay → primitiveOverlay}/__examples__/panel/panel.js +2 -2
  220. package/src/lightning/primitiveOverlay/primitiveOverlay.d.ts +8 -0
  221. package/src/lightning/primitiveOverlay/primitiveOverlay.d.ts.map +1 -0
  222. package/src/lightning/primitiveOverlay/primitiveOverlay.html +4 -0
  223. package/src/lightning/primitiveOverlay/primitiveOverlay.js +37 -0
  224. package/src/lightning/primitiveOverlay/primitiveOverlay.js-meta.xml +7 -0
  225. package/src/lightning/primitiveTreegridCellToggle/primitiveTreegridCellToggle.d.ts.map +1 -1
  226. package/src/lightning/primitiveTreegridCellToggle/primitiveTreegridCellToggle.js +5 -2
  227. package/src/lightning/progressIndicator/progressIndicator.d.ts +3 -3
  228. package/src/lightning/progressIndicator/progressIndicator.d.ts.map +1 -1
  229. package/src/lightning/progressIndicator/progressIndicator.js +10 -0
  230. package/src/lightning/progressIndicator/progressIndicator.js-meta.xml +0 -7
  231. package/src/lightning/progressStep/progressStep.d.ts +2 -3
  232. package/src/lightning/progressStep/progressStep.d.ts.map +1 -1
  233. package/src/lightning/prompt/prompt.d.ts +2 -2
  234. package/src/lightning/prompt/prompt.d.ts.map +1 -1
  235. package/src/lightning/prompt/prompt.js +2 -2
  236. package/src/lightning/radioGroup/radioGroup.d.ts.map +1 -1
  237. package/src/lightning/routingService/routingService.d.ts.map +1 -1
  238. package/src/lightning/select/select.d.ts.map +1 -1
  239. package/src/lightning/select/select.js-meta.xml +0 -16
  240. package/src/lightning/slider/slider.d.ts.map +1 -1
  241. package/src/lightning/slider/slider.js +8 -2
  242. package/src/lightning/spinner/spinner.d.ts +2 -1
  243. package/src/lightning/spinner/spinner.d.ts.map +1 -1
  244. package/src/lightning/spinner/spinner.js +12 -2
  245. package/src/lightning/tab/tab.js-meta.xml +0 -10
  246. package/src/lightning/tabBar/keyboard.d.ts.map +1 -1
  247. package/src/lightning/tabBar/keyboard.js +15 -2
  248. package/src/lightning/tabset/tabset.d.ts.map +1 -1
  249. package/src/lightning/tabset/tabset.js-meta.xml +0 -8
  250. package/src/lightning/textarea/textarea.d.ts +1 -1
  251. package/src/lightning/textarea/textarea.d.ts.map +1 -1
  252. package/src/lightning/textarea/textarea.js +10 -13
  253. package/src/lightning/tile/tile.js-meta.xml +0 -7
  254. package/src/lightning/timepicker/timepicker.html +1 -0
  255. package/src/lightning/toast/toast.d.ts.map +1 -1
  256. package/src/lightning/toast/toast.js +4 -0
  257. package/src/lightning/toastContainer/toastContainer.d.ts +2 -2
  258. package/src/lightning/toastContainer/toastContainer.d.ts.map +1 -1
  259. package/src/lightning/toastContainer/toastContainer.js +7 -2
  260. package/src/lightning/tooltipLibrary/tooltipLibrary.d.ts +2 -0
  261. package/src/lightning/tooltipLibrary/tooltipLibrary.d.ts.map +1 -1
  262. package/src/lightning/tooltipLibrary/tooltipLibrary.js +45 -3
  263. package/src/lightning/tree/tree.d.ts.map +1 -1
  264. package/src/lightning/tree/tree.js +3 -1
  265. package/src/lightning/tree/treeData.d.ts.map +1 -1
  266. package/src/lightning/treeGrid/treeGrid.d.ts.map +1 -1
  267. package/src/lightning/treeItem/treeItem.d.ts +1 -1
  268. package/src/lightning/utilsInternal/privateContext.d.ts +15 -0
  269. package/src/lightning/utilsInternal/privateContext.d.ts.map +1 -0
  270. package/src/lightning/utilsInternal/privateContext.js +22 -0
  271. package/src/lightning/utilsInternal/utilsInternal.d.ts +1 -5
  272. package/src/lightning/utilsInternal/utilsInternal.d.ts.map +1 -1
  273. package/src/lightning/utilsInternal/utilsInternal.js +1 -15
  274. package/src/lightning/verticalNavigationItem/verticalNavigationItem.d.ts.map +1 -1
  275. package/src/lightning/verticalNavigationItemBadge/verticalNavigationItemBadge.d.ts.map +1 -1
  276. package/src/lightning/verticalNavigationItemIcon/verticalNavigationItemIcon.d.ts.map +1 -1
  277. package/src/lightning/overlay/__examples__/alert/alert.d.ts.map +0 -1
  278. package/src/lightning/overlay/__examples__/basic/basic.d.ts.map +0 -1
  279. package/src/lightning/overlay/__examples__/demo/demo.d.ts.map +0 -1
  280. package/src/lightning/overlay/__examples__/panel/panel.d.ts +0 -9
  281. package/src/lightning/overlay/__examples__/panel/panel.d.ts.map +0 -1
  282. package/src/lightning/utilsPrivate/ssr.d.ts +0 -2
  283. package/src/lightning/utilsPrivate/ssr.d.ts.map +0 -1
  284. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/alert/alert.html +0 -0
  285. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/basic/basic.css +0 -0
  286. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/basic/basic.d.ts +0 -0
  287. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/basic/basic.html +0 -0
  288. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/basic/basic.js +0 -0
  289. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/demo/demo.html +0 -0
  290. /package/src/lightning/{overlay → primitiveOverlay}/__examples__/panel/panel.html +0 -0
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <div class="example">
3
+ <button
4
+ class="slds-button slds-button_icon slds-button_icon-border"
5
+ type="button"
6
+ onclick={handleOpenMenu}
7
+ aria-label="Open menu"
8
+ aria-haspopup="menu"
9
+ aria-expanded={isMenuOpen}
10
+ >
11
+ <lightning-primitive-icon
12
+ icon-name="utility:down"
13
+ svg-class="slds-button__icon"
14
+ variant="bare"
15
+ ></lightning-primitive-icon>
16
+ </button>
17
+ <div>{selectedResult}</div>
18
+ </div>
19
+ </template>
20
+
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { LightningElement } from 'lwc';
7
+ import MenuPanel from './demo';
8
+ export default class MenuExample extends LightningElement {
9
+ isMenuOpen = false;
10
+ selectedResult = null;
11
+ async handleOpenMenu() {
12
+ const button = this.template.querySelector('button');
13
+ this.isMenuOpen = true;
14
+ const result = await MenuPanel.open({
15
+ source: button,
16
+ position: 'bottom span-right',
17
+ popover: 'auto',
18
+ items: [
19
+ { label: 'Option 1', value: 'option1' },
20
+ { label: 'Option 2', value: 'option2' },
21
+ { label: 'Option 3', value: 'option3' },
22
+ ],
23
+ maxHeight: '8rem',
24
+ });
25
+ this.isMenuOpen = false;
26
+ if (result) {
27
+ this.selectedResult = result;
28
+ }
29
+ }
30
+ }
@@ -1,8 +1,27 @@
1
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
- import { instanceName } from 'lightning/overlayUtils';
3
- export default class LightningOverlay extends LightningShadowBaseClass {
1
+ import LightningPrimitiveOverlay from 'lightning/primitiveOverlay';
2
+ import { parent, instanceName } from 'lightning/overlayUtils';
3
+ import LightningOverlayBase from 'lightning/overlayBase';
4
+ import { type PopoverValue, type PositionValue } from 'lightning/overlayPositionUtils';
5
+ export default class LightningOverlay extends LightningPrimitiveOverlay {
6
+ static [parent]: typeof LightningOverlayBase;
4
7
  static [instanceName]: string;
5
- static open(apis: object): Promise<void>;
6
- close(result?: any, promise?: Promise<void>): void;
8
+ source: Element | null;
9
+ minWidth: string | number;
10
+ maxWidth: string | number;
11
+ minHeight: string;
12
+ maxHeight: string;
13
+ offsetInline: number;
14
+ offsetBlock: number;
15
+ _popover: PopoverValue;
16
+ _position: PositionValue;
17
+ _enableFocusTrap: boolean;
18
+ get popover(): PopoverValue;
19
+ set popover(value: unknown);
20
+ get position(): PositionValue;
21
+ set position(value: unknown);
22
+ get enableFocusTrap(): boolean;
23
+ set enableFocusTrap(value: unknown);
24
+ close(result?: any, maybeSecure?: unknown): void;
25
+ connectedCallback(): void;
7
26
  }
8
27
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/overlay/overlay.ts"],"names":[],"mappings":"AACA,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwBtD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,wBAAwB;IAIlE,MAAM,CAAC,CAAC,YAAY,CAAC,SAAuB;IAO5C,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAaxC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;CAKrD"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/overlay/overlay.ts"],"names":[],"mappings":"AACA,OAAO,yBAAyB,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,wBAAwB,CAAC;AACtE,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAKH,KAAK,YAAY,EACjB,KAAK,aAAa,EACrB,MAAM,gCAAgC,CAAC;AAKxC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,yBAAyB;IACnE,MAAM,CAAC,CAAC,MAAM,CAAC,8BAAwB;IACvC,MAAM,CAAC,CAAC,YAAY,CAAC,SAAuB;IAOvC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAQ;IAU9B,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAU;IAUnC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAU;IAUnC,SAAS,EAAE,MAAM,CAAU;IAU3B,SAAS,EAAE,MAAM,CAAU;IAO3B,YAAY,EAAE,MAAM,CAAK;IAOzB,WAAW,EAAE,MAAM,CAAK;IAG7B,QAAQ,EAAE,YAAY,CAAmB;IACzC,SAAS,EAAE,aAAa,CAAoB;IAC5C,gBAAgB,EAAE,OAAO,CAAS;IAQlC,IACI,OAAO,IAAI,YAAY,CAE1B;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAKzB;IAQD,IACI,QAAQ,IAAI,aAAa,CAE5B;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAK1B;IAOD,IACI,eAAe,IAAI,OAAO,CAE7B;IACD,IAAI,eAAe,CAAC,KAAK,EAAE,OAAO,EAEjC;IASD,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI;IAUhD,iBAAiB,IAAI,IAAI;CAS5B"}
@@ -1,3 +1,4 @@
1
1
  <template>
2
- <!-- This template is overridden when the class is extended. -->
3
- </template>
2
+ <!-- LightningOverlayBase -->
3
+ </template>
4
+
@@ -3,35 +3,73 @@
3
3
  * All rights reserved.
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
- import { createElement, api } from 'lwc';
7
- import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
8
- import { instanceName } from 'lightning/overlayUtils';
9
- import OverlayContainer from 'lightning/overlayContainer';
10
- const ROOT = 'body';
11
- const OVERLAY_CONTAINER = 'lightning-overlay-container';
12
- function container() {
13
- let element = document.querySelector(`${ROOT} > ${OVERLAY_CONTAINER}`);
14
- if (!element) {
15
- element = createElement(OVERLAY_CONTAINER, {
16
- is: OverlayContainer,
6
+ import { api } from 'lwc';
7
+ import LightningPrimitiveOverlay from 'lightning/primitiveOverlay';
8
+ import { parent, instanceName, secure } from 'lightning/overlayUtils';
9
+ import LightningOverlayBase from 'lightning/overlayBase';
10
+ import { normalizeString, normalizeBoolean } from 'lightning/utilsPrivate';
11
+ import { DEFAULT_POPOVER, VALID_POPOVER_VALUES, DEFAULT_POSITION, VALID_POSITION_VALUES, } from 'lightning/overlayPositionUtils';
12
+ export default class LightningOverlay extends LightningPrimitiveOverlay {
13
+ static [parent] = LightningOverlayBase;
14
+ static [instanceName] = 'lightning-overlay';
15
+ @api
16
+ source = null;
17
+ @api
18
+ minWidth = '1rem';
19
+ @api
20
+ maxWidth = 'auto';
21
+ @api
22
+ minHeight = '1rem';
23
+ @api
24
+ maxHeight = 'auto';
25
+ @api
26
+ offsetInline = 0;
27
+ @api
28
+ offsetBlock = 0;
29
+ _popover = DEFAULT_POPOVER;
30
+ _position = DEFAULT_POSITION;
31
+ _enableFocusTrap = false;
32
+ @api
33
+ get popover() {
34
+ return this._popover;
35
+ }
36
+ set popover(value) {
37
+ this._popover = normalizeString(value, {
38
+ fallbackValue: DEFAULT_POPOVER,
39
+ validValues: VALID_POPOVER_VALUES,
17
40
  });
18
- element.classList.add('slds-scope');
19
- document.body.appendChild(element);
20
41
  }
21
- return element;
22
- }
23
- export default class LightningOverlay extends LightningShadowBaseClass {
24
- static [instanceName] = 'lightning-overlay';
25
- static open(apis) {
26
- if (!import.meta.env.SSR) {
27
- return container().push(this, apis);
28
- }
29
- return new Promise(() => { });
42
+ @api
43
+ get position() {
44
+ return this._position;
45
+ }
46
+ set position(value) {
47
+ this._position = normalizeString(value, {
48
+ fallbackValue: DEFAULT_POSITION,
49
+ validValues: VALID_POSITION_VALUES,
50
+ });
30
51
  }
31
52
  @api
32
- close(result, promise) {
33
- if (!import.meta.env.SSR) {
34
- container().pop(this.template.host, result, promise);
53
+ get enableFocusTrap() {
54
+ return this._enableFocusTrap;
55
+ }
56
+ set enableFocusTrap(value) {
57
+ this._enableFocusTrap = normalizeBoolean(value);
58
+ }
59
+ @api
60
+ close(result, maybeSecure) {
61
+ if (maybeSecure === secure) {
62
+ super.close(result);
63
+ }
64
+ else {
65
+ const rootNode = this.template.host.getRootNode();
66
+ const base = rootNode.host;
67
+ base.hideSurfacePopover(result);
68
+ }
69
+ }
70
+ connectedCallback() {
71
+ if (this.constructor.name === 'LightningOverlay') {
72
+ throw new Error('Use of <lightning-overlay> as an element is not supported. See developer documentation for extending the LightningOverlay class.');
35
73
  }
36
74
  }
37
75
  }
@@ -1,5 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <LightningComponentBundle xmlns="xmlns=http://soap.sforce.com/2006/04/metadata">
2
+ <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <isExposed>true</isExposed>
3
4
  <capabilities>
4
5
  <capability>lightning__ServerRenderable</capability>
5
6
  </capabilities>
@@ -0,0 +1,21 @@
1
+ .overlay-surface:popover-open {
2
+ border: none;
3
+ background: transparent;
4
+ padding: 0;
5
+ margin: 0;
6
+ inset: auto;
7
+ position-try-fallbacks:
8
+ flip-inline,
9
+ flip-block,
10
+ flip-inline flip-block;
11
+ }
12
+
13
+ .popover__container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ }
17
+
18
+ .overlay__close {
19
+ margin-left: auto;
20
+ }
21
+
@@ -0,0 +1,28 @@
1
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
2
+ import { instanceName } from 'lightning/overlayUtils';
3
+ import { AnchorPositioningAdapter, type PopoverValue } from 'lightning/overlayPositionUtils';
4
+ import type LightningOverlay from 'lightning/overlay';
5
+ export default class LightningOverlayBase extends LightningShadowBaseClass {
6
+ static [instanceName]: string;
7
+ _focusTrapEnabled: boolean;
8
+ _popover: PopoverValue;
9
+ _initialized: boolean;
10
+ _anchorAdapter: AnchorPositioningAdapter | null;
11
+ _focusTrapChanged: boolean;
12
+ isPanelOpen: boolean;
13
+ _closeResult: any;
14
+ disconnectedCallback(): void;
15
+ get focusTrapEnabled(): boolean;
16
+ set focusTrapEnabled(value: unknown);
17
+ get popover(): PopoverValue;
18
+ renderedCallback(): void;
19
+ openPanel(): void;
20
+ applyDynamicUpdates(): void;
21
+ initialize(): void;
22
+ setupAnchorPositioning(): void;
23
+ handleToggle(event: ToggleEvent): void;
24
+ get overlay(): LightningOverlay;
25
+ get defaultSlot(): HTMLElement | null;
26
+ hideSurfacePopover(result?: unknown): void;
27
+ }
28
+ //# sourceMappingURL=overlayBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlayBase.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/overlayBase/overlayBase.ts"],"names":[],"mappings":"AACA,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAU,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACH,wBAAwB,EAExB,KAAK,YAAY,EACpB,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AAOtD,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,wBAAwB;IACtE,MAAM,CAAC,CAAC,YAAY,CAAC,SAA4B;IAOjD,iBAAiB,EAAE,OAAO,CAAS;IAOnC,QAAQ,EAAE,YAAY,CAAmB;IAOzC,YAAY,EAAE,OAAO,CAAS;IAO9B,cAAc,EAAE,wBAAwB,GAAG,IAAI,CAAQ;IAOvD,iBAAiB,EAAE,OAAO,CAAS;IAOnC,WAAW,EAAE,OAAO,CAAS;IAE7B,YAAY,EAAE,GAAG,CAAC;IAElB,oBAAoB,IAAI,IAAI;IAa5B,IACI,gBAAgB,IAAI,OAAO,CAE9B;IACD,IAAI,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAElC;IAOD,IAAI,OAAO,IAAI,YAAY,CAE1B;IAED,gBAAgB,IAAI,IAAI;IAaxB,SAAS,IAAI,IAAI;IAWjB,mBAAmB,IAAI,IAAI;IAkC3B,UAAU,IAAI,IAAI;IAgBlB,sBAAsB,IAAI,IAAI;IAwC9B,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAWtC,IAAI,OAAO,IAAI,gBAAgB,CAO9B;IAMD,IACI,WAAW,IAAI,WAAW,GAAG,IAAI,CAEpC;IAOD,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;CAO7C"}
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div
3
+ id="overlay-base-div"
4
+ class="overlay-surface"
5
+ lwc:ref="surface"
6
+ popover={popover}
7
+ data-open={isPanelOpen}
8
+ ontoggle={handleToggle}
9
+ >
10
+ <template lwc:if={focusTrapEnabled}>
11
+ <lightning-focus-trap>
12
+ <div class="popover__container">
13
+ <div data-slot lwc:dom="manual"></div>
14
+ </div>
15
+ </lightning-focus-trap>
16
+ </template>
17
+ <template lwc:else>
18
+ <div class="popover__container">
19
+ <div data-slot lwc:dom="manual"></div>
20
+ </div>
21
+ </template>
22
+ </div>
23
+ </template>
24
+
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { api } from 'lwc';
7
+ import LightningShadowBaseClass from 'lightning/shadowBaseClassPrivate';
8
+ import { instanceName, secure } from 'lightning/overlayUtils';
9
+ import { AnchorPositioningAdapter, DEFAULT_POPOVER, } from 'lightning/overlayPositionUtils';
10
+ import { normalizeBoolean } from 'lightning/utilsPrivate';
11
+ export default class LightningOverlayBase extends LightningShadowBaseClass {
12
+ static [instanceName] = 'lightning-overlay-base';
13
+ _focusTrapEnabled = false;
14
+ _popover = DEFAULT_POPOVER;
15
+ _initialized = false;
16
+ _anchorAdapter = null;
17
+ _focusTrapChanged = false;
18
+ isPanelOpen = false;
19
+ _closeResult;
20
+ disconnectedCallback() {
21
+ if (this._anchorAdapter) {
22
+ this._anchorAdapter.destroy();
23
+ this._anchorAdapter = null;
24
+ }
25
+ }
26
+ @api
27
+ get focusTrapEnabled() {
28
+ return this._focusTrapEnabled;
29
+ }
30
+ set focusTrapEnabled(value) {
31
+ this._focusTrapEnabled = normalizeBoolean(value);
32
+ }
33
+ get popover() {
34
+ return this._popover;
35
+ }
36
+ renderedCallback() {
37
+ this._focusTrapChanged = false;
38
+ if (!this.isPanelOpen) {
39
+ this.openPanel();
40
+ }
41
+ else {
42
+ this.applyDynamicUpdates();
43
+ }
44
+ }
45
+ openPanel() {
46
+ if (!this.isPanelOpen) {
47
+ this.isPanelOpen = true;
48
+ }
49
+ }
50
+ applyDynamicUpdates() {
51
+ if (!this._initialized) {
52
+ this.initialize();
53
+ this._initialized = true;
54
+ }
55
+ if (!this._focusTrapChanged) {
56
+ const overlay = this.overlay;
57
+ const surface = this.refs && this.refs.surface;
58
+ if (!overlay || !surface) {
59
+ return;
60
+ }
61
+ if (surface.popover === this._popover) {
62
+ const source = overlay.source;
63
+ if (source) {
64
+ surface.showPopover({ source });
65
+ }
66
+ else {
67
+ surface.showPopover();
68
+ }
69
+ }
70
+ }
71
+ }
72
+ initialize() {
73
+ if (this._popover !== this.overlay.popover) {
74
+ this._popover = this.overlay.popover;
75
+ }
76
+ if (this._focusTrapEnabled !== this.overlay.enableFocusTrap) {
77
+ this._focusTrapEnabled = this.overlay.enableFocusTrap;
78
+ this._focusTrapChanged = true;
79
+ }
80
+ this.setupAnchorPositioning();
81
+ }
82
+ setupAnchorPositioning() {
83
+ if (!this.overlay ||
84
+ !this.overlay.source ||
85
+ !this.refs.surface ||
86
+ this._anchorAdapter) {
87
+ return;
88
+ }
89
+ const { source, position, minWidth, maxWidth, minHeight, maxHeight, offsetInline, offsetBlock, } = this.overlay;
90
+ this._anchorAdapter = new AnchorPositioningAdapter(this.refs?.surface, {
91
+ source,
92
+ position,
93
+ minWidth,
94
+ maxWidth,
95
+ minHeight,
96
+ maxHeight,
97
+ offsetInline,
98
+ offsetBlock,
99
+ });
100
+ this._anchorAdapter.apply();
101
+ }
102
+ handleToggle(event) {
103
+ if (event.newState === 'closed') {
104
+ this.overlay.close(this._closeResult, secure);
105
+ }
106
+ }
107
+ get overlay() {
108
+ return ((!import.meta.env.SSR &&
109
+ this.defaultSlot &&
110
+ this.defaultSlot.childNodes[0]) ||
111
+ null);
112
+ }
113
+ @api
114
+ get defaultSlot() {
115
+ return this.template.querySelector('[data-slot]');
116
+ }
117
+ @api
118
+ hideSurfacePopover(result) {
119
+ this._closeResult = result;
120
+ const surface = this.refs?.surface;
121
+ if (surface) {
122
+ surface?.hidePopover();
123
+ }
124
+ }
125
+ }
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <LightningComponentBundle xmlns="xmlns=http://soap.sforce.com/2006/04/metadata">
3
+ <capabilities>
4
+ <capability>lightning__ServerRenderable</capability>
5
+ <capability>lightning__dynamicComponent</capability>
6
+ </capabilities>
7
+ </LightningComponentBundle>
8
+
@@ -46,7 +46,7 @@ export default class LightningOverlayContainer extends LightningShadowBaseClass
46
46
  const parentElement = createElement(overlayParent[instanceName], {
47
47
  is: overlayParent,
48
48
  });
49
- if (overlayInstanceName === 'lightning-panel') {
49
+ if (overlayInstanceName === 'lightning-overlay') {
50
50
  parentElement.focusTrapEnabled = apis.enableFocusTrap;
51
51
  }
52
52
  this.root.appendChild(parentElement);
@@ -11,13 +11,13 @@ export const LWC_TOAST_CONTAINER_STARTING_ZINDEX: 10000;
11
11
  export const LWC_ZINDEX_INCREMENT: 2;
12
12
  export const LWC_ZINDEX_OFFSET: 1;
13
13
  export const LWC_OVERLAY_TYPES: Readonly<{
14
- "lightning-overlay": {
14
+ "lightning-primitive-overlay": {
15
15
  pos: string;
16
16
  };
17
17
  "lightning-modal": {
18
18
  pos: string;
19
19
  };
20
- "lightning-panel": {
20
+ "lightning-overlay": {
21
21
  pos: string;
22
22
  };
23
23
  "lightning-alert": {
@@ -4,11 +4,11 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
  const TYPE_MODAL = 'lightning-modal';
7
- const TYPE_PANEL = 'lightning-panel';
7
+ const TYPE_OVERLAY = 'lightning-overlay';
8
8
  const TYPE_ALERT = 'lightning-alert';
9
9
  const TYPE_CONFIRM = 'lightning-confirm';
10
10
  const TYPE_PROMPT = 'lightning-prompt';
11
- const TYPE_OVERLAY = 'lightning-overlay';
11
+ const TYPE_PRIMITIVE_OVERLAY = 'lightning-primitive-overlay';
12
12
  export const TYPE_TOAST_CONTAINER = 'lightning-toast-container';
13
13
  export const LWC_OVERLAY_ENGINE = 'lwc';
14
14
  export const LWC_OVERLAY_STARTING_ZINDEX = 9000;
@@ -16,9 +16,9 @@ export const LWC_TOAST_CONTAINER_STARTING_ZINDEX = 10000;
16
16
  export const LWC_ZINDEX_INCREMENT = 2;
17
17
  export const LWC_ZINDEX_OFFSET = 1;
18
18
  export const LWC_OVERLAY_TYPES = Object.freeze({
19
- [TYPE_OVERLAY]: { pos: 'absolute' },
19
+ [TYPE_PRIMITIVE_OVERLAY]: { pos: 'absolute' },
20
20
  [TYPE_MODAL]: { pos: 'absolute' },
21
- [TYPE_PANEL]: { pos: 'absolute' },
21
+ [TYPE_OVERLAY]: { pos: 'absolute' },
22
22
  [TYPE_ALERT]: { pos: 'absolute' },
23
23
  [TYPE_CONFIRM]: { pos: 'absolute' },
24
24
  [TYPE_PROMPT]: { pos: 'absolute' },
@@ -0,0 +1,24 @@
1
+ import { CSSAnchorPositioning } from './cssAnchorPositioning';
2
+ import { PositionLibraryFallback } from './positionLibraryFallback';
3
+ import type { PositionValue } from 'lightning/overlayPositionUtils';
4
+ export interface AnchorPositioningConfig {
5
+ source?: Element | null;
6
+ position?: PositionValue;
7
+ minWidth?: string | number;
8
+ maxWidth?: string | number;
9
+ minHeight?: string | number;
10
+ maxHeight?: string | number;
11
+ offsetInline?: number;
12
+ offsetBlock?: number;
13
+ }
14
+ export declare class AnchorPositioningAdapter {
15
+ element: HTMLElement;
16
+ config: AnchorPositioningConfig;
17
+ usesNativeAnchor: boolean;
18
+ cssAnchorPositioning: CSSAnchorPositioning | null;
19
+ positionLibraryFallback: PositionLibraryFallback | null;
20
+ constructor(element: HTMLElement, config?: AnchorPositioningConfig);
21
+ apply(): void;
22
+ destroy(): void;
23
+ }
24
+ //# sourceMappingURL=anchorPositioningAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchorPositioningAdapter.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/overlayPositionUtils/anchorPositioningAdapter.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,oBAAoB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,wBAAwB;IACjC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,uBAAuB,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClD,uBAAuB,EAAE,uBAAuB,GAAG,IAAI,CAAC;gBAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,GAAE,uBAA4B;IAgBtE,KAAK,IAAI,IAAI;IAuBb,OAAO,IAAI,IAAI;CAWlB"}
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Copyright (c) 2025, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import { supportsCSSAnchorPositioning, CSSAnchorPositioning, } from './cssAnchorPositioning';
7
+ import { PositionLibraryFallback } from './positionLibraryFallback';
8
+ export class AnchorPositioningAdapter {
9
+ element;
10
+ config;
11
+ usesNativeAnchor;
12
+ cssAnchorPositioning;
13
+ positionLibraryFallback;
14
+ constructor(element, config = {}) {
15
+ if (!element) {
16
+ console.error('AnchorPositioningAdapter requires an element');
17
+ return;
18
+ }
19
+ this.element = element;
20
+ this.config = config;
21
+ this.usesNativeAnchor = supportsCSSAnchorPositioning();
22
+ this.cssAnchorPositioning = null;
23
+ this.positionLibraryFallback = null;
24
+ }
25
+ apply() {
26
+ if (this.usesNativeAnchor) {
27
+ if (!this.cssAnchorPositioning) {
28
+ this.cssAnchorPositioning = new CSSAnchorPositioning(this.element, this.config);
29
+ }
30
+ this.cssAnchorPositioning.apply();
31
+ }
32
+ else {
33
+ if (!this.positionLibraryFallback) {
34
+ this.positionLibraryFallback = new PositionLibraryFallback(this.element, this.config);
35
+ }
36
+ this.positionLibraryFallback.apply();
37
+ }
38
+ }
39
+ destroy() {
40
+ if (this.cssAnchorPositioning) {
41
+ this.cssAnchorPositioning.cleanup();
42
+ this.cssAnchorPositioning = null;
43
+ }
44
+ if (this.positionLibraryFallback) {
45
+ this.positionLibraryFallback.cleanup();
46
+ this.positionLibraryFallback = null;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,14 @@
1
+ import type { AnchorPositioningConfig } from './anchorPositioningAdapter';
2
+ import type { PositionValue } from 'lightning/overlayPositionUtils';
3
+ export declare function supportsCSSAnchorPositioning(): boolean;
4
+ export declare class CSSAnchorPositioning {
5
+ element: HTMLElement;
6
+ config: AnchorPositioningConfig;
7
+ constructor(element: HTMLElement, config?: AnchorPositioningConfig);
8
+ apply(): void;
9
+ setPositionArea(): void;
10
+ applyPanelStyles(): void;
11
+ applyLogicalInsets(position: PositionValue, offsetInline: number, offsetBlock: number): void;
12
+ cleanup(): void;
13
+ }
14
+ //# sourceMappingURL=cssAnchorPositioning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssAnchorPositioning.d.ts","sourceRoot":"","sources":["../../../../../modules/lightning/overlayPositionUtils/cssAnchorPositioning.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAKpE,wBAAgB,4BAA4B,IAAI,OAAO,CAkBtD;AAKD,qBAAa,oBAAoB;IAC7B,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,uBAAuB,CAAC;gBAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,GAAE,uBAA4B;IAQtE,KAAK,IAAI,IAAI;IAQb,eAAe,IAAI,IAAI;IAOvB,gBAAgB,IAAI,IAAI;IA6CxB,kBAAkB,CACd,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GACpB,IAAI;IA8BP,OAAO,IAAI,IAAI;CA4BlB"}