@salesforce/design-system-react 11.0.0-alpha.6 → 11.0.0-alpha.8

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 (427) hide show
  1. package/dist/cjs/components/accordion/panel.cjs +1 -1
  2. package/dist/cjs/components/accordion/panel.cjs.map +1 -1
  3. package/dist/cjs/components/badge/index.cjs +1 -1
  4. package/dist/cjs/components/badge/index.cjs.map +1 -1
  5. package/dist/cjs/components/builder-header/check-props.cjs +2 -0
  6. package/dist/cjs/components/builder-header/check-props.cjs.map +1 -0
  7. package/dist/cjs/components/builder-header/component.cjs +2 -0
  8. package/dist/cjs/components/builder-header/component.cjs.map +1 -0
  9. package/dist/cjs/components/builder-header/toolbar.cjs +1 -1
  10. package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
  11. package/dist/cjs/components/carousel/check-props.cjs +2 -0
  12. package/dist/cjs/components/carousel/check-props.cjs.map +1 -0
  13. package/dist/cjs/components/carousel/component.cjs +2 -0
  14. package/dist/cjs/components/carousel/component.cjs.map +1 -0
  15. package/dist/cjs/components/carousel/index.cjs +1 -1
  16. package/dist/cjs/components/carousel/index.cjs.map +1 -1
  17. package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
  18. package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
  19. package/dist/cjs/components/checkbox/check-props.cjs +2 -0
  20. package/dist/cjs/components/checkbox/check-props.cjs.map +1 -0
  21. package/dist/cjs/components/checkbox/component.cjs +2 -0
  22. package/dist/cjs/components/checkbox/component.cjs.map +1 -0
  23. package/dist/cjs/components/checkbox/index.cjs +1 -1
  24. package/dist/cjs/components/checkbox/index.cjs.map +1 -1
  25. package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
  26. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  27. package/dist/cjs/components/combobox/check-props.cjs +1 -1
  28. package/dist/cjs/components/combobox/check-props.cjs.map +1 -1
  29. package/dist/cjs/components/combobox/combobox.cjs +1 -1
  30. package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
  31. package/dist/cjs/components/combobox/index.cjs.map +1 -1
  32. package/dist/cjs/components/combobox/private/menu.cjs +1 -1
  33. package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
  34. package/dist/cjs/components/dynamic-icon/index.cjs +1 -1
  35. package/dist/cjs/components/dynamic-icon/index.cjs.map +1 -1
  36. package/dist/cjs/components/filter/filter.cjs +1 -1
  37. package/dist/cjs/components/filter/filter.cjs.map +1 -1
  38. package/dist/cjs/components/input/index.cjs +1 -1
  39. package/dist/cjs/components/input/index.cjs.map +1 -1
  40. package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
  41. package/dist/cjs/components/menu-dropdown/check-props.cjs.map +1 -1
  42. package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
  43. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
  44. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
  45. package/dist/cjs/components/modal/check-props.cjs +2 -0
  46. package/dist/cjs/components/modal/check-props.cjs.map +1 -0
  47. package/dist/cjs/components/modal/component.cjs +2 -0
  48. package/dist/cjs/components/modal/component.cjs.map +1 -0
  49. package/dist/cjs/components/modal/index.cjs +1 -1
  50. package/dist/cjs/components/modal/index.cjs.map +1 -1
  51. package/dist/cjs/components/page-header/check-props.cjs +2 -0
  52. package/dist/cjs/components/page-header/check-props.cjs.map +1 -0
  53. package/dist/cjs/components/page-header/component.cjs +2 -0
  54. package/dist/cjs/components/page-header/component.cjs.map +1 -0
  55. package/dist/cjs/components/page-header/index.cjs +1 -1
  56. package/dist/cjs/components/page-header/index.cjs.map +1 -1
  57. package/dist/cjs/components/page-header/private/base/index.cjs +1 -1
  58. package/dist/cjs/components/page-header/private/base/index.cjs.map +1 -1
  59. package/dist/cjs/components/page-header/private/controls.cjs +1 -1
  60. package/dist/cjs/components/page-header/private/controls.cjs.map +1 -1
  61. package/dist/cjs/components/page-header/private/object-home/index.cjs +1 -1
  62. package/dist/cjs/components/page-header/private/object-home/index.cjs.map +1 -1
  63. package/dist/cjs/components/page-header/private/record-home/index.cjs +1 -1
  64. package/dist/cjs/components/page-header/private/record-home/index.cjs.map +1 -1
  65. package/dist/cjs/components/page-header/private/related-list/index.cjs +1 -1
  66. package/dist/cjs/components/page-header/private/related-list/index.cjs.map +1 -1
  67. package/dist/cjs/components/popover/component.cjs +2 -0
  68. package/dist/cjs/components/popover/component.cjs.map +1 -0
  69. package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
  70. package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
  71. package/dist/cjs/components/popover/popover.cjs +1 -1
  72. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  73. package/dist/cjs/components/progress-indicator/check-props.cjs +1 -1
  74. package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -1
  75. package/dist/cjs/components/progress-indicator/component.cjs +2 -0
  76. package/dist/cjs/components/progress-indicator/component.cjs.map +1 -0
  77. package/dist/cjs/components/progress-indicator/index.cjs +1 -1
  78. package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
  79. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs +1 -1
  80. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs.map +1 -1
  81. package/dist/cjs/components/radio/check-props.cjs +2 -0
  82. package/dist/cjs/components/radio/check-props.cjs.map +1 -0
  83. package/dist/cjs/components/radio/component.cjs +2 -0
  84. package/dist/cjs/components/radio/component.cjs.map +1 -0
  85. package/dist/cjs/components/radio/index.cjs +1 -1
  86. package/dist/cjs/components/radio/index.cjs.map +1 -1
  87. package/dist/cjs/components/setup-assistant/check-props.cjs +1 -1
  88. package/dist/cjs/components/setup-assistant/check-props.cjs.map +1 -1
  89. package/dist/cjs/components/setup-assistant/step.cjs +1 -1
  90. package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
  91. package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
  92. package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
  93. package/dist/cjs/components/simple-data-table/index.cjs +1 -1
  94. package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
  95. package/dist/cjs/components/slider/check-props.cjs +2 -0
  96. package/dist/cjs/components/slider/check-props.cjs.map +1 -0
  97. package/dist/cjs/components/slider/component.cjs +2 -0
  98. package/dist/cjs/components/slider/component.cjs.map +1 -0
  99. package/dist/cjs/components/slider/index.cjs +1 -1
  100. package/dist/cjs/components/slider/index.cjs.map +1 -1
  101. package/dist/cjs/components/spinner/check-props.cjs +2 -0
  102. package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
  103. package/dist/cjs/components/spinner/component.cjs +2 -0
  104. package/dist/cjs/components/spinner/component.cjs.map +1 -0
  105. package/dist/cjs/components/spinner/index.cjs +1 -1
  106. package/dist/cjs/components/spinner/index.cjs.map +1 -1
  107. package/dist/cjs/components/split-view/check-props.cjs +1 -1
  108. package/dist/cjs/components/split-view/check-props.cjs.map +1 -1
  109. package/dist/cjs/components/split-view/index.cjs +1 -1
  110. package/dist/cjs/components/split-view/index.cjs.map +1 -1
  111. package/dist/cjs/components/split-view/listbox-check-props.cjs +2 -0
  112. package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -0
  113. package/dist/cjs/components/split-view/listbox.cjs +1 -1
  114. package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
  115. package/dist/cjs/components/split-view/private/list-item-content.cjs +1 -1
  116. package/dist/cjs/components/split-view/private/list-item-content.cjs.map +1 -1
  117. package/dist/cjs/components/split-view/private/list-item-with-content.cjs +1 -1
  118. package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
  119. package/dist/cjs/components/split-view/private/toggle-button.cjs +1 -1
  120. package/dist/cjs/components/split-view/private/toggle-button.cjs.map +1 -1
  121. package/dist/cjs/components/tabs/panel.cjs.map +1 -1
  122. package/dist/cjs/components/textarea/check-props.cjs +1 -1
  123. package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
  124. package/dist/cjs/components/textarea/index.cjs +1 -1
  125. package/dist/cjs/components/textarea/index.cjs.map +1 -1
  126. package/dist/cjs/components/tree/check-props.cjs +1 -1
  127. package/dist/cjs/components/tree/check-props.cjs.map +1 -1
  128. package/dist/cjs/components/tree/component.cjs +2 -0
  129. package/dist/cjs/components/tree/component.cjs.map +1 -0
  130. package/dist/cjs/components/tree/tree.cjs +1 -1
  131. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  132. package/dist/cjs/components/trial-bar/check-props.cjs +2 -0
  133. package/dist/cjs/components/trial-bar/check-props.cjs.map +1 -0
  134. package/dist/cjs/components/trial-bar/component.cjs +2 -0
  135. package/dist/cjs/components/trial-bar/component.cjs.map +1 -0
  136. package/dist/cjs/components/trial-bar/index.cjs +1 -1
  137. package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
  138. package/dist/cjs/components/utilities/menu-list/index.cjs +1 -1
  139. package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
  140. package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
  141. package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
  142. package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
  143. package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
  144. package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
  145. package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
  146. package/dist/cjs/components/vertical-navigation/private/item.cjs +1 -1
  147. package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
  148. package/dist/cjs/components/welcome-mat/check-props.cjs +2 -0
  149. package/dist/cjs/components/welcome-mat/check-props.cjs.map +1 -0
  150. package/dist/cjs/components/welcome-mat/component.cjs +2 -0
  151. package/dist/cjs/components/welcome-mat/component.cjs.map +1 -0
  152. package/dist/cjs/components/welcome-mat/index.cjs +1 -1
  153. package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
  154. package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
  155. package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
  156. package/dist/cjs/utilities/warning/deprecated-property-value.cjs +2 -0
  157. package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -0
  158. package/dist/es/components/accordion/panel.js +1 -1
  159. package/dist/es/components/accordion/panel.js.map +1 -1
  160. package/dist/es/components/badge/index.js +6 -5
  161. package/dist/es/components/badge/index.js.map +1 -1
  162. package/dist/es/components/builder-header/check-props.js +13 -0
  163. package/dist/es/components/builder-header/check-props.js.map +1 -0
  164. package/dist/es/components/builder-header/component.js +65 -0
  165. package/dist/es/components/builder-header/component.js.map +1 -0
  166. package/dist/es/components/builder-header/toolbar.js +18 -13
  167. package/dist/es/components/builder-header/toolbar.js.map +1 -1
  168. package/dist/es/components/carousel/check-props.js +13 -0
  169. package/dist/es/components/carousel/check-props.js.map +1 -0
  170. package/dist/es/components/carousel/component.js +27 -0
  171. package/dist/es/components/carousel/component.js.map +1 -0
  172. package/dist/es/components/carousel/index.js +121 -109
  173. package/dist/es/components/carousel/index.js.map +1 -1
  174. package/dist/es/components/carousel/private/carousel-item.js +1 -2
  175. package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
  176. package/dist/es/components/checkbox/check-props.js +14 -0
  177. package/dist/es/components/checkbox/check-props.js.map +1 -0
  178. package/dist/es/components/checkbox/component.js +35 -0
  179. package/dist/es/components/checkbox/component.js.map +1 -0
  180. package/dist/es/components/checkbox/index.js +124 -112
  181. package/dist/es/components/checkbox/index.js.map +1 -1
  182. package/dist/es/components/color-picker/color-picker.js +1 -1
  183. package/dist/es/components/color-picker/color-picker.js.map +1 -1
  184. package/dist/es/components/combobox/check-props.js +1 -1
  185. package/dist/es/components/combobox/check-props.js.map +1 -1
  186. package/dist/es/components/combobox/combobox.js +210 -202
  187. package/dist/es/components/combobox/combobox.js.map +1 -1
  188. package/dist/es/components/combobox/index.js.map +1 -1
  189. package/dist/es/components/combobox/private/menu.js +5 -7
  190. package/dist/es/components/combobox/private/menu.js.map +1 -1
  191. package/dist/es/components/dynamic-icon/index.js +1 -1
  192. package/dist/es/components/dynamic-icon/index.js.map +1 -1
  193. package/dist/es/components/filter/filter.js +1 -1
  194. package/dist/es/components/filter/filter.js.map +1 -1
  195. package/dist/es/components/input/index.js +138 -136
  196. package/dist/es/components/input/index.js.map +1 -1
  197. package/dist/es/components/menu-dropdown/check-props.js +1 -1
  198. package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
  199. package/dist/es/components/menu-dropdown/index.js.map +1 -1
  200. package/dist/es/components/menu-dropdown/menu-dropdown.js +192 -185
  201. package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
  202. package/dist/es/components/modal/check-props.js +22 -0
  203. package/dist/es/components/modal/check-props.js.map +1 -0
  204. package/dist/es/components/modal/component.js +35 -0
  205. package/dist/es/components/modal/component.js.map +1 -0
  206. package/dist/es/components/modal/index.js +118 -104
  207. package/dist/es/components/modal/index.js.map +1 -1
  208. package/dist/es/components/page-header/check-props.js +31 -0
  209. package/dist/es/components/page-header/check-props.js.map +1 -0
  210. package/dist/es/components/page-header/component.js +35 -0
  211. package/dist/es/components/page-header/component.js.map +1 -0
  212. package/dist/es/components/page-header/index.js +56 -38
  213. package/dist/es/components/page-header/index.js.map +1 -1
  214. package/dist/es/components/page-header/private/base/index.js +1 -1
  215. package/dist/es/components/page-header/private/base/index.js.map +1 -1
  216. package/dist/es/components/page-header/private/controls.js +1 -1
  217. package/dist/es/components/page-header/private/controls.js.map +1 -1
  218. package/dist/es/components/page-header/private/object-home/index.js +4 -4
  219. package/dist/es/components/page-header/private/object-home/index.js.map +1 -1
  220. package/dist/es/components/page-header/private/record-home/index.js +1 -1
  221. package/dist/es/components/page-header/private/record-home/index.js.map +1 -1
  222. package/dist/es/components/page-header/private/related-list/index.js +2 -2
  223. package/dist/es/components/page-header/private/related-list/index.js.map +1 -1
  224. package/dist/es/components/popover/component.js +59 -0
  225. package/dist/es/components/popover/component.js.map +1 -0
  226. package/dist/es/components/popover/edit-dialog.js +1 -1
  227. package/dist/es/components/popover/edit-dialog.js.map +1 -1
  228. package/dist/es/components/popover/popover.js +247 -203
  229. package/dist/es/components/popover/popover.js.map +1 -1
  230. package/dist/es/components/progress-indicator/check-props.js +11 -8
  231. package/dist/es/components/progress-indicator/check-props.js.map +1 -1
  232. package/dist/es/components/progress-indicator/component.js +35 -0
  233. package/dist/es/components/progress-indicator/component.js.map +1 -0
  234. package/dist/es/components/progress-indicator/index.js +74 -71
  235. package/dist/es/components/progress-indicator/index.js.map +1 -1
  236. package/dist/es/components/progress-indicator/private/step-vertical.js +23 -20
  237. package/dist/es/components/progress-indicator/private/step-vertical.js.map +1 -1
  238. package/dist/es/components/radio/check-props.js +13 -0
  239. package/dist/es/components/radio/check-props.js.map +1 -0
  240. package/dist/es/components/radio/component.js +24 -0
  241. package/dist/es/components/radio/component.js.map +1 -0
  242. package/dist/es/components/radio/index.js +94 -80
  243. package/dist/es/components/radio/index.js.map +1 -1
  244. package/dist/es/components/setup-assistant/check-props.js +12 -7
  245. package/dist/es/components/setup-assistant/check-props.js.map +1 -1
  246. package/dist/es/components/setup-assistant/step.js +7 -7
  247. package/dist/es/components/setup-assistant/step.js.map +1 -1
  248. package/dist/es/components/simple-data-table/check-props.js +1 -1
  249. package/dist/es/components/simple-data-table/check-props.js.map +1 -1
  250. package/dist/es/components/simple-data-table/index.js +17 -10
  251. package/dist/es/components/simple-data-table/index.js.map +1 -1
  252. package/dist/es/components/slider/check-props.js +17 -0
  253. package/dist/es/components/slider/check-props.js.map +1 -0
  254. package/dist/es/components/slider/component.js +35 -0
  255. package/dist/es/components/slider/component.js.map +1 -0
  256. package/dist/es/components/slider/index.js +73 -54
  257. package/dist/es/components/slider/index.js.map +1 -1
  258. package/dist/es/components/spinner/check-props.js +13 -0
  259. package/dist/es/components/spinner/check-props.js.map +1 -0
  260. package/dist/es/components/spinner/component.js +17 -0
  261. package/dist/es/components/spinner/component.js.map +1 -0
  262. package/dist/es/components/spinner/index.js +43 -29
  263. package/dist/es/components/spinner/index.js.map +1 -1
  264. package/dist/es/components/split-view/check-props.js +2 -2
  265. package/dist/es/components/split-view/check-props.js.map +1 -1
  266. package/dist/es/components/split-view/index.js +8 -5
  267. package/dist/es/components/split-view/index.js.map +1 -1
  268. package/dist/es/components/split-view/listbox-check-props.js +13 -0
  269. package/dist/es/components/split-view/listbox-check-props.js.map +1 -0
  270. package/dist/es/components/split-view/listbox.js +41 -35
  271. package/dist/es/components/split-view/listbox.js.map +1 -1
  272. package/dist/es/components/split-view/private/list-item-content.js +1 -1
  273. package/dist/es/components/split-view/private/list-item-content.js.map +1 -1
  274. package/dist/es/components/split-view/private/list-item-with-content.js +6 -1
  275. package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
  276. package/dist/es/components/split-view/private/toggle-button.js +2 -2
  277. package/dist/es/components/split-view/private/toggle-button.js.map +1 -1
  278. package/dist/es/components/tabs/panel.js.map +1 -1
  279. package/dist/es/components/textarea/check-props.js +11 -10
  280. package/dist/es/components/textarea/check-props.js.map +1 -1
  281. package/dist/es/components/textarea/index.js +59 -47
  282. package/dist/es/components/textarea/index.js.map +1 -1
  283. package/dist/es/components/tree/check-props.js +10 -9
  284. package/dist/es/components/tree/check-props.js.map +1 -1
  285. package/dist/es/components/tree/component.js +25 -0
  286. package/dist/es/components/tree/component.js.map +1 -0
  287. package/dist/es/components/tree/tree.js +83 -75
  288. package/dist/es/components/tree/tree.js.map +1 -1
  289. package/dist/es/components/trial-bar/check-props.js +13 -0
  290. package/dist/es/components/trial-bar/check-props.js.map +1 -0
  291. package/dist/es/components/trial-bar/component.js +24 -0
  292. package/dist/es/components/trial-bar/component.js.map +1 -0
  293. package/dist/es/components/trial-bar/index.js +27 -21
  294. package/dist/es/components/trial-bar/index.js.map +1 -1
  295. package/dist/es/components/utilities/menu-list/index.js +1 -0
  296. package/dist/es/components/utilities/menu-list/index.js.map +1 -1
  297. package/dist/es/components/utilities/menu-list/item.js +5 -3
  298. package/dist/es/components/utilities/menu-list/item.js.map +1 -1
  299. package/dist/es/components/utilities/utility-icon/index.js +2 -1
  300. package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
  301. package/dist/es/components/vertical-navigation/index.js +17 -16
  302. package/dist/es/components/vertical-navigation/index.js.map +1 -1
  303. package/dist/es/components/vertical-navigation/private/item.js +1 -1
  304. package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
  305. package/dist/es/components/welcome-mat/check-props.js +13 -0
  306. package/dist/es/components/welcome-mat/check-props.js.map +1 -0
  307. package/dist/es/components/welcome-mat/component.js +46 -0
  308. package/dist/es/components/welcome-mat/component.js.map +1 -0
  309. package/dist/es/components/welcome-mat/index.js +64 -57
  310. package/dist/es/components/welcome-mat/index.js.map +1 -1
  311. package/dist/es/components/welcome-mat/info-badge.js +19 -11
  312. package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
  313. package/dist/es/utilities/warning/deprecated-property-value.js +18 -0
  314. package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -0
  315. package/dist/types/components/accordion/panel.d.ts.map +1 -1
  316. package/dist/types/components/badge/index.d.ts +4 -2
  317. package/dist/types/components/badge/index.d.ts.map +1 -1
  318. package/dist/types/components/builder-header/check-props.d.ts +3 -0
  319. package/dist/types/components/builder-header/check-props.d.ts.map +1 -0
  320. package/dist/types/components/builder-header/toolbar.d.ts +6 -4
  321. package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
  322. package/dist/types/components/carousel/check-props.d.ts +3 -0
  323. package/dist/types/components/carousel/check-props.d.ts.map +1 -0
  324. package/dist/types/components/carousel/index.d.ts +9 -7
  325. package/dist/types/components/carousel/index.d.ts.map +1 -1
  326. package/dist/types/components/carousel/private/carousel-item.d.ts +4 -4
  327. package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
  328. package/dist/types/components/checkbox/check-props.d.ts +1 -0
  329. package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
  330. package/dist/types/components/checkbox/index.d.ts +9 -3
  331. package/dist/types/components/checkbox/index.d.ts.map +1 -1
  332. package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
  333. package/dist/types/components/combobox/check-props.d.ts.map +1 -1
  334. package/dist/types/components/combobox/combobox.d.ts +29 -15
  335. package/dist/types/components/combobox/combobox.d.ts.map +1 -1
  336. package/dist/types/components/combobox/index.d.ts +1 -1
  337. package/dist/types/components/combobox/index.d.ts.map +1 -1
  338. package/dist/types/components/combobox/private/menu.d.ts +11 -6
  339. package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
  340. package/dist/types/components/dynamic-icon/index.d.ts.map +1 -1
  341. package/dist/types/components/input/index.d.ts.map +1 -1
  342. package/dist/types/components/menu-dropdown/check-props.d.ts.map +1 -1
  343. package/dist/types/components/menu-dropdown/index.d.ts +1 -1
  344. package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
  345. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +22 -3
  346. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
  347. package/dist/types/components/modal/check-props.d.ts +3 -0
  348. package/dist/types/components/modal/check-props.d.ts.map +1 -0
  349. package/dist/types/components/modal/index.d.ts +21 -13
  350. package/dist/types/components/modal/index.d.ts.map +1 -1
  351. package/dist/types/components/page-header/check-props.d.ts.map +1 -1
  352. package/dist/types/components/page-header/index.d.ts +15 -4
  353. package/dist/types/components/page-header/index.d.ts.map +1 -1
  354. package/dist/types/components/page-header/private/base/index.d.ts.map +1 -1
  355. package/dist/types/components/page-header/private/controls.d.ts +4 -4
  356. package/dist/types/components/page-header/private/controls.d.ts.map +1 -1
  357. package/dist/types/components/page-header/private/object-home/index.d.ts.map +1 -1
  358. package/dist/types/components/page-header/private/record-home/index.d.ts.map +1 -1
  359. package/dist/types/components/page-header/private/types.d.ts +6 -6
  360. package/dist/types/components/page-header/private/types.d.ts.map +1 -1
  361. package/dist/types/components/popover/popover.d.ts +24 -14
  362. package/dist/types/components/popover/popover.d.ts.map +1 -1
  363. package/dist/types/components/progress-indicator/check-props.d.ts.map +1 -1
  364. package/dist/types/components/progress-indicator/index.d.ts +7 -1
  365. package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
  366. package/dist/types/components/progress-indicator/private/step-vertical.d.ts +4 -7
  367. package/dist/types/components/progress-indicator/private/step-vertical.d.ts.map +1 -1
  368. package/dist/types/components/radio/check-props.d.ts +1 -0
  369. package/dist/types/components/radio/check-props.d.ts.map +1 -1
  370. package/dist/types/components/radio/index.d.ts +10 -4
  371. package/dist/types/components/radio/index.d.ts.map +1 -1
  372. package/dist/types/components/setup-assistant/check-props.d.ts.map +1 -1
  373. package/dist/types/components/setup-assistant/step.d.ts +12 -6
  374. package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
  375. package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
  376. package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
  377. package/dist/types/components/simple-data-table/types.d.ts +21 -8
  378. package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
  379. package/dist/types/components/slider/check-props.d.ts +3 -0
  380. package/dist/types/components/slider/check-props.d.ts.map +1 -0
  381. package/dist/types/components/slider/index.d.ts +33 -10
  382. package/dist/types/components/slider/index.d.ts.map +1 -1
  383. package/dist/types/components/spinner/check-props.d.ts +3 -0
  384. package/dist/types/components/spinner/check-props.d.ts.map +1 -0
  385. package/dist/types/components/spinner/index.d.ts +18 -9
  386. package/dist/types/components/spinner/index.d.ts.map +1 -1
  387. package/dist/types/components/split-view/check-props.d.ts.map +1 -1
  388. package/dist/types/components/split-view/index.d.ts +9 -5
  389. package/dist/types/components/split-view/index.d.ts.map +1 -1
  390. package/dist/types/components/split-view/listbox-check-props.d.ts +3 -0
  391. package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -0
  392. package/dist/types/components/split-view/listbox.d.ts +19 -3
  393. package/dist/types/components/split-view/listbox.d.ts.map +1 -1
  394. package/dist/types/components/split-view/private/list-item-with-content.d.ts +10 -1
  395. package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
  396. package/dist/types/components/split-view/private/toggle-button.d.ts +3 -3
  397. package/dist/types/components/split-view/private/toggle-button.d.ts.map +1 -1
  398. package/dist/types/components/tabs/panel.d.ts +5 -1
  399. package/dist/types/components/tabs/panel.d.ts.map +1 -1
  400. package/dist/types/components/textarea/check-props.d.ts.map +1 -1
  401. package/dist/types/components/textarea/index.d.ts +23 -3
  402. package/dist/types/components/textarea/index.d.ts.map +1 -1
  403. package/dist/types/components/tree/check-props.d.ts.map +1 -1
  404. package/dist/types/components/tree/index.d.ts +1 -1
  405. package/dist/types/components/tree/index.d.ts.map +1 -1
  406. package/dist/types/components/tree/tree.d.ts +20 -8
  407. package/dist/types/components/tree/tree.d.ts.map +1 -1
  408. package/dist/types/components/tree/types.d.ts +7 -1
  409. package/dist/types/components/tree/types.d.ts.map +1 -1
  410. package/dist/types/components/trial-bar/check-props.d.ts +3 -0
  411. package/dist/types/components/trial-bar/check-props.d.ts.map +1 -0
  412. package/dist/types/components/trial-bar/index.d.ts +15 -7
  413. package/dist/types/components/trial-bar/index.d.ts.map +1 -1
  414. package/dist/types/components/utilities/menu-list/index.d.ts +5 -1
  415. package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
  416. package/dist/types/components/utilities/menu-list/item.d.ts +3 -1
  417. package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
  418. package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
  419. package/dist/types/components/vertical-navigation/index.d.ts +7 -7
  420. package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
  421. package/dist/types/components/welcome-mat/check-props.d.ts +3 -0
  422. package/dist/types/components/welcome-mat/check-props.d.ts.map +1 -0
  423. package/dist/types/components/welcome-mat/index.d.ts +13 -8
  424. package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
  425. package/dist/types/components/welcome-mat/info-badge.d.ts +7 -3
  426. package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
  427. package/package.json +5 -3
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":[],"sources":["../../../../components/popover/popover.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseCallback,\n\tuseId,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n\ttype FocusEvent,\n\ttype CSSProperties,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport MediaObject from '../media-object';\nimport Icon from '../icon';\nimport Dialog from '../utilities/dialog';\nimport keyboardNavigableDialog from '../../utilities/keyboard-navigable-dialog';\nimport KEYS from '../../utilities/key-code';\nimport { POPOVER } from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// Shared overlay element for click-outside detection over iframes\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: ({ style: {} } as HTMLSpanElement);\nif (documentDefined) {\n\toverlay.style.top = '0';\n\toverlay.style.left = '0';\n\toverlay.style.width = '100%';\n\toverlay.style.height = '100%';\n\toverlay.style.position = 'absolute';\n}\n\n// Track currently open popover for single-popover-at-a-time behavior\nlet currentOpenPopover: {\n\thandleClose: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\tgetId: () => string;\n} | null = null;\n\n/**\n * Popover alignment options\n */\nexport type PopoverAlign =\n\t| 'top'\n\t| 'top left'\n\t| 'top right'\n\t| 'right'\n\t| 'right top'\n\t| 'right bottom'\n\t| 'bottom'\n\t| 'bottom left'\n\t| 'bottom right'\n\t| 'left'\n\t| 'left top'\n\t| 'left bottom';\n\n/**\n * Popover position options\n */\nexport type PopoverPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Popover variant options\n */\nexport type PopoverVariant =\n\t| 'base'\n\t| 'error'\n\t| 'feature'\n\t| 'walkthrough'\n\t| 'walkthrough-action'\n\t| 'warning';\n\n/**\n * Assistive text for Popover\n */\nexport interface PopoverAssistiveText {\n\tcloseButton?: string;\n}\n\n/**\n * What caused `onRequestClose` to fire:\n * * `cancel`: the close button was clicked or Escape was pressed\n * * `clickOutside`: a click landed outside the popover\n * * `mouseLeave`: the mouse left the trigger/popover (`openOn` `hover`/`hybrid`) and `hoverCloseDelay` elapsed\n * * `newPopover`: another Popover opened (only one can be open at a time)\n * * `triggerClick`: the trigger was clicked while the popover was open\n */\nexport type PopoverRequestCloseTrigger =\n\t'cancel' | 'clickOutside' | 'mouseLeave' | 'newPopover' | 'triggerClick';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface PopoverRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: PopoverRequestCloseTrigger;\n\t/** HTML id of the popover being closed. Only present when `trigger` is `newPopover`. */\n\tid?: string;\n}\n\n/**\n * Data passed to `onOpen`\n */\nexport interface PopoverOpenData {\n\t/** The rendered popover dialog element */\n\tportal?: HTMLElement;\n}\n\n/**\n * Data passed to `onClose`\n */\nexport interface PopoverCloseData {\n\t/** `true` when the popover dialog is closing because it is being unmounted */\n\tcomponentWillUnmount: boolean;\n}\n\n/**\n * Props for the Popover component\n */\nexport interface PopoverProps {\n\t/** Alignment relative to trigger */\n\talign?: PopoverAlign;\n\t/** Accessibility labels */\n\tassistiveText?: PopoverAssistiveText;\n\t/** HTML id of heading for aria-labelledby */\n\tariaLabelledby?: string;\n\t/** Trigger element (first child) and optional other children */\n\tchildren: ReactNode;\n\t/** Popover body content */\n\tbody: ReactNode;\n\t/** CSS classes for body */\n\tclassNameBody?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for footer */\n\tclassNameFooter?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use classNameFooter */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for popover container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for contents wrapper */\n\tcontentsClassName?: string | string[] | Record<string, boolean>;\n\t/** Disable the popover */\n\tdisabled?: boolean;\n\t/** Footer content */\n\tfooter?: ReactNode;\n\t/** Footer styles */\n\tfooterStyle?: CSSProperties;\n\t/** Walkthrough footer actions */\n\tfooterWalkthroughActions?: ReactNode | ReactNode[];\n\t/** Hide close button */\n\thasNoCloseButton?: boolean;\n\t/** Hide nubbin/arrow */\n\thasNoNubbin?: boolean;\n\t/** Prevent position flipping */\n\thasStaticAlignment?: boolean;\n\t/** Remove trigger inline-block style */\n\thasNoTriggerStyles?: boolean;\n\t/** Popover heading */\n\theading?: ReactNode;\n\t/** Icon for feature variant */\n\ticon?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Offset from target */\n\toffset?: string;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has closed (unmounted). There is no triggering event, so `event` is `undefined`. */\n\tonClose?: (event: undefined, data: PopoverCloseData) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent) => void;\n\t/** Mouse leave handler */\n\tonMouseLeave?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has opened and rendered. There is no triggering event, so `event` is `undefined`. */\n\tonOpen?: (event: undefined, data: PopoverOpenData) => void;\n\t/**\n\t * Called when the popover requests to close. `data.trigger` says why. `event` is the triggering\n\t * click or key event, or `undefined` when there is none (`mouseLeave` timer, `newPopover`).\n\t */\n\tonRequestClose?: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\t/** Custom target element getter */\n\tonRequestTargetElement?: () => HTMLElement | null;\n\t/** Open trigger type */\n\topenOn?: 'click' | 'hover' | 'hybrid';\n\t/** Overlay for click-outside on iframes */\n\toverlay?: boolean | ((isOpen: boolean, overlayElement: HTMLElement) => void);\n\t/** Positioning strategy */\n\tposition?: PopoverPosition;\n\t/** Walkthrough step text */\n\tstepText?: string;\n\t/** Custom styles */\n\tstyle?: CSSProperties;\n\t/** CSS classes for trigger wrapper */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Popover variant */\n\tvariant?: PopoverVariant;\n\t/** Delay before closing on hover (ms) */\n\thoverCloseDelay?: number;\n\t/** @deprecated Use assistiveText.closeButton */\n\tcloseButtonAssistiveText?: string;\n}\n\n// Nubbin positions for export (legacy)\nexport const PopoverNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\nconst defaultAssistiveText: PopoverAssistiveText = {\n\tcloseButton: 'Close dialog',\n};\n\n/**\n * The Popover component is a non-modal dialog. It should be paired with a clickable\n * trigger such as a Button. It traps focus from the page and must be exited if focus\n * needs to be outside the Popover.\n */\nconst Popover = ({\n\talign = 'right',\n\tassistiveText: propAssistiveText,\n\tariaLabelledby,\n\tchildren,\n\tbody,\n\tclassNameBody,\n\tclassNameFooter,\n\tfooterClassName,\n\tclassName,\n\tcontentsClassName,\n\tdisabled = false,\n\tfooter,\n\tfooterStyle,\n\tfooterWalkthroughActions,\n\thasNoCloseButton = false,\n\thasNoNubbin = false,\n\thasStaticAlignment = false,\n\thasNoTriggerStyles = false,\n\theading,\n\ticon,\n\tid: propId,\n\tisOpen: controlledIsOpen,\n\toffset,\n\tonClick,\n\tonClose,\n\tonFocus,\n\tonKeyDown,\n\tonMouseDown,\n\tonMouseEnter,\n\tonMouseLeave,\n\tonOpen,\n\tonRequestClose,\n\tonRequestTargetElement,\n\topenOn = 'click',\n\toverlay: overlayProp,\n\tposition = 'absolute',\n\tstepText,\n\tstyle,\n\ttriggerClassName,\n\tvariant = 'base',\n\thoverCloseDelay = 300,\n\tcloseButtonAssistiveText,\n}: PopoverProps): ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst context = useContext(IconSettingsContext);\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst finalCloseButtonAssistiveText =\n\t\tcloseButtonAssistiveText || assistiveText.closeButton;\n\n\t// State\n\tconst [internalIsOpen, setInternalIsOpen] = useState(false);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Refs\n\tconst triggerRef = useRef<HTMLDivElement>(null);\n\tconst dialogRef = useRef<HTMLElement>(null);\n\tconst isHoverRef = useRef(false);\n\tconst isClosingRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst overlayRef = useRef<HTMLSpanElement | null>(null);\n\tconst isUnmountingRef = useRef(false);\n\n\t// Derived state\n\tconst isOpen =\n\t\t!disabled &&\n\t\t(controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen);\n\n\t// Get target element for positioning\n\tconst getTargetElement = useCallback(() => {\n\t\tif (onRequestTargetElement) {\n\t\t\tconst target = onRequestTargetElement();\n\t\t\tif (target) return target;\n\t\t}\n\t\treturn triggerRef.current;\n\t}, [onRequestTargetElement]);\n\n\t// Handle dialog close (when unmounted)\n\tconst handleDialogClose = useCallback(\n\t\t(\n\t\t\t_event?: React.SyntheticEvent,\n\t\t\tdata?: { componentWillUnmount?: boolean }\n\t\t) => {\n\t\t\tconst componentWillUnmount = data?.componentWillUnmount || false;\n\n\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\tcurrentOpenPopover = null;\n\t\t\t}\n\n\t\t\tif (onClose) {\n\t\t\t\tonClose(undefined, { componentWillUnmount });\n\t\t\t}\n\t\t},\n\t\t[id, onClose]\n\t);\n\n\t// Handle dialog open (after it has rendered)\n\tconst handleDialogOpen = useCallback(\n\t\t(_event?: unknown, data?: { portal?: HTMLElement }) => {\n\t\t\tif (onOpen) {\n\t\t\t\tonOpen(undefined, { portal: data?.portal });\n\t\t\t}\n\t\t},\n\t\t[onOpen]\n\t);\n\n\t// Handle close\n\tconst handleClose = useCallback(\n\t\t(\n\t\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\t\tdata: PopoverRequestCloseData\n\t\t) => {\n\t\t\tif (isOpen) {\n\t\t\t\tif (onRequestClose) {\n\t\t\t\t\tonRequestClose(event, data);\n\t\t\t\t}\n\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\n\t\t\t\tsetInternalIsOpen(false);\n\t\t\t\tisHoverRef.current = false;\n\t\t\t}\n\t\t},\n\t\t[isOpen, id, onRequestClose]\n\t);\n\n\t// Latest `handleClose`, so the \"close the other open popover\" path does not call a stale\n\t// closure from when this popover opened (whose `isOpen` was still `false`).\n\tconst handleCloseRef = useRef(handleClose);\n\tuseEffect(() => {\n\t\thandleCloseRef.current = handleClose;\n\t}, [handleClose]);\n\n\t// Handle open\n\tconst handleOpen = useCallback(() => {\n\t\tif (!isOpen) {\n\t\t\t// Close any other open popover\n\t\t\tif (currentOpenPopover && currentOpenPopover.getId() !== id) {\n\t\t\t\tcurrentOpenPopover.handleClose(undefined, {\n\t\t\t\t\ttrigger: 'newPopover',\n\t\t\t\t\tid: currentOpenPopover.getId(),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tcurrentOpenPopover = {\n\t\t\t\thandleClose: (event, data) => handleCloseRef.current(event, data),\n\t\t\t\tgetId: () => id,\n\t\t\t};\n\n\t\t\tsetInternalIsOpen(true);\n\t\t}\n\t}, [isOpen, id]);\n\n\t// Handle cancel (close button or escape)\n\tconst handleCancel = useCallback(\n\t\t(event: MouseEvent | KeyboardEvent) => {\n\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t},\n\t\t[handleClose]\n\t);\n\n\t// Handle click outside\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\thandleClose(event, { trigger: 'clickOutside' });\n\t\t},\n\t\t[handleClose]\n\t);\n\n\t// Handle mouse enter\n\tconst handleMouseEnter = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tisHoverRef.current = true;\n\n\t\t\tif (!isOpen && openOn === 'hover') {\n\t\t\t\thandleOpen();\n\t\t\t} else {\n\t\t\t\tif (isClosingRef.current) {\n\t\t\t\t\tclearTimeout(isClosingRef.current);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (onMouseEnter) {\n\t\t\t\tonMouseEnter(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, openOn, handleOpen, onMouseEnter]\n\t);\n\n\t// Handle mouse leave\n\tconst handleMouseLeave = useCallback(\n\t\t(event: MouseEvent) => {\n\t\t\tif (isOpen) {\n\t\t\t\tisClosingRef.current = setTimeout(() => {\n\t\t\t\t\thandleClose(undefined, { trigger: 'mouseLeave' });\n\t\t\t\t}, hoverCloseDelay);\n\t\t\t}\n\n\t\t\tif (onMouseLeave) {\n\t\t\t\tonMouseLeave(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, hoverCloseDelay, handleClose, onMouseLeave]\n\t);\n\n\t// Handle click\n\tconst handleClick = useCallback(\n\t\t(event: MouseEvent, triggerOnClickCallback?: (e: MouseEvent) => void) => {\n\t\t\tif (!isOpen) {\n\t\t\t\thandleOpen();\n\t\t\t} else {\n\t\t\t\thandleClose(event, { trigger: 'triggerClick' });\n\t\t\t}\n\n\t\t\tif (onClick) {\n\t\t\t\tonClick(event);\n\t\t\t}\n\n\t\t\tif (triggerOnClickCallback) {\n\t\t\t\ttriggerOnClickCallback(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleOpen, handleClose, onClick]\n\t);\n\n\t// Handle focus\n\tconst handleFocus = useCallback(\n\t\t(event: FocusEvent) => {\n\t\t\tif (!isOpen) {\n\t\t\t\thandleOpen();\n\t\t\t}\n\n\t\t\tif (onFocus) {\n\t\t\t\tonFocus(event);\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleOpen, onFocus]\n\t);\n\n\t// Toggle from keyboard\n\tconst toggleOpenFromKeyboard = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (isOpen) {\n\t\t\t\thandleCancel(event);\n\t\t\t} else {\n\t\t\t\thandleOpen();\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleCancel, handleOpen]\n\t);\n\n\t// Handle key down\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (event.keyCode) {\n\t\t\t\tif (event.keyCode !== KEYS.TAB) {\n\t\t\t\t\tkeyboardNavigableDialog({\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tisOpen,\n\t\t\t\t\t\thandleClick: (e: MouseEvent) => handleClick(e),\n\t\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\t\teventTarget: event.target,\n\t\t\t\t\t\t// keyboardNavigableDialog calls `toggleOpen()` without the event; pass it through\n\t\t\t\t\t\ttoggleOpen: () => toggleOpenFromKeyboard(event),\n\t\t\t\t\t\ttrigger: triggerRef.current,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (onKeyDown) {\n\t\t\t\t\tonKeyDown(event);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[isOpen, handleClick, toggleOpenFromKeyboard, onKeyDown]\n\t);\n\n\t// Render overlay for click-outside detection\n\tconst renderOverlay = useCallback(\n\t\t(shouldShow: boolean) => {\n\t\t\tif (typeof overlayProp === 'function' && documentDefined) {\n\t\t\t\toverlayProp(shouldShow, overlay);\n\t\t\t} else if (\n\t\t\t\toverlayProp &&\n\t\t\t\tshouldShow &&\n\t\t\t\t!overlayRef.current &&\n\t\t\t\tdocumentDefined\n\t\t\t) {\n\t\t\t\toverlayRef.current = overlay;\n\t\t\t\tdocument.querySelector('body')?.appendChild(overlay);\n\t\t\t} else if (!shouldShow && overlayRef.current?.parentNode) {\n\t\t\t\toverlayRef.current.parentNode.removeChild(overlayRef.current);\n\t\t\t\toverlayRef.current = null;\n\t\t\t}\n\t\t},\n\t\t[overlayProp]\n\t);\n\n\t// Container ref callback\n\tconst setContainerRef = useCallback(\n\t\t(component: HTMLDivElement | null) => {\n\t\t\t(triggerRef as React.MutableRefObject<HTMLDivElement | null>).current =\n\t\t\t\tcomponent;\n\t\t\tif (component && !inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t},\n\t\t[inputRendered]\n\t);\n\n\t// Dialog ref callback\n\tconst setMenuRef = useCallback((component: HTMLElement | null) => {\n\t\t(dialogRef as React.MutableRefObject<HTMLElement | null>).current =\n\t\t\tcomponent;\n\t}, []);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tisUnmountingRef.current = true;\n\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\tcurrentOpenPopover = null;\n\t\t\t}\n\t\t\trenderOverlay(false);\n\t\t};\n\t}, [id, renderOverlay]);\n\n\t// Update overlay when isOpen changes\n\tuseEffect(() => {\n\t\trenderOverlay(isOpen);\n\t}, [isOpen, renderOverlay]);\n\n\t// Render header\n\tconst renderHeader = () => {\n\t\tconst hasThemedHeader = variant === 'error' || variant === 'warning';\n\t\tconst hasDefinedHeader = heading || hasThemedHeader;\n\n\t\tif (\n\t\t\t!hasDefinedHeader ||\n\t\t\tvariant === 'walkthrough-action' ||\n\t\t\tvariant === 'feature'\n\t\t) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst headerIcon = {\n\t\t\terror: <Icon category=\"utility\" name=\"error\" size=\"x-small\" inverse />,\n\t\t\twarning: (\n\t\t\t\t<Icon category=\"utility\" name=\"warning\" size=\"x-small\" inverse />\n\t\t\t),\n\t\t};\n\n\t\tif (hasThemedHeader) {\n\t\t\treturn (\n\t\t\t\t<header className=\"slds-popover__header\">\n\t\t\t\t\t<MediaObject\n\t\t\t\t\t\tbody={\n\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\tclassName=\"slds-truncate slds-text-heading_medium\"\n\t\t\t\t\t\t\t\ttitle={typeof heading === 'string' ? heading : undefined}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfigure={headerIcon[variant as 'error' | 'warning']}\n\t\t\t\t\t\tverticalCenter\n\t\t\t\t\t/>\n\t\t\t\t</header>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<header\n\t\t\t\tclassName={classNames('slds-popover__header', {\n\t\t\t\t\t'slds-p-vertical_medium': variant === 'walkthrough',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<h2\n\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-text-heading_small': variant !== 'walkthrough',\n\t\t\t\t\t\t'slds-text-heading_medium': variant === 'walkthrough',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{heading}\n\t\t\t\t</h2>\n\t\t\t</header>\n\t\t);\n\t};\n\n\t// Render body\n\tconst renderBody = () => {\n\t\tif (variant === 'error' || variant === 'warning') {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\tif (variant === 'walkthrough-action' || variant === 'feature') {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{variant === 'walkthrough-action' ? (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\tname=\"touch_action\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tinverse\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t{heading && (\n\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-text-heading_small\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{body}\n\t\t\t\t\t\t\t{stepText && (\n\t\t\t\t\t\t\t\t<p className=\"slds-m-top_medium slds-text-title\">{stepText}</p>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t>\n\t\t\t\t{body}\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// Render footer\n\tconst renderFooter = () => {\n\t\tif (footer) {\n\t\t\treturn (\n\t\t\t\t<footer\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-popover__footer',\n\t\t\t\t\t\tclassNameFooter as string,\n\t\t\t\t\t\tfooterClassName as string\n\t\t\t\t\t)}\n\t\t\t\t\tstyle={footerStyle}\n\t\t\t\t>\n\t\t\t\t\t{footer}\n\t\t\t\t</footer>\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\tvariant !== 'walkthrough-action' &&\n\t\t\t(footerWalkthroughActions || stepText)\n\t\t) {\n\t\t\treturn (\n\t\t\t\t<footer className=\"slds-popover__footer\">\n\t\t\t\t\t<div className=\"slds-grid slds-grid_vertical-align-center\">\n\t\t\t\t\t\t{stepText && <span className=\"slds-text-title\">{stepText}</span>}\n\t\t\t\t\t\t{footerWalkthroughActions && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\t\t\t\tstyle={{ display: 'inline-block' }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footerWalkthroughActions}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</footer>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\n\n\t// Render dialog\n\tconst renderDialog = () => {\n\t\tif (!isOpen) return null;\n\n\t\tconst outsideClickIgnoreClass = `ignore-click-${id}`;\n\n\t\treturn (\n\t\t\t<Dialog\n\t\t\t\thasNubbin={!hasNoNubbin}\n\t\t\t\talign={align}\n\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\tcontentsClassName as string,\n\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t'slds-popover',\n\t\t\t\t\t{ 'slds-popover_error': variant === 'error' },\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-popover_walkthrough':\n\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t},\n\t\t\t\t\t{ 'slds-popover_walkthrough-alt': variant === 'walkthrough-action' },\n\t\t\t\t\t{ 'slds-popover_feature': variant === 'feature' },\n\t\t\t\t\t{ 'slds-popover_warning': variant === 'warning' },\n\t\t\t\t\tclassName as string\n\t\t\t\t)}\n\t\t\t\tcontext={context}\n\t\t\t\thasStaticAlignment={hasStaticAlignment}\n\t\t\t\toffset={offset}\n\t\t\t\tonClose={handleDialogClose}\n\t\t\t\tonOpen={handleDialogOpen}\n\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\tonMouseEnter={openOn === 'hover' ? handleMouseEnter : undefined}\n\t\t\t\tonMouseLeave={openOn === 'hover' ? handleMouseLeave : undefined}\n\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\tonRequestTargetElement={getTargetElement}\n\t\t\t\tposition={position}\n\t\t\t\tstyle={style}\n\t\t\t\tvariant=\"popover\"\n\t\t\t\tref={setMenuRef}\n\t\t\t\tcontainerProps={{\n\t\t\t\t\tid: `${id}-popover`,\n\t\t\t\t\t'aria-labelledby': ariaLabelledby || `${id}-dialog-heading`,\n\t\t\t\t\t'aria-describedby': `${id}-dialog-body`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!hasNoCloseButton && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: finalCloseButtonAssistiveText }}\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-button slds-button_icon-small slds-float_right slds-popover__close slds-button_icon',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-button_icon-inverse':\n\t\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonClick={handleCancel}\n\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\tinverse={variant === 'error' || variant === 'warning'}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{renderHeader()}\n\t\t\t\t{renderBody()}\n\t\t\t\t{renderFooter()}\n\t\t\t</Dialog>\n\t\t);\n\t};\n\n\t// Clone trigger element\n\tconst otherChildren: ReactNode[] = [];\n\tlet clonedTrigger: ReactNode = null;\n\n\tReact.Children.forEach(children, (child, index) => {\n\t\tif (index === 0 && React.isValidElement(child)) {\n\t\t\tconst childProps = child.props as Record<string, unknown>;\n\t\t\tconst triggerProps: Record<string, unknown> = {\n\t\t\t\t'aria-haspopup': 'dialog',\n\t\t\t\tid,\n\t\t\t\tonClick:\n\t\t\t\t\topenOn === 'click' || openOn === 'hybrid'\n\t\t\t\t\t\t? (event: MouseEvent) => {\n\t\t\t\t\t\t\t\thandleClick(\n\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t\tchildProps.onClick as (e: MouseEvent) => void\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: childProps.onClick,\n\t\t\t\tonFocus: openOn === 'hover' ? handleFocus : undefined,\n\t\t\t\tonMouseDown,\n\t\t\t\tonMouseEnter:\n\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t? handleMouseEnter\n\t\t\t\t\t\t: undefined,\n\t\t\t\tonMouseLeave:\n\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t? handleMouseLeave\n\t\t\t\t\t\t: undefined,\n\t\t\t\ttabIndex: (childProps.tabIndex as number) || 0,\n\t\t\t};\n\t\t\tclonedTrigger = React.cloneElement(child, triggerProps);\n\t\t} else if (child) {\n\t\t\totherChildren.push(child);\n\t\t}\n\t});\n\n\tconst containerStyles: CSSProperties = {\n\t\tdisplay: hasNoTriggerStyles ? undefined : 'inline-block',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={triggerClassName as string}\n\t\t\tstyle={containerStyles}\n\t\t\tref={setContainerRef}\n\t\t>\n\t\t\t{clonedTrigger}\n\t\t\t{otherChildren.length > 0 ? otherChildren : null}\n\t\t\t{renderDialog()}\n\t\t</div>\n\t);\n};\n\nPopover.displayName = POPOVER;\n\nexport default Popover;\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAM,IAAkB,OAAO,WAAa,KA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AuB;GAC9C;GACA,IAAgB,EAAM,aAAa,GAAO,CAAY;EACvD,OAAO,AAAI,KACV,EAAc,KAAK,CAAK;CAE1B,CAAC,GAOA,kBAAC,OAAD;EACC,WAAW;EACX,OAAO,EANR,SAAS,KAAqB,KAAA,IAAY,eAMlC;EACP,KAAK;EAHN,UAAA;GAKE;GACA,EAAc,SAAS,IAAI,IAAgB;GAC3C,GAAa;EACV;;AAEP;AAEA,EAAQ,cAAc"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../../../components/popover/popover.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tforwardRef,\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseCallback,\n\tuseId,\n\tuseContext,\n\ttype ReactNode,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n\ttype FocusEvent,\n\ttype CSSProperties,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport MediaObject from '../media-object';\nimport Icon from '../icon';\nimport Dialog from '../utilities/dialog';\nimport keyboardNavigableDialog from '../../utilities/keyboard-navigable-dialog';\nimport KEYS from '../../utilities/key-code';\nimport { POPOVER } from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\nimport componentDoc from './component.json';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// Shared overlay element for click-outside detection over iframes\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: ({ style: {} } as HTMLSpanElement);\nif (documentDefined) {\n\toverlay.style.top = '0';\n\toverlay.style.left = '0';\n\toverlay.style.width = '100%';\n\toverlay.style.height = '100%';\n\toverlay.style.position = 'absolute';\n}\n\n// Track currently open popover for single-popover-at-a-time behavior\nlet currentOpenPopover: {\n\thandleClose: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\tgetId: () => string;\n} | null = null;\n\n/**\n * Popover alignment options\n */\nexport type PopoverAlign =\n\t| 'top'\n\t| 'top left'\n\t| 'top right'\n\t| 'right'\n\t| 'right top'\n\t| 'right bottom'\n\t| 'bottom'\n\t| 'bottom left'\n\t| 'bottom right'\n\t| 'left'\n\t| 'left top'\n\t| 'left bottom';\n\n/**\n * Popover position options\n */\nexport type PopoverPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Popover variant options\n */\nexport type PopoverVariant =\n\t| 'base'\n\t| 'error'\n\t| 'feature'\n\t| 'walkthrough'\n\t| 'walkthrough-action'\n\t| 'warning';\n\n/**\n * Assistive text for Popover\n */\nexport interface PopoverAssistiveText {\n\tcloseButton?: string;\n}\n\n/**\n * What caused `onRequestClose` to fire:\n * * `cancel`: the close button was clicked or Escape was pressed\n * * `clickOutside`: a click landed outside the popover\n * * `mouseLeave`: the mouse left the trigger/popover (`openOn` `hover`/`hybrid`) and `hoverCloseDelay` elapsed\n * * `newPopover`: another Popover opened (only one can be open at a time)\n * * `triggerClick`: the trigger was clicked while the popover was open\n */\nexport type PopoverRequestCloseTrigger =\n\t'cancel' | 'clickOutside' | 'mouseLeave' | 'newPopover' | 'triggerClick';\n\n/**\n * Data passed to `onRequestClose`\n */\nexport interface PopoverRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: PopoverRequestCloseTrigger;\n\t/** HTML id of the popover being closed. Only present when `trigger` is `newPopover`. */\n\tid?: string;\n}\n\n/**\n * Data passed to `onOpen`\n */\nexport interface PopoverOpenData {\n\t/** The rendered popover dialog element */\n\tportal?: HTMLElement;\n}\n\n/**\n * Data passed to `onClose`\n */\nexport interface PopoverCloseData {\n\t/** `true` when the popover dialog is closing because it is being unmounted */\n\tcomponentWillUnmount: boolean;\n}\n\n/**\n * Props for the Popover component\n */\nexport interface PopoverProps {\n\t/** Alignment relative to trigger */\n\talign?: PopoverAlign;\n\t/** Accessibility labels */\n\tassistiveText?: PopoverAssistiveText;\n\t/** HTML id of heading for aria-labelledby */\n\tariaLabelledby?: string;\n\t/** Trigger element (first child) and optional other children */\n\tchildren: ReactNode;\n\t/** Popover body content */\n\tbody: ReactNode;\n\t/** CSS classes for the `.slds-popover__body` element */\n\tclassNameBody?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-popover__footer` element */\n\tclassNameFooter?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameFooter`. */\n\tfooterClassName?: string | string[] | Record<string, boolean>;\n\t/**\n\t * CSS classes for the root element: the `div` that wraps the trigger. To style the\n\t * `.slds-popover` dialog (for example `slds-popover_large`), use `classNameDialog`.\n\t */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for the `.slds-popover` dialog element */\n\tclassNameDialog?: string | string[] | Record<string, boolean>;\n\t/** @deprecated Use `classNameDialog`, which lands on the same element. */\n\tcontentsClassName?: string | string[] | Record<string, boolean>;\n\t/** Disable the popover */\n\tdisabled?: boolean;\n\t/** Footer content */\n\tfooter?: ReactNode;\n\t/** @deprecated Use `styleFooter`. */\n\tfooterStyle?: CSSProperties;\n\t/** Walkthrough footer actions */\n\tfooterWalkthroughActions?: ReactNode | ReactNode[];\n\t/** Hide close button */\n\thasNoCloseButton?: boolean;\n\t/** Hide nubbin/arrow */\n\thasNoNubbin?: boolean;\n\t/** Prevent position flipping */\n\thasStaticAlignment?: boolean;\n\t/** Remove trigger inline-block style */\n\thasNoTriggerStyles?: boolean;\n\t/** Popover heading */\n\theading?: ReactNode;\n\t/** Icon for feature variant */\n\ticon?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Offset from target */\n\toffset?: string;\n\t/** Click handler */\n\tonClick?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has closed (unmounted). There is no triggering event, so `event` is `undefined`. */\n\tonClose?: (event: undefined, data: PopoverCloseData) => void;\n\t/** Focus handler */\n\tonFocus?: (event: FocusEvent) => void;\n\t/** Key down handler */\n\tonKeyDown?: (event: KeyboardEvent) => void;\n\t/** Mouse down handler */\n\tonMouseDown?: (event: MouseEvent) => void;\n\t/** Mouse enter handler */\n\tonMouseEnter?: (event: MouseEvent) => void;\n\t/** Mouse leave handler */\n\tonMouseLeave?: (event: MouseEvent) => void;\n\t/** Called after the popover dialog has opened and rendered. There is no triggering event, so `event` is `undefined`. */\n\tonOpen?: (event: undefined, data: PopoverOpenData) => void;\n\t/**\n\t * Called when the popover requests to close. `data.trigger` says why. `event` is the triggering\n\t * click or key event, or `undefined` when there is none (`mouseLeave` timer, `newPopover`).\n\t */\n\tonRequestClose?: (\n\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\tdata: PopoverRequestCloseData\n\t) => void;\n\t/** Custom target element getter */\n\tonRequestTargetElement?: () => HTMLElement | null;\n\t/** Open trigger type */\n\topenOn?: 'click' | 'hover' | 'hybrid';\n\t/** Overlay for click-outside on iframes */\n\toverlay?: boolean | ((isOpen: boolean, overlayElement: HTMLElement) => void);\n\t/** Positioning strategy */\n\tposition?: PopoverPosition;\n\t/** Walkthrough step text */\n\tstepText?: string;\n\t/** Styles for the root element: the `div` that wraps the trigger. To style the dialog, use `styleDialog`. */\n\tstyle?: CSSProperties;\n\t/** Styles for the `.slds-popover` dialog element */\n\tstyleDialog?: CSSProperties;\n\t/** Styles for the `.slds-popover__footer` element */\n\tstyleFooter?: CSSProperties;\n\t/** @deprecated Use `className`, which lands on the same element. */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Popover variant */\n\tvariant?: PopoverVariant;\n\t/** Delay before closing on hover (ms) */\n\thoverCloseDelay?: number;\n\t/** @deprecated Use assistiveText.closeButton */\n\tcloseButtonAssistiveText?: string;\n}\n\n// Nubbin positions for export (legacy)\nexport const PopoverNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\nconst defaultAssistiveText: PopoverAssistiveText = {\n\tcloseButton: 'Close dialog',\n};\n\n/**\n * The Popover component is a non-modal dialog. It should be paired with a clickable\n * trigger such as a Button. It traps focus from the page and must be exited if focus\n * needs to be outside the Popover.\n */\nconst Popover = forwardRef<HTMLDivElement, PopoverProps>(\n\t(\n\t\t{\n\t\t\talign = 'right',\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tariaLabelledby,\n\t\t\tchildren,\n\t\t\tbody,\n\t\t\tclassNameBody,\n\t\t\tclassNameFooter,\n\t\t\tfooterClassName,\n\t\t\tclassName,\n\t\t\tclassNameDialog,\n\t\t\tcontentsClassName,\n\t\t\tdisabled = false,\n\t\t\tfooter,\n\t\t\tfooterStyle,\n\t\t\tfooterWalkthroughActions,\n\t\t\thasNoCloseButton = false,\n\t\t\thasNoNubbin = false,\n\t\t\thasStaticAlignment = false,\n\t\t\thasNoTriggerStyles = false,\n\t\t\theading,\n\t\t\ticon,\n\t\t\tid: propId,\n\t\t\tisOpen: controlledIsOpen,\n\t\t\toffset,\n\t\t\tonClick,\n\t\t\tonClose,\n\t\t\tonFocus,\n\t\t\tonKeyDown,\n\t\t\tonMouseDown,\n\t\t\tonMouseEnter,\n\t\t\tonMouseLeave,\n\t\t\tonOpen,\n\t\t\tonRequestClose,\n\t\t\tonRequestTargetElement,\n\t\t\topenOn = 'click',\n\t\t\toverlay: overlayProp,\n\t\t\tposition = 'absolute',\n\t\t\tstepText,\n\t\t\tstyle,\n\t\t\tstyleDialog,\n\t\t\tstyleFooter,\n\t\t\ttriggerClassName,\n\t\t\tvariant = 'base',\n\t\t\thoverCloseDelay = 300,\n\t\t\tcloseButtonAssistiveText,\n\t\t},\n\t\tref\n\t) => {\n\t\t// `check-props.js` is not wired up (its trigger and heading checks predate v11), so the\n\t\t// renamed props are checked here.\n\t\tuseEffect(() => {\n\t\t\tif (process.env.NODE_ENV !== 'production') {\n\t\t\t\tconst createDocUrl = getComponentDocFn(componentDoc);\n\t\t\t\tconst renamedProps: [string, unknown, string][] = [\n\t\t\t\t\t['contentsClassName', contentsClassName, 'classNameDialog'],\n\t\t\t\t\t['footerClassName', footerClassName, 'classNameFooter'],\n\t\t\t\t\t['footerStyle', footerStyle, 'styleFooter'],\n\t\t\t\t\t['triggerClassName', triggerClassName, 'className'],\n\t\t\t\t];\n\t\t\t\trenamedProps.forEach(([oldProp, value, newProp]) => {\n\t\t\t\t\tdeprecatedProperty(\n\t\t\t\t\t\tPOPOVER,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\toldProp,\n\t\t\t\t\t\tnewProp,\n\t\t\t\t\t\tcreateDocUrl(newProp)\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t}, []); // Only run on mount\n\n\t\tconst generatedId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst context = useContext(IconSettingsContext);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t\tconst finalCloseButtonAssistiveText =\n\t\t\tcloseButtonAssistiveText || assistiveText.closeButton;\n\n\t\t// State\n\t\tconst [internalIsOpen, setInternalIsOpen] = useState(false);\n\t\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t\t// Refs\n\t\tconst triggerRef = useRef<HTMLDivElement>(null);\n\t\tconst dialogRef = useRef<HTMLElement>(null);\n\t\tconst isHoverRef = useRef(false);\n\t\tconst isClosingRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\t\tconst overlayRef = useRef<HTMLSpanElement | null>(null);\n\t\tconst isUnmountingRef = useRef(false);\n\n\t\t// Derived state\n\t\tconst isOpen =\n\t\t\t!disabled &&\n\t\t\t(controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen);\n\n\t\t// Get target element for positioning\n\t\tconst getTargetElement = useCallback(() => {\n\t\t\tif (onRequestTargetElement) {\n\t\t\t\tconst target = onRequestTargetElement();\n\t\t\t\tif (target) return target;\n\t\t\t}\n\t\t\treturn triggerRef.current;\n\t\t}, [onRequestTargetElement]);\n\n\t\t// Handle dialog close (when unmounted)\n\t\tconst handleDialogClose = useCallback(\n\t\t\t(\n\t\t\t\t_event?: React.SyntheticEvent,\n\t\t\t\tdata?: { componentWillUnmount?: boolean }\n\t\t\t) => {\n\t\t\t\tconst componentWillUnmount = data?.componentWillUnmount || false;\n\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\n\t\t\t\tif (onClose) {\n\t\t\t\t\tonClose(undefined, { componentWillUnmount });\n\t\t\t\t}\n\t\t\t},\n\t\t\t[id, onClose]\n\t\t);\n\n\t\t// Handle dialog open (after it has rendered)\n\t\tconst handleDialogOpen = useCallback(\n\t\t\t(_event?: unknown, data?: { portal?: HTMLElement }) => {\n\t\t\t\tif (onOpen) {\n\t\t\t\t\tonOpen(undefined, { portal: data?.portal });\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onOpen]\n\t\t);\n\n\t\t// Handle close\n\t\tconst handleClose = useCallback(\n\t\t\t(\n\t\t\t\tevent: MouseEvent | KeyboardEvent | undefined,\n\t\t\t\tdata: PopoverRequestCloseData\n\t\t\t) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tif (onRequestClose) {\n\t\t\t\t\t\tonRequestClose(event, data);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tsetInternalIsOpen(false);\n\t\t\t\t\tisHoverRef.current = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, id, onRequestClose]\n\t\t);\n\n\t\t// Latest `handleClose`, so the \"close the other open popover\" path does not call a stale\n\t\t// closure from when this popover opened (whose `isOpen` was still `false`).\n\t\tconst handleCloseRef = useRef(handleClose);\n\t\tuseEffect(() => {\n\t\t\thandleCloseRef.current = handleClose;\n\t\t}, [handleClose]);\n\n\t\t// Handle open\n\t\tconst handleOpen = useCallback(() => {\n\t\t\tif (!isOpen) {\n\t\t\t\t// Close any other open popover\n\t\t\t\tif (currentOpenPopover && currentOpenPopover.getId() !== id) {\n\t\t\t\t\tcurrentOpenPopover.handleClose(undefined, {\n\t\t\t\t\t\ttrigger: 'newPopover',\n\t\t\t\t\t\tid: currentOpenPopover.getId(),\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tcurrentOpenPopover = {\n\t\t\t\t\thandleClose: (event, data) => handleCloseRef.current(event, data),\n\t\t\t\t\tgetId: () => id,\n\t\t\t\t};\n\n\t\t\t\tsetInternalIsOpen(true);\n\t\t\t}\n\t\t}, [isOpen, id]);\n\n\t\t// Handle cancel (close button or escape)\n\t\tconst handleCancel = useCallback(\n\t\t\t(event: MouseEvent | KeyboardEvent) => {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t},\n\t\t\t[handleClose]\n\t\t);\n\n\t\t// Handle click outside\n\t\tconst handleClickOutside = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\thandleClose(event, { trigger: 'clickOutside' });\n\t\t\t},\n\t\t\t[handleClose]\n\t\t);\n\n\t\t// Handle mouse enter\n\t\tconst handleMouseEnter = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\tisHoverRef.current = true;\n\n\t\t\t\tif (!isOpen && openOn === 'hover') {\n\t\t\t\t\thandleOpen();\n\t\t\t\t} else {\n\t\t\t\t\tif (isClosingRef.current) {\n\t\t\t\t\t\tclearTimeout(isClosingRef.current);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (onMouseEnter) {\n\t\t\t\t\tonMouseEnter(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, openOn, handleOpen, onMouseEnter]\n\t\t);\n\n\t\t// Handle mouse leave\n\t\tconst handleMouseLeave = useCallback(\n\t\t\t(event: MouseEvent) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\tisClosingRef.current = setTimeout(() => {\n\t\t\t\t\t\thandleClose(undefined, { trigger: 'mouseLeave' });\n\t\t\t\t\t}, hoverCloseDelay);\n\t\t\t\t}\n\n\t\t\t\tif (onMouseLeave) {\n\t\t\t\t\tonMouseLeave(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, hoverCloseDelay, handleClose, onMouseLeave]\n\t\t);\n\n\t\t// Handle click\n\t\tconst handleClick = useCallback(\n\t\t\t(event: MouseEvent, triggerOnClickCallback?: (e: MouseEvent) => void) => {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\thandleOpen();\n\t\t\t\t} else {\n\t\t\t\t\thandleClose(event, { trigger: 'triggerClick' });\n\t\t\t\t}\n\n\t\t\t\tif (onClick) {\n\t\t\t\t\tonClick(event);\n\t\t\t\t}\n\n\t\t\t\tif (triggerOnClickCallback) {\n\t\t\t\t\ttriggerOnClickCallback(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleOpen, handleClose, onClick]\n\t\t);\n\n\t\t// Handle focus\n\t\tconst handleFocus = useCallback(\n\t\t\t(event: FocusEvent) => {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\thandleOpen();\n\t\t\t\t}\n\n\t\t\t\tif (onFocus) {\n\t\t\t\t\tonFocus(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleOpen, onFocus]\n\t\t);\n\n\t\t// Toggle from keyboard\n\t\tconst toggleOpenFromKeyboard = useCallback(\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (isOpen) {\n\t\t\t\t\thandleCancel(event);\n\t\t\t\t} else {\n\t\t\t\t\thandleOpen();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleCancel, handleOpen]\n\t\t);\n\n\t\t// Handle key down\n\t\tconst handleKeyDown = useCallback(\n\t\t\t(event: KeyboardEvent) => {\n\t\t\t\tif (event.keyCode) {\n\t\t\t\t\tif (event.keyCode !== KEYS.TAB) {\n\t\t\t\t\t\tkeyboardNavigableDialog({\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\tisOpen,\n\t\t\t\t\t\t\thandleClick: (e: MouseEvent) => handleClick(e),\n\t\t\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\t\t\teventTarget: event.target,\n\t\t\t\t\t\t\t// keyboardNavigableDialog calls `toggleOpen()` without the event; pass it through\n\t\t\t\t\t\t\ttoggleOpen: () => toggleOpenFromKeyboard(event),\n\t\t\t\t\t\t\ttrigger: triggerRef.current,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif (onKeyDown) {\n\t\t\t\t\t\tonKeyDown(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t[isOpen, handleClick, toggleOpenFromKeyboard, onKeyDown]\n\t\t);\n\n\t\t// Render overlay for click-outside detection\n\t\tconst renderOverlay = useCallback(\n\t\t\t(shouldShow: boolean) => {\n\t\t\t\tif (typeof overlayProp === 'function' && documentDefined) {\n\t\t\t\t\toverlayProp(shouldShow, overlay);\n\t\t\t\t} else if (\n\t\t\t\t\toverlayProp &&\n\t\t\t\t\tshouldShow &&\n\t\t\t\t\t!overlayRef.current &&\n\t\t\t\t\tdocumentDefined\n\t\t\t\t) {\n\t\t\t\t\toverlayRef.current = overlay;\n\t\t\t\t\tdocument.querySelector('body')?.appendChild(overlay);\n\t\t\t\t} else if (!shouldShow && overlayRef.current?.parentNode) {\n\t\t\t\t\toverlayRef.current.parentNode.removeChild(overlayRef.current);\n\t\t\t\t\toverlayRef.current = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\t[overlayProp]\n\t\t);\n\n\t\t// Container ref callback\n\t\tconst setContainerRef = useCallback(\n\t\t\t(component: HTMLDivElement | null) => {\n\t\t\t\t(triggerRef as React.MutableRefObject<HTMLDivElement | null>).current =\n\t\t\t\t\tcomponent;\n\t\t\t\tif (typeof ref === 'function') {\n\t\t\t\t\tref(component);\n\t\t\t\t} else if (ref) {\n\t\t\t\t\tref.current = component;\n\t\t\t\t}\n\t\t\t\tif (component && !inputRendered) {\n\t\t\t\t\tsetInputRendered(true);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[inputRendered, ref]\n\t\t);\n\n\t\t// Dialog ref callback\n\t\tconst setMenuRef = useCallback((component: HTMLElement | null) => {\n\t\t\t(dialogRef as React.MutableRefObject<HTMLElement | null>).current =\n\t\t\t\tcomponent;\n\t\t}, []);\n\n\t\t// Cleanup on unmount\n\t\tuseEffect(() => {\n\t\t\treturn () => {\n\t\t\t\tisUnmountingRef.current = true;\n\t\t\t\tif (currentOpenPopover?.getId() === id) {\n\t\t\t\t\tcurrentOpenPopover = null;\n\t\t\t\t}\n\t\t\t\trenderOverlay(false);\n\t\t\t};\n\t\t}, [id, renderOverlay]);\n\n\t\t// Update overlay when isOpen changes\n\t\tuseEffect(() => {\n\t\t\trenderOverlay(isOpen);\n\t\t}, [isOpen, renderOverlay]);\n\n\t\t// Render header\n\t\tconst renderHeader = () => {\n\t\t\tconst hasThemedHeader = variant === 'error' || variant === 'warning';\n\t\t\tconst hasDefinedHeader = heading || hasThemedHeader;\n\n\t\t\tif (\n\t\t\t\t!hasDefinedHeader ||\n\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\tvariant === 'feature'\n\t\t\t) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst headerIcon = {\n\t\t\t\terror: <Icon category=\"utility\" name=\"error\" size=\"x-small\" inverse />,\n\t\t\t\twarning: (\n\t\t\t\t\t<Icon category=\"utility\" name=\"warning\" size=\"x-small\" inverse />\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif (hasThemedHeader) {\n\t\t\t\treturn (\n\t\t\t\t\t<header className=\"slds-popover__header\">\n\t\t\t\t\t\t<MediaObject\n\t\t\t\t\t\t\tbody={\n\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\tclassName=\"slds-truncate slds-text-heading_medium\"\n\t\t\t\t\t\t\t\t\ttitle={typeof heading === 'string' ? heading : undefined}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfigure={headerIcon[variant as 'error' | 'warning']}\n\t\t\t\t\t\t\tverticalCenter\n\t\t\t\t\t\t/>\n\t\t\t\t\t</header>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<header\n\t\t\t\t\tclassName={classNames('slds-popover__header', {\n\t\t\t\t\t\t'slds-p-vertical_medium': variant === 'walkthrough',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<h2\n\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t\t'slds-text-heading_small': variant !== 'walkthrough',\n\t\t\t\t\t\t\t'slds-text-heading_medium': variant === 'walkthrough',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{heading}\n\t\t\t\t\t</h2>\n\t\t\t\t</header>\n\t\t\t);\n\t\t};\n\n\t\t// Render body\n\t\tconst renderBody = () => {\n\t\t\tif (variant === 'error' || variant === 'warning') {\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-popover__body',\n\t\t\t\t\t\t\tclassNameBody as string\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (variant === 'walkthrough-action' || variant === 'feature') {\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-popover__body',\n\t\t\t\t\t\t\tclassNameBody as string\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"slds-media\">\n\t\t\t\t\t\t\t<div className=\"slds-media__figure\">\n\t\t\t\t\t\t\t\t{variant === 'walkthrough-action' ? (\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"touch_action\"\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tinverse\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t\t{heading && (\n\t\t\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\t\t\tid={ariaLabelledby || `${id}-dialog-heading`}\n\t\t\t\t\t\t\t\t\t\tclassName=\"slds-text-heading_small\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{heading}\n\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{body}\n\t\t\t\t\t\t\t\t{stepText && (\n\t\t\t\t\t\t\t\t\t<p className=\"slds-m-top_medium slds-text-title\">\n\t\t\t\t\t\t\t\t\t\t{stepText}\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tid={`${id}-dialog-body`}\n\t\t\t\t\tclassName={classNames('slds-popover__body', classNameBody as string)}\n\t\t\t\t>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\t\t};\n\n\t\t// Render footer\n\t\tconst renderFooter = () => {\n\t\t\tconst footerClassNames = classNames(\n\t\t\t\t'slds-popover__footer',\n\t\t\t\tfooterClassName,\n\t\t\t\tclassNameFooter\n\t\t\t);\n\t\t\tconst footerStyles =\n\t\t\t\tfooterStyle || styleFooter\n\t\t\t\t\t? { ...footerStyle, ...styleFooter }\n\t\t\t\t\t: undefined;\n\n\t\t\tif (footer) {\n\t\t\t\treturn (\n\t\t\t\t\t<footer className={footerClassNames} style={footerStyles}>\n\t\t\t\t\t\t{footer}\n\t\t\t\t\t</footer>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tvariant !== 'walkthrough-action' &&\n\t\t\t\t(footerWalkthroughActions || stepText)\n\t\t\t) {\n\t\t\t\treturn (\n\t\t\t\t\t<footer className={footerClassNames} style={footerStyles}>\n\t\t\t\t\t\t<div className=\"slds-grid slds-grid_vertical-align-center\">\n\t\t\t\t\t\t\t{stepText && <span className=\"slds-text-title\">{stepText}</span>}\n\t\t\t\t\t\t\t{footerWalkthroughActions && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\t\t\t\t\tstyle={{ display: 'inline-block' }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{footerWalkthroughActions}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\n\t\t// Render dialog\n\t\tconst renderDialog = () => {\n\t\t\tif (!isOpen) return null;\n\n\t\t\tconst outsideClickIgnoreClass = `ignore-click-${id}`;\n\n\t\t\treturn (\n\t\t\t\t<Dialog\n\t\t\t\t\thasNubbin={!hasNoNubbin}\n\t\t\t\t\talign={align}\n\t\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\t\tcontentsClassName,\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t'slds-popover',\n\t\t\t\t\t\t{ 'slds-popover_error': variant === 'error' },\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-popover_walkthrough':\n\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-popover_walkthrough-alt': variant === 'walkthrough-action',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ 'slds-popover_feature': variant === 'feature' },\n\t\t\t\t\t\t{ 'slds-popover_warning': variant === 'warning' },\n\t\t\t\t\t\tclassNameDialog\n\t\t\t\t\t)}\n\t\t\t\t\tcontext={context}\n\t\t\t\t\thasStaticAlignment={hasStaticAlignment}\n\t\t\t\t\toffset={offset}\n\t\t\t\t\tonClose={handleDialogClose}\n\t\t\t\t\tonOpen={handleDialogOpen}\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\tonMouseEnter={openOn === 'hover' ? handleMouseEnter : undefined}\n\t\t\t\t\tonMouseLeave={openOn === 'hover' ? handleMouseLeave : undefined}\n\t\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\t\tonRequestTargetElement={getTargetElement}\n\t\t\t\t\tposition={position}\n\t\t\t\t\tstyle={styleDialog}\n\t\t\t\t\tvariant=\"popover\"\n\t\t\t\t\tref={setMenuRef}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tid: `${id}-popover`,\n\t\t\t\t\t\t'aria-labelledby': ariaLabelledby || `${id}-dialog-heading`,\n\t\t\t\t\t\t'aria-describedby': `${id}-dialog-body`,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{!hasNoCloseButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tassistiveText={{ icon: finalCloseButtonAssistiveText }}\n\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\ticonName=\"close\"\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t'slds-button slds-button_icon-small slds-float_right slds-popover__close slds-button_icon',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'slds-button_icon-inverse':\n\t\t\t\t\t\t\t\t\t\tvariant === 'walkthrough' ||\n\t\t\t\t\t\t\t\t\t\tvariant === 'walkthrough-action' ||\n\t\t\t\t\t\t\t\t\t\tvariant === 'feature',\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tonClick={handleCancel}\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\tinverse={variant === 'error' || variant === 'warning'}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{renderHeader()}\n\t\t\t\t\t{renderBody()}\n\t\t\t\t\t{renderFooter()}\n\t\t\t\t</Dialog>\n\t\t\t);\n\t\t};\n\n\t\t// Clone trigger element\n\t\tconst otherChildren: ReactNode[] = [];\n\t\tlet clonedTrigger: ReactNode = null;\n\n\t\tReact.Children.forEach(children, (child, index) => {\n\t\t\tif (index === 0 && React.isValidElement(child)) {\n\t\t\t\tconst childProps = child.props as Record<string, unknown>;\n\t\t\t\tconst triggerProps: Record<string, unknown> = {\n\t\t\t\t\t'aria-haspopup': 'dialog',\n\t\t\t\t\tid,\n\t\t\t\t\tonClick:\n\t\t\t\t\t\topenOn === 'click' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? (event: MouseEvent) => {\n\t\t\t\t\t\t\t\t\thandleClick(\n\t\t\t\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t\t\t\tchildProps.onClick as (e: MouseEvent) => void\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: childProps.onClick,\n\t\t\t\t\tonFocus: openOn === 'hover' ? handleFocus : undefined,\n\t\t\t\t\tonMouseDown,\n\t\t\t\t\tonMouseEnter:\n\t\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? handleMouseEnter\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tonMouseLeave:\n\t\t\t\t\t\topenOn === 'hover' || openOn === 'hybrid'\n\t\t\t\t\t\t\t? handleMouseLeave\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\ttabIndex: (childProps.tabIndex as number) || 0,\n\t\t\t\t};\n\t\t\t\tclonedTrigger = React.cloneElement(child, triggerProps);\n\t\t\t} else if (child) {\n\t\t\t\totherChildren.push(child);\n\t\t\t}\n\t\t});\n\n\t\tconst containerStyles: CSSProperties = {\n\t\t\tdisplay: hasNoTriggerStyles ? undefined : 'inline-block',\n\t\t\t...style,\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(triggerClassName, className) || undefined}\n\t\t\t\tstyle={containerStyles}\n\t\t\t\tref={setContainerRef}\n\t\t\t>\n\t\t\t\t{clonedTrigger}\n\t\t\t\t{otherChildren.length > 0 ? otherChildren : null}\n\t\t\t\t{renderDialog()}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nPopover.displayName = POPOVER;\n\nexport default Popover;\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAM,IAAkB,OAAO,WAAa,KAGtC,IAAU,IACb,SAAS,cAAc,MAAM,IAC5B,EAAE,OAAO,CAAC,EAAE;AACZ,MACH,EAAQ,MAAM,MAAM,KACpB,EAAQ,MAAM,OAAO,KACrB,EAAQ,MAAM,QAAQ,QACtB,EAAQ,MAAM,SAAS,QACvB,EAAQ,MAAM,WAAW;AAI1B,IAAI,IAMO,MA0LE,KAAyB;CACrC;CACA;CACA;CACA;CACA;CACA;AACD,GAEM,KAA6C,EAClD,aAAa,eACd,GAOM,IAAU,GAEd,EACC,WAAQ,SACR,eAAe,IACf,mBACA,cACA,SACA,kBACA,qBACA,oBACA,eACA,qBACA,uBAC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D,IACC,EAAW;IACf,SAAS,MAAW,UAAU,KAAc,KAAA;IAC5C;IACA,cACC,MAAW,WAAW,MAAW,WAC9B,KACA,KAAA;IACJ,cACC,MAAW,WAAW,MAAW,WAC9B,KACA,KAAA;IACJ,UAAW,EAAW,YAAuB;GAC9C;GACA,KAAgB,EAAM,aAAa,GAAO,CAAY;EACvD,OAAO,AAAI,KACV,EAAc,KAAK,CAAK;CAE1B,CAAC;CAED,IAAM,KAAiC;EACtC,SAAS,KAAqB,KAAA,IAAY;EAC1C,GAAG;CACJ;CAEA,OACC,kBAAC,OAAD;EACC,WAAW,EAAW,GAAkB,EAAS,KAAK,KAAA;EACtD,OAAO;EACP,KAAK;EAHN,UAAA;GAKE;GACA,EAAc,SAAS,IAAI,IAAgB;GAC3C,GAAa;EACV;;AAEP,CACD;AAEA,EAAQ,cAAc"}
@@ -1,7 +1,10 @@
1
- import e from "../../utilities/warning/incompatible-props.js";
1
+ import e from "../../utilities/get-component-doc.js";
2
+ import t from "../../utilities/warning/deprecated-property.js";
3
+ import n from "../../utilities/warning/incompatible-props.js";
2
4
  //#region components/progress-indicator/check-props.js
3
- var t = function() {};
4
- process.env.NODE_ENV !== "production" && (t = function(t, n) {
5
+ var r = function() {};
6
+ process.env.NODE_ENV !== "production" && (r = function(r, i, a) {
7
+ let o = e(a);
5
8
  [
6
9
  ["disabledSteps", null],
7
10
  ["errorSteps", null],
@@ -13,12 +16,12 @@ process.env.NODE_ENV !== "production" && (t = function(t, n) {
13
16
  "setup-assistant",
14
17
  "shade"
15
18
  ]]
16
- ].forEach(([r, i]) => {
17
- e(t, n, "type", ["path"], r, i, "Only `type=\"base\"` supports this prop.");
18
- });
19
+ ].forEach(([e, t]) => {
20
+ n(r, i, "type", ["path"], e, t, "Only `type=\"base\"` supports this prop.");
21
+ }), t(r, i.hasDeprecatedSetupAssistantAction || void 0, "steps[].onRenderSetupAssistantAction", "steps[].setupAssistantAction", o("steps"));
19
22
  });
20
- var n = t;
23
+ var i = r;
21
24
  //#endregion
22
- export { n as default };
25
+ export { i as default };
23
26
 
24
27
  //# sourceMappingURL=check-props.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/progress-indicator/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport incompatibleProps from '../../utilities/warning/incompatible-props';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props) {\n\t\tconst comment = 'Only `type=\"base\"` supports this prop.';\n\t\tconst baseOnlyProps = [\n\t\t\t['disabledSteps', null],\n\t\t\t['errorSteps', null],\n\t\t\t['orientation', ['vertical']],\n\t\t\t['tooltipIsOpenSteps', null],\n\t\t\t['tooltipPosition', null],\n\t\t\t['variant', ['modal', 'setup-assistant', 'shade']],\n\t\t];\n\n\t\tbaseOnlyProps.forEach(([propName, values]) => {\n\t\t\tincompatibleProps(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops,\n\t\t\t\t'type',\n\t\t\t\t['path'],\n\t\t\t\tpropName,\n\t\t\t\tvalues,\n\t\t\t\tcomment\n\t\t\t);\n\t\t});\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;AAMA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO;CAW1D;EARC,CAAC,iBAAiB,IAAI;EACtB,CAAC,cAAc,IAAI;EACnB,CAAC,eAAe,CAAC,UAAU,CAAC;EAC5B,CAAC,sBAAsB,IAAI;EAC3B,CAAC,mBAAmB,IAAI;EACxB,CAAC,WAAW;GAAC;GAAS;GAAmB;EAAO,CAAC;CAGlD,CAAA,CAAc,SAAS,CAAC,GAAU,OAAY;EAC7C,EACC,GACA,GACA,QACA,CAAC,MAAM,GACP,GACA,GACA,0CACD;CACD,CAAC;AACF;AAGD,IAAA,IAAe"}
1
+ {"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/progress-indicator/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\nimport incompatibleProps from '../../utilities/warning/incompatible-props';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\t\tconst comment = 'Only `type=\"base\"` supports this prop.';\n\t\tconst baseOnlyProps = [\n\t\t\t['disabledSteps', null],\n\t\t\t['errorSteps', null],\n\t\t\t['orientation', ['vertical']],\n\t\t\t['tooltipIsOpenSteps', null],\n\t\t\t['tooltipPosition', null],\n\t\t\t['variant', ['modal', 'setup-assistant', 'shade']],\n\t\t];\n\n\t\tbaseOnlyProps.forEach(([propName, values]) => {\n\t\t\tincompatibleProps(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops,\n\t\t\t\t'type',\n\t\t\t\t['path'],\n\t\t\t\tpropName,\n\t\t\t\tvalues,\n\t\t\t\tcomment\n\t\t\t);\n\t\t});\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.hasDeprecatedSetupAssistantAction || undefined,\n\t\t\t'steps[].onRenderSetupAssistantAction',\n\t\t\t'steps[].setupAssistantAction',\n\t\t\tcreateDocUrl('steps')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;AAQA,IAAI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,GAAO,GAAS;CACnE,IAAM,IAAe,EAAkB,CAAO;CAuB9C,AAZA;EARC,CAAC,iBAAiB,IAAI;EACtB,CAAC,cAAc,IAAI;EACnB,CAAC,eAAe,CAAC,UAAU,CAAC;EAC5B,CAAC,sBAAsB,IAAI;EAC3B,CAAC,mBAAmB,IAAI;EACxB,CAAC,WAAW;GAAC;GAAS;GAAmB;EAAO,CAAC;CAGlD,CAAA,CAAc,SAAS,CAAC,GAAU,OAAY;EAC7C,EACC,GACA,GACA,QACA,CAAC,MAAM,GACP,GACA,GACA,0CACD;CACD,CAAC,GAED,EACC,GACA,EAAM,qCAAqC,KAAA,GAC3C,wCACA,gCACA,EAAa,OAAO,CACrB;AACD;AAGD,IAAA,IAAe"}
@@ -0,0 +1,35 @@
1
+ //#region components/progress-indicator/component.json
2
+ var e = "progress-indicator", t = "prod", n = "ProgressIndicator", r = {
3
+ component: e,
4
+ status: t,
5
+ "display-name": "Progress Indicators",
6
+ classKey: n,
7
+ "SLDS-component-path": "/components/progress-indicator",
8
+ "last-accessibility-review": {
9
+ "date-iso-8601": "2018/07/25",
10
+ "commit-sha": "473c75bf424f69bf0ff66fde6b1e604c21d2835c"
11
+ },
12
+ "last-slds-markup-review": {
13
+ "date-iso-8601": "2018/07/25",
14
+ "commit-sha": "473c75bf424f69bf0ff66fde6b1e604c21d2835c"
15
+ },
16
+ "site-stories": [
17
+ {
18
+ heading: "Default",
19
+ path: "/__examples__/default.jsx"
20
+ },
21
+ {
22
+ heading: "Vertical",
23
+ path: "/__examples__/vertical.jsx"
24
+ },
25
+ {
26
+ heading: "Path",
27
+ path: "/__examples__/path.jsx"
28
+ }
29
+ ],
30
+ "url-slug": "progress-indicators"
31
+ };
32
+ //#endregion
33
+ export { n as classKey, e as component, r as default, t as status };
34
+
35
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","names":[],"sources":["../../../../components/progress-indicator/component.json"],"sourcesContent":["{\n\t\"component\": \"progress-indicator\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Progress Indicators\",\n\t\"classKey\": \"ProgressIndicator\",\n\t\"SLDS-component-path\": \"/components/progress-indicator\",\n\t\"last-accessibility-review\": {\n\t\t\"date-iso-8601\": \"2018/07/25\",\n\t\t\"commit-sha\": \"473c75bf424f69bf0ff66fde6b1e604c21d2835c\"\n\t},\n\t\"last-slds-markup-review\": {\n\t\t\"date-iso-8601\": \"2018/07/25\",\n\t\t\"commit-sha\": \"473c75bf424f69bf0ff66fde6b1e604c21d2835c\"\n\t},\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"Default\",\n\t\t\t\"path\": \"/__examples__/default.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Vertical\",\n\t\t\t\"path\": \"/__examples__/vertical.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Path\",\n\t\t\t\"path\": \"/__examples__/path.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"progress-indicators\"\n}\n"],"mappings":""}
@@ -1,14 +1,15 @@
1
1
  import { PROGRESS_INDICATOR as e } from "../../utilities/constants.js";
2
- import t from "./private/step.js";
3
- import n from "./private/progress.js";
4
- import r from "./private/step-vertical.js";
5
- import i from "./private/path.js";
6
- import a from "./check-props.js";
7
- import { useEffect as o, useId as s, useMemo as c } from "react";
8
- import { jsx as l } from "react/jsx-runtime";
9
- import u from "lodash.find";
2
+ import t from "./component.js";
3
+ import n from "./private/step.js";
4
+ import r from "./private/progress.js";
5
+ import i from "./private/step-vertical.js";
6
+ import a from "./private/path.js";
7
+ import o from "./check-props.js";
8
+ import { useEffect as s, useId as c, useMemo as l } from "react";
9
+ import { jsx as u } from "react/jsx-runtime";
10
+ import d from "lodash.find";
10
11
  //#region components/progress-indicator/index.tsx
11
- var d = [
12
+ var f = [
12
13
  {
13
14
  id: 0,
14
15
  label: "tooltip label #1"
@@ -29,96 +30,98 @@ var d = [
29
30
  id: 4,
30
31
  label: "tooltip label #5"
31
32
  }
32
- ], f = {
33
+ ], p = {
33
34
  completedStage: "Stage Complete",
34
35
  completedStep: "Completed",
35
36
  currentStage: "Current Stage:",
36
37
  disabledStep: "Disabled",
37
38
  errorStep: "Error",
38
39
  step: "Step"
39
- }, p = { stageNameBefore: "Stage: " };
40
- function m(e) {
40
+ }, m = { stageNameBefore: "Stage: " };
41
+ function h(e) {
41
42
  return e ? Array.isArray(e) && e.every((e) => e.label !== void 0) : !1;
42
43
  }
43
- function h(e, t) {
44
- return !e || !t ? !1 : !!u(Array.isArray(t) ? t : [t], (t) => t === e ? !0 : t.id !== void 0 && e.id !== void 0 ? t.id === e.id : JSON.stringify(t) === JSON.stringify(e));
44
+ function g(e, t) {
45
+ return !e || !t ? !1 : !!d(Array.isArray(t) ? t : [t], (t) => t === e ? !0 : t.id !== void 0 && e.id !== void 0 ? t.id === e.id : JSON.stringify(t) === JSON.stringify(e));
45
46
  }
46
- var g = ({ assistiveText: u, className: g, completedSteps: _ = [], disabledSteps: v, errorSteps: y, id: b, labels: x, orientation: S = "horizontal", onStepClick: C = () => {}, onStepFocus: w = () => {}, selectedStep: T, steps: E, tooltipIsOpenSteps: D, tooltipPosition: O, type: k = "base", variant: A = "base" }) => {
47
- let j = s(), M = b || j, N = {
48
- ...f,
49
- ...u
50
- }, P = m(E) ? E : d, F = !!v?.length, I = !!y?.length, L = !!D?.length;
51
- o(() => {
52
- a(e, {
53
- disabledSteps: F,
54
- errorSteps: I,
55
- orientation: S,
56
- tooltipIsOpenSteps: L,
57
- tooltipPosition: O,
58
- type: k,
59
- variant: A
60
- });
47
+ var _ = ({ assistiveText: d, className: _, completedSteps: v = [], disabledSteps: y, errorSteps: b, id: x, labels: S, orientation: C = "horizontal", onStepClick: w = () => {}, onStepFocus: T = () => {}, selectedStep: E, steps: D, tooltipIsOpenSteps: O, tooltipPosition: k, type: A = "base", variant: j = "base" }) => {
48
+ let M = c(), N = x || M, P = {
49
+ ...p,
50
+ ...d
51
+ }, F = h(D) ? D : f, I = !!y?.length, L = !!b?.length, R = !!O?.length, z = !!D?.some((e) => e?.onRenderSetupAssistantAction !== void 0);
52
+ s(() => {
53
+ o(e, {
54
+ disabledSteps: I,
55
+ errorSteps: L,
56
+ hasDeprecatedSetupAssistantAction: z,
57
+ orientation: C,
58
+ tooltipIsOpenSteps: R,
59
+ tooltipPosition: k,
60
+ type: A,
61
+ variant: j
62
+ }, t);
61
63
  }, [
62
- F,
63
64
  I,
64
65
  L,
65
- S,
66
- O,
66
+ z,
67
+ R,
68
+ C,
67
69
  k,
68
- A
70
+ A,
71
+ j
69
72
  ]);
70
- let R = c(() => {
73
+ let B = l(() => {
71
74
  let e = 0;
72
- for (let t = 0; t < P.length; t += 1) if (h(P[t], T)) {
75
+ for (let t = 0; t < F.length; t += 1) if (g(F[t], E)) {
73
76
  e = t;
74
77
  break;
75
78
  }
76
79
  return e;
77
- }, [P, T]);
78
- if (k === "path") return /* @__PURE__ */ l(i, {
79
- assistiveText: N,
80
- className: g,
81
- selectedIndex: R,
82
- id: M,
80
+ }, [F, E]);
81
+ if (A === "path") return /* @__PURE__ */ u(a, {
82
+ assistiveText: P,
83
+ className: _,
84
+ selectedIndex: B,
85
+ id: N,
83
86
  labels: {
84
- ...p,
85
- ...x
87
+ ...m,
88
+ ...S
86
89
  },
87
- onStepClick: C,
88
- onStepFocus: w,
89
- steps: P.map((e) => ({
90
- isCompleted: h(e, _),
91
- isSelected: h(e, T),
90
+ onStepClick: w,
91
+ onStepFocus: T,
92
+ steps: F.map((e) => ({
93
+ isCompleted: g(e, v),
94
+ isSelected: g(e, E),
92
95
  step: e
93
96
  }))
94
97
  });
95
- let z = v ?? [], B = y ?? [], V = R === 0 ? "0" : `${100 * (R / (P.length - 1))}`, H = A === "setup-assistant" ? "vertical" : S, U = O || (A === "modal" ? "absolute" : "overflowBoundaryElement"), W = H === "vertical" ? r : t;
96
- return /* @__PURE__ */ l(n, {
97
- assistiveText: N,
98
- id: M,
99
- orientation: H,
100
- value: V,
101
- variant: A,
102
- className: g,
103
- children: P.map((e, t) => /* @__PURE__ */ l(W, {
104
- assistiveText: N,
105
- id: M,
98
+ let V = y ?? [], H = b ?? [], U = B === 0 ? "0" : `${100 * (B / (F.length - 1))}`, W = j === "setup-assistant" ? "vertical" : C, G = k || (j === "modal" ? "absolute" : "overflowBoundaryElement"), K = W === "vertical" ? i : n;
99
+ return /* @__PURE__ */ u(r, {
100
+ assistiveText: P,
101
+ id: N,
102
+ orientation: W,
103
+ value: U,
104
+ variant: j,
105
+ className: _,
106
+ children: F.map((e, t) => /* @__PURE__ */ u(K, {
107
+ assistiveText: P,
108
+ id: N,
106
109
  index: t,
107
- isSelected: h(e, T),
108
- isDisabled: h(e, z),
109
- isError: h(e, B),
110
- isCompleted: h(e, _),
111
- onClick: C,
112
- onFocus: w,
110
+ isSelected: g(e, E),
111
+ isDisabled: g(e, V),
112
+ isError: g(e, H),
113
+ isCompleted: g(e, v),
114
+ onClick: w,
115
+ onFocus: T,
113
116
  step: e,
114
- tooltipIsOpen: h(e, D),
115
- tooltipPosition: U,
116
- variant: A
117
- }, `${M}-${e.id}`))
117
+ tooltipIsOpen: g(e, O),
118
+ tooltipPosition: G,
119
+ variant: j
120
+ }, `${N}-${e.id}`))
118
121
  });
119
122
  };
120
- g.displayName = e;
123
+ _.displayName = e;
121
124
  //#endregion
122
- export { g as default };
125
+ export { _ as default };
123
126
 
124
127
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../components/progress-indicator/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useEffect, useId, useMemo } from 'react';\nimport find from 'lodash.find';\nimport { PROGRESS_INDICATOR } from '../../utilities/constants';\n\n// Child components\nimport Step from './private/step';\nimport Progress from './private/progress';\nimport StepVertical from './private/step-vertical';\nimport Path from './private/path';\n\n// This component's `checkProps` which issues warnings to developers about properties when in development mode\nimport checkProps from './check-props';\n\n/**\n * Progress indicator orientation\n */\nexport type ProgressIndicatorOrientation = 'horizontal' | 'vertical';\n\n/**\n * Progress indicator type\n */\nexport type ProgressIndicatorType = 'base' | 'path';\n\n/**\n * Progress indicator variant\n */\nexport type ProgressIndicatorVariant =\n\t'base' | 'modal' | 'setup-assistant' | 'shade';\n\n/**\n * Tooltip position\n */\nexport type TooltipPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Step object structure\n */\nexport interface ProgressStep {\n\t/** Unique identifier */\n\tid: string | number;\n\t/** Tooltip label */\n\tlabel: string;\n\t/** Optional assistive text override */\n\tassistiveText?: string;\n}\n\n/**\n * Assistive text for ProgressIndicator\n */\nexport interface ProgressIndicatorAssistiveText {\n\t/** `type=\"path\"` only: read before a completed stage's name. Defaults to `Stage Complete` */\n\tcompletedStage?: string;\n\t/** Label for completed steps */\n\tcompletedStep?: string;\n\t/** `type=\"path\"` only: read before the current stage's name. Defaults to `Current Stage:` */\n\tcurrentStage?: string;\n\t/** Label for disabled steps */\n\tdisabledStep?: string;\n\t/** Label for error steps */\n\terrorStep?: string;\n\t/** Label for progress percentage */\n\tpercentage?: string;\n\t/** Label prefix for steps */\n\tstep?: string;\n}\n\n/**\n * Text labels for ProgressIndicator\n */\nexport interface ProgressIndicatorLabels {\n\t/** `type=\"path\"` only: text before the current stage's name, which shows when the path collapses on narrow screens. Include any spacing between it and the name. Defaults to `Stage: ` */\n\tstageNameBefore?: React.ReactNode;\n\t/** `type=\"path\"` only: text after the current stage's name. Include any spacing between it and the name. */\n\tstageNameAfter?: React.ReactNode;\n}\n\n/**\n * Step event data\n */\nexport interface StepEventData {\n\tisCompleted: boolean;\n\tisDisabled: boolean;\n\tisError: boolean;\n\tisSelected: boolean;\n\tstep: ProgressStep;\n}\n\n/**\n * Props for the ProgressIndicator component\n */\nexport interface ProgressIndicatorProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ProgressIndicatorAssistiveText;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Array of completed step objects */\n\tcompletedSteps?: ProgressStep[];\n\t/** Array of disabled step objects. `type=\"base\"` only. */\n\tdisabledSteps?: ProgressStep[];\n\t/** Array of error step objects. `type=\"base\"` only. */\n\terrorSteps?: ProgressStep[];\n\t/** HTML id attribute */\n\tid?: string;\n\t/** **Text labels for internationalization** */\n\tlabels?: ProgressIndicatorLabels;\n\t/** Orientation (horizontal or vertical). `type=\"base\"` only. */\n\torientation?: ProgressIndicatorOrientation;\n\t/** Click handler for steps */\n\tonStepClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: StepEventData\n\t) => void;\n\t/** Focus handler for steps */\n\tonStepFocus?: (event: React.FocusEvent, data: StepEventData) => void;\n\t/** Currently selected step */\n\tselectedStep: ProgressStep;\n\t/** Array of all steps */\n\tsteps: ProgressStep[];\n\t/** Steps with open tooltips (for development). `type=\"base\"` only. */\n\ttooltipIsOpenSteps?: ProgressStep[];\n\t/** Tooltip position strategy. `type=\"base\"` only. */\n\ttooltipPosition?: TooltipPosition;\n\t/**\n\t * Visual pattern, like `type` on `lightning-progress-indicator`:\n\t * * `base` - (default) Step markers on a progress bar, with each step's label in a tooltip.\n\t * * `path` - SLDS Path, with each step's label shown in its stage. Use the arrow keys to move between stages. Completion comes from `completedSteps`; error, disabled, and tooltip props aren't supported.\n\t */\n\ttype?: ProgressIndicatorType;\n\t/**\n\t * Component variant. `type=\"base\"` only.\n\t * * `base` - (default) For white backgrounds.\n\t * * `shade` - For shaded backgrounds. Adds a light gray border to the step markers, like `variant=\"shade\"` on `lightning-progress-indicator`.\n\t * * `modal` - The `shade` styling, with tooltips positioned for a modal footer.\n\t * * `setup-assistant` - Vertical steps with a bordered list, for Setup Assistant.\n\t */\n\tvariant?: ProgressIndicatorVariant;\n}\n\nconst defaultSteps: ProgressStep[] = [\n\t{ id: 0, label: 'tooltip label #1' },\n\t{ id: 1, label: 'tooltip label #2' },\n\t{ id: 2, label: 'tooltip label #3' },\n\t{ id: 3, label: 'tooltip label #4' },\n\t{ id: 4, label: 'tooltip label #5' },\n];\n\nconst defaultAssistiveText: ProgressIndicatorAssistiveText = {\n\tcompletedStage: 'Stage Complete',\n\tcompletedStep: 'Completed',\n\tcurrentStage: 'Current Stage:',\n\tdisabledStep: 'Disabled',\n\terrorStep: 'Error',\n\tstep: 'Step',\n};\n\nconst defaultLabels: ProgressIndicatorLabels = {\n\tstageNameBefore: 'Stage: ',\n};\n\n/**\n * Check if steps prop is valid\n */\nfunction checkSteps(steps?: ProgressStep[]): boolean {\n\tif (!steps) return false;\n\treturn (\n\t\tArray.isArray(steps) && steps.every((step) => step.label !== undefined)\n\t);\n}\n\n/**\n * Check if an item exists in an array of items\n */\nfunction findStep(\n\titem: ProgressStep | undefined,\n\titems: ProgressStep | ProgressStep[] | undefined\n): boolean {\n\tif (!item || !items) return false;\n\n\tconst itemsArray = !Array.isArray(items) ? [items] : items;\n\n\treturn Boolean(\n\t\tfind(itemsArray, (arrayItem) => {\n\t\t\tif (arrayItem === item) return true;\n\t\t\tif (arrayItem.id !== undefined && item.id !== undefined) {\n\t\t\t\treturn arrayItem.id === item.id;\n\t\t\t}\n\t\t\treturn JSON.stringify(arrayItem) === JSON.stringify(item);\n\t\t})\n\t);\n}\n\n/**\n * Progress Indicator communicates to the user the progress of a particular process.\n */\nconst ProgressIndicator = ({\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tcompletedSteps = [],\n\tdisabledSteps: propDisabledSteps,\n\terrorSteps: propErrorSteps,\n\tid: propId,\n\tlabels: propLabels,\n\torientation: propOrientation = 'horizontal',\n\tonStepClick = () => {},\n\tonStepFocus = () => {},\n\tselectedStep,\n\tsteps: propSteps,\n\ttooltipIsOpenSteps,\n\ttooltipPosition: propTooltipPosition,\n\ttype = 'base',\n\tvariant = 'base',\n}: ProgressIndicatorProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst allSteps = checkSteps(propSteps) ? propSteps : defaultSteps;\n\n\t// Check props in development. Pass whether each step array has items, not the array itself, so that\n\t// an empty array doesn't count as passed and a new array on each render doesn't re-run the check.\n\tconst hasDisabledSteps = Boolean(propDisabledSteps?.length);\n\tconst hasErrorSteps = Boolean(propErrorSteps?.length);\n\tconst hasTooltipIsOpenSteps = Boolean(tooltipIsOpenSteps?.length);\n\tuseEffect(() => {\n\t\tcheckProps(PROGRESS_INDICATOR, {\n\t\t\tdisabledSteps: hasDisabledSteps,\n\t\t\terrorSteps: hasErrorSteps,\n\t\t\torientation: propOrientation,\n\t\t\ttooltipIsOpenSteps: hasTooltipIsOpenSteps,\n\t\t\ttooltipPosition: propTooltipPosition,\n\t\t\ttype,\n\t\t\tvariant,\n\t\t});\n\t}, [\n\t\thasDisabledSteps,\n\t\thasErrorSteps,\n\t\thasTooltipIsOpenSteps,\n\t\tpropOrientation,\n\t\tpropTooltipPosition,\n\t\ttype,\n\t\tvariant,\n\t]);\n\n\t// Find current step index\n\tconst currentStepIndex = useMemo(() => {\n\t\tlet index = 0;\n\t\tfor (let i = 0; i < allSteps.length; i += 1) {\n\t\t\tif (findStep(allSteps[i], selectedStep)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}, [allSteps, selectedStep]);\n\n\tif (type === 'path') {\n\t\treturn (\n\t\t\t<Path\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tclassName={className}\n\t\t\t\tselectedIndex={currentStepIndex}\n\t\t\t\tid={id}\n\t\t\t\tlabels={{ ...defaultLabels, ...propLabels }}\n\t\t\t\tonStepClick={onStepClick}\n\t\t\t\tonStepFocus={onStepFocus}\n\t\t\t\tsteps={allSteps.map((step) => ({\n\t\t\t\t\tisCompleted: findStep(step, completedSteps),\n\t\t\t\t\tisSelected: findStep(step, selectedStep),\n\t\t\t\t\tstep,\n\t\t\t\t}))}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst disabledSteps = propDisabledSteps ?? [];\n\tconst errorSteps = propErrorSteps ?? [];\n\n\t// Calculate progress value\n\tconst progressValue =\n\t\tcurrentStepIndex === 0\n\t\t\t? '0'\n\t\t\t: `${100 * (currentStepIndex / (allSteps.length - 1))}`;\n\n\t// Determine orientation\n\tconst orientation =\n\t\tvariant === 'setup-assistant' ? 'vertical' : propOrientation;\n\n\t// Determine tooltip position\n\tconst tooltipPosition =\n\t\tpropTooltipPosition ||\n\t\t(variant === 'modal' ? 'absolute' : 'overflowBoundaryElement');\n\n\t// Select step component based on orientation\n\tconst StepComponent = (\n\t\torientation === 'vertical' ? StepVertical : Step\n\t) as React.ComponentType<\n\t\tReact.ComponentProps<typeof Step> &\n\t\t\tReact.ComponentProps<typeof StepVertical>\n\t>;\n\n\treturn (\n\t\t<Progress\n\t\t\tassistiveText={assistiveText}\n\t\t\tid={id}\n\t\t\torientation={orientation}\n\t\t\tvalue={progressValue}\n\t\t\tvariant={variant}\n\t\t\tclassName={className}\n\t\t>\n\t\t\t{allSteps.map((step, i) => (\n\t\t\t\t<StepComponent\n\t\t\t\t\tkey={`${id}-${step.id}`}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\tid={id}\n\t\t\t\t\tindex={i}\n\t\t\t\t\tisSelected={findStep(step, selectedStep)}\n\t\t\t\t\tisDisabled={findStep(step, disabledSteps)}\n\t\t\t\t\tisError={findStep(step, errorSteps)}\n\t\t\t\t\tisCompleted={findStep(step, completedSteps)}\n\t\t\t\t\tonClick={onStepClick}\n\t\t\t\t\tonFocus={onStepFocus}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttooltipIsOpen={findStep(step, tooltipIsOpenSteps)}\n\t\t\t\t\ttooltipPosition={tooltipPosition}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</Progress>\n\t);\n};\n\nProgressIndicator.displayName = PROGRESS_INDICATOR;\n\nexport default ProgressIndicator;\n"],"mappings":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+ {"version":3,"file":"index.js","names":[],"sources":["../../../../components/progress-indicator/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useEffect, useId, useMemo, type ReactNode } from 'react';\nimport find from 'lodash.find';\nimport { PROGRESS_INDICATOR } from '../../utilities/constants';\nimport componentDoc from './component.json';\n\n// Child components\nimport Step from './private/step';\nimport Progress from './private/progress';\nimport StepVertical from './private/step-vertical';\nimport Path from './private/path';\n\n// This component's `checkProps` which issues warnings to developers about properties when in development mode\nimport checkProps from './check-props';\n\n/**\n * Progress indicator orientation\n */\nexport type ProgressIndicatorOrientation = 'horizontal' | 'vertical';\n\n/**\n * Progress indicator type\n */\nexport type ProgressIndicatorType = 'base' | 'path';\n\n/**\n * Progress indicator variant\n */\nexport type ProgressIndicatorVariant =\n\t'base' | 'modal' | 'setup-assistant' | 'shade';\n\n/**\n * Tooltip position\n */\nexport type TooltipPosition =\n\t'absolute' | 'overflowBoundaryElement' | 'relative';\n\n/**\n * Step object structure\n */\nexport interface ProgressStep {\n\t/** Unique identifier */\n\tid: string | number;\n\t/** Tooltip label */\n\tlabel: string;\n\t/** Optional assistive text override */\n\tassistiveText?: string;\n\t/** Action shown next to the step label. Only used by the `setup-assistant` variant. */\n\tsetupAssistantAction?: ReactNode;\n\t/** Estimated time shown next to the step label. Only used by the `setup-assistant` variant. */\n\tsetupAssistantEstimatedTime?: ReactNode;\n\t/** @deprecated Use `setupAssistantAction` instead. */\n\tonRenderSetupAssistantAction?: ReactNode;\n}\n\n/**\n * Assistive text for ProgressIndicator\n */\nexport interface ProgressIndicatorAssistiveText {\n\t/** `type=\"path\"` only: read before a completed stage's name. Defaults to `Stage Complete` */\n\tcompletedStage?: string;\n\t/** Label for completed steps */\n\tcompletedStep?: string;\n\t/** `type=\"path\"` only: read before the current stage's name. Defaults to `Current Stage:` */\n\tcurrentStage?: string;\n\t/** Label for disabled steps */\n\tdisabledStep?: string;\n\t/** Label for error steps */\n\terrorStep?: string;\n\t/** Label for progress percentage */\n\tpercentage?: string;\n\t/** Label prefix for steps */\n\tstep?: string;\n}\n\n/**\n * Text labels for ProgressIndicator\n */\nexport interface ProgressIndicatorLabels {\n\t/** `type=\"path\"` only: text before the current stage's name, which shows when the path collapses on narrow screens. Include any spacing between it and the name. Defaults to `Stage: ` */\n\tstageNameBefore?: React.ReactNode;\n\t/** `type=\"path\"` only: text after the current stage's name. Include any spacing between it and the name. */\n\tstageNameAfter?: React.ReactNode;\n}\n\n/**\n * Step event data\n */\nexport interface StepEventData {\n\tisCompleted: boolean;\n\tisDisabled: boolean;\n\tisError: boolean;\n\tisSelected: boolean;\n\tstep: ProgressStep;\n}\n\n/**\n * Props for the ProgressIndicator component\n */\nexport interface ProgressIndicatorProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ProgressIndicatorAssistiveText;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Array of completed step objects */\n\tcompletedSteps?: ProgressStep[];\n\t/** Array of disabled step objects. `type=\"base\"` only. */\n\tdisabledSteps?: ProgressStep[];\n\t/** Array of error step objects. `type=\"base\"` only. */\n\terrorSteps?: ProgressStep[];\n\t/** HTML id attribute */\n\tid?: string;\n\t/** **Text labels for internationalization** */\n\tlabels?: ProgressIndicatorLabels;\n\t/** Orientation (horizontal or vertical). `type=\"base\"` only. */\n\torientation?: ProgressIndicatorOrientation;\n\t/** Click handler for steps */\n\tonStepClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: StepEventData\n\t) => void;\n\t/** Focus handler for steps */\n\tonStepFocus?: (event: React.FocusEvent, data: StepEventData) => void;\n\t/** Currently selected step */\n\tselectedStep: ProgressStep;\n\t/** Array of all steps */\n\tsteps: ProgressStep[];\n\t/** Steps with open tooltips (for development). `type=\"base\"` only. */\n\ttooltipIsOpenSteps?: ProgressStep[];\n\t/** Tooltip position strategy. `type=\"base\"` only. */\n\ttooltipPosition?: TooltipPosition;\n\t/**\n\t * Visual pattern, like `type` on `lightning-progress-indicator`:\n\t * * `base` - (default) Step markers on a progress bar, with each step's label in a tooltip.\n\t * * `path` - SLDS Path, with each step's label shown in its stage. Use the arrow keys to move between stages. Completion comes from `completedSteps`; error, disabled, and tooltip props aren't supported.\n\t */\n\ttype?: ProgressIndicatorType;\n\t/**\n\t * Component variant. `type=\"base\"` only.\n\t * * `base` - (default) For white backgrounds.\n\t * * `shade` - For shaded backgrounds. Adds a light gray border to the step markers, like `variant=\"shade\"` on `lightning-progress-indicator`.\n\t * * `modal` - The `shade` styling, with tooltips positioned for a modal footer.\n\t * * `setup-assistant` - Vertical steps with a bordered list, for Setup Assistant.\n\t */\n\tvariant?: ProgressIndicatorVariant;\n}\n\nconst defaultSteps: ProgressStep[] = [\n\t{ id: 0, label: 'tooltip label #1' },\n\t{ id: 1, label: 'tooltip label #2' },\n\t{ id: 2, label: 'tooltip label #3' },\n\t{ id: 3, label: 'tooltip label #4' },\n\t{ id: 4, label: 'tooltip label #5' },\n];\n\nconst defaultAssistiveText: ProgressIndicatorAssistiveText = {\n\tcompletedStage: 'Stage Complete',\n\tcompletedStep: 'Completed',\n\tcurrentStage: 'Current Stage:',\n\tdisabledStep: 'Disabled',\n\terrorStep: 'Error',\n\tstep: 'Step',\n};\n\nconst defaultLabels: ProgressIndicatorLabels = {\n\tstageNameBefore: 'Stage: ',\n};\n\n/**\n * Check if steps prop is valid\n */\nfunction checkSteps(steps?: ProgressStep[]): boolean {\n\tif (!steps) return false;\n\treturn (\n\t\tArray.isArray(steps) && steps.every((step) => step.label !== undefined)\n\t);\n}\n\n/**\n * Check if an item exists in an array of items\n */\nfunction findStep(\n\titem: ProgressStep | undefined,\n\titems: ProgressStep | ProgressStep[] | undefined\n): boolean {\n\tif (!item || !items) return false;\n\n\tconst itemsArray = !Array.isArray(items) ? [items] : items;\n\n\treturn Boolean(\n\t\tfind(itemsArray, (arrayItem) => {\n\t\t\tif (arrayItem === item) return true;\n\t\t\tif (arrayItem.id !== undefined && item.id !== undefined) {\n\t\t\t\treturn arrayItem.id === item.id;\n\t\t\t}\n\t\t\treturn JSON.stringify(arrayItem) === JSON.stringify(item);\n\t\t})\n\t);\n}\n\n/**\n * Progress Indicator communicates to the user the progress of a particular process.\n */\nconst ProgressIndicator = ({\n\tassistiveText: propAssistiveText,\n\tclassName,\n\tcompletedSteps = [],\n\tdisabledSteps: propDisabledSteps,\n\terrorSteps: propErrorSteps,\n\tid: propId,\n\tlabels: propLabels,\n\torientation: propOrientation = 'horizontal',\n\tonStepClick = () => {},\n\tonStepFocus = () => {},\n\tselectedStep,\n\tsteps: propSteps,\n\ttooltipIsOpenSteps,\n\ttooltipPosition: propTooltipPosition,\n\ttype = 'base',\n\tvariant = 'base',\n}: ProgressIndicatorProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\tconst allSteps = checkSteps(propSteps) ? propSteps : defaultSteps;\n\n\t// Check props in development. Pass whether each step array has items, not the array itself, so that\n\t// an empty array doesn't count as passed and a new array on each render doesn't re-run the check.\n\tconst hasDisabledSteps = Boolean(propDisabledSteps?.length);\n\tconst hasErrorSteps = Boolean(propErrorSteps?.length);\n\tconst hasTooltipIsOpenSteps = Boolean(tooltipIsOpenSteps?.length);\n\tconst hasDeprecatedSetupAssistantAction = Boolean(\n\t\tpropSteps?.some((step) => step?.onRenderSetupAssistantAction !== undefined)\n\t);\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tPROGRESS_INDICATOR,\n\t\t\t{\n\t\t\t\tdisabledSteps: hasDisabledSteps,\n\t\t\t\terrorSteps: hasErrorSteps,\n\t\t\t\thasDeprecatedSetupAssistantAction,\n\t\t\t\torientation: propOrientation,\n\t\t\t\ttooltipIsOpenSteps: hasTooltipIsOpenSteps,\n\t\t\t\ttooltipPosition: propTooltipPosition,\n\t\t\t\ttype,\n\t\t\t\tvariant,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\t}, [\n\t\thasDisabledSteps,\n\t\thasErrorSteps,\n\t\thasDeprecatedSetupAssistantAction,\n\t\thasTooltipIsOpenSteps,\n\t\tpropOrientation,\n\t\tpropTooltipPosition,\n\t\ttype,\n\t\tvariant,\n\t]);\n\n\t// Find current step index\n\tconst currentStepIndex = useMemo(() => {\n\t\tlet index = 0;\n\t\tfor (let i = 0; i < allSteps.length; i += 1) {\n\t\t\tif (findStep(allSteps[i], selectedStep)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}, [allSteps, selectedStep]);\n\n\tif (type === 'path') {\n\t\treturn (\n\t\t\t<Path\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tclassName={className}\n\t\t\t\tselectedIndex={currentStepIndex}\n\t\t\t\tid={id}\n\t\t\t\tlabels={{ ...defaultLabels, ...propLabels }}\n\t\t\t\tonStepClick={onStepClick}\n\t\t\t\tonStepFocus={onStepFocus}\n\t\t\t\tsteps={allSteps.map((step) => ({\n\t\t\t\t\tisCompleted: findStep(step, completedSteps),\n\t\t\t\t\tisSelected: findStep(step, selectedStep),\n\t\t\t\t\tstep,\n\t\t\t\t}))}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst disabledSteps = propDisabledSteps ?? [];\n\tconst errorSteps = propErrorSteps ?? [];\n\n\t// Calculate progress value\n\tconst progressValue =\n\t\tcurrentStepIndex === 0\n\t\t\t? '0'\n\t\t\t: `${100 * (currentStepIndex / (allSteps.length - 1))}`;\n\n\t// Determine orientation\n\tconst orientation =\n\t\tvariant === 'setup-assistant' ? 'vertical' : propOrientation;\n\n\t// Determine tooltip position\n\tconst tooltipPosition =\n\t\tpropTooltipPosition ||\n\t\t(variant === 'modal' ? 'absolute' : 'overflowBoundaryElement');\n\n\t// Select step component based on orientation\n\tconst StepComponent = (\n\t\torientation === 'vertical' ? StepVertical : Step\n\t) as React.ComponentType<\n\t\tReact.ComponentProps<typeof Step> &\n\t\t\tReact.ComponentProps<typeof StepVertical>\n\t>;\n\n\treturn (\n\t\t<Progress\n\t\t\tassistiveText={assistiveText}\n\t\t\tid={id}\n\t\t\torientation={orientation}\n\t\t\tvalue={progressValue}\n\t\t\tvariant={variant}\n\t\t\tclassName={className}\n\t\t>\n\t\t\t{allSteps.map((step, i) => (\n\t\t\t\t<StepComponent\n\t\t\t\t\tkey={`${id}-${step.id}`}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\tid={id}\n\t\t\t\t\tindex={i}\n\t\t\t\t\tisSelected={findStep(step, selectedStep)}\n\t\t\t\t\tisDisabled={findStep(step, disabledSteps)}\n\t\t\t\t\tisError={findStep(step, errorSteps)}\n\t\t\t\t\tisCompleted={findStep(step, completedSteps)}\n\t\t\t\t\tonClick={onStepClick}\n\t\t\t\t\tonFocus={onStepFocus}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttooltipIsOpen={findStep(step, tooltipIsOpenSteps)}\n\t\t\t\t\ttooltipPosition={tooltipPosition}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</Progress>\n\t);\n};\n\nProgressIndicator.displayName = PROGRESS_INDICATOR;\n\nexport default ProgressIndicator;\n"],"mappings":";;;;;;;;;;;AAqJA,IAAM,IAA+B;CACpC;EAAE,IAAI;EAAG,OAAO;CAAmB;CACnC;EAAE,IAAI;EAAG,OAAO;CAAmB;CACnC;EAAE,IAAI;EAAG,OAAO;CAAmB;CACnC;EAAE,IAAI;EAAG,OAAO;CAAmB;CACnC;EAAE,IAAI;EAAG,OAAO;CAAmB;AACpC,GAEM,IAAuD;CAC5D,gBAAgB;CAChB,eAAe;CACf,cAAc;CACd,cAAc;CACd,WAAW;CACX,MAAM;AACP,GAEM,IAAyC,EAC9C,iBAAiB,UAClB;AAKA,SAAS,EAAW,GAAiC;CAEpD,OADK,IAEJ,MAAM,QAAQ,CAAK,K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AY,CAAC;CAE3B,IAAI,MAAS,QACZ,OACC,kBAAC,GAAD;EACgB;EACJ;EACX,eAAe;EACX;EACJ,QAAQ;GAAE,GAAG;GAAe,GAAG;EAAW;EAC7B;EACA;EACb,OAAO,EAAS,KAAK,OAAU;GAC9B,aAAa,EAAS,GAAM,CAAc;GAC1C,YAAY,EAAS,GAAM,CAAY;GACvC;EACD,EAAE;CACF,CAAA;CAIH,IAAM,IAAgB,KAAqB,CAAC,GACtC,IAAa,KAAkB,CAAC,GAGhC,IACL,MAAqB,IAClB,MACA,GAAG,OAAO,KAAoB,EAAS,SAAS,OAG9C,IACL,MAAY,oBAAoB,aAAa,GAGxC,IACL,MACC,MAAY,UAAU,aAAa,4BAG/B,IACL,MAAgB,aAAa,IAAe;CAM7C,OACC,kBAAC,GAAD;EACgB;EACX;EACS;EACb,OAAO;EACE;EACE;EAEV,UAAA,EAAS,KAAK,GAAM,MACpB,kBAAC,GAAD;GAEgB;GACX;GACJ,OAAO;GACP,YAAY,EAAS,GAAM,CAAY;GACvC,YAAY,EAAS,GAAM,CAAa;GACxC,SAAS,EAAS,GAAM,CAAU;GAClC,aAAa,EAAS,GAAM,CAAc;GAC1C,SAAS;GACT,SAAS;GACH;GACN,eAAe,EAAS,GAAM,CAAkB;GAC/B;GACR;EACT,GAdK,GAAG,EAAG,GAAG,EAAK,IAcnB,CACD;CACQ,CAAA;AAEZ;AAEA,EAAkB,cAAc"}
@@ -48,27 +48,30 @@ var o = e, s = class extends n.Component {
48
48
  })]
49
49
  });
50
50
  };
51
- renderStepContent = () => this.props.step.onRenderSetupAssistantAction || this.props.step.setupAssistantEstimatedTime ? /* @__PURE__ */ a("div", {
52
- id: `progress-indicator-vertical-label-${this.props.step.id || this.props.index}`,
53
- className: "slds-progress__item_content slds-grid slds-grid_align-spread",
54
- children: [/* @__PURE__ */ i("div", {
55
- className: "slds-size_3-of-4",
51
+ renderStepContent = () => {
52
+ let e = this.props.step.setupAssistantAction ?? this.props.step.onRenderSetupAssistantAction;
53
+ return e || this.props.step.setupAssistantEstimatedTime ? /* @__PURE__ */ a("div", {
54
+ id: `progress-indicator-vertical-label-${this.props.step.id || this.props.index}`,
55
+ className: "slds-progress__item_content slds-grid slds-grid_align-spread",
56
+ children: [/* @__PURE__ */ i("div", {
57
+ className: "slds-size_3-of-4",
58
+ children: this.props.step.label
59
+ }), /* @__PURE__ */ i("div", {
60
+ className: "slds-grid slds-grid_align-end slds-size_1-of-4",
61
+ children: /* @__PURE__ */ a("div", {
62
+ className: "slds-media__figure slds-media__figure_reverse",
63
+ children: [e, this.props.step.setupAssistantEstimatedTime && /* @__PURE__ */ i("p", {
64
+ className: "slds-text-align_right slds-text-color_weak slds-p-top_medium",
65
+ children: this.props.step.setupAssistantEstimatedTime
66
+ })]
67
+ })
68
+ })]
69
+ }) : /* @__PURE__ */ i("div", {
70
+ id: `progress-indicator-vertical-label-${this.props.step.id || this.props.index}`,
71
+ className: "slds-progress__item_content slds-grid slds-grid_align-spread",
56
72
  children: this.props.step.label
57
- }), /* @__PURE__ */ i("div", {
58
- className: "slds-grid slds-grid_align-end slds-size_1-of-4",
59
- children: /* @__PURE__ */ a("div", {
60
- className: "slds-media__figure slds-media__figure_reverse",
61
- children: [this.props.step.onRenderSetupAssistantAction, this.props.step.setupAssistantEstimatedTime && /* @__PURE__ */ i("p", {
62
- className: "slds-text-align_right slds-text-color_weak slds-p-top_medium",
63
- children: this.props.step.setupAssistantEstimatedTime
64
- })]
65
- })
66
- })]
67
- }) : /* @__PURE__ */ i("div", {
68
- id: `progress-indicator-vertical-label-${this.props.step.id || this.props.index}`,
69
- className: "slds-progress__item_content slds-grid slds-grid_align-spread",
70
- children: this.props.step.label
71
- });
73
+ });
74
+ };
72
75
  render() {
73
76
  let e = this.props.isCompleted || this.props.isError, t = "";
74
77
  return this.props.isError ? t = this.props.assistiveText?.errorStep || "" : this.props.isCompleted ? t = this.props.assistiveText?.completedStep || "" : this.props.isDisabled && (t = this.props.assistiveText?.disabledStep || ""), /* @__PURE__ */ a("li", {