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

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 (538) hide show
  1. package/README.md +112 -70
  2. package/dist/cjs/components/accordion/index.cjs +1 -1
  3. package/dist/cjs/components/accordion/index.cjs.map +1 -1
  4. package/dist/cjs/components/alert/index.cjs +1 -1
  5. package/dist/cjs/components/alert/index.cjs.map +1 -1
  6. package/dist/cjs/components/avatar/index.cjs +1 -1
  7. package/dist/cjs/components/avatar/index.cjs.map +1 -1
  8. package/dist/cjs/components/badge/index.cjs +1 -1
  9. package/dist/cjs/components/badge/index.cjs.map +1 -1
  10. package/dist/cjs/components/breadcrumb/index.cjs +1 -1
  11. package/dist/cjs/components/breadcrumb/index.cjs.map +1 -1
  12. package/dist/cjs/components/builder-header/index.cjs +1 -1
  13. package/dist/cjs/components/builder-header/index.cjs.map +1 -1
  14. package/dist/cjs/components/button/index.cjs +1 -1
  15. package/dist/cjs/components/button/index.cjs.map +1 -1
  16. package/dist/cjs/components/button-group/index.cjs +1 -1
  17. package/dist/cjs/components/button-group/index.cjs.map +1 -1
  18. package/dist/cjs/components/button-stateful/index.cjs +1 -1
  19. package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
  20. package/dist/cjs/components/card/index.cjs +1 -1
  21. package/dist/cjs/components/card/index.cjs.map +1 -1
  22. package/dist/cjs/components/carousel/index.cjs +1 -1
  23. package/dist/cjs/components/carousel/index.cjs.map +1 -1
  24. package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
  25. package/dist/cjs/components/checkbox/index.cjs +1 -1
  26. package/dist/cjs/components/checkbox/index.cjs.map +1 -1
  27. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  28. package/dist/cjs/components/color-picker/index.cjs +1 -0
  29. package/dist/cjs/components/color-picker.cjs +1 -0
  30. package/dist/cjs/components/combobox/add-subheadings.cjs +1 -1
  31. package/dist/cjs/components/combobox/add-subheadings.cjs.map +1 -1
  32. package/dist/cjs/components/combobox/check-props.cjs +1 -1
  33. package/dist/cjs/components/combobox/check-props.cjs.map +1 -1
  34. package/dist/cjs/components/combobox/combobox.cjs +1 -1
  35. package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
  36. package/dist/cjs/components/combobox/filter.cjs +1 -1
  37. package/dist/cjs/components/combobox/filter.cjs.map +1 -1
  38. package/dist/cjs/components/combobox/index.cjs +1 -1
  39. package/dist/cjs/components/combobox/index.cjs.map +1 -1
  40. package/dist/cjs/components/combobox/private/menu.cjs +1 -1
  41. package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
  42. package/dist/cjs/components/date-picker/check-props.cjs +1 -1
  43. package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
  44. package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
  45. package/dist/cjs/components/date-picker/index.cjs +1 -1
  46. package/dist/cjs/components/date-picker/index.cjs.map +1 -1
  47. package/dist/cjs/components/docked-composer/index.cjs +1 -1
  48. package/dist/cjs/components/docked-composer/index.cjs.map +1 -1
  49. package/dist/cjs/components/dynamic-icon/index.cjs +1 -1
  50. package/dist/cjs/components/dynamic-icon/index.cjs.map +1 -1
  51. package/dist/cjs/components/expandable-section/index.cjs +1 -1
  52. package/dist/cjs/components/expandable-section/index.cjs.map +1 -1
  53. package/dist/cjs/components/files/index.cjs +1 -1
  54. package/dist/cjs/components/files/index.cjs.map +1 -1
  55. package/dist/cjs/components/filter/index.cjs +1 -0
  56. package/dist/cjs/components/filter.cjs +1 -0
  57. package/dist/cjs/components/grid/index.cjs +2 -0
  58. package/dist/cjs/components/grid/index.cjs.map +1 -0
  59. package/dist/cjs/components/grid.cjs +1 -0
  60. package/dist/cjs/components/icon/index.cjs +1 -1
  61. package/dist/cjs/components/icon/index.cjs.map +1 -1
  62. package/dist/cjs/components/icon-settings/index.cjs +1 -1
  63. package/dist/cjs/components/icon-settings/index.cjs.map +1 -1
  64. package/dist/cjs/components/illustration/index.cjs +1 -1
  65. package/dist/cjs/components/illustration/index.cjs.map +1 -1
  66. package/dist/cjs/components/index.cjs +1 -1
  67. package/dist/cjs/components/input/check-props.cjs +1 -1
  68. package/dist/cjs/components/input/check-props.cjs.map +1 -1
  69. package/dist/cjs/components/input/index.cjs +1 -1
  70. package/dist/cjs/components/input/index.cjs.map +1 -1
  71. package/dist/cjs/components/input/search.cjs +1 -1
  72. package/dist/cjs/components/input/search.cjs.map +1 -1
  73. package/dist/cjs/components/media-object/index.cjs +1 -1
  74. package/dist/cjs/components/media-object/index.cjs.map +1 -1
  75. package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
  76. package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
  77. package/dist/cjs/components/menu-dropdown/index.cjs +1 -1
  78. package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
  79. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
  80. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
  81. package/dist/cjs/components/modal/index.cjs +1 -1
  82. package/dist/cjs/components/modal/index.cjs.map +1 -1
  83. package/dist/cjs/components/page-header/index.cjs +1 -1
  84. package/dist/cjs/components/page-header/index.cjs.map +1 -1
  85. package/dist/cjs/components/panel/index.cjs +1 -1
  86. package/dist/cjs/components/panel/index.cjs.map +1 -1
  87. package/dist/cjs/components/pill/index.cjs +1 -1
  88. package/dist/cjs/components/pill/index.cjs.map +1 -1
  89. package/dist/cjs/components/pill-container/check-props.cjs +2 -0
  90. package/dist/cjs/components/pill-container/check-props.cjs.map +1 -0
  91. package/dist/cjs/components/pill-container/component.cjs +2 -0
  92. package/dist/cjs/components/pill-container/component.cjs.map +1 -0
  93. package/dist/cjs/components/pill-container/index.cjs +1 -1
  94. package/dist/cjs/components/pill-container/index.cjs.map +1 -1
  95. package/dist/cjs/components/popover/index.cjs +1 -1
  96. package/dist/cjs/components/popover/index.cjs.map +1 -1
  97. package/dist/cjs/components/popover/popover.cjs +1 -1
  98. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  99. package/dist/cjs/components/portal-settings/index.cjs +1 -1
  100. package/dist/cjs/components/portal-settings/index.cjs.map +1 -1
  101. package/dist/cjs/components/progress-bar/index.cjs +1 -1
  102. package/dist/cjs/components/progress-bar/index.cjs.map +1 -1
  103. package/dist/cjs/components/progress-indicator/check-props.cjs +2 -0
  104. package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -0
  105. package/dist/cjs/components/progress-indicator/index.cjs +1 -1
  106. package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
  107. package/dist/cjs/components/progress-indicator/private/path.cjs +2 -0
  108. package/dist/cjs/components/progress-indicator/private/path.cjs.map +1 -0
  109. package/dist/cjs/components/progress-indicator/private/progress.cjs +1 -1
  110. package/dist/cjs/components/progress-indicator/private/progress.cjs.map +1 -1
  111. package/dist/cjs/components/progress-indicator/private/use-roving-tab-index.cjs +2 -0
  112. package/dist/cjs/components/progress-indicator/private/use-roving-tab-index.cjs.map +1 -0
  113. package/dist/cjs/components/progress-ring/index.cjs +1 -1
  114. package/dist/cjs/components/progress-ring/index.cjs.map +1 -1
  115. package/dist/cjs/components/radio/index.cjs +1 -1
  116. package/dist/cjs/components/radio/index.cjs.map +1 -1
  117. package/dist/cjs/components/radio-button-group/index.cjs +1 -1
  118. package/dist/cjs/components/radio-button-group/index.cjs.map +1 -1
  119. package/dist/cjs/components/radio-group/index.cjs +1 -1
  120. package/dist/cjs/components/radio-group/index.cjs.map +1 -1
  121. package/dist/cjs/components/scoped-notification/index.cjs +1 -1
  122. package/dist/cjs/components/scoped-notification/index.cjs.map +1 -1
  123. package/dist/cjs/components/setup-assistant/index.cjs +1 -1
  124. package/dist/cjs/components/setup-assistant/index.cjs.map +1 -1
  125. package/dist/cjs/components/setup-assistant/step.cjs +1 -1
  126. package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
  127. package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
  128. package/dist/cjs/components/simple-data-table/index.cjs +1 -1
  129. package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
  130. package/dist/cjs/components/simple-data-table/row-actions.cjs +1 -1
  131. package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
  132. package/dist/cjs/components/slider/index.cjs +1 -1
  133. package/dist/cjs/components/slider/index.cjs.map +1 -1
  134. package/dist/cjs/components/spinner/index.cjs +1 -1
  135. package/dist/cjs/components/spinner/index.cjs.map +1 -1
  136. package/dist/cjs/components/split-view/check-props.cjs +2 -0
  137. package/dist/cjs/components/split-view/check-props.cjs.map +1 -0
  138. package/dist/cjs/components/split-view/component.cjs +2 -0
  139. package/dist/cjs/components/split-view/component.cjs.map +1 -0
  140. package/dist/cjs/components/split-view/header.cjs.map +1 -1
  141. package/dist/cjs/components/split-view/index.cjs +1 -1
  142. package/dist/cjs/components/split-view/index.cjs.map +1 -1
  143. package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
  144. package/dist/cjs/components/tabs/index.cjs +1 -1
  145. package/dist/cjs/components/tabs/index.cjs.map +1 -1
  146. package/dist/cjs/components/textarea/check-props.cjs +2 -0
  147. package/dist/cjs/components/textarea/check-props.cjs.map +1 -0
  148. package/dist/cjs/components/textarea/component.cjs +2 -0
  149. package/dist/cjs/components/textarea/component.cjs.map +1 -0
  150. package/dist/cjs/components/textarea/index.cjs +1 -1
  151. package/dist/cjs/components/textarea/index.cjs.map +1 -1
  152. package/dist/cjs/components/toast/index.cjs +1 -1
  153. package/dist/cjs/components/toast/index.cjs.map +1 -1
  154. package/dist/cjs/components/tooltip/check-props.cjs +1 -1
  155. package/dist/cjs/components/tooltip/check-props.cjs.map +1 -1
  156. package/dist/cjs/components/tooltip/index.cjs +2 -2
  157. package/dist/cjs/components/tooltip/index.cjs.map +1 -1
  158. package/dist/cjs/components/tree/check-props.cjs +1 -1
  159. package/dist/cjs/components/tree/check-props.cjs.map +1 -1
  160. package/dist/cjs/components/tree/index.cjs +1 -0
  161. package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
  162. package/dist/cjs/components/tree/private/item.cjs.map +1 -1
  163. package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
  164. package/dist/cjs/components/tree/private/render-initial-branch.cjs +1 -1
  165. package/dist/cjs/components/tree/private/render-initial-branch.cjs.map +1 -1
  166. package/dist/cjs/components/tree/tree.cjs +1 -1
  167. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  168. package/dist/cjs/components/tree.cjs +1 -0
  169. package/dist/cjs/components/trial-bar/index.cjs +1 -1
  170. package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
  171. package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
  172. package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
  173. package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
  174. package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
  175. package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
  176. package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
  177. package/dist/cjs/components/visual-picker/index.cjs +1 -1
  178. package/dist/cjs/components/visual-picker/index.cjs.map +1 -1
  179. package/dist/cjs/components/welcome-mat/index.cjs +1 -1
  180. package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
  181. package/dist/cjs/utilities/constants.cjs +1 -1
  182. package/dist/cjs/utilities/constants.cjs.map +1 -1
  183. package/dist/cjs/utilities/hooks/index.cjs +1 -0
  184. package/dist/cjs/utilities/hooks.cjs +1 -0
  185. package/dist/cjs/utilities/warning/incompatible-props.cjs +2 -0
  186. package/dist/cjs/utilities/warning/incompatible-props.cjs.map +1 -0
  187. package/dist/es/components/accordion/index.js +28 -24
  188. package/dist/es/components/accordion/index.js.map +1 -1
  189. package/dist/es/components/alert/index.js +14 -14
  190. package/dist/es/components/alert/index.js.map +1 -1
  191. package/dist/es/components/avatar/index.js +1 -1
  192. package/dist/es/components/avatar/index.js.map +1 -1
  193. package/dist/es/components/badge/index.js +1 -0
  194. package/dist/es/components/badge/index.js.map +1 -1
  195. package/dist/es/components/breadcrumb/index.js +1 -1
  196. package/dist/es/components/breadcrumb/index.js.map +1 -1
  197. package/dist/es/components/button/index.js +2 -2
  198. package/dist/es/components/button/index.js.map +1 -1
  199. package/dist/es/components/button-stateful/index.js +4 -3
  200. package/dist/es/components/button-stateful/index.js.map +1 -1
  201. package/dist/es/components/carousel/index.js +8 -12
  202. package/dist/es/components/carousel/index.js.map +1 -1
  203. package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
  204. package/dist/es/components/checkbox/index.js +17 -17
  205. package/dist/es/components/checkbox/index.js.map +1 -1
  206. package/dist/es/components/color-picker/color-picker.js.map +1 -1
  207. package/dist/es/components/color-picker/index.js +2 -0
  208. package/dist/es/components/color-picker.js +2 -0
  209. package/dist/es/components/combobox/add-subheadings.js +2 -1
  210. package/dist/es/components/combobox/add-subheadings.js.map +1 -1
  211. package/dist/es/components/combobox/check-props.js +15 -5
  212. package/dist/es/components/combobox/check-props.js.map +1 -1
  213. package/dist/es/components/combobox/combobox.js +193 -186
  214. package/dist/es/components/combobox/combobox.js.map +1 -1
  215. package/dist/es/components/combobox/filter.js +1 -1
  216. package/dist/es/components/combobox/filter.js.map +1 -1
  217. package/dist/es/components/combobox/index.js.map +1 -1
  218. package/dist/es/components/combobox/private/menu.js +2 -0
  219. package/dist/es/components/combobox/private/menu.js.map +1 -1
  220. package/dist/es/components/date-picker/check-props.js +4 -4
  221. package/dist/es/components/date-picker/date-picker.js +149 -142
  222. package/dist/es/components/date-picker/date-picker.js.map +1 -1
  223. package/dist/es/components/date-picker/index.js.map +1 -1
  224. package/dist/es/components/filter/index.js +2 -0
  225. package/dist/es/components/filter.js +2 -0
  226. package/dist/es/components/grid/index.js +31 -0
  227. package/dist/es/components/grid/index.js.map +1 -0
  228. package/dist/es/components/grid.js +2 -0
  229. package/dist/es/components/index.js +41 -43
  230. package/dist/es/components/input/check-props.js +17 -18
  231. package/dist/es/components/input/check-props.js.map +1 -1
  232. package/dist/es/components/input/search.js +1 -1
  233. package/dist/es/components/input/search.js.map +1 -1
  234. package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
  235. package/dist/es/components/menu-dropdown/check-props.js +6 -6
  236. package/dist/es/components/menu-dropdown/index.js +5 -5
  237. package/dist/es/components/menu-dropdown/index.js.map +1 -1
  238. package/dist/es/components/menu-dropdown/menu-dropdown.js +262 -258
  239. package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
  240. package/dist/es/components/modal/index.js +104 -132
  241. package/dist/es/components/modal/index.js.map +1 -1
  242. package/dist/es/components/page-header/index.js +24 -24
  243. package/dist/es/components/pill-container/check-props.js +13 -0
  244. package/dist/es/components/pill-container/check-props.js.map +1 -0
  245. package/dist/es/components/pill-container/component.js +31 -0
  246. package/dist/es/components/pill-container/component.js.map +1 -0
  247. package/dist/es/components/pill-container/index.js +65 -56
  248. package/dist/es/components/pill-container/index.js.map +1 -1
  249. package/dist/es/components/popover/index.js +3 -3
  250. package/dist/es/components/popover/index.js.map +1 -1
  251. package/dist/es/components/popover/popover.js +72 -64
  252. package/dist/es/components/popover/popover.js.map +1 -1
  253. package/dist/es/components/progress-indicator/check-props.js +24 -0
  254. package/dist/es/components/progress-indicator/check-props.js.map +1 -0
  255. package/dist/es/components/progress-indicator/index.js +80 -38
  256. package/dist/es/components/progress-indicator/index.js.map +1 -1
  257. package/dist/es/components/progress-indicator/private/path.js +95 -0
  258. package/dist/es/components/progress-indicator/private/path.js.map +1 -0
  259. package/dist/es/components/progress-indicator/private/progress.js +1 -1
  260. package/dist/es/components/progress-indicator/private/progress.js.map +1 -1
  261. package/dist/es/components/progress-indicator/private/use-roving-tab-index.js +29 -0
  262. package/dist/es/components/progress-indicator/private/use-roving-tab-index.js.map +1 -0
  263. package/dist/es/components/progress-ring/index.js +8 -8
  264. package/dist/es/components/progress-ring/index.js.map +1 -1
  265. package/dist/es/components/setup-assistant/index.js.map +1 -1
  266. package/dist/es/components/setup-assistant/step.js +1 -1
  267. package/dist/es/components/setup-assistant/step.js.map +1 -1
  268. package/dist/es/components/simple-data-table/check-props.js +4 -4
  269. package/dist/es/components/simple-data-table/index.js +67 -69
  270. package/dist/es/components/simple-data-table/index.js.map +1 -1
  271. package/dist/es/components/simple-data-table/row-actions.js +2 -2
  272. package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
  273. package/dist/es/components/spinner/index.js +1 -1
  274. package/dist/es/components/spinner/index.js.map +1 -1
  275. package/dist/es/components/split-view/check-props.js +13 -0
  276. package/dist/es/components/split-view/check-props.js.map +1 -0
  277. package/dist/es/components/split-view/component.js +46 -0
  278. package/dist/es/components/split-view/component.js.map +1 -0
  279. package/dist/es/components/split-view/header.js.map +1 -1
  280. package/dist/es/components/split-view/index.js +40 -34
  281. package/dist/es/components/split-view/index.js.map +1 -1
  282. package/dist/es/components/split-view/listbox.js.map +1 -1
  283. package/dist/es/components/tabs/index.js +64 -64
  284. package/dist/es/components/tabs/index.js.map +1 -1
  285. package/dist/es/components/textarea/check-props.js +17 -0
  286. package/dist/es/components/textarea/check-props.js.map +1 -0
  287. package/dist/es/components/textarea/component.js +27 -0
  288. package/dist/es/components/textarea/component.js.map +1 -0
  289. package/dist/es/components/textarea/index.js +50 -46
  290. package/dist/es/components/textarea/index.js.map +1 -1
  291. package/dist/es/components/toast/index.js +18 -12
  292. package/dist/es/components/toast/index.js.map +1 -1
  293. package/dist/es/components/tooltip/check-props.js +9 -23
  294. package/dist/es/components/tooltip/check-props.js.map +1 -1
  295. package/dist/es/components/tooltip/index.js +81 -75
  296. package/dist/es/components/tooltip/index.js.map +1 -1
  297. package/dist/es/components/tree/check-props.js +6 -6
  298. package/dist/es/components/tree/check-props.js.map +1 -1
  299. package/dist/es/components/tree/index.js +2 -0
  300. package/dist/es/components/tree/private/branch.js.map +1 -1
  301. package/dist/es/components/tree/private/item.js.map +1 -1
  302. package/dist/es/components/tree/private/render-branch.js.map +1 -1
  303. package/dist/es/components/tree/private/render-initial-branch.js +5 -2
  304. package/dist/es/components/tree/private/render-initial-branch.js.map +1 -1
  305. package/dist/es/components/tree/tree.js +60 -35
  306. package/dist/es/components/tree/tree.js.map +1 -1
  307. package/dist/es/components/tree.js +2 -0
  308. package/dist/es/components/utilities/menu-list/index.js.map +1 -1
  309. package/dist/es/components/utilities/menu-list/item.js +1 -1
  310. package/dist/es/components/utilities/menu-list/item.js.map +1 -1
  311. package/dist/es/components/vertical-navigation/index.js.map +1 -1
  312. package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
  313. package/dist/es/components/welcome-mat/index.js.map +1 -1
  314. package/dist/es/utilities/constants.js +2 -2
  315. package/dist/es/utilities/constants.js.map +1 -1
  316. package/dist/es/utilities/hooks/index.js +2 -0
  317. package/dist/es/utilities/hooks.js +1 -0
  318. package/dist/es/utilities/warning/incompatible-props.js +19 -0
  319. package/dist/es/utilities/warning/incompatible-props.js.map +1 -0
  320. package/dist/types/components/accordion/index.d.ts.map +1 -1
  321. package/dist/types/components/alert/index.d.ts.map +1 -1
  322. package/dist/types/components/avatar/index.d.ts +1 -1
  323. package/dist/types/components/avatar/index.d.ts.map +1 -1
  324. package/dist/types/components/badge/index.d.ts +1 -1
  325. package/dist/types/components/badge/index.d.ts.map +1 -1
  326. package/dist/types/components/breadcrumb/index.d.ts +1 -1
  327. package/dist/types/components/breadcrumb/index.d.ts.map +1 -1
  328. package/dist/types/components/button/check-props.d.ts.map +1 -1
  329. package/dist/types/components/button/index.d.ts +6 -3
  330. package/dist/types/components/button/index.d.ts.map +1 -1
  331. package/dist/types/components/button-stateful/index.d.ts +3 -3
  332. package/dist/types/components/button-stateful/index.d.ts.map +1 -1
  333. package/dist/types/components/carousel/index.d.ts +34 -7
  334. package/dist/types/components/carousel/index.d.ts.map +1 -1
  335. package/dist/types/components/carousel/private/carousel-item.d.ts +3 -3
  336. package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
  337. package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
  338. package/dist/types/components/checkbox/index.d.ts +1 -6
  339. package/dist/types/components/checkbox/index.d.ts.map +1 -1
  340. package/dist/types/components/color-picker/color-picker.d.ts +25 -7
  341. package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
  342. package/dist/types/components/color-picker/index.d.ts +1 -1
  343. package/dist/types/components/color-picker/index.d.ts.map +1 -1
  344. package/dist/types/components/combobox/add-subheadings.d.ts +1 -1
  345. package/dist/types/components/combobox/add-subheadings.d.ts.map +1 -1
  346. package/dist/types/components/combobox/check-props.d.ts.map +1 -1
  347. package/dist/types/components/combobox/combobox.d.ts +57 -24
  348. package/dist/types/components/combobox/combobox.d.ts.map +1 -1
  349. package/dist/types/components/combobox/filter.d.ts.map +1 -1
  350. package/dist/types/components/combobox/index.d.ts +2 -2
  351. package/dist/types/components/combobox/index.d.ts.map +1 -1
  352. package/dist/types/components/combobox/private/menu.d.ts +65 -4
  353. package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
  354. package/dist/types/components/date-picker/date-picker.d.ts +52 -6
  355. package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
  356. package/dist/types/components/date-picker/index.d.ts +1 -1
  357. package/dist/types/components/date-picker/index.d.ts.map +1 -1
  358. package/dist/types/components/index.d.ts +0 -4
  359. package/dist/types/components/index.d.ts.map +1 -1
  360. package/dist/types/components/input/check-props.d.ts.map +1 -1
  361. package/dist/types/components/input/search.d.ts +1 -1
  362. package/dist/types/components/input/search.d.ts.map +1 -1
  363. package/dist/types/components/menu-dropdown/button-trigger.d.ts +1 -1
  364. package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
  365. package/dist/types/components/menu-dropdown/index.d.ts +2 -2
  366. package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
  367. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +95 -24
  368. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
  369. package/dist/types/components/modal/index.d.ts +26 -3
  370. package/dist/types/components/modal/index.d.ts.map +1 -1
  371. package/dist/types/components/pill-container/check-props.d.ts.map +1 -0
  372. package/dist/types/components/pill-container/index.d.ts +24 -3
  373. package/dist/types/components/pill-container/index.d.ts.map +1 -1
  374. package/dist/types/components/popover/index.d.ts +1 -1
  375. package/dist/types/components/popover/index.d.ts.map +1 -1
  376. package/dist/types/components/popover/popover.d.ts +41 -12
  377. package/dist/types/components/popover/popover.d.ts.map +1 -1
  378. package/dist/types/components/progress-indicator/check-props.d.ts.map +1 -0
  379. package/dist/types/components/progress-indicator/index.d.ts +39 -8
  380. package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
  381. package/dist/types/components/progress-indicator/private/path.d.ts +48 -0
  382. package/dist/types/components/progress-indicator/private/path.d.ts.map +1 -0
  383. package/dist/types/components/progress-indicator/private/progress.d.ts.map +1 -1
  384. package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts +41 -0
  385. package/dist/types/components/progress-indicator/private/use-roving-tab-index.d.ts.map +1 -0
  386. package/dist/types/components/setup-assistant/index.d.ts +7 -3
  387. package/dist/types/components/setup-assistant/index.d.ts.map +1 -1
  388. package/dist/types/components/setup-assistant/step.d.ts +7 -1
  389. package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
  390. package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
  391. package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -1
  392. package/dist/types/components/spinner/index.d.ts +1 -1
  393. package/dist/types/components/spinner/index.d.ts.map +1 -1
  394. package/dist/types/components/split-view/check-props.d.ts.map +1 -0
  395. package/dist/types/components/split-view/header.d.ts +3 -3
  396. package/dist/types/components/split-view/header.d.ts.map +1 -1
  397. package/dist/types/components/split-view/index.d.ts +25 -3
  398. package/dist/types/components/split-view/index.d.ts.map +1 -1
  399. package/dist/types/components/split-view/listbox.d.ts +27 -24
  400. package/dist/types/components/split-view/listbox.d.ts.map +1 -1
  401. package/dist/types/components/tabs/index.d.ts +16 -3
  402. package/dist/types/components/tabs/index.d.ts.map +1 -1
  403. package/dist/types/components/textarea/index.d.ts +2 -2
  404. package/dist/types/components/textarea/index.d.ts.map +1 -1
  405. package/dist/types/components/toast/index.d.ts +17 -2
  406. package/dist/types/components/toast/index.d.ts.map +1 -1
  407. package/dist/types/components/tooltip/check-props.d.ts.map +1 -1
  408. package/dist/types/components/tooltip/index.d.ts +10 -5
  409. package/dist/types/components/tooltip/index.d.ts.map +1 -1
  410. package/dist/types/components/tree/check-props.d.ts.map +1 -1
  411. package/dist/types/components/tree/index.d.ts +1 -1
  412. package/dist/types/components/tree/index.d.ts.map +1 -1
  413. package/dist/types/components/tree/private/branch.d.ts +2 -4
  414. package/dist/types/components/tree/private/branch.d.ts.map +1 -1
  415. package/dist/types/components/tree/private/item.d.ts.map +1 -1
  416. package/dist/types/components/tree/private/render-branch.d.ts.map +1 -1
  417. package/dist/types/components/tree/private/render-initial-branch.d.ts +2 -3
  418. package/dist/types/components/tree/private/render-initial-branch.d.ts.map +1 -1
  419. package/dist/types/components/tree/tree.d.ts +27 -6
  420. package/dist/types/components/tree/tree.d.ts.map +1 -1
  421. package/dist/types/components/tree/types.d.ts +55 -8
  422. package/dist/types/components/tree/types.d.ts.map +1 -1
  423. package/dist/types/components/utilities/menu-list/index.d.ts +1 -1
  424. package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
  425. package/dist/types/components/utilities/menu-list/item.d.ts +1 -1
  426. package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
  427. package/dist/types/components/vertical-navigation/index.d.ts +7 -3
  428. package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
  429. package/dist/types/components/vertical-navigation/private/item.d.ts +1 -1
  430. package/dist/types/components/vertical-navigation/private/item.d.ts.map +1 -1
  431. package/dist/types/components/welcome-mat/index.d.ts +62 -13
  432. package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
  433. package/dist/types/utilities/constants.d.ts +1 -1
  434. package/dist/types/utilities/constants.d.ts.map +1 -1
  435. package/dist/types/utilities/hooks/index.d.ts +1 -1
  436. package/dist/types/utilities/hooks/index.d.ts.map +1 -1
  437. package/dist/types/utilities/hooks.d.ts +0 -1
  438. package/dist/types/utilities/sample-data/global-navigation-bar.d.ts +0 -1
  439. package/dist/types/utilities/sample-data/vertical-navigation.d.ts +0 -1
  440. package/dist/types/utilities/warning/incompatible-props.d.ts.map +1 -1
  441. package/package.json +5 -4
  442. package/dist/cjs/components/forms/input/inline-check-props.cjs +0 -2
  443. package/dist/cjs/components/forms/input/inline-check-props.cjs.map +0 -1
  444. package/dist/cjs/components/forms/input/inline.cjs +0 -2
  445. package/dist/cjs/components/forms/input/inline.cjs.map +0 -1
  446. package/dist/cjs/components/modal/check-props.cjs +0 -2
  447. package/dist/cjs/components/modal/check-props.cjs.map +0 -1
  448. package/dist/cjs/components/modal/component.cjs +0 -2
  449. package/dist/cjs/components/modal/component.cjs.map +0 -1
  450. package/dist/cjs/components/modal/trigger.cjs +0 -2
  451. package/dist/cjs/components/modal/trigger.cjs.map +0 -1
  452. package/dist/cjs/utilities/design-tokens/dist/palette-colors.common.cjs +0 -2
  453. package/dist/cjs/utilities/design-tokens/dist/palette-colors.common.cjs.map +0 -1
  454. package/dist/cjs/utilities/design-tokens/dist/salesforce-skin.common.cjs +0 -2
  455. package/dist/cjs/utilities/design-tokens/dist/salesforce-skin.common.cjs.map +0 -1
  456. package/dist/cjs/utilities/warning/deprecated-property-value.cjs +0 -2
  457. package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +0 -1
  458. package/dist/es/components/forms/input/inline-check-props.js +0 -11
  459. package/dist/es/components/forms/input/inline-check-props.js.map +0 -1
  460. package/dist/es/components/forms/input/inline.js +0 -95
  461. package/dist/es/components/forms/input/inline.js.map +0 -1
  462. package/dist/es/components/modal/check-props.js +0 -13
  463. package/dist/es/components/modal/check-props.js.map +0 -1
  464. package/dist/es/components/modal/component.js +0 -35
  465. package/dist/es/components/modal/component.js.map +0 -1
  466. package/dist/es/components/modal/trigger.js +0 -22
  467. package/dist/es/components/modal/trigger.js.map +0 -1
  468. package/dist/es/utilities/design-tokens/dist/palette-colors.common.js +0 -6
  469. package/dist/es/utilities/design-tokens/dist/palette-colors.common.js.map +0 -1
  470. package/dist/es/utilities/design-tokens/dist/salesforce-skin.common.js +0 -286
  471. package/dist/es/utilities/design-tokens/dist/salesforce-skin.common.js.map +0 -1
  472. package/dist/es/utilities/warning/deprecated-property-value.js +0 -18
  473. package/dist/es/utilities/warning/deprecated-property-value.js.map +0 -1
  474. package/dist/types/components/avatar/check-props.d.ts.map +0 -1
  475. package/dist/types/components/breadcrumb/check-props.d.ts.map +0 -1
  476. package/dist/types/components/button-stateful/check-props.d.ts.map +0 -1
  477. package/dist/types/components/forms/checkbox/index.d.ts +0 -4
  478. package/dist/types/components/forms/checkbox/index.d.ts.map +0 -1
  479. package/dist/types/components/forms/checkbox.d.ts +0 -2
  480. package/dist/types/components/forms/input/inline-check-props.d.ts +0 -3
  481. package/dist/types/components/forms/input/inline-check-props.d.ts.map +0 -1
  482. package/dist/types/components/forms/input/inline.d.ts +0 -88
  483. package/dist/types/components/forms/input/inline.d.ts.map +0 -1
  484. package/dist/types/components/modal/check-props.d.ts +0 -3
  485. package/dist/types/components/modal/check-props.d.ts.map +0 -1
  486. package/dist/types/components/modal/trigger.d.ts +0 -14
  487. package/dist/types/components/modal/trigger.d.ts.map +0 -1
  488. package/dist/types/components/spinner/check-props.d.ts +0 -3
  489. package/dist/types/components/spinner/check-props.d.ts.map +0 -1
  490. package/dist/types/components/tabs/pane.d.ts +0 -3
  491. package/dist/types/components/tabs/pane.d.ts.map +0 -1
  492. package/dist/types/utilities/design-tokens/dist/analytics-cloud.common.d.ts +0 -81
  493. package/dist/types/utilities/design-tokens/dist/analytics-cloud.common.d.ts.map +0 -1
  494. package/dist/types/utilities/design-tokens/dist/bg-actions.common.d.ts +0 -201
  495. package/dist/types/utilities/design-tokens/dist/bg-actions.common.d.ts.map +0 -1
  496. package/dist/types/utilities/design-tokens/dist/bg-custom.common.d.ts +0 -117
  497. package/dist/types/utilities/design-tokens/dist/bg-custom.common.d.ts.map +0 -1
  498. package/dist/types/utilities/design-tokens/dist/bg-icons.common.d.ts +0 -5
  499. package/dist/types/utilities/design-tokens/dist/bg-icons.common.d.ts.map +0 -1
  500. package/dist/types/utilities/design-tokens/dist/bg-standard.common.d.ts +0 -204
  501. package/dist/types/utilities/design-tokens/dist/bg-standard.common.d.ts.map +0 -1
  502. package/dist/types/utilities/design-tokens/dist/color-palettes.common.d.ts +0 -3
  503. package/dist/types/utilities/design-tokens/dist/color-palettes.common.d.ts.map +0 -1
  504. package/dist/types/utilities/design-tokens/dist/components.common.d.ts +0 -249
  505. package/dist/types/utilities/design-tokens/dist/components.common.d.ts.map +0 -1
  506. package/dist/types/utilities/design-tokens/dist/console-base.common.d.ts +0 -9
  507. package/dist/types/utilities/design-tokens/dist/console-base.common.d.ts.map +0 -1
  508. package/dist/types/utilities/design-tokens/dist/force-base.common.d.ts +0 -647
  509. package/dist/types/utilities/design-tokens/dist/force-base.common.d.ts.map +0 -1
  510. package/dist/types/utilities/design-tokens/dist/force-font-commons.common.d.ts +0 -14
  511. package/dist/types/utilities/design-tokens/dist/force-font-commons.common.d.ts.map +0 -1
  512. package/dist/types/utilities/design-tokens/dist/force-mq-commons.common.d.ts +0 -10
  513. package/dist/types/utilities/design-tokens/dist/force-mq-commons.common.d.ts.map +0 -1
  514. package/dist/types/utilities/design-tokens/dist/icon-paths.common.d.ts +0 -9
  515. package/dist/types/utilities/design-tokens/dist/icon-paths.common.d.ts.map +0 -1
  516. package/dist/types/utilities/design-tokens/dist/illustrations.common.d.ts +0 -7
  517. package/dist/types/utilities/design-tokens/dist/illustrations.common.d.ts.map +0 -1
  518. package/dist/types/utilities/design-tokens/dist/image-paths.common.d.ts +0 -12
  519. package/dist/types/utilities/design-tokens/dist/image-paths.common.d.ts.map +0 -1
  520. package/dist/types/utilities/design-tokens/dist/marketing-cloud.common.d.ts +0 -35
  521. package/dist/types/utilities/design-tokens/dist/marketing-cloud.common.d.ts.map +0 -1
  522. package/dist/types/utilities/design-tokens/dist/palette-colors.common.d.ts +0 -98
  523. package/dist/types/utilities/design-tokens/dist/palette-colors.common.d.ts.map +0 -1
  524. package/dist/types/utilities/design-tokens/dist/s1-base-large.common.d.ts +0 -15
  525. package/dist/types/utilities/design-tokens/dist/s1-base-large.common.d.ts.map +0 -1
  526. package/dist/types/utilities/design-tokens/dist/s1-base-medium.common.d.ts +0 -5
  527. package/dist/types/utilities/design-tokens/dist/s1-base-medium.common.d.ts.map +0 -1
  528. package/dist/types/utilities/design-tokens/dist/s1-base-small.common.d.ts +0 -11
  529. package/dist/types/utilities/design-tokens/dist/s1-base-small.common.d.ts.map +0 -1
  530. package/dist/types/utilities/design-tokens/dist/s1-base.common.d.ts +0 -21
  531. package/dist/types/utilities/design-tokens/dist/s1-base.common.d.ts.map +0 -1
  532. package/dist/types/utilities/design-tokens/dist/salesforce-skin.common.d.ts +0 -283
  533. package/dist/types/utilities/design-tokens/dist/salesforce-skin.common.d.ts.map +0 -1
  534. package/dist/types/utilities/warning/deprecated-event-parameter.d.ts +0 -3
  535. package/dist/types/utilities/warning/deprecated-event-parameter.d.ts.map +0 -1
  536. /package/dist/types/components/{avatar → pill-container}/check-props.d.ts +0 -0
  537. /package/dist/types/components/{breadcrumb → progress-indicator}/check-props.d.ts +0 -0
  538. /package/dist/types/components/{button-stateful → split-view}/check-props.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- const e=require("../../utilities/warning/deprecated-property.cjs"),t=require("../../utilities/get-component-doc.cjs");var n=function(){};process.env.NODE_ENV!==`production`&&(n=function(n,r,i){let a=t.default(i);e.default(n,r.children,`children`,`input`,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),e.default(n,r.onFocus,`onFocus`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),e.default(n,r.onBlur,`onBlur`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),e.default(n,r.abbrWeekDayLabels,`abbrWeekDayLabels`,`abbreviatedWeekDayLabels`,`Prop name has changed. ${a(`labels`)}`),e.default(n,r.onDateChange,`onDateChange`,`onChange`,`Please see prop description for \`onChange\`. Parameters have changed. The callback receives an event and a data object of the shape: \`{date: [Date object], formattedDate: [string], timezoneOffset: [number]}\` ${a(`onChange`)}`),e.default(n,r.onKeyDown,`onKeyDown`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),e.default(n,r.onFocus,`required`,void 0,`Please see children prop description and add your own \`Input\` as a child of Datepicker. ${a(`children`)}`),e.default(n,r.strValue,`strValue`,`formattedValue`,a(`formattedValue`)),e.default(n,r.isInline,`isInline`,`menuPosition="relative"`,a(`menuPosition`))});var r=n;exports.default=r;
1
+ const e=require("../../utilities/get-component-doc.cjs"),t=require("../../utilities/warning/deprecated-property.cjs");var n=function(){};process.env.NODE_ENV!==`production`&&(n=function(n,r,i){let a=e.default(i);t.default(n,r.children,`children`,`input`,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onFocus,`onFocus`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onBlur,`onBlur`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.abbrWeekDayLabels,`abbrWeekDayLabels`,`abbreviatedWeekDayLabels`,`Prop name has changed. ${a(`labels`)}`),t.default(n,r.onDateChange,`onDateChange`,`onChange`,`Please see prop description for \`onChange\`. Parameters have changed. The callback receives an event and a data object of the shape: \`{date: [Date object], formattedDate: [string], timezoneOffset: [number]}\` ${a(`onChange`)}`),t.default(n,r.onKeyDown,`onKeyDown`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onFocus,`required`,void 0,`Please see children prop description and add your own \`Input\` as a child of Datepicker. ${a(`children`)}`),t.default(n,r.strValue,`strValue`,`formattedValue`,a(`formattedValue`)),t.default(n,r.isInline,`isInline`,`menuPosition="relative"`,a(`menuPosition`))});var r=n;exports.default=r;
2
2
  //# sourceMappingURL=check-props.cjs.map
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../icon-settings/index.cjs"),r=require("../../utilities/event.cjs"),ee=require("../../utilities/generate-id.cjs"),i=require("../../utilities/key-code.cjs"),te=require("../utilities/dialog/index.cjs"),ne=require("../input/index.cjs"),re=require("../icon/input-icon/index.cjs"),ie=require("../../utilities/hooks/use-click-outside.cjs"),ae=require("./private/calendar-wrapper.cjs"),a=require("./check-props.cjs"),oe=require("./component.cjs"),se=require("../../utilities/warning/low-priority-warning.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("lodash.assign");l=e.__toESM(l,1);var ce={nextMonth:`Next month`,openCalendar:`Open Calendar`,previousMonth:`Previous month`,year:`Year`},le={abbreviatedWeekDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],label:``,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],placeholder:`Pick a Date`,today:`Today`,weekDays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},ue=e=>e?`${e.getMonth()+1}/${e.getDate()}/${e.getFullYear()}`:``,de=e=>(se.default(!1,`Please use an external library for date parsing and internationalization like MomentJS (https://github.com/moment/moment/) instead of the default parser.`),new Date(e)),u=e=>{let{assistiveText:se={},align:u=`left`,className:d,children:f,disabled:p,dateDisabled:m=()=>!1,formatter:h=ue,formattedValue:g,hasError:fe,hasStaticAlignment:_,id:pe,input:me,isOpen:v,isIsoWeekday:he,labels:ge={},menuPosition:y=`absolute`,onCalendarFocus:_e,onChange:b,onClose:x,onOpen:S,onRequestClose:C,onRequestOpen:w,parser:T=de,portalMount:E,relativeYearFrom:D=-10,relativeYearTo:O=10,triggerClassName:ve,value:k,label:A,placeholder:j,assistiveTextOpenCalendar:M,required:N,onBlur:P,onFocus:F,onKeyDown:I}=e,L=(0,l.default)({},ce,se),R=(0,l.default)({},le,ge),z=(0,o.useContext)(n.IconSettingsContext),B=(0,o.useRef)(null),V=(0,o.useRef)(null),H=(0,o.useRef)(null),ye=(0,o.useRef)(ee.default()),[U,W]=(0,o.useState)(!1),[G,K]=(0,o.useState)(!1),[be,xe]=(0,o.useState)(k),[q,Se]=(0,o.useState)(()=>{let e=h(k);return k?e:g||``}),[Ce,we]=(0,o.useState)(()=>{let e=h(k);return k?e:g||``}),[Te,Ee]=(0,o.useState)(!1);(0,o.useEffect)(()=>{typeof a.default==`function`&&a.default(t.DATE_PICKER,e,oe.default)},[]);let J=(0,o.useCallback)(()=>pe||ye.current,[pe]),Y=(0,o.useCallback)(()=>!!(typeof v==`boolean`?v:U),[v,U]),X=(0,o.useCallback)(e=>{let t=T(e);return(Object.prototype.toString.call(t)!==`[object Date]`||isNaN(t.getTime()))&&(t=new Date),t},[T]),Z=(0,o.useCallback)(()=>{C&&C(),Y()&&(W(!1),K(!1),V.current&&V.current.focus())},[C,Y]),De=(0,o.useCallback)(()=>{x&&x()},[x]),Oe=(0,o.useCallback)((e,t)=>{S&&S(e,t),H.current&&G&&H.current.focus()},[S,G]),Q=(0,o.useCallback)((e=!1)=>{e||K(!1),w?w():W(!0)},[w]),ke=(0,o.useCallback)(()=>{K(!0),Q(!0)},[Q]),Ae=(0,o.useCallback)((e,{date:t})=>{k||(xe(t),Se(h(t)),we(h(t))),Z(),b&&b(e,{date:t,formattedDate:h(t),timezoneOffset:t.getTimezoneOffset()})},[k,h,Z,b]),je=(0,o.useCallback)(e=>{typeof v!=`boolean`&&U&&W(!1),Se(e.target.value),we(e.target.value);let t=T(e.target.value);b&&b(e,{date:t,formattedDate:e.target.value,timezoneOffset:t.getTimezoneOffset()})},[v,U,T,b]),Me=(0,o.useCallback)(e=>{e.keyCode&&!e.shiftKey&&(e.keyCode===i.default.DOWN||e.keyCode===i.default.UP)&&(r.default.trapEvent(e),W(!0)),(e.keyCode===i.default.ESCAPE||e.keyCode===i.default.ENTER)&&(r.default.trapEvent(e),W(!1)),I&&I(e,{})},[I]),Ne=(0,o.useCallback)(()=>{Z()},[Z]);ie.default(B,Ne,{enabled:Y(),ignoreClass:`ignore-react-onclickoutside`});let Pe=(0,o.useCallback)(e=>{V.current=e,Te||Ee(!0)},[Te]),Fe=(0,o.useCallback)(()=>{let e;if(k){let t=h(k);e=t?X(t):k}else e=q?X(q):be||new Date;return(0,c.jsx)(ae.default,{abbreviatedWeekDayLabels:R.abbreviatedWeekDays,assistiveTextNextMonth:L.nextMonth,assistiveTextPreviousMonth:L.previousMonth,assistiveTextYear:L.year,canFocusCalendar:G,id:J(),isIsoWeekday:he,monthLabels:R.months,onCalendarFocus:_e,dateDisabled:m,onRequestClose:Z,onSelectDate:Ae,relativeYearFrom:D,relativeYearTo:O,selectedDate:e,selectedDateRef:e=>{H.current=e},todayLabel:R.today,weekDayLabels:R.weekDays})},[k,h,X,q,be,R,L,G,J,he,_e,m,Z,Ae,D,O]),Ie=(0,o.useCallback)(()=>{let e=y===`relative`?{}:{transform:`none`};if(p||!Y())return null;let t={align:`bottom ${u}`,contentsClassName:(0,s.default)(`slds-datepicker slds-dropdown`,{"slds-dropdown_right":y===`relative`&&u===`right`,"slds-dropdown_left":y===`relative`&&u===`left`},d),context:z,hasStaticAlignment:_,style:e,onClose:De,onOpen:Oe,onRequestTargetElement:()=>V.current,position:y,portalMount:E};return(0,c.jsx)(te.default,{...t,children:Fe()})},[y,p,Y,u,d,z,_,De,Oe,E,Fe]),$=(0,o.useCallback)(()=>{let e={iconRight:(0,c.jsx)(re.default,{assistiveText:{icon:M||L.openCalendar},"aria-haspopup":!0,"aria-expanded":Y(),category:`utility`,name:`event`,onClick:()=>{ke()},type:`button`}),inputRef:e=>{Pe(e)},id:J(),onChange:je,onClick:()=>{Q()},onKeyDown:Me,value:k?h(k):Ce},t={disabled:p,label:A||R.label,onBlur:P,onFocus:F,placeholder:j||R.placeholder,required:N},n=f?.props||{},r={...n,onClick:()=>{Q(),typeof n.onClick==`function`&&n.onClick()}},ee=me?.props||{};return{...e,...t,...r,...ee}},[M,L.openCalendar,Y,ke,Pe,J,je,Q,Me,k,h,Ce,p,A,R.label,R.placeholder,P,F,j,N,f,me])(),Le=f?o.default.cloneElement(f,$):(0,c.jsx)(ne.default,{...$});return(0,c.jsxs)(`div`,{ref:B,className:(0,s.default)(`slds-dropdown-trigger`,`slds-dropdown-trigger_click`,`ignore-react-onclickoutside`,{"slds-has-error":fe,"slds-is-open":Y()},ve),children:[Le,Ie()]})};u.displayName=t.DATE_PICKER,exports.default=u;
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../icon-settings/index.cjs"),r=require("../../utilities/event.cjs"),ee=require("../../utilities/generate-id.cjs"),i=require("../../utilities/key-code.cjs"),te=require("../utilities/dialog/index.cjs"),ne=require("../input/index.cjs"),re=require("../icon/input-icon/index.cjs"),ie=require("../../utilities/hooks/use-click-outside.cjs"),ae=require("./private/calendar-wrapper.cjs"),a=require("./check-props.cjs"),oe=require("./component.cjs"),se=require("../../utilities/warning/low-priority-warning.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("lodash.assign");l=e.__toESM(l,1);var ce={nextMonth:`Next month`,openCalendar:`Open Calendar`,previousMonth:`Previous month`,year:`Year`},le={abbreviatedWeekDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],label:``,months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],placeholder:`Pick a Date`,today:`Today`,weekDays:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},ue=e=>e?`${e.getMonth()+1}/${e.getDate()}/${e.getFullYear()}`:``,de=e=>(se.default(!1,`Please use an external library for date parsing and internationalization like MomentJS (https://github.com/moment/moment/) instead of the default parser.`),new Date(e)),u=e=>{let{assistiveText:se={},align:u=`left`,className:d,children:f,disabled:p,dateDisabled:m=()=>!1,formatter:h=ue,formattedValue:g,hasError:fe,hasStaticAlignment:pe,id:me,input:he,isOpen:_,isIsoWeekday:ge,labels:_e={},menuPosition:v=`absolute`,onCalendarFocus:y,onChange:b,onClose:x,onOpen:S,onRequestClose:C,onRequestOpen:w,parser:T=de,portalMount:E,relativeYearFrom:D=-10,relativeYearTo:O=10,triggerClassName:ve,value:k,label:A,placeholder:j,assistiveTextOpenCalendar:M,required:N,onBlur:P,onFocus:F,onKeyDown:I}=e,L=(0,l.default)({},ce,se),R=(0,l.default)({},le,_e),z=(0,o.useContext)(n.IconSettingsContext),B=(0,o.useRef)(null),V=(0,o.useRef)(null),H=(0,o.useRef)(null),ye=(0,o.useRef)(ee.default()),[U,W]=(0,o.useState)(!1),[G,K]=(0,o.useState)(!1),[q,be]=(0,o.useState)(k),[J,xe]=(0,o.useState)(()=>{let e=h(k);return k?e:g||``}),[Se,Ce]=(0,o.useState)(()=>{let e=h(k);return k?e:g||``}),[we,Te]=(0,o.useState)(!1);(0,o.useEffect)(()=>{typeof a.default==`function`&&a.default(t.DATE_PICKER,e,oe.default)},[]);let Y=(0,o.useCallback)(()=>me||ye.current,[me]),X=(0,o.useCallback)(()=>!!(typeof _==`boolean`?_:U),[_,U]),Z=(0,o.useCallback)(e=>{let t=T(e);return(Object.prototype.toString.call(t)!==`[object Date]`||isNaN(t.getTime()))&&(t=new Date),t},[T]),Q=(0,o.useCallback)((e,t)=>{X()&&(C?.(e,t),W(!1),K(!1),V.current&&V.current.focus())},[C,X]),Ee=(0,o.useCallback)(e=>{Q(e,{trigger:`escape`})},[Q]),De=(0,o.useCallback)((e,t)=>{x?.(e,{componentWillUnmount:!!t?.componentWillUnmount})},[x]),Oe=(0,o.useCallback)((e,t)=>{S&&S(e,t),H.current&&G&&H.current.focus()},[S,G]),$=(0,o.useCallback)((e,t,n=!1)=>{n||K(!1),w?w(e,t):W(!0)},[w]),ke=(0,o.useCallback)(e=>{K(!0),$(e,{trigger:`icon-click`},!0)},[$]),Ae=(0,o.useCallback)((e,{date:t})=>{k||(be(t),xe(h(t)),Ce(h(t))),Q(e,{trigger:`date-select`}),b&&b(e,{date:t,formattedDate:h(t),timezoneOffset:t.getTimezoneOffset()})},[k,h,Q,b]),je=(0,o.useCallback)(e=>{typeof _!=`boolean`&&U&&W(!1),xe(e.target.value),Ce(e.target.value);let t=T(e.target.value);b&&b(e,{date:t,formattedDate:e.target.value,timezoneOffset:t.getTimezoneOffset()})},[_,U,T,b]),Me=(0,o.useCallback)(e=>{e.keyCode&&!e.shiftKey&&(e.keyCode===i.default.DOWN||e.keyCode===i.default.UP)&&(r.default.trapEvent(e),X()||$(e,{trigger:`keyboard`})),(e.keyCode===i.default.ESCAPE||e.keyCode===i.default.ENTER)&&(r.default.trapEvent(e),Q(e,{trigger:e.keyCode===i.default.ESCAPE?`escape`:`enter`})),I&&I(e,{})},[X,$,Q,I]),Ne=(0,o.useCallback)(e=>{Q(e,{trigger:`click-outside`})},[Q]);ie.default(B,Ne,{enabled:X(),ignoreClass:`ignore-react-onclickoutside`});let Pe=(0,o.useCallback)(e=>{V.current=e,we||Te(!0)},[we]),Fe=(0,o.useCallback)(()=>{let e;if(k){let t=h(k);e=t?Z(t):k}else e=J?Z(J):q||new Date;return(0,c.jsx)(ae.default,{abbreviatedWeekDayLabels:R.abbreviatedWeekDays,assistiveTextNextMonth:L.nextMonth,assistiveTextPreviousMonth:L.previousMonth,assistiveTextYear:L.year,canFocusCalendar:G,id:Y(),isIsoWeekday:ge,monthLabels:R.months,onCalendarFocus:y,dateDisabled:m,onRequestClose:Ee,onSelectDate:Ae,relativeYearFrom:D,relativeYearTo:O,selectedDate:e,selectedDateRef:e=>{H.current=e},todayLabel:R.today,weekDayLabels:R.weekDays})},[k,h,Z,J,q,R,L,G,Y,ge,y,m,Ee,Ae,D,O]),Ie=(0,o.useCallback)(()=>{let e=v===`relative`?{}:{transform:`none`};if(p||!X())return null;let t={align:`bottom ${u}`,contentsClassName:(0,s.default)(`slds-datepicker slds-dropdown`,{"slds-dropdown_right":v===`relative`&&u===`right`,"slds-dropdown_left":v===`relative`&&u===`left`},d),context:z,hasStaticAlignment:pe,style:e,onClose:De,onOpen:Oe,onRequestTargetElement:()=>V.current,position:v,portalMount:E};return(0,c.jsx)(te.default,{...t,children:Fe()})},[v,p,X,u,d,z,pe,De,Oe,E,Fe]),Le=(0,o.useCallback)(()=>{let e={iconRight:(0,c.jsx)(re.default,{assistiveText:{icon:M||L.openCalendar},"aria-haspopup":!0,"aria-expanded":X(),category:`utility`,name:`event`,onClick:e=>{ke(e)},type:`button`}),inputRef:e=>{Pe(e)},id:Y(),onChange:je,onClick:e=>{$(e,{trigger:`input-click`})},onKeyDown:Me,value:k?h(k):Se},t={disabled:p,label:A||R.label,onBlur:P,onFocus:F,placeholder:j||R.placeholder,required:N},n=f?.props||{},r={...n,onClick:e=>{$(e,{trigger:`input-click`}),typeof n.onClick==`function`&&n.onClick()}},ee=he?.props||{};return{...e,...t,...r,...ee}},[M,L.openCalendar,X,ke,Pe,Y,je,$,Me,k,h,Se,p,A,R.label,R.placeholder,P,F,j,N,f,he])(),Re=f?o.default.cloneElement(f,Le):(0,c.jsx)(ne.default,{...Le});return(0,c.jsxs)(`div`,{ref:B,className:(0,s.default)(`slds-dropdown-trigger`,`slds-dropdown-trigger_click`,`ignore-react-onclickoutside`,{"slds-has-error":fe,"slds-is-open":X()},ve),children:[Re,Ie()]})};u.displayName=t.DATE_PICKER,exports.default=u;
2
2
  //# sourceMappingURL=date-picker.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.cjs","names":[],"sources":["../../../../components/date-picker/date-picker.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, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype KeyboardEvent,\n\ttype ChangeEvent,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport classNames from 'classnames';\n\nimport Dialog from '../utilities/dialog';\nimport CalendarWrapper from './private/calendar-wrapper';\nimport InputIcon from '../icon/input-icon';\nimport Input from '../input';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport EventUtil from '../../utilities/event';\nimport KEYS from '../../utilities/key-code';\nimport lowPriorityWarning from '../../utilities/warning/low-priority-warning';\n\nimport { DATE_PICKER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\nimport { IconSettingsContext } from '../icon-settings';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\n// ===== Types =====\n\nexport interface DatePickerAssistiveText {\n\tnextMonth?: string;\n\topenCalendar?: string;\n\tpreviousMonth?: string;\n\tyear?: string;\n}\n\nexport interface DatePickerLabels {\n\tabbreviatedWeekDays?: string[];\n\tlabel?: string;\n\tmonths?: string[];\n\tplaceholder?: string;\n\ttoday?: string;\n\tweekDays?: string[];\n}\n\nexport interface DatePickerChangeData {\n\tdate: Date;\n\tformattedDate: string;\n\ttimezoneOffset: number;\n}\n\nexport interface DatePickerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DatePickerAssistiveText;\n\t/** Alignment of dropdown */\n\talign?: 'left' | 'right';\n\t/** CSS classes for datepicker */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Children (deprecated - use input prop) */\n\tchildren?: ReactElement;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Function to determine if a date should be disabled */\n\tdateDisabled?: (date: Date) => boolean;\n\t/** Date formatting function */\n\tformatter?: (date: Date | null | undefined) => string;\n\t/** Initial formatted value (deprecated) */\n\tformattedValue?: string;\n\t/** Whether to show error state */\n\thasError?: boolean;\n\t/** Prevent dropdown position flipping */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Whether dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Make Monday first day of week */\n\tisIsoWeekday?: boolean;\n\t/** Text labels for internationalization */\n\tlabels?: DatePickerLabels;\n\t/** Menu position strategy */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Called when calendar focus changes */\n\tonCalendarFocus?: (\n\t\tevent: React.SyntheticEvent | null,\n\t\tdata: { date?: Date; ref?: HTMLElement; direction?: string }\n\t) => void;\n\t/** Called when date changes */\n\tonChange?: (event: React.SyntheticEvent, data: DatePickerChangeData) => void;\n\t/** Called when calendar closes */\n\tonClose?: () => void;\n\t/** Called when calendar opens */\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: { portal?: HTMLElement }\n\t) => void;\n\t/** Called when calendar wants to close */\n\tonRequestClose?: () => void;\n\t/** Called when calendar wants to open */\n\tonRequestOpen?: () => void;\n\t/** Date parsing function */\n\tparser?: (str: string) => Date;\n\t/** Portal mount function */\n\tportalMount?: (element: ReactNode, container: HTMLElement) => void;\n\t/** Years before current year in dropdown */\n\trelativeYearFrom?: number;\n\t/** Years after current year in dropdown */\n\trelativeYearTo?: number;\n\t/** CSS classes for trigger wrapper */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Selected date value */\n\tvalue?: Date;\n\t/** @deprecated Use labels.label */\n\tlabel?: string;\n\t/** @deprecated Use labels.placeholder */\n\tplaceholder?: string;\n\t/** @deprecated Use assistiveText.openCalendar */\n\tassistiveTextOpenCalendar?: string;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Blur handler */\n\tonBlur?: (event: React.FocusEvent) => void;\n\t/** Focus handler */\n\tonFocus?: (event: React.FocusEvent) => void;\n\t/** Keydown handler */\n\tonKeyDown?: (event: KeyboardEvent, data: Record<string, unknown>) => void;\n}\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<DatePickerAssistiveText> = {\n\tnextMonth: 'Next month',\n\topenCalendar: 'Open Calendar',\n\tpreviousMonth: 'Previous month',\n\tyear: 'Year',\n};\n\nconst defaultLabels: Required<DatePickerLabels> = {\n\tabbreviatedWeekDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n\tlabel: '',\n\tmonths: [\n\t\t'January',\n\t\t'February',\n\t\t'March',\n\t\t'April',\n\t\t'May',\n\t\t'June',\n\t\t'July',\n\t\t'August',\n\t\t'September',\n\t\t'October',\n\t\t'November',\n\t\t'December',\n\t],\n\tplaceholder: 'Pick a Date',\n\ttoday: 'Today',\n\tweekDays: [\n\t\t'Sunday',\n\t\t'Monday',\n\t\t'Tuesday',\n\t\t'Wednesday',\n\t\t'Thursday',\n\t\t'Friday',\n\t\t'Saturday',\n\t],\n};\n\nconst defaultFormatter = (date: Date | null | undefined): string => {\n\treturn date\n\t\t? `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`\n\t\t: '';\n};\n\nconst defaultParser = (str: string): Date => {\n\tlowPriorityWarning(\n\t\tfalse,\n\t\t`Please use an external library for date parsing and internationalization like MomentJS (https://github.com/moment/moment/) instead of the default parser.`\n\t);\n\treturn new Date(str);\n};\n\n// ===== Component =====\n\nconst Datepicker: React.FC<DatePickerProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\talign = 'left',\n\t\tclassName,\n\t\tchildren,\n\t\tdisabled,\n\t\tdateDisabled = () => false,\n\t\tformatter = defaultFormatter,\n\t\tformattedValue: formattedValueProp,\n\t\thasError,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinput,\n\t\tisOpen: isOpenProp,\n\t\tisIsoWeekday,\n\t\tlabels: labelsProp = {},\n\t\tmenuPosition = 'absolute',\n\t\tonCalendarFocus,\n\t\tonChange,\n\t\tonClose,\n\t\tonOpen,\n\t\tonRequestClose,\n\t\tonRequestOpen,\n\t\tparser = defaultParser,\n\t\tportalMount,\n\t\trelativeYearFrom = -10,\n\t\trelativeYearTo = 10,\n\t\ttriggerClassName,\n\t\tvalue,\n\t\t// Deprecated props\n\t\tlabel,\n\t\tplaceholder,\n\t\tassistiveTextOpenCalendar,\n\t\trequired,\n\t\tonBlur,\n\t\tonFocus,\n\t\tonKeyDown,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst triggerRef = useRef<HTMLDivElement | null>(null);\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst selectedDateCellRef = useRef<HTMLElement | null>(null);\n\tconst generatedId = useRef(generateId());\n\n\t// State\n\tconst [isOpenState, setIsOpenState] = useState(false);\n\tconst [isOpenFromIcon, setIsOpenFromIcon] = useState(false);\n\tconst [internalValue, setInternalValue] = useState<Date | undefined>(value);\n\tconst [formattedValue, setFormattedValue] = useState(() => {\n\t\tconst dateString = formatter(value);\n\t\treturn value ? dateString : formattedValueProp || '';\n\t});\n\tconst [inputValue, setInputValue] = useState(() => {\n\t\tconst dateString = formatter(value);\n\t\treturn value ? dateString : formattedValueProp || '';\n\t});\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount (only in development)\n\tuseEffect(() => {\n\t\tif (typeof checkProps === 'function') {\n\t\t\tcheckProps(\n\t\t\t\tDATE_PICKER,\n\t\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\t\tcomponentDoc\n\t\t\t);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst parseDate = useCallback(\n\t\t(dateString: string): Date => {\n\t\t\tlet parsedDate = parser(dateString);\n\t\t\tif (\n\t\t\t\tObject.prototype.toString.call(parsedDate) !== '[object Date]' ||\n\t\t\t\tisNaN(parsedDate.getTime())\n\t\t\t) {\n\t\t\t\tparsedDate = new Date();\n\t\t\t}\n\t\t\treturn parsedDate;\n\t\t},\n\t\t[parser]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleRequestClose = useCallback(() => {\n\t\tif (onRequestClose) {\n\t\t\tonRequestClose();\n\t\t}\n\n\t\tif (getIsOpen()) {\n\t\t\tsetIsOpenState(false);\n\t\t\tsetIsOpenFromIcon(false);\n\n\t\t\tif (inputRef.current) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t}\n\t\t}\n\t}, [onRequestClose, getIsOpen]);\n\n\tconst handleClose = useCallback(() => {\n\t\tif (onClose) {\n\t\t\tonClose();\n\t\t}\n\t}, [onClose]);\n\n\tconst handleOpen = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent | undefined,\n\t\t\tdata: { portal?: HTMLElement }\n\t\t) => {\n\t\t\tif (onOpen) {\n\t\t\t\tonOpen(event, data);\n\t\t\t}\n\n\t\t\tif (selectedDateCellRef.current && isOpenFromIcon) {\n\t\t\t\tselectedDateCellRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[onOpen, isOpenFromIcon]\n\t);\n\n\tconst openDialog = useCallback(\n\t\t(fromIcon = false) => {\n\t\t\tif (!fromIcon) {\n\t\t\t\tsetIsOpenFromIcon(false);\n\t\t\t}\n\t\t\tif (onRequestOpen) {\n\t\t\t\tonRequestOpen();\n\t\t\t} else {\n\t\t\t\tsetIsOpenState(true);\n\t\t\t}\n\t\t},\n\t\t[onRequestOpen]\n\t);\n\n\tconst openDialogFromIcon = useCallback(() => {\n\t\tsetIsOpenFromIcon(true);\n\t\topenDialog(true);\n\t}, [openDialog]);\n\n\tconst handleCalendarChange = useCallback(\n\t\t(event: React.SyntheticEvent, { date }: { date: Date }) => {\n\t\t\tif (!value) {\n\t\t\t\tsetInternalValue(date);\n\t\t\t\tsetFormattedValue(formatter(date));\n\t\t\t\tsetInputValue(formatter(date));\n\t\t\t}\n\n\t\t\thandleRequestClose();\n\n\t\t\tif (onChange) {\n\t\t\t\tonChange(event, {\n\t\t\t\t\tdate,\n\t\t\t\t\tformattedDate: formatter(date),\n\t\t\t\t\ttimezoneOffset: date.getTimezoneOffset(),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[value, formatter, handleRequestClose, onChange]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t// Typing in the input closes the calendar when it's used as an uncontrolled component\n\t\t\tif (typeof isOpenProp !== 'boolean' && isOpenState) {\n\t\t\t\tsetIsOpenState(false);\n\t\t\t}\n\n\t\t\tsetFormattedValue(event.target.value);\n\t\t\tsetInputValue(event.target.value);\n\n\t\t\tconst date = parser(event.target.value);\n\n\t\t\tif (onChange) {\n\t\t\t\tonChange(event, {\n\t\t\t\t\tdate,\n\t\t\t\t\tformattedDate: event.target.value,\n\t\t\t\t\ttimezoneOffset: date.getTimezoneOffset(),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[isOpenProp, isOpenState, parser, onChange]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent<HTMLInputElement>) => {\n\t\t\t// Don't open if user is selecting text\n\t\t\tif (\n\t\t\t\tevent.keyCode &&\n\t\t\t\t!event.shiftKey &&\n\t\t\t\t(event.keyCode === KEYS.DOWN || event.keyCode === KEYS.UP)\n\t\t\t) {\n\t\t\t\tEventUtil.trapEvent(event);\n\t\t\t\tsetIsOpenState(true);\n\t\t\t}\n\n\t\t\tif (event.keyCode === KEYS.ESCAPE || event.keyCode === KEYS.ENTER) {\n\t\t\t\tEventUtil.trapEvent(event);\n\t\t\t\tsetIsOpenState(false);\n\t\t\t}\n\n\t\t\tif (onKeyDown) {\n\t\t\t\tonKeyDown(event, {});\n\t\t\t}\n\t\t},\n\t\t[onKeyDown]\n\t);\n\n\tconst handleClickOutside = useCallback(() => {\n\t\thandleRequestClose();\n\t}, [handleRequestClose]);\n\n\t// Detect clicks outside the trigger/calendar and close the dialog. Anchored\n\t// on the trigger element so this works whether the DatePicker is controlled\n\t// (`onRequestClose` is invoked via `handleRequestClose`) or uncontrolled\n\t// (internal open state is reset). The trigger carries the\n\t// `ignore-react-onclickoutside` class and, in `overflowBoundaryElement`\n\t// mode, so does the portaled calendar, so clicks within the calendar are\n\t// treated as inside.\n\tuseClickOutside(triggerRef, handleClickOutside, {\n\t\tenabled: getIsOpen(),\n\t\tignoreClass: 'ignore-react-onclickoutside',\n\t});\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t},\n\t\t[inputRendered]\n\t);\n\n\t// ===== Render Helpers =====\n\n\tconst getDatePicker = useCallback(() => {\n\t\tlet date: Date;\n\t\t// Use props if present. Otherwise, use state.\n\t\tif (value) {\n\t\t\tconst formattedDate = formatter(value);\n\t\t\tdate = formattedDate ? parseDate(formattedDate) : value;\n\t\t} else {\n\t\t\tdate = formattedValue\n\t\t\t\t? parseDate(formattedValue)\n\t\t\t\t: internalValue || new Date();\n\t\t}\n\n\t\treturn (\n\t\t\t<CalendarWrapper\n\t\t\t\tabbreviatedWeekDayLabels={labels.abbreviatedWeekDays}\n\t\t\t\tassistiveTextNextMonth={assistiveText.nextMonth}\n\t\t\t\tassistiveTextPreviousMonth={assistiveText.previousMonth}\n\t\t\t\tassistiveTextYear={assistiveText.year}\n\t\t\t\tcanFocusCalendar={isOpenFromIcon}\n\t\t\t\tid={getId()}\n\t\t\t\tisIsoWeekday={isIsoWeekday}\n\t\t\t\tmonthLabels={labels.months}\n\t\t\t\tonCalendarFocus={onCalendarFocus}\n\t\t\t\tdateDisabled={dateDisabled}\n\t\t\t\tonRequestClose={handleRequestClose}\n\t\t\t\tonSelectDate={handleCalendarChange}\n\t\t\t\trelativeYearFrom={relativeYearFrom}\n\t\t\t\trelativeYearTo={relativeYearTo}\n\t\t\t\tselectedDate={date}\n\t\t\t\tselectedDateRef={(component: HTMLElement | null) => {\n\t\t\t\t\tselectedDateCellRef.current = component;\n\t\t\t\t}}\n\t\t\t\ttodayLabel={labels.today}\n\t\t\t\tweekDayLabels={labels.weekDays}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvalue,\n\t\tformatter,\n\t\tparseDate,\n\t\tformattedValue,\n\t\tinternalValue,\n\t\tlabels,\n\t\tassistiveText,\n\t\tisOpenFromIcon,\n\t\tgetId,\n\t\tisIsoWeekday,\n\t\tonCalendarFocus,\n\t\tdateDisabled,\n\t\thandleRequestClose,\n\t\thandleCalendarChange,\n\t\trelativeYearFrom,\n\t\trelativeYearTo,\n\t]);\n\n\tconst getDialog = useCallback(() => {\n\t\t// SLDS override\n\t\tconst style = menuPosition !== 'relative' ? { transform: 'none' } : {};\n\n\t\tif (disabled || !getIsOpen()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst dialogProps = {\n\t\t\talign: `bottom ${align}` as const,\n\t\t\tcontentsClassName: classNames(\n\t\t\t\t'slds-datepicker slds-dropdown',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_right':\n\t\t\t\t\t\tmenuPosition === 'relative' && align === 'right',\n\t\t\t\t\t'slds-dropdown_left': menuPosition === 'relative' && align === 'left',\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tcontext: iconSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tstyle,\n\t\t\tonClose: handleClose,\n\t\t\tonOpen: handleOpen,\n\t\t\tonRequestTargetElement: () => inputRef.current,\n\t\t\tposition: menuPosition,\n\t\t\tportalMount,\n\t\t};\n\n\t\treturn (\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t<Dialog {...(dialogProps as any)}>{getDatePicker()}</Dialog>\n\t\t);\n\t}, [\n\t\tmenuPosition,\n\t\tdisabled,\n\t\tgetIsOpen,\n\t\talign,\n\t\tclassName,\n\t\ticonSettingsContext,\n\t\thasStaticAlignment,\n\t\thandleClose,\n\t\thandleOpen,\n\t\tportalMount,\n\t\tgetDatePicker,\n\t]);\n\n\tconst getInputProps = useCallback(() => {\n\t\tconst defaultInputProps = {\n\t\t\ticonRight: (\n\t\t\t\t<InputIcon\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveTextOpenCalendar || assistiveText.openCalendar,\n\t\t\t\t\t}}\n\t\t\t\t\taria-haspopup\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\tname=\"event\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\topenDialogFromIcon();\n\t\t\t\t\t}}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t),\n\t\t\tinputRef: (component: HTMLInputElement | null) => {\n\t\t\t\tsetInputRefCallback(component);\n\t\t\t},\n\t\t\tid: getId(),\n\t\t\tonChange: handleInputChange,\n\t\t\tonClick: () => {\n\t\t\t\topenDialog();\n\t\t\t},\n\t\t\tonKeyDown: handleKeyDown,\n\t\t\tvalue: value ? formatter(value) : inputValue,\n\t\t};\n\n\t\tconst topLevelDeprecatedComponentProps = {\n\t\t\tdisabled,\n\t\t\tlabel: label || labels.label,\n\t\t\tonBlur,\n\t\t\tonFocus,\n\t\t\tplaceholder: placeholder || labels.placeholder,\n\t\t\trequired,\n\t\t};\n\n\t\tconst childrenProps = (children?.props || {}) as Record<string, unknown>;\n\t\tconst childrenPropInputProps = {\n\t\t\t...childrenProps,\n\t\t\tonClick: () => {\n\t\t\t\topenDialog();\n\t\t\t\tif (typeof childrenProps.onClick === 'function') {\n\t\t\t\t\tchildrenProps.onClick();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\n\t\tconst inputRenderProps = input?.props || {};\n\n\t\treturn {\n\t\t\t...defaultInputProps,\n\t\t\t...topLevelDeprecatedComponentProps,\n\t\t\t...childrenPropInputProps,\n\t\t\t...inputRenderProps,\n\t\t};\n\t}, [\n\t\tassistiveTextOpenCalendar,\n\t\tassistiveText.openCalendar,\n\t\tgetIsOpen,\n\t\topenDialogFromIcon,\n\t\tsetInputRefCallback,\n\t\tgetId,\n\t\thandleInputChange,\n\t\topenDialog,\n\t\thandleKeyDown,\n\t\tvalue,\n\t\tformatter,\n\t\tinputValue,\n\t\tdisabled,\n\t\tlabel,\n\t\tlabels.label,\n\t\tlabels.placeholder,\n\t\tonBlur,\n\t\tonFocus,\n\t\tplaceholder,\n\t\trequired,\n\t\tchildren,\n\t\tinput,\n\t]);\n\n\t// ===== Main Render =====\n\n\tconst inputProps = getInputProps();\n\n\t// `children` prop is a deprecated API\n\tconst inputToRender = children ? (\n\t\tReact.cloneElement(children, inputProps as Record<string, unknown>)\n\t) : (\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t<Input {...(inputProps as any)} />\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={triggerRef}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t{\n\t\t\t\t\t'slds-has-error': hasError,\n\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t},\n\t\t\t\ttriggerClassName\n\t\t\t)}\n\t\t>\n\t\t\t{inputToRender}\n\t\t\t{getDialog()}\n\t\t</div>\n\t);\n};\n\nDatepicker.displayName = DATE_PICKER;\n\nexport default Datepicker;\n"],"mappings":"ywBA4IA,IAAM,GAA0D,CAC/D,UAAW,aACX,aAAc,gBAC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QAAM,aAAa,EAAU,CAAqC,GAGlE,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAAO,GAAK,CAAqB,CAAA,EAGlC,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CACC,IAAK,EACL,WAAA,EAAW,EAAA,QAAA,CACV,wBACA,8BACA,8BACA,CACC,iBAAkB,GAClB,eAAgB,EAAU,CAC3B,EACA,EACD,EAXD,SAAA,CAaE,GACA,GAAU,CACP,GAEP,EAEA,EAAW,YAAc,EAAA"}
1
+ {"version":3,"file":"date-picker.cjs","names":[],"sources":["../../../../components/date-picker/date-picker.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, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype KeyboardEvent,\n\ttype ChangeEvent,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport classNames from 'classnames';\n\nimport Dialog from '../utilities/dialog';\nimport CalendarWrapper from './private/calendar-wrapper';\nimport InputIcon from '../icon/input-icon';\nimport Input from '../input';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport EventUtil from '../../utilities/event';\nimport KEYS from '../../utilities/key-code';\nimport lowPriorityWarning from '../../utilities/warning/low-priority-warning';\n\nimport { DATE_PICKER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\nimport { IconSettingsContext } from '../icon-settings';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\n// ===== Types =====\n\nexport interface DatePickerAssistiveText {\n\tnextMonth?: string;\n\topenCalendar?: string;\n\tpreviousMonth?: string;\n\tyear?: string;\n}\n\nexport interface DatePickerLabels {\n\tabbreviatedWeekDays?: string[];\n\tlabel?: string;\n\tmonths?: string[];\n\tplaceholder?: string;\n\ttoday?: string;\n\tweekDays?: string[];\n}\n\nexport interface DatePickerChangeData {\n\tdate: Date;\n\tformattedDate: string;\n\ttimezoneOffset: number;\n}\n\n/**\n * What caused the DatePicker to request opening its calendar.\n * - `input-click`: the input (or deprecated `children` input) was clicked\n * - `icon-click`: the calendar icon button was clicked\n * - `keyboard`: Down or Up arrow was pressed in the input\n */\nexport type DatePickerRequestOpenTrigger =\n\t'input-click' | 'icon-click' | 'keyboard';\n\n/** Data passed to `onRequestOpen` */\nexport interface DatePickerRequestOpenData {\n\t/** What caused the open request */\n\ttrigger: DatePickerRequestOpenTrigger;\n}\n\n/**\n * What caused the DatePicker to request closing its calendar.\n * - `date-select`: a date was selected in the calendar (click, Space, or Enter)\n * - `escape`: Escape was pressed in the input or in the calendar\n * - `enter`: Enter was pressed in the input\n * - `click-outside`: a mousedown/touchstart happened outside the DatePicker\n */\nexport type DatePickerRequestCloseTrigger =\n\t'date-select' | 'escape' | 'enter' | 'click-outside';\n\n/** Data passed to `onRequestClose` */\nexport interface DatePickerRequestCloseData {\n\t/** What caused the close request */\n\ttrigger: DatePickerRequestCloseTrigger;\n}\n\n/** Data passed to `onClose` */\nexport interface DatePickerCloseData {\n\t/**\n\t * `true` when the close was reported by the calendar dialog unmounting. The calendar\n\t * dialog is unmounted whenever the DatePicker closes, so this is currently always `true`.\n\t */\n\tcomponentWillUnmount: boolean;\n}\n\nexport interface DatePickerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DatePickerAssistiveText;\n\t/** Alignment of dropdown */\n\talign?: 'left' | 'right';\n\t/** CSS classes for datepicker */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Children (deprecated - use input prop) */\n\tchildren?: ReactElement;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Function to determine if a date should be disabled */\n\tdateDisabled?: (date: Date) => boolean;\n\t/** Date formatting function */\n\tformatter?: (date: Date | null | undefined) => string;\n\t/** Initial formatted value (deprecated) */\n\tformattedValue?: string;\n\t/** Whether to show error state */\n\thasError?: boolean;\n\t/** Prevent dropdown position flipping */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Whether dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Make Monday first day of week */\n\tisIsoWeekday?: boolean;\n\t/** Text labels for internationalization */\n\tlabels?: DatePickerLabels;\n\t/** Menu position strategy */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Called when calendar focus changes */\n\tonCalendarFocus?: (\n\t\tevent: React.SyntheticEvent | null,\n\t\tdata: { date?: Date; ref?: HTMLElement; direction?: string }\n\t) => void;\n\t/** Called when date changes */\n\tonChange?: (event: React.SyntheticEvent, data: DatePickerChangeData) => void;\n\t/**\n\t * Called after the calendar has closed. `event` is `undefined` because the close\n\t * is reported when the calendar dialog unmounts, not by a user event.\n\t */\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: DatePickerCloseData\n\t) => void;\n\t/** Called when calendar opens */\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: { portal?: HTMLElement }\n\t) => void;\n\t/**\n\t * Called when the calendar requests to close. Only fires while the calendar is open.\n\t * `event` is the triggering React event; for `trigger: 'click-outside'` it is the\n\t * native `mousedown`/`touchstart` event from the document listener. It is typed as\n\t * possibly `undefined` because the internal calendar's close request has an optional event.\n\t * In uncontrolled mode the calendar also closes itself; in controlled mode (`isOpen`)\n\t * set `isOpen` to `false` here.\n\t */\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent | MouseEvent | TouchEvent | undefined,\n\t\tdata: DatePickerRequestCloseData\n\t) => void;\n\t/**\n\t * Called when the calendar requests to open. If provided, the calendar does not open\n\t * itself: set `isOpen` to `true` here. Not fired by the arrow keys while already open.\n\t */\n\tonRequestOpen?: (\n\t\tevent: React.MouseEvent | KeyboardEvent,\n\t\tdata: DatePickerRequestOpenData\n\t) => void;\n\t/** Date parsing function */\n\tparser?: (str: string) => Date;\n\t/** Portal mount function */\n\tportalMount?: (element: ReactNode, container: HTMLElement) => void;\n\t/** Years before current year in dropdown */\n\trelativeYearFrom?: number;\n\t/** Years after current year in dropdown */\n\trelativeYearTo?: number;\n\t/** CSS classes for trigger wrapper */\n\ttriggerClassName?: string | string[] | Record<string, boolean>;\n\t/** Selected date value */\n\tvalue?: Date;\n\t/** @deprecated Use labels.label */\n\tlabel?: string;\n\t/** @deprecated Use labels.placeholder */\n\tplaceholder?: string;\n\t/** @deprecated Use assistiveText.openCalendar */\n\tassistiveTextOpenCalendar?: string;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Blur handler */\n\tonBlur?: (event: React.FocusEvent) => void;\n\t/** Focus handler */\n\tonFocus?: (event: React.FocusEvent) => void;\n\t/** Keydown handler */\n\tonKeyDown?: (event: KeyboardEvent, data: Record<string, unknown>) => void;\n}\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<DatePickerAssistiveText> = {\n\tnextMonth: 'Next month',\n\topenCalendar: 'Open Calendar',\n\tpreviousMonth: 'Previous month',\n\tyear: 'Year',\n};\n\nconst defaultLabels: Required<DatePickerLabels> = {\n\tabbreviatedWeekDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n\tlabel: '',\n\tmonths: [\n\t\t'January',\n\t\t'February',\n\t\t'March',\n\t\t'April',\n\t\t'May',\n\t\t'June',\n\t\t'July',\n\t\t'August',\n\t\t'September',\n\t\t'October',\n\t\t'November',\n\t\t'December',\n\t],\n\tplaceholder: 'Pick a Date',\n\ttoday: 'Today',\n\tweekDays: [\n\t\t'Sunday',\n\t\t'Monday',\n\t\t'Tuesday',\n\t\t'Wednesday',\n\t\t'Thursday',\n\t\t'Friday',\n\t\t'Saturday',\n\t],\n};\n\nconst defaultFormatter = (date: Date | null | undefined): string => {\n\treturn date\n\t\t? `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`\n\t\t: '';\n};\n\nconst defaultParser = (str: string): Date => {\n\tlowPriorityWarning(\n\t\tfalse,\n\t\t`Please use an external library for date parsing and internationalization like MomentJS (https://github.com/moment/moment/) instead of the default parser.`\n\t);\n\treturn new Date(str);\n};\n\n// ===== Component =====\n\nconst Datepicker: React.FC<DatePickerProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\talign = 'left',\n\t\tclassName,\n\t\tchildren,\n\t\tdisabled,\n\t\tdateDisabled = () => false,\n\t\tformatter = defaultFormatter,\n\t\tformattedValue: formattedValueProp,\n\t\thasError,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinput,\n\t\tisOpen: isOpenProp,\n\t\tisIsoWeekday,\n\t\tlabels: labelsProp = {},\n\t\tmenuPosition = 'absolute',\n\t\tonCalendarFocus,\n\t\tonChange,\n\t\tonClose,\n\t\tonOpen,\n\t\tonRequestClose,\n\t\tonRequestOpen,\n\t\tparser = defaultParser,\n\t\tportalMount,\n\t\trelativeYearFrom = -10,\n\t\trelativeYearTo = 10,\n\t\ttriggerClassName,\n\t\tvalue,\n\t\t// Deprecated props\n\t\tlabel,\n\t\tplaceholder,\n\t\tassistiveTextOpenCalendar,\n\t\trequired,\n\t\tonBlur,\n\t\tonFocus,\n\t\tonKeyDown,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst triggerRef = useRef<HTMLDivElement | null>(null);\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst selectedDateCellRef = useRef<HTMLElement | null>(null);\n\tconst generatedId = useRef(generateId());\n\n\t// State\n\tconst [isOpenState, setIsOpenState] = useState(false);\n\tconst [isOpenFromIcon, setIsOpenFromIcon] = useState(false);\n\tconst [internalValue, setInternalValue] = useState<Date | undefined>(value);\n\tconst [formattedValue, setFormattedValue] = useState(() => {\n\t\tconst dateString = formatter(value);\n\t\treturn value ? dateString : formattedValueProp || '';\n\t});\n\tconst [inputValue, setInputValue] = useState(() => {\n\t\tconst dateString = formatter(value);\n\t\treturn value ? dateString : formattedValueProp || '';\n\t});\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount (only in development)\n\tuseEffect(() => {\n\t\tif (typeof checkProps === 'function') {\n\t\t\tcheckProps(\n\t\t\t\tDATE_PICKER,\n\t\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\t\tcomponentDoc\n\t\t\t);\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst parseDate = useCallback(\n\t\t(dateString: string): Date => {\n\t\t\tlet parsedDate = parser(dateString);\n\t\t\tif (\n\t\t\t\tObject.prototype.toString.call(parsedDate) !== '[object Date]' ||\n\t\t\t\tisNaN(parsedDate.getTime())\n\t\t\t) {\n\t\t\t\tparsedDate = new Date();\n\t\t\t}\n\t\t\treturn parsedDate;\n\t\t},\n\t\t[parser]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleRequestClose = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent | MouseEvent | TouchEvent | undefined,\n\t\t\tdata: DatePickerRequestCloseData\n\t\t) => {\n\t\t\t// Only request a close while open, so `onRequestClose` never fires when\n\t\t\t// the calendar is already closed (e.g. Escape in a closed input).\n\t\t\tif (!getIsOpen()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonRequestClose?.(event, data);\n\n\t\t\tsetIsOpenState(false);\n\t\t\tsetIsOpenFromIcon(false);\n\n\t\t\tif (inputRef.current) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[onRequestClose, getIsOpen]\n\t);\n\n\tconst handleCalendarRequestClose = useCallback(\n\t\t(event?: React.SyntheticEvent) => {\n\t\t\t// The calendar's only close request is Escape (see `CalendarWrapper#handleKeyDown`)\n\t\t\thandleRequestClose(event, { trigger: 'escape' });\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\tconst handleClose = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent | undefined,\n\t\t\tdata?: { componentWillUnmount?: boolean }\n\t\t) => {\n\t\t\tonClose?.(event, {\n\t\t\t\tcomponentWillUnmount: !!data?.componentWillUnmount,\n\t\t\t});\n\t\t},\n\t\t[onClose]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent | undefined,\n\t\t\tdata: { portal?: HTMLElement }\n\t\t) => {\n\t\t\tif (onOpen) {\n\t\t\t\tonOpen(event, data);\n\t\t\t}\n\n\t\t\tif (selectedDateCellRef.current && isOpenFromIcon) {\n\t\t\t\tselectedDateCellRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[onOpen, isOpenFromIcon]\n\t);\n\n\tconst openDialog = useCallback(\n\t\t(\n\t\t\tevent: React.MouseEvent | KeyboardEvent,\n\t\t\tdata: DatePickerRequestOpenData,\n\t\t\tfromIcon = false\n\t\t) => {\n\t\t\tif (!fromIcon) {\n\t\t\t\tsetIsOpenFromIcon(false);\n\t\t\t}\n\t\t\tif (onRequestOpen) {\n\t\t\t\tonRequestOpen(event, data);\n\t\t\t} else {\n\t\t\t\tsetIsOpenState(true);\n\t\t\t}\n\t\t},\n\t\t[onRequestOpen]\n\t);\n\n\tconst openDialogFromIcon = useCallback(\n\t\t(event: React.MouseEvent) => {\n\t\t\tsetIsOpenFromIcon(true);\n\t\t\topenDialog(event, { trigger: 'icon-click' }, true);\n\t\t},\n\t\t[openDialog]\n\t);\n\n\tconst handleCalendarChange = useCallback(\n\t\t(event: React.SyntheticEvent, { date }: { date: Date }) => {\n\t\t\tif (!value) {\n\t\t\t\tsetInternalValue(date);\n\t\t\t\tsetFormattedValue(formatter(date));\n\t\t\t\tsetInputValue(formatter(date));\n\t\t\t}\n\n\t\t\thandleRequestClose(event, { trigger: 'date-select' });\n\n\t\t\tif (onChange) {\n\t\t\t\tonChange(event, {\n\t\t\t\t\tdate,\n\t\t\t\t\tformattedDate: formatter(date),\n\t\t\t\t\ttimezoneOffset: date.getTimezoneOffset(),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[value, formatter, handleRequestClose, onChange]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t// Typing in the input closes the calendar when it's used as an uncontrolled component\n\t\t\tif (typeof isOpenProp !== 'boolean' && isOpenState) {\n\t\t\t\tsetIsOpenState(false);\n\t\t\t}\n\n\t\t\tsetFormattedValue(event.target.value);\n\t\t\tsetInputValue(event.target.value);\n\n\t\t\tconst date = parser(event.target.value);\n\n\t\t\tif (onChange) {\n\t\t\t\tonChange(event, {\n\t\t\t\t\tdate,\n\t\t\t\t\tformattedDate: event.target.value,\n\t\t\t\t\ttimezoneOffset: date.getTimezoneOffset(),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[isOpenProp, isOpenState, parser, onChange]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: KeyboardEvent<HTMLInputElement>) => {\n\t\t\t// Don't open if user is selecting text\n\t\t\tif (\n\t\t\t\tevent.keyCode &&\n\t\t\t\t!event.shiftKey &&\n\t\t\t\t(event.keyCode === KEYS.DOWN || event.keyCode === KEYS.UP)\n\t\t\t) {\n\t\t\t\tEventUtil.trapEvent(event);\n\t\t\t\t// Go through the same request path as clicking, so a controlled\n\t\t\t\t// DatePicker hears about keyboard opens via `onRequestOpen`\n\t\t\t\tif (!getIsOpen()) {\n\t\t\t\t\topenDialog(event, { trigger: 'keyboard' });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (event.keyCode === KEYS.ESCAPE || event.keyCode === KEYS.ENTER) {\n\t\t\t\tEventUtil.trapEvent(event);\n\t\t\t\thandleRequestClose(event, {\n\t\t\t\t\ttrigger: event.keyCode === KEYS.ESCAPE ? 'escape' : 'enter',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (onKeyDown) {\n\t\t\t\tonKeyDown(event, {});\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, openDialog, handleRequestClose, onKeyDown]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event, { trigger: 'click-outside' });\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\t// Detect clicks outside the trigger/calendar and close the dialog. Anchored\n\t// on the trigger element so this works whether the DatePicker is controlled\n\t// (`onRequestClose` is invoked via `handleRequestClose`) or uncontrolled\n\t// (internal open state is reset). The trigger carries the\n\t// `ignore-react-onclickoutside` class and, in `overflowBoundaryElement`\n\t// mode, so does the portaled calendar, so clicks within the calendar are\n\t// treated as inside.\n\tuseClickOutside(triggerRef, handleClickOutside, {\n\t\tenabled: getIsOpen(),\n\t\tignoreClass: 'ignore-react-onclickoutside',\n\t});\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t},\n\t\t[inputRendered]\n\t);\n\n\t// ===== Render Helpers =====\n\n\tconst getDatePicker = useCallback(() => {\n\t\tlet date: Date;\n\t\t// Use props if present. Otherwise, use state.\n\t\tif (value) {\n\t\t\tconst formattedDate = formatter(value);\n\t\t\tdate = formattedDate ? parseDate(formattedDate) : value;\n\t\t} else {\n\t\t\tdate = formattedValue\n\t\t\t\t? parseDate(formattedValue)\n\t\t\t\t: internalValue || new Date();\n\t\t}\n\n\t\treturn (\n\t\t\t<CalendarWrapper\n\t\t\t\tabbreviatedWeekDayLabels={labels.abbreviatedWeekDays}\n\t\t\t\tassistiveTextNextMonth={assistiveText.nextMonth}\n\t\t\t\tassistiveTextPreviousMonth={assistiveText.previousMonth}\n\t\t\t\tassistiveTextYear={assistiveText.year}\n\t\t\t\tcanFocusCalendar={isOpenFromIcon}\n\t\t\t\tid={getId()}\n\t\t\t\tisIsoWeekday={isIsoWeekday}\n\t\t\t\tmonthLabels={labels.months}\n\t\t\t\tonCalendarFocus={onCalendarFocus}\n\t\t\t\tdateDisabled={dateDisabled}\n\t\t\t\tonRequestClose={handleCalendarRequestClose}\n\t\t\t\tonSelectDate={handleCalendarChange}\n\t\t\t\trelativeYearFrom={relativeYearFrom}\n\t\t\t\trelativeYearTo={relativeYearTo}\n\t\t\t\tselectedDate={date}\n\t\t\t\tselectedDateRef={(component: HTMLElement | null) => {\n\t\t\t\t\tselectedDateCellRef.current = component;\n\t\t\t\t}}\n\t\t\t\ttodayLabel={labels.today}\n\t\t\t\tweekDayLabels={labels.weekDays}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvalue,\n\t\tformatter,\n\t\tparseDate,\n\t\tformattedValue,\n\t\tinternalValue,\n\t\tlabels,\n\t\tassistiveText,\n\t\tisOpenFromIcon,\n\t\tgetId,\n\t\tisIsoWeekday,\n\t\tonCalendarFocus,\n\t\tdateDisabled,\n\t\thandleCalendarRequestClose,\n\t\thandleCalendarChange,\n\t\trelativeYearFrom,\n\t\trelativeYearTo,\n\t]);\n\n\tconst getDialog = useCallback(() => {\n\t\t// SLDS override\n\t\tconst style = menuPosition !== 'relative' ? { transform: 'none' } : {};\n\n\t\tif (disabled || !getIsOpen()) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst dialogProps = {\n\t\t\talign: `bottom ${align}` as const,\n\t\t\tcontentsClassName: classNames(\n\t\t\t\t'slds-datepicker slds-dropdown',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_right':\n\t\t\t\t\t\tmenuPosition === 'relative' && align === 'right',\n\t\t\t\t\t'slds-dropdown_left': menuPosition === 'relative' && align === 'left',\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tcontext: iconSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tstyle,\n\t\t\tonClose: handleClose,\n\t\t\tonOpen: handleOpen,\n\t\t\tonRequestTargetElement: () => inputRef.current,\n\t\t\tposition: menuPosition,\n\t\t\tportalMount,\n\t\t};\n\n\t\treturn (\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t<Dialog {...(dialogProps as any)}>{getDatePicker()}</Dialog>\n\t\t);\n\t}, [\n\t\tmenuPosition,\n\t\tdisabled,\n\t\tgetIsOpen,\n\t\talign,\n\t\tclassName,\n\t\ticonSettingsContext,\n\t\thasStaticAlignment,\n\t\thandleClose,\n\t\thandleOpen,\n\t\tportalMount,\n\t\tgetDatePicker,\n\t]);\n\n\tconst getInputProps = useCallback(() => {\n\t\tconst defaultInputProps = {\n\t\t\ticonRight: (\n\t\t\t\t<InputIcon\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveTextOpenCalendar || assistiveText.openCalendar,\n\t\t\t\t\t}}\n\t\t\t\t\taria-haspopup\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\tname=\"event\"\n\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\topenDialogFromIcon(event);\n\t\t\t\t\t}}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t),\n\t\t\tinputRef: (component: HTMLInputElement | null) => {\n\t\t\t\tsetInputRefCallback(component);\n\t\t\t},\n\t\t\tid: getId(),\n\t\t\tonChange: handleInputChange,\n\t\t\tonClick: (event: React.MouseEvent<HTMLInputElement>) => {\n\t\t\t\topenDialog(event, { trigger: 'input-click' });\n\t\t\t},\n\t\t\tonKeyDown: handleKeyDown,\n\t\t\tvalue: value ? formatter(value) : inputValue,\n\t\t};\n\n\t\tconst topLevelDeprecatedComponentProps = {\n\t\t\tdisabled,\n\t\t\tlabel: label || labels.label,\n\t\t\tonBlur,\n\t\t\tonFocus,\n\t\t\tplaceholder: placeholder || labels.placeholder,\n\t\t\trequired,\n\t\t};\n\n\t\tconst childrenProps = (children?.props || {}) as Record<string, unknown>;\n\t\tconst childrenPropInputProps = {\n\t\t\t...childrenProps,\n\t\t\tonClick: (event: React.MouseEvent<HTMLInputElement>) => {\n\t\t\t\topenDialog(event, { trigger: 'input-click' });\n\t\t\t\tif (typeof childrenProps.onClick === 'function') {\n\t\t\t\t\tchildrenProps.onClick();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\n\t\tconst inputRenderProps = input?.props || {};\n\n\t\treturn {\n\t\t\t...defaultInputProps,\n\t\t\t...topLevelDeprecatedComponentProps,\n\t\t\t...childrenPropInputProps,\n\t\t\t...inputRenderProps,\n\t\t};\n\t}, [\n\t\tassistiveTextOpenCalendar,\n\t\tassistiveText.openCalendar,\n\t\tgetIsOpen,\n\t\topenDialogFromIcon,\n\t\tsetInputRefCallback,\n\t\tgetId,\n\t\thandleInputChange,\n\t\topenDialog,\n\t\thandleKeyDown,\n\t\tvalue,\n\t\tformatter,\n\t\tinputValue,\n\t\tdisabled,\n\t\tlabel,\n\t\tlabels.label,\n\t\tlabels.placeholder,\n\t\tonBlur,\n\t\tonFocus,\n\t\tplaceholder,\n\t\trequired,\n\t\tchildren,\n\t\tinput,\n\t]);\n\n\t// ===== Main Render =====\n\n\tconst inputProps = getInputProps();\n\n\t// `children` prop is a deprecated API\n\tconst inputToRender = children ? (\n\t\tReact.cloneElement(children, inputProps as Record<string, unknown>)\n\t) : (\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t<Input {...(inputProps as any)} />\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={triggerRef}\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t{\n\t\t\t\t\t'slds-has-error': hasError,\n\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t},\n\t\t\t\ttriggerClassName\n\t\t\t)}\n\t\t>\n\t\t\t{inputToRender}\n\t\t\t{getDialog()}\n\t\t</div>\n\t);\n};\n\nDatepicker.displayName = DATE_PICKER;\n\nexport default Datepicker;\n"],"mappings":"ywBA0MA,IAAM,GAA0D,CAC/D,UAAW,aACX,aAAc,gBACd,cAAe,iBACf,KAAM,MACP,EAEM,GAA4C,CACjD,oBAAqB,CAAC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAK,EACrE,MAAO,GACP,OAAQ,CACP,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,UACD,EACA,YAAa,cACb,MAAO,QACP,SAAU,CACT,SACA,SACA,UACA,YACA,WACA,SACA,UACD,CACD,EAEM,GAAoB,GAClB,EACJ,GAAG,EAAK,SAAS,EAAI,EAAE,GAAG,EAAK,QAAQ,EAAE,GAAG,EAAK,YAAY,IAC7D,GAGE,GAAiB,IACtB,GAAA,QACC,GACA,2JACD,EACO,IAAI,KAAK,CAAG,GAKd,EAAyC,GAAU,CACxD,GAAM,CACL,cAAe,GAAoB,CAAC,EACpC,QAAQ,OACR,YACA,WACA,WACA,mBAAqB,GACrB,YAAY,GACZ,eAAgB,EAChB,YACA,sBACA,GAAI,GACJ,SACA,OAAQ,EACR,gBACA,OAAQ,GAAa,CAAC,EACtB,eAAe,WACf,kBACA,WACA,UACA,SACA,iBACA,gBACA,SAAS,GACT,cACA,mBAAmB,IACnB,iBAAiB,GACjB,oBACA,QAEA,QACA,cACA,4BACA,WACA,SACA,UACA,aACG,EAGE,GAAA,EAAgB,EAAA,QAAA,CAAO,CAAC,EAAG,GAAsB,EAAiB,EAClE,GAAA,EAAS,EAAA,QAAA,CAAO,CAAC,EAAG,GAAe,EAAU,EAG7C,GAAA,EAAsB,EAAA,WAAA,CAAW,EAAA,mBAAmB,EAGpD,GAAA,EAAa,EAAA,OAAA,CAA8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ACrC,GAAmB,CAAK,CACzB,EACA,KAAK,QACL,CAAA,EAEF,SAAW,GAAuC,CACjD,GAAoB,CAAS,CAC9B,EACA,GAAI,EAAM,EACV,SAAU,GACV,QAAU,GAA8C,CACvD,EAAW,EAAO,CAAE,QAAS,aAAc,CAAC,CAC7C,EACA,UAAW,GACX,MAAO,EAAQ,EAAU,CAAK,EAAI,EACnC,EAEM,EAAmC,CACxC,WACA,MAAO,GAAS,EAAO,MACvB,SACA,UACA,YAAa,GAAe,EAAO,YACnC,UACD,EAEM,EAAiB,GAAU,OAAS,CAAC,EACrC,EAAyB,CAC9B,GAAG,EACH,QAAU,GAA8C,CACvD,EAAW,EAAO,CAAE,QAAS,aAAc,CAAC,EACxC,OAAO,EAAc,SAAY,YACpC,EAAc,QAAQ,CAExB,CACD,EAEM,GAAmB,IAAO,OAAS,CAAC,EAE1C,MAAO,CACN,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACJ,CACD,EAAG,CACF,EACA,EAAc,aACd,EACA,GACA,GACA,EACA,GACA,EACA,GACA,EACA,EACA,GACA,EACA,EACA,EAAO,MACP,EAAO,YACP,EACA,EACA,EACA,EACA,EACA,EACD,CAImB,CAAA,CAAc,EAG3B,GAAgB,EACrB,EAAA,QAAM,aAAa,EAAU,EAAqC,GAGlE,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAAO,GAAK,EAAqB,CAAA,EAGlC,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CACC,IAAK,EACL,WAAA,EAAW,EAAA,QAAA,CACV,wBACA,8BACA,8BACA,CACC,iBAAkB,GAClB,eAAgB,EAAU,CAC3B,EACA,EACD,EAXD,SAAA,CAaE,GACA,GAAU,CACP,GAEP,EAEA,EAAW,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("./date-picker.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.forwardRef)((t,r)=>(0,n.jsx)(`div`,{children:(0,n.jsx)(e.default,{...t})}));r.displayName=`DatepickerWithClickOutside`,exports.default=r;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./date-picker.cjs");let t=require("react"),n=require("react/jsx-runtime");var r=(0,t.forwardRef)((t,r)=>(0,n.jsx)(`div`,{children:(0,n.jsx)(e.default,{...t})}));r.displayName=`DatepickerWithClickOutside`,exports.default=r;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/date-picker/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 { forwardRef, type ForwardedRef } from 'react';\nimport Datepicker, { type DatePickerProps } from './date-picker';\n\nexport type {\n\tDatePickerProps,\n\tDatePickerAssistiveText,\n\tDatePickerLabels,\n\tDatePickerChangeData,\n} from './date-picker';\n\n/**\n * DatePicker wrapper preserved for markup/backwards compatibility.\n *\n * Click-outside detection now lives inside the DatePicker component itself\n * (see `date-picker.tsx`) so it can call the internal close handler directly\n * and work for both controlled and uncontrolled usage. This replaces the\n * react-onclickoutside HOC that was removed for React 19 compatibility.\n */\nconst DatepickerWithClickOutside = forwardRef<HTMLDivElement, DatePickerProps>(\n\t(props, _ref: ForwardedRef<HTMLDivElement>) => (\n\t\t<div>\n\t\t\t<Datepicker {...props} />\n\t\t</div>\n\t)\n);\n\nDatepickerWithClickOutside.displayName = 'DatepickerWithClickOutside';\n\nexport default DatepickerWithClickOutside;\n"],"mappings":"2FAqBA,IAAM,GAAA,EAA6B,EAAA,WAAA,EACjC,EAAO,KACP,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAY,GAAI,CAAQ,CAAA,CACpB,CAAA,CAEP,EAEA,EAA2B,YAAc"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/date-picker/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 { forwardRef, type ForwardedRef } from 'react';\nimport Datepicker, { type DatePickerProps } from './date-picker';\n\nexport type {\n\tDatePickerProps,\n\tDatePickerAssistiveText,\n\tDatePickerLabels,\n\tDatePickerChangeData,\n\tDatePickerCloseData,\n\tDatePickerRequestCloseData,\n\tDatePickerRequestCloseTrigger,\n\tDatePickerRequestOpenData,\n\tDatePickerRequestOpenTrigger,\n} from './date-picker';\n\n/**\n * DatePicker wrapper preserved for markup/backwards compatibility.\n *\n * Click-outside detection now lives inside the DatePicker component itself\n * (see `date-picker.tsx`) so it can call the internal close handler directly\n * and work for both controlled and uncontrolled usage. This replaces the\n * react-onclickoutside HOC that was removed for React 19 compatibility.\n */\nconst DatepickerWithClickOutside = forwardRef<HTMLDivElement, DatePickerProps>(\n\t(props, _ref: ForwardedRef<HTMLDivElement>) => (\n\t\t<div>\n\t\t\t<Datepicker {...props} />\n\t\t</div>\n\t)\n);\n\nDatepickerWithClickOutside.displayName = 'DatepickerWithClickOutside';\n\nexport default DatepickerWithClickOutside;\n"],"mappings":"0LA0BA,IAAM,GAAA,EAA6B,EAAA,WAAA,EACjC,EAAO,KACP,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAY,GAAI,CAAQ,CAAA,CACpB,CAAA,CAEP,EAEA,EAA2B,YAAc"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../button/index.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={expandButton:`Expand`,minimizeButton:`Minimize`,closeButton:`Close`},a=({assistiveText:e,body:a,classNameContainer:o,events:s={},header:c,id:l,isOpen:u})=>{let d=(0,n.useId)(),f=l||d,p={...i,...e},m=u?`slds-is-open`:`slds-is-closed`;return(0,r.jsx)(`div`,{id:`${f}-container`,className:`slds-docked_container${o?` ${o}`:``}`,children:(0,r.jsxs)(`section`,{className:`slds-docked-composer slds-grid slds-grid_vertical ${m}`,role:`dialog`,"aria-labelledby":`${f}-dialog-heading`,"aria-describedby":`${f}-body`,children:[(0,r.jsxs)(`header`,{className:`slds-docked-composer__header slds-grid slds-shrink-none`,"aria-live":`assertive`,children:[(0,r.jsx)(`div`,{className:`slds-media slds-media_center slds-no-space`,children:(0,r.jsx)(`div`,{className:`slds-media__body`,children:(0,r.jsx)(`h2`,{className:`slds-truncate`,id:`${f}-dialog-heading`,title:typeof c==`string`?c:void 0,children:c})})}),(0,r.jsxs)(`div`,{className:`slds-col_bump-left slds-shrink-none`,children:[u?(0,r.jsx)(t.default,{id:`${f}-minimize-button`,title:p.minimizeButton,assistiveText:{icon:p.minimizeButton},onClick:s.onRequestMinimize,iconCategory:`utility`,iconName:`minimize_window`,iconVariant:`bare`,variant:`icon`}):(0,r.jsx)(t.default,{id:`${f}-expand-button`,title:p.expandButton,assistiveText:{icon:p.expandButton},onClick:s.onRequestExpand,iconCategory:`utility`,iconName:`expand_alt`,iconVariant:`bare`,variant:`icon`}),(0,r.jsx)(t.default,{id:`${f}-close-button`,title:p.closeButton,assistiveText:{icon:p.closeButton},onClick:s.onRequestClose,iconCategory:`utility`,iconName:`close`,iconVariant:`bare`,variant:`icon`})]})]}),u&&(0,r.jsx)(`div`,{className:`slds-docked-composer__body`,id:`${f}-body`,children:a})]})})};a.displayName=`SLDSDockedComposer`,exports.default=a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../button/index.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={expandButton:`Expand`,minimizeButton:`Minimize`,closeButton:`Close`},a=({assistiveText:e,body:a,classNameContainer:o,events:s={},header:c,id:l,isOpen:u})=>{let d=(0,n.useId)(),f=l||d,p={...i,...e},m=u?`slds-is-open`:`slds-is-closed`;return(0,r.jsx)(`div`,{id:`${f}-container`,className:`slds-docked_container${o?` ${o}`:``}`,children:(0,r.jsxs)(`section`,{className:`slds-docked-composer slds-grid slds-grid_vertical ${m}`,role:`dialog`,"aria-labelledby":`${f}-dialog-heading`,"aria-describedby":`${f}-body`,children:[(0,r.jsxs)(`header`,{className:`slds-docked-composer__header slds-grid slds-shrink-none`,"aria-live":`assertive`,children:[(0,r.jsx)(`div`,{className:`slds-media slds-media_center slds-no-space`,children:(0,r.jsx)(`div`,{className:`slds-media__body`,children:(0,r.jsx)(`h2`,{className:`slds-truncate`,id:`${f}-dialog-heading`,title:typeof c==`string`?c:void 0,children:c})})}),(0,r.jsxs)(`div`,{className:`slds-col_bump-left slds-shrink-none`,children:[u?(0,r.jsx)(t.default,{id:`${f}-minimize-button`,title:p.minimizeButton,assistiveText:{icon:p.minimizeButton},onClick:s.onRequestMinimize,iconCategory:`utility`,iconName:`minimize_window`,iconVariant:`bare`,variant:`icon`}):(0,r.jsx)(t.default,{id:`${f}-expand-button`,title:p.expandButton,assistiveText:{icon:p.expandButton},onClick:s.onRequestExpand,iconCategory:`utility`,iconName:`expand_alt`,iconVariant:`bare`,variant:`icon`}),(0,r.jsx)(t.default,{id:`${f}-close-button`,title:p.closeButton,assistiveText:{icon:p.closeButton},onClick:s.onRequestClose,iconCategory:`utility`,iconName:`close`,iconVariant:`bare`,variant:`icon`})]})]}),u&&(0,r.jsx)(`div`,{className:`slds-docked-composer__body`,id:`${f}-body`,children:a})]})})};a.displayName=`SLDSDockedComposer`,exports.default=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/docked-composer/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, { useId, type ReactNode, type MouseEvent } from 'react';\nimport Button from '../button';\n\n/**\n * Assistive text for DockedComposer\n */\nexport interface DockedComposerAssistiveText {\n\t/** Label for expand button */\n\texpandButton?: string;\n\t/** Label for minimize button */\n\tminimizeButton?: string;\n\t/** Label for close button */\n\tcloseButton?: string;\n}\n\n/**\n * Event handlers for DockedComposer\n */\nexport interface DockedComposerEvents {\n\t/** Called when minimize is requested */\n\tonRequestMinimize?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Called when expand is requested */\n\tonRequestExpand?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Called when close is requested */\n\tonRequestClose?: (event: MouseEvent<HTMLButtonElement>) => void;\n}\n\n/**\n * Props for the DockedComposer component\n */\nexport interface DockedComposerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DockedComposerAssistiveText;\n\t/** Body content */\n\tbody?: ReactNode;\n\t/** Additional container class name */\n\tclassNameContainer?: string;\n\t/** Event handlers */\n\tevents?: DockedComposerEvents;\n\t/** Header text or element */\n\theader?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Whether the composer is open */\n\tisOpen?: boolean;\n}\n\nconst defaultAssistiveText: DockedComposerAssistiveText = {\n\texpandButton: 'Expand',\n\tminimizeButton: 'Minimize',\n\tcloseButton: 'Close',\n};\n\n/**\n * The Docked Composer is a persistent utility bar that allows a user to continually\n * use the app to complete tasks or gather information while expanding/collapsing a composer window.\n */\nconst DockedComposer = ({\n\tassistiveText: propAssistiveText,\n\tbody,\n\tclassNameContainer,\n\tevents = {},\n\theader,\n\tid: propId,\n\tisOpen,\n}: DockedComposerProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\tconst sectionClassName = isOpen ? 'slds-is-open' : 'slds-is-closed';\n\n\treturn (\n\t\t<div\n\t\t\tid={`${id}-container`}\n\t\t\tclassName={`slds-docked_container${classNameContainer ? ` ${classNameContainer}` : ''}`}\n\t\t>\n\t\t\t<section\n\t\t\t\tclassName={`slds-docked-composer slds-grid slds-grid_vertical ${sectionClassName}`}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby={`${id}-dialog-heading`}\n\t\t\t\taria-describedby={`${id}-body`}\n\t\t\t>\n\t\t\t\t<header\n\t\t\t\t\tclassName=\"slds-docked-composer__header slds-grid slds-shrink-none\"\n\t\t\t\t\taria-live=\"assertive\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"slds-media slds-media_center slds-no-space\">\n\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\t\t\t\t\tid={`${id}-dialog-heading`}\n\t\t\t\t\t\t\t\ttitle={typeof header === 'string' ? header : undefined}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_bump-left slds-shrink-none\">\n\t\t\t\t\t\t{isOpen ? (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${id}-minimize-button`}\n\t\t\t\t\t\t\t\ttitle={assistiveText.minimizeButton}\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.minimizeButton }}\n\t\t\t\t\t\t\t\tonClick={events.onRequestMinimize}\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonName=\"minimize_window\"\n\t\t\t\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${id}-expand-button`}\n\t\t\t\t\t\t\t\ttitle={assistiveText.expandButton}\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.expandButton }}\n\t\t\t\t\t\t\t\tonClick={events.onRequestExpand}\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonName=\"expand_alt\"\n\t\t\t\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tid={`${id}-close-button`}\n\t\t\t\t\t\t\ttitle={assistiveText.closeButton}\n\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.closeButton }}\n\t\t\t\t\t\t\tonClick={events.onRequestClose}\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\ticonVariant=\"bare\"\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</header>\n\t\t\t\t{isOpen && (\n\t\t\t\t\t<div className=\"slds-docked-composer__body\" id={`${id}-body`}>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</section>\n\t\t</div>\n\t);\n};\n\nDockedComposer.displayName = 'SLDSDockedComposer';\n\nexport default DockedComposer;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"oKAkDA,IAAM,EAAoD,CACzD,aAAc,SACd,eAAgB,WAChB,YAAa,OACd,EAMM,GAAkB,CACvB,cAAe,EACf,OACA,qBACA,SAAS,CAAC,EACV,SACA,GAAI,EACJ,YAC8C,CAC9C,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EACf,EAAgB,CAAE,GAAG,EAAsB,GAAG,CAAkB,EAEhE,EAAmB,EAAS,eAAiB,iBAEnD,OACC,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,GAAI,GAAG,EAAG,YACV,UAAW,wBAAwB,EAAqB,IAAI,IAAuB,KAEnF,UAAA,EAAA,EAAA,KAAA,CAAC,UAAD,CACC,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CAEP,EAEA,EAAe,YAAc"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/docked-composer/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, { useId, type ReactNode, type MouseEvent } from 'react';\nimport Button from '../button';\n\n/**\n * Assistive text for DockedComposer\n */\nexport interface DockedComposerAssistiveText {\n\t/** Label for expand button */\n\texpandButton?: string;\n\t/** Label for minimize button */\n\tminimizeButton?: string;\n\t/** Label for close button */\n\tcloseButton?: string;\n}\n\n/**\n * Event handlers for DockedComposer\n */\nexport interface DockedComposerEvents {\n\t/** Called when minimize is requested */\n\tonRequestMinimize?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Called when expand is requested */\n\tonRequestExpand?: (event: MouseEvent<HTMLButtonElement>) => void;\n\t/** Called when close is requested */\n\tonRequestClose?: (event: MouseEvent<HTMLButtonElement>) => void;\n}\n\n/**\n * Props for the DockedComposer component\n */\nexport interface DockedComposerProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DockedComposerAssistiveText;\n\t/** Body content */\n\tbody?: ReactNode;\n\t/** Additional container class name */\n\tclassNameContainer?: string;\n\t/** Event handlers */\n\tevents?: DockedComposerEvents;\n\t/** Header text or element */\n\theader?: ReactNode;\n\t/** HTML id */\n\tid?: string;\n\t/** Whether the composer is open */\n\tisOpen?: boolean;\n}\n\nconst defaultAssistiveText: DockedComposerAssistiveText = {\n\texpandButton: 'Expand',\n\tminimizeButton: 'Minimize',\n\tcloseButton: 'Close',\n};\n\n/**\n * The Docked Composer is a persistent utility bar that allows a user to continually\n * use the app to complete tasks or gather information while expanding/collapsing a composer window.\n */\nconst DockedComposer = ({\n\tassistiveText: propAssistiveText,\n\tbody,\n\tclassNameContainer,\n\tevents = {},\n\theader,\n\tid: propId,\n\tisOpen,\n}: DockedComposerProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\tconst sectionClassName = isOpen ? 'slds-is-open' : 'slds-is-closed';\n\n\treturn (\n\t\t<div\n\t\t\tid={`${id}-container`}\n\t\t\tclassName={`slds-docked_container${classNameContainer ? ` ${classNameContainer}` : ''}`}\n\t\t>\n\t\t\t<section\n\t\t\t\tclassName={`slds-docked-composer slds-grid slds-grid_vertical ${sectionClassName}`}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby={`${id}-dialog-heading`}\n\t\t\t\taria-describedby={`${id}-body`}\n\t\t\t>\n\t\t\t\t<header\n\t\t\t\t\tclassName=\"slds-docked-composer__header slds-grid slds-shrink-none\"\n\t\t\t\t\taria-live=\"assertive\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"slds-media slds-media_center slds-no-space\">\n\t\t\t\t\t\t<div className=\"slds-media__body\">\n\t\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\t\tclassName=\"slds-truncate\"\n\t\t\t\t\t\t\t\tid={`${id}-dialog-heading`}\n\t\t\t\t\t\t\t\ttitle={typeof header === 'string' ? header : undefined}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{header}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_bump-left slds-shrink-none\">\n\t\t\t\t\t\t{isOpen ? (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${id}-minimize-button`}\n\t\t\t\t\t\t\t\ttitle={assistiveText.minimizeButton}\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.minimizeButton }}\n\t\t\t\t\t\t\t\tonClick={events.onRequestMinimize}\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonName=\"minimize_window\"\n\t\t\t\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tid={`${id}-expand-button`}\n\t\t\t\t\t\t\t\ttitle={assistiveText.expandButton}\n\t\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.expandButton }}\n\t\t\t\t\t\t\t\tonClick={events.onRequestExpand}\n\t\t\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\t\t\ticonName=\"expand_alt\"\n\t\t\t\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tid={`${id}-close-button`}\n\t\t\t\t\t\t\ttitle={assistiveText.closeButton}\n\t\t\t\t\t\t\tassistiveText={{ icon: assistiveText.closeButton }}\n\t\t\t\t\t\t\tonClick={events.onRequestClose}\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\ticonVariant=\"bare\"\n\t\t\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</header>\n\t\t\t\t{isOpen && (\n\t\t\t\t\t<div className=\"slds-docked-composer__body\" id={`${id}-body`}>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</section>\n\t\t</div>\n\t);\n};\n\nDockedComposer.displayName = 'SLDSDockedComposer';\n\nexport default DockedComposer;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"mQAkDA,IAAM,EAAoD,CACzD,aAAc,SACd,eAAgB,WAChB,YAAa,OACd,EAMM,GAAkB,CACvB,cAAe,EACf,OACA,qBACA,SAAS,CAAC,EACV,SACA,GAAI,EACJ,YAC8C,CAC9C,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EACf,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QAAS,EAAO,eAChB,aAAa,UACb,SAAS,QACT,YAAY,OACZ,QAAQ,MACR,CAAA,CACG,CACE,CAAA,CAAA,CACP,CAAA,EAAA,IACA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BAA6B,GAAI,GAAG,EAAG,OACpD,SAAA,CACG,CAAA,CAEE,GACL,CAAA,CAEP,EAEA,EAAe,YAAc"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/class-names.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({assistiveText:e,className:t,isPaused:a,isStatic:o,scorePolarity:s,strengthLevel:c,title:l,trendDirection:u,variant:d})=>{let f=(()=>{let t=[],n=l||`${d.charAt(0).toUpperCase()}${d.slice(1)}`;return d===`ellie`?t.push((0,i.jsx)(`svg`,{viewBox:`0 0 280 14`,"aria-hidden":`true`,children:Array.from({length:20},(e,t)=>{let n=7+t*14;return(0,i.jsxs)(r.default.Fragment,{children:[(0,i.jsx)(`circle`,{cx:n,cy:`7`,r:`4`}),(0,i.jsx)(`circle`,{cx:n,cy:`7`,r:`3`})]},t)})},`ellie-svg`)):d===`eq`?t.push((0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-1`),(0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-2`),(0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-3`)):d===`score`?t.push((0,i.jsx)(`svg`,{viewBox:`0 0 5 5`,className:`slds-icon-score__positive`,"aria-hidden":`true`,children:(0,i.jsx)(`circle`,{cx:`50%`,cy:`50%`,r:`1.875`})},`score-pos`),(0,i.jsx)(`svg`,{viewBox:`0 0 5 5`,className:`slds-icon-score__negative`,"aria-hidden":`true`,children:(0,i.jsx)(`circle`,{cx:`50%`,cy:`50%`,r:`1.875`})},`score-neg`)):d===`strength`?t.push((0,i.jsxs)(`svg`,{viewBox:`0 0 27 7`,"aria-hidden":`true`,children:[(0,i.jsx)(`circle`,{r:`3.025`,cx:`3.5`,cy:`3.5`}),(0,i.jsx)(`circle`,{r:`3.025`,cx:`13.5`,cy:`3.5`}),(0,i.jsx)(`circle`,{r:`3.025`,cx:`23.5`,cy:`3.5`})]},`strength-svg`)):d===`trend`?t.push((0,i.jsxs)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,i.jsx)(`path`,{className:`slds-icon-trend__arrow`,d:`M.75 8H11M8 4.5L11.5 8 8 11.5`}),(0,i.jsx)(`circle`,{className:`slds-icon-trend__circle`,cy:`8`,cx:`8`,r:`7.375`,transform:`rotate(-28 8 8) scale(-1 1) translate(-16 0)`})]},`trend-svg`)):d===`typing`?(t.push((0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-1`),(0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-2`),(0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-3`)),l||(n=`User is typing`)):d===`waffle`&&(t.push((0,i.jsxs)(`span`,{className:`slds-icon-waffle`,children:[(0,i.jsx)(`span`,{className:`slds-r1`}),(0,i.jsx)(`span`,{className:`slds-r2`}),(0,i.jsx)(`span`,{className:`slds-r3`}),(0,i.jsx)(`span`,{className:`slds-r4`}),(0,i.jsx)(`span`,{className:`slds-r5`}),(0,i.jsx)(`span`,{className:`slds-r6`}),(0,i.jsx)(`span`,{className:`slds-r7`}),(0,i.jsx)(`span`,{className:`slds-r8`}),(0,i.jsx)(`span`,{className:`slds-r9`})]},`waffle`)),l||(n=`Open App Launcher`)),t.push((0,i.jsx)(`span`,{className:`slds-assistive-text`,children:e?.label||n},`assistive`)),t})(),p=[{"slds-is-animated":!o,"slds-is-paused":a}],m={title:l},h=`span`;return d===`waffle`?(p.unshift(`slds-button`,`slds-icon-waffle_container`),h=`button`):(p.unshift(`slds-icon-${d}`),d===`eq`?h=`div`:d===`score`?m[`data-slds-state`]=s||`positive`:d===`strength`?m[`data-slds-strength`]=c===void 0?`0`:`${c}`:d===`trend`&&(m[`data-slds-trend`]=u||`neutral`)),m.className=n.default(p,t),r.default.createElement(h,m,...f)};a.displayName=t.DYNAMIC_ICON,exports.default=a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/class-names.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({assistiveText:e,className:t,isPaused:a,isStatic:o,scorePolarity:s,strengthLevel:c,title:l,trendDirection:u,variant:d})=>{let f=(()=>{let t=[],n=l||`${d.charAt(0).toUpperCase()}${d.slice(1)}`;return d===`ellie`?t.push((0,i.jsx)(`svg`,{viewBox:`0 0 280 14`,"aria-hidden":`true`,children:Array.from({length:20},(e,t)=>{let n=7+t*14;return(0,i.jsxs)(r.default.Fragment,{children:[(0,i.jsx)(`circle`,{cx:n,cy:`7`,r:`4`}),(0,i.jsx)(`circle`,{cx:n,cy:`7`,r:`3`})]},t)})},`ellie-svg`)):d===`eq`?t.push((0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-1`),(0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-2`),(0,i.jsx)(`div`,{className:`slds-icon-eq__bar`},`eq-bar-3`)):d===`score`?t.push((0,i.jsx)(`svg`,{viewBox:`0 0 5 5`,className:`slds-icon-score__positive`,"aria-hidden":`true`,children:(0,i.jsx)(`circle`,{cx:`50%`,cy:`50%`,r:`1.875`})},`score-pos`),(0,i.jsx)(`svg`,{viewBox:`0 0 5 5`,className:`slds-icon-score__negative`,"aria-hidden":`true`,children:(0,i.jsx)(`circle`,{cx:`50%`,cy:`50%`,r:`1.875`})},`score-neg`)):d===`strength`?t.push((0,i.jsxs)(`svg`,{viewBox:`0 0 27 7`,"aria-hidden":`true`,children:[(0,i.jsx)(`circle`,{r:`3.025`,cx:`3.5`,cy:`3.5`}),(0,i.jsx)(`circle`,{r:`3.025`,cx:`13.5`,cy:`3.5`}),(0,i.jsx)(`circle`,{r:`3.025`,cx:`23.5`,cy:`3.5`})]},`strength-svg`)):d===`trend`?t.push((0,i.jsxs)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,i.jsx)(`path`,{className:`slds-icon-trend__arrow`,d:`M.75 8H11M8 4.5L11.5 8 8 11.5`}),(0,i.jsx)(`circle`,{className:`slds-icon-trend__circle`,cy:`8`,cx:`8`,r:`7.375`,transform:`rotate(-28 8 8) scale(-1 1) translate(-16 0)`})]},`trend-svg`)):d===`typing`?(t.push((0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-1`),(0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-2`),(0,i.jsx)(`span`,{className:`slds-icon-typing__dot`},`typing-3`)),l||(n=`User is typing`)):d===`waffle`&&(t.push((0,i.jsxs)(`span`,{className:`slds-icon-waffle`,children:[(0,i.jsx)(`span`,{className:`slds-r1`}),(0,i.jsx)(`span`,{className:`slds-r2`}),(0,i.jsx)(`span`,{className:`slds-r3`}),(0,i.jsx)(`span`,{className:`slds-r4`}),(0,i.jsx)(`span`,{className:`slds-r5`}),(0,i.jsx)(`span`,{className:`slds-r6`}),(0,i.jsx)(`span`,{className:`slds-r7`}),(0,i.jsx)(`span`,{className:`slds-r8`}),(0,i.jsx)(`span`,{className:`slds-r9`})]},`waffle`)),l||(n=`Open App Launcher`)),t.push((0,i.jsx)(`span`,{className:`slds-assistive-text`,children:e?.label||n},`assistive`)),t})(),p=[{"slds-is-animated":!o,"slds-is-paused":a}],m={title:l},h=`span`;return d===`waffle`?(p.unshift(`slds-button`,`slds-icon-waffle_container`),h=`button`):(p.unshift(`slds-icon-${d}`),d===`eq`?h=`div`:d===`score`?m[`data-slds-state`]=s||`positive`:d===`strength`?m[`data-slds-strength`]=c===void 0?`0`:`${c}`:d===`trend`&&(m[`data-slds-trend`]=u||`neutral`)),m.className=n.default(p,t),r.default.createElement(h,m,...f)};a.displayName=t.DYNAMIC_ICON,exports.default=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/dynamic-icon/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, { type ReactNode } from 'react';\nimport classNames from '../../utilities/class-names';\nimport { DYNAMIC_ICON } from '../../utilities/constants';\n\n/**\n * Dynamic icon variant types\n */\nexport type DynamicIconVariant = 'ellie' | 'eq' | 'score' | 'strength' | 'trend' | 'typing' | 'waffle';\n\n/**\n * Score polarity options\n */\nexport type ScorePolarity = 'positive' | 'negative';\n\n/**\n * Strength level options\n */\nexport type StrengthLevel = '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | -3 | -2 | -1 | 0 | 1 | 2 | 3;\n\n/**\n * Trend direction options\n */\nexport type TrendDirection = 'down' | 'up' | 'neutral';\n\n/**\n * Assistive text for DynamicIcon\n */\nexport interface DynamicIconAssistiveText {\n\t/** Label for the icon */\n\tlabel?: string;\n}\n\n/**\n * Props for the DynamicIcon component\n */\nexport interface DynamicIconProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DynamicIconAssistiveText;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Pauses animation */\n\tisPaused?: boolean;\n\t/** Disables animation */\n\tisStatic?: boolean;\n\t/** Polarity for score variant */\n\tscorePolarity?: ScorePolarity;\n\t/** Strength level for strength variant */\n\tstrengthLevel?: StrengthLevel;\n\t/** Title attribute (required) */\n\ttitle: string;\n\t/** Trend direction for trend variant */\n\ttrendDirection?: TrendDirection;\n\t/** Icon variant (required) */\n\tvariant: DynamicIconVariant;\n}\n\n/**\n * A set of delightful animated icons.\n */\nconst DynamicIcon = ({\n\tassistiveText,\n\tclassName,\n\tisPaused,\n\tisStatic,\n\tscorePolarity,\n\tstrengthLevel,\n\ttitle,\n\ttrendDirection,\n\tvariant,\n}: DynamicIconProps): React.ReactElement => {\n\tconst getIconChildren = (): ReactNode[] => {\n\t\tconst children: ReactNode[] = [];\n\t\tlet defaultAssistiveText = title || `${variant.charAt(0).toUpperCase()}${variant.slice(1)}`;\n\n\t\tif (variant === 'ellie') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"ellie-svg\" viewBox=\"0 0 280 14\" aria-hidden=\"true\">\n\t\t\t\t\t{Array.from({ length: 20 }, (_, i) => {\n\t\t\t\t\t\tconst cx = 7 + i * 14;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<React.Fragment key={i}>\n\t\t\t\t\t\t\t\t<circle cx={cx} cy=\"7\" r=\"4\" />\n\t\t\t\t\t\t\t\t<circle cx={cx} cy=\"7\" r=\"3\" />\n\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'eq') {\n\t\t\tchildren.push(\n\t\t\t\t<div key=\"eq-bar-1\" className=\"slds-icon-eq__bar\" />,\n\t\t\t\t<div key=\"eq-bar-2\" className=\"slds-icon-eq__bar\" />,\n\t\t\t\t<div key=\"eq-bar-3\" className=\"slds-icon-eq__bar\" />\n\t\t\t);\n\t\t} else if (variant === 'score') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"score-pos\" viewBox=\"0 0 5 5\" className=\"slds-icon-score__positive\" aria-hidden=\"true\">\n\t\t\t\t\t<circle cx=\"50%\" cy=\"50%\" r=\"1.875\" />\n\t\t\t\t</svg>,\n\t\t\t\t<svg key=\"score-neg\" viewBox=\"0 0 5 5\" className=\"slds-icon-score__negative\" aria-hidden=\"true\">\n\t\t\t\t\t<circle cx=\"50%\" cy=\"50%\" r=\"1.875\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'strength') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"strength-svg\" viewBox=\"0 0 27 7\" aria-hidden=\"true\">\n\t\t\t\t\t<circle r=\"3.025\" cx=\"3.5\" cy=\"3.5\" />\n\t\t\t\t\t<circle r=\"3.025\" cx=\"13.5\" cy=\"3.5\" />\n\t\t\t\t\t<circle r=\"3.025\" cx=\"23.5\" cy=\"3.5\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'trend') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"trend-svg\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n\t\t\t\t\t<path className=\"slds-icon-trend__arrow\" d=\"M.75 8H11M8 4.5L11.5 8 8 11.5\" />\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclassName=\"slds-icon-trend__circle\"\n\t\t\t\t\t\tcy=\"8\"\n\t\t\t\t\t\tcx=\"8\"\n\t\t\t\t\t\tr=\"7.375\"\n\t\t\t\t\t\ttransform=\"rotate(-28 8 8) scale(-1 1) translate(-16 0)\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'typing') {\n\t\t\tchildren.push(\n\t\t\t\t<span key=\"typing-1\" className=\"slds-icon-typing__dot\" />,\n\t\t\t\t<span key=\"typing-2\" className=\"slds-icon-typing__dot\" />,\n\t\t\t\t<span key=\"typing-3\" className=\"slds-icon-typing__dot\" />\n\t\t\t);\n\t\t\tif (!title) {\n\t\t\t\tdefaultAssistiveText = 'User is typing';\n\t\t\t}\n\t\t} else if (variant === 'waffle') {\n\t\t\tchildren.push(\n\t\t\t\t<span key=\"waffle\" className=\"slds-icon-waffle\">\n\t\t\t\t\t<span className=\"slds-r1\" />\n\t\t\t\t\t<span className=\"slds-r2\" />\n\t\t\t\t\t<span className=\"slds-r3\" />\n\t\t\t\t\t<span className=\"slds-r4\" />\n\t\t\t\t\t<span className=\"slds-r5\" />\n\t\t\t\t\t<span className=\"slds-r6\" />\n\t\t\t\t\t<span className=\"slds-r7\" />\n\t\t\t\t\t<span className=\"slds-r8\" />\n\t\t\t\t\t<span className=\"slds-r9\" />\n\t\t\t\t</span>\n\t\t\t);\n\t\t\tif (!title) {\n\t\t\t\tdefaultAssistiveText = 'Open App Launcher';\n\t\t\t}\n\t\t}\n\n\t\tchildren.push(\n\t\t\t<span key=\"assistive\" className=\"slds-assistive-text\">\n\t\t\t\t{assistiveText?.label || defaultAssistiveText}\n\t\t\t</span>\n\t\t);\n\n\t\treturn children;\n\t};\n\n\tconst children = getIconChildren();\n\tconst classes: (string | Record<string, boolean | undefined>)[] = [\n\t\t{\n\t\t\t'slds-is-animated': !isStatic,\n\t\t\t'slds-is-paused': isPaused,\n\t\t},\n\t];\n\n\tconst iconProps: Record<string, unknown> = {\n\t\ttitle,\n\t};\n\n\tlet element: 'span' | 'div' | 'button' = 'span';\n\n\tif (variant === 'waffle') {\n\t\tclasses.unshift('slds-button', 'slds-icon-waffle_container');\n\t\telement = 'button';\n\t} else {\n\t\tclasses.unshift(`slds-icon-${variant}`);\n\n\t\tif (variant === 'eq') {\n\t\t\telement = 'div';\n\t\t} else if (variant === 'score') {\n\t\t\ticonProps['data-slds-state'] = scorePolarity || 'positive';\n\t\t} else if (variant === 'strength') {\n\t\t\ticonProps['data-slds-strength'] = strengthLevel !== undefined ? `${strengthLevel}` : '0';\n\t\t} else if (variant === 'trend') {\n\t\t\ticonProps['data-slds-trend'] = trendDirection || 'neutral';\n\t\t}\n\t}\n\n\ticonProps.className = classNames(classes, className);\n\n\treturn React.createElement(element, iconProps, ...children);\n};\n\nDynamicIcon.displayName = DYNAMIC_ICON;\n\nexport default DynamicIcon;\n\n"],"mappings":"2NA8DA,IAAM,GAAe,CACpB,gBACA,YACA,WACA,WACA,gBACA,gBACA,QACA,iBACA,aAC2C,CA4F3C,IAAM,OA3FqC,CAC1C,IAAM,EAAwB,CAAC,EAC3B,EAAuB,GAAS,GAAG,EAAQ,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAQ,MAAM,CAAC,I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EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,SAAW,CAAA,GAC3B,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,SAAW,CAAA,GAC3B,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,SAAW,CAAA,GAC3B,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,SAAW,CAAA,CACtB,CAVI,EAAA,QAUJ,CACP,EACK,IACJ,EAAuB,sBAIzB,EAAS,MACR,EAAA,EAAA,IAAA,CAAC,OAAD,CAAsB,UAAU,sBAC9B,SAAA,GAAe,OAAS,CACpB,EAFI,WAEJ,CACP,EAEO,CACR,EAEiB,CAAgB,EAC3B,EAA4D,CACjE,CACC,mBAAoB,CAAC,EACrB,iBAAkB,CACnB,CACD,EAEM,EAAqC,CAC1C,OACD,EAEI,EAAqC,OAqBzC,OAnBI,IAAY,UACf,EAAQ,QAAQ,cAAe,4BAA4B,EAC3D,EAAU,WAEV,EAAQ,QAAQ,aAAa,GAAS,EAElC,IAAY,KACf,EAAU,MACA,IAAY,QACtB,EAAU,mBAAqB,GAAiB,WACtC,IAAY,WACtB,EAAU,sBAAwB,IAAkB,IAAA,GAAiC,IAArB,GAAG,IACzD,IAAY,UACtB,EAAU,mBAAqB,GAAkB,YAInD,EAAU,UAAY,EAAA,QAAW,EAAS,CAAS,EAE5C,EAAA,QAAM,cAAc,EAAS,EAAW,GAAG,CAAQ,CAC3D,EAEA,EAAY,YAAc,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/dynamic-icon/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, { type ReactNode } from 'react';\nimport classNames from '../../utilities/class-names';\nimport { DYNAMIC_ICON } from '../../utilities/constants';\n\n/**\n * Dynamic icon variant types\n */\nexport type DynamicIconVariant = 'ellie' | 'eq' | 'score' | 'strength' | 'trend' | 'typing' | 'waffle';\n\n/**\n * Score polarity options\n */\nexport type ScorePolarity = 'positive' | 'negative';\n\n/**\n * Strength level options\n */\nexport type StrengthLevel = '-3' | '-2' | '-1' | '0' | '1' | '2' | '3' | -3 | -2 | -1 | 0 | 1 | 2 | 3;\n\n/**\n * Trend direction options\n */\nexport type TrendDirection = 'down' | 'up' | 'neutral';\n\n/**\n * Assistive text for DynamicIcon\n */\nexport interface DynamicIconAssistiveText {\n\t/** Label for the icon */\n\tlabel?: string;\n}\n\n/**\n * Props for the DynamicIcon component\n */\nexport interface DynamicIconProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: DynamicIconAssistiveText;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Pauses animation */\n\tisPaused?: boolean;\n\t/** Disables animation */\n\tisStatic?: boolean;\n\t/** Polarity for score variant */\n\tscorePolarity?: ScorePolarity;\n\t/** Strength level for strength variant */\n\tstrengthLevel?: StrengthLevel;\n\t/** Title attribute (required) */\n\ttitle: string;\n\t/** Trend direction for trend variant */\n\ttrendDirection?: TrendDirection;\n\t/** Icon variant (required) */\n\tvariant: DynamicIconVariant;\n}\n\n/**\n * A set of delightful animated icons.\n */\nconst DynamicIcon = ({\n\tassistiveText,\n\tclassName,\n\tisPaused,\n\tisStatic,\n\tscorePolarity,\n\tstrengthLevel,\n\ttitle,\n\ttrendDirection,\n\tvariant,\n}: DynamicIconProps): React.ReactElement => {\n\tconst getIconChildren = (): ReactNode[] => {\n\t\tconst children: ReactNode[] = [];\n\t\tlet defaultAssistiveText = title || `${variant.charAt(0).toUpperCase()}${variant.slice(1)}`;\n\n\t\tif (variant === 'ellie') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"ellie-svg\" viewBox=\"0 0 280 14\" aria-hidden=\"true\">\n\t\t\t\t\t{Array.from({ length: 20 }, (_, i) => {\n\t\t\t\t\t\tconst cx = 7 + i * 14;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<React.Fragment key={i}>\n\t\t\t\t\t\t\t\t<circle cx={cx} cy=\"7\" r=\"4\" />\n\t\t\t\t\t\t\t\t<circle cx={cx} cy=\"7\" r=\"3\" />\n\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'eq') {\n\t\t\tchildren.push(\n\t\t\t\t<div key=\"eq-bar-1\" className=\"slds-icon-eq__bar\" />,\n\t\t\t\t<div key=\"eq-bar-2\" className=\"slds-icon-eq__bar\" />,\n\t\t\t\t<div key=\"eq-bar-3\" className=\"slds-icon-eq__bar\" />\n\t\t\t);\n\t\t} else if (variant === 'score') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"score-pos\" viewBox=\"0 0 5 5\" className=\"slds-icon-score__positive\" aria-hidden=\"true\">\n\t\t\t\t\t<circle cx=\"50%\" cy=\"50%\" r=\"1.875\" />\n\t\t\t\t</svg>,\n\t\t\t\t<svg key=\"score-neg\" viewBox=\"0 0 5 5\" className=\"slds-icon-score__negative\" aria-hidden=\"true\">\n\t\t\t\t\t<circle cx=\"50%\" cy=\"50%\" r=\"1.875\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'strength') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"strength-svg\" viewBox=\"0 0 27 7\" aria-hidden=\"true\">\n\t\t\t\t\t<circle r=\"3.025\" cx=\"3.5\" cy=\"3.5\" />\n\t\t\t\t\t<circle r=\"3.025\" cx=\"13.5\" cy=\"3.5\" />\n\t\t\t\t\t<circle r=\"3.025\" cx=\"23.5\" cy=\"3.5\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'trend') {\n\t\t\tchildren.push(\n\t\t\t\t<svg key=\"trend-svg\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n\t\t\t\t\t<path className=\"slds-icon-trend__arrow\" d=\"M.75 8H11M8 4.5L11.5 8 8 11.5\" />\n\t\t\t\t\t<circle\n\t\t\t\t\t\tclassName=\"slds-icon-trend__circle\"\n\t\t\t\t\t\tcy=\"8\"\n\t\t\t\t\t\tcx=\"8\"\n\t\t\t\t\t\tr=\"7.375\"\n\t\t\t\t\t\ttransform=\"rotate(-28 8 8) scale(-1 1) translate(-16 0)\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t);\n\t\t} else if (variant === 'typing') {\n\t\t\tchildren.push(\n\t\t\t\t<span key=\"typing-1\" className=\"slds-icon-typing__dot\" />,\n\t\t\t\t<span key=\"typing-2\" className=\"slds-icon-typing__dot\" />,\n\t\t\t\t<span key=\"typing-3\" className=\"slds-icon-typing__dot\" />\n\t\t\t);\n\t\t\tif (!title) {\n\t\t\t\tdefaultAssistiveText = 'User is typing';\n\t\t\t}\n\t\t} else if (variant === 'waffle') {\n\t\t\tchildren.push(\n\t\t\t\t<span key=\"waffle\" className=\"slds-icon-waffle\">\n\t\t\t\t\t<span className=\"slds-r1\" />\n\t\t\t\t\t<span className=\"slds-r2\" />\n\t\t\t\t\t<span className=\"slds-r3\" />\n\t\t\t\t\t<span className=\"slds-r4\" />\n\t\t\t\t\t<span className=\"slds-r5\" />\n\t\t\t\t\t<span className=\"slds-r6\" />\n\t\t\t\t\t<span className=\"slds-r7\" />\n\t\t\t\t\t<span className=\"slds-r8\" />\n\t\t\t\t\t<span className=\"slds-r9\" />\n\t\t\t\t</span>\n\t\t\t);\n\t\t\tif (!title) {\n\t\t\t\tdefaultAssistiveText = 'Open App Launcher';\n\t\t\t}\n\t\t}\n\n\t\tchildren.push(\n\t\t\t<span key=\"assistive\" className=\"slds-assistive-text\">\n\t\t\t\t{assistiveText?.label || defaultAssistiveText}\n\t\t\t</span>\n\t\t);\n\n\t\treturn children;\n\t};\n\n\tconst children = getIconChildren();\n\tconst classes: (string | Record<string, boolean | undefined>)[] = [\n\t\t{\n\t\t\t'slds-is-animated': !isStatic,\n\t\t\t'slds-is-paused': isPaused,\n\t\t},\n\t];\n\n\tconst iconProps: Record<string, unknown> = {\n\t\ttitle,\n\t};\n\n\tlet element: 'span' | 'div' | 'button' = 'span';\n\n\tif (variant === 'waffle') {\n\t\tclasses.unshift('slds-button', 'slds-icon-waffle_container');\n\t\telement = 'button';\n\t} else {\n\t\tclasses.unshift(`slds-icon-${variant}`);\n\n\t\tif (variant === 'eq') {\n\t\t\telement = 'div';\n\t\t} else if (variant === 'score') {\n\t\t\ticonProps['data-slds-state'] = scorePolarity || 'positive';\n\t\t} else if (variant === 'strength') {\n\t\t\ticonProps['data-slds-strength'] = strengthLevel !== undefined ? `${strengthLevel}` : '0';\n\t\t} else if (variant === 'trend') {\n\t\t\ticonProps['data-slds-trend'] = trendDirection || 'neutral';\n\t\t}\n\t}\n\n\ticonProps.className = classNames(classes, className);\n\n\treturn React.createElement(element, iconProps, ...children);\n};\n\nDynamicIcon.displayName = DYNAMIC_ICON;\n\nexport default DynamicIcon;\n\n"],"mappings":"0TA8DA,IAAM,GAAe,CACpB,gBACA,YACA,WACA,WACA,gBACA,gBACA,QACA,iBACA,aAC2C,CA4F3C,IAAM,OA3FqC,CAC1C,IAAM,EAAwB,CAAC,EAC3B,EAAuB,GAAS,GAAG,EAAQ,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAQ,MAAM,CAAC,IAsFxF,OApFI,IAAY,QACf,EAAS,MACR,EAAA,EAAA,IAAA,CAAC,MAAD,CAAqB,QAAQ,aAAa,cAAY,OACpD,SAAA,MAAM,KAAK,CAAE,OAAQ,EAAG,GAAI,EAAG,IAAM,CACrC,IAAM,EAAK,EAAI,EAAI,GACnB,OACC,EAAA,EAAA,KAAA,CAAC,EAAA,QAAM,SAAP,CAAA,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,SAAD,CAAY,KAAI,GAAG,IAAI,EAAE,GAAK,CAAA,GAC9B,EAAA,EAAA,IAAA,CAAC,SAAD,CAAY,KAAI,GAAG,IAAI,EAAE,GAAK,CAAA,CACf,CAAA,EAHK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AC3B,EAA4D,CACjE,CACC,mBAAoB,CAAC,EACrB,iBAAkB,CACnB,CACD,EAEM,EAAqC,CAC1C,OACD,EAEI,EAAqC,OAqBzC,OAnBI,IAAY,UACf,EAAQ,QAAQ,cAAe,4BAA4B,EAC3D,EAAU,WAEV,EAAQ,QAAQ,aAAa,GAAS,EAElC,IAAY,KACf,EAAU,MACA,IAAY,QACtB,EAAU,mBAAqB,GAAiB,WACtC,IAAY,WACtB,EAAU,sBAAwB,IAAkB,IAAA,GAAiC,IAArB,GAAG,IACzD,IAAY,UACtB,EAAU,mBAAqB,GAAkB,YAInD,EAAU,UAAY,EAAA,QAAW,EAAS,CAAS,EAE5C,EAAA,QAAM,cAAc,EAAS,EAAW,GAAG,CAAQ,CAC3D,EAEA,EAAY,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o={toggleSection:`Toggle visibility of section`},s=({assistiveText:e,children:t,className:s,id:c,isOpen:l,nonCollapsible:u=!1,onToggleOpen:d,title:f})=>{let p=(0,r.useId)(),[m,h]=(0,r.useState)(!0),g=c||p,_={...o,...e},v=l===void 0?m:l,y=`${g}-expanded-section-content`,b=(0,r.useCallback)(e=>{d?d(e,{isOpen:v}):h(e=>!e)},[v,d]),x={"aria-controls":y,"aria-expanded":!!v},S=(0,a.jsx)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-p-horizontal_small":u}),title:f,children:f});return(0,a.jsxs)(`div`,{className:(0,i.default)(`slds-section`,{"slds-is-open":v},s),children:[(0,a.jsx)(`h3`,{className:(0,i.default)(`slds-section__title`,{"slds-theme_shade":u}),children:u?S:(0,a.jsx)(n.default,{assistiveText:{icon:_.toggleSection},iconCategory:`utility`,iconClassName:`slds-section__title-action-icon slds-button__icon_left`,iconName:`switch`,onClick:b,className:`slds-section__title-action`,variant:`base`,...x,children:S})}),(0,a.jsx)(`div`,{"aria-hidden":!v,className:`slds-section__content`,id:y,children:t})]})};s.displayName=t.EXPANDABLE_SECTION,exports.default=s;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o={toggleSection:`Toggle visibility of section`},s=({assistiveText:e,children:t,className:s,id:c,isOpen:l,nonCollapsible:u=!1,onToggleOpen:d,title:f})=>{let p=(0,r.useId)(),[m,h]=(0,r.useState)(!0),g=c||p,_={...o,...e},v=l===void 0?m:l,y=`${g}-expanded-section-content`,b=(0,r.useCallback)(e=>{d?d(e,{isOpen:v}):h(e=>!e)},[v,d]),x={"aria-controls":y,"aria-expanded":!!v},S=(0,a.jsx)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-p-horizontal_small":u}),title:f,children:f});return(0,a.jsxs)(`div`,{className:(0,i.default)(`slds-section`,{"slds-is-open":v},s),children:[(0,a.jsx)(`h3`,{className:(0,i.default)(`slds-section__title`,{"slds-theme_shade":u}),children:u?S:(0,a.jsx)(n.default,{assistiveText:{icon:_.toggleSection},iconCategory:`utility`,iconClassName:`slds-section__title-action-icon slds-button__icon_left`,iconName:`switch`,onClick:b,className:`slds-section__title-action`,variant:`base`,...x,children:S})}),(0,a.jsx)(`div`,{"aria-hidden":!v,className:`slds-section__content`,id:y,children:t})]})};s.displayName=t.EXPANDABLE_SECTION,exports.default=s;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/expandable-section/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, { useState, useId, useCallback, type ReactNode, type MouseEvent } from 'react';\nimport classNames from 'classnames';\nimport Button from '../button';\nimport { EXPANDABLE_SECTION } from '../../utilities/constants';\n\n/**\n * Assistive text for ExpandableSection\n */\nexport interface ExpandableSectionAssistiveText {\n\t/** Label for the toggle button */\n\ttoggleSection?: string;\n}\n\n/**\n * Props for the ExpandableSection component\n */\nexport interface ExpandableSectionProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ExpandableSectionAssistiveText;\n\t/** Content of the section */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Whether section cannot be collapsed */\n\tnonCollapsible?: boolean;\n\t/** Toggle callback */\n\tonToggleOpen?: (event: MouseEvent<HTMLButtonElement>, data: { isOpen: boolean }) => void;\n\t/** Section title (required) */\n\ttitle: string;\n}\n\nconst defaultAssistiveText: ExpandableSectionAssistiveText = {\n\ttoggleSection: 'Toggle visibility of section',\n};\n\n/**\n * Toggle visibility of section content with the Expandable Section\n */\nconst ExpandableSection = ({\n\tassistiveText: propAssistiveText,\n\tchildren,\n\tclassName,\n\tid: propId,\n\tisOpen: controlledIsOpen,\n\tnonCollapsible = false,\n\tonToggleOpen,\n\ttitle,\n}: ExpandableSectionProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst [internalIsOpen, setInternalIsOpen] = useState(true);\n\n\tconst id = propId || generatedId;\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t\n\t// Use controlled or internal state\n\tconst isOpen = controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen;\n\tconst contentId = `${id}-expanded-section-content`;\n\n\tconst handleToggle = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n\t\tif (onToggleOpen) {\n\t\t\tonToggleOpen(event, { isOpen });\n\t\t} else {\n\t\t\tsetInternalIsOpen((prev) => !prev);\n\t\t}\n\t}, [isOpen, onToggleOpen]);\n\n\tconst buttonAriaProps = {\n\t\t'aria-controls': contentId,\n\t\t'aria-expanded': Boolean(isOpen),\n\t};\n\n\tconst titleNode = (\n\t\t<span\n\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t'slds-p-horizontal_small': nonCollapsible,\n\t\t\t})}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t{title}\n\t\t</span>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-section',\n\t\t\t\t{ 'slds-is-open': isOpen },\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t>\n\t\t\t<h3\n\t\t\t\tclassName={classNames('slds-section__title', {\n\t\t\t\t\t'slds-theme_shade': nonCollapsible,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{!nonCollapsible ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: assistiveText.toggleSection }}\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonClassName=\"slds-section__title-action-icon slds-button__icon_left\"\n\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\t\tclassName=\"slds-section__title-action\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t{...buttonAriaProps}\n\t\t\t\t\t>\n\t\t\t\t\t\t{titleNode}\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\ttitleNode\n\t\t\t\t)}\n\t\t\t</h3>\n\t\t\t<div\n\t\t\t\taria-hidden={!isOpen}\n\t\t\t\tclassName=\"slds-section__content\"\n\t\t\t\tid={contentId}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nExpandableSection.displayName = EXPANDABLE_SECTION;\n\nexport default ExpandableSection;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"4PAsCA,IAAM,EAAuD,CAC5D,cAAe,8BAChB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c,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/expandable-section/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, { useState, useId, useCallback, type ReactNode, type MouseEvent } from 'react';\nimport classNames from 'classnames';\nimport Button from '../button';\nimport { EXPANDABLE_SECTION } from '../../utilities/constants';\n\n/**\n * Assistive text for ExpandableSection\n */\nexport interface ExpandableSectionAssistiveText {\n\t/** Label for the toggle button */\n\ttoggleSection?: string;\n}\n\n/**\n * Props for the ExpandableSection component\n */\nexport interface ExpandableSectionProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ExpandableSectionAssistiveText;\n\t/** Content of the section */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Unique identifier */\n\tid?: string;\n\t/** Controlled open state */\n\tisOpen?: boolean;\n\t/** Whether section cannot be collapsed */\n\tnonCollapsible?: boolean;\n\t/** Toggle callback */\n\tonToggleOpen?: (event: MouseEvent<HTMLButtonElement>, data: { isOpen: boolean }) => void;\n\t/** Section title (required) */\n\ttitle: string;\n}\n\nconst defaultAssistiveText: ExpandableSectionAssistiveText = {\n\ttoggleSection: 'Toggle visibility of section',\n};\n\n/**\n * Toggle visibility of section content with the Expandable Section\n */\nconst ExpandableSection = ({\n\tassistiveText: propAssistiveText,\n\tchildren,\n\tclassName,\n\tid: propId,\n\tisOpen: controlledIsOpen,\n\tnonCollapsible = false,\n\tonToggleOpen,\n\ttitle,\n}: ExpandableSectionProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst [internalIsOpen, setInternalIsOpen] = useState(true);\n\n\tconst id = propId || generatedId;\n\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\t\n\t// Use controlled or internal state\n\tconst isOpen = controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen;\n\tconst contentId = `${id}-expanded-section-content`;\n\n\tconst handleToggle = useCallback((event: MouseEvent<HTMLButtonElement>) => {\n\t\tif (onToggleOpen) {\n\t\t\tonToggleOpen(event, { isOpen });\n\t\t} else {\n\t\t\tsetInternalIsOpen((prev) => !prev);\n\t\t}\n\t}, [isOpen, onToggleOpen]);\n\n\tconst buttonAriaProps = {\n\t\t'aria-controls': contentId,\n\t\t'aria-expanded': Boolean(isOpen),\n\t};\n\n\tconst titleNode = (\n\t\t<span\n\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t'slds-p-horizontal_small': nonCollapsible,\n\t\t\t})}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t{title}\n\t\t</span>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-section',\n\t\t\t\t{ 'slds-is-open': isOpen },\n\t\t\t\tclassName as string\n\t\t\t)}\n\t\t>\n\t\t\t<h3\n\t\t\t\tclassName={classNames('slds-section__title', {\n\t\t\t\t\t'slds-theme_shade': nonCollapsible,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{!nonCollapsible ? (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tassistiveText={{ icon: assistiveText.toggleSection }}\n\t\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\t\ticonClassName=\"slds-section__title-action-icon slds-button__icon_left\"\n\t\t\t\t\t\ticonName=\"switch\"\n\t\t\t\t\t\tonClick={handleToggle}\n\t\t\t\t\t\tclassName=\"slds-section__title-action\"\n\t\t\t\t\t\tvariant=\"base\"\n\t\t\t\t\t\t{...buttonAriaProps}\n\t\t\t\t\t>\n\t\t\t\t\t\t{titleNode}\n\t\t\t\t\t</Button>\n\t\t\t\t) : (\n\t\t\t\t\ttitleNode\n\t\t\t\t)}\n\t\t\t</h3>\n\t\t\t<div\n\t\t\t\taria-hidden={!isOpen}\n\t\t\t\tclassName=\"slds-section__content\"\n\t\t\t\tid={contentId}\n\t\t\t>\n\t\t\t\t{children}\n\t\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Q,OACR,GAAI,EAEH,SAAA,CACM,CAAA,CAIN,CAAA,GACJ,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,cAAa,CAAC,EACd,UAAU,wBACV,GAAI,EAEH,UACG,CAAA,CACD,GAEP,EAEA,EAAkB,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({children:e,className:t,columnClassName:a,crop:o=`4-by-3`,id:s})=>{let c=(0,n.useId)(),l=s||c,u=n.default.Children.map(e,e=>{if(!n.default.isValidElement(e))return null;let t=e.props||{};return(0,i.jsx)(`li`,{className:(0,r.default)(`slds-p-horizontal_xx-small slds-size_1-of-3 slds-medium-size_1-of-4`,a),children:n.default.cloneElement(e,{crop:t.crop||o})})});return(0,i.jsx)(`ul`,{className:(0,r.default)(`slds-grid slds-grid_pull-padded`,t),id:l,children:u})};a.displayName=t.FILES,exports.default=a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({children:e,className:t,columnClassName:a,crop:o=`4-by-3`,id:s})=>{let c=(0,n.useId)(),l=s||c,u=n.default.Children.map(e,e=>{if(!n.default.isValidElement(e))return null;let t=e.props||{};return(0,i.jsx)(`li`,{className:(0,r.default)(`slds-p-horizontal_xx-small slds-size_1-of-3 slds-medium-size_1-of-4`,a),children:n.default.cloneElement(e,{crop:t.crop||o})})});return(0,i.jsx)(`ul`,{className:(0,r.default)(`slds-grid slds-grid_pull-padded`,t),id:l,children:u})};a.displayName=t.FILES,exports.default=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/files/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, { useId, type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport { FILES } from '../../utilities/constants';\n\n/**\n * Crop ratio options for file preview\n */\nexport type FilesCropRatio = '16-by-9' | '4-by-3' | '1-by-1';\n\n/**\n * Props for child File components\n */\nexport interface FileChildProps {\n\tcrop?: FilesCropRatio;\n}\n\n/**\n * Props for the Files component\n */\nexport interface FilesProps {\n\t/** File components as children */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Column class names for each file */\n\tcolumnClassName?: string;\n\t/** Crop ratio for file previews */\n\tcrop?: FilesCropRatio;\n\t/** HTML id */\n\tid?: string;\n}\n\n/**\n * Files is a component that wraps multiple file components that represent attachments.\n */\nconst Files = ({\n\tchildren,\n\tclassName,\n\tcolumnClassName,\n\tcrop = '4-by-3',\n\tid: propId,\n}: FilesProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst files = React.Children.map(children, (option) => {\n\t\tif (!React.isValidElement(option)) return null;\n\t\tconst childProps = (option.props as FileChildProps) || {};\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-p-horizontal_xx-small slds-size_1-of-3 slds-medium-size_1-of-4',\n\t\t\t\t\tcolumnClassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{React.cloneElement(option as ReactElement<FileChildProps>, {\n\t\t\t\t\tcrop: childProps.crop || crop,\n\t\t\t\t})}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames('slds-grid slds-grid_pull-padded', className as string)}\n\t\t\tid={id}\n\t\t>\n\t\t\t{files}\n\t\t</ul>\n\t);\n};\n\nFiles.displayName = FILES;\n\nexport default Files;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"2NAsCA,IAAM,GAAS,CACd,WACA,YACA,kBACA,OAAO,SACP,GAAI,KACiC,CACrC,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EAEf,EAAQ,EAAA,QAAM,SAAS,IAAI,EAAW,GAAW,CACtD,GAAI,CAAC,EAAA,QAAM,eAAe,CAAM,EAAG,OAAO,KAC1C,IAAM,EAAc,EAAO,OAA4B,CAAC,EACxD,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,sEACA,CACD,EAEC,SAAA,EAAA,QAAM,aAAa,EAAwC,CAC3D,KAAM,EAAW,MAAQ,CAC1B,CAAC,CACE,CAAA,CAEN,CAAC,EAED,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,kCAAmC,CAAmB,EACxE,KAEH,SAAA,CACE,CAAA,CAEN,EAEA,EAAM,YAAc,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/files/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, { useId, type ReactNode, type ReactElement } from 'react';\nimport classNames from 'classnames';\nimport { FILES } from '../../utilities/constants';\n\n/**\n * Crop ratio options for file preview\n */\nexport type FilesCropRatio = '16-by-9' | '4-by-3' | '1-by-1';\n\n/**\n * Props for child File components\n */\nexport interface FileChildProps {\n\tcrop?: FilesCropRatio;\n}\n\n/**\n * Props for the Files component\n */\nexport interface FilesProps {\n\t/** File components as children */\n\tchildren?: ReactNode;\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Column class names for each file */\n\tcolumnClassName?: string;\n\t/** Crop ratio for file previews */\n\tcrop?: FilesCropRatio;\n\t/** HTML id */\n\tid?: string;\n}\n\n/**\n * Files is a component that wraps multiple file components that represent attachments.\n */\nconst Files = ({\n\tchildren,\n\tclassName,\n\tcolumnClassName,\n\tcrop = '4-by-3',\n\tid: propId,\n}: FilesProps): React.ReactElement => {\n\tconst generatedId = useId();\n\tconst id = propId || generatedId;\n\n\tconst files = React.Children.map(children, (option) => {\n\t\tif (!React.isValidElement(option)) return null;\n\t\tconst childProps = (option.props as FileChildProps) || {};\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-p-horizontal_xx-small slds-size_1-of-3 slds-medium-size_1-of-4',\n\t\t\t\t\tcolumnClassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{React.cloneElement(option as ReactElement<FileChildProps>, {\n\t\t\t\t\tcrop: childProps.crop || crop,\n\t\t\t\t})}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames('slds-grid slds-grid_pull-padded', className as string)}\n\t\t\tid={id}\n\t\t>\n\t\t\t{files}\n\t\t</ul>\n\t);\n};\n\nFiles.displayName = FILES;\n\nexport default Files;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],"mappings":"0TAsCA,IAAM,GAAS,CACd,WACA,YACA,kBACA,OAAO,SACP,GAAI,KACiC,CACrC,IAAM,GAAA,EAAc,EAAA,MAAA,CAAM,EACpB,EAAK,GAAU,EAEf,EAAQ,EAAA,QAAM,SAAS,IAAI,EAAW,GAAW,CACtD,GAAI,CAAC,EAAA,QAAM,eAAe,CAAM,EAAG,OAAO,KAC1C,IAAM,EAAc,EAAO,OAA4B,CAAC,EACxD,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,sEACA,CACD,EAEC,SAAA,EAAA,QAAM,aAAa,EAAwC,CAC3D,KAAM,EAAW,MAAQ,CAC1B,CAAC,CACE,CAAA,CAEN,CAAC,EAED,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CAAW,kCAAmC,CAAmB,EACxE,KAEH,SAAA,CACE,CAAA,CAEN,EAEA,EAAM,YAAc,EAAA"}
@@ -0,0 +1 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./filter.cjs");exports.Filter=e.default,exports.default=e.default;
@@ -0,0 +1 @@
1
+ module.exports = require('./filter/index.cjs');
@@ -0,0 +1,2 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react"),n=require("classnames");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=class extends t.Component{getClassName(){return(0,n.default)(this.props.className,`slds-col`)}render(){return(0,r.jsx)(`div`,{className:this.getClassName(),children:this.props.children})}},a=class extends t.Component{static Column=i;getClassName(){let{flavor:e}=this.props;return(0,n.default)(this.props.className,`slds-grid`,{[`slds-grid_${e}`]:e})}render(){return(0,r.jsx)(`div`,{className:this.getClassName(),children:this.props.children})}};exports.default=a;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/grid/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 { Component, type ReactNode } from 'react';\nimport classNames from 'classnames';\n\nexport interface GridColumnProps {\n\t/** Additional class names applied to the column. */\n\tclassName?: string;\n\t/** Column content. */\n\tchildren?: ReactNode;\n}\n\nclass GridColumn extends Component<GridColumnProps> {\n\tgetClassName() {\n\t\treturn classNames(this.props.className, 'slds-col');\n\t}\n\n\trender() {\n\t\treturn <div className={this.getClassName()}>{this.props.children}</div>;\n\t}\n}\n\nexport interface GridProps {\n\t/** Additional class names applied to the grid. */\n\tclassName?: string;\n\t/** Grid flavor, appended as `slds-grid_{flavor}`. */\n\tflavor?: string;\n\t/** Grid content, typically `Grid.Column` elements. */\n\tchildren?: ReactNode;\n}\n\nclass Grid extends Component<GridProps> {\n\tstatic Column = GridColumn;\n\n\tgetClassName() {\n\t\tconst { flavor } = this.props;\n\t\treturn classNames(this.props.className, 'slds-grid', {\n\t\t\t[`slds-grid_${flavor}`]: flavor,\n\t\t});\n\t}\n\n\trender() {\n\t\treturn <div className={this.getClassName()}>{this.props.children}</div>;\n\t}\n}\n\nexport default Grid;\n"],"mappings":"0PAaA,IAAM,EAAN,cAAyB,EAAA,SAA2B,CACnD,cAAe,CACd,OAAA,EAAO,EAAA,QAAA,CAAW,KAAK,MAAM,UAAW,UAAU,CACnD,CAEA,QAAS,CACR,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,KAAK,aAAa,EAAI,SAAA,KAAK,MAAM,QAAc,CAAA,CACvE,CACD,EAWM,EAAN,cAAmB,EAAA,SAAqB,CACvC,OAAO,OAAS,EAEhB,cAAe,CACd,GAAM,CAAE,UAAW,KAAK,MACxB,OAAA,EAAO,EAAA,QAAA,CAAW,KAAK,MAAM,UAAW,YAAa,EACnD,aAAa,KAAW,CAC1B,CAAC,CACF,CAEA,QAAS,CACR,OAAO,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,KAAK,aAAa,EAAI,SAAA,KAAK,MAAM,QAAc,CAAA,CACvE,CACD"}
@@ -0,0 +1 @@
1
+ module.exports = require('./grid/index.cjs');
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../utilities/utility-icon/index.cjs"),r=require("../../utilities/class-names.cjs"),i=require("../../utilities/product-tokens/icon-backgrounds.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s={assistiveText:{},category:`standard`,colorVariant:`default`,size:`medium`},c=({category:e=s.category,className:t,colorVariant:a=s.colorVariant,containerClassName:c,containerStyle:l,icon:u,inverse:d,name:f,path:p,size:m=s.size,title:h,productTheme:g,assistiveText:_=s.assistiveText,style:v})=>{let y=v;g&&i.default[g]&&(y={backgroundColor:i.default[g],...v});let b;if(typeof _==`string`)b=_;else{let e=s.assistiveText;b=_?.label??e?.label}let x=f?f.replace(/_/g,`-`):``,S=r.default({"slds-icon_container":e!==`utility`,"slds-icon_container_circle":e===`action`,[`slds-icon-${e}-${x}`]:e!==`utility`&&e!==`doctype`&&!p},c);return(0,o.jsxs)(`span`,{className:S,style:l,title:h,children:[(0,o.jsx)(n.default,{"aria-hidden":!0,category:e,className:r.default(t,`slds-icon`,{"slds-icon_xx-small":m===`xx-small`,"slds-icon_x-small":m===`x-small`,"slds-icon_small":m===`small`,"slds-icon_large":m===`large`,"slds-icon-text-default":a==="default"&&e===`utility`?!d:d,"slds-icon-text-success":a===`success`,"slds-icon-text-warning":a===`warning`,"slds-icon-text-error":a===`error`,"slds-icon-text-light":a===`light`}),icon:u,name:f,path:p,style:y}),b?(0,o.jsx)(`span`,{className:`slds-assistive-text`,children:b}):null]})};c.displayName=t.ICON,exports.default=c;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../utilities/utility-icon/index.cjs"),r=require("../../utilities/class-names.cjs"),i=require("../../utilities/product-tokens/icon-backgrounds.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s={assistiveText:{},category:`standard`,colorVariant:`default`,size:`medium`},c=({category:e=s.category,className:t,colorVariant:a=s.colorVariant,containerClassName:c,containerStyle:l,icon:u,inverse:d,name:f,path:p,size:m=s.size,title:h,productTheme:g,assistiveText:_=s.assistiveText,style:v})=>{let y=v;g&&i.default[g]&&(y={backgroundColor:i.default[g],...v});let b;if(typeof _==`string`)b=_;else{let e=s.assistiveText;b=_?.label??e?.label}let x=f?f.replace(/_/g,`-`):``,S=r.default({"slds-icon_container":e!==`utility`,"slds-icon_container_circle":e===`action`,[`slds-icon-${e}-${x}`]:e!==`utility`&&e!==`doctype`&&!p},c);return(0,o.jsxs)(`span`,{className:S,style:l,title:h,children:[(0,o.jsx)(n.default,{"aria-hidden":!0,category:e,className:r.default(t,`slds-icon`,{"slds-icon_xx-small":m===`xx-small`,"slds-icon_x-small":m===`x-small`,"slds-icon_small":m===`small`,"slds-icon_large":m===`large`,"slds-icon-text-default":a==="default"&&e===`utility`?!d:d,"slds-icon-text-success":a===`success`,"slds-icon-text-warning":a===`warning`,"slds-icon-text-error":a===`error`,"slds-icon-text-light":a===`light`}),icon:u,name:f,path:p,style:y}),b?(0,o.jsx)(`span`,{className:`slds-assistive-text`,children:b}):null]})};c.displayName=t.ICON,exports.default=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/icon/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, { type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport UtilityIcon, { type InlineIconData } from '../utilities/utility-icon/index';\nimport IconBackgrounds from '../../utilities/product-tokens/icon-backgrounds';\nimport { ICON } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Icon color variant types\n */\nexport type IconColorVariant = 'base' | 'default' | 'error' | 'light' | 'warning' | 'success';\n\n/**\n * Icon size types\n */\nexport type IconSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Product theme types for icon backgrounds\n */\nexport type ProductTheme =\n\t| 'global-setup'\n\t| 'service-cloud'\n\t| 'industry-cloud'\n\t| 'sales-cloud'\n\t| 'commerce-cloud'\n\t| 'community-cloud'\n\t| 'marketing-cloud'\n\t| 'quip';\n\n/**\n * Props for the Icon component\n */\nexport interface IconProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: { label?: string } | string;\n\t/** Icon category from SLDS */\n\tcategory?: IconCategory;\n\t/** CSS classes for the SVG element */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Icon color variant */\n\tcolorVariant?: IconColorVariant;\n\t/** CSS classes for the container span */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** Styles for the container span */\n\tcontainerStyle?: CSSProperties;\n\t/** Custom SVG icon data */\n\ticon?: InlineIconData;\n\t/** Invert colors for dark backgrounds */\n\tinverse?: boolean;\n\t/** Name of the icon */\n\tname?: string;\n\t/** Direct path to the icon sprite */\n\tpath?: string;\n\t/** Background theme color (only for standard category) */\n\tproductTheme?: ProductTheme;\n\t/** Size of the icon */\n\tsize?: IconSize;\n\t/** Custom styles for the SVG */\n\tstyle?: CSSProperties;\n\t/** HTML title attribute for the container */\n\ttitle?: string;\n}\n\nconst defaultProps: Required<Pick<IconProps, 'assistiveText' | 'category' | 'colorVariant' | 'size'>> = {\n\tassistiveText: {},\n\tcategory: 'standard',\n\tcolorVariant: 'default',\n\tsize: 'medium',\n};\n\n/**\n * The Icon component is the Lightning Design System Icon component and should be used for naked icons.\n * For icons that are buttons, use the Button component with `variant='icon'`.\n */\nconst Icon = ({\n\tcategory = defaultProps.category,\n\tclassName,\n\tcolorVariant = defaultProps.colorVariant,\n\tcontainerClassName,\n\tcontainerStyle,\n\ticon,\n\tinverse,\n\tname,\n\tpath,\n\tsize = defaultProps.size,\n\ttitle,\n\tproductTheme,\n\tassistiveText = defaultProps.assistiveText,\n\tstyle,\n}: IconProps): React.ReactElement => {\n\tlet styleOverride = style;\n\tif (productTheme && IconBackgrounds[productTheme]) {\n\t\tstyleOverride = {\n\t\t\tbackgroundColor: IconBackgrounds[productTheme],\n\t\t\t...style,\n\t\t};\n\t}\n\n\tlet mergedAssistiveText: string | undefined;\n\tif (typeof assistiveText === 'string') {\n\t\tmergedAssistiveText = assistiveText;\n\t} else {\n\t\tconst defaultText = defaultProps.assistiveText as { label?: string };\n\t\tconst propsText = assistiveText as { label?: string };\n\t\tmergedAssistiveText = propsText?.label ?? defaultText?.label;\n\t}\n\n\tconst kebabCaseName = name ? name.replace(/_/g, '-') : '';\n\n\tconst containerClasses = classNames(\n\t\t{\n\t\t\t'slds-icon_container': category !== 'utility',\n\t\t\t'slds-icon_container_circle': category === 'action',\n\t\t\t[`slds-icon-${category}-${kebabCaseName}`]:\n\t\t\t\tcategory !== 'utility' && category !== 'doctype' && !path,\n\t\t},\n\t\tcontainerClassName as string\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={containerClasses}\n\t\t\tstyle={containerStyle}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t<UtilityIcon\n\t\t\t\taria-hidden={true}\n\t\t\t\tcategory={category}\n\t\t\t\tclassName={classNames(className, 'slds-icon', {\n\t\t\t\t\t'slds-icon_xx-small': size === 'xx-small',\n\t\t\t\t\t'slds-icon_x-small': size === 'x-small',\n\t\t\t\t\t'slds-icon_small': size === 'small',\n\t\t\t\t\t// medium intentionally not present\n\t\t\t\t\t'slds-icon_large': size === 'large',\n\t\t\t\t\t// Color logic for utility vs other categories\n\t\t\t\t\t'slds-icon-text-default':\n\t\t\t\t\t\tcolorVariant === 'default' && category === 'utility'\n\t\t\t\t\t\t\t? !inverse\n\t\t\t\t\t\t\t: inverse,\n\t\t\t\t\t'slds-icon-text-success': colorVariant === 'success',\n\t\t\t\t\t'slds-icon-text-warning': colorVariant === 'warning',\n\t\t\t\t\t'slds-icon-text-error': colorVariant === 'error',\n\t\t\t\t\t'slds-icon-text-light': colorVariant === 'light',\n\t\t\t\t}) as string}\n\t\t\t\ticon={icon}\n\t\t\t\tname={name}\n\t\t\t\tpath={path}\n\t\t\t\tstyle={styleOverride}\n\t\t\t/>\n\t\t\t{mergedAssistiveText ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{mergedAssistiveText}</span>\n\t\t\t) : null}\n\t\t</span>\n\t);\n};\n\nIcon.displayName = ICON;\n\nexport default Icon;\n\n"],"m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,"file":"index.cjs","names":[],"sources":["../../../../components/icon/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, { type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport UtilityIcon, { type InlineIconData } from '../utilities/utility-icon/index';\nimport IconBackgrounds from '../../utilities/product-tokens/icon-backgrounds';\nimport { ICON } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Icon color variant types\n */\nexport type IconColorVariant = 'base' | 'default' | 'error' | 'light' | 'warning' | 'success';\n\n/**\n * Icon size types\n */\nexport type IconSize = 'xx-small' | 'x-small' | 'small' | 'medium' | 'large';\n\n/**\n * Product theme types for icon backgrounds\n */\nexport type ProductTheme =\n\t| 'global-setup'\n\t| 'service-cloud'\n\t| 'industry-cloud'\n\t| 'sales-cloud'\n\t| 'commerce-cloud'\n\t| 'community-cloud'\n\t| 'marketing-cloud'\n\t| 'quip';\n\n/**\n * Props for the Icon component\n */\nexport interface IconProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: { label?: string } | string;\n\t/** Icon category from SLDS */\n\tcategory?: IconCategory;\n\t/** CSS classes for the SVG element */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Icon color variant */\n\tcolorVariant?: IconColorVariant;\n\t/** CSS classes for the container span */\n\tcontainerClassName?: string | string[] | Record<string, boolean>;\n\t/** Styles for the container span */\n\tcontainerStyle?: CSSProperties;\n\t/** Custom SVG icon data */\n\ticon?: InlineIconData;\n\t/** Invert colors for dark backgrounds */\n\tinverse?: boolean;\n\t/** Name of the icon */\n\tname?: string;\n\t/** Direct path to the icon sprite */\n\tpath?: string;\n\t/** Background theme color (only for standard category) */\n\tproductTheme?: ProductTheme;\n\t/** Size of the icon */\n\tsize?: IconSize;\n\t/** Custom styles for the SVG */\n\tstyle?: CSSProperties;\n\t/** HTML title attribute for the container */\n\ttitle?: string;\n}\n\nconst defaultProps: Required<Pick<IconProps, 'assistiveText' | 'category' | 'colorVariant' | 'size'>> = {\n\tassistiveText: {},\n\tcategory: 'standard',\n\tcolorVariant: 'default',\n\tsize: 'medium',\n};\n\n/**\n * The Icon component is the Lightning Design System Icon component and should be used for naked icons.\n * For icons that are buttons, use the Button component with `variant='icon'`.\n */\nconst Icon = ({\n\tcategory = defaultProps.category,\n\tclassName,\n\tcolorVariant = defaultProps.colorVariant,\n\tcontainerClassName,\n\tcontainerStyle,\n\ticon,\n\tinverse,\n\tname,\n\tpath,\n\tsize = defaultProps.size,\n\ttitle,\n\tproductTheme,\n\tassistiveText = defaultProps.assistiveText,\n\tstyle,\n}: IconProps): React.ReactElement => {\n\tlet styleOverride = style;\n\tif (productTheme && IconBackgrounds[productTheme]) {\n\t\tstyleOverride = {\n\t\t\tbackgroundColor: IconBackgrounds[productTheme],\n\t\t\t...style,\n\t\t};\n\t}\n\n\tlet mergedAssistiveText: string | undefined;\n\tif (typeof assistiveText === 'string') {\n\t\tmergedAssistiveText = assistiveText;\n\t} else {\n\t\tconst defaultText = defaultProps.assistiveText as { label?: string };\n\t\tconst propsText = assistiveText as { label?: string };\n\t\tmergedAssistiveText = propsText?.label ?? defaultText?.label;\n\t}\n\n\tconst kebabCaseName = name ? name.replace(/_/g, '-') : '';\n\n\tconst containerClasses = classNames(\n\t\t{\n\t\t\t'slds-icon_container': category !== 'utility',\n\t\t\t'slds-icon_container_circle': category === 'action',\n\t\t\t[`slds-icon-${category}-${kebabCaseName}`]:\n\t\t\t\tcategory !== 'utility' && category !== 'doctype' && !path,\n\t\t},\n\t\tcontainerClassName as string\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={containerClasses}\n\t\t\tstyle={containerStyle}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t<UtilityIcon\n\t\t\t\taria-hidden={true}\n\t\t\t\tcategory={category}\n\t\t\t\tclassName={classNames(className, 'slds-icon', {\n\t\t\t\t\t'slds-icon_xx-small': size === 'xx-small',\n\t\t\t\t\t'slds-icon_x-small': size === 'x-small',\n\t\t\t\t\t'slds-icon_small': size === 'small',\n\t\t\t\t\t// medium intentionally not present\n\t\t\t\t\t'slds-icon_large': size === 'large',\n\t\t\t\t\t// Color logic for utility vs other categories\n\t\t\t\t\t'slds-icon-text-default':\n\t\t\t\t\t\tcolorVariant === 'default' && category === 'utility'\n\t\t\t\t\t\t\t? !inverse\n\t\t\t\t\t\t\t: inverse,\n\t\t\t\t\t'slds-icon-text-success': colorVariant === 'success',\n\t\t\t\t\t'slds-icon-text-warning': colorVariant === 'warning',\n\t\t\t\t\t'slds-icon-text-error': colorVariant === 'error',\n\t\t\t\t\t'slds-icon-text-light': colorVariant === 'light',\n\t\t\t\t}) as string}\n\t\t\t\ticon={icon}\n\t\t\t\tname={name}\n\t\t\t\tpath={path}\n\t\t\t\tstyle={styleOverride}\n\t\t\t/>\n\t\t\t{mergedAssistiveText ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{mergedAssistiveText}</span>\n\t\t\t) : null}\n\t\t</span>\n\t);\n};\n\nIcon.displayName = ICON;\n\nexport default Icon;\n\n"],"mappings":"4aAmEA,IAAM,EAAkG,CACvG,cAAe,CAAC,EAChB,SAAU,WACV,aAAc,UACd,KAAM,QACP,EAMM,GAAQ,CACb,WAAW,EAAa,SACxB,YACA,eAAe,EAAa,aAC5B,qBACA,iBACA,OACA,UACA,OACA,OACA,OAAO,EAAa,KACpB,QACA,eACA,gBAAgB,EAAa,cAC7B,WACoC,CACpC,IAAI,EAAgB,EAChB,GAAgB,EAAA,QAAgB,KACnC,EAAgB,CACf,gBAAiB,EAAA,QAAgB,GACjC,GAAG,CACJ,GAGD,IAAI,EACJ,GAAI,OAAO,GAAkB,SAC5B,EAAsB,MAChB,CACN,IAAM,EAAc,EAAa,cAEjC,EAAsB,GAAW,OAAS,GAAa,KACxD,CAEA,IAAM,EAAgB,EAAO,EAAK,QAAQ,KAAM,GAAG,EAAI,GAEjD,EAAmB,EAAA,QACxB,CACC,sBAAuB,IAAa,UACpC,6BAA8B,IAAa,UAC1C,aAAa,EAAS,GAAG,KACzB,IAAa,WAAa,IAAa,WAAa,CAAC,CACvD,EACA,CACD,EAEA,OACC,EAAA,EAAA,KAAA,CAAC,OAAD,CACC,UAAW,EACX,MAAO,EACA,QAHR,SAAA,EAKC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAa,GACH,WACV,UAAW,EAAA,QAAW,EAAW,YAAa,CAC7C,qBAAsB,IAAS,WAC/B,oBAAqB,IAAS,UAC9B,kBAAmB,IAAS,QAE5B,kBAAmB,IAAS,QAE5B,yBACC,IAAiB,WAAa,IAAa,UACxC,CAAC,EACD,EACJ,yBAA0B,IAAiB,UAC3C,yBAA0B,IAAiB,UAC3C,uBAAwB,IAAiB,QACzC,uBAAwB,IAAiB,OAC1C,CAAC,EACK,OACA,OACA,OACN,MAAO,CACP,CAAA,EACA,GACA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sBAAuB,SAAA,CAA0B,CAAA,EAC9D,IACC,GAER,EAEA,EAAK,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=(0,n.createContext)({}),a=({iconPath:e,onRequestIconPath:t,actionSprite:n,customSprite:a,doctypeSprite:o,standardSprite:s,utilitySprite:c,children:l})=>{let u={iconPath:e,onRequestIconPath:t,actionSprite:n,customSprite:a,doctypeSprite:o,standardSprite:s,utilitySprite:c};return(0,r.jsx)(i.Provider,{value:u,children:l})};a.displayName=t.ICON_SETTINGS,exports.IconSettingsContext=i,exports.default=a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i=(0,n.createContext)({}),a=({iconPath:e,onRequestIconPath:t,actionSprite:n,customSprite:a,doctypeSprite:o,standardSprite:s,utilitySprite:c,children:l})=>{let u={iconPath:e,onRequestIconPath:t,actionSprite:n,customSprite:a,doctypeSprite:o,standardSprite:s,utilitySprite:c};return(0,r.jsx)(i.Provider,{value:u,children:l})};a.displayName=t.ICON_SETTINGS,exports.IconSettingsContext=i,exports.default=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/icon-settings/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, { createContext, type ReactNode } from 'react';\nimport { ICON_SETTINGS } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Context value shape for IconSettings\n */\nexport interface IconSettingsContextValue {\n\t/** Path to the root icon folder */\n\ticonPath?: string;\n\t/** Function to generate custom icon paths */\n\tonRequestIconPath?: (data: { category: IconCategory; name: string }) => string;\n\t/** Path to the action sprite */\n\tactionSprite?: string;\n\t/** Path to the custom sprite */\n\tcustomSprite?: string;\n\t/** Path to the doctype sprite */\n\tdoctypeSprite?: string;\n\t/** Path to the standard sprite */\n\tstandardSprite?: string;\n\t/** Path to the utility sprite */\n\tutilitySprite?: string;\n}\n\n/**\n * Props for the IconSettings component\n */\nexport interface IconSettingsProps extends IconSettingsContextValue {\n\t/** Child components that will have access to icon settings */\n\tchildren: ReactNode;\n}\n\n/**\n * Context for sharing icon settings across the component tree\n */\nexport const IconSettingsContext = createContext<IconSettingsContextValue>({});\n\n/**\n * The Icon Settings component allows for the path to the icons to be specified in all child\n * components and is recommended to be used at the root of the application.\n *\n * **Individual sprites**\n * If you are using webpack it is advised to use the sprite properties\n * {actionSprite, standardSprite...} to specify the individual sprite paths so that webpack can\n * easily re-write the paths.\n *\n * ```tsx\n * import actionSprite from '......';\n *\n * <IconSettings actionSprite={actionSprite} ......>\n * <App />\n * </IconSettings>\n * ```\n *\n * **Root icon path**\n * Otherwise use the iconPath to specify the root path to where the icon files will be located\n * in your application such as `/assets/icons`.\n */\nconst IconSettings = ({\n\ticonPath,\n\tonRequestIconPath,\n\tactionSprite,\n\tcustomSprite,\n\tdoctypeSprite,\n\tstandardSprite,\n\tutilitySprite,\n\tchildren,\n}: IconSettingsProps): React.ReactElement => {\n\tconst contextValue: IconSettingsContextValue = {\n\t\ticonPath,\n\t\tonRequestIconPath,\n\t\tactionSprite,\n\t\tcustomSprite,\n\t\tdoctypeSprite,\n\t\tstandardSprite,\n\t\tutilitySprite,\n\t};\n\n\treturn (\n\t\t<IconSettingsContext.Provider value={contextValue}>\n\t\t\t{children}\n\t\t</IconSettingsContext.Provider>\n\t);\n};\n\nIconSettings.displayName = ICON_SETTINGS;\n\nexport default IconSettings;\n\n"],"mappings":"8KAsCA,IAAa,GAAA,EAAsB,EAAA,cAAA,CAAwC,CAAC,CAAC,EAuBvE,GAAgB,CACrB,WACA,oBACA,eACA,eACA,gBACA,iBACA,gBACA,cAC4C,CAC5C,IAAM,EAAyC,CAC9C,WACA,oBACA,eACA,eACA,gBACA,iBACA,eACD,EAEA,OACC,EAAA,EAAA,IAAA,CAAC,EAAoB,SAArB,CAA8B,MAAO,EACnC,UAC4B,CAAA,CAEhC,EAEA,EAAa,YAAc,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/icon-settings/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, { createContext, type ReactNode } from 'react';\nimport { ICON_SETTINGS } from '../../utilities/constants';\nimport type { IconCategory } from '../../types/common';\n\n/**\n * Context value shape for IconSettings\n */\nexport interface IconSettingsContextValue {\n\t/** Path to the root icon folder */\n\ticonPath?: string;\n\t/** Function to generate custom icon paths */\n\tonRequestIconPath?: (data: { category: IconCategory; name: string }) => string;\n\t/** Path to the action sprite */\n\tactionSprite?: string;\n\t/** Path to the custom sprite */\n\tcustomSprite?: string;\n\t/** Path to the doctype sprite */\n\tdoctypeSprite?: string;\n\t/** Path to the standard sprite */\n\tstandardSprite?: string;\n\t/** Path to the utility sprite */\n\tutilitySprite?: string;\n}\n\n/**\n * Props for the IconSettings component\n */\nexport interface IconSettingsProps extends IconSettingsContextValue {\n\t/** Child components that will have access to icon settings */\n\tchildren: ReactNode;\n}\n\n/**\n * Context for sharing icon settings across the component tree\n */\nexport const IconSettingsContext = createContext<IconSettingsContextValue>({});\n\n/**\n * The Icon Settings component allows for the path to the icons to be specified in all child\n * components and is recommended to be used at the root of the application.\n *\n * **Individual sprites**\n * If you are using webpack it is advised to use the sprite properties\n * {actionSprite, standardSprite...} to specify the individual sprite paths so that webpack can\n * easily re-write the paths.\n *\n * ```tsx\n * import actionSprite from '......';\n *\n * <IconSettings actionSprite={actionSprite} ......>\n * <App />\n * </IconSettings>\n * ```\n *\n * **Root icon path**\n * Otherwise use the iconPath to specify the root path to where the icon files will be located\n * in your application such as `/assets/icons`.\n */\nconst IconSettings = ({\n\ticonPath,\n\tonRequestIconPath,\n\tactionSprite,\n\tcustomSprite,\n\tdoctypeSprite,\n\tstandardSprite,\n\tutilitySprite,\n\tchildren,\n}: IconSettingsProps): React.ReactElement => {\n\tconst contextValue: IconSettingsContextValue = {\n\t\ticonPath,\n\t\tonRequestIconPath,\n\t\tactionSprite,\n\t\tcustomSprite,\n\t\tdoctypeSprite,\n\t\tstandardSprite,\n\t\tutilitySprite,\n\t};\n\n\treturn (\n\t\t<IconSettingsContext.Provider value={contextValue}>\n\t\t\t{children}\n\t\t</IconSettingsContext.Provider>\n\t);\n};\n\nIconSettings.displayName = ICON_SETTINGS;\n\nexport default IconSettings;\n\n"],"mappings":"6QAsCA,IAAa,GAAA,EAAsB,EAAA,cAAA,CAAwC,CAAC,CAAC,EAuBvE,GAAgB,CACrB,WACA,oBACA,eACA,eACA,gBACA,iBACA,gBACA,cAC4C,CAC5C,IAAM,EAAyC,CAC9C,WACA,oBACA,eACA,eACA,gBACA,iBACA,eACD,EAEA,OACC,EAAA,EAAA,IAAA,CAAC,EAAoB,SAArB,CAA8B,MAAO,EACnC,UAC4B,CAAA,CAEhC,EAEA,EAAa,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../utilities/utility-icon/svg.cjs"),r=require("../../utilities/class-names.cjs"),i=require("./check-props.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=e=>{if(!e||typeof e!=`string`)return;let t=e.replace(/[\x00-\x1f\x7f]/g,``).trim().toLowerCase();if([`javascript:`,`data:`,`vbscript:`,`file:`,`blob:`].some(e=>t.startsWith(e))){console.log(`Illustration: Blocked potentially unsafe path "${e}". Only http, https, relative paths, and fragment identifiers are allowed.`);return}return e},c=({className:e,illustration:a,heading:c,messageBody:l,name:u,path:d,internalIllustration:f=!0,size:p=`small`,style:m={},...h})=>{i.default(t.ILLUSTRATION,{className:e,illustration:a,heading:c,messageBody:l,name:u,path:d,internalIllustration:f,size:p,style:m});let g=u?u.replace(/_| /g,`-`).toLowerCase():``,_={...m},v=null;if(p===`large`&&!_.height&&(_.height=`400px`),a)v=(0,o.jsx)(n.default,{className:`slds-illustration__svg`,"aria-hidden":`true`,data:a,name:g,style:_});else if(d){let e=s(d);e&&(v=(0,o.jsx)(`svg`,{className:`slds-illustration__svg`,"aria-hidden":`true`,name:g,style:_,children:(0,o.jsx)(`use`,{xlinkHref:e})}))}return(0,o.jsxs)(`div`,{className:r.default(e,`slds-illustration`,{"slds-illustration_small":p===`small`,"slds-illustration_large":p===`large`}),children:[v,(0,o.jsxs)(`div`,{className:`slds-text-longform`,children:[c&&(0,o.jsx)(`h3`,{className:`slds-text-heading_medium`,children:c}),l&&(0,o.jsx)(`p`,{className:`slds-text-body_regular`,children:l})]})]})};c.displayName=t.ILLUSTRATION,exports.default=c;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../utilities/utility-icon/svg.cjs"),r=require("../../utilities/class-names.cjs"),i=require("./check-props.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=e=>{if(!e||typeof e!=`string`)return;let t=e.replace(/[\x00-\x1f\x7f]/g,``).trim().toLowerCase();if([`javascript:`,`data:`,`vbscript:`,`file:`,`blob:`].some(e=>t.startsWith(e))){console.log(`Illustration: Blocked potentially unsafe path "${e}". Only http, https, relative paths, and fragment identifiers are allowed.`);return}return e},c=({className:e,illustration:a,heading:c,messageBody:l,name:u,path:d,internalIllustration:f=!0,size:p=`small`,style:m={},...h})=>{i.default(t.ILLUSTRATION,{className:e,illustration:a,heading:c,messageBody:l,name:u,path:d,internalIllustration:f,size:p,style:m});let g=u?u.replace(/_| /g,`-`).toLowerCase():``,_={...m},v=null;if(p===`large`&&!_.height&&(_.height=`400px`),a)v=(0,o.jsx)(n.default,{className:`slds-illustration__svg`,"aria-hidden":`true`,data:a,name:g,style:_});else if(d){let e=s(d);e&&(v=(0,o.jsx)(`svg`,{className:`slds-illustration__svg`,"aria-hidden":`true`,name:g,style:_,children:(0,o.jsx)(`use`,{xlinkHref:e})}))}return(0,o.jsxs)(`div`,{className:r.default(e,`slds-illustration`,{"slds-illustration_small":p===`small`,"slds-illustration_large":p===`large`}),children:[v,(0,o.jsxs)(`div`,{className:`slds-text-longform`,children:[c&&(0,o.jsx)(`h3`,{className:`slds-text-heading_medium`,children:c}),l&&(0,o.jsx)(`p`,{className:`slds-text-body_regular`,children:l})]})]})};c.displayName=t.ILLUSTRATION,exports.default=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/illustration/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, { type ReactNode, type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport Svg from '../utilities/utility-icon/svg';\nimport { ILLUSTRATION } from '../../utilities/constants';\n// Development-only deprecation warning. Illustration is deprecated for security\n// reasons (imported SVGs bypass SLDS styles via shadow DOM, and a user-provided\n// `path` is an XSS vector). This must fire — do not drop it.\nimport checkProps from './check-props';\n\n/**\n * Illustration size options\n */\nexport type IllustrationSize = 'small' | 'large';\n\n/**\n * SVG illustration data structure\n */\nexport interface IllustrationData {\n\tviewBox?: string;\n\t[key: string]: unknown;\n}\n\n/**\n * Props for the Illustration component\n */\nexport interface IllustrationProps {\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Heading text */\n\theading?: string;\n\t/** Custom SVG object */\n\tillustration?: IllustrationData;\n\t/** Whether SVGs are from design-system-react repo */\n\tinternalIllustration?: boolean;\n\t/** Message body below heading */\n\tmessageBody?: string | ReactNode;\n\t/** Name of the illustration */\n\tname?: string;\n\t/** Path to illustration SVG */\n\tpath?: string;\n\t/** Size of illustration */\n\tsize?: IllustrationSize;\n\t/** Custom styles for SVG */\n\tstyle?: CSSProperties;\n}\n\nconst sanitizePath = (path: string) => {\n\tif (!path || typeof path !== 'string') {\n\t\treturn undefined;\n\t}\n\n\t// Remove control characters, null bytes, and normalize whitespace\n\tconst normalizedPath = path\n\t\t.replace(/[\\x00-\\x1f\\x7f]/g, '') // eslint-disable-line no-control-regex\n\t\t.trim()\n\t\t.toLowerCase();\n\n\tconst dangerousProtocols = [\n\t\t'javascript:', // eslint-disable-line no-script-url\n\t\t'data:',\n\t\t'vbscript:',\n\t\t'file:',\n\t\t'blob:',\n\t];\n\n\tconst isDangerous = dangerousProtocols.some((protocol) =>\n\t\tnormalizedPath.startsWith(protocol)\n\t);\n\n\tif (isDangerous) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.log(\n\t\t\t`Illustration: Blocked potentially unsafe path \"${path}\". Only http, https, relative paths, and fragment identifiers are allowed.`\n\t\t);\n\t\treturn undefined;\n\t}\n\n\treturn path;\n};\n\n/**\n * An illustration is an image and inline text that work in tandem to communicate a state in a more friendly way.\n */\nconst Illustration = ({\n\tclassName,\n\tillustration,\n\theading,\n\tmessageBody,\n\tname,\n\tpath,\n\tinternalIllustration = true,\n\tsize = 'small',\n\tstyle = {},\n\t...rest\n}: IllustrationProps): React.ReactElement => {\n\t// Dev-only deprecation warning (see check-props.js): Illustration is\n\t// deprecated, and using `path` with user-provided SVGs is an XSS risk.\n\t(checkProps as (component: string, props: unknown) => void)(ILLUSTRATION, {\n\t\tclassName,\n\t\tillustration,\n\t\theading,\n\t\tmessageBody,\n\t\tname,\n\t\tpath,\n\t\tinternalIllustration,\n\t\tsize,\n\t\tstyle,\n\t});\n\n\tconst kebabCaseName = name ? name.replace(/_| /g, '-').toLowerCase() : '';\n\tconst styles: CSSProperties = { ...style };\n\tlet illustrationSvg: React.ReactNode = null;\n\n\t// Large illustration SVG should have a default height of 400px if not already specified\n\tif (size === 'large' && !styles.height) {\n\t\tstyles.height = '400px';\n\t}\n\n\tif (illustration) {\n\t\t// Use SVG data passed in with `illustration` prop\n\t\tillustrationSvg = (\n\t\t\t<Svg\n\t\t\t\tclassName=\"slds-illustration__svg\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tdata={illustration}\n\t\t\t\tname={kebabCaseName}\n\t\t\t\tstyle={styles}\n\t\t\t/>\n\t\t);\n\t} else if (path) {\n\t\tconst safePath = sanitizePath(path);\n\t\tif (safePath) {\n\t\t\tillustrationSvg = (\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"slds-illustration__svg\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tname={kebabCaseName}\n\t\t\t\t\tstyle={styles}\n\t\t\t\t>\n\t\t\t\t\t<use xlinkHref={safePath} />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(className as string, 'slds-illustration', {\n\t\t\t\t'slds-illustration_small': size === 'small',\n\t\t\t\t'slds-illustration_large': size === 'large',\n\t\t\t})}\n\t\t>\n\t\t\t{illustrationSvg}\n\t\t\t<div className=\"slds-text-longform\">\n\t\t\t\t{heading && <h3 className=\"slds-text-heading_medium\">{heading}</h3>}\n\t\t\t\t{messageBody && <p className=\"slds-text-body_regular\">{messageBody}</p>}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nIllustration.displayName = ILLUSTRATION;\n\nexport default Illustration;\n"],"mappings":"ySAiDA,IAAM,EAAgB,GAAiB,CACtC,GAAI,CAAC,GAAQ,OAAO,GAAS,SAC5B,OAID,IAAM,EAAiB,EACrB,QAAQ,mBAAoB,EAAE,CAAC,CAC/B,KAAK,CAAC,CACN,YAAY,EAcd,GAJoB,CAPnB,cACA,QACA,YACA,QACA,OAGmB,CAAA,CAAmB,KAAM,GAC5C,EAAe,WAAW,CAAQ,CAG/B,EAAa,CAEhB,QAAQ,IACP,kDAAkD,EAAK,2EACxD,EACA,MACD,CAEA,OAAO,CACR,EAKM,GAAgB,CACrB,YACA,eACA,UACA,cACA,OACA,OACA,uBAAuB,GACvB,OAAO,QACP,QAAQ,CAAC,EACT,GAAG,KACyC,CAG5C,EAAA,QAA4D,EAAA,aAAc,CACzE,YACA,eACA,UACA,cACA,OACA,OACA,uBACA,OACA,OACD,CAAC,EAED,IAAM,EAAgB,EAAO,EAAK,QAAQ,OAAQ,GAAG,CAAC,CAAC,YAAY,EAAI,GACjE,EAAwB,CAAE,GAAG,CAAM,EACrC,EAAmC,KAOvC,GAJI,IAAS,SAAW,CAAC,EAAO,SAC/B,EAAO,OAAS,SAGb,EAEH,GACC,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,UAAU,yBACV,cAAY,OACZ,KAAM,EACN,KAAM,EACN,MAAO,CACP,CAAA,OAEI,GAAI,EAAM,CAChB,IAAM,EAAW,EAAa,CAAI,EAC9B,IACH,GACC,EAAA,EAAA,IAAA,CAAC,MAAD,CACC,UAAU,yBACV,cAAY,OACZ,KAAM,EACN,MAAO,EAEP,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,CAAW,CAAA,CACvB,CAAA,EAGR,CAEA,OACC,EAAA,EAAA,KAAA,CAAC,MAAD,CACC,UAAW,EAAA,QAAW,EAAqB,oBAAqB,CAC/D,0BAA2B,IAAS,QACpC,0BAA2B,IAAS,OACrC,CAAC,EAJF,SAAA,CAME,GACD,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,qBAAf,SAAA,CACE,IAAW,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,2BAA4B,SAAA,CAAY,CAAA,EACjE,IAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,yBAA0B,SAAA,CAAe,CAAA,CAClE,CACD,CAAA,CAAA,GAEP,EAEA,EAAa,YAAc,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/illustration/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, { type ReactNode, type CSSProperties } from 'react';\nimport classNames from '../../utilities/class-names';\nimport Svg from '../utilities/utility-icon/svg';\nimport { ILLUSTRATION } from '../../utilities/constants';\n// Development-only deprecation warning. Illustration is deprecated for security\n// reasons (imported SVGs bypass SLDS styles via shadow DOM, and a user-provided\n// `path` is an XSS vector). This must fire — do not drop it.\nimport checkProps from './check-props';\n\n/**\n * Illustration size options\n */\nexport type IllustrationSize = 'small' | 'large';\n\n/**\n * SVG illustration data structure\n */\nexport interface IllustrationData {\n\tviewBox?: string;\n\t[key: string]: unknown;\n}\n\n/**\n * Props for the Illustration component\n */\nexport interface IllustrationProps {\n\t/** CSS classes */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Heading text */\n\theading?: string;\n\t/** Custom SVG object */\n\tillustration?: IllustrationData;\n\t/** Whether SVGs are from design-system-react repo */\n\tinternalIllustration?: boolean;\n\t/** Message body below heading */\n\tmessageBody?: string | ReactNode;\n\t/** Name of the illustration */\n\tname?: string;\n\t/** Path to illustration SVG */\n\tpath?: string;\n\t/** Size of illustration */\n\tsize?: IllustrationSize;\n\t/** Custom styles for SVG */\n\tstyle?: CSSProperties;\n}\n\nconst sanitizePath = (path: string) => {\n\tif (!path || typeof path !== 'string') {\n\t\treturn undefined;\n\t}\n\n\t// Remove control characters, null bytes, and normalize whitespace\n\tconst normalizedPath = path\n\t\t.replace(/[\\x00-\\x1f\\x7f]/g, '') // eslint-disable-line no-control-regex\n\t\t.trim()\n\t\t.toLowerCase();\n\n\tconst dangerousProtocols = [\n\t\t'javascript:', // eslint-disable-line no-script-url\n\t\t'data:',\n\t\t'vbscript:',\n\t\t'file:',\n\t\t'blob:',\n\t];\n\n\tconst isDangerous = dangerousProtocols.some((protocol) =>\n\t\tnormalizedPath.startsWith(protocol)\n\t);\n\n\tif (isDangerous) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.log(\n\t\t\t`Illustration: Blocked potentially unsafe path \"${path}\". Only http, https, relative paths, and fragment identifiers are allowed.`\n\t\t);\n\t\treturn undefined;\n\t}\n\n\treturn path;\n};\n\n/**\n * An illustration is an image and inline text that work in tandem to communicate a state in a more friendly way.\n */\nconst Illustration = ({\n\tclassName,\n\tillustration,\n\theading,\n\tmessageBody,\n\tname,\n\tpath,\n\tinternalIllustration = true,\n\tsize = 'small',\n\tstyle = {},\n\t...rest\n}: IllustrationProps): React.ReactElement => {\n\t// Dev-only deprecation warning (see check-props.js): Illustration is\n\t// deprecated, and using `path` with user-provided SVGs is an XSS risk.\n\t(checkProps as (component: string, props: unknown) => void)(ILLUSTRATION, {\n\t\tclassName,\n\t\tillustration,\n\t\theading,\n\t\tmessageBody,\n\t\tname,\n\t\tpath,\n\t\tinternalIllustration,\n\t\tsize,\n\t\tstyle,\n\t});\n\n\tconst kebabCaseName = name ? name.replace(/_| /g, '-').toLowerCase() : '';\n\tconst styles: CSSProperties = { ...style };\n\tlet illustrationSvg: React.ReactNode = null;\n\n\t// Large illustration SVG should have a default height of 400px if not already specified\n\tif (size === 'large' && !styles.height) {\n\t\tstyles.height = '400px';\n\t}\n\n\tif (illustration) {\n\t\t// Use SVG data passed in with `illustration` prop\n\t\tillustrationSvg = (\n\t\t\t<Svg\n\t\t\t\tclassName=\"slds-illustration__svg\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tdata={illustration}\n\t\t\t\tname={kebabCaseName}\n\t\t\t\tstyle={styles}\n\t\t\t/>\n\t\t);\n\t} else if (path) {\n\t\tconst safePath = sanitizePath(path);\n\t\tif (safePath) {\n\t\t\tillustrationSvg = (\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"slds-illustration__svg\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tname={kebabCaseName}\n\t\t\t\t\tstyle={styles}\n\t\t\t\t>\n\t\t\t\t\t<use xlinkHref={safePath} />\n\t\t\t\t</svg>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(className as string, 'slds-illustration', {\n\t\t\t\t'slds-illustration_small': size === 'small',\n\t\t\t\t'slds-illustration_large': size === 'large',\n\t\t\t})}\n\t\t>\n\t\t\t{illustrationSvg}\n\t\t\t<div className=\"slds-text-longform\">\n\t\t\t\t{heading && <h3 className=\"slds-text-heading_medium\">{heading}</h3>}\n\t\t\t\t{messageBody && <p className=\"slds-text-body_regular\">{messageBody}</p>}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nIllustration.displayName = ILLUSTRATION;\n\nexport default Illustration;\n"],"mappings":"wYAiDA,IAAM,EAAgB,GAAiB,CACtC,GAAI,CAAC,GAAQ,OAAO,GAAS,SAC5B,OAID,IAAM,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