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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/dist/cjs/components/accordion/panel.cjs +1 -1
  2. package/dist/cjs/components/accordion/panel.cjs.map +1 -1
  3. package/dist/cjs/components/badge/index.cjs +1 -1
  4. package/dist/cjs/components/badge/index.cjs.map +1 -1
  5. package/dist/cjs/components/builder-header/check-props.cjs +2 -0
  6. package/dist/cjs/components/builder-header/check-props.cjs.map +1 -0
  7. package/dist/cjs/components/builder-header/component.cjs +2 -0
  8. package/dist/cjs/components/builder-header/component.cjs.map +1 -0
  9. package/dist/cjs/components/builder-header/toolbar.cjs +1 -1
  10. package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
  11. package/dist/cjs/components/carousel/check-props.cjs +2 -0
  12. package/dist/cjs/components/carousel/check-props.cjs.map +1 -0
  13. package/dist/cjs/components/carousel/component.cjs +2 -0
  14. package/dist/cjs/components/carousel/component.cjs.map +1 -0
  15. package/dist/cjs/components/carousel/index.cjs +1 -1
  16. package/dist/cjs/components/carousel/index.cjs.map +1 -1
  17. package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
  18. package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
  19. package/dist/cjs/components/checkbox/check-props.cjs +2 -0
  20. package/dist/cjs/components/checkbox/check-props.cjs.map +1 -0
  21. package/dist/cjs/components/checkbox/component.cjs +2 -0
  22. package/dist/cjs/components/checkbox/component.cjs.map +1 -0
  23. package/dist/cjs/components/checkbox/index.cjs +1 -1
  24. package/dist/cjs/components/checkbox/index.cjs.map +1 -1
  25. package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
  26. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  27. package/dist/cjs/components/combobox/check-props.cjs +1 -1
  28. package/dist/cjs/components/combobox/check-props.cjs.map +1 -1
  29. package/dist/cjs/components/combobox/combobox.cjs +1 -1
  30. package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
  31. package/dist/cjs/components/combobox/index.cjs.map +1 -1
  32. package/dist/cjs/components/combobox/private/menu.cjs +1 -1
  33. package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
  34. package/dist/cjs/components/dynamic-icon/index.cjs +1 -1
  35. package/dist/cjs/components/dynamic-icon/index.cjs.map +1 -1
  36. package/dist/cjs/components/filter/filter.cjs +1 -1
  37. package/dist/cjs/components/filter/filter.cjs.map +1 -1
  38. package/dist/cjs/components/input/index.cjs +1 -1
  39. package/dist/cjs/components/input/index.cjs.map +1 -1
  40. package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
  41. package/dist/cjs/components/menu-dropdown/check-props.cjs.map +1 -1
  42. package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
  43. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
  44. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
  45. package/dist/cjs/components/modal/check-props.cjs +2 -0
  46. package/dist/cjs/components/modal/check-props.cjs.map +1 -0
  47. package/dist/cjs/components/modal/component.cjs +2 -0
  48. package/dist/cjs/components/modal/component.cjs.map +1 -0
  49. package/dist/cjs/components/modal/index.cjs +1 -1
  50. package/dist/cjs/components/modal/index.cjs.map +1 -1
  51. package/dist/cjs/components/page-header/check-props.cjs +2 -0
  52. package/dist/cjs/components/page-header/check-props.cjs.map +1 -0
  53. package/dist/cjs/components/page-header/component.cjs +2 -0
  54. package/dist/cjs/components/page-header/component.cjs.map +1 -0
  55. package/dist/cjs/components/page-header/index.cjs +1 -1
  56. package/dist/cjs/components/page-header/index.cjs.map +1 -1
  57. package/dist/cjs/components/page-header/private/base/index.cjs +1 -1
  58. package/dist/cjs/components/page-header/private/base/index.cjs.map +1 -1
  59. package/dist/cjs/components/page-header/private/controls.cjs +1 -1
  60. package/dist/cjs/components/page-header/private/controls.cjs.map +1 -1
  61. package/dist/cjs/components/page-header/private/object-home/index.cjs +1 -1
  62. package/dist/cjs/components/page-header/private/object-home/index.cjs.map +1 -1
  63. package/dist/cjs/components/page-header/private/record-home/index.cjs +1 -1
  64. package/dist/cjs/components/page-header/private/record-home/index.cjs.map +1 -1
  65. package/dist/cjs/components/page-header/private/related-list/index.cjs +1 -1
  66. package/dist/cjs/components/page-header/private/related-list/index.cjs.map +1 -1
  67. package/dist/cjs/components/popover/component.cjs +2 -0
  68. package/dist/cjs/components/popover/component.cjs.map +1 -0
  69. package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
  70. package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
  71. package/dist/cjs/components/popover/popover.cjs +1 -1
  72. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  73. package/dist/cjs/components/progress-indicator/check-props.cjs +1 -1
  74. package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -1
  75. package/dist/cjs/components/progress-indicator/component.cjs +2 -0
  76. package/dist/cjs/components/progress-indicator/component.cjs.map +1 -0
  77. package/dist/cjs/components/progress-indicator/index.cjs +1 -1
  78. package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
  79. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs +1 -1
  80. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs.map +1 -1
  81. package/dist/cjs/components/radio/check-props.cjs +2 -0
  82. package/dist/cjs/components/radio/check-props.cjs.map +1 -0
  83. package/dist/cjs/components/radio/component.cjs +2 -0
  84. package/dist/cjs/components/radio/component.cjs.map +1 -0
  85. package/dist/cjs/components/radio/index.cjs +1 -1
  86. package/dist/cjs/components/radio/index.cjs.map +1 -1
  87. package/dist/cjs/components/setup-assistant/check-props.cjs +1 -1
  88. package/dist/cjs/components/setup-assistant/check-props.cjs.map +1 -1
  89. package/dist/cjs/components/setup-assistant/step.cjs +1 -1
  90. package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
  91. package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
  92. package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
  93. package/dist/cjs/components/simple-data-table/index.cjs +1 -1
  94. package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
  95. package/dist/cjs/components/slider/check-props.cjs +2 -0
  96. package/dist/cjs/components/slider/check-props.cjs.map +1 -0
  97. package/dist/cjs/components/slider/component.cjs +2 -0
  98. package/dist/cjs/components/slider/component.cjs.map +1 -0
  99. package/dist/cjs/components/slider/index.cjs +1 -1
  100. package/dist/cjs/components/slider/index.cjs.map +1 -1
  101. package/dist/cjs/components/spinner/check-props.cjs +2 -0
  102. package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
  103. package/dist/cjs/components/spinner/component.cjs +2 -0
  104. package/dist/cjs/components/spinner/component.cjs.map +1 -0
  105. package/dist/cjs/components/spinner/index.cjs +1 -1
  106. package/dist/cjs/components/spinner/index.cjs.map +1 -1
  107. package/dist/cjs/components/split-view/check-props.cjs +1 -1
  108. package/dist/cjs/components/split-view/check-props.cjs.map +1 -1
  109. package/dist/cjs/components/split-view/index.cjs +1 -1
  110. package/dist/cjs/components/split-view/index.cjs.map +1 -1
  111. package/dist/cjs/components/split-view/listbox-check-props.cjs +2 -0
  112. package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -0
  113. package/dist/cjs/components/split-view/listbox.cjs +1 -1
  114. package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
  115. package/dist/cjs/components/split-view/private/list-item-content.cjs +1 -1
  116. package/dist/cjs/components/split-view/private/list-item-content.cjs.map +1 -1
  117. package/dist/cjs/components/split-view/private/list-item-with-content.cjs +1 -1
  118. package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
  119. package/dist/cjs/components/split-view/private/toggle-button.cjs +1 -1
  120. package/dist/cjs/components/split-view/private/toggle-button.cjs.map +1 -1
  121. package/dist/cjs/components/tabs/panel.cjs.map +1 -1
  122. package/dist/cjs/components/textarea/check-props.cjs +1 -1
  123. package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
  124. package/dist/cjs/components/textarea/index.cjs +1 -1
  125. package/dist/cjs/components/textarea/index.cjs.map +1 -1
  126. package/dist/cjs/components/tree/check-props.cjs +1 -1
  127. package/dist/cjs/components/tree/check-props.cjs.map +1 -1
  128. package/dist/cjs/components/tree/component.cjs +2 -0
  129. package/dist/cjs/components/tree/component.cjs.map +1 -0
  130. package/dist/cjs/components/tree/tree.cjs +1 -1
  131. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  132. package/dist/cjs/components/trial-bar/check-props.cjs +2 -0
  133. package/dist/cjs/components/trial-bar/check-props.cjs.map +1 -0
  134. package/dist/cjs/components/trial-bar/component.cjs +2 -0
  135. package/dist/cjs/components/trial-bar/component.cjs.map +1 -0
  136. package/dist/cjs/components/trial-bar/index.cjs +1 -1
  137. package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
  138. package/dist/cjs/components/utilities/menu-list/index.cjs +1 -1
  139. package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
  140. package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
  141. package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
  142. package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
  143. package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
  144. package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
  145. package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
  146. package/dist/cjs/components/vertical-navigation/private/item.cjs +1 -1
  147. package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
  148. package/dist/cjs/components/welcome-mat/check-props.cjs +2 -0
  149. package/dist/cjs/components/welcome-mat/check-props.cjs.map +1 -0
  150. package/dist/cjs/components/welcome-mat/component.cjs +2 -0
  151. package/dist/cjs/components/welcome-mat/component.cjs.map +1 -0
  152. package/dist/cjs/components/welcome-mat/index.cjs +1 -1
  153. package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
  154. package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
  155. package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
  156. package/dist/cjs/utilities/warning/deprecated-property-value.cjs +2 -0
  157. package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -0
  158. package/dist/es/components/accordion/panel.js +1 -1
  159. package/dist/es/components/accordion/panel.js.map +1 -1
  160. package/dist/es/components/badge/index.js +6 -5
  161. package/dist/es/components/badge/index.js.map +1 -1
  162. package/dist/es/components/builder-header/check-props.js +13 -0
  163. package/dist/es/components/builder-header/check-props.js.map +1 -0
  164. package/dist/es/components/builder-header/component.js +65 -0
  165. package/dist/es/components/builder-header/component.js.map +1 -0
  166. package/dist/es/components/builder-header/toolbar.js +18 -13
  167. package/dist/es/components/builder-header/toolbar.js.map +1 -1
  168. package/dist/es/components/carousel/check-props.js +13 -0
  169. package/dist/es/components/carousel/check-props.js.map +1 -0
  170. package/dist/es/components/carousel/component.js +27 -0
  171. package/dist/es/components/carousel/component.js.map +1 -0
  172. package/dist/es/components/carousel/index.js +121 -109
  173. package/dist/es/components/carousel/index.js.map +1 -1
  174. package/dist/es/components/carousel/private/carousel-item.js +1 -2
  175. package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
  176. package/dist/es/components/checkbox/check-props.js +14 -0
  177. package/dist/es/components/checkbox/check-props.js.map +1 -0
  178. package/dist/es/components/checkbox/component.js +35 -0
  179. package/dist/es/components/checkbox/component.js.map +1 -0
  180. package/dist/es/components/checkbox/index.js +124 -112
  181. package/dist/es/components/checkbox/index.js.map +1 -1
  182. package/dist/es/components/color-picker/color-picker.js +1 -1
  183. package/dist/es/components/color-picker/color-picker.js.map +1 -1
  184. package/dist/es/components/combobox/check-props.js +1 -1
  185. package/dist/es/components/combobox/check-props.js.map +1 -1
  186. package/dist/es/components/combobox/combobox.js +210 -202
  187. package/dist/es/components/combobox/combobox.js.map +1 -1
  188. package/dist/es/components/combobox/index.js.map +1 -1
  189. package/dist/es/components/combobox/private/menu.js +5 -7
  190. package/dist/es/components/combobox/private/menu.js.map +1 -1
  191. package/dist/es/components/dynamic-icon/index.js +1 -1
  192. package/dist/es/components/dynamic-icon/index.js.map +1 -1
  193. package/dist/es/components/filter/filter.js +1 -1
  194. package/dist/es/components/filter/filter.js.map +1 -1
  195. package/dist/es/components/input/index.js +138 -136
  196. package/dist/es/components/input/index.js.map +1 -1
  197. package/dist/es/components/menu-dropdown/check-props.js +1 -1
  198. package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
  199. package/dist/es/components/menu-dropdown/index.js.map +1 -1
  200. package/dist/es/components/menu-dropdown/menu-dropdown.js +192 -185
  201. package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
  202. package/dist/es/components/modal/check-props.js +22 -0
  203. package/dist/es/components/modal/check-props.js.map +1 -0
  204. package/dist/es/components/modal/component.js +35 -0
  205. package/dist/es/components/modal/component.js.map +1 -0
  206. package/dist/es/components/modal/index.js +118 -104
  207. package/dist/es/components/modal/index.js.map +1 -1
  208. package/dist/es/components/page-header/check-props.js +31 -0
  209. package/dist/es/components/page-header/check-props.js.map +1 -0
  210. package/dist/es/components/page-header/component.js +35 -0
  211. package/dist/es/components/page-header/component.js.map +1 -0
  212. package/dist/es/components/page-header/index.js +56 -38
  213. package/dist/es/components/page-header/index.js.map +1 -1
  214. package/dist/es/components/page-header/private/base/index.js +1 -1
  215. package/dist/es/components/page-header/private/base/index.js.map +1 -1
  216. package/dist/es/components/page-header/private/controls.js +1 -1
  217. package/dist/es/components/page-header/private/controls.js.map +1 -1
  218. package/dist/es/components/page-header/private/object-home/index.js +4 -4
  219. package/dist/es/components/page-header/private/object-home/index.js.map +1 -1
  220. package/dist/es/components/page-header/private/record-home/index.js +1 -1
  221. package/dist/es/components/page-header/private/record-home/index.js.map +1 -1
  222. package/dist/es/components/page-header/private/related-list/index.js +2 -2
  223. package/dist/es/components/page-header/private/related-list/index.js.map +1 -1
  224. package/dist/es/components/popover/component.js +59 -0
  225. package/dist/es/components/popover/component.js.map +1 -0
  226. package/dist/es/components/popover/edit-dialog.js +1 -1
  227. package/dist/es/components/popover/edit-dialog.js.map +1 -1
  228. package/dist/es/components/popover/popover.js +247 -203
  229. package/dist/es/components/popover/popover.js.map +1 -1
  230. package/dist/es/components/progress-indicator/check-props.js +11 -8
  231. package/dist/es/components/progress-indicator/check-props.js.map +1 -1
  232. package/dist/es/components/progress-indicator/component.js +35 -0
  233. package/dist/es/components/progress-indicator/component.js.map +1 -0
  234. package/dist/es/components/progress-indicator/index.js +74 -71
  235. package/dist/es/components/progress-indicator/index.js.map +1 -1
  236. package/dist/es/components/progress-indicator/private/step-vertical.js +23 -20
  237. package/dist/es/components/progress-indicator/private/step-vertical.js.map +1 -1
  238. package/dist/es/components/radio/check-props.js +13 -0
  239. package/dist/es/components/radio/check-props.js.map +1 -0
  240. package/dist/es/components/radio/component.js +24 -0
  241. package/dist/es/components/radio/component.js.map +1 -0
  242. package/dist/es/components/radio/index.js +94 -80
  243. package/dist/es/components/radio/index.js.map +1 -1
  244. package/dist/es/components/setup-assistant/check-props.js +12 -7
  245. package/dist/es/components/setup-assistant/check-props.js.map +1 -1
  246. package/dist/es/components/setup-assistant/step.js +7 -7
  247. package/dist/es/components/setup-assistant/step.js.map +1 -1
  248. package/dist/es/components/simple-data-table/check-props.js +1 -1
  249. package/dist/es/components/simple-data-table/check-props.js.map +1 -1
  250. package/dist/es/components/simple-data-table/index.js +17 -10
  251. package/dist/es/components/simple-data-table/index.js.map +1 -1
  252. package/dist/es/components/slider/check-props.js +17 -0
  253. package/dist/es/components/slider/check-props.js.map +1 -0
  254. package/dist/es/components/slider/component.js +35 -0
  255. package/dist/es/components/slider/component.js.map +1 -0
  256. package/dist/es/components/slider/index.js +73 -54
  257. package/dist/es/components/slider/index.js.map +1 -1
  258. package/dist/es/components/spinner/check-props.js +13 -0
  259. package/dist/es/components/spinner/check-props.js.map +1 -0
  260. package/dist/es/components/spinner/component.js +17 -0
  261. package/dist/es/components/spinner/component.js.map +1 -0
  262. package/dist/es/components/spinner/index.js +43 -29
  263. package/dist/es/components/spinner/index.js.map +1 -1
  264. package/dist/es/components/split-view/check-props.js +2 -2
  265. package/dist/es/components/split-view/check-props.js.map +1 -1
  266. package/dist/es/components/split-view/index.js +8 -5
  267. package/dist/es/components/split-view/index.js.map +1 -1
  268. package/dist/es/components/split-view/listbox-check-props.js +13 -0
  269. package/dist/es/components/split-view/listbox-check-props.js.map +1 -0
  270. package/dist/es/components/split-view/listbox.js +41 -35
  271. package/dist/es/components/split-view/listbox.js.map +1 -1
  272. package/dist/es/components/split-view/private/list-item-content.js +1 -1
  273. package/dist/es/components/split-view/private/list-item-content.js.map +1 -1
  274. package/dist/es/components/split-view/private/list-item-with-content.js +6 -1
  275. package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
  276. package/dist/es/components/split-view/private/toggle-button.js +2 -2
  277. package/dist/es/components/split-view/private/toggle-button.js.map +1 -1
  278. package/dist/es/components/tabs/panel.js.map +1 -1
  279. package/dist/es/components/textarea/check-props.js +11 -10
  280. package/dist/es/components/textarea/check-props.js.map +1 -1
  281. package/dist/es/components/textarea/index.js +59 -47
  282. package/dist/es/components/textarea/index.js.map +1 -1
  283. package/dist/es/components/tree/check-props.js +10 -9
  284. package/dist/es/components/tree/check-props.js.map +1 -1
  285. package/dist/es/components/tree/component.js +25 -0
  286. package/dist/es/components/tree/component.js.map +1 -0
  287. package/dist/es/components/tree/tree.js +83 -75
  288. package/dist/es/components/tree/tree.js.map +1 -1
  289. package/dist/es/components/trial-bar/check-props.js +13 -0
  290. package/dist/es/components/trial-bar/check-props.js.map +1 -0
  291. package/dist/es/components/trial-bar/component.js +24 -0
  292. package/dist/es/components/trial-bar/component.js.map +1 -0
  293. package/dist/es/components/trial-bar/index.js +27 -21
  294. package/dist/es/components/trial-bar/index.js.map +1 -1
  295. package/dist/es/components/utilities/menu-list/index.js +1 -0
  296. package/dist/es/components/utilities/menu-list/index.js.map +1 -1
  297. package/dist/es/components/utilities/menu-list/item.js +5 -3
  298. package/dist/es/components/utilities/menu-list/item.js.map +1 -1
  299. package/dist/es/components/utilities/utility-icon/index.js +2 -1
  300. package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
  301. package/dist/es/components/vertical-navigation/index.js +17 -16
  302. package/dist/es/components/vertical-navigation/index.js.map +1 -1
  303. package/dist/es/components/vertical-navigation/private/item.js +1 -1
  304. package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
  305. package/dist/es/components/welcome-mat/check-props.js +13 -0
  306. package/dist/es/components/welcome-mat/check-props.js.map +1 -0
  307. package/dist/es/components/welcome-mat/component.js +46 -0
  308. package/dist/es/components/welcome-mat/component.js.map +1 -0
  309. package/dist/es/components/welcome-mat/index.js +64 -57
  310. package/dist/es/components/welcome-mat/index.js.map +1 -1
  311. package/dist/es/components/welcome-mat/info-badge.js +19 -11
  312. package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
  313. package/dist/es/utilities/warning/deprecated-property-value.js +18 -0
  314. package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -0
  315. package/dist/types/components/accordion/panel.d.ts.map +1 -1
  316. package/dist/types/components/badge/index.d.ts +4 -2
  317. package/dist/types/components/badge/index.d.ts.map +1 -1
  318. package/dist/types/components/builder-header/check-props.d.ts +3 -0
  319. package/dist/types/components/builder-header/check-props.d.ts.map +1 -0
  320. package/dist/types/components/builder-header/toolbar.d.ts +6 -4
  321. package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
  322. package/dist/types/components/carousel/check-props.d.ts +3 -0
  323. package/dist/types/components/carousel/check-props.d.ts.map +1 -0
  324. package/dist/types/components/carousel/index.d.ts +9 -7
  325. package/dist/types/components/carousel/index.d.ts.map +1 -1
  326. package/dist/types/components/carousel/private/carousel-item.d.ts +4 -4
  327. package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
  328. package/dist/types/components/checkbox/check-props.d.ts +1 -0
  329. package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
  330. package/dist/types/components/checkbox/index.d.ts +9 -3
  331. package/dist/types/components/checkbox/index.d.ts.map +1 -1
  332. package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
  333. package/dist/types/components/combobox/check-props.d.ts.map +1 -1
  334. package/dist/types/components/combobox/combobox.d.ts +29 -15
  335. package/dist/types/components/combobox/combobox.d.ts.map +1 -1
  336. package/dist/types/components/combobox/index.d.ts +1 -1
  337. package/dist/types/components/combobox/index.d.ts.map +1 -1
  338. package/dist/types/components/combobox/private/menu.d.ts +11 -6
  339. package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
  340. package/dist/types/components/dynamic-icon/index.d.ts.map +1 -1
  341. package/dist/types/components/input/index.d.ts.map +1 -1
  342. package/dist/types/components/menu-dropdown/check-props.d.ts.map +1 -1
  343. package/dist/types/components/menu-dropdown/index.d.ts +1 -1
  344. package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
  345. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +22 -3
  346. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
  347. package/dist/types/components/modal/check-props.d.ts +3 -0
  348. package/dist/types/components/modal/check-props.d.ts.map +1 -0
  349. package/dist/types/components/modal/index.d.ts +21 -13
  350. package/dist/types/components/modal/index.d.ts.map +1 -1
  351. package/dist/types/components/page-header/check-props.d.ts.map +1 -1
  352. package/dist/types/components/page-header/index.d.ts +15 -4
  353. package/dist/types/components/page-header/index.d.ts.map +1 -1
  354. package/dist/types/components/page-header/private/base/index.d.ts.map +1 -1
  355. package/dist/types/components/page-header/private/controls.d.ts +4 -4
  356. package/dist/types/components/page-header/private/controls.d.ts.map +1 -1
  357. package/dist/types/components/page-header/private/object-home/index.d.ts.map +1 -1
  358. package/dist/types/components/page-header/private/record-home/index.d.ts.map +1 -1
  359. package/dist/types/components/page-header/private/types.d.ts +6 -6
  360. package/dist/types/components/page-header/private/types.d.ts.map +1 -1
  361. package/dist/types/components/popover/popover.d.ts +24 -14
  362. package/dist/types/components/popover/popover.d.ts.map +1 -1
  363. package/dist/types/components/progress-indicator/check-props.d.ts.map +1 -1
  364. package/dist/types/components/progress-indicator/index.d.ts +7 -1
  365. package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
  366. package/dist/types/components/progress-indicator/private/step-vertical.d.ts +4 -7
  367. package/dist/types/components/progress-indicator/private/step-vertical.d.ts.map +1 -1
  368. package/dist/types/components/radio/check-props.d.ts +1 -0
  369. package/dist/types/components/radio/check-props.d.ts.map +1 -1
  370. package/dist/types/components/radio/index.d.ts +10 -4
  371. package/dist/types/components/radio/index.d.ts.map +1 -1
  372. package/dist/types/components/setup-assistant/check-props.d.ts.map +1 -1
  373. package/dist/types/components/setup-assistant/step.d.ts +12 -6
  374. package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
  375. package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
  376. package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
  377. package/dist/types/components/simple-data-table/types.d.ts +21 -8
  378. package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
  379. package/dist/types/components/slider/check-props.d.ts +3 -0
  380. package/dist/types/components/slider/check-props.d.ts.map +1 -0
  381. package/dist/types/components/slider/index.d.ts +33 -10
  382. package/dist/types/components/slider/index.d.ts.map +1 -1
  383. package/dist/types/components/spinner/check-props.d.ts +3 -0
  384. package/dist/types/components/spinner/check-props.d.ts.map +1 -0
  385. package/dist/types/components/spinner/index.d.ts +18 -9
  386. package/dist/types/components/spinner/index.d.ts.map +1 -1
  387. package/dist/types/components/split-view/check-props.d.ts.map +1 -1
  388. package/dist/types/components/split-view/index.d.ts +9 -5
  389. package/dist/types/components/split-view/index.d.ts.map +1 -1
  390. package/dist/types/components/split-view/listbox-check-props.d.ts +3 -0
  391. package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -0
  392. package/dist/types/components/split-view/listbox.d.ts +19 -3
  393. package/dist/types/components/split-view/listbox.d.ts.map +1 -1
  394. package/dist/types/components/split-view/private/list-item-with-content.d.ts +10 -1
  395. package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
  396. package/dist/types/components/split-view/private/toggle-button.d.ts +3 -3
  397. package/dist/types/components/split-view/private/toggle-button.d.ts.map +1 -1
  398. package/dist/types/components/tabs/panel.d.ts +5 -1
  399. package/dist/types/components/tabs/panel.d.ts.map +1 -1
  400. package/dist/types/components/textarea/check-props.d.ts.map +1 -1
  401. package/dist/types/components/textarea/index.d.ts +23 -3
  402. package/dist/types/components/textarea/index.d.ts.map +1 -1
  403. package/dist/types/components/tree/check-props.d.ts.map +1 -1
  404. package/dist/types/components/tree/index.d.ts +1 -1
  405. package/dist/types/components/tree/index.d.ts.map +1 -1
  406. package/dist/types/components/tree/tree.d.ts +20 -8
  407. package/dist/types/components/tree/tree.d.ts.map +1 -1
  408. package/dist/types/components/tree/types.d.ts +7 -1
  409. package/dist/types/components/tree/types.d.ts.map +1 -1
  410. package/dist/types/components/trial-bar/check-props.d.ts +3 -0
  411. package/dist/types/components/trial-bar/check-props.d.ts.map +1 -0
  412. package/dist/types/components/trial-bar/index.d.ts +15 -7
  413. package/dist/types/components/trial-bar/index.d.ts.map +1 -1
  414. package/dist/types/components/utilities/menu-list/index.d.ts +5 -1
  415. package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
  416. package/dist/types/components/utilities/menu-list/item.d.ts +3 -1
  417. package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
  418. package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
  419. package/dist/types/components/vertical-navigation/index.d.ts +7 -7
  420. package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
  421. package/dist/types/components/welcome-mat/check-props.d.ts +3 -0
  422. package/dist/types/components/welcome-mat/check-props.d.ts.map +1 -0
  423. package/dist/types/components/welcome-mat/index.d.ts +13 -8
  424. package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
  425. package/dist/types/components/welcome-mat/info-badge.d.ts +7 -3
  426. package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
  427. package/package.json +5 -3
@@ -1,2 +1,2 @@
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;
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`,m.type=`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":"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,E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AAA,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 =\n\t'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 =\n\t'-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 =\n\t\t\ttitle || `${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\n\t\t\t\t\tkey=\"score-pos\"\n\t\t\t\t\tviewBox=\"0 0 5 5\"\n\t\t\t\t\tclassName=\"slds-icon-score__positive\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\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\n\t\t\t\t\tkey=\"score-neg\"\n\t\t\t\t\tviewBox=\"0 0 5 5\"\n\t\t\t\t\tclassName=\"slds-icon-score__negative\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\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\n\t\t\t\t\t\tclassName=\"slds-icon-trend__arrow\"\n\t\t\t\t\t\td=\"M.75 8H11M8 4.5L11.5 8 8 11.5\"\n\t\t\t\t\t/>\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\ticonProps.type = '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'] =\n\t\t\t\tstrengthLevel !== 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"],"mappings":"0TAgEA,IAAM,GAAe,CACpB,gBACA,YACA,WACA,WACA,gBACA,gBACA,QACA,iBACA,aAC2C,CA0G3C,IAAM,OAzGqC,CAC1C,IAAM,EAAwB,CAAC,EAC3B,EACH,GAAS,GAAG,EAAQ,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAQ,MAAM,CAAC,IAmG9D,OAjGI,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,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,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,OAuBzC,OArBI,IAAY,UACf,EAAQ,QAAQ,cAAe,4BAA4B,EAC3D,EAAU,SACV,EAAU,KAAO,WAEjB,EAAQ,QAAQ,aAAa,GAAS,EAElC,IAAY,KACf,EAAU,MACA,IAAY,QACtB,EAAU,mBAAqB,GAAiB,WACtC,IAAY,WACtB,EAAU,sBACT,IAAkB,IAAA,GAAiC,IAArB,GAAG,IACxB,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("../../utilities/generate-id.cjs"),r=require("../button/index.cjs"),i=require("../popover/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c={editFilter:`Edit filter:`,editFilterHeading:`Choose filter criteria`},l=({align:e=`left`,assistiveText:t,children:l,className:u,isError:d=!1,id:f,isLocked:p=!1,isNew:m=!1,isPermanent:h=!1,onChange:g,onRemove:_,onClick:v,popover:y,predicate:b=`New Filter`,property:x})=>{let S=(0,a.useMemo)(()=>n.default(),[]),C=f||S,[w,T]=(0,a.useState)(y?.props?.isOpen??!1),E=(0,a.useMemo)(()=>({...c,...t,removeFilter:t?.removeFilter||`Remove Filter: ${x} ${b}`}),[t,x,b]),D=(0,a.useCallback)(()=>{T(!0),v?.()},[v]),O=(0,a.useCallback)(()=>{T(!1)},[]),k=(0,a.useCallback)(e=>{T(!1),g?.(e,{id:C})},[g,C]),A=(0,a.useCallback)(e=>{_?.(e,{id:C})},[_,C]),j=(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h4`,{className:`slds-assistive-text`,id:`${C}-popover-heading`,children:E.editFilterHeading}),l,(0,s.jsx)(`div`,{className:`slds-m-top_small slds-text-align_right`,children:(0,s.jsx)(r.default,{className:`slds-col_bump-left`,label:`Done`,onClick:k})})]}),M={ariaLabelledby:`${C}-popover-heading`,align:e,body:j,heading:``,id:C,isOpen:w,offset:e===`right`?`0px -35px`:void 0,onClose:O,onRequestClose:O,position:`overflowBoundaryElement`,triggerClassName:`slds-grow`,...y?.props||{},children:void 0},N=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`slds-assistive-text`,children:E.editFilter}),x?(0,s.jsx)(`span`,{className:`slds-show slds-text-body_small`,children:x}):null,(0,s.jsx)(`span`,{className:`slds-show`,children:b})]});return(0,s.jsxs)(`div`,{className:(0,o.default)(`slds-filters__item`,`slds-grid`,`slds-grid_vertical-align-center`,{"slds-is-locked":p,"slds-is-new":m,"slds-has-error":d},u),children:[!p&&(l||y)?(0,s.jsx)(i.default,{...M,silenceDeprecatedPropertyWarning:!0,children:(0,s.jsx)(`button`,{className:`slds-button_reset slds-grow slds-has-blur-focus`,onClick:D,"aria-describedby":d?`${C}-error`:void 0,type:`button`,children:N})}):(0,s.jsxs)(`button`,{"aria-describedby":d?`${C}-error`:void 0,className:`slds-button_reset slds-grow slds-has-blur-focus`,disabled:!0,type:`button`,children:[(0,s.jsx)(`span`,{className:`slds-show slds-text-body_small`,children:x}),(0,s.jsx)(`span`,{className:`slds-show`,children:b})]}),!h&&!p&&(0,s.jsx)(r.default,{assistiveText:{icon:E.removeFilter},hint:!0,iconCategory:`utility`,iconName:`delete`,iconSize:`small`,iconVariant:`bare`,onClick:A,title:E.removeFilter,variant:`icon`})]})};l.displayName=t.FILTER,exports.default=l;
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../../utilities/generate-id.cjs"),r=require("../button/index.cjs"),i=require("../popover/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c={editFilter:`Edit filter:`,editFilterHeading:`Choose filter criteria`},l=({align:e=`left`,assistiveText:t,children:l,className:u,isError:d=!1,id:f,isLocked:p=!1,isNew:m=!1,isPermanent:h=!1,onChange:g,onRemove:_,onClick:v,popover:y,predicate:b=`New Filter`,property:x})=>{let S=(0,a.useMemo)(()=>n.default(),[]),C=f||S,[w,T]=(0,a.useState)(y?.props?.isOpen??!1),E=(0,a.useMemo)(()=>({...c,...t,removeFilter:t?.removeFilter||`Remove Filter: ${x} ${b}`}),[t,x,b]),D=(0,a.useCallback)(()=>{T(!0),v?.()},[v]),O=(0,a.useCallback)(()=>{T(!1)},[]),k=(0,a.useCallback)(e=>{T(!1),g?.(e,{id:C})},[g,C]),A=(0,a.useCallback)(e=>{_?.(e,{id:C})},[_,C]),j=(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h4`,{className:`slds-assistive-text`,id:`${C}-popover-heading`,children:E.editFilterHeading}),l,(0,s.jsx)(`div`,{className:`slds-m-top_small slds-text-align_right`,children:(0,s.jsx)(r.default,{className:`slds-col_bump-left`,label:`Done`,onClick:k})})]}),M={ariaLabelledby:`${C}-popover-heading`,align:e,body:j,heading:``,id:C,isOpen:w,offset:e===`right`?`0px -35px`:void 0,onClose:O,onRequestClose:O,position:`overflowBoundaryElement`,className:`slds-grow`,...y?.props||{},children:void 0},N=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`span`,{className:`slds-assistive-text`,children:E.editFilter}),x?(0,s.jsx)(`span`,{className:`slds-show slds-text-body_small`,children:x}):null,(0,s.jsx)(`span`,{className:`slds-show`,children:b})]});return(0,s.jsxs)(`div`,{className:(0,o.default)(`slds-filters__item`,`slds-grid`,`slds-grid_vertical-align-center`,{"slds-is-locked":p,"slds-is-new":m,"slds-has-error":d},u),children:[!p&&(l||y)?(0,s.jsx)(i.default,{...M,silenceDeprecatedPropertyWarning:!0,children:(0,s.jsx)(`button`,{className:`slds-button_reset slds-grow slds-has-blur-focus`,onClick:D,"aria-describedby":d?`${C}-error`:void 0,type:`button`,children:N})}):(0,s.jsxs)(`button`,{"aria-describedby":d?`${C}-error`:void 0,className:`slds-button_reset slds-grow slds-has-blur-focus`,disabled:!0,type:`button`,children:[(0,s.jsx)(`span`,{className:`slds-show slds-text-body_small`,children:x}),(0,s.jsx)(`span`,{className:`slds-show`,children:b})]}),!h&&!p&&(0,s.jsx)(r.default,{assistiveText:{icon:E.removeFilter},hint:!0,iconCategory:`utility`,iconName:`delete`,iconSize:`small`,iconVariant:`bare`,onClick:A,title:E.removeFilter,variant:`icon`})]})};l.displayName=t.FILTER,exports.default=l;
2
2
  //# sourceMappingURL=filter.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.cjs","names":[],"sources":["../../../../components/filter/filter.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, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Popover from '../popover';\n\nimport { FILTER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\n\nimport {\n\tFilterAssistiveText,\n\tFilterChangeHandler,\n\tFilterRemoveHandler,\n} from './types';\n\nexport interface FilterProps {\n\t/** Aligns the popover with the respective side of the trigger */\n\talign?: 'left' | 'right';\n\t/** Assistive text for accessibility */\n\tassistiveText?: FilterAssistiveText;\n\t/** Contents of popover - dropdowns and inputs that set filter criteria */\n\tchildren?: React.ReactNode;\n\t/** Custom CSS classes for slds-filters__item node */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Applies error state styling */\n\tisError?: boolean;\n\t/** Unique ID for keyboard navigation and ARIA support */\n\tid?: string;\n\t/** If true, the filter will not display an editing popover when clicked */\n\tisLocked?: boolean;\n\t/** Applies new filter styling */\n\tisNew?: boolean;\n\t/** If true, the filter will not include a remove button */\n\tisPermanent?: boolean;\n\t/** Callback when Done within the Popover is clicked */\n\tonChange?: FilterChangeHandler;\n\t/** Callback when \"Remove Filter\" button is clicked */\n\tonRemove?: FilterRemoveHandler;\n\t/** Callback when Filter is clicked */\n\tonClick?: () => void;\n\t/** Custom Popover component with overridable props */\n\tpopover?: React.ReactElement;\n\t/** The filter predicate (e.g., \"is PURPLE\") */\n\tpredicate?: React.ReactNode;\n\t/** The filter property (e.g., \"Hair Color\") */\n\tproperty?: React.ReactNode;\n}\n\nconst defaultAssistiveText: FilterAssistiveText = {\n\teditFilter: 'Edit filter:',\n\teditFilterHeading: 'Choose filter criteria',\n};\n\n/**\n * A Filter is a popover with custom trigger. It can be used by Panel Filtering.\n * Menus within a Filter Popover will need to not have \"portal mounts\" and be inline.\n */\nconst Filter: React.FC<FilterProps> = ({\n\talign = 'left',\n\tassistiveText: assistiveTextProp,\n\tchildren,\n\tclassName,\n\tisError = false,\n\tid: idProp,\n\tisLocked = false,\n\tisNew = false,\n\tisPermanent = false,\n\tonChange,\n\tonRemove,\n\tonClick,\n\tpopover,\n\tpredicate = 'New Filter',\n\tproperty,\n}) => {\n\t// Generate stable ID\n\tconst generatedId = useMemo(() => generateId(), []);\n\tconst id = idProp || generatedId;\n\n\t// Popover state - use popover's isOpen if provided\n\tconst [popoverIsOpen, setPopoverIsOpen] = useState(\n\t\t(popover?.props as { isOpen?: boolean } | undefined)?.isOpen ?? false\n\t);\n\n\t// Merge assistive text with defaults\n\tconst assistiveText = useMemo<FilterAssistiveText>(\n\t\t() => ({\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveTextProp,\n\t\t\tremoveFilter:\n\t\t\t\tassistiveTextProp?.removeFilter ||\n\t\t\t\t`Remove Filter: ${property} ${predicate}`,\n\t\t}),\n\t\t[assistiveTextProp, property, predicate]\n\t);\n\n\t// Handle filter click\n\tconst handleFilterClick = useCallback(() => {\n\t\tsetPopoverIsOpen(true);\n\t\tonClick?.();\n\t}, [onClick]);\n\n\t// Handle popover close\n\tconst handleClose = useCallback(() => {\n\t\tsetPopoverIsOpen(false);\n\t}, []);\n\n\t// Handle change (Done button clicked)\n\tconst handleChange = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetPopoverIsOpen(false);\n\t\t\tonChange?.(event, { id });\n\t\t},\n\t\t[onChange, id]\n\t);\n\n\t// Handle remove\n\tconst handleRemove = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonRemove?.(event, { id });\n\t\t},\n\t\t[onRemove, id]\n\t);\n\n\t// Build popover body\n\tconst popoverBody = (\n\t\t<div>\n\t\t\t<h4 className=\"slds-assistive-text\" id={`${id}-popover-heading`}>\n\t\t\t\t{assistiveText.editFilterHeading}\n\t\t\t</h4>\n\t\t\t{children}\n\t\t\t<div className=\"slds-m-top_small slds-text-align_right\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\tlabel=\"Done\"\n\t\t\t\t\tonClick={handleChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\t// Build popover props\n\tconst popoverProps = {\n\t\tariaLabelledby: `${id}-popover-heading`,\n\t\talign,\n\t\tbody: popoverBody,\n\t\theading: '',\n\t\tid,\n\t\tisOpen: popoverIsOpen,\n\t\toffset: align === 'right' ? '0px -35px' : undefined,\n\t\tonClose: handleClose,\n\t\tonRequestClose: handleClose,\n\t\tposition: 'overflowBoundaryElement' as const,\n\t\ttriggerClassName: 'slds-grow',\n\t\t// Merge with custom popover props if provided\n\t\t...(popover?.props || {}),\n\t\t// Remove children from merged props\n\t\tchildren: undefined,\n\t};\n\n\t// Trigger button content\n\tconst triggerContent = (\n\t\t<>\n\t\t\t<span className=\"slds-assistive-text\">{assistiveText.editFilter}</span>\n\t\t\t{property ? (\n\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t) : null}\n\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-filters__item',\n\t\t\t\t'slds-grid',\n\t\t\t\t'slds-grid_vertical-align-center',\n\t\t\t\t{\n\t\t\t\t\t'slds-is-locked': isLocked,\n\t\t\t\t\t'slds-is-new': isNew,\n\t\t\t\t\t'slds-has-error': isError,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t{!isLocked && (children || popover) ? (\n\t\t\t\t// @ts-expect-error - Popover props are complex with overrides\n\t\t\t\t<Popover {...popoverProps} silenceDeprecatedPropertyWarning>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\t\tonClick={handleFilterClick}\n\t\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{triggerContent}\n\t\t\t\t\t</button>\n\t\t\t\t</Popover>\n\t\t\t) : (\n\t\t\t\t<button\n\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\tdisabled\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t\t\t</button>\n\t\t\t)}\n\t\t\t{!isPermanent && !isLocked && (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{ icon: assistiveText.removeFilter }}\n\t\t\t\t\thint\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName=\"delete\"\n\t\t\t\t\ticonSize=\"small\"\n\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\tonClick={handleRemove}\n\t\t\t\t\ttitle={assistiveText.removeFilter}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nFilter.displayName = FILTER;\n\nexport default Filter;\n\n"],"mappings":"2UAmDA,IAAM,EAA4C,CACjD,WAAY,eACZ,kBAAmB,wBACpB,EAMM,GAAiC,CACtC,QAAQ,OACR,cAAe,EACf,WACA,YACA,UAAU,GACV,GAAI,EACJ,WAAW,GACX,QAAQ,GACR,cAAc,GACd,WACA,WACA,UACA,UACA,YAAY,aACZ,cACK,CAEL,IAAM,GAAA,EAAc,EAAA,QAAA,KAAc,EAAA,QAAW,EAAG,CAAC,CAAC,EAC5C,EAAK,GAAU,EAGf,CAAC,EAAe,IAAA,EAAoB,EAAA,SAAA,CACxC,GAAS,OAA4C,QAAU,EACjE,EAGM,GAAA,EAAgB,EAAA,QAAA,MACd,CACN,GAAG,EACH,GAAG,EACH,aACC,GAAmB,cACnB,kBAAkB,EAAS,GAAG,GAChC,GACA,CAAC,EAAmB,EAAU,CAAS,CACxC,EAGM,GAAA,EAAoB,EAAA,YAAA,KAAkB,CAC3C,EAAiB,EAAI,EACrB,IAAU,CACX,EAAG,CAAC,CAAO,CAAC,EAGN,GAAA,EAAc,EAAA,YAAA,KAAkB,CACrC,EAAiB,EAAK,CACvB,EAAG,CAAC,CAAC,EAGC,GAAA,EAAe,EAAA,YAAA,CACnB,GAA+C,CAC/C,EAAiB,EAAK,EACtB,IAAW,EAAO,CAAE,IAAG,CAAC,CACzB,EACA,CAAC,EAAU,CAAE,CACd,EAGM,GAAA,EAAe,EAAA,YAAA,CACnB,GAA+C,CAC/C,IAAW,EAAO,CAAE,IAAG,CAAC,CACzB,EACA,CAAC,EAAU,CAAE,CACd,EAGM,GACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAA,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,sBAAsB,GAAI,GAAG,EAAG,kBAC5C,SAAA,EAA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DACV,SAAA,GACA,KAAK,SAJN,SAAA,EAMC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,iCAAkC,SAAA,CAAe,CAAA,GACjE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,YAAa,SAAA,CAAgB,CAAA,CACtC,CAER,CAAA,EAAA,CAAC,GAAe,CAAC,IACjB,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,KAAM,EAAc,YAAa,EAClD,KAAA,GACA,aAAa,UACb,SAAS,SACT,SAAS,QACT,YAAY,OACZ,QAAS,EACT,MAAO,EAAc,aACrB,QAAQ,MACR,CAAA,CAEE,GAEP,EAEA,EAAO,YAAc,EAAA"}
1
+ {"version":3,"file":"filter.cjs","names":[],"sources":["../../../../components/filter/filter.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, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Popover from '../popover';\n\nimport { FILTER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\n\nimport {\n\tFilterAssistiveText,\n\tFilterChangeHandler,\n\tFilterRemoveHandler,\n} from './types';\n\nexport interface FilterProps {\n\t/** Aligns the popover with the respective side of the trigger */\n\talign?: 'left' | 'right';\n\t/** Assistive text for accessibility */\n\tassistiveText?: FilterAssistiveText;\n\t/** Contents of popover - dropdowns and inputs that set filter criteria */\n\tchildren?: React.ReactNode;\n\t/** Custom CSS classes for slds-filters__item node */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Applies error state styling */\n\tisError?: boolean;\n\t/** Unique ID for keyboard navigation and ARIA support */\n\tid?: string;\n\t/** If true, the filter will not display an editing popover when clicked */\n\tisLocked?: boolean;\n\t/** Applies new filter styling */\n\tisNew?: boolean;\n\t/** If true, the filter will not include a remove button */\n\tisPermanent?: boolean;\n\t/** Callback when Done within the Popover is clicked */\n\tonChange?: FilterChangeHandler;\n\t/** Callback when \"Remove Filter\" button is clicked */\n\tonRemove?: FilterRemoveHandler;\n\t/** Callback when Filter is clicked */\n\tonClick?: () => void;\n\t/** Custom Popover component with overridable props */\n\tpopover?: React.ReactElement;\n\t/** The filter predicate (e.g., \"is PURPLE\") */\n\tpredicate?: React.ReactNode;\n\t/** The filter property (e.g., \"Hair Color\") */\n\tproperty?: React.ReactNode;\n}\n\nconst defaultAssistiveText: FilterAssistiveText = {\n\teditFilter: 'Edit filter:',\n\teditFilterHeading: 'Choose filter criteria',\n};\n\n/**\n * A Filter is a popover with custom trigger. It can be used by Panel Filtering.\n * Menus within a Filter Popover will need to not have \"portal mounts\" and be inline.\n */\nconst Filter: React.FC<FilterProps> = ({\n\talign = 'left',\n\tassistiveText: assistiveTextProp,\n\tchildren,\n\tclassName,\n\tisError = false,\n\tid: idProp,\n\tisLocked = false,\n\tisNew = false,\n\tisPermanent = false,\n\tonChange,\n\tonRemove,\n\tonClick,\n\tpopover,\n\tpredicate = 'New Filter',\n\tproperty,\n}) => {\n\t// Generate stable ID\n\tconst generatedId = useMemo(() => generateId(), []);\n\tconst id = idProp || generatedId;\n\n\t// Popover state - use popover's isOpen if provided\n\tconst [popoverIsOpen, setPopoverIsOpen] = useState(\n\t\t(popover?.props as { isOpen?: boolean } | undefined)?.isOpen ?? false\n\t);\n\n\t// Merge assistive text with defaults\n\tconst assistiveText = useMemo<FilterAssistiveText>(\n\t\t() => ({\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveTextProp,\n\t\t\tremoveFilter:\n\t\t\t\tassistiveTextProp?.removeFilter ||\n\t\t\t\t`Remove Filter: ${property} ${predicate}`,\n\t\t}),\n\t\t[assistiveTextProp, property, predicate]\n\t);\n\n\t// Handle filter click\n\tconst handleFilterClick = useCallback(() => {\n\t\tsetPopoverIsOpen(true);\n\t\tonClick?.();\n\t}, [onClick]);\n\n\t// Handle popover close\n\tconst handleClose = useCallback(() => {\n\t\tsetPopoverIsOpen(false);\n\t}, []);\n\n\t// Handle change (Done button clicked)\n\tconst handleChange = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetPopoverIsOpen(false);\n\t\t\tonChange?.(event, { id });\n\t\t},\n\t\t[onChange, id]\n\t);\n\n\t// Handle remove\n\tconst handleRemove = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonRemove?.(event, { id });\n\t\t},\n\t\t[onRemove, id]\n\t);\n\n\t// Build popover body\n\tconst popoverBody = (\n\t\t<div>\n\t\t\t<h4 className=\"slds-assistive-text\" id={`${id}-popover-heading`}>\n\t\t\t\t{assistiveText.editFilterHeading}\n\t\t\t</h4>\n\t\t\t{children}\n\t\t\t<div className=\"slds-m-top_small slds-text-align_right\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\tlabel=\"Done\"\n\t\t\t\t\tonClick={handleChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\t// Build popover props\n\tconst popoverProps = {\n\t\tariaLabelledby: `${id}-popover-heading`,\n\t\talign,\n\t\tbody: popoverBody,\n\t\theading: '',\n\t\tid,\n\t\tisOpen: popoverIsOpen,\n\t\toffset: align === 'right' ? '0px -35px' : undefined,\n\t\tonClose: handleClose,\n\t\tonRequestClose: handleClose,\n\t\tposition: 'overflowBoundaryElement' as const,\n\t\tclassName: 'slds-grow',\n\t\t// Merge with custom popover props if provided\n\t\t...(popover?.props || {}),\n\t\t// Remove children from merged props\n\t\tchildren: undefined,\n\t};\n\n\t// Trigger button content\n\tconst triggerContent = (\n\t\t<>\n\t\t\t<span className=\"slds-assistive-text\">{assistiveText.editFilter}</span>\n\t\t\t{property ? (\n\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t) : null}\n\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-filters__item',\n\t\t\t\t'slds-grid',\n\t\t\t\t'slds-grid_vertical-align-center',\n\t\t\t\t{\n\t\t\t\t\t'slds-is-locked': isLocked,\n\t\t\t\t\t'slds-is-new': isNew,\n\t\t\t\t\t'slds-has-error': isError,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t{!isLocked && (children || popover) ? (\n\t\t\t\t// @ts-expect-error - Popover props are complex with overrides\n\t\t\t\t<Popover {...popoverProps} silenceDeprecatedPropertyWarning>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\t\tonClick={handleFilterClick}\n\t\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{triggerContent}\n\t\t\t\t\t</button>\n\t\t\t\t</Popover>\n\t\t\t) : (\n\t\t\t\t<button\n\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\tdisabled\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t\t\t</button>\n\t\t\t)}\n\t\t\t{!isPermanent && !isLocked && (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{ icon: assistiveText.removeFilter }}\n\t\t\t\t\thint\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName=\"delete\"\n\t\t\t\t\ticonSize=\"small\"\n\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\tonClick={handleRemove}\n\t\t\t\t\ttitle={assistiveText.removeFilter}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\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Ae,CAAA,GACjE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,YAAa,SAAA,CAAgB,CAAA,CACtC,CAER,CAAA,EAAA,CAAC,GAAe,CAAC,IACjB,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,KAAM,EAAc,YAAa,EAClD,KAAA,GACA,aAAa,UACb,SAAS,SACT,SAAS,QACT,YAAY,OACZ,QAAS,EACT,MAAO,EAAc,aACrB,QAAQ,MACR,CAAA,CAEE,GAEP,EAEA,EAAO,YAAc,EAAA"}
@@ -1,2 +1,2 @@
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"),r=require("./private/inner-input.cjs"),i=require("../utilities/label/index.cjs"),a=require("../tooltip/private/field-level-help-tooltip.cjs"),ee=require("./check-props.cjs"),te=require("./component.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");var l=`counter`,u=`Decrement`,d=`Increment`,ne={decrement:`${u} ${l}`,increment:`${d} ${l}`},f=(0,o.forwardRef)(({"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-describedby":ie,"aria-expanded":ae,"aria-haspopup":p,"aria-labelledby":m,"aria-owns":h,"aria-required":g,assistiveText:oe,autoComplete:se,children:ce,className:le,defaultValue:ue,disabled:_=!1,errorText:v,fieldLevelHelpTooltip:y,fixedTextLeft:de,fixedTextRight:fe,hasSpinner:pe=!1,iconLeft:b,iconRight:x,id:me,inlineHelpText:S,inlineEditTrigger:he,inputRef:C,isStatic:w=!1,label:T,maxLength:E,maxValue:D,minLength:O,minValue:k,name:A,onBlur:j,onChange:M,onClick:N,onFocus:P,onInput:F,onInvalid:I,onKeyDown:L,onKeyPress:R,onKeyUp:ge,onSelect:_e,onSubmit:ve,placeholder:ye,readOnly:z=!1,required:B=!1,role:be,step:V,tabIndex:xe,styleContainer:Se,styleInput:Ce,type:we=`text`,value:H,variant:U=`base`},Te)=>{let Ee=(0,o.useId)(),De=(0,o.useId)(),Oe=(0,o.useId)(),W=me||Ee,ke=v?De:void 0,Ae=S?Oe:void 0,je=[ie,Ae,ke].filter(e=>!!e).join(` `)||void 0,G=(0,o.useRef)(null),K=(0,o.useRef)({currentDelay:500,initialDelay:500,speedDelay:75,timeout:null}),q=(0,o.useRef)(null),J={...ne,...oe};ee.default(t.INPUT,{"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-describedby":ie,"aria-expanded":ae,"aria-haspopup":p,"aria-labelledby":m,"aria-owns":h,"aria-required":g,assistiveText:J,autoComplete:se,children:ce,className:le,defaultValue:ue,disabled:_,errorText:v,fieldLevelHelpTooltip:y,fixedTextLeft:de,fixedTextRight:fe,hasSpinner:pe,iconLeft:b,iconRight:x,id:W,inlineHelpText:S,inlineEditTrigger:he,inputRef:C,isStatic:w,label:T,maxLength:E,maxValue:D,minLength:O,minValue:k,name:A,onBlur:j,onChange:M,onClick:N,onFocus:P,onInput:F,onInvalid:I,onKeyDown:L,onKeyPress:R,onKeyUp:ge,onSelect:_e,onSubmit:ve,placeholder:ye,readOnly:z,required:B,role:be,step:V,tabIndex:xe,styleContainer:Se,styleInput:Ce,type:we,value:H,variant:U},te.default);let Y=(0,o.useCallback)(()=>H===void 0?G.current?Number(G.current.value):0:Number(H),[H]),X=(0,o.useCallback)(()=>{K.current.timeout&&clearTimeout(K.current.timeout),K.current.currentDelay=K.current.initialDelay,q.current=null},[]),Z=(0,o.useCallback)((e,t)=>{K.current.timeout&&clearTimeout(K.current.timeout),t&&(q.current=t);let n=t??q.current??void 0,r=V===void 0?1:Number(V),i=Y(),a=!1;if(e===u&&D!==void 0&&i>D)i=Number(D),a=!0;else if(e===d&&k!==void 0&&i<k)i=Number(k),a=!0;else{let t=String(r).search(/\./)>=0?String(r).split(`.`)[1].length:0,n=0;k!==void 0&&(n=(i-k)%r),i=n>0?e===u?i-n:i+(r-n):e===u?i-r:i+r,i=Number(i.toFixed(t)),!(D!==void 0&&i>D)&&!(k!==void 0&&i<k)&&(a=!0)}a&&(H===void 0&&G.current&&(G.current.value=String(i)),M&&n&&M(n,{number:i,value:String(i)})),e===d&&D!==void 0&&i>=D||e===u&&k!==void 0&&i<=k?X():K.current.timeout=setTimeout(()=>{K.current.currentDelay=K.current.speedDelay,Z(e)},K.current.currentDelay)},[Y,D,k,M,V,X,H]),Me=(0,o.useCallback)(e=>{G.current=e,C&&C(e)},[C]),Ne=(0,o.useCallback)(e=>{if(M){let t={value:e.target.value};U===l&&(t.number=Number(t.value)),M(e,t)}},[M,U]),Pe=e=>{let t=Y(),r=!1;return(_||e===d&&D!==void 0&&t>=D||e===u&&k!==void 0&&t<=k)&&(r=!0),(0,c.jsx)(n.default,{assistiveText:{icon:J[e.toLowerCase()]},className:(0,s.default)(`slds-button_icon-small`,`slds-input__button_${e.toLowerCase()}`),disabled:r,iconCategory:`utility`,iconName:e===u?`ban`:`new`,onKeyDown:t=>{t.keyCode===13&&Z(e,t)},onKeyUp:X,onMouseDown:t=>{Z(e,t)},onMouseLeave:X,onMouseUp:X,variant:`icon`})},Q=null,$=null;b?Q=o.default.isValidElement(b)?o.default.cloneElement(b,{iconPosition:`left`}):b:U===l&&!w&&!z&&(Q=Pe(u)),x?$=o.default.isValidElement(x)?o.default.cloneElement(x,{iconPosition:`right`}):x:U===l&&!w&&!z&&($=Pe(d));let Fe=T||J?.label,Ie=U===l?Me:C;return(0,c.jsxs)(`div`,{className:(0,s.default)(`slds-form-element`,{"slds-has-error":v},le),style:Se,ref:Te,children:[(0,c.jsx)(i.default,{assistiveText:J,htmlFor:w?void 0:W,label:T,required:B,variant:w?`static`:`base`}),y&&Fe?(0,c.jsx)(a.default,{assistiveText:{triggerLearnMoreIcon:J.fieldLevelHelpButton},fieldLevelHelpTooltip:y}):null,(0,c.jsx)(r.default,{"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-labelledby":m,"aria-describedby":je,"aria-expanded":ae,"aria-haspopup":p,"aria-owns":h,"aria-required":g,autoComplete:se,className:(0,s.default)({"slds-input_counter":U===l,"slds-p-horizontal_none":U===l&&z}),containerProps:{className:`slds-form-element__control`},defaultValue:ue,disabled:_,fixedTextLeft:de,fixedTextRight:fe,hasSpinner:pe,id:W,iconLeft:Q,iconRight:$,inlineEditTrigger:he,isStatic:w,minLength:O,minValue:k,maxLength:E,maxValue:D,name:A,onBlur:j,onChange:Ne,onClick:N,onFocus:P,onInput:F,onInvalid:I,onKeyDown:L,onKeyPress:R,onKeyUp:ge,onSelect:_e,onSubmit:ve,placeholder:ye,inputRef:Ie,readOnly:z,required:B,role:be,assistiveText:J,type:U===l?`number`:we,value:H,variant:U,step:V,tabIndex:xe,style:Ce}),S&&(0,c.jsx)(`div`,{id:Ae,className:`slds-form-element__help`,children:S}),v&&(0,c.jsx)(`div`,{id:ke,className:`slds-form-element__help`,children:v}),ce]})});f.displayName=t.INPUT,exports.default=f;
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"),r=require("./private/inner-input.cjs"),i=require("../utilities/label/index.cjs"),a=require("../tooltip/private/field-level-help-tooltip.cjs"),ee=require("./check-props.cjs"),te=require("./component.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");var l=`counter`,u=`Decrement`,d=`Increment`,ne={decrement:`${u} ${l}`,increment:`${d} ${l}`},f=(0,o.forwardRef)(({"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-describedby":ie,"aria-expanded":ae,"aria-haspopup":oe,"aria-labelledby":se,"aria-owns":p,"aria-required":ce,assistiveText:le,autoComplete:ue,children:de,className:fe,defaultValue:pe,disabled:m=!1,errorText:h,fieldLevelHelpTooltip:g,fixedTextLeft:me,fixedTextRight:he,hasSpinner:ge=!1,iconLeft:_,iconRight:v,id:_e,inlineHelpText:y,inlineEditTrigger:ve,inputRef:b,isStatic:x=!1,label:S,maxLength:C,maxValue:w,minLength:T,minValue:E,name:D,onBlur:O,onChange:k,onClick:A,onFocus:j,onInput:M,onInvalid:N,onKeyDown:P,onKeyPress:F,onKeyUp:I,onSelect:L,onSubmit:ye,placeholder:R,readOnly:z=!1,required:B=!1,role:be,step:V,tabIndex:xe,styleContainer:Se,styleInput:Ce,type:we=`text`,value:H,variant:U=`base`},Te)=>{let Ee=(0,o.useId)(),De=(0,o.useId)(),Oe=(0,o.useId)(),W=_e||Ee,ke=h?De:void 0,Ae=y?Oe:void 0,je=[ie,Ae,ke].filter(e=>!!e).join(` `)||void 0,G=(0,o.useRef)(null),K=(0,o.useRef)({currentDelay:500,initialDelay:500,speedDelay:75,timeout:null}),q=(0,o.useRef)(null),Me=(0,o.useRef)(()=>{}),[,Ne]=(0,o.useReducer)(e=>e+1,0),J={...ne,...le};ee.default(t.INPUT,{"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-describedby":ie,"aria-expanded":ae,"aria-haspopup":oe,"aria-labelledby":se,"aria-owns":p,"aria-required":ce,assistiveText:J,autoComplete:ue,children:de,className:fe,defaultValue:pe,disabled:m,errorText:h,fieldLevelHelpTooltip:g,fixedTextLeft:me,fixedTextRight:he,hasSpinner:ge,iconLeft:_,iconRight:v,id:W,inlineHelpText:y,inlineEditTrigger:ve,inputRef:b,isStatic:x,label:S,maxLength:C,maxValue:w,minLength:T,minValue:E,name:D,onBlur:O,onChange:k,onClick:A,onFocus:j,onInput:M,onInvalid:N,onKeyDown:P,onKeyPress:F,onKeyUp:I,onSelect:L,onSubmit:ye,placeholder:R,readOnly:z,required:B,role:be,step:V,tabIndex:xe,styleContainer:Se,styleInput:Ce,type:we,value:H,variant:U},te.default);let Y=(0,o.useCallback)(()=>H===void 0?G.current?Number(G.current.value):0:Number(H),[H]),X=(0,o.useCallback)(()=>{K.current.timeout&&clearTimeout(K.current.timeout),K.current.currentDelay=K.current.initialDelay,q.current=null},[]),Z=(0,o.useCallback)((e,t)=>{K.current.timeout&&clearTimeout(K.current.timeout),t&&(q.current=t);let n=t??q.current??void 0,r=V===void 0?1:Number(V),i=Y(),a=!1;if(e===u&&w!==void 0&&i>w)i=Number(w),a=!0;else if(e===d&&E!==void 0&&i<E)i=Number(E),a=!0;else{let t=String(r).search(/\./)>=0?String(r).split(`.`)[1].length:0,n=0;E!==void 0&&(n=(i-E)%r),i=n>0?e===u?i-n:i+(r-n):e===u?i-r:i+r,i=Number(i.toFixed(t)),!(w!==void 0&&i>w)&&!(E!==void 0&&i<E)&&(a=!0)}a&&(H===void 0&&G.current&&(G.current.value=String(i),Ne()),k&&n&&k(n,{number:i,value:String(i)})),e===d&&w!==void 0&&i>=w||e===u&&E!==void 0&&i<=E?X():K.current.timeout=setTimeout(()=>{K.current.currentDelay=K.current.speedDelay,Me.current(e)},K.current.currentDelay)},[Y,w,E,k,V,X,H]);Me.current=Z;let Pe=(0,o.useCallback)(e=>{G.current=e,b&&b(e)},[b]),Fe=(0,o.useCallback)(e=>{if(k){let t={value:e.target.value};U===l&&(t.number=Number(t.value)),k(e,t)}},[k,U]),Ie=e=>{let t=Y(),r=!1;return(m||e===d&&w!==void 0&&t>=w||e===u&&E!==void 0&&t<=E)&&(r=!0),(0,c.jsx)(n.default,{assistiveText:{icon:J[e.toLowerCase()]},className:(0,s.default)(`slds-button_icon-small`,`slds-input__button_${e.toLowerCase()}`),disabled:r,iconCategory:`utility`,iconName:e===u?`ban`:`new`,onKeyDown:t=>{t.keyCode===13&&Z(e,t)},onKeyUp:X,onMouseDown:t=>{Z(e,t)},onMouseLeave:X,onMouseUp:X,variant:`icon`})},Q=null,$=null;_?Q=o.default.isValidElement(_)?o.default.cloneElement(_,{iconPosition:`left`}):_:U===l&&!x&&!z&&(Q=Ie(u)),v?$=o.default.isValidElement(v)?o.default.cloneElement(v,{iconPosition:`right`}):v:U===l&&!x&&!z&&($=Ie(d));let Le=S||J?.label,Re=U===l?Pe:b;return(0,c.jsxs)(`div`,{className:(0,s.default)(`slds-form-element`,{"slds-has-error":h},fe),style:Se,ref:Te,children:[(0,c.jsx)(i.default,{assistiveText:J,htmlFor:x?void 0:W,label:S,required:B,variant:x?`static`:`base`}),g&&Le?(0,c.jsx)(a.default,{assistiveText:{triggerLearnMoreIcon:J.fieldLevelHelpButton},fieldLevelHelpTooltip:g}):null,(0,c.jsx)(r.default,{"aria-activedescendant":e,"aria-autocomplete":f,"aria-controls":re,"aria-labelledby":se,"aria-describedby":je,"aria-expanded":ae,"aria-haspopup":oe,"aria-owns":p,"aria-required":ce,autoComplete:ue,className:(0,s.default)({"slds-input_counter":U===l,"slds-p-horizontal_none":U===l&&z}),containerProps:{className:`slds-form-element__control`},defaultValue:pe,disabled:m,fixedTextLeft:me,fixedTextRight:he,hasSpinner:ge,id:W,iconLeft:Q,iconRight:$,inlineEditTrigger:ve,isStatic:x,minLength:T,minValue:E,maxLength:C,maxValue:w,name:D,onBlur:O,onChange:Fe,onClick:A,onFocus:j,onInput:M,onInvalid:N,onKeyDown:P,onKeyPress:F,onKeyUp:I,onSelect:L,onSubmit:ye,placeholder:R,inputRef:Re,readOnly:z,required:B,role:be,assistiveText:J,type:U===l?`number`:we,value:H,variant:U,step:V,tabIndex:xe,style:Ce}),y&&(0,c.jsx)(`div`,{id:Ae,className:`slds-form-element__help`,children:y}),h&&(0,c.jsx)(`div`,{id:ke,className:`slds-form-element__help`,children:h}),de]})});f.displayName=t.INPUT,exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/input/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, {\n\tuseId,\n\tuseRef,\n\tuseCallback,\n\tforwardRef,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype MouseEvent,\n\ttype FormEvent,\n\ttype CSSProperties,\n\ttype AriaAttributes,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport InnerInput from './private/inner-input';\nimport Label from '../utilities/label/index';\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport type { TooltipProps } from '../tooltip/index';\n\nimport checkProps from './check-props';\nimport { INPUT } from '../../utilities/constants';\nimport componentDoc from './component.json';\n\nconst COUNTER = 'counter';\nconst DECREMENT = 'Decrement';\nconst INCREMENT = 'Increment';\n\n/**\n * Input type options\n */\nexport type InputType =\n\t| 'text'\n\t| 'password'\n\t| 'datetime'\n\t| 'datetime-local'\n\t| 'date'\n\t| 'month'\n\t| 'time'\n\t| 'week'\n\t| 'number'\n\t| 'email'\n\t| 'url'\n\t| 'search'\n\t| 'tel'\n\t| 'color';\n\n/**\n * Input variant options\n */\nexport type InputVariant = 'base' | 'counter';\n\n/**\n * Assistive text for Input accessibility\n */\nexport interface InputAssistiveText {\n\t/** Visually hidden label for screen readers */\n\tlabel?: string;\n\t/** Text for loading spinner icon */\n\tspinner?: string;\n\t/** Text for decrement button in counter variant */\n\tdecrement?: string;\n\t/** Text for increment button in counter variant */\n\tincrement?: string;\n\t/** Text for field level help button */\n\tfieldLevelHelpButton?: string;\n}\n\n/**\n * Data passed to onChange callback\n */\nexport interface InputChangeData {\n\t/** The input value as string */\n\tvalue: string;\n\t/** The input value as number (only for counter variant) */\n\tnumber?: number;\n}\n\n/**\n * Props for the Input component\n */\nexport interface InputProps {\n\t/** ID of the currently active child in a composite widget */\n\t'aria-activedescendant'?: string;\n\t/** Indicates if suggestions complete the textbox input */\n\t'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';\n\t/** ID of element controlled by this input */\n\t'aria-controls'?: string;\n\t/** ID of element(s) that describe this input */\n\t'aria-describedby'?: string;\n\t/** Whether a collapsible region is expanded */\n\t'aria-expanded'?: boolean;\n\t/** Indicates the input has a popup */\n\t'aria-haspopup'?: AriaAttributes['aria-haspopup'];\n\t/** ID of element(s) that label this input */\n\t'aria-labelledby'?: string;\n\t/** ID of element(s) owned by this input */\n\t'aria-owns'?: string;\n\t/** Whether input is required */\n\t'aria-required'?: boolean;\n\t/** Assistive text for accessibility */\n\tassistiveText?: InputAssistiveText;\n\t/** Browser autocomplete attribute */\n\tautoComplete?: string;\n\t/** Elements added after the input */\n\tchildren?: ReactNode;\n\t/** CSS classes for the outer container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Initial value for uncontrolled usage */\n\tdefaultValue?: string | number;\n\t/** Disables the input */\n\tdisabled?: boolean;\n\t/** Error message (highlights input as error) */\n\terrorText?: ReactNode;\n\t/** Tooltip component for field-level help */\n\tfieldLevelHelpTooltip?: ReactElement<TooltipProps> | null;\n\t/** Fixed text/node on the left */\n\tfixedTextLeft?: ReactNode;\n\t/** Fixed text/node on the right */\n\tfixedTextRight?: ReactNode;\n\t/** Shows loading spinner inside input */\n\thasSpinner?: boolean;\n\t/** Left-aligned icon (InputIcon instance) */\n\ticonLeft?: ReactNode;\n\t/** Right-aligned icon (InputIcon instance) */\n\ticonRight?: ReactNode;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** Help text below the input */\n\tinlineHelpText?: ReactNode;\n\t/** Inline edit trigger element */\n\tinlineEditTrigger?: ReactNode;\n\t/** Ref callback for the input element */\n\tinputRef?: (element: HTMLInputElement | null) => void;\n\t/** Displays value statically (static input pattern) */\n\tisStatic?: boolean;\n\t/** Label text above input */\n\tlabel?: string;\n\t/** Maximum character length */\n\tmaxLength?: string | number;\n\t/** Maximum value for counter variant */\n\tmaxValue?: number;\n\t/** Minimum character length */\n\tminLength?: string | number;\n\t/** Minimum value for counter variant */\n\tminValue?: number;\n\t/** Form parameter name */\n\tname?: string;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Change event handler */\n\tonChange?: (event: ChangeEvent<HTMLInputElement> | MouseEvent | KeyboardEvent, data: InputChangeData) => void;\n\t/** Click event handler */\n\tonClick?: (event: MouseEvent<HTMLInputElement>) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Input event handler */\n\tonInput?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Invalid event handler */\n\tonInvalid?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Select event handler */\n\tonSelect?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Submit event handler */\n\tonSubmit?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Placeholder text */\n\tplaceholder?: string;\n\t/** Makes input read-only */\n\treadOnly?: boolean;\n\t/** Highlights as required field */\n\trequired?: boolean;\n\t/** ARIA role */\n\trole?: string;\n\t/** Step size for counter variant */\n\tstep?: number;\n\t/** Tab index */\n\ttabIndex?: string | number;\n\t/** Custom styles for container */\n\tstyleContainer?: CSSProperties;\n\t/** Custom styles for input element */\n\tstyleInput?: CSSProperties;\n\t/** Input type */\n\ttype?: InputType;\n\t/** Controlled value */\n\tvalue?: string | number;\n\t/** Input variant */\n\tvariant?: InputVariant;\n}\n\nconst defaultAssistiveText: InputAssistiveText = {\n\tdecrement: `${DECREMENT} ${COUNTER}`,\n\tincrement: `${INCREMENT} ${COUNTER}`,\n};\n\n/**\n * The HTML `input` with a label and error messaging.\n *\n * @see https://lightningdesignsystem.com/components/input/\n */\nconst Input = forwardRef<HTMLDivElement, InputProps>(\n\t(\n\t\t{\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t'aria-controls': ariaControls,\n\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t'aria-owns': ariaOwns,\n\t\t\t'aria-required': ariaRequired,\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tautoComplete,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled = false,\n\t\t\terrorText,\n\t\t\tfieldLevelHelpTooltip,\n\t\t\tfixedTextLeft,\n\t\t\tfixedTextRight,\n\t\t\thasSpinner = false,\n\t\t\ticonLeft: propIconLeft,\n\t\t\ticonRight: propIconRight,\n\t\t\tid: propId,\n\t\t\tinlineHelpText,\n\t\t\tinlineEditTrigger,\n\t\t\tinputRef: propInputRef,\n\t\t\tisStatic = false,\n\t\t\tlabel,\n\t\t\tmaxLength,\n\t\t\tmaxValue,\n\t\t\tminLength,\n\t\t\tminValue,\n\t\t\tname,\n\t\t\tonBlur,\n\t\t\tonChange,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonInput,\n\t\t\tonInvalid,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonSelect,\n\t\t\tonSubmit,\n\t\t\tplaceholder,\n\t\t\treadOnly = false,\n\t\t\trequired = false,\n\t\t\trole,\n\t\t\tstep,\n\t\t\ttabIndex,\n\t\t\tstyleContainer,\n\t\t\tstyleInput,\n\t\t\ttype = 'text',\n\t\t\tvalue,\n\t\t\tvariant = 'base',\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst generatedErrorId = useId();\n\t\tconst generatedInlineHelpId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst errorId = errorText ? generatedErrorId : undefined;\n\t\tconst inlineHelpId = inlineHelpText ? generatedInlineHelpId : undefined;\n\t\tconst describedby =\n\t\t\t[ariaDescribedby, inlineHelpId, errorId].filter((v): v is string => Boolean(v)).join(' ') ||\n\t\t\tundefined;\n\n\t\tconst inputElementRef = useRef<HTMLInputElement | null>(null);\n\t\tconst steppingRef = useRef({\n\t\t\tcurrentDelay: 500,\n\t\t\tinitialDelay: 500,\n\t\t\tspeedDelay: 75,\n\t\t\ttimeout: null as ReturnType<typeof setTimeout> | null,\n\t\t});\n\t\tconst lastStepEventRef = useRef<MouseEvent | KeyboardEvent | null>(null);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\t\t// Check props in development\n\t\tcheckProps(INPUT, {\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t'aria-controls': ariaControls,\n\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t'aria-owns': ariaOwns,\n\t\t\t'aria-required': ariaRequired,\n\t\t\tassistiveText,\n\t\t\tautoComplete,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled,\n\t\t\terrorText,\n\t\t\tfieldLevelHelpTooltip,\n\t\t\tfixedTextLeft,\n\t\t\tfixedTextRight,\n\t\t\thasSpinner,\n\t\t\ticonLeft: propIconLeft,\n\t\t\ticonRight: propIconRight,\n\t\t\tid,\n\t\t\tinlineHelpText,\n\t\t\tinlineEditTrigger,\n\t\t\tinputRef: propInputRef,\n\t\t\tisStatic,\n\t\t\tlabel,\n\t\t\tmaxLength,\n\t\t\tmaxValue,\n\t\t\tminLength,\n\t\t\tminValue,\n\t\t\tname,\n\t\t\tonBlur,\n\t\t\tonChange,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonInput,\n\t\t\tonInvalid,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonSelect,\n\t\t\tonSubmit,\n\t\t\tplaceholder,\n\t\t\treadOnly,\n\t\t\trequired,\n\t\t\trole,\n\t\t\tstep,\n\t\t\ttabIndex,\n\t\t\tstyleContainer,\n\t\t\tstyleInput,\n\t\t\ttype,\n\t\t\tvalue,\n\t\t\tvariant,\n\t\t}, componentDoc);\n\n\t\tconst getValueAsNumber = useCallback((): number => {\n\t\t\tif (value !== undefined) {\n\t\t\t\treturn Number(value);\n\t\t\t}\n\t\t\tif (inputElementRef.current) {\n\t\t\t\treturn Number(inputElementRef.current.value);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}, [value]);\n\n\t\tconst stopStepping = useCallback(() => {\n\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t}\n\t\t\tsteppingRef.current.currentDelay = steppingRef.current.initialDelay;\n\t\t\tlastStepEventRef.current = null;\n\t\t}, []);\n\n\t\tconst performStep = useCallback(\n\t\t\t(direction: typeof INCREMENT | typeof DECREMENT, event?: MouseEvent | KeyboardEvent) => {\n\t\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t\t}\n\n\t\t\t\tif (event) {\n\t\t\t\t\tlastStepEventRef.current = event;\n\t\t\t\t}\n\t\t\t\tconst stepEvent = event ?? lastStepEventRef.current ?? undefined;\n\n\t\t\t\tconst stepSize = step !== undefined ? Number(step) : 1;\n\t\t\t\tlet currentValue = getValueAsNumber();\n\t\t\t\tlet valueChanged = false;\n\n\t\t\t\tif (direction === DECREMENT && maxValue !== undefined && currentValue > maxValue) {\n\t\t\t\t\tcurrentValue = Number(maxValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else if (direction === INCREMENT && minValue !== undefined && currentValue < minValue) {\n\t\t\t\t\tcurrentValue = Number(minValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else {\n\t\t\t\t\tconst decimalPlaces =\n\t\t\t\t\t\tString(stepSize).search(/\\./) >= 0 ? String(stepSize).split('.')[1].length : 0;\n\t\t\t\t\tlet minOverflow = 0;\n\n\t\t\t\t\tif (minValue !== undefined) {\n\t\t\t\t\t\tminOverflow = (currentValue - minValue) % stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (minOverflow > 0) {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - minOverflow\n\t\t\t\t\t\t\t\t: currentValue + (stepSize - minOverflow);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentValue = direction === DECREMENT ? currentValue - stepSize : currentValue + stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentValue = Number(currentValue.toFixed(decimalPlaces));\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!(maxValue !== undefined && currentValue > maxValue) &&\n\t\t\t\t\t\t!(minValue !== undefined && currentValue < minValue)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalueChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (valueChanged) {\n\t\t\t\t\tif (value === undefined && inputElementRef.current) {\n\t\t\t\t\t\t// Uncontrolled mode\n\t\t\t\t\t\tinputElementRef.current.value = String(currentValue);\n\t\t\t\t\t}\n\t\t\t\t\tif (onChange && stepEvent) {\n\t\t\t\t\t\tonChange(stepEvent, {\n\t\t\t\t\t\t\tnumber: currentValue,\n\t\t\t\t\t\t\tvalue: String(currentValue),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(direction === INCREMENT && maxValue !== undefined && currentValue >= maxValue) ||\n\t\t\t\t\t(direction === DECREMENT && minValue !== undefined && currentValue <= minValue)\n\t\t\t\t) {\n\t\t\t\t\tstopStepping();\n\t\t\t\t} else {\n\t\t\t\t\tsteppingRef.current.timeout = setTimeout(() => {\n\t\t\t\t\t\tsteppingRef.current.currentDelay = steppingRef.current.speedDelay;\n\t\t\t\t\t\tperformStep(direction);\n\t\t\t\t\t}, steppingRef.current.currentDelay);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[getValueAsNumber, maxValue, minValue, onChange, step, stopStepping, value]\n\t\t);\n\n\t\tconst setInputRef = useCallback(\n\t\t\t(element: HTMLInputElement | null) => {\n\t\t\t\tinputElementRef.current = element;\n\t\t\t\tif (propInputRef) {\n\t\t\t\t\tpropInputRef(element);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[propInputRef]\n\t\t);\n\n\t\tconst handleChange = useCallback(\n\t\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tconst data: InputChangeData = {\n\t\t\t\t\t\tvalue: event.target.value,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (variant === COUNTER) {\n\t\t\t\t\t\tdata.number = Number(data.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onChange, variant]\n\t\t);\n\n\t\tconst getCounterButtonIcon = (direction: typeof INCREMENT | typeof DECREMENT) => {\n\t\t\tconst currentValue = getValueAsNumber();\n\t\t\tlet isDisabled = false;\n\n\t\t\tif (\n\t\t\t\tdisabled ||\n\t\t\t\t(direction === INCREMENT && maxValue !== undefined && currentValue >= maxValue) ||\n\t\t\t\t(direction === DECREMENT && minValue !== undefined && currentValue <= minValue)\n\t\t\t) {\n\t\t\t\tisDisabled = true;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveText[direction.toLowerCase() as 'decrement' | 'increment'],\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-button_icon-small',\n\t\t\t\t\t\t`slds-input__button_${direction.toLowerCase()}`\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName={direction === DECREMENT ? 'ban' : 'new'}\n\t\t\t\t\tonKeyDown={(event: KeyboardEvent) => {\n\t\t\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonKeyUp={stopStepping}\n\t\t\t\t\tonMouseDown={(event: MouseEvent) => {\n\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t}}\n\t\t\t\t\tonMouseLeave={stopStepping}\n\t\t\t\t\tonMouseUp={stopStepping}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\t// Compute icon rendering\n\t\tlet iconLeft: ReactNode = null;\n\t\tlet iconRight: ReactNode = null;\n\n\t\tif (propIconLeft) {\n\t\t\ticonLeft = React.isValidElement(propIconLeft)\n\t\t\t\t? React.cloneElement(propIconLeft as React.ReactElement<{ iconPosition?: string }>, {\n\t\t\t\t\t\ticonPosition: 'left',\n\t\t\t\t })\n\t\t\t\t: propIconLeft;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonLeft = getCounterButtonIcon(DECREMENT);\n\t\t}\n\n\t\tif (propIconRight) {\n\t\t\ticonRight = React.isValidElement(propIconRight)\n\t\t\t\t? React.cloneElement(propIconRight as React.ReactElement<{ iconPosition?: string }>, {\n\t\t\t\t\t\ticonPosition: 'right',\n\t\t\t\t })\n\t\t\t\t: propIconRight;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonRight = getCounterButtonIcon(INCREMENT);\n\t\t}\n\n\t\tconst hasRenderedLabel = label || assistiveText?.label;\n\t\tconst inputRefToUse = variant === COUNTER ? setInputRef : propInputRef;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-form-element',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t},\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tstyle={styleContainer}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\thtmlFor={isStatic ? undefined : id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tvariant={isStatic ? 'static' : 'base'}\n\t\t\t\t/>\n\t\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\ttriggerLearnMoreIcon: assistiveText.fieldLevelHelpButton,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<InnerInput\n\t\t\t\t\taria-activedescendant={ariaActivedescendant}\n\t\t\t\t\taria-autocomplete={ariaAutocomplete}\n\t\t\t\t\taria-controls={ariaControls}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\taria-describedby={describedby}\n\t\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\t\taria-haspopup={ariaHaspopup}\n\t\t\t\t\taria-owns={ariaOwns}\n\t\t\t\t\taria-required={ariaRequired}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-input_counter': variant === COUNTER,\n\t\t\t\t\t\t'slds-p-horizontal_none': variant === COUNTER && readOnly,\n\t\t\t\t\t})}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tclassName: 'slds-form-element__control',\n\t\t\t\t\t}}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tfixedTextLeft={fixedTextLeft}\n\t\t\t\t\tfixedTextRight={fixedTextRight}\n\t\t\t\t\thasSpinner={hasSpinner}\n\t\t\t\t\tid={id}\n\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\ticonRight={iconRight}\n\t\t\t\t\tinlineEditTrigger={inlineEditTrigger}\n\t\t\t\t\tisStatic={isStatic}\n\t\t\t\t\tminLength={minLength}\n\t\t\t\t\tminValue={minValue}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tmaxValue={maxValue}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonClick={onClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonInput={onInput}\n\t\t\t\t\tonInvalid={onInvalid}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tonSubmit={onSubmit}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tinputRef={inputRefToUse}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\trequired={required}\n\t\t\t\t\trole={role}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\ttype={variant === COUNTER ? 'number' : type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\tstyle={styleInput}\n\t\t\t\t/>\n\t\t\t\t{inlineHelpText && (\n\t\t\t\t\t<div id={inlineHelpId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{inlineHelpText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nInput.displayName = INPUT;\n\nexport default Input;\n"],"mappings":"uiBA8BA,IAAM,EAAU,UACV,EAAY,YACZ,E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mB,EACnB,gBAAe,GACf,kBAAiB,EACjB,mBAAkB,GAClB,gBAAe,GACf,gBAAe,EACf,YAAW,EACX,gBAAe,EACD,gBACd,WAAA,EAAW,EAAA,QAAA,CAAW,CACrB,qBAAsB,IAAY,EAClC,yBAA0B,IAAY,GAAW,CAClD,CAAC,EACD,eAAgB,CACf,UAAW,4BACZ,EACc,gBACJ,WACK,iBACC,kBACJ,cACR,KACM,WACC,YACQ,qBACT,WACC,YACD,WACC,YACD,WACJ,OACE,SACR,SAAU,GACD,UACA,UACA,UACE,YACA,YACC,aACH,WACC,YACA,YACG,eACb,SAAU,GACA,WACA,WACJ,QACS,gBACf,KAAM,IAAY,EAAU,SAAW,GAChC,QACE,UACH,OACI,YACV,MAAO,EACP,CAAA,EACA,IACA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,GAAI,GAAc,UAAU,0BAC/B,SAAA,CACG,CAAA,EAEL,IACA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,GAAI,GAAS,UAAU,0BAC1B,SAAA,CACG,CAAA,EAEL,EACG,GAEP,CACD,EAEA,EAAM,YAAc,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/input/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, {\n\tuseId,\n\tuseRef,\n\tuseReducer,\n\tuseCallback,\n\tforwardRef,\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype ChangeEvent,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype MouseEvent,\n\ttype FormEvent,\n\ttype CSSProperties,\n\ttype AriaAttributes,\n} from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport InnerInput from './private/inner-input';\nimport Label from '../utilities/label/index';\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport type { TooltipProps } from '../tooltip/index';\n\nimport checkProps from './check-props';\nimport { INPUT } from '../../utilities/constants';\nimport componentDoc from './component.json';\n\nconst COUNTER = 'counter';\nconst DECREMENT = 'Decrement';\nconst INCREMENT = 'Increment';\n\n/**\n * Input type options\n */\nexport type InputType =\n\t| 'text'\n\t| 'password'\n\t| 'datetime'\n\t| 'datetime-local'\n\t| 'date'\n\t| 'month'\n\t| 'time'\n\t| 'week'\n\t| 'number'\n\t| 'email'\n\t| 'url'\n\t| 'search'\n\t| 'tel'\n\t| 'color';\n\n/**\n * Input variant options\n */\nexport type InputVariant = 'base' | 'counter';\n\n/**\n * Assistive text for Input accessibility\n */\nexport interface InputAssistiveText {\n\t/** Visually hidden label for screen readers */\n\tlabel?: string;\n\t/** Text for loading spinner icon */\n\tspinner?: string;\n\t/** Text for decrement button in counter variant */\n\tdecrement?: string;\n\t/** Text for increment button in counter variant */\n\tincrement?: string;\n\t/** Text for field level help button */\n\tfieldLevelHelpButton?: string;\n}\n\n/**\n * Data passed to onChange callback\n */\nexport interface InputChangeData {\n\t/** The input value as string */\n\tvalue: string;\n\t/** The input value as number (only for counter variant) */\n\tnumber?: number;\n}\n\n/**\n * Props for the Input component\n */\nexport interface InputProps {\n\t/** ID of the currently active child in a composite widget */\n\t'aria-activedescendant'?: string;\n\t/** Indicates if suggestions complete the textbox input */\n\t'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both';\n\t/** ID of element controlled by this input */\n\t'aria-controls'?: string;\n\t/** ID of element(s) that describe this input */\n\t'aria-describedby'?: string;\n\t/** Whether a collapsible region is expanded */\n\t'aria-expanded'?: boolean;\n\t/** Indicates the input has a popup */\n\t'aria-haspopup'?: AriaAttributes['aria-haspopup'];\n\t/** ID of element(s) that label this input */\n\t'aria-labelledby'?: string;\n\t/** ID of element(s) owned by this input */\n\t'aria-owns'?: string;\n\t/** Whether input is required */\n\t'aria-required'?: boolean;\n\t/** Assistive text for accessibility */\n\tassistiveText?: InputAssistiveText;\n\t/** Browser autocomplete attribute */\n\tautoComplete?: string;\n\t/** Elements added after the input */\n\tchildren?: ReactNode;\n\t/** CSS classes for the outer container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Initial value for uncontrolled usage */\n\tdefaultValue?: string | number;\n\t/** Disables the input */\n\tdisabled?: boolean;\n\t/** Error message (highlights input as error) */\n\terrorText?: ReactNode;\n\t/** Tooltip component for field-level help */\n\tfieldLevelHelpTooltip?: ReactElement<TooltipProps> | null;\n\t/** Fixed text/node on the left */\n\tfixedTextLeft?: ReactNode;\n\t/** Fixed text/node on the right */\n\tfixedTextRight?: ReactNode;\n\t/** Shows loading spinner inside input */\n\thasSpinner?: boolean;\n\t/** Left-aligned icon (InputIcon instance) */\n\ticonLeft?: ReactNode;\n\t/** Right-aligned icon (InputIcon instance) */\n\ticonRight?: ReactNode;\n\t/** HTML id attribute */\n\tid?: string;\n\t/** Help text below the input */\n\tinlineHelpText?: ReactNode;\n\t/** Inline edit trigger element */\n\tinlineEditTrigger?: ReactNode;\n\t/** Ref callback for the input element */\n\tinputRef?: (element: HTMLInputElement | null) => void;\n\t/** Displays value statically (static input pattern) */\n\tisStatic?: boolean;\n\t/** Label text above input */\n\tlabel?: string;\n\t/** Maximum character length */\n\tmaxLength?: string | number;\n\t/** Maximum value for counter variant */\n\tmaxValue?: number;\n\t/** Minimum character length */\n\tminLength?: string | number;\n\t/** Minimum value for counter variant */\n\tminValue?: number;\n\t/** Form parameter name */\n\tname?: string;\n\t/** Blur event handler */\n\tonBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Change event handler */\n\tonChange?: (\n\t\tevent: ChangeEvent<HTMLInputElement> | MouseEvent | KeyboardEvent,\n\t\tdata: InputChangeData\n\t) => void;\n\t/** Click event handler */\n\tonClick?: (event: MouseEvent<HTMLInputElement>) => void;\n\t/** Focus event handler */\n\tonFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n\t/** Input event handler */\n\tonInput?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Invalid event handler */\n\tonInvalid?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Key down event handler */\n\tonKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key press event handler */\n\tonKeyPress?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Key up event handler */\n\tonKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n\t/** Select event handler */\n\tonSelect?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Submit event handler */\n\tonSubmit?: (event: FormEvent<HTMLInputElement>) => void;\n\t/** Placeholder text */\n\tplaceholder?: string;\n\t/** Makes input read-only */\n\treadOnly?: boolean;\n\t/** Highlights as required field */\n\trequired?: boolean;\n\t/** ARIA role */\n\trole?: string;\n\t/** Step size for counter variant */\n\tstep?: number;\n\t/** Tab index */\n\ttabIndex?: string | number;\n\t/** Custom styles for container */\n\tstyleContainer?: CSSProperties;\n\t/** Custom styles for input element */\n\tstyleInput?: CSSProperties;\n\t/** Input type */\n\ttype?: InputType;\n\t/** Controlled value */\n\tvalue?: string | number;\n\t/** Input variant */\n\tvariant?: InputVariant;\n}\n\nconst defaultAssistiveText: InputAssistiveText = {\n\tdecrement: `${DECREMENT} ${COUNTER}`,\n\tincrement: `${INCREMENT} ${COUNTER}`,\n};\n\n/**\n * The HTML `input` with a label and error messaging.\n *\n * @see https://lightningdesignsystem.com/components/input/\n */\nconst Input = forwardRef<HTMLDivElement, InputProps>(\n\t(\n\t\t{\n\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t'aria-controls': ariaControls,\n\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t'aria-owns': ariaOwns,\n\t\t\t'aria-required': ariaRequired,\n\t\t\tassistiveText: propAssistiveText,\n\t\t\tautoComplete,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdefaultValue,\n\t\t\tdisabled = false,\n\t\t\terrorText,\n\t\t\tfieldLevelHelpTooltip,\n\t\t\tfixedTextLeft,\n\t\t\tfixedTextRight,\n\t\t\thasSpinner = false,\n\t\t\ticonLeft: propIconLeft,\n\t\t\ticonRight: propIconRight,\n\t\t\tid: propId,\n\t\t\tinlineHelpText,\n\t\t\tinlineEditTrigger,\n\t\t\tinputRef: propInputRef,\n\t\t\tisStatic = false,\n\t\t\tlabel,\n\t\t\tmaxLength,\n\t\t\tmaxValue,\n\t\t\tminLength,\n\t\t\tminValue,\n\t\t\tname,\n\t\t\tonBlur,\n\t\t\tonChange,\n\t\t\tonClick,\n\t\t\tonFocus,\n\t\t\tonInput,\n\t\t\tonInvalid,\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonKeyUp,\n\t\t\tonSelect,\n\t\t\tonSubmit,\n\t\t\tplaceholder,\n\t\t\treadOnly = false,\n\t\t\trequired = false,\n\t\t\trole,\n\t\t\tstep,\n\t\t\ttabIndex,\n\t\t\tstyleContainer,\n\t\t\tstyleInput,\n\t\t\ttype = 'text',\n\t\t\tvalue,\n\t\t\tvariant = 'base',\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst generatedErrorId = useId();\n\t\tconst generatedInlineHelpId = useId();\n\t\tconst id = propId || generatedId;\n\t\tconst errorId = errorText ? generatedErrorId : undefined;\n\t\tconst inlineHelpId = inlineHelpText ? generatedInlineHelpId : undefined;\n\t\tconst describedby =\n\t\t\t[ariaDescribedby, inlineHelpId, errorId]\n\t\t\t\t.filter((v): v is string => Boolean(v))\n\t\t\t\t.join(' ') || undefined;\n\n\t\tconst inputElementRef = useRef<HTMLInputElement | null>(null);\n\t\tconst steppingRef = useRef({\n\t\t\tcurrentDelay: 500,\n\t\t\tinitialDelay: 500,\n\t\t\tspeedDelay: 75,\n\t\t\ttimeout: null as ReturnType<typeof setTimeout> | null,\n\t\t});\n\t\tconst lastStepEventRef = useRef<MouseEvent | KeyboardEvent | null>(null);\n\t\t// Latest `performStep`, so the repeat timer of a held counter button\n\t\t// reads current props (such as a controlled `value`) on every step.\n\t\tconst performStepRef = useRef<\n\t\t\t(\n\t\t\t\tdirection: typeof INCREMENT | typeof DECREMENT,\n\t\t\t\tevent?: MouseEvent | KeyboardEvent\n\t\t\t) => void\n\t\t>(() => {});\n\t\t// Re-renders after an uncontrolled step, so the counter buttons' disabled\n\t\t// state reflects the value written directly to the input element.\n\t\tconst [, forceRender] = useReducer((count: number) => count + 1, 0);\n\n\t\tconst assistiveText = { ...defaultAssistiveText, ...propAssistiveText };\n\n\t\t// Check props in development\n\t\tcheckProps(\n\t\t\tINPUT,\n\t\t\t{\n\t\t\t\t'aria-activedescendant': ariaActivedescendant,\n\t\t\t\t'aria-autocomplete': ariaAutocomplete,\n\t\t\t\t'aria-controls': ariaControls,\n\t\t\t\t'aria-describedby': ariaDescribedby,\n\t\t\t\t'aria-expanded': ariaExpanded,\n\t\t\t\t'aria-haspopup': ariaHaspopup,\n\t\t\t\t'aria-labelledby': ariaLabelledby,\n\t\t\t\t'aria-owns': ariaOwns,\n\t\t\t\t'aria-required': ariaRequired,\n\t\t\t\tassistiveText,\n\t\t\t\tautoComplete,\n\t\t\t\tchildren,\n\t\t\t\tclassName,\n\t\t\t\tdefaultValue,\n\t\t\t\tdisabled,\n\t\t\t\terrorText,\n\t\t\t\tfieldLevelHelpTooltip,\n\t\t\t\tfixedTextLeft,\n\t\t\t\tfixedTextRight,\n\t\t\t\thasSpinner,\n\t\t\t\ticonLeft: propIconLeft,\n\t\t\t\ticonRight: propIconRight,\n\t\t\t\tid,\n\t\t\t\tinlineHelpText,\n\t\t\t\tinlineEditTrigger,\n\t\t\t\tinputRef: propInputRef,\n\t\t\t\tisStatic,\n\t\t\t\tlabel,\n\t\t\t\tmaxLength,\n\t\t\t\tmaxValue,\n\t\t\t\tminLength,\n\t\t\t\tminValue,\n\t\t\t\tname,\n\t\t\t\tonBlur,\n\t\t\t\tonChange,\n\t\t\t\tonClick,\n\t\t\t\tonFocus,\n\t\t\t\tonInput,\n\t\t\t\tonInvalid,\n\t\t\t\tonKeyDown,\n\t\t\t\tonKeyPress,\n\t\t\t\tonKeyUp,\n\t\t\t\tonSelect,\n\t\t\t\tonSubmit,\n\t\t\t\tplaceholder,\n\t\t\t\treadOnly,\n\t\t\t\trequired,\n\t\t\t\trole,\n\t\t\t\tstep,\n\t\t\t\ttabIndex,\n\t\t\t\tstyleContainer,\n\t\t\t\tstyleInput,\n\t\t\t\ttype,\n\t\t\t\tvalue,\n\t\t\t\tvariant,\n\t\t\t},\n\t\t\tcomponentDoc\n\t\t);\n\n\t\tconst getValueAsNumber = useCallback((): number => {\n\t\t\tif (value !== undefined) {\n\t\t\t\treturn Number(value);\n\t\t\t}\n\t\t\tif (inputElementRef.current) {\n\t\t\t\treturn Number(inputElementRef.current.value);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}, [value]);\n\n\t\tconst stopStepping = useCallback(() => {\n\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t}\n\t\t\tsteppingRef.current.currentDelay = steppingRef.current.initialDelay;\n\t\t\tlastStepEventRef.current = null;\n\t\t}, []);\n\n\t\tconst performStep = useCallback(\n\t\t\t(\n\t\t\t\tdirection: typeof INCREMENT | typeof DECREMENT,\n\t\t\t\tevent?: MouseEvent | KeyboardEvent\n\t\t\t) => {\n\t\t\t\tif (steppingRef.current.timeout) {\n\t\t\t\t\tclearTimeout(steppingRef.current.timeout);\n\t\t\t\t}\n\n\t\t\t\tif (event) {\n\t\t\t\t\tlastStepEventRef.current = event;\n\t\t\t\t}\n\t\t\t\tconst stepEvent = event ?? lastStepEventRef.current ?? undefined;\n\n\t\t\t\tconst stepSize = step !== undefined ? Number(step) : 1;\n\t\t\t\tlet currentValue = getValueAsNumber();\n\t\t\t\tlet valueChanged = false;\n\n\t\t\t\tif (\n\t\t\t\t\tdirection === DECREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue > maxValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(maxValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else if (\n\t\t\t\t\tdirection === INCREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue < minValue\n\t\t\t\t) {\n\t\t\t\t\tcurrentValue = Number(minValue);\n\t\t\t\t\tvalueChanged = true;\n\t\t\t\t} else {\n\t\t\t\t\tconst decimalPlaces =\n\t\t\t\t\t\tString(stepSize).search(/\\./) >= 0\n\t\t\t\t\t\t\t? String(stepSize).split('.')[1].length\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tlet minOverflow = 0;\n\n\t\t\t\t\tif (minValue !== undefined) {\n\t\t\t\t\t\tminOverflow = (currentValue - minValue) % stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (minOverflow > 0) {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - minOverflow\n\t\t\t\t\t\t\t\t: currentValue + (stepSize - minOverflow);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentValue =\n\t\t\t\t\t\t\tdirection === DECREMENT\n\t\t\t\t\t\t\t\t? currentValue - stepSize\n\t\t\t\t\t\t\t\t: currentValue + stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentValue = Number(currentValue.toFixed(decimalPlaces));\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!(maxValue !== undefined && currentValue > maxValue) &&\n\t\t\t\t\t\t!(minValue !== undefined && currentValue < minValue)\n\t\t\t\t\t) {\n\t\t\t\t\t\tvalueChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (valueChanged) {\n\t\t\t\t\tif (value === undefined && inputElementRef.current) {\n\t\t\t\t\t\t// Uncontrolled mode\n\t\t\t\t\t\tinputElementRef.current.value = String(currentValue);\n\t\t\t\t\t\tforceRender();\n\t\t\t\t\t}\n\t\t\t\t\tif (onChange && stepEvent) {\n\t\t\t\t\t\tonChange(stepEvent, {\n\t\t\t\t\t\t\tnumber: currentValue,\n\t\t\t\t\t\t\tvalue: String(currentValue),\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t\t) {\n\t\t\t\t\tstopStepping();\n\t\t\t\t} else {\n\t\t\t\t\tsteppingRef.current.timeout = setTimeout(() => {\n\t\t\t\t\t\tsteppingRef.current.currentDelay = steppingRef.current.speedDelay;\n\t\t\t\t\t\tperformStepRef.current(direction);\n\t\t\t\t\t}, steppingRef.current.currentDelay);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[\n\t\t\t\tgetValueAsNumber,\n\t\t\t\tmaxValue,\n\t\t\t\tminValue,\n\t\t\t\tonChange,\n\t\t\t\tstep,\n\t\t\t\tstopStepping,\n\t\t\t\tvalue,\n\t\t\t]\n\t\t);\n\t\tperformStepRef.current = performStep;\n\n\t\tconst setInputRef = useCallback(\n\t\t\t(element: HTMLInputElement | null) => {\n\t\t\t\tinputElementRef.current = element;\n\t\t\t\tif (propInputRef) {\n\t\t\t\t\tpropInputRef(element);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[propInputRef]\n\t\t);\n\n\t\tconst handleChange = useCallback(\n\t\t\t(event: ChangeEvent<HTMLInputElement>) => {\n\t\t\t\tif (onChange) {\n\t\t\t\t\tconst data: InputChangeData = {\n\t\t\t\t\t\tvalue: event.target.value,\n\t\t\t\t\t};\n\n\t\t\t\t\tif (variant === COUNTER) {\n\t\t\t\t\t\tdata.number = Number(data.value);\n\t\t\t\t\t}\n\n\t\t\t\t\tonChange(event, data);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onChange, variant]\n\t\t);\n\n\t\tconst getCounterButtonIcon = (\n\t\t\tdirection: typeof INCREMENT | typeof DECREMENT\n\t\t) => {\n\t\t\tconst currentValue = getValueAsNumber();\n\t\t\tlet isDisabled = false;\n\n\t\t\tif (\n\t\t\t\tdisabled ||\n\t\t\t\t(direction === INCREMENT &&\n\t\t\t\t\tmaxValue !== undefined &&\n\t\t\t\t\tcurrentValue >= maxValue) ||\n\t\t\t\t(direction === DECREMENT &&\n\t\t\t\t\tminValue !== undefined &&\n\t\t\t\t\tcurrentValue <= minValue)\n\t\t\t) {\n\t\t\t\tisDisabled = true;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\ticon: assistiveText[\n\t\t\t\t\t\t\tdirection.toLowerCase() as 'decrement' | 'increment'\n\t\t\t\t\t\t],\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-button_icon-small',\n\t\t\t\t\t\t`slds-input__button_${direction.toLowerCase()}`\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName={direction === DECREMENT ? 'ban' : 'new'}\n\t\t\t\t\tonKeyDown={(event: KeyboardEvent) => {\n\t\t\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonKeyUp={stopStepping}\n\t\t\t\t\tonMouseDown={(event: MouseEvent) => {\n\t\t\t\t\t\tperformStep(direction, event);\n\t\t\t\t\t}}\n\t\t\t\t\tonMouseLeave={stopStepping}\n\t\t\t\t\tonMouseUp={stopStepping}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t);\n\t\t};\n\n\t\t// Compute icon rendering\n\t\tlet iconLeft: ReactNode = null;\n\t\tlet iconRight: ReactNode = null;\n\n\t\tif (propIconLeft) {\n\t\t\ticonLeft = React.isValidElement(propIconLeft)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconLeft as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'left',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconLeft;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonLeft = getCounterButtonIcon(DECREMENT);\n\t\t}\n\n\t\tif (propIconRight) {\n\t\t\ticonRight = React.isValidElement(propIconRight)\n\t\t\t\t? React.cloneElement(\n\t\t\t\t\t\tpropIconRight as React.ReactElement<{ iconPosition?: string }>,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ticonPosition: 'right',\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t: propIconRight;\n\t\t} else if (variant === COUNTER && !isStatic && !readOnly) {\n\t\t\ticonRight = getCounterButtonIcon(INCREMENT);\n\t\t}\n\n\t\tconst hasRenderedLabel = label || assistiveText?.label;\n\t\tconst inputRefToUse = variant === COUNTER ? setInputRef : propInputRef;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-form-element',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t},\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tstyle={styleContainer}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\thtmlFor={isStatic ? undefined : id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\trequired={required}\n\t\t\t\t\tvariant={isStatic ? 'static' : 'base'}\n\t\t\t\t/>\n\t\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\ttriggerLearnMoreIcon: assistiveText.fieldLevelHelpButton,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<InnerInput\n\t\t\t\t\taria-activedescendant={ariaActivedescendant}\n\t\t\t\t\taria-autocomplete={ariaAutocomplete}\n\t\t\t\t\taria-controls={ariaControls}\n\t\t\t\t\taria-labelledby={ariaLabelledby}\n\t\t\t\t\taria-describedby={describedby}\n\t\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\t\taria-haspopup={ariaHaspopup}\n\t\t\t\t\taria-owns={ariaOwns}\n\t\t\t\t\taria-required={ariaRequired}\n\t\t\t\t\tautoComplete={autoComplete}\n\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t'slds-input_counter': variant === COUNTER,\n\t\t\t\t\t\t'slds-p-horizontal_none': variant === COUNTER && readOnly,\n\t\t\t\t\t})}\n\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\tclassName: 'slds-form-element__control',\n\t\t\t\t\t}}\n\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tfixedTextLeft={fixedTextLeft}\n\t\t\t\t\tfixedTextRight={fixedTextRight}\n\t\t\t\t\thasSpinner={hasSpinner}\n\t\t\t\t\tid={id}\n\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\ticonRight={iconRight}\n\t\t\t\t\tinlineEditTrigger={inlineEditTrigger}\n\t\t\t\t\tisStatic={isStatic}\n\t\t\t\t\tminLength={minLength}\n\t\t\t\t\tminValue={minValue}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tmaxValue={maxValue}\n\t\t\t\t\tname={name}\n\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\tonChange={handleChange}\n\t\t\t\t\tonClick={onClick}\n\t\t\t\t\tonFocus={onFocus}\n\t\t\t\t\tonInput={onInput}\n\t\t\t\t\tonInvalid={onInvalid}\n\t\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\t\tonKeyPress={onKeyPress}\n\t\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\t\tonSelect={onSelect}\n\t\t\t\t\tonSubmit={onSubmit}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tinputRef={inputRefToUse}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\trequired={required}\n\t\t\t\t\trole={role}\n\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\ttype={variant === COUNTER ? 'number' : type}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\tstep={step}\n\t\t\t\t\ttabIndex={tabIndex}\n\t\t\t\t\tstyle={styleInput}\n\t\t\t\t/>\n\t\t\t\t{inlineHelpText && (\n\t\t\t\t\t<div id={inlineHelpId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{inlineHelpText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div id={errorId} className=\"slds-form-element__help\">\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nInput.displayName = INPUT;\n\nexport default Input;\n"],"mappings":"uiBA+BA,IAAM,EAAU,UACV,EAAY,YACZ,EAAY,YA2KZ,GAA2C,CAChD,UAAW,GAAG,EAAU,GAAG,IAC3B,UAAW,GAAG,EAAU,GAAG,GAC5B,EAOM,GAAA,EAAQ,EAAA,WAAA,EAEZ,CACC,wBAAyB,EACzB,oBAAqB,EACrB,gBAAiB,GACjB,mBAAoB,GACpB,gBAAiB,GACjB,gBAAiB,GACjB,kBAAmB,GACnB,YAAa,EACb,gBAAiB,GACjB,cAAe,GACf,gBACA,YACA,aACA,gBACA,WAAW,GACX,YACA,wBACA,iBAC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,EACc,gBACJ,WACK,iBACC,kBACJ,cACR,KACM,WACC,YACQ,qBACT,WACC,YACD,WACC,YACD,WACJ,OACE,SACR,SAAU,GACD,UACA,UACA,UACE,YACA,YACC,aACH,UACC,WACA,YACG,cACb,SAAU,GACA,WACA,WACJ,QACS,gBACf,KAAM,IAAY,EAAU,SAAW,GAChC,QACE,UACH,OACI,YACV,MAAO,EACP,CAAA,EACA,IACA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,GAAI,GAAc,UAAU,0BAC/B,SAAA,CACG,CAAA,EAEL,IACA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,GAAI,GAAS,UAAU,0BAC1B,SAAA,CACG,CAAA,EAEL,EACG,GAEP,CACD,EAEA,EAAM,YAAc,EAAA"}
@@ -1,2 +1,2 @@
1
- const e=require("../../utilities/warning/sunset-property.cjs"),t=require("../../utilities/get-component-doc.cjs"),n=require("../../utilities/warning/one-of-required-property.cjs"),r=require("../../utilities/warning/deprecated-property.cjs");var i=function(){};process.env.NODE_ENV!==`production`&&(i=function(i,a,o){let s=t.default(o);e.default(i,a.forceOpen,`forceOpen`,`Please use \`isOpen\` instead. It provides a consistent prop that aligns with other componenents. ${s(`isOpen`)}`),e.default(i,a.tooltip,`tooltip`,s()),r.default(i,a.offset,`offset`,void 0,`The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic. ${s()}`),n.default(i,{options:a.options,children:a.children},s()),r.default(i,a.isInline,`isInline`,`menuPosition="relative"`,s(`menuPosition`))});var a=i;exports.default=a;
1
+ const e=require("../../utilities/warning/sunset-property.cjs"),t=require("../../utilities/get-component-doc.cjs"),n=require("../../utilities/warning/one-of-required-property.cjs"),r=require("../../utilities/warning/deprecated-property.cjs");var i=function(){};process.env.NODE_ENV!==`production`&&(i=function(i,a,o){let s=t.default(o);e.default(i,a.forceOpen,`forceOpen`,`Please use \`isOpen\` instead. It provides a consistent prop that aligns with other componenents. ${s(`isOpen`)}`),e.default(i,a.tooltip,`tooltip`,s()),r.default(i,a.offset,`offset`,void 0,`The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic. ${s()}`),n.default(i,{options:a.options,children:a.children},s()),r.default(i,a.listItemRenderer,`listItemRenderer`,`renderMenuItem`,`\`renderMenuItem\` is a function called with \`{ icon, isSelected, option, optionIndex }\`, not a component. ${s(`renderMenuItem`)}`),r.default(i,a.isInline,`isInline`,`menuPosition="relative"`,s(`menuPosition`))});var a=i;exports.default=a;
2
2
  //# sourceMappingURL=check-props.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-props.cjs","names":[],"sources":["../../../../components/menu-dropdown/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport oneOfRequiredProperty from '../../utilities/warning/one-of-required-property';\nimport sunsetProperty from '../../utilities/warning/sunset-property';\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.forceOpen,\n\t\t\t'forceOpen',\n\t\t\t`Please use \\`isOpen\\` instead. It provides a consistent prop that aligns with other componenents. ${createDocUrl(\n\t\t\t\t'isOpen'\n\t\t\t)}`\n\t\t);\n\n\t\tsunsetProperty(COMPONENT, props.tooltip, 'tooltip', createDocUrl());\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.offset,\n\t\t\t'offset',\n\t\t\tundefined,\n\t\t\t`The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic. ${createDocUrl()}`\n\t\t);\n\n\t\toneOfRequiredProperty(\n\t\t\tCOMPONENT,\n\t\t\t{\n\t\t\t\toptions: props.options,\n\t\t\t\tchildren: props.children,\n\t\t\t},\n\t\t\tcreateDocUrl()\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.isInline,\n\t\t\t'isInline',\n\t\t\t'menuPosition=\"relative\"',\n\t\t\tcreateDocUrl('menuPosition')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":"iPASA,IAAI,EAAa,UAA8B,CAAC,EAEhD,QAAA,IAAA,WAA6B,eAC5B,EAAa,SAA4B,EAAW,EAAO,EAAS,CACnE,IAAM,EAAe,EAAA,QAAkB,CAAO,EAE9C,EAAA,QACC,EACA,EAAM,UACN,YACA,qGAAqG,EACpG,QACD,GACD,EAEA,EAAA,QAAe,EAAW,EAAM,QAAS,UAAW,EAAa,CAAC,EAElE,EAAA,QACC,EACA,EAAM,OACN,SACA,IAAA,GACA,mQAAmQ,EAAa,GACjR,EAEA,EAAA,QACC,EACA,CACC,QAAS,EAAM,QACf,SAAU,EAAM,QACjB,EACA,EAAa,CACd,EAEA,EAAA,QACC,EACA,EAAM,SACN,WACA,0BACA,EAAa,cAAc,CAC5B,CACD,GAGD,IAAA,EAAe"}
1
+ {"version":3,"file":"check-props.cjs","names":[],"sources":["../../../../components/menu-dropdown/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport oneOfRequiredProperty from '../../utilities/warning/one-of-required-property';\nimport sunsetProperty from '../../utilities/warning/sunset-property';\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.forceOpen,\n\t\t\t'forceOpen',\n\t\t\t`Please use \\`isOpen\\` instead. It provides a consistent prop that aligns with other componenents. ${createDocUrl(\n\t\t\t\t'isOpen'\n\t\t\t)}`\n\t\t);\n\n\t\tsunsetProperty(COMPONENT, props.tooltip, 'tooltip', createDocUrl());\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.offset,\n\t\t\t'offset',\n\t\t\tundefined,\n\t\t\t`The manual setting of positional offset of dialog components has been deemed unreliable. Position logic has been re-written to deliver better and more reliable positioning. Please create an issue if you have an edge case not covered by the built-in logic. ${createDocUrl()}`\n\t\t);\n\n\t\toneOfRequiredProperty(\n\t\t\tCOMPONENT,\n\t\t\t{\n\t\t\t\toptions: props.options,\n\t\t\t\tchildren: props.children,\n\t\t\t},\n\t\t\tcreateDocUrl()\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.listItemRenderer,\n\t\t\t'listItemRenderer',\n\t\t\t'renderMenuItem',\n\t\t\t`\\`renderMenuItem\\` is a function called with \\`{ icon, isSelected, option, optionIndex }\\`, not a component. ${createDocUrl('renderMenuItem')}`\n\t\t);\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.isInline,\n\t\t\t'isInline',\n\t\t\t'menuPosition=\"relative\"',\n\t\t\tcreateDocUrl('menuPosition')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":"iPASA,IAAI,EAAa,UAA8B,CAAC,EAEhD,QAAA,IAAA,WAA6B,eAC5B,EAAa,SAA4B,EAAW,EAAO,EAAS,CACnE,IAAM,EAAe,EAAA,QAAkB,CAAO,EAE9C,EAAA,QACC,EACA,EAAM,UACN,YACA,qGAAqG,EACpG,QACD,GACD,EAEA,EAAA,QAAe,EAAW,EAAM,QAAS,UAAW,EAAa,CAAC,EAElE,EAAA,QACC,EACA,EAAM,OACN,SACA,IAAA,GACA,mQAAmQ,EAAa,GACjR,EAEA,EAAA,QACC,EACA,CACC,QAAS,EAAM,QACf,SAAU,EAAM,QACjB,EACA,EAAa,CACd,EAEA,EAAA,QACC,EACA,EAAM,iBACN,mBACA,iBACA,gHAAgH,EAAa,gBAAgB,GAC9I,EACA,EAAA,QACC,EACA,EAAM,SACN,WACA,0BACA,EAAa,cAAc,CAC5B,CACD,GAGD,IAAA,EAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/menu-dropdown/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\n// MenuDropdown is now a React 19 compatible functional component\n// that handles click outside detection internally without react-onclickoutside\n\nimport MenuDropdown from './menu-dropdown';\n\nexport default MenuDropdown;\nexport type {\n\tMenuDropdownProps,\n\tMenuDropdownOption,\n\tMenuDropdownItemOption,\n\tMenuDropdownHeaderOption,\n\tMenuDropdownDividerOption,\n\tMenuDropdownOptionIcon,\n\tDropdownNubbinPosition,\n\tMenuDropdownSelectData,\n\tMenuDropdownOpenData,\n\tMenuDropdownOpenEvent,\n\tMenuDropdownCloseData,\n\tMenuDropdownCloseEvent,\n} from './menu-dropdown';\nexport {\n\tDropdownNubbinPositions,\n\tListItem,\n\tListItemLabel,\n} from './menu-dropdown';\n"],"mappings":"sOAQA,IAAA,EAAe,EAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/menu-dropdown/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\n// MenuDropdown is now a React 19 compatible functional component\n// that handles click outside detection internally without react-onclickoutside\n\nimport MenuDropdown from './menu-dropdown';\n\nexport default MenuDropdown;\nexport type {\n\tMenuDropdownProps,\n\tMenuDropdownOption,\n\tMenuDropdownItemOption,\n\tMenuDropdownHeaderOption,\n\tMenuDropdownDividerOption,\n\tMenuDropdownOptionIcon,\n\tDropdownNubbinPosition,\n\tMenuDropdownRenderMenuItemData,\n\tMenuDropdownSelectData,\n\tMenuDropdownOpenData,\n\tMenuDropdownOpenEvent,\n\tMenuDropdownCloseData,\n\tMenuDropdownCloseEvent,\n} from './menu-dropdown';\nexport {\n\tDropdownNubbinPositions,\n\tListItem,\n\tListItemLabel,\n} from './menu-dropdown';\n"],"mappings":"sOAQA,IAAA,EAAe,EAAA"}
@@ -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"),i=require("../../utilities/generate-id.cjs"),a=require("../../utilities/key-code.cjs"),o=require("../utilities/dialog/index.cjs"),s=require("../utilities/menu-list/item-label.cjs"),c=require("../utilities/menu-list/item.cjs"),l=require("../utilities/menu-list/index.cjs"),ee=require("./button-trigger.cjs"),te=require("./check-props.cjs"),ne=require("./component.cjs"),re=require("../../utilities/keyboard-navigate.cjs"),ie=require("../../utilities/key-buffer.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime"),p=require("lodash.isfunction");p=e.__toESM(p,1);var ae=l.default,m=typeof document<`u`,h=m?document.createElement(`span`):{style:{}};m&&(h.style.top=`0`,h.style.left=`0`,h.style.width=`100%`,h.style.height=`100%`,h.style.position=`absolute`);var g,oe=[`top left`,`top`,`top right`,`bottom left`,`bottom`,`bottom right`],se=()=>{},ce=e=>e.type!==`header`&&e.type!==`divider`&&!e.disabled,le=e=>{let t=[];return t.indexes=[],t.keyBuffer=new ie.default,Array.isArray(e)&&e.forEach((e,n)=>{ce(e)&&(t.push({index:n,text:`${e.label}`.toLowerCase()}),t.indexes.push(n))}),t},ue={top:`bottom`,"top left":`bottom left`,"top right":`bottom right`,bottom:`top`,"bottom left":`top left`,"bottom right":`top right`},_=e=>{let{align:c=`left`,assistiveText:l,buttonClassName:ie,buttonInverse:oe,buttonVariant:ce,checkmark:_,children:de,className:fe,containerClassName:pe,disabled:me,hasStaticAlignment:he,hint:ge,hoverCloseDelay:_e=300,iconCategory:ve,iconName:ye,iconPosition:be,iconSize:xe,iconVariant:v,id:Se,inheritTargetWidth:Ce,inverse:we=!1,isInline:Te,isOpen:y,label:Ee,length:De=`5`,listItemRenderer:Oe,menuPosition:ke=`absolute`,menuStyle:Ae,multiple:b,nubbinPosition:x,offset:je,onBlur:Me,onClick:S,onClose:Ne,onFocus:Pe,onKeyDown:Fe,onMouseDown:Ie,onMouseEnter:Le,onMouseLeave:Re,onOpen:ze,onSelect:C,openOn:w=`click`,options:T,overlay:E,requestFocus:Be,onRequestFocus:D,style:Ve,tabIndex:He,tooltip:Ue,tooltipMenuItem:We,triggerClassName:Ge,value:O,width:Ke=`medium`}=e,qe=(0,u.useContext)(n.IconSettingsContext),Je=(0,u.useMemo)(()=>i.default(),[]),k=(0,u.useCallback)(()=>Se||Je,[Se,Je]),[Ye,Xe]=(0,u.useState)(!1),[A,Ze]=(0,u.useState)(-1),[Qe,$e]=(0,u.useState)(-1),[j,M]=(0,u.useState)([]),[N,et]=(0,u.useState)(!1),P=(0,u.useRef)(null),tt=(0,u.useRef)(null),nt=(0,u.useRef)(null),F=(0,u.useRef)({}),I=(0,u.useRef)(!1),rt=(0,u.useRef)(!1),L=(0,u.useRef)(null),R=(0,u.useRef)(null),it=(0,u.useMemo)(()=>le(T),[T]);(0,u.useEffect)(()=>{te.default(t.MENU_DROPDOWN,e,ne.default)},[e]);let z=(0,u.useCallback)(()=>!!(typeof y==`boolean`?y:Ye),[y,Ye]),B=!me&&z()&&N,V=(0,u.useCallback)((e,t)=>{let n=-1;return t&&t.length&&t.some((t,r)=>t&&t.value===e?(n=r,!0):!1),n},[]);(0,u.useEffect)(()=>{if(b){let e=[];Array.isArray(O)?e=O:O!==void 0&&(e=[O]),e=e.filter(e=>V(e,T)!==-1);let t=e.map(e=>V(e,T));M(t)}else $e(V(O,T))},[O,T,b,V]);let at=Te?`relative`:ke,ot=(0,u.useCallback)(e=>{if(e!==void 0)return`${k()}-item-${e}`},[k]),st=(0,u.useCallback)(()=>Oe||s.default,[Oe]),H=(0,u.useCallback)(()=>{!I.current&&!rt.current&&P.current&&P.current.focus()},[]),ct=(0,u.useCallback)(()=>nt.current,[]),lt=(0,u.useCallback)(e=>e!==void 0&&F.current&&F.current[e]||null,[]),U=(0,u.useRef)(()=>{}),W=(0,u.useRef)(!1),G=(0,u.useCallback)(e=>{z()&&(g?.handleClose===U.current&&(g=void 0),Xe(!1),I.current=!1,W.current=!0,Ne?.(e,{}))},[z,Ne]),ut=(0,u.useCallback)((e,t)=>{t?.componentWillUnmount&&!W.current&&G(e)},[G]);U.current=G;let K=(0,u.useCallback)(e=>{z()||(g&&(0,p.default)(g.handleClose)&&g.handleClose(e),g={handleClose:G},Xe(!0),ze?.(e,{}))},[z,G,ze]),q=(0,u.useCallback)(e=>{let t=e.target,n=tt.current;if(n&&!n.contains(t)){let n=`ignore-click-${k()}`;if(t instanceof Element&&(t.classList?.contains(n)||t.closest(`.${n}`)||t.closest(`.ignore-react-onclickoutside`)))return;G(e)}},[k,G]);(0,u.useEffect)(()=>(B&&(document.addEventListener(`mousedown`,q),document.addEventListener(`touchstart`,q)),()=>{document.removeEventListener(`mousedown`,q),document.removeEventListener(`touchstart`,q)}),[B,q]);let dt=(0,u.useCallback)(e=>{H(),z()?G(e):K(e)},[z,G,K,H]),J=(0,u.useCallback)(e=>{z()?G(e):(K(e),H()),S?.(e)},[z,K,G,H,S]),ft=(0,u.useCallback)(e=>{Pe?.(e)},[Pe]),pt=(0,u.useCallback)(e=>{I.current=!0,!z()&&w===`hover`?K(e):L.current&&clearTimeout(L.current),Le?.(e)},[z,w,K,Le]),mt=(0,u.useCallback)(e=>{z()&&(L.current=setTimeout(()=>{G()},_e)),Re?.(e)},[z,_e,G,Re]),Y=(0,u.useCallback)((e,t)=>{if(b?j.indexOf(e)===-1?M(t=>[...t,e]):M(t=>t.filter(t=>t!==e)):($e(e),G(t),H()),C&&T){let n=T[e];C(t,{option:n,optionIndex:e})}},[b,j,G,H,C,T]),ht=(0,u.useCallback)(e=>{let t=e.getElementsByTagName(`a`)[0];t&&t.focus()},[]),gt=(0,u.useCallback)((e,t)=>{if(e&&t){let n=e.offsetHeight,r=e.scrollTop,i=t.offsetTop-e.offsetTop;if(i<r)e.scrollTop=i;else{let a=r+n+e.offsetTop,o=i+t.offsetHeight+e.offsetTop;o>a&&(e.scrollTop=o-n-e.offsetTop)}}},[]),X=(0,u.useCallback)(e=>{A!==e&&e!==void 0&&Ze(e);let t=ct(),n=lt(e??-1);n&&(ht(n),gt(t,n))},[A,ct,lt,ht,gt]),_t=(0,u.useMemo)(()=>({trigger:P.current,handleClick:e=>{J(e)}}),[J]),vt=(0,u.useCallback)(({event:e,isOpen:t=!0,keyCode:n,onFocus:r=X,onSelect:i,target:a,toggleOpen:o=se})=>{re.default({componentContext:_t,currentFocusedIndex:A,event:e,isOpen:t,key:e.key,keyCode:n,navigableItems:it,onFocus:r,onSelect:i,target:a,toggleOpen:o})},[_t,A,X,it]),Z=(0,u.useCallback)(e=>{H(),G(e)},[H,G]),Q=(0,u.useCallback)(e=>{e.keyCode&&(e.keyCode===a.default.TAB?Z(e):(e.keyCode===a.default.ENTER||e.keyCode===a.default.SPACE||e.keyCode===a.default.DOWN||e.keyCode===a.default.UP||e.keyCode===a.default.ESCAPE)&&(r.default.trap(e),vt({event:e,isOpen:z(),keyCode:e.keyCode,onSelect:t=>Y(t,e),target:e.target,toggleOpen:()=>dt(e)})),Fe?.(e))},[Z,vt,z,Y,dt,Fe]),yt=(0,u.useCallback)(e=>{H(),G(e)},[H,G]),bt=(0,u.useCallback)(e=>{P.current=e,!N&&e&&et(!0),e&&Be&&D&&D(e)},[N,Be,D]),xt=(0,u.useCallback)(e=>{tt.current=e,P.current||=e?.querySelector(`button`)||null},[]),St=(0,u.useCallback)(e=>{nt.current=e},[]),Ct=(0,u.useCallback)((e,t)=>{F.current[t]=e,t===A&&e&&X(A)},[A,X]),$=(0,u.useCallback)(e=>{(0,p.default)(E)&&m?E(e,h):E&&e&&!R.current&&m?(R.current=h,document.querySelector(`body`)?.appendChild(h)):!e&&R.current?.parentNode&&(R.current.parentNode.removeChild(R.current),R.current=null)},[E]);(0,u.useEffect)(()=>{$(B)},[B,$]),(0,u.useEffect)(()=>{B&&(W.current=!1)},[B]),(0,u.useEffect)(()=>()=>{rt.current=!0,g?.handleClose===U.current&&(g=void 0),$(!1),L.current&&clearTimeout(L.current)},[$]);let wt=(0,u.useCallback)(e=>(0,f.jsx)(ae,{checkmark:_,getListItemId:ot,itemRefs:Ct,itemRenderer:st(),onCancel:Z,onSelect:Y,options:T,ref:St,selectedIndex:b?void 0:Qe,selectedIndices:b?j:void 0,tooltipMenuItem:We,triggerId:k(),length:De,...e},`${k()}-dropdown-list`),[k,_,ot,Ct,st,Z,Y,T,St,b,Qe,j,We,De]),Tt=(0,u.useCallback)(e=>{let t=[];return e&&u.default.Children.forEach(e,e=>{if(e&&typeof e==`object`&&`type`in e&&e.type?.displayName===`SLDSList`)t.push(wt(e.props));else if(e){let n=u.default.cloneElement(e,{onClick:yt,key:i.default()});t.push(n)}}),t.length>0?t:wt()},[wt,yt]),Et=(0,u.useCallback)((e,t,n)=>{let r=`bottom`,i=!1,a=``;x?(i=!0,r=ue[x]):c&&(r=c===`center`?`bottom`:`bottom ${c}`);let s=ue[r]?.split(` `)||[];a=(0,d.default)(s.map(e=>`slds-dropdown_${e}`));let l={};return c===`center`&&!i&&(l.transform=`none`),t?(0,f.jsx)(o.default,{align:r,className:(0,d.default)(pe),closeOnTabKey:!0,contentsClassName:(0,d.default)(`slds-dropdown`,`slds-dropdown_${Ke}`,`slds-text-align_left`,`ignore-react-onclickoutside`,fe,a,{"slds-dropdown_inverse":we}),context:qe,hasNubbin:i,hasStaticAlignment:he,inheritWidthOf:Ce?`target`:`none`,offset:je,onClose:ut,onKeyDown:Q,outsideClickIgnoreClass:n,position:at,style:{...l,...Ae},onRequestTargetElement:()=>P.current,children:Tt(e)}):null},[x,c,pe,fe,we,qe,he,Ce,je,ut,Q,at,Ae,Ke,Tt]),Dt=ee.default,Ot={},kt=[];u.default.Children.forEach(de,e=>{e&&typeof e==`object`&&`type`in e&&e.type?.displayName===`SLDSMenuDropdownTrigger`?(Ot=e.props,Dt=e.type):e&&kt.push(e)});let At=`ignore-click-${k()}`,jt=v===`bare-inverse`||v===`border-inverse`,Mt=v===`bare-inverse`?`bare`:v===`border-inverse`?`border`:v;return(0,f.jsx)(Dt,{ref:xt,"aria-haspopup":!0,assistiveText:l,className:(0,d.default)(At,ie),disabled:me,hint:ge,iconCategory:ve,iconName:ye,iconPosition:be,iconSize:xe,iconVariant:Mt,id:k(),inverse:oe||jt,isOpen:B,label:Ee,menu:Et(kt.length>0?kt:null,B,At),onBlur:Me,onClick:w===`click`||w===`hybrid`?J:S,onFocus:ft,onKeyDown:Q,onMouseDown:Ie,onMouseEnter:w===`hover`||w===`hybrid`?pt:void 0,onMouseLeave:w===`hover`||w===`hybrid`?mt:void 0,openOn:w,style:Ve,tabIndex:He||(B?`-1`:`0`),tooltip:Ue,triggerClassName:Ge,triggerRef:bt,variant:ce,...Ot})};_.displayName=t.MENU_DROPDOWN,exports.DropdownNubbinPositions=oe,exports.ListItem=c.default,exports.ListItemLabel=s.default,exports.default=_;
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utilities/constants.cjs"),n=require("../icon-settings/index.cjs"),r=require("../../utilities/event.cjs"),i=require("../../utilities/generate-id.cjs"),a=require("../../utilities/key-code.cjs"),o=require("../utilities/dialog/index.cjs"),s=require("../utilities/menu-list/item-label.cjs"),c=require("../utilities/menu-list/item.cjs"),l=require("../utilities/menu-list/index.cjs"),ee=require("./button-trigger.cjs"),te=require("./check-props.cjs"),ne=require("./component.cjs"),re=require("../../utilities/keyboard-navigate.cjs"),ie=require("../../utilities/key-buffer.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime"),p=require("lodash.isfunction");p=e.__toESM(p,1);var ae=l.default,m=typeof document<`u`,h=m?document.createElement(`span`):{style:{}};m&&(h.style.top=`0`,h.style.left=`0`,h.style.width=`100%`,h.style.height=`100%`,h.style.position=`absolute`);var g,oe=[`top left`,`top`,`top right`,`bottom left`,`bottom`,`bottom right`],se=()=>{},ce=e=>e.type!==`header`&&e.type!==`divider`&&!e.disabled,le=e=>{let t=[];return t.indexes=[],t.keyBuffer=new ie.default,Array.isArray(e)&&e.forEach((e,n)=>{ce(e)&&(t.push({index:n,text:`${e.label}`.toLowerCase()}),t.indexes.push(n))}),t},ue={top:`bottom`,"top left":`bottom left`,"top right":`bottom right`,bottom:`top`,"bottom left":`top left`,"bottom right":`top right`},_=e=>{let{align:c=`left`,assistiveText:l,buttonClassName:ie,buttonInverse:oe,buttonVariant:ce,checkmark:_,children:de,className:fe,containerClassName:pe,disabled:me,hasStaticAlignment:he,hint:ge,hoverCloseDelay:_e=300,iconCategory:ve,iconName:ye,iconPosition:be,iconSize:xe,iconVariant:v,id:Se,inheritTargetWidth:Ce,inverse:we=!1,isInline:Te,isOpen:y,label:Ee,length:De=`5`,listItemRenderer:Oe,renderMenuItem:b,menuPosition:ke=`absolute`,menuStyle:Ae,multiple:x,nubbinPosition:S,offset:je,onBlur:Me,onClick:C,onClose:Ne,onFocus:Pe,onKeyDown:Fe,onMouseDown:Ie,onMouseEnter:Le,onMouseLeave:Re,onOpen:ze,onSelect:w,openOn:T=`click`,options:E,overlay:D,requestFocus:Be,onRequestFocus:O,style:Ve,tabIndex:He,tooltip:Ue,tooltipMenuItem:We,triggerClassName:Ge,value:k,width:Ke=`medium`}=e,qe=(0,u.useContext)(n.IconSettingsContext),Je=(0,u.useMemo)(()=>i.default(),[]),A=(0,u.useCallback)(()=>Se||Je,[Se,Je]),[Ye,Xe]=(0,u.useState)(!1),[j,Ze]=(0,u.useState)(-1),[Qe,$e]=(0,u.useState)(-1),[M,N]=(0,u.useState)([]),[P,et]=(0,u.useState)(!1),F=(0,u.useRef)(null),tt=(0,u.useRef)(null),nt=(0,u.useRef)(null),I=(0,u.useRef)({}),L=(0,u.useRef)(!1),rt=(0,u.useRef)(!1),R=(0,u.useRef)(null),z=(0,u.useRef)(null),it=(0,u.useMemo)(()=>le(E),[E]);(0,u.useEffect)(()=>{te.default(t.MENU_DROPDOWN,e,ne.default)},[e]);let B=(0,u.useCallback)(()=>!!(typeof y==`boolean`?y:Ye),[y,Ye]),V=!me&&B()&&P,H=(0,u.useCallback)((e,t)=>{let n=-1;return t&&t.length&&t.some((t,r)=>t&&t.value===e?(n=r,!0):!1),n},[]);(0,u.useEffect)(()=>{if(x){let e=[];Array.isArray(k)?e=k:k!==void 0&&(e=[k]),e=e.filter(e=>H(e,E)!==-1);let t=e.map(e=>H(e,E));N(t)}else $e(H(k,E))},[k,E,x,H]);let at=Te?`relative`:ke,ot=(0,u.useCallback)(e=>{if(e!==void 0)return`${A()}-item-${e}`},[A]),st=(0,u.useCallback)(()=>Oe||s.default,[Oe]),ct=(0,u.useMemo)(()=>b?({data:e,icon:t,index:n,isSelected:r})=>b({icon:t,isSelected:!!r,option:e,optionIndex:n??0}):void 0,[b]),U=(0,u.useCallback)(()=>{!L.current&&!rt.current&&F.current&&F.current.focus()},[]),lt=(0,u.useCallback)(()=>nt.current,[]),ut=(0,u.useCallback)(e=>e!==void 0&&I.current&&I.current[e]||null,[]),dt=(0,u.useRef)(()=>{}),W=(0,u.useRef)({handleClose:e=>dt.current(e)}),ft=(0,u.useRef)(!1),G=(0,u.useCallback)(e=>{B()&&(g===W.current&&(g=void 0),Xe(!1),L.current=!1,ft.current=!0,Ne?.(e,{}))},[B,Ne]),pt=(0,u.useCallback)((e,t)=>{t?.componentWillUnmount&&!ft.current&&G(e)},[G]);dt.current=G;let K=(0,u.useCallback)(e=>{B()||(g&&(0,p.default)(g.handleClose)&&g.handleClose(e),g=W.current,Xe(!0),ze?.(e,{}))},[B,G,ze]),q=(0,u.useCallback)(e=>{let t=e.target,n=tt.current;if(n&&!n.contains(t)){let n=`ignore-click-${A()}`;if(t instanceof Element&&(t.classList?.contains(n)||t.closest(`.${n}`)||t.closest(`.ignore-react-onclickoutside`)))return;G(e)}},[A,G]);(0,u.useEffect)(()=>(V&&(document.addEventListener(`mousedown`,q),document.addEventListener(`touchstart`,q)),()=>{document.removeEventListener(`mousedown`,q),document.removeEventListener(`touchstart`,q)}),[V,q]);let mt=(0,u.useCallback)(e=>{U(),B()?G(e):K(e)},[B,G,K,U]),ht=(0,u.useCallback)(e=>{B()?G(e):(K(e),U()),C?.(e)},[B,K,G,U,C]),gt=(0,u.useCallback)(e=>{Pe?.(e)},[Pe]),_t=(0,u.useCallback)(e=>{L.current=!0,!B()&&T===`hover`?K(e):R.current&&clearTimeout(R.current),Le?.(e)},[B,T,K,Le]),vt=(0,u.useCallback)(e=>{B()&&(R.current=setTimeout(()=>{G()},_e)),Re?.(e)},[B,_e,G,Re]),J=(0,u.useCallback)((e,t)=>{if(x?M.indexOf(e)===-1?N(t=>[...t,e]):N(t=>t.filter(t=>t!==e)):($e(e),G(t),U()),w&&E){let n=E[e];w(t,{option:n,optionIndex:e})}},[x,M,G,U,w,E]),yt=(0,u.useCallback)(e=>{let t=e.getElementsByTagName(`a`)[0];t&&t.focus()},[]),bt=(0,u.useCallback)((e,t)=>{if(e&&t){let n=e.offsetHeight,r=e.scrollTop,i=t.offsetTop-e.offsetTop;if(i<r)e.scrollTop=i;else{let a=r+n+e.offsetTop,o=i+t.offsetHeight+e.offsetTop;o>a&&(e.scrollTop=o-n-e.offsetTop)}}},[]),Y=(0,u.useCallback)(e=>{j!==e&&e!==void 0&&Ze(e);let t=lt(),n=ut(e??-1);n&&(yt(n),bt(t,n))},[j,lt,ut,yt,bt]),xt=(0,u.useMemo)(()=>({trigger:F.current,handleClick:e=>{ht(e)}}),[ht]),St=(0,u.useCallback)(({event:e,isOpen:t=!0,keyCode:n,onFocus:r=Y,onSelect:i,target:a,toggleOpen:o=se})=>{re.default({componentContext:xt,currentFocusedIndex:j,event:e,isOpen:t,key:e.key,keyCode:n,navigableItems:it,onFocus:r,onSelect:i,target:a,toggleOpen:o})},[xt,j,Y,it]),X=(0,u.useCallback)(e=>{U(),G(e)},[U,G]),Ct=(0,u.useCallback)(e=>{e.keyCode&&(e.keyCode===a.default.TAB?X(e):(e.keyCode===a.default.ENTER||e.keyCode===a.default.SPACE||e.keyCode===a.default.DOWN||e.keyCode===a.default.UP||e.keyCode===a.default.ESCAPE)&&(r.default.trap(e),St({event:e,isOpen:B(),keyCode:e.keyCode,onSelect:t=>J(t,e),target:e.target,toggleOpen:()=>mt(e)})),Fe?.(e))},[X,St,B,J,mt,Fe]),wt=(0,u.useCallback)(e=>{U(),G(e)},[U,G]),Tt=(0,u.useCallback)(e=>{F.current=e,!P&&e&&et(!0),e&&Be&&O&&O(e)},[P,Be,O]),Et=(0,u.useCallback)(e=>{tt.current=e,F.current||=e?.querySelector(`button`)||null},[]),Dt=(0,u.useCallback)(e=>{nt.current=e},[]),Ot=(0,u.useCallback)((e,t)=>{I.current[t]=e,t===j&&e&&Y(j)},[j,Y]),Z=(0,u.useCallback)(e=>{(0,p.default)(D)&&m?D(e,h):D&&e&&!z.current&&m?(z.current=h,document.querySelector(`body`)?.appendChild(h)):!e&&z.current?.parentNode&&(z.current.parentNode.removeChild(z.current),z.current=null)},[D]);(0,u.useEffect)(()=>{Z(V)},[V,Z]),(0,u.useEffect)(()=>{V&&(ft.current=!1)},[V]),(0,u.useEffect)(()=>()=>{rt.current=!0,g===W.current&&(g=void 0),Z(!1),R.current&&clearTimeout(R.current)},[Z]);let Q=(0,u.useCallback)(e=>(0,f.jsx)(ae,{checkmark:_,getListItemId:ot,itemRefs:Ot,itemRenderer:st(),renderItemLabel:ct,onCancel:X,onSelect:J,options:E,ref:Dt,selectedIndex:x?void 0:Qe,selectedIndices:x?M:void 0,tooltipMenuItem:We,triggerId:A(),length:De,...e},`${A()}-dropdown-list`),[A,_,ot,Ot,st,ct,X,J,E,Dt,x,Qe,M,We,De]),kt=(0,u.useCallback)(e=>{let t=[];return e&&u.default.Children.forEach(e,e=>{if(e&&typeof e==`object`&&`type`in e&&e.type?.displayName===`SLDSList`)t.push(Q(e.props));else if(e){let n=u.default.cloneElement(e,{onClick:wt,key:i.default()});t.push(n)}}),t.length>0?t:Q()},[Q,wt]),At=(0,u.useCallback)((e,t,n)=>{let r=`bottom`,i=!1,a=``;S?(i=!0,r=ue[S]):c&&(r=c===`center`?`bottom`:`bottom ${c}`);let s=ue[r]?.split(` `)||[];a=(0,d.default)(s.map(e=>`slds-dropdown_${e}`));let l={};return c===`center`&&!i&&(l.transform=`none`),t?(0,f.jsx)(o.default,{align:r,className:(0,d.default)(pe),closeOnTabKey:!0,contentsClassName:(0,d.default)(`slds-dropdown`,`slds-dropdown_${Ke}`,`slds-text-align_left`,`ignore-react-onclickoutside`,fe,a,{"slds-dropdown_inverse":we}),context:qe,hasNubbin:i,hasStaticAlignment:he,inheritWidthOf:Ce?`target`:`none`,offset:je,onClose:pt,onKeyDown:Ct,outsideClickIgnoreClass:n,position:at,style:{...l,...Ae},onRequestTargetElement:()=>F.current,children:kt(e)}):null},[S,c,pe,fe,we,qe,he,Ce,je,pt,Ct,at,Ae,Ke,kt]),jt=ee.default,Mt={},$=[];u.default.Children.forEach(de,e=>{e&&typeof e==`object`&&`type`in e&&e.type?.displayName===`SLDSMenuDropdownTrigger`?(Mt=e.props,jt=e.type):e&&$.push(e)});let Nt=`ignore-click-${A()}`,Pt=v===`bare-inverse`||v===`border-inverse`,Ft=v===`bare-inverse`?`bare`:v===`border-inverse`?`border`:v;return(0,f.jsx)(jt,{ref:Et,"aria-haspopup":!0,assistiveText:l,className:(0,d.default)(Nt,ie),disabled:me,hint:ge,iconCategory:ve,iconName:ye,iconPosition:be,iconSize:xe,iconVariant:Ft,id:A(),inverse:oe||Pt,isOpen:V,label:Ee,menu:At($.length>0?$:null,V,Nt),onBlur:Me,onClick:T===`click`||T===`hybrid`?ht:C,onFocus:gt,onKeyDown:Ct,onMouseDown:Ie,onMouseEnter:T===`hover`||T===`hybrid`?_t:void 0,onMouseLeave:T===`hover`||T===`hybrid`?vt:void 0,openOn:T,style:Ve,tabIndex:He||(V?`-1`:`0`),tooltip:Ue,triggerClassName:Ge,triggerRef:Tt,variant:ce,...Mt})};_.displayName=t.MENU_DROPDOWN,exports.DropdownNubbinPositions=oe,exports.ListItem=c.default,exports.ListItemLabel=s.default,exports.default=_;
2
2
  //# sourceMappingURL=menu-dropdown.cjs.map