@ifhover/leaf-ui 0.9.0 → 0.10.1

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 (379) hide show
  1. package/README.md +3 -3
  2. package/THIRD_PARTY.md +2 -1
  3. package/dist/cjs/alert/alert.cjs +5 -1
  4. package/dist/cjs/alert/alert.cjs.map +1 -1
  5. package/dist/cjs/alert/alert.d.cts +2 -0
  6. package/dist/cjs/alert/alert.d.cts.map +1 -1
  7. package/dist/cjs/browser/modules/alert/alert.cjs +5 -1
  8. package/dist/cjs/browser/modules/alert/alert.cjs.map +1 -1
  9. package/dist/cjs/browser/modules/card/card.cjs +4 -3
  10. package/dist/cjs/browser/modules/card/card.cjs.map +1 -1
  11. package/dist/cjs/browser/modules/config-provider/component-defaults.cjs.map +1 -1
  12. package/dist/cjs/browser/modules/confirm/confirm.cjs +1 -1
  13. package/dist/cjs/browser/modules/confirm/confirm.cjs.map +1 -1
  14. package/dist/cjs/browser/modules/daterangepicker/daterangepicker.cjs +17 -18
  15. package/dist/cjs/browser/modules/daterangepicker/daterangepicker.cjs.map +1 -1
  16. package/dist/cjs/browser/modules/drawer/drawer.cjs +2 -2
  17. package/dist/cjs/browser/modules/drawer/drawer.cjs.map +1 -1
  18. package/dist/cjs/browser/modules/dropdown/dropdown.cjs +1 -1
  19. package/dist/cjs/browser/modules/dropdown/dropdown.cjs.map +1 -1
  20. package/dist/cjs/browser/modules/form/form.cjs +2 -39
  21. package/dist/cjs/browser/modules/form/form.cjs.map +1 -1
  22. package/dist/cjs/browser/modules/image/geometry.cjs +84 -0
  23. package/dist/cjs/browser/modules/image/geometry.cjs.map +1 -0
  24. package/dist/cjs/browser/modules/image/image.cjs +15 -214
  25. package/dist/cjs/browser/modules/image/image.cjs.map +1 -1
  26. package/dist/cjs/browser/modules/image/index.cjs +0 -10
  27. package/dist/cjs/browser/modules/image/preview-renderer.cjs +1 -0
  28. package/dist/cjs/browser/modules/image/preview-renderer.cjs.map +1 -1
  29. package/dist/cjs/browser/modules/image/provider.cjs +5 -3
  30. package/dist/cjs/browser/modules/image/provider.cjs.map +1 -1
  31. package/dist/cjs/browser/modules/image/types.cjs +21 -0
  32. package/dist/cjs/browser/modules/image/types.cjs.map +1 -0
  33. package/dist/cjs/browser/modules/image/viewer.cjs +689 -476
  34. package/dist/cjs/browser/modules/image/viewer.cjs.map +1 -1
  35. package/dist/cjs/browser/modules/index.cjs +0 -9
  36. package/dist/cjs/browser/modules/locales/en-US.cjs +1 -1
  37. package/dist/cjs/browser/modules/locales/ja-JP.cjs +1 -1
  38. package/dist/cjs/browser/modules/locales/ko-KR.cjs +1 -1
  39. package/dist/cjs/browser/modules/locales/zh-CN.cjs +1 -1
  40. package/dist/cjs/browser/modules/locales/zh-TW.cjs +1 -1
  41. package/dist/cjs/browser/modules/menu/menu.cjs.map +1 -1
  42. package/dist/cjs/browser/modules/modal/modal.cjs +5 -4
  43. package/dist/cjs/browser/modules/modal/modal.cjs.map +1 -1
  44. package/dist/cjs/browser/modules/progress/progress.cjs +1 -1
  45. package/dist/cjs/browser/modules/progress/progress.cjs.map +1 -1
  46. package/dist/cjs/browser/modules/shared/calendar.cjs +4 -3
  47. package/dist/cjs/browser/modules/shared/calendar.cjs.map +1 -1
  48. package/dist/cjs/browser/modules/shared/date-input.cjs +2 -2
  49. package/dist/cjs/browser/modules/shared/date-input.cjs.map +1 -1
  50. package/dist/cjs/browser/modules/table/index.cjs +0 -18
  51. package/dist/cjs/browser/modules/table/table.cjs +1 -1
  52. package/dist/cjs/browser/modules/table/table.cjs.map +1 -1
  53. package/dist/cjs/browser/modules/tabletanstack/index.cjs +0 -18
  54. package/dist/cjs/browser/modules/tabletanstack/tabletanstack.cjs +97 -371
  55. package/dist/cjs/browser/modules/tabletanstack/tabletanstack.cjs.map +1 -1
  56. package/dist/cjs/card/card.cjs +4 -3
  57. package/dist/cjs/card/card.cjs.map +1 -1
  58. package/dist/cjs/card/card.d.cts +3 -1
  59. package/dist/cjs/card/card.d.cts.map +1 -1
  60. package/dist/cjs/config-provider/component-defaults.cjs.map +1 -1
  61. package/dist/cjs/config-provider/component-defaults.d.cts +4 -20
  62. package/dist/cjs/config-provider/component-defaults.d.cts.map +1 -1
  63. package/dist/cjs/confirm/confirm.cjs +1 -1
  64. package/dist/cjs/confirm/confirm.cjs.map +1 -1
  65. package/dist/cjs/confirm/confirm.d.cts.map +1 -1
  66. package/dist/cjs/daterangepicker/daterangepicker.cjs +17 -18
  67. package/dist/cjs/daterangepicker/daterangepicker.cjs.map +1 -1
  68. package/dist/cjs/daterangepicker/daterangepicker.d.cts.map +1 -1
  69. package/dist/cjs/drawer/drawer.cjs +2 -2
  70. package/dist/cjs/drawer/drawer.cjs.map +1 -1
  71. package/dist/cjs/drawer/drawer.d.cts +0 -1
  72. package/dist/cjs/drawer/drawer.d.cts.map +1 -1
  73. package/dist/cjs/dropdown/dropdown.cjs +1 -1
  74. package/dist/cjs/dropdown/dropdown.cjs.map +1 -1
  75. package/dist/cjs/dropdown/dropdown.d.cts +1 -1
  76. package/dist/cjs/form/form.cjs +2 -39
  77. package/dist/cjs/form/form.cjs.map +1 -1
  78. package/dist/cjs/form/form.d.cts +1 -1
  79. package/dist/cjs/form/form.d.cts.map +1 -1
  80. package/dist/cjs/image/geometry.cjs +84 -0
  81. package/dist/cjs/image/geometry.cjs.map +1 -0
  82. package/dist/cjs/image/geometry.d.cts +15 -0
  83. package/dist/cjs/image/geometry.d.cts.map +1 -0
  84. package/dist/cjs/image/image.cjs +15 -214
  85. package/dist/cjs/image/image.cjs.map +1 -1
  86. package/dist/cjs/image/image.d.cts +2 -41
  87. package/dist/cjs/image/image.d.cts.map +1 -1
  88. package/dist/cjs/image/index.cjs +0 -10
  89. package/dist/cjs/image/index.d.cts +2 -3
  90. package/dist/cjs/image/index.d.cts.map +1 -1
  91. package/dist/cjs/image/preview-renderer.cjs +1 -0
  92. package/dist/cjs/image/preview-renderer.cjs.map +1 -1
  93. package/dist/cjs/image/preview-renderer.d.cts.map +1 -1
  94. package/dist/cjs/image/provider.cjs +5 -3
  95. package/dist/cjs/image/provider.cjs.map +1 -1
  96. package/dist/cjs/image/provider.d.cts +1 -4
  97. package/dist/cjs/image/provider.d.cts.map +1 -1
  98. package/dist/cjs/image/types.cjs +21 -0
  99. package/dist/cjs/image/types.cjs.map +1 -0
  100. package/dist/cjs/image/types.d.cts +25 -0
  101. package/dist/cjs/image/types.d.cts.map +1 -0
  102. package/dist/cjs/image/viewer.cjs +689 -476
  103. package/dist/cjs/image/viewer.cjs.map +1 -1
  104. package/dist/cjs/image/viewer.d.cts +2 -2
  105. package/dist/cjs/image/viewer.d.cts.map +1 -1
  106. package/dist/cjs/index.cjs +0 -9
  107. package/dist/cjs/index.d.cts +2 -2
  108. package/dist/cjs/index.d.cts.map +1 -1
  109. package/dist/cjs/locales/en-US.cjs +1 -1
  110. package/dist/cjs/locales/ja-JP.cjs +1 -1
  111. package/dist/cjs/locales/ko-KR.cjs +1 -1
  112. package/dist/cjs/locales/messages.d.cts +4 -6
  113. package/dist/cjs/locales/messages.d.cts.map +1 -1
  114. package/dist/cjs/locales/zh-CN.cjs +1 -1
  115. package/dist/cjs/locales/zh-TW.cjs +1 -1
  116. package/dist/cjs/menu/menu.cjs.map +1 -1
  117. package/dist/cjs/menu/menu.d.cts +1 -1
  118. package/dist/cjs/modal/modal.cjs +5 -4
  119. package/dist/cjs/modal/modal.cjs.map +1 -1
  120. package/dist/cjs/modal/modal.d.cts +0 -2
  121. package/dist/cjs/modal/modal.d.cts.map +1 -1
  122. package/dist/cjs/progress/progress.cjs +1 -1
  123. package/dist/cjs/progress/progress.cjs.map +1 -1
  124. package/dist/cjs/progress/progress.d.cts.map +1 -1
  125. package/dist/cjs/shared/calendar.cjs +4 -3
  126. package/dist/cjs/shared/calendar.cjs.map +1 -1
  127. package/dist/cjs/shared/calendar.d.cts.map +1 -1
  128. package/dist/cjs/shared/date-input.cjs +2 -2
  129. package/dist/cjs/shared/date-input.cjs.map +1 -1
  130. package/dist/cjs/shared/date-input.d.cts.map +1 -1
  131. package/dist/cjs/styles/alert.css +1 -1
  132. package/dist/cjs/styles/card.css +1 -1
  133. package/dist/cjs/styles/collapse.css +1 -1
  134. package/dist/cjs/styles/components/alert.css +1 -1
  135. package/dist/cjs/styles/components/card.css +1 -1
  136. package/dist/cjs/styles/components/collapse.css +1 -1
  137. package/dist/cjs/styles/components/descriptions.css +1 -1
  138. package/dist/cjs/styles/components/drawer.css +1 -1
  139. package/dist/cjs/styles/components/filelist.css +1 -1
  140. package/dist/cjs/styles/components/form.css +1 -1
  141. package/dist/cjs/styles/components/image.css +1 -1
  142. package/dist/cjs/styles/components/menu.css +1 -1
  143. package/dist/cjs/styles/components/modal.css +1 -1
  144. package/dist/cjs/styles/components/progress.css +1 -1
  145. package/dist/cjs/styles/components/shared-calendar.css +1 -1
  146. package/dist/cjs/styles/components/table.css +1 -1
  147. package/dist/cjs/styles/components/tabletanstack.css +1 -1
  148. package/dist/cjs/styles/components/transfer.css +1 -1
  149. package/dist/cjs/styles/config-provider.css +1 -1
  150. package/dist/cjs/styles/confirm.css +1 -1
  151. package/dist/cjs/styles/datepicker.css +1 -1
  152. package/dist/cjs/styles/daterangepicker.css +1 -1
  153. package/dist/cjs/styles/descriptions.css +1 -1
  154. package/dist/cjs/styles/drawer.css +1 -1
  155. package/dist/cjs/styles/filelist.css +1 -1
  156. package/dist/cjs/styles/form.css +1 -1
  157. package/dist/cjs/styles/image.css +1 -1
  158. package/dist/cjs/styles/index.css +365 -870
  159. package/dist/cjs/styles/index.css.map +1 -1
  160. package/dist/cjs/styles/menu.css +1 -1
  161. package/dist/cjs/styles/message.css +1 -1
  162. package/dist/cjs/styles/modal.css +1 -1
  163. package/dist/cjs/styles/notification.css +1 -1
  164. package/dist/cjs/styles/popconfirm.css +1 -1
  165. package/dist/cjs/styles/progress.css +1 -1
  166. package/dist/cjs/styles/tabletanstack.css +1 -1
  167. package/dist/cjs/styles/transfer.css +1 -1
  168. package/dist/cjs/styles/upload.css +1 -1
  169. package/dist/cjs/table/index.cjs +0 -18
  170. package/dist/cjs/table/index.d.cts +2 -2
  171. package/dist/cjs/table/index.d.cts.map +1 -1
  172. package/dist/cjs/table/table.cjs +1 -1
  173. package/dist/cjs/table/table.cjs.map +1 -1
  174. package/dist/cjs/tabletanstack/defaults.d.cts +2 -23
  175. package/dist/cjs/tabletanstack/defaults.d.cts.map +1 -1
  176. package/dist/cjs/tabletanstack/index.cjs +0 -18
  177. package/dist/cjs/tabletanstack/index.d.cts +2 -2
  178. package/dist/cjs/tabletanstack/index.d.cts.map +1 -1
  179. package/dist/cjs/tabletanstack/tabletanstack.cjs +97 -371
  180. package/dist/cjs/tabletanstack/tabletanstack.cjs.map +1 -1
  181. package/dist/cjs/tabletanstack/tabletanstack.d.cts +8 -33
  182. package/dist/cjs/tabletanstack/tabletanstack.d.cts.map +1 -1
  183. package/dist/esm/alert/alert.d.ts +2 -0
  184. package/dist/esm/alert/alert.d.ts.map +1 -1
  185. package/dist/esm/alert/alert.js +5 -1
  186. package/dist/esm/alert/alert.js.map +1 -1
  187. package/dist/esm/browser/modules/alert/alert.js +5 -1
  188. package/dist/esm/browser/modules/alert/alert.js.map +1 -1
  189. package/dist/esm/browser/modules/card/card.js +4 -3
  190. package/dist/esm/browser/modules/card/card.js.map +1 -1
  191. package/dist/esm/browser/modules/config-provider/component-defaults.js.map +1 -1
  192. package/dist/esm/browser/modules/confirm/confirm.js +1 -1
  193. package/dist/esm/browser/modules/confirm/confirm.js.map +1 -1
  194. package/dist/esm/browser/modules/daterangepicker/daterangepicker.js +17 -18
  195. package/dist/esm/browser/modules/daterangepicker/daterangepicker.js.map +1 -1
  196. package/dist/esm/browser/modules/drawer/drawer.js +2 -2
  197. package/dist/esm/browser/modules/drawer/drawer.js.map +1 -1
  198. package/dist/esm/browser/modules/dropdown/dropdown.js +1 -1
  199. package/dist/esm/browser/modules/dropdown/dropdown.js.map +1 -1
  200. package/dist/esm/browser/modules/form/form.js +2 -39
  201. package/dist/esm/browser/modules/form/form.js.map +1 -1
  202. package/dist/esm/browser/modules/image/geometry.js +34 -0
  203. package/dist/esm/browser/modules/image/geometry.js.map +1 -0
  204. package/dist/esm/browser/modules/image/image.js +16 -206
  205. package/dist/esm/browser/modules/image/image.js.map +1 -1
  206. package/dist/esm/browser/modules/image/index.js +0 -1
  207. package/dist/esm/browser/modules/image/preview-renderer.js +1 -0
  208. package/dist/esm/browser/modules/image/preview-renderer.js.map +1 -1
  209. package/dist/esm/browser/modules/image/provider.js +5 -3
  210. package/dist/esm/browser/modules/image/provider.js.map +1 -1
  211. package/dist/esm/browser/modules/image/types.js +1 -0
  212. package/dist/esm/browser/modules/image/viewer.js +692 -467
  213. package/dist/esm/browser/modules/image/viewer.js.map +1 -1
  214. package/dist/esm/browser/modules/index.js +1 -1
  215. package/dist/esm/browser/modules/locales/en-US.js +1 -1
  216. package/dist/esm/browser/modules/locales/ja-JP.js +1 -1
  217. package/dist/esm/browser/modules/locales/ko-KR.js +1 -1
  218. package/dist/esm/browser/modules/locales/zh-CN.js +1 -1
  219. package/dist/esm/browser/modules/locales/zh-TW.js +1 -1
  220. package/dist/esm/browser/modules/menu/menu.js.map +1 -1
  221. package/dist/esm/browser/modules/modal/modal.js +6 -5
  222. package/dist/esm/browser/modules/modal/modal.js.map +1 -1
  223. package/dist/esm/browser/modules/progress/progress.js +1 -1
  224. package/dist/esm/browser/modules/progress/progress.js.map +1 -1
  225. package/dist/esm/browser/modules/shared/calendar.js +4 -3
  226. package/dist/esm/browser/modules/shared/calendar.js.map +1 -1
  227. package/dist/esm/browser/modules/shared/date-input.js +2 -2
  228. package/dist/esm/browser/modules/shared/date-input.js.map +1 -1
  229. package/dist/esm/browser/modules/table/index.js +1 -1
  230. package/dist/esm/browser/modules/table/table.js +1 -1
  231. package/dist/esm/browser/modules/table/table.js.map +1 -1
  232. package/dist/esm/browser/modules/tabletanstack/index.js +1 -1
  233. package/dist/esm/browser/modules/tabletanstack/tabletanstack.js +100 -347
  234. package/dist/esm/browser/modules/tabletanstack/tabletanstack.js.map +1 -1
  235. package/dist/esm/card/card.d.ts +3 -1
  236. package/dist/esm/card/card.d.ts.map +1 -1
  237. package/dist/esm/card/card.js +4 -3
  238. package/dist/esm/card/card.js.map +1 -1
  239. package/dist/esm/config-provider/component-defaults.d.ts +4 -20
  240. package/dist/esm/config-provider/component-defaults.d.ts.map +1 -1
  241. package/dist/esm/config-provider/component-defaults.js.map +1 -1
  242. package/dist/esm/confirm/confirm.d.ts.map +1 -1
  243. package/dist/esm/confirm/confirm.js +1 -1
  244. package/dist/esm/confirm/confirm.js.map +1 -1
  245. package/dist/esm/daterangepicker/daterangepicker.d.ts.map +1 -1
  246. package/dist/esm/daterangepicker/daterangepicker.js +17 -18
  247. package/dist/esm/daterangepicker/daterangepicker.js.map +1 -1
  248. package/dist/esm/drawer/drawer.d.ts +0 -1
  249. package/dist/esm/drawer/drawer.d.ts.map +1 -1
  250. package/dist/esm/drawer/drawer.js +2 -2
  251. package/dist/esm/drawer/drawer.js.map +1 -1
  252. package/dist/esm/dropdown/dropdown.d.ts +1 -1
  253. package/dist/esm/dropdown/dropdown.js +1 -1
  254. package/dist/esm/dropdown/dropdown.js.map +1 -1
  255. package/dist/esm/form/form.d.ts +1 -1
  256. package/dist/esm/form/form.d.ts.map +1 -1
  257. package/dist/esm/form/form.js +2 -39
  258. package/dist/esm/form/form.js.map +1 -1
  259. package/dist/esm/image/geometry.d.ts +15 -0
  260. package/dist/esm/image/geometry.d.ts.map +1 -0
  261. package/dist/esm/image/geometry.js +34 -0
  262. package/dist/esm/image/geometry.js.map +1 -0
  263. package/dist/esm/image/image.d.ts +2 -41
  264. package/dist/esm/image/image.d.ts.map +1 -1
  265. package/dist/esm/image/image.js +16 -206
  266. package/dist/esm/image/image.js.map +1 -1
  267. package/dist/esm/image/index.d.ts +2 -3
  268. package/dist/esm/image/index.d.ts.map +1 -1
  269. package/dist/esm/image/index.js +0 -1
  270. package/dist/esm/image/preview-renderer.d.ts.map +1 -1
  271. package/dist/esm/image/preview-renderer.js +1 -0
  272. package/dist/esm/image/preview-renderer.js.map +1 -1
  273. package/dist/esm/image/provider.d.ts +1 -4
  274. package/dist/esm/image/provider.d.ts.map +1 -1
  275. package/dist/esm/image/provider.js +5 -3
  276. package/dist/esm/image/provider.js.map +1 -1
  277. package/dist/esm/image/types.d.ts +25 -0
  278. package/dist/esm/image/types.d.ts.map +1 -0
  279. package/dist/esm/image/types.js +1 -0
  280. package/dist/esm/image/viewer.d.ts +2 -2
  281. package/dist/esm/image/viewer.d.ts.map +1 -1
  282. package/dist/esm/image/viewer.js +692 -467
  283. package/dist/esm/image/viewer.js.map +1 -1
  284. package/dist/esm/index.d.ts +2 -2
  285. package/dist/esm/index.d.ts.map +1 -1
  286. package/dist/esm/index.js +1 -1
  287. package/dist/esm/locales/en-US.js +1 -1
  288. package/dist/esm/locales/ja-JP.js +1 -1
  289. package/dist/esm/locales/ko-KR.js +1 -1
  290. package/dist/esm/locales/messages.d.ts +4 -6
  291. package/dist/esm/locales/messages.d.ts.map +1 -1
  292. package/dist/esm/locales/zh-CN.js +1 -1
  293. package/dist/esm/locales/zh-TW.js +1 -1
  294. package/dist/esm/menu/menu.d.ts +1 -1
  295. package/dist/esm/menu/menu.js.map +1 -1
  296. package/dist/esm/modal/modal.d.ts +0 -2
  297. package/dist/esm/modal/modal.d.ts.map +1 -1
  298. package/dist/esm/modal/modal.js +6 -5
  299. package/dist/esm/modal/modal.js.map +1 -1
  300. package/dist/esm/progress/progress.d.ts.map +1 -1
  301. package/dist/esm/progress/progress.js +1 -1
  302. package/dist/esm/progress/progress.js.map +1 -1
  303. package/dist/esm/shared/calendar.d.ts.map +1 -1
  304. package/dist/esm/shared/calendar.js +4 -3
  305. package/dist/esm/shared/calendar.js.map +1 -1
  306. package/dist/esm/shared/date-input.d.ts.map +1 -1
  307. package/dist/esm/shared/date-input.js +2 -2
  308. package/dist/esm/shared/date-input.js.map +1 -1
  309. package/dist/esm/styles/alert.css +1 -1
  310. package/dist/esm/styles/card.css +1 -1
  311. package/dist/esm/styles/collapse.css +1 -1
  312. package/dist/esm/styles/components/alert.css +1 -1
  313. package/dist/esm/styles/components/card.css +1 -1
  314. package/dist/esm/styles/components/collapse.css +1 -1
  315. package/dist/esm/styles/components/descriptions.css +1 -1
  316. package/dist/esm/styles/components/drawer.css +1 -1
  317. package/dist/esm/styles/components/filelist.css +1 -1
  318. package/dist/esm/styles/components/form.css +1 -1
  319. package/dist/esm/styles/components/image.css +1 -1
  320. package/dist/esm/styles/components/menu.css +1 -1
  321. package/dist/esm/styles/components/modal.css +1 -1
  322. package/dist/esm/styles/components/progress.css +1 -1
  323. package/dist/esm/styles/components/shared-calendar.css +1 -1
  324. package/dist/esm/styles/components/table.css +1 -1
  325. package/dist/esm/styles/components/tabletanstack.css +1 -1
  326. package/dist/esm/styles/components/transfer.css +1 -1
  327. package/dist/esm/styles/config-provider.css +1 -1
  328. package/dist/esm/styles/confirm.css +1 -1
  329. package/dist/esm/styles/datepicker.css +1 -1
  330. package/dist/esm/styles/daterangepicker.css +1 -1
  331. package/dist/esm/styles/descriptions.css +1 -1
  332. package/dist/esm/styles/drawer.css +1 -1
  333. package/dist/esm/styles/filelist.css +1 -1
  334. package/dist/esm/styles/form.css +1 -1
  335. package/dist/esm/styles/image.css +1 -1
  336. package/dist/esm/styles/index.css +365 -870
  337. package/dist/esm/styles/index.css.map +1 -1
  338. package/dist/esm/styles/menu.css +1 -1
  339. package/dist/esm/styles/message.css +1 -1
  340. package/dist/esm/styles/modal.css +1 -1
  341. package/dist/esm/styles/notification.css +1 -1
  342. package/dist/esm/styles/popconfirm.css +1 -1
  343. package/dist/esm/styles/progress.css +1 -1
  344. package/dist/esm/styles/tabletanstack.css +1 -1
  345. package/dist/esm/styles/transfer.css +1 -1
  346. package/dist/esm/styles/upload.css +1 -1
  347. package/dist/esm/table/index.d.ts +2 -2
  348. package/dist/esm/table/index.d.ts.map +1 -1
  349. package/dist/esm/table/index.js +1 -1
  350. package/dist/esm/table/table.js +1 -1
  351. package/dist/esm/table/table.js.map +1 -1
  352. package/dist/esm/tabletanstack/defaults.d.ts +2 -23
  353. package/dist/esm/tabletanstack/defaults.d.ts.map +1 -1
  354. package/dist/esm/tabletanstack/index.d.ts +2 -2
  355. package/dist/esm/tabletanstack/index.d.ts.map +1 -1
  356. package/dist/esm/tabletanstack/index.js +1 -1
  357. package/dist/esm/tabletanstack/tabletanstack.d.ts +8 -33
  358. package/dist/esm/tabletanstack/tabletanstack.d.ts.map +1 -1
  359. package/dist/esm/tabletanstack/tabletanstack.js +100 -347
  360. package/dist/esm/tabletanstack/tabletanstack.js.map +1 -1
  361. package/dist/locales/en-US.json +6 -8
  362. package/dist/locales/ja-JP.json +6 -8
  363. package/dist/locales/ko-KR.json +6 -8
  364. package/dist/locales/schema.json +16 -24
  365. package/dist/locales/zh-CN.json +6 -8
  366. package/dist/locales/zh-TW.json +6 -8
  367. package/package.json +4 -6
  368. package/dist/cjs/browser/modules/tabletanstack/reordering.cjs +0 -275
  369. package/dist/cjs/browser/modules/tabletanstack/reordering.cjs.map +0 -1
  370. package/dist/cjs/tabletanstack/reordering.cjs +0 -273
  371. package/dist/cjs/tabletanstack/reordering.cjs.map +0 -1
  372. package/dist/cjs/tabletanstack/reordering.d.cts +0 -47
  373. package/dist/cjs/tabletanstack/reordering.d.cts.map +0 -1
  374. package/dist/esm/browser/modules/tabletanstack/reordering.js +0 -219
  375. package/dist/esm/browser/modules/tabletanstack/reordering.js.map +0 -1
  376. package/dist/esm/tabletanstack/reordering.d.ts +0 -47
  377. package/dist/esm/tabletanstack/reordering.d.ts.map +0 -1
  378. package/dist/esm/tabletanstack/reordering.js +0 -217
  379. package/dist/esm/tabletanstack/reordering.js.map +0 -1
package/README.md CHANGED
@@ -51,7 +51,7 @@ Browser component entries automatically load theme variables, shared popup style
51
51
  - Layout / Grid / Row / Col / Space / ScrollArea / Masonry: page structure, responsive columns, spacing and scrolling.
52
52
  - Tabs / Menu / BackTop: content and view switching, nested navigation and scroll-to-top.
53
53
  - Descriptions / Timeline / QRCode: details, event histories, QR codes.
54
- - Image / ImagePreview / ImagePreviewGroup: loading and error states, zoom, galleries, thumbnails and fullscreen.
54
+ - useImagePreview: self-contained imperative image previews with zoom, looping galleries, side navigation, thumbnails, rotation and flips, without slideshow or fullscreen modes. Use native img elements for inline images.
55
55
  - VirtualList / InfiniteScroll: measured virtual rows and abortable loading.
56
56
  - DataTable: sorting, filtering, selection, grouping, pagination and virtualization through a TanStack Table instance. Import it from `@ifhover/leaf-ui/table`.
57
57
  - Transfer / InputOTP / InputMask: transfers, code autofill/paste, formatted values and time ranges.
@@ -84,7 +84,7 @@ export function ProjectTable() {
84
84
  }
85
85
  ```
86
86
 
87
- Tables use the same softened frame and downward resting shadow as Card by default. Set `bordered` for column dividers, or `striped={false}` for row dividers. `DataTable` and its helper components use the dedicated table entry; ordinary components do not require the optional table peer.
87
+ Tables use the same softened frame and downward resting shadow as Card by default. Set `columnDividers` for column dividers, or `striped={false}` for row dividers. `DataTable` uses the dedicated table entry; ordinary components do not require the optional table peer.
88
88
 
89
89
  Migration: replace native `Table`, `Table.Header`, `Table.Body`, `Table.Row`, `Table.Cell` and related named exports with a `DataTable` instance and column definitions. Native Table regional defaults are removed; use `components.DataTable` for presentation defaults. The `theme.components.Table` visual tokens remain available. The former `@ifhover/leaf-ui/table/tanstack` path remains a compatibility alias for `DataTable`.
90
90
 
@@ -144,7 +144,7 @@ Framework builds load styles automatically. Use the same initial theme during se
144
144
 
145
145
  All fields support name, form and required. DatePicker submits a local YYYY-MM-DD string, DatePicker with picker="time" submits HH:mm (or HH:mm:ss when enabled), and Cascader submits a JSON array string. Uncontrolled fields restore defaultValue on form reset; controlled fields require resetting application state. Select, DatePicker, DateRangePicker and AutoComplete forward their input; Cascader forwards its trigger button. Multi-select values use repeated name entries in FormData. Provide a label or aria-label for every control.
146
146
 
147
- Form keeps native onSubmit, onReset and FormData behavior. Wrap each control in FormField for labels and validation feedback. Use labelWidth="auto" to align all labels to the widest one, or pass a number for a fixed pixel width. DatePicker with picker="datetime" submits YYYY-MM-DD HH:mm (or HH:mm:ss with showSeconds); DateRangePicker submits a start/end string in the selected granularity.
147
+ Form keeps native onSubmit, onReset and FormData behavior. Wrap each control in FormField for labels and validation feedback. Horizontal labels default to 112px; set a numeric labelWidth on Form or FormField to adjust the width. DatePicker with picker="datetime" submits YYYY-MM-DD HH:mm (or HH:mm:ss with showSeconds); DateRangePicker submits a start/end string in the selected granularity.
148
148
 
149
149
  ## More components
150
150
 
package/THIRD_PARTY.md CHANGED
@@ -7,7 +7,6 @@ Leaf UI 的样式、组件接口、主题和语言集成为项目源码。以下
7
7
  | 能力 | 项目 | 许可证 |
8
8
  | --- | --- | --- |
9
9
  | 浮层定位 | [Floating UI](https://github.com/floating-ui/floating-ui) | MIT |
10
- | 图片预览、触摸切换、缩放、全屏和缩略图 | [Yet Another React Lightbox](https://github.com/igordanchenko/yet-another-react-lightbox) | MIT |
11
10
  | 指针、触摸和键盘拖拽排序 | [dnd-kit](https://github.com/clauderic/dnd-kit) | MIT |
12
11
  | 虚拟列表与动态行高 | [TanStack Virtual](https://github.com/TanStack/virtual) | MIT |
13
12
  | 格式输入 | [IMask](https://github.com/uNmAnNeR/imaskjs) | MIT |
@@ -16,4 +15,6 @@ Leaf UI 的样式、组件接口、主题和语言集成为项目源码。以下
16
15
 
17
16
  各外部依赖的完整许可证随其 npm 包分发。
18
17
 
18
+ 图片预览由 Leaf UI 自行实现,界面和交互参考 [Viewer.js](https://github.com/fengyuanchen/viewerjs),但不引入其脚本、样式或图标,也不依赖其他图片预览引擎。预览操作图标使用已有的 Lucide 依赖。
19
+
19
20
  其他运行依赖(Lucide、TinyColor、tabbable)的许可证随对应依赖包分发。
@@ -57,7 +57,7 @@ function FeedbackIcon({ type: rawType }) {
57
57
  });
58
58
  }
59
59
  function Alert(rawProps) {
60
- const { title, description, type = 'info', icon, showIcon = true, closable, onClose, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Alert', rawProps);
60
+ const { title, description, extra, type = 'info', icon, showIcon = true, closable, onClose, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Alert', rawProps);
61
61
  const normalizedType = (0, feedback_cjs_namespaceObject.normalizeFeedbackType)(type);
62
62
  const { messages } = (0, context_cjs_namespaceObject.useLeafConfig)();
63
63
  const [closed, setClosed] = (0, external_react_namespaceObject.useState)(false);
@@ -97,6 +97,10 @@ function Alert(rawProps) {
97
97
  })
98
98
  ]
99
99
  }),
100
+ null != extra && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
101
+ className: "leaf-alert__extra",
102
+ children: extra
103
+ }),
100
104
  closable && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
101
105
  type: "button",
102
106
  className: "leaf-alert__close",
@@ -1 +1 @@
1
- {"version":3,"file":"alert/alert.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../src/alert/alert.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CheckCircle2, CircleX, Info, LoaderCircle, TriangleAlert, X } from 'lucide-react';\nimport { type HTMLAttributes, type ReactNode, useRef, useState } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { useLeafConfig } from '../config-provider/context';\nimport { classes } from '../shared/classes';\nimport { type FeedbackTypeInput, normalizeFeedbackType } from '../shared/feedback';\nimport { inertProps } from '../shared/inert';\nimport { useContentTransition, usePresence } from '../shared/presence';\n\nexport type { FeedbackType, FeedbackTypeInput } from '../shared/feedback';\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n type?: FeedbackTypeInput;\n icon?: ReactNode;\n showIcon?: boolean;\n closable?: boolean;\n onClose?: () => void;\n}\nexport function FeedbackIcon({ type: rawType }: { type: FeedbackTypeInput | 'loading' }) {\n const type = rawType === 'loading' ? rawType : normalizeFeedbackType(rawType);\n const Icon = {\n success: CheckCircle2,\n info: Info,\n warning: TriangleAlert,\n danger: CircleX,\n loading: LoaderCircle,\n }[type];\n return (\n <Icon\n size={18}\n aria-hidden=\"true\"\n className={type === 'loading' ? 'leaf-feedback-spinner' : undefined}\n />\n );\n}\nexport function Alert(rawProps: AlertProps) {\n const {\n title,\n description,\n type = 'info',\n icon,\n showIcon = true,\n closable,\n onClose,\n className,\n ...props\n } = useComponentProps('Alert', rawProps);\n const normalizedType = normalizeFeedbackType(type);\n const { messages } = useLeafConfig();\n const [closed, setClosed] = useState(false);\n const root = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const present = usePresence(!closed, root);\n useContentTransition(content, normalizedType);\n if (!present) return null;\n return (\n <div\n {...props}\n {...inertProps(closed)}\n ref={root}\n data-state={closed ? 'closing' : undefined}\n data-description={description ? '' : undefined}\n aria-hidden={closed || props['aria-hidden']}\n role={\n props.role ??\n (normalizedType === 'danger' || normalizedType === 'warning' ? 'alert' : 'status')\n }\n className={classes('leaf-alert', `leaf-alert--${normalizedType}`, className)}\n >\n {showIcon && (\n <span className=\"leaf-alert__icon\" aria-hidden=\"true\">\n {icon ?? <FeedbackIcon type={normalizedType} />}\n </span>\n )}\n <div className=\"leaf-alert__content\" ref={content}>\n <div className=\"leaf-alert__title\">{title}</div>\n {description && <div className=\"leaf-alert__description\">{description}</div>}\n </div>\n {closable && (\n <button\n type=\"button\"\n className=\"leaf-alert__close\"\n aria-label={messages.common.close}\n onClick={() => {\n const node = root.current;\n if (node) {\n node.style.setProperty(\n '--leaf-alert-height',\n `${node.getBoundingClientRect().height}px`,\n );\n void node.offsetHeight;\n }\n setClosed(true);\n onClose?.();\n }}\n >\n <X size={16} aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","FeedbackIcon","rawType","type","normalizeFeedbackType","Icon","CheckCircle2","Info","TriangleAlert","CircleX","LoaderCircle","undefined","Alert","rawProps","title","description","icon","showIcon","closable","onClose","className","props","useComponentProps","normalizedType","messages","useLeafConfig","closed","setClosed","useState","root","useRef","content","present","usePresence","useContentTransition","inertProps","classes","node","X"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAA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S,OAAO;IACrB,OACE,AADK,WAAP,GACE,sCAAC;QACE,GAAGX,KAAK;QACR,GAAGc,AAAAA,IAAAA,0BAAAA,UAAAA,AAAAA,EAAWT,OAAO;QACtB,KAAKG;QACL,cAAYH,SAAS,YAAYf;QACjC,oBAAkBI,cAAc,KAAKJ;QACrC,eAAae,UAAUL,KAAK,CAAC,cAAc;QAC3C,MACEA,MAAM,IAAI,IACTE,CAAAA,AAAmB,aAAnBA,kBAA+BA,AAAmB,cAAnBA,iBAA+B,UAAU,QAAO;QAElF,WAAWa,AAAAA,IAAAA,4BAAAA,OAAAA,AAAAA,EAAQ,cAAc,CAAC,YAAY,EAAEb,gBAAgB,EAAEH;;YAEjEH,YACC,AADW,WAAZA,GACC,qCAAC;gBAAK,WAAU;gBAAmB,eAAY;0BAC5CD,QAAQ,WAARA,GAAQ,qCAACf,cAAAA;oBAAa,MAAMsB;;;0BAGjC,sCAAC;gBAAI,WAAU;gBAAsB,KAAKQ;;kCACxC,qCAAC;wBAAI,WAAU;kCAAqBjB;;oBACnCC,eAAe,WAAfA,GAAe,qCAAC;wBAAI,WAAU;kCAA2BA;;;;YAE3DG,YACC,AADW,WAAZA,GACC,qCAAC;gBACC,MAAK;gBACL,WAAU;gBACV,cAAYM,SAAS,MAAM,CAAC,KAAK;gBACjC,SAAS;oBACP,MAAMa,OAAOR,KAAK,OAAO;oBACzB,IAAIQ,MAAM;wBACRA,KAAK,KAAK,CAAC,WAAW,CACpB,uBACA,GAAGA,KAAK,qBAAqB,GAAG,MAAM,CAAC,EAAE,CAAC;wBAEvCA,KAAK,YAAY;oBACxB;oBACAV,UAAU;oBACVR;gBACF;0BAEA,mDAACmB,sCAAAA,CAACA,EAAAA;oBAAC,MAAM;oBAAI,eAAY;;;;;AAKnC"}
1
+ {"version":3,"file":"alert/alert.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../src/alert/alert.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CheckCircle2, CircleX, Info, LoaderCircle, TriangleAlert, X } from 'lucide-react';\nimport { type HTMLAttributes, type ReactNode, useRef, useState } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { useLeafConfig } from '../config-provider/context';\nimport { classes } from '../shared/classes';\nimport { type FeedbackTypeInput, normalizeFeedbackType } from '../shared/feedback';\nimport { inertProps } from '../shared/inert';\nimport { useContentTransition, usePresence } from '../shared/presence';\n\nexport type { FeedbackType, FeedbackTypeInput } from '../shared/feedback';\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Trailing content, displayed before the close button. */\n extra?: ReactNode;\n type?: FeedbackTypeInput;\n icon?: ReactNode;\n showIcon?: boolean;\n closable?: boolean;\n onClose?: () => void;\n}\nexport function FeedbackIcon({ type: rawType }: { type: FeedbackTypeInput | 'loading' }) {\n const type = rawType === 'loading' ? rawType : normalizeFeedbackType(rawType);\n const Icon = {\n success: CheckCircle2,\n info: Info,\n warning: TriangleAlert,\n danger: CircleX,\n loading: LoaderCircle,\n }[type];\n return (\n <Icon\n size={18}\n aria-hidden=\"true\"\n className={type === 'loading' ? 'leaf-feedback-spinner' : undefined}\n />\n );\n}\nexport function Alert(rawProps: AlertProps) {\n const {\n title,\n description,\n extra,\n type = 'info',\n icon,\n showIcon = true,\n closable,\n onClose,\n className,\n ...props\n } = useComponentProps('Alert', rawProps);\n const normalizedType = normalizeFeedbackType(type);\n const { messages } = useLeafConfig();\n const [closed, setClosed] = useState(false);\n const root = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const present = usePresence(!closed, root);\n useContentTransition(content, normalizedType);\n if (!present) return null;\n return (\n <div\n {...props}\n {...inertProps(closed)}\n ref={root}\n data-state={closed ? 'closing' : undefined}\n data-description={description ? '' : undefined}\n aria-hidden={closed || props['aria-hidden']}\n role={\n props.role ??\n (normalizedType === 'danger' || normalizedType === 'warning' ? 'alert' : 'status')\n }\n className={classes('leaf-alert', `leaf-alert--${normalizedType}`, className)}\n >\n {showIcon && (\n <span className=\"leaf-alert__icon\" aria-hidden=\"true\">\n {icon ?? <FeedbackIcon type={normalizedType} />}\n </span>\n )}\n <div className=\"leaf-alert__content\" ref={content}>\n <div className=\"leaf-alert__title\">{title}</div>\n {description && <div className=\"leaf-alert__description\">{description}</div>}\n </div>\n {extra != null && <div className=\"leaf-alert__extra\">{extra}</div>}\n {closable && (\n <button\n type=\"button\"\n className=\"leaf-alert__close\"\n aria-label={messages.common.close}\n onClick={() => {\n const node = root.current;\n if (node) {\n node.style.setProperty(\n '--leaf-alert-height',\n `${node.getBoundingClientRect().height}px`,\n );\n void node.offsetHeight;\n }\n setClosed(true);\n onClose?.();\n }}\n >\n <X size={16} aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","FeedbackIcon","rawType","type","normalizeFeedbackType","Icon","CheckCircle2","Info","TriangleAlert","CircleX","LoaderCircle","undefined","Alert","rawProps","title","description","extra","icon","showIcon","closable","onClose","className","props","useComponentProps","normalizedType","messages","useLeafConfig","closed","setClosed","useState","root","useRef","content","present","usePresence","useContentTransition","inertProps","classes","node","X"],"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gBAAsB,KAAKQ;;kCACxC,qCAAC;wBAAI,WAAU;kCAAqBlB;;oBACnCC,eAAe,WAAfA,GAAe,qCAAC;wBAAI,WAAU;kCAA2BA;;;;YAElD,QAATC,SAAiB,WAAR,GAAQ,qCAAC;gBAAI,WAAU;0BAAqBA;;YACrDG,YACC,AADW,WAAZA,GACC,qCAAC;gBACC,MAAK;gBACL,WAAU;gBACV,cAAYM,SAAS,MAAM,CAAC,KAAK;gBACjC,SAAS;oBACP,MAAMa,OAAOR,KAAK,OAAO;oBACzB,IAAIQ,MAAM;wBACRA,KAAK,KAAK,CAAC,WAAW,CACpB,uBACA,GAAGA,KAAK,qBAAqB,GAAG,MAAM,CAAC,EAAE,CAAC;wBAEvCA,KAAK,YAAY;oBACxB;oBACAV,UAAU;oBACVR;gBACF;0BAEA,mDAACmB,sCAAAA,CAACA,EAAAA;oBAAC,MAAM;oBAAI,eAAY;;;;;AAKnC"}
@@ -4,6 +4,8 @@ export type { FeedbackType, FeedbackTypeInput } from '../shared/feedback.cjs';
4
4
  export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
5
5
  title: ReactNode;
6
6
  description?: ReactNode;
7
+ /** Trailing content, displayed before the close button. */
8
+ extra?: ReactNode;
7
9
  type?: FeedbackTypeInput;
8
10
  icon?: ReactNode;
9
11
  showIcon?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.cts","sourceRoot":"","sources":["../../../src/alert/alert.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AAI9E,OAAO,EAAE,KAAK,iBAAiB,EAAyB,MAAM,oBAAoB,CAAC;AAInF,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC/E,KAAK,EAAE,SAAS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AK,CAAC,QAAQ,EAAE,UAAU,sCAoEzC"}
@@ -59,7 +59,7 @@ function FeedbackIcon({ type: rawType }) {
59
59
  });
60
60
  }
61
61
  function Alert(rawProps) {
62
- const { title, description, type = 'info', icon, showIcon = true, closable, onClose, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Alert', rawProps);
62
+ const { title, description, extra, type = 'info', icon, showIcon = true, closable, onClose, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Alert', rawProps);
63
63
  const normalizedType = (0, feedback_cjs_namespaceObject.normalizeFeedbackType)(type);
64
64
  const { messages } = (0, context_cjs_namespaceObject.useLeafConfig)();
65
65
  const [closed, setClosed] = (0, external_react_namespaceObject.useState)(false);
@@ -99,6 +99,10 @@ function Alert(rawProps) {
99
99
  })
100
100
  ]
101
101
  }),
102
+ null != extra && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
103
+ className: "leaf-alert__extra",
104
+ children: extra
105
+ }),
102
106
  closable && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
103
107
  type: "button",
104
108
  className: "leaf-alert__close",
@@ -1 +1 @@
1
- {"version":3,"file":"alert/alert.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/alert/alert.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CheckCircle2, CircleX, Info, LoaderCircle, TriangleAlert, X } from 'lucide-react';\nimport { type HTMLAttributes, type ReactNode, useRef, useState } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { useLeafConfig } from '../config-provider/context';\nimport { classes } from '../shared/classes';\nimport { type FeedbackTypeInput, normalizeFeedbackType } from '../shared/feedback';\nimport { inertProps } from '../shared/inert';\nimport { useContentTransition, usePresence } from '../shared/presence';\n\nexport type { FeedbackType, FeedbackTypeInput } from '../shared/feedback';\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n type?: FeedbackTypeInput;\n icon?: ReactNode;\n showIcon?: boolean;\n closable?: boolean;\n onClose?: () => void;\n}\nexport function FeedbackIcon({ type: rawType }: { type: FeedbackTypeInput | 'loading' }) {\n const type = rawType === 'loading' ? rawType : normalizeFeedbackType(rawType);\n const Icon = {\n success: CheckCircle2,\n info: Info,\n warning: TriangleAlert,\n danger: CircleX,\n loading: LoaderCircle,\n }[type];\n return (\n <Icon\n size={18}\n aria-hidden=\"true\"\n className={type === 'loading' ? 'leaf-feedback-spinner' : undefined}\n />\n );\n}\nexport function Alert(rawProps: AlertProps) {\n const {\n title,\n description,\n type = 'info',\n icon,\n showIcon = true,\n closable,\n onClose,\n className,\n ...props\n } = useComponentProps('Alert', rawProps);\n const normalizedType = normalizeFeedbackType(type);\n const { messages } = useLeafConfig();\n const [closed, setClosed] = useState(false);\n const root = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const present = usePresence(!closed, root);\n useContentTransition(content, normalizedType);\n if (!present) return null;\n return (\n <div\n {...props}\n {...inertProps(closed)}\n ref={root}\n data-state={closed ? 'closing' : undefined}\n data-description={description ? '' : undefined}\n aria-hidden={closed || props['aria-hidden']}\n role={\n props.role ??\n (normalizedType === 'danger' || normalizedType === 'warning' ? 'alert' : 'status')\n }\n className={classes('leaf-alert', `leaf-alert--${normalizedType}`, className)}\n >\n {showIcon && (\n <span className=\"leaf-alert__icon\" aria-hidden=\"true\">\n {icon ?? <FeedbackIcon type={normalizedType} />}\n </span>\n )}\n <div className=\"leaf-alert__content\" ref={content}>\n <div className=\"leaf-alert__title\">{title}</div>\n {description && <div className=\"leaf-alert__description\">{description}</div>}\n </div>\n {closable && (\n <button\n type=\"button\"\n className=\"leaf-alert__close\"\n aria-label={messages.common.close}\n onClick={() => {\n const node = root.current;\n if (node) {\n node.style.setProperty(\n '--leaf-alert-height',\n `${node.getBoundingClientRect().height}px`,\n );\n void node.offsetHeight;\n }\n setClosed(true);\n onClose?.();\n }}\n >\n <X size={16} aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","FeedbackIcon","rawType","type","normalizeFeedbackType","Icon","CheckCircle2","Info","TriangleAlert","CircleX","LoaderCircle","undefined","Alert","rawProps","title","description","icon","showIcon","closable","onClose","className","props","useComponentProps","normalizedType","messages","useLeafConfig","closed","setClosed","useState","root","useRef","content","present","usePresence","useContentTransition","inertProps","classes","node","X"],"mappings":";;;;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBA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,MAAM;oBAAI,eAAY;;;;;AAKnC"}
1
+ {"version":3,"file":"alert/alert.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/alert/alert.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CheckCircle2, CircleX, Info, LoaderCircle, TriangleAlert, X } from 'lucide-react';\nimport { type HTMLAttributes, type ReactNode, useRef, useState } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { useLeafConfig } from '../config-provider/context';\nimport { classes } from '../shared/classes';\nimport { type FeedbackTypeInput, normalizeFeedbackType } from '../shared/feedback';\nimport { inertProps } from '../shared/inert';\nimport { useContentTransition, usePresence } from '../shared/presence';\n\nexport type { FeedbackType, FeedbackTypeInput } from '../shared/feedback';\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Trailing content, displayed before the close button. */\n extra?: ReactNode;\n type?: FeedbackTypeInput;\n icon?: ReactNode;\n showIcon?: boolean;\n closable?: boolean;\n onClose?: () => void;\n}\nexport function FeedbackIcon({ type: rawType }: { type: FeedbackTypeInput | 'loading' }) {\n const type = rawType === 'loading' ? rawType : normalizeFeedbackType(rawType);\n const Icon = {\n success: CheckCircle2,\n info: Info,\n warning: TriangleAlert,\n danger: CircleX,\n loading: LoaderCircle,\n }[type];\n return (\n <Icon\n size={18}\n aria-hidden=\"true\"\n className={type === 'loading' ? 'leaf-feedback-spinner' : undefined}\n />\n );\n}\nexport function Alert(rawProps: AlertProps) {\n const {\n title,\n description,\n extra,\n type = 'info',\n icon,\n showIcon = true,\n closable,\n onClose,\n className,\n ...props\n } = useComponentProps('Alert', rawProps);\n const normalizedType = normalizeFeedbackType(type);\n const { messages } = useLeafConfig();\n const [closed, setClosed] = useState(false);\n const root = useRef<HTMLDivElement>(null);\n const content = useRef<HTMLDivElement>(null);\n const present = usePresence(!closed, root);\n useContentTransition(content, normalizedType);\n if (!present) return null;\n return (\n <div\n {...props}\n {...inertProps(closed)}\n ref={root}\n data-state={closed ? 'closing' : undefined}\n data-description={description ? '' : undefined}\n aria-hidden={closed || props['aria-hidden']}\n role={\n props.role ??\n (normalizedType === 'danger' || normalizedType === 'warning' ? 'alert' : 'status')\n }\n className={classes('leaf-alert', `leaf-alert--${normalizedType}`, className)}\n >\n {showIcon && (\n <span className=\"leaf-alert__icon\" aria-hidden=\"true\">\n {icon ?? <FeedbackIcon type={normalizedType} />}\n </span>\n )}\n <div className=\"leaf-alert__content\" ref={content}>\n <div className=\"leaf-alert__title\">{title}</div>\n {description && <div className=\"leaf-alert__description\">{description}</div>}\n </div>\n {extra != null && <div className=\"leaf-alert__extra\">{extra}</div>}\n {closable && (\n <button\n type=\"button\"\n className=\"leaf-alert__close\"\n aria-label={messages.common.close}\n onClick={() => {\n const node = root.current;\n if (node) {\n node.style.setProperty(\n '--leaf-alert-height',\n `${node.getBoundingClientRect().height}px`,\n );\n void node.offsetHeight;\n }\n setClosed(true);\n onClose?.();\n }}\n >\n <X size={16} aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","FeedbackIcon","rawType","type","normalizeFeedbackType","Icon","CheckCircle2","Info","TriangleAlert","CircleX","LoaderCircle","undefined","Alert","rawProps","title","description","extra","icon","showIcon","closable","onClose","className","props","useComponentProps","normalizedType","messages","useLeafConfig","closed","setClosed","useState","root","useRef","content","present","usePresence","useContentTransition","inertProps","classes","node","X"],"mappings":";;;;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;;;ACeO,SAASI,aAAa,EAAE,MAAMC,OAAO,EAA2C;IACrF,MAAMC,OAAOD,AAAY,cAAZA,UAAwBA,UAAUE,AAAAA,IAAAA,6BAAAA,qBAAAA,AAAAA,EAAsBF;IACrE,MAAMG,OAAO;QACX,SAASC,sCAAAA,YAAYA;QACrB,MAAMC,sCAAAA,IAAIA;QACV,SAASC,sCAAAA,aAAaA;QACtB,QAAQC,sCAAAA,OAAOA;QACf,SAASC,sCAAAA,YAAYA;IACvB,CAAC,CAACP,KAAK;IACP,OACE,AADK,WAAP,GACE,qCAACE,MAAAA;QACC,MA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BAAgB,EAAEH;;YAEjEH,YACC,AADW,WAAZA,GACC,qCAAC;gBAAK,WAAU;gBAAmB,eAAY;0BAC5CD,QAAQ,WAARA,GAAQ,qCAAChB,cAAAA;oBAAa,MAAMuB;;;0BAGjC,sCAAC;gBAAI,WAAU;gBAAsB,KAAKQ;;kCACxC,qCAAC;wBAAI,WAAU;kCAAqBlB;;oBACnCC,eAAe,WAAfA,GAAe,qCAAC;wBAAI,WAAU;kCAA2BA;;;;YAElD,QAATC,SAAiB,WAAR,GAAQ,qCAAC;gBAAI,WAAU;0BAAqBA;;YACrDG,YACC,AADW,WAAZA,GACC,qCAAC;gBACC,MAAK;gBACL,WAAU;gBACV,cAAYM,SAAS,MAAM,CAAC,KAAK;gBACjC,SAAS;oBACP,MAAMa,OAAOR,KAAK,OAAO;oBACzB,IAAIQ,MAAM;wBACRA,KAAK,KAAK,CAAC,WAAW,CACpB,uBACA,GAAGA,KAAK,qBAAqB,GAAG,MAAM,CAAC,EAAE,CAAC;wBAEvCA,KAAK,YAAY;oBACxB;oBACAV,UAAU;oBACVR;gBACF;0BAEA,mDAACmB,sCAAAA,CAACA,EAAAA;oBAAC,MAAM;oBAAI,eAAY;;;;;AAKnC"}
@@ -42,13 +42,14 @@ const skeleton_cjs_namespaceObject = require("../skeleton/skeleton.cjs");
42
42
  const tabs_cjs_namespaceObject = require("../tabs/tabs.cjs");
43
43
  const external_title_cjs_namespaceObject = require("./title.cjs");
44
44
  function Card(rawProps) {
45
- const { title, description, extra, tabs, cover, footer, loading = false, bordered = true, selected = false, variant = 'default', size = 'md', children, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Card', rawProps);
45
+ const { title, description, extra, tabs, cover, footer, loading = false, bordered = true, shadow = true, selected = false, variant = 'default', size = 'md', children, className, ...props } = (0, component_defaults_cjs_namespaceObject.useComponentProps)('Card', rawProps);
46
46
  const body = (0, external_react_namespaceObject.useRef)(null);
47
47
  (0, presence_cjs_namespaceObject.useContentTransition)(body, loading ? 'loading' : 'content');
48
48
  const hasTabs = Boolean(tabs?.items.length);
49
49
  const layered = 'layered' === variant;
50
50
  const visibleDescription = layered ? void 0 : description;
51
51
  const hasHeading = null != title || null != visibleDescription;
52
+ const hasBody = null != children || !hasTabs && (loading || null == cover);
52
53
  const footerContent = null != footer && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
53
54
  className: "leaf-card__footer",
54
55
  children: footer
@@ -89,7 +90,7 @@ function Card(rawProps) {
89
90
  tabs.onReorder?.(items.map((item)=>originals.get(item.key) ?? item));
90
91
  })
91
92
  }),
92
- (!hasTabs || null != children) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
93
+ hasBody && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
93
94
  className: "leaf-card__body",
94
95
  ref: body,
95
96
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(skeleton_cjs_namespaceObject.SkeletonControl, {
@@ -103,7 +104,7 @@ function Card(rawProps) {
103
104
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
104
105
  ...props,
105
106
  "aria-busy": loading || void 0,
106
- className: (0, classes_cjs_namespaceObject.classes)('leaf-card', `leaf-card--${size}`, bordered && 'leaf-card--bordered', selected && 'leaf-card--selected', layered && 'leaf-card--layered', hasHeading && 'leaf-card--headed', hasTabs && 'leaf-card--tabbed', className),
107
+ className: (0, classes_cjs_namespaceObject.classes)('leaf-card', `leaf-card--${size}`, bordered && 'leaf-card--bordered', !shadow && 'leaf-card--shadowless', selected && 'leaf-card--selected', layered && 'leaf-card--layered', hasHeading && 'leaf-card--headed', hasTabs && 'leaf-card--tabbed', className),
107
108
  children: [
108
109
  (hasHeading || !hasTabs && null != extra) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
109
110
  className: "leaf-card__header",
@@ -1 +1 @@
1
- {"version":3,"file":"card/card.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/card/card.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { type HTMLAttributes, type ReactNode, useRef } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { classes } from '../shared/classes';\nimport { useContentTransition } from '../shared/presence';\nimport { SkeletonControl as Skeleton } from '../skeleton/skeleton';\nimport type { TabsProps } from '../tabs';\nimport { TabsControl as Tabs } from '../tabs/tabs';\nimport { CardTitleControl } from './title';\n\n/** Horizontal line tabs integrated with the card heading and content spacing. */\nexport interface CardTabsProps extends Omit<TabsProps, 'type' | 'placement' | 'children'> {}\n\nexport interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title?: ReactNode;\n /** Supporting text for the default appearance; not displayed by layered cards. */\n description?: ReactNode;\n extra?: ReactNode;\n /** Tabs replace the heading when no title is supplied, otherwise sit below it. */\n tabs?: CardTabsProps;\n cover?: ReactNode;\n footer?: ReactNode;\n loading?: boolean;\n bordered?: boolean;\n /** Visual selection only; use explicit buttons or selection controls for interaction. */\n selected?: boolean;\n /** `layered` separates the content surface from the heading and footer on a muted canvas. */\n variant?: 'default' | 'layered';\n /** Card spacing, heading typography and height, and the default size of embedded tabs. */\n size?: 'sm' | 'md' | 'lg';\n}\nexport function Card(rawProps: CardProps) {\n const {\n title,\n description,\n extra,\n tabs,\n cover,\n footer,\n loading = false,\n bordered = true,\n selected = false,\n variant = 'default',\n size = 'md',\n children,\n className,\n ...props\n } = useComponentProps('Card', rawProps);\n const body = useRef<HTMLDivElement>(null);\n useContentTransition(body, loading ? 'loading' : 'content');\n const hasTabs = Boolean(tabs?.items.length);\n const layered = variant === 'layered';\n const visibleDescription = layered ? undefined : description;\n const hasHeading = title != null || visibleDescription != null;\n const footerContent = footer != null && <div className=\"leaf-card__footer\">{footer}</div>;\n const tabExtra =\n !hasHeading && extra != null ? (\n <div className=\"leaf-card__tab-extra\">\n {tabs?.extra}\n {extra}\n </div>\n ) : (\n tabs?.extra\n );\n const content = (\n <>\n {cover != null && <div className=\"leaf-card__cover\">{cover}</div>}\n {hasTabs && tabs && (\n <Tabs\n {...tabs}\n type=\"line\"\n placement=\"top\"\n size={tabs.size ?? size}\n aria-label={tabs['aria-label'] ?? (typeof title === 'string' ? title : undefined)}\n extra={tabExtra}\n className={classes('leaf-card__tabs', tabs.className)}\n items={tabs.items.map((item) => ({\n ...item,\n children: <Skeleton loading={loading}>{item.children}</Skeleton>,\n }))}\n onReorder={\n tabs.onReorder &&\n ((items) => {\n const originals = new Map(tabs.items.map((item) => [item.key, item]));\n tabs.onReorder?.(items.map((item) => originals.get(item.key) ?? item));\n })\n }\n />\n )}\n {(!hasTabs || children != null) && (\n <div className=\"leaf-card__body\" ref={body}>\n <Skeleton loading={loading}>{children}</Skeleton>\n </div>\n )}\n {!layered && footerContent}\n </>\n );\n return (\n <div\n {...props}\n aria-busy={loading || undefined}\n className={classes(\n 'leaf-card',\n `leaf-card--${size}`,\n bordered && 'leaf-card--bordered',\n selected && 'leaf-card--selected',\n layered && 'leaf-card--layered',\n hasHeading && 'leaf-card--headed',\n hasTabs && 'leaf-card--tabbed',\n className,\n )}\n >\n {(hasHeading || (!hasTabs && extra != null)) && (\n <div className=\"leaf-card__header\">\n {hasHeading && (\n <div className=\"leaf-card__heading\">\n {title != null && (\n <CardTitleControl size={size} className=\"leaf-card__title\">\n {title}\n </CardTitleControl>\n )}\n {visibleDescription != null && (\n <div className=\"leaf-card__description\">{visibleDescription}</div>\n )}\n </div>\n )}\n {extra != null && <div className=\"leaf-card__extra\">{extra}</div>}\n </div>\n )}\n <div className=\"leaf-card__panel\">{content}</div>\n {layered && footerContent}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","Card","rawProps","title","description","extra","tabs","cover","footer","loading","bordered","selected","variant","size","children","className","props","useComponentProps","body","useRef","useContentTransition","hasTabs","Boolean","layered","visibleDescription","undefined","hasHeading","footerContent","tabExtra","content","Tabs","classes","item","Skeleton","items","originals","Map","CardTitleControl"],"mappings":";;;;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;;ACwBO,SAASI,KAAKC,QAAmB;IACtC,MAAM,EACJC,KAAK,EACLC,W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AC;gBAAI,WAAU;0BAAoBwB;;YAClCN,WAAWI;;;AAGlB"}
1
+ {"version":3,"file":"card/card.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/card/card.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { type HTMLAttributes, type ReactNode, useRef } from 'react';\nimport { useComponentProps } from '../config-provider/component-defaults';\nimport { classes } from '../shared/classes';\nimport { useContentTransition } from '../shared/presence';\nimport { SkeletonControl as Skeleton } from '../skeleton/skeleton';\nimport type { TabsProps } from '../tabs';\nimport { TabsControl as Tabs } from '../tabs/tabs';\nimport { CardTitleControl } from './title';\n\n/** Tabs controls integrated with the card; Card fixes the line type and top placement. */\nexport interface CardTabsProps extends Omit<TabsProps, 'type' | 'placement' | 'children'> {}\n\nexport interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n title?: ReactNode;\n /** Supporting text for the default appearance; not displayed by layered cards. */\n description?: ReactNode;\n extra?: ReactNode;\n /** Tabs replace the heading when no title is supplied, otherwise sit below it. */\n tabs?: CardTabsProps;\n cover?: ReactNode;\n footer?: ReactNode;\n loading?: boolean;\n bordered?: boolean;\n /** Show the card's resting shadow; layered cards apply this to the inner content surface. */\n shadow?: boolean;\n /** Visual selection only; use explicit buttons or selection controls for interaction. */\n selected?: boolean;\n /** `layered` separates the content surface from the heading and footer on a muted canvas. */\n variant?: 'default' | 'layered';\n /** Card spacing, heading typography and height, and the default size of embedded tabs. */\n size?: 'sm' | 'md' | 'lg';\n}\nexport function Card(rawProps: CardProps) {\n const {\n title,\n description,\n extra,\n tabs,\n cover,\n footer,\n loading = false,\n bordered = true,\n shadow = true,\n selected = false,\n variant = 'default',\n size = 'md',\n children,\n className,\n ...props\n } = useComponentProps('Card', rawProps);\n const body = useRef<HTMLDivElement>(null);\n useContentTransition(body, loading ? 'loading' : 'content');\n const hasTabs = Boolean(tabs?.items.length);\n const layered = variant === 'layered';\n const visibleDescription = layered ? undefined : description;\n const hasHeading = title != null || visibleDescription != null;\n // A cover can be the complete content region; do not leave an empty body gap before the footer.\n const hasBody = children != null || (!hasTabs && (loading || cover == null));\n const footerContent = footer != null && <div className=\"leaf-card__footer\">{footer}</div>;\n const tabExtra =\n !hasHeading && extra != null ? (\n <div className=\"leaf-card__tab-extra\">\n {tabs?.extra}\n {extra}\n </div>\n ) : (\n tabs?.extra\n );\n const content = (\n <>\n {cover != null && <div className=\"leaf-card__cover\">{cover}</div>}\n {hasTabs && tabs && (\n <Tabs\n {...tabs}\n type=\"line\"\n placement=\"top\"\n size={tabs.size ?? size}\n aria-label={tabs['aria-label'] ?? (typeof title === 'string' ? title : undefined)}\n extra={tabExtra}\n className={classes('leaf-card__tabs', tabs.className)}\n items={tabs.items.map((item) => ({\n ...item,\n children: <Skeleton loading={loading}>{item.children}</Skeleton>,\n }))}\n onReorder={\n tabs.onReorder &&\n ((items) => {\n const originals = new Map(tabs.items.map((item) => [item.key, item]));\n tabs.onReorder?.(items.map((item) => originals.get(item.key) ?? item));\n })\n }\n />\n )}\n {hasBody && (\n <div className=\"leaf-card__body\" ref={body}>\n <Skeleton loading={loading}>{children}</Skeleton>\n </div>\n )}\n {!layered && footerContent}\n </>\n );\n return (\n <div\n {...props}\n aria-busy={loading || undefined}\n className={classes(\n 'leaf-card',\n `leaf-card--${size}`,\n bordered && 'leaf-card--bordered',\n !shadow && 'leaf-card--shadowless',\n selected && 'leaf-card--selected',\n layered && 'leaf-card--layered',\n hasHeading && 'leaf-card--headed',\n hasTabs && 'leaf-card--tabbed',\n className,\n )}\n >\n {(hasHeading || (!hasTabs && extra != null)) && (\n <div className=\"leaf-card__header\">\n {hasHeading && (\n <div className=\"leaf-card__heading\">\n {title != null && (\n <CardTitleControl size={size} className=\"leaf-card__title\">\n {title}\n </CardTitleControl>\n )}\n {visibleDescription != null && (\n <div className=\"leaf-card__description\">{visibleDescription}</div>\n )}\n </div>\n )}\n {extra != null && <div className=\"leaf-card__extra\">{extra}</div>}\n </div>\n )}\n <div className=\"leaf-card__panel\">{content}</div>\n {layered && footerContent}\n </div>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","Card","rawProps","title","description","extra","tabs","cover","footer","loading","bordered","shadow","selected","variant","size","children","className","props","useComponentProps","body","useRef","useContentTransition","hasTabs","Boolean","layered","visibleDescription","undefined","hasHeading","hasBody","footerContent","tabExtra","content","Tabs","classes","item","Skeleton","items","originals","Map","CardTitleControl"],"mappings":";;;;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,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,AAAS,QAATA,KAAY,KACvC,AADwC,cACxC,sCAAC;gBAAI,WAAU;;oBACZsB,cACC,AADa,WAAdA,GACC,sCAAC;wBAAI,WAAU;;4BACH,QAATxB,SACC,AADgB,WAAR,GACR,qCAACoC,mCAAAA,gBAAgBA,EAAAA;gCAAC,MAAMzB;gCAAM,WAAU;0CACrCX;;4BAGkB,QAAtBsB,sBACC,AAD6B,WAAR,GACrB,qCAAC;gCAAI,WAAU;0CAA0BA;;;;oBAIrC,QAATpB,SAAiB,WAAR,GAAQ,qCAAC;wBAAI,WAAU;kCAAoBA;;;;0BAGzD,qCAAC;gBAAI,WAAU;0BAAoB0B;;YAClCP,WAAWK;;;AAGlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"config-provider/component-defaults.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/config-provider/component-defaults.ts"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { HTMLAttributes } from 'react';\nimport { createContext, useContext } from 'react';\nimport type { AlertProps } from '../alert/alert';\nimport type { AffixProps, AnchorProps } from '../anchor/anchor';\nimport type { AutoCompleteProps } from '../autocomplete/autocomplete';\nimport type { AvatarProps } from '../avatar/avatar';\nimport type { AvatarGroupProps } from '../avatar/group';\nimport type { BackTopProps } from '../backtop/backtop';\nimport type { BadgeProps } from '../badge/badge';\nimport type { BreadcrumbProps } from '../breadcrumb/breadcrumb';\nimport type { ButtonProps } from '../button/button';\nimport type { ButtonGroupProps, SplitButtonProps } from '../button/group';\nimport type { CalendarProps } from '../calendar/calendar';\nimport type { CardProps } from '../card/card';\nimport type { CardTitleProps } from '../card/title';\nimport type { CarouselProps } from '../carousel/carousel';\nimport type { CascaderProps } from '../cascader/cascader';\nimport type { CheckboxProps } from '../checkbox/checkbox';\nimport type { CheckboxGroupProps } from '../checkbox/group';\nimport type { CollapseProps } from '../collapse/collapse';\nimport type { ColorPickerProps } from '../colorpicker/colorpicker';\nimport type { ConfirmOptions } from '../confirm/confirm';\nimport type { DatePickerProps } from '../datepicker/datepicker';\nimport type { DateRangePickerProps } from '../daterangepicker/daterangepicker';\nimport type { DescriptionsProps } from '../descriptions/descriptions';\nimport type { DividerProps } from '../divider/divider';\nimport type { DrawerProps } from '../drawer/drawer';\nimport type { DropdownProps } from '../dropdown/dropdown';\nimport type { EmptyProps } from '../empty/empty';\nimport type { ErrorBoundaryProps } from '../errorboundary/errorboundary';\nimport type { FileListProps } from '../filelist/filelist';\nimport type { FlexProps } from '../flex/flex';\nimport type { FloatButtonGroupProps, FloatButtonProps } from '../floatbutton/floatbutton';\nimport type {\n FormErrorSummaryProps,\n FormFieldProps,\n FormGroupProps,\n FormProps,\n} from '../form/form';\nimport type { FormListProps } from '../form/list';\nimport type { ColProps, GridProps, RowProps } from '../grid/grid';\nimport type { ImagePreviewGroupProps, ImagePreviewProps, ImageProps } from '../image/image';\nimport type { InfiniteScrollProps } from '../infinitescroll/infinitescroll';\nimport type { InputGroupProps, InputSearchProps } from '../input/group';\nimport type { InputProps } from '../input/input';\nimport type { InputMaskProps } from '../inputmask/inputmask';\nimport type { InputNumberProps } from '../inputnumber/inputnumber';\nimport type { InputOTPProps } from '../inputotp/inputotp';\nimport type { LayoutProps, LayoutSiderProps } from '../layout/layout';\nimport type { LoadingProps } from '../loading/loading';\nimport type { LoadingBarProps } from '../loadingbar/loadingbar';\nimport type { MasonryProps } from '../masonry/masonry';\nimport type { MentionsProps } from '../mentions/mentions';\nimport type { MenuGroupProps, MenuProps } from '../menu/menu';\nimport type { MessageOptions, MessageProps } from '../message/message';\nimport type { ModalProps } from '../modal/modal';\nimport type { NotificationOptions, NotificationProps } from '../notification/notification';\nimport type { PaginationProps } from '../pagination/pagination';\nimport type { PopconfirmProps } from '../popconfirm/popconfirm';\nimport type { PopoverProps } from '../popover/popover';\nimport type { ProgressProps } from '../progress/progress';\nimport type { QRCodeProps } from '../qrcode/qrcode';\nimport type { RadioGroupProps, RadioProps } from '../radio/radio';\nimport type { RateProps } from '../rate/rate';\nimport type { ResultProps } from '../result/result';\nimport type { ScrollAreaProps } from '../scrollarea/scrollarea';\nimport type { ScrollbarProps } from '../scrollbar/scrollbar';\nimport type { SelectProps } from '../select/select';\nimport type { SkeletonProps } from '../skeleton/skeleton';\nimport type { SliderProps } from '../slider/slider';\nimport type { SpaceProps } from '../space/space';\nimport type { SplitterProps } from '../splitter/splitter';\nimport type { CountdownProps, StatisticProps } from '../statistic/statistic';\nimport type { StepsProps } from '../steps/steps';\nimport type { SwitchProps } from '../switch/switch';\nimport type {\n DataTableColumnVisibilityProps,\n DataTableContentProps,\n DataTablePaginationProps,\n DataTablePresentationProps,\n DataTableSearchProps,\n} from '../tabletanstack/defaults';\nimport type { TabsProps } from '../tabs/tabs';\nimport type { CheckableTagProps, TagGroupProps } from '../tag/group';\nimport type { TagProps } from '../tag/tag';\nimport type { TextareaProps } from '../textarea/textarea';\nimport type { TimelineProps } from '../timeline/timeline';\nimport type { TooltipProps } from '../tooltip/tooltip';\nimport type { TourProps } from '../tour/tour';\nimport type { TransferProps } from '../transfer/transfer';\nimport type { TreeProps } from '../tree/tree';\nimport type { TreeSelectProps } from '../treeselect/treeselect';\nimport type {\n LinkProps,\n ParagraphProps,\n TextProps,\n TitleProps,\n TypographyProps,\n} from '../typography/typography';\nimport type { UploadProps } from '../upload/upload';\nimport type { VirtualListProps } from '../virtuallist/virtuallist';\n\n/** Only props independent of the caller's item type can cross a generic component boundary. */\ntype GenericComponentName = 'FormList' | 'VirtualList' | 'DataTable';\n\n/** Full public props keep each hook key tied to its component, including Select's union. */\ninterface ComponentPropsMap {\n Affix: AffixProps;\n Alert: AlertProps;\n Anchor: AnchorProps;\n AutoComplete: AutoCompleteProps;\n Avatar: AvatarProps;\n AvatarGroup: AvatarGroupProps;\n BackTop: BackTopProps;\n Badge: BadgeProps;\n Breadcrumb: BreadcrumbProps;\n Button: ButtonProps;\n ButtonGroup: ButtonGroupProps;\n Calendar: CalendarProps;\n Card: CardProps;\n CardTitle: CardTitleProps;\n Carousel: CarouselProps;\n Cascader: CascaderProps;\n CheckableTag: CheckableTagProps;\n Checkbox: CheckboxProps;\n CheckboxGroup: CheckboxGroupProps;\n Col: ColProps;\n Collapse: CollapseProps;\n ColorPicker: ColorPickerProps;\n Confirm: ConfirmOptions;\n Countdown: CountdownProps;\n DataTableColumnVisibility: DataTableColumnVisibilityProps;\n DataTableContent: DataTableContentProps;\n DataTableFooter: HTMLAttributes<HTMLDivElement>;\n DataTablePagination: DataTablePaginationProps;\n DataTableSearch: DataTableSearchProps;\n DataTableToolbar: HTMLAttributes<HTMLDivElement>;\n DatePicker: DatePickerProps;\n DateRangePicker: DateRangePickerProps;\n Descriptions: DescriptionsProps;\n Divider: DividerProps;\n Drawer: DrawerProps;\n Dropdown: DropdownProps;\n Empty: EmptyProps;\n ErrorBoundary: ErrorBoundaryProps;\n FileList: FileListProps;\n Flex: FlexProps;\n FloatButton: FloatButtonProps;\n FloatButtonGroup: FloatButtonGroupProps;\n Form: FormProps;\n FormErrorSummary: FormErrorSummaryProps;\n FormField: FormFieldProps;\n FormGroup: FormGroupProps;\n Grid: GridProps;\n Image: ImageProps;\n ImagePreview: ImagePreviewProps;\n ImagePreviewGroup: ImagePreviewGroupProps;\n InfiniteScroll: InfiniteScrollProps;\n Input: InputProps;\n InputGroup: InputGroupProps;\n InputMask: InputMaskProps;\n InputNumber: InputNumberProps;\n InputOTP: InputOTPProps;\n InputSearch: InputSearchProps;\n Layout: LayoutProps;\n LayoutContent: HTMLAttributes<HTMLElement>;\n LayoutFooter: HTMLAttributes<HTMLElement>;\n LayoutHeader: HTMLAttributes<HTMLElement>;\n LayoutSider: LayoutSiderProps;\n Link: LinkProps;\n Loading: LoadingProps;\n LoadingBar: LoadingBarProps;\n Masonry: MasonryProps;\n Mentions: MentionsProps;\n Menu: MenuProps;\n MenuGroup: MenuGroupProps;\n Message: MessageProps;\n Modal: ModalProps;\n Notification: NotificationProps;\n Pagination: PaginationProps;\n Paragraph: ParagraphProps;\n Popconfirm: PopconfirmProps;\n Popover: PopoverProps;\n Progress: ProgressProps;\n QRCode: QRCodeProps;\n Radio: RadioProps;\n RadioGroup: RadioGroupProps;\n Rate: RateProps;\n Result: ResultProps;\n Row: RowProps;\n ScrollArea: ScrollAreaProps;\n Scrollbar: ScrollbarProps;\n Select: SelectProps;\n Skeleton: SkeletonProps;\n Slider: SliderProps;\n Space: SpaceProps;\n SplitButton: SplitButtonProps;\n Splitter: SplitterProps;\n Statistic: StatisticProps;\n Steps: StepsProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n Tag: TagProps;\n TagGroup: TagGroupProps;\n Text: TextProps;\n Textarea: TextareaProps;\n Timeline: TimelineProps;\n Title: TitleProps;\n Tooltip: TooltipProps;\n Tour: TourProps;\n Transfer: TransferProps;\n Tree: TreeProps;\n TreeSelect: TreeSelectProps;\n Typography: TypographyProps;\n Upload: UploadProps;\n}\n\n/** Default props for supported components; null clears that component's inherited defaults. */\nexport interface LeafComponentDefaults {\n Affix?: Partial<Omit<AffixProps, 'key' | 'ref'>> | null;\n Alert?: Partial<Omit<AlertProps, 'key' | 'ref' | 'title'>> | null;\n Anchor?: Partial<Omit<AnchorProps, 'key' | 'ref' | 'items'>> | null;\n AutoComplete?: Partial<Omit<AutoCompleteProps, 'key' | 'ref' | 'options'>> | null;\n Avatar?: Partial<Omit<AvatarProps, 'key' | 'ref'>> | null;\n AvatarGroup?: Partial<Omit<AvatarGroupProps, 'key' | 'ref'>> | null;\n BackTop?: Partial<Omit<BackTopProps, 'key' | 'ref'>> | null;\n Badge?: Partial<Omit<BadgeProps, 'key' | 'ref'>> | null;\n Breadcrumb?: Partial<Omit<BreadcrumbProps, 'key' | 'ref' | 'items'>> | null;\n Button?: Partial<Omit<ButtonProps, 'key' | 'ref'>> | null;\n ButtonGroup?: Partial<Omit<ButtonGroupProps, 'key' | 'ref'>> | null;\n Calendar?: Partial<Omit<CalendarProps, 'key' | 'ref'>> | null;\n Card?: Partial<Omit<CardProps, 'key' | 'ref'>> | null;\n CardTitle?: Partial<Omit<CardTitleProps, 'key' | 'ref'>> | null;\n Carousel?: Partial<Omit<CarouselProps, 'key' | 'ref'>> | null;\n Cascader?: Partial<\n Omit<\n CascaderProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n CheckableTag?: Partial<Omit<CheckableTagProps, 'key' | 'ref'>> | null;\n Checkbox?: Partial<Omit<CheckboxProps, 'key' | 'ref'>> | null;\n CheckboxGroup?: Partial<Omit<CheckboxGroupProps, 'key' | 'ref' | 'options'>> | null;\n Col?: Partial<Omit<ColProps, 'key' | 'ref'>> | null;\n Collapse?: Partial<Omit<CollapseProps, 'key' | 'ref' | 'items'>> | null;\n ColorPicker?: Partial<Omit<ColorPickerProps, 'key' | 'ref'>> | null;\n Confirm?: Partial<Omit<ConfirmOptions, 'key' | 'ref'>> | null;\n Countdown?: Partial<Omit<CountdownProps, 'key' | 'ref' | 'value'>> | null;\n DataTable?: Partial<Omit<DataTablePresentationProps, 'tableRef'>> | null;\n DataTableColumnVisibility?: Partial<Omit<DataTableColumnVisibilityProps, 'key' | 'ref'>> | null;\n DataTableContent?: Partial<Omit<DataTableContentProps, 'key' | 'ref'>> | null;\n DataTableFooter?: Partial<Omit<HTMLAttributes<HTMLDivElement>, 'key' | 'ref'>> | null;\n DataTablePagination?: Partial<Omit<DataTablePaginationProps, 'key' | 'ref'>> | null;\n DataTableSearch?: Partial<Omit<DataTableSearchProps, 'key' | 'ref'>> | null;\n DataTableToolbar?: Partial<Omit<HTMLAttributes<HTMLDivElement>, 'key' | 'ref'>> | null;\n DatePicker?: Partial<\n Omit<DatePickerProps, 'key' | 'ref' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n DateRangePicker?: Partial<Omit<DateRangePickerProps, 'key' | 'ref'>> | null;\n Descriptions?: Partial<Omit<DescriptionsProps, 'key' | 'ref' | 'items'>> | null;\n Divider?: Partial<Omit<DividerProps, 'key' | 'ref'>> | null;\n Drawer?: Partial<Omit<DrawerProps, 'key' | 'ref' | 'open'>> | null;\n Dropdown?: Partial<Omit<DropdownProps, 'key' | 'ref' | 'items' | 'children'>> | null;\n Empty?: Partial<Omit<EmptyProps, 'key' | 'ref'>> | null;\n ErrorBoundary?: Partial<Omit<ErrorBoundaryProps, 'key' | 'ref'>> | null;\n FileList?: Partial<Omit<FileListProps, 'key' | 'ref' | 'items'>> | null;\n Flex?: Partial<Omit<FlexProps, 'key' | 'ref'>> | null;\n FloatButton?: Partial<Omit<FloatButtonProps, 'key' | 'ref'>> | null;\n FloatButtonGroup?: Partial<Omit<FloatButtonGroupProps, 'key' | 'ref' | 'actions'>> | null;\n Form?: Partial<Omit<FormProps, 'key' | 'ref'>> | null;\n FormErrorSummary?: Partial<Omit<FormErrorSummaryProps, 'key' | 'ref'>> | null;\n FormField?: Partial<Omit<FormFieldProps, 'key' | 'ref'>> | null;\n FormGroup?: Partial<Omit<FormGroupProps, 'key' | 'ref'>> | null;\n FormList?: Partial<\n Omit<\n FormListProps<unknown>,\n 'name' | 'children' | 'value' | 'defaultValue' | 'onChange' | 'itemKey'\n >\n > | null;\n Grid?: Partial<Omit<GridProps, 'key' | 'ref'>> | null;\n Image?: Partial<Omit<ImageProps, 'key' | 'ref'>> | null;\n ImagePreview?: Partial<\n Omit<ImagePreviewProps, 'key' | 'ref' | 'items' | 'open' | 'onClose'>\n > | null;\n ImagePreviewGroup?: Partial<Omit<ImagePreviewGroupProps, 'key' | 'ref'>> | null;\n InfiniteScroll?: Partial<\n Omit<InfiniteScrollProps, 'key' | 'ref' | 'dataLength' | 'hasMore' | 'onLoadMore'>\n > | null;\n Input?: Partial<Omit<InputProps, 'key' | 'ref'>> | null;\n InputGroup?: Partial<Omit<InputGroupProps, 'key' | 'ref'>> | null;\n InputMask?: Partial<Omit<InputMaskProps, 'key' | 'ref' | 'mask'>> | null;\n InputNumber?: Partial<\n Omit<\n InputNumberProps,\n 'key' | 'ref' | 'stringMode' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'\n >\n > | null;\n InputOTP?: Partial<Omit<InputOTPProps, 'key' | 'ref'>> | null;\n InputSearch?: Partial<Omit<InputSearchProps, 'key' | 'ref'>> | null;\n Layout?: Partial<Omit<LayoutProps, 'key' | 'ref'>> | null;\n LayoutContent?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutFooter?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutHeader?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutSider?: Partial<Omit<LayoutSiderProps, 'key' | 'ref'>> | null;\n Link?: Partial<Omit<LinkProps, 'key' | 'ref'>> | null;\n Loading?: Partial<Omit<LoadingProps, 'key' | 'ref'>> | null;\n LoadingBar?: Partial<Omit<LoadingBarProps, 'key' | 'ref' | 'active' | 'progress'>> | null;\n Masonry?: Partial<Omit<MasonryProps, 'key' | 'ref'>> | null;\n Mentions?: Partial<Omit<MentionsProps, 'key' | 'ref' | 'options'>> | null;\n Menu?: Partial<Omit<MenuProps, 'key' | 'ref' | 'items'>> | null;\n MenuGroup?: Partial<Omit<MenuGroupProps, 'key' | 'ref' | 'title'>> | null;\n Message?: Partial<Omit<MessageOptions, 'key' | 'content'>> | null;\n Modal?: Partial<Omit<ModalProps, 'key' | 'ref' | 'open'>> | null;\n Notification?: Partial<Omit<NotificationOptions, 'key' | 'title'>> | null;\n Pagination?: Partial<Omit<PaginationProps, 'key' | 'ref' | 'total'>> | null;\n Paragraph?: Partial<Omit<ParagraphProps, 'key' | 'ref'>> | null;\n Popconfirm?: Partial<Omit<PopconfirmProps, 'key' | 'ref' | 'children' | 'title'>> | null;\n Popover?: Partial<Omit<PopoverProps, 'key' | 'ref' | 'children' | 'content'>> | null;\n Progress?: Partial<Omit<ProgressProps, 'key' | 'ref'>> | null;\n QRCode?: Partial<Omit<QRCodeProps, 'key' | 'ref' | 'value'>> | null;\n Radio?: Partial<Omit<RadioProps, 'key' | 'ref'>> | null;\n RadioGroup?: Partial<Omit<RadioGroupProps, 'key' | 'ref' | 'options'>> | null;\n Rate?: Partial<Omit<RateProps, 'key' | 'ref'>> | null;\n Result?: Partial<Omit<ResultProps, 'key' | 'ref'>> | null;\n Row?: Partial<Omit<RowProps, 'key' | 'ref'>> | null;\n ScrollArea?: Partial<Omit<ScrollAreaProps, 'key' | 'ref'>> | null;\n Scrollbar?: Partial<Omit<ScrollbarProps, 'key' | 'ref'>> | null;\n /** Required data, mode-dependent values and callbacks belong on each Select. */\n Select?: Partial<\n Omit<\n SelectProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n Skeleton?: Partial<Omit<SkeletonProps, 'key' | 'ref'>> | null;\n Slider?: Partial<\n Omit<SliderProps, 'key' | 'ref' | 'range' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n Space?: Partial<Omit<SpaceProps, 'key' | 'ref'>> | null;\n SplitButton?: Partial<Omit<SplitButtonProps, 'key' | 'ref' | 'items'>> | null;\n Splitter?: Partial<Omit<SplitterProps, 'key' | 'ref' | 'panels'>> | null;\n Statistic?: Partial<Omit<StatisticProps, 'key' | 'ref' | 'value'>> | null;\n Steps?: Partial<Omit<StepsProps, 'key' | 'ref' | 'items'>> | null;\n Switch?: Partial<Omit<SwitchProps, 'key' | 'ref'>> | null;\n Tabs?: Partial<Omit<TabsProps, 'key' | 'ref' | 'items'>> | null;\n Tag?: Partial<Omit<TagProps, 'key' | 'ref'>> | null;\n TagGroup?: Partial<Omit<TagGroupProps, 'key' | 'ref' | 'options'>> | null;\n Text?: Partial<Omit<TextProps, 'key' | 'ref'>> | null;\n Textarea?: Partial<Omit<TextareaProps, 'key' | 'ref'>> | null;\n Timeline?: Partial<Omit<TimelineProps, 'key' | 'ref' | 'items'>> | null;\n Title?: Partial<Omit<TitleProps, 'key' | 'ref'>> | null;\n Tooltip?: Partial<Omit<TooltipProps, 'key' | 'ref' | 'content' | 'children'>> | null;\n Tour?: Partial<Omit<TourProps, 'key' | 'ref' | 'open' | 'steps'>> | null;\n Transfer?: Partial<Omit<TransferProps, 'key' | 'ref' | 'items'>> | null;\n Tree?: Partial<Omit<TreeProps, 'key' | 'ref' | 'data'>> | null;\n TreeSelect?: Partial<\n Omit<\n TreeSelectProps,\n | 'key'\n | 'ref'\n | 'options'\n | 'multiple'\n | 'treeCheckable'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >\n > | null;\n Typography?: Partial<Omit<TypographyProps, 'key' | 'ref'>> | null;\n Upload?: Partial<Omit<UploadProps, 'key' | 'ref'>> | null;\n VirtualList?:\n | (Partial<\n Omit<VirtualListProps<unknown>, 'items' | 'itemKey' | 'renderItem' | 'estimateSize'>\n > & { estimateSize?: number })\n | null;\n}\n\nexport const ComponentDefaultsContext = createContext<LeafComponentDefaults>({});\n\n/** Supplement missing props without copying unless a defined default is used. */\nexport function mergeComponentProps<Props extends object>(\n defaults: Partial<Props> | null | undefined,\n props: Props,\n): Props {\n if (!defaults) return props;\n let resolved = props;\n for (const key of Object.keys(defaults) as (keyof Props)[]) {\n const value = defaults[key];\n if (value !== undefined && props[key] === undefined) {\n if (resolved === props) resolved = { ...props };\n resolved[key] = value as Props[typeof key];\n }\n }\n return resolved;\n}\n\n/** Merge scopes by component and prop; nested prop values are replaced as a whole. */\nexport function mergeComponentDefaults(\n parent: LeafComponentDefaults,\n overrides: LeafComponentDefaults | undefined,\n): LeafComponentDefaults {\n if (!overrides) return parent;\n let merged = parent;\n for (const name of Object.keys(overrides) as (keyof LeafComponentDefaults)[]) {\n const incoming = overrides[name];\n if (incoming === undefined) continue;\n const inherited = parent[name] ?? undefined;\n if (incoming === null) {\n if (inherited == null) continue;\n if (merged === parent) merged = { ...parent };\n delete merged[name];\n continue;\n }\n let entry = inherited;\n for (const key of Object.keys(incoming)) {\n const value = (incoming as Record<string, unknown>)[key];\n if (\n value === undefined ||\n value === (inherited as Record<string, unknown> | undefined)?.[key]\n )\n continue;\n if (entry === inherited) entry = { ...inherited };\n (entry as Record<string, unknown>)[key] = value;\n }\n if (entry !== inherited) {\n if (merged === parent) merged = { ...parent };\n // Each entry remains the same component's props; only the dynamic key loses that relation.\n (merged as Record<string, object | undefined>)[name] = entry;\n }\n }\n return merged;\n}\n\nexport function useComponentProps<Name extends keyof ComponentPropsMap>(\n name: Name,\n props: ComponentPropsMap[Name],\n): ComponentPropsMap[Name] {\n const defaults = useContext(ComponentDefaultsContext)[name];\n return mergeComponentProps(\n defaults as Partial<ComponentPropsMap[Name]> | null | undefined,\n props,\n );\n}\n\n/** Generic owners merge this type-independent projection into their own complete props. */\nexport function useGenericComponentDefaults<Name extends GenericComponentName>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n\n/** Read defaults for an API request without invoking hooks from the request callback. */\nexport function useComponentDefaults<Name extends keyof LeafComponentDefaults>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","ComponentDefaultsContext","createContext","mergeComponentProps","defaults","props","resolved","value","undefined","mergeComponentDefaults","parent","overrides","merged","name","incoming","inherited","entry","useComponentProps","useContext","useGenericComponentDefaults","useCompon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webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/config-provider/component-defaults.ts"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { HTMLAttributes } from 'react';\nimport { createContext, useContext } from 'react';\nimport type { AlertProps } from '../alert/alert';\nimport type { AffixProps, AnchorProps } from '../anchor/anchor';\nimport type { AutoCompleteProps } from '../autocomplete/autocomplete';\nimport type { AvatarProps } from '../avatar/avatar';\nimport type { AvatarGroupProps } from '../avatar/group';\nimport type { BackTopProps } from '../backtop/backtop';\nimport type { BadgeProps } from '../badge/badge';\nimport type { BreadcrumbProps } from '../breadcrumb/breadcrumb';\nimport type { ButtonProps } from '../button/button';\nimport type { ButtonGroupProps, SplitButtonProps } from '../button/group';\nimport type { CalendarProps } from '../calendar/calendar';\nimport type { CardProps } from '../card/card';\nimport type { CardTitleProps } from '../card/title';\nimport type { CarouselProps } from '../carousel/carousel';\nimport type { CascaderProps } from '../cascader/cascader';\nimport type { CheckboxProps } from '../checkbox/checkbox';\nimport type { CheckboxGroupProps } from '../checkbox/group';\nimport type { CollapseProps } from '../collapse/collapse';\nimport type { ColorPickerProps } from '../colorpicker/colorpicker';\nimport type { ConfirmOptions } from '../confirm/confirm';\nimport type { DatePickerProps } from '../datepicker/datepicker';\nimport type { DateRangePickerProps } from '../daterangepicker/daterangepicker';\nimport type { DescriptionsProps } from '../descriptions/descriptions';\nimport type { DividerProps } from '../divider/divider';\nimport type { DrawerProps } from '../drawer/drawer';\nimport type { DropdownProps } from '../dropdown/dropdown';\nimport type { EmptyProps } from '../empty/empty';\nimport type { ErrorBoundaryProps } from '../errorboundary/errorboundary';\nimport type { FileListProps } from '../filelist/filelist';\nimport type { FlexProps } from '../flex/flex';\nimport type { FloatButtonGroupProps, FloatButtonProps } from '../floatbutton/floatbutton';\nimport type {\n FormErrorSummaryProps,\n FormFieldProps,\n FormGroupProps,\n FormProps,\n} from '../form/form';\nimport type { FormListProps } from '../form/list';\nimport type { ColProps, GridProps, RowProps } from '../grid/grid';\nimport type { ImagePreviewOptions } from '../image/types';\nimport type { InfiniteScrollProps } from '../infinitescroll/infinitescroll';\nimport type { InputGroupProps, InputSearchProps } from '../input/group';\nimport type { InputProps } from '../input/input';\nimport type { InputMaskProps } from '../inputmask/inputmask';\nimport type { InputNumberProps } from '../inputnumber/inputnumber';\nimport type { InputOTPProps } from '../inputotp/inputotp';\nimport type { LayoutProps, LayoutSiderProps } from '../layout/layout';\nimport type { LoadingProps } from '../loading/loading';\nimport type { LoadingBarProps } from '../loadingbar/loadingbar';\nimport type { MasonryProps } from '../masonry/masonry';\nimport type { MentionsProps } from '../mentions/mentions';\nimport type { MenuGroupProps, MenuProps } from '../menu/menu';\nimport type { MessageOptions, MessageProps } from '../message/message';\nimport type { ModalProps } from '../modal/modal';\nimport type { NotificationOptions, NotificationProps } from '../notification/notification';\nimport type { PaginationProps } from '../pagination/pagination';\nimport type { PopconfirmProps } from '../popconfirm/popconfirm';\nimport type { PopoverProps } from '../popover/popover';\nimport type { ProgressProps } from '../progress/progress';\nimport type { QRCodeProps } from '../qrcode/qrcode';\nimport type { RadioGroupProps, RadioProps } from '../radio/radio';\nimport type { RateProps } from '../rate/rate';\nimport type { ResultProps } from '../result/result';\nimport type { ScrollAreaProps } from '../scrollarea/scrollarea';\nimport type { ScrollbarProps } from '../scrollbar/scrollbar';\nimport type { SelectProps } from '../select/select';\nimport type { SkeletonProps } from '../skeleton/skeleton';\nimport type { SliderProps } from '../slider/slider';\nimport type { SpaceProps } from '../space/space';\nimport type { SplitterProps } from '../splitter/splitter';\nimport type { CountdownProps, StatisticProps } from '../statistic/statistic';\nimport type { StepsProps } from '../steps/steps';\nimport type { SwitchProps } from '../switch/switch';\nimport type { DataTablePresentationProps } from '../tabletanstack/defaults';\nimport type { TabsProps } from '../tabs/tabs';\nimport type { CheckableTagProps, TagGroupProps } from '../tag/group';\nimport type { TagProps } from '../tag/tag';\nimport type { TextareaProps } from '../textarea/textarea';\nimport type { TimelineProps } from '../timeline/timeline';\nimport type { TooltipProps } from '../tooltip/tooltip';\nimport type { TourProps } from '../tour/tour';\nimport type { TransferProps } from '../transfer/transfer';\nimport type { TreeProps } from '../tree/tree';\nimport type { TreeSelectProps } from '../treeselect/treeselect';\nimport type {\n LinkProps,\n ParagraphProps,\n TextProps,\n TitleProps,\n TypographyProps,\n} from '../typography/typography';\nimport type { UploadProps } from '../upload/upload';\nimport type { VirtualListProps } from '../virtuallist/virtuallist';\n\n/** Only props independent of the caller's item type can cross a generic component boundary. */\ntype GenericComponentName = 'FormList' | 'VirtualList' | 'DataTable';\n\n/** Full public props keep each hook key tied to its component, including Select's union. */\ninterface ComponentPropsMap {\n Affix: AffixProps;\n Alert: AlertProps;\n Anchor: AnchorProps;\n AutoComplete: AutoCompleteProps;\n Avatar: AvatarProps;\n AvatarGroup: AvatarGroupProps;\n BackTop: BackTopProps;\n Badge: BadgeProps;\n Breadcrumb: BreadcrumbProps;\n Button: ButtonProps;\n ButtonGroup: ButtonGroupProps;\n Calendar: CalendarProps;\n Card: CardProps;\n CardTitle: CardTitleProps;\n Carousel: CarouselProps;\n Cascader: CascaderProps;\n CheckableTag: CheckableTagProps;\n Checkbox: CheckboxProps;\n CheckboxGroup: CheckboxGroupProps;\n Col: ColProps;\n Collapse: CollapseProps;\n ColorPicker: ColorPickerProps;\n Confirm: ConfirmOptions;\n Countdown: CountdownProps;\n DatePicker: DatePickerProps;\n DateRangePicker: DateRangePickerProps;\n Descriptions: DescriptionsProps;\n Divider: DividerProps;\n Drawer: DrawerProps;\n Dropdown: DropdownProps;\n Empty: EmptyProps;\n ErrorBoundary: ErrorBoundaryProps;\n FileList: FileListProps;\n Flex: FlexProps;\n FloatButton: FloatButtonProps;\n FloatButtonGroup: FloatButtonGroupProps;\n Form: FormProps;\n FormErrorSummary: FormErrorSummaryProps;\n FormField: FormFieldProps;\n FormGroup: FormGroupProps;\n Grid: GridProps;\n ImagePreview: ImagePreviewOptions;\n InfiniteScroll: InfiniteScrollProps;\n Input: InputProps;\n InputGroup: InputGroupProps;\n InputMask: InputMaskProps;\n InputNumber: InputNumberProps;\n InputOTP: InputOTPProps;\n InputSearch: InputSearchProps;\n Layout: LayoutProps;\n LayoutContent: HTMLAttributes<HTMLElement>;\n LayoutFooter: HTMLAttributes<HTMLElement>;\n LayoutHeader: HTMLAttributes<HTMLElement>;\n LayoutSider: LayoutSiderProps;\n Link: LinkProps;\n Loading: LoadingProps;\n LoadingBar: LoadingBarProps;\n Masonry: MasonryProps;\n Mentions: MentionsProps;\n Menu: MenuProps;\n MenuGroup: MenuGroupProps;\n Message: MessageProps;\n Modal: ModalProps;\n Notification: NotificationProps;\n Pagination: PaginationProps;\n Paragraph: ParagraphProps;\n Popconfirm: PopconfirmProps;\n Popover: PopoverProps;\n Progress: ProgressProps;\n QRCode: QRCodeProps;\n Radio: RadioProps;\n RadioGroup: RadioGroupProps;\n Rate: RateProps;\n Result: ResultProps;\n Row: RowProps;\n ScrollArea: ScrollAreaProps;\n Scrollbar: ScrollbarProps;\n Select: SelectProps;\n Skeleton: SkeletonProps;\n Slider: SliderProps;\n Space: SpaceProps;\n SplitButton: SplitButtonProps;\n Splitter: SplitterProps;\n Statistic: StatisticProps;\n Steps: StepsProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n Tag: TagProps;\n TagGroup: TagGroupProps;\n Text: TextProps;\n Textarea: TextareaProps;\n Timeline: TimelineProps;\n Title: TitleProps;\n Tooltip: TooltipProps;\n Tour: TourProps;\n Transfer: TransferProps;\n Tree: TreeProps;\n TreeSelect: TreeSelectProps;\n Typography: TypographyProps;\n Upload: UploadProps;\n}\n\n/** Default props for supported components; null clears that component's inherited defaults. */\nexport interface LeafComponentDefaults {\n Affix?: Partial<Omit<AffixProps, 'key' | 'ref'>> | null;\n Alert?: Partial<Omit<AlertProps, 'key' | 'ref' | 'title'>> | null;\n Anchor?: Partial<Omit<AnchorProps, 'key' | 'ref' | 'items'>> | null;\n AutoComplete?: Partial<Omit<AutoCompleteProps, 'key' | 'ref' | 'options'>> | null;\n Avatar?: Partial<Omit<AvatarProps, 'key' | 'ref'>> | null;\n AvatarGroup?: Partial<Omit<AvatarGroupProps, 'key' | 'ref'>> | null;\n BackTop?: Partial<Omit<BackTopProps, 'key' | 'ref'>> | null;\n Badge?: Partial<Omit<BadgeProps, 'key' | 'ref'>> | null;\n Breadcrumb?: Partial<Omit<BreadcrumbProps, 'key' | 'ref' | 'items'>> | null;\n Button?: Partial<Omit<ButtonProps, 'key' | 'ref'>> | null;\n ButtonGroup?: Partial<Omit<ButtonGroupProps, 'key' | 'ref'>> | null;\n Calendar?: Partial<Omit<CalendarProps, 'key' | 'ref'>> | null;\n Card?: Partial<Omit<CardProps, 'key' | 'ref'>> | null;\n CardTitle?: Partial<Omit<CardTitleProps, 'key' | 'ref'>> | null;\n Carousel?: Partial<Omit<CarouselProps, 'key' | 'ref'>> | null;\n Cascader?: Partial<\n Omit<\n CascaderProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n CheckableTag?: Partial<Omit<CheckableTagProps, 'key' | 'ref'>> | null;\n Checkbox?: Partial<Omit<CheckboxProps, 'key' | 'ref'>> | null;\n CheckboxGroup?: Partial<Omit<CheckboxGroupProps, 'key' | 'ref' | 'options'>> | null;\n Col?: Partial<Omit<ColProps, 'key' | 'ref'>> | null;\n Collapse?: Partial<Omit<CollapseProps, 'key' | 'ref' | 'items'>> | null;\n ColorPicker?: Partial<Omit<ColorPickerProps, 'key' | 'ref'>> | null;\n Confirm?: Partial<Omit<ConfirmOptions, 'key' | 'ref'>> | null;\n Countdown?: Partial<Omit<CountdownProps, 'key' | 'ref' | 'value'>> | null;\n DataTable?: Partial<Omit<DataTablePresentationProps, 'tableRef'>> | null;\n DatePicker?: Partial<\n Omit<DatePickerProps, 'key' | 'ref' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n DateRangePicker?: Partial<Omit<DateRangePickerProps, 'key' | 'ref'>> | null;\n Descriptions?: Partial<Omit<DescriptionsProps, 'key' | 'ref' | 'items'>> | null;\n Divider?: Partial<Omit<DividerProps, 'key' | 'ref'>> | null;\n Drawer?: Partial<Omit<DrawerProps, 'key' | 'ref' | 'open'>> | null;\n Dropdown?: Partial<Omit<DropdownProps, 'key' | 'ref' | 'items' | 'children'>> | null;\n Empty?: Partial<Omit<EmptyProps, 'key' | 'ref'>> | null;\n ErrorBoundary?: Partial<Omit<ErrorBoundaryProps, 'key' | 'ref'>> | null;\n FileList?: Partial<Omit<FileListProps, 'key' | 'ref' | 'items'>> | null;\n Flex?: Partial<Omit<FlexProps, 'key' | 'ref'>> | null;\n FloatButton?: Partial<Omit<FloatButtonProps, 'key' | 'ref'>> | null;\n FloatButtonGroup?: Partial<Omit<FloatButtonGroupProps, 'key' | 'ref' | 'actions'>> | null;\n Form?: Partial<Omit<FormProps, 'key' | 'ref'>> | null;\n FormErrorSummary?: Partial<Omit<FormErrorSummaryProps, 'key' | 'ref'>> | null;\n FormField?: Partial<Omit<FormFieldProps, 'key' | 'ref'>> | null;\n FormGroup?: Partial<Omit<FormGroupProps, 'key' | 'ref'>> | null;\n FormList?: Partial<\n Omit<\n FormListProps<unknown>,\n 'name' | 'children' | 'value' | 'defaultValue' | 'onChange' | 'itemKey'\n >\n > | null;\n Grid?: Partial<Omit<GridProps, 'key' | 'ref'>> | null;\n ImagePreview?: Omit<ImagePreviewOptions, 'onClose'> | null;\n InfiniteScroll?: Partial<\n Omit<InfiniteScrollProps, 'key' | 'ref' | 'dataLength' | 'hasMore' | 'onLoadMore'>\n > | null;\n Input?: Partial<Omit<InputProps, 'key' | 'ref'>> | null;\n InputGroup?: Partial<Omit<InputGroupProps, 'key' | 'ref'>> | null;\n InputMask?: Partial<Omit<InputMaskProps, 'key' | 'ref' | 'mask'>> | null;\n InputNumber?: Partial<\n Omit<\n InputNumberProps,\n 'key' | 'ref' | 'stringMode' | 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'\n >\n > | null;\n InputOTP?: Partial<Omit<InputOTPProps, 'key' | 'ref'>> | null;\n InputSearch?: Partial<Omit<InputSearchProps, 'key' | 'ref'>> | null;\n Layout?: Partial<Omit<LayoutProps, 'key' | 'ref'>> | null;\n LayoutContent?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutFooter?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutHeader?: Partial<Omit<HTMLAttributes<HTMLElement>, 'key' | 'ref'>> | null;\n LayoutSider?: Partial<Omit<LayoutSiderProps, 'key' | 'ref'>> | null;\n Link?: Partial<Omit<LinkProps, 'key' | 'ref'>> | null;\n Loading?: Partial<Omit<LoadingProps, 'key' | 'ref'>> | null;\n LoadingBar?: Partial<Omit<LoadingBarProps, 'key' | 'ref' | 'active' | 'progress'>> | null;\n Masonry?: Partial<Omit<MasonryProps, 'key' | 'ref'>> | null;\n Mentions?: Partial<Omit<MentionsProps, 'key' | 'ref' | 'options'>> | null;\n Menu?: Partial<Omit<MenuProps, 'key' | 'ref' | 'items'>> | null;\n MenuGroup?: Partial<Omit<MenuGroupProps, 'key' | 'ref' | 'title'>> | null;\n Message?: Partial<Omit<MessageOptions, 'key' | 'content'>> | null;\n Modal?: Partial<Omit<ModalProps, 'key' | 'ref' | 'open'>> | null;\n Notification?: Partial<Omit<NotificationOptions, 'key' | 'title'>> | null;\n Pagination?: Partial<Omit<PaginationProps, 'key' | 'ref' | 'total'>> | null;\n Paragraph?: Partial<Omit<ParagraphProps, 'key' | 'ref'>> | null;\n Popconfirm?: Partial<Omit<PopconfirmProps, 'key' | 'ref' | 'children' | 'title'>> | null;\n Popover?: Partial<Omit<PopoverProps, 'key' | 'ref' | 'children' | 'content'>> | null;\n Progress?: Partial<Omit<ProgressProps, 'key' | 'ref'>> | null;\n QRCode?: Partial<Omit<QRCodeProps, 'key' | 'ref' | 'value'>> | null;\n Radio?: Partial<Omit<RadioProps, 'key' | 'ref'>> | null;\n RadioGroup?: Partial<Omit<RadioGroupProps, 'key' | 'ref' | 'options'>> | null;\n Rate?: Partial<Omit<RateProps, 'key' | 'ref'>> | null;\n Result?: Partial<Omit<ResultProps, 'key' | 'ref'>> | null;\n Row?: Partial<Omit<RowProps, 'key' | 'ref'>> | null;\n ScrollArea?: Partial<Omit<ScrollAreaProps, 'key' | 'ref'>> | null;\n Scrollbar?: Partial<Omit<ScrollbarProps, 'key' | 'ref'>> | null;\n /** Required data, mode-dependent values and callbacks belong on each Select. */\n Select?: Partial<\n Omit<\n SelectProps,\n 'key' | 'ref' | 'options' | 'multiple' | 'value' | 'defaultValue' | 'onChange'\n >\n > | null;\n Skeleton?: Partial<Omit<SkeletonProps, 'key' | 'ref'>> | null;\n Slider?: Partial<\n Omit<SliderProps, 'key' | 'ref' | 'range' | 'value' | 'defaultValue' | 'onChange'>\n > | null;\n Space?: Partial<Omit<SpaceProps, 'key' | 'ref'>> | null;\n SplitButton?: Partial<Omit<SplitButtonProps, 'key' | 'ref' | 'items'>> | null;\n Splitter?: Partial<Omit<SplitterProps, 'key' | 'ref' | 'panels'>> | null;\n Statistic?: Partial<Omit<StatisticProps, 'key' | 'ref' | 'value'>> | null;\n Steps?: Partial<Omit<StepsProps, 'key' | 'ref' | 'items'>> | null;\n Switch?: Partial<Omit<SwitchProps, 'key' | 'ref'>> | null;\n Tabs?: Partial<Omit<TabsProps, 'key' | 'ref' | 'items'>> | null;\n Tag?: Partial<Omit<TagProps, 'key' | 'ref'>> | null;\n TagGroup?: Partial<Omit<TagGroupProps, 'key' | 'ref' | 'options'>> | null;\n Text?: Partial<Omit<TextProps, 'key' | 'ref'>> | null;\n Textarea?: Partial<Omit<TextareaProps, 'key' | 'ref'>> | null;\n Timeline?: Partial<Omit<TimelineProps, 'key' | 'ref' | 'items'>> | null;\n Title?: Partial<Omit<TitleProps, 'key' | 'ref'>> | null;\n Tooltip?: Partial<Omit<TooltipProps, 'key' | 'ref' | 'content' | 'children'>> | null;\n Tour?: Partial<Omit<TourProps, 'key' | 'ref' | 'open' | 'steps'>> | null;\n Transfer?: Partial<Omit<TransferProps, 'key' | 'ref' | 'items'>> | null;\n Tree?: Partial<Omit<TreeProps, 'key' | 'ref' | 'data'>> | null;\n TreeSelect?: Partial<\n Omit<\n TreeSelectProps,\n | 'key'\n | 'ref'\n | 'options'\n | 'multiple'\n | 'treeCheckable'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >\n > | null;\n Typography?: Partial<Omit<TypographyProps, 'key' | 'ref'>> | null;\n Upload?: Partial<Omit<UploadProps, 'key' | 'ref'>> | null;\n VirtualList?:\n | (Partial<\n Omit<VirtualListProps<unknown>, 'items' | 'itemKey' | 'renderItem' | 'estimateSize'>\n > & { estimateSize?: number })\n | null;\n}\n\nexport const ComponentDefaultsContext = createContext<LeafComponentDefaults>({});\n\n/** Supplement missing props without copying unless a defined default is used. */\nexport function mergeComponentProps<Props extends object>(\n defaults: Partial<Props> | null | undefined,\n props: Props,\n): Props {\n if (!defaults) return props;\n let resolved = props;\n for (const key of Object.keys(defaults) as (keyof Props)[]) {\n const value = defaults[key];\n if (value !== undefined && props[key] === undefined) {\n if (resolved === props) resolved = { ...props };\n resolved[key] = value as Props[typeof key];\n }\n }\n return resolved;\n}\n\n/** Merge scopes by component and prop; nested prop values are replaced as a whole. */\nexport function mergeComponentDefaults(\n parent: LeafComponentDefaults,\n overrides: LeafComponentDefaults | undefined,\n): LeafComponentDefaults {\n if (!overrides) return parent;\n let merged = parent;\n for (const name of Object.keys(overrides) as (keyof LeafComponentDefaults)[]) {\n const incoming = overrides[name];\n if (incoming === undefined) continue;\n const inherited = parent[name] ?? undefined;\n if (incoming === null) {\n if (inherited == null) continue;\n if (merged === parent) merged = { ...parent };\n delete merged[name];\n continue;\n }\n let entry = inherited;\n for (const key of Object.keys(incoming)) {\n const value = (incoming as Record<string, unknown>)[key];\n if (\n value === undefined ||\n value === (inherited as Record<string, unknown> | undefined)?.[key]\n )\n continue;\n if (entry === inherited) entry = { ...inherited };\n (entry as Record<string, unknown>)[key] = value;\n }\n if (entry !== inherited) {\n if (merged === parent) merged = { ...parent };\n // Each entry remains the same component's props; only the dynamic key loses that relation.\n (merged as Record<string, object | undefined>)[name] = entry;\n }\n }\n return merged;\n}\n\nexport function useComponentProps<Name extends keyof ComponentPropsMap>(\n name: Name,\n props: ComponentPropsMap[Name],\n): ComponentPropsMap[Name] {\n const defaults = useContext(ComponentDefaultsContext)[name];\n return mergeComponentProps(\n defaults as Partial<ComponentPropsMap[Name]> | null | undefined,\n props,\n );\n}\n\n/** Generic owners merge this type-independent projection into their own complete props. */\nexport function useGenericComponentDefaults<Name extends GenericComponentName>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n\n/** Read defaults for an API request without invoking hooks from the request callback. */\nexport function useComponentDefaults<Name extends keyof LeafComponentDefaults>(name: Name) {\n return useContext(ComponentDefaultsContext)[name];\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","ComponentDefaultsContext","createContext","mergeComponentProps","defaults","props","resolved","value","undefined","mergeComponentDefaults","parent","overrides","merged","name","incoming","inherited","entry","useComponentProps","useContext","useGenericComponentDefaults","useComponentDefaults"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAAS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CAACc,WAA+C;QAC5E,MAAMG,WAAWH,SAAS,CAACE,KAAK;QAChC,IAAIC,AAAaN,WAAbM,UAAwB;QAC5B,MAAMC,YAAYL,MAAM,CAACG,KAAK,IAAIL;QAClC,IAAIM,AAAa,SAAbA,UAAmB;YACrB,IAAIC,AAAa,QAAbA,WAAmB;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAC5C,OAAOE,MAAM,CAACC,KAAK;YACnB;QACF;QACA,IAAIG,QAAQD;QACZ,KAAK,MAAMnB,OAAOC,OAAO,IAAI,CAACiB,UAAW;YACvC,MAAMP,QAASO,QAAoC,CAAClB,IAAI;YACxD,IACEW,AAAUC,WAAVD,SACAA,UAAWQ,WAAmD,CAACnB,IAAI;gBAGrE,IAAIoB,UAAUD,WAAWC,QAAQ;oBAAE,GAAGD,SAAS;gBAAC;gBAC/CC,KAAiC,CAACpB,IAAI,GAAGW;;QAC5C;QACA,IAAIS,UAAUD,WAAW;YACvB,IAAIH,WAAWF,QAAQE,SAAS;gBAAE,GAAGF,MAAM;YAAC;YAE3CE,MAA6C,CAACC,KAAK,GAAGG;QACzD;IACF;IACA,OAAOJ;AACT;AAEO,SAASK,kBACdJ,IAAU,EACVR,KAA8B;IAE9B,MAAMD,WAAWc,AAAAA,IAAAA,+BAAAA,UAAAA,AAAAA,EAAWjB,yBAAyB,CAACY,KAAK;IAC3D,OAAOV,oBACLC,UACAC;AAEJ;AAGO,SAASc,4BAA+DN,IAAU;IACvF,OAAOK,AAAAA,IAAAA,+BAAAA,UAAAA,AAAAA,EAAWjB,yBAAyB,CAACY,KAAK;AACnD;AAGO,SAASO,qBAA+DP,IAAU;IACvF,OAAOK,AAAAA,IAAAA,+BAAAA,UAAAA,AAAAA,EAAWjB,yBAAyB,CAACY,KAAK;AACnD"}
@@ -38,7 +38,7 @@ const alert_cjs_namespaceObject = require("../alert/alert.cjs");
38
38
  const button_cjs_namespaceObject = require("../button/button.cjs");
39
39
  const context_cjs_namespaceObject = require("../config-provider/context.cjs");
40
40
  const modal_cjs_namespaceObject = require("../modal/modal.cjs");
41
- function ConfirmDialog({ open, title, icon, children, confirmText, cancelText, type = 'default', showCancel, confirmButtonProps, cancelButtonProps, onCancel, onConfirm, onClose, ...props }) {
41
+ function ConfirmDialog({ open, title, icon, children, confirmText, cancelText, type = 'info', showCancel, confirmButtonProps, cancelButtonProps, onCancel, onConfirm, onClose, ...props }) {
42
42
  const { messages } = (0, context_cjs_namespaceObject.useLeafConfig)();
43
43
  const contentId = (0, external_react_namespaceObject.useId)();
44
44
  const [pending, setPending] = (0, external_react_namespaceObject.useState)(false);
@@ -1 +1 @@
1
- {"version":3,"file":"confirm/confirm.cjs","sources":["webpack://webpack/runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/confirm/confirm.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CircleAlert } from 'lucide-react';\nimport { type CSSProperties, type ReactNode, useEffect, useId, useRef, useState } from 'react';\nimport { FeedbackIcon } from '../alert/alert';\nimport { ButtonControl, type ButtonProps } from '../button/button';\nimport { useLeafConfig } from '../config-provider/context';\nimport { ModalBase } from '../modal/modal';\nimport type { DialogFocusOptions } from '../shared/dialog';\n\nexport interface ConfirmOptions extends DialogFocusOptions {\n title?: ReactNode;\n /** A short explanation of the action being confirmed. */\n children?: ReactNode;\n /** Bare semantic icon beside the title, or content when untitled. Use null to hide it. */\n icon?: ReactNode;\n type?: 'default' | 'danger' | 'success' | 'warning' | 'info';\n showCancel?: boolean;\n confirmText?: ReactNode;\n cancelText?: ReactNode;\n confirmButtonProps?: ButtonProps;\n cancelButtonProps?: ButtonProps;\n onConfirm?: () => void | Promise<void>;\n onCancel?: () => void;\n width?: number | string;\n closable?: boolean;\n maskClosable?: boolean;\n keyboard?: boolean;\n className?: string;\n style?: CSSProperties;\n}\ninterface ConfirmDialogProps extends ConfirmOptions {\n open: boolean;\n onClose: () => void;\n afterClose?: () => void;\n}\n\n// Rendered only by the confirmation queue; consumers call useConfirm().confirm().\nexport function ConfirmDialog({\n open,\n title,\n icon,\n children,\n confirmText,\n cancelText,\n type = 'default',\n showCancel,\n confirmButtonProps,\n cancelButtonProps,\n onCancel,\n onConfirm,\n onClose,\n ...props\n}: ConfirmDialogProps) {\n const { messages } = useLeafConfig();\n const contentId = useId();\n const [pending, setPending] = useState(false);\n const [error, setError] = useState<string>();\n const mounted = useRef(true);\n const busy = useRef(false);\n const generation = useRef(0);\n const confirmLoading = confirmButtonProps?.loading ?? false;\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n useEffect(() => {\n generation.current++;\n busy.current = false;\n setPending(false);\n if (open) setError(undefined);\n }, [open]);\n async function accept() {\n if (busy.current || confirmLoading) return;\n busy.current = true;\n const request = generation.current;\n setPending(true);\n setError(undefined);\n try {\n await onConfirm?.();\n if (mounted.current && generation.current === request) onClose?.();\n } catch (reason) {\n if (mounted.current && generation.current === request)\n setError(reason instanceof Error ? reason.message : String(reason));\n } finally {\n if (generation.current === request) {\n busy.current = false;\n if (mounted.current) setPending(false);\n }\n }\n }\n const cancel = () => {\n if (!pending && !confirmLoading) {\n onCancel?.();\n onClose?.();\n }\n };\n const contentIcon =\n icon === undefined && type !== 'default' ? (\n type === 'danger' ? (\n <CircleAlert aria-hidden=\"true\" />\n ) : (\n <FeedbackIcon type={type} />\n )\n ) : (\n icon\n );\n return (\n <ModalBase\n {...props}\n open={open}\n title={\n title != null && contentIcon != null ? (\n <>\n <span className=\"leaf-confirm__icon\" aria-hidden=\"true\">\n {contentIcon}\n </span>\n <span className=\"leaf-confirm__title\">{title}</span>\n </>\n ) : (\n title\n )\n }\n width={props.width ?? 420}\n divided={false}\n confirmLoading={pending || confirmLoading}\n role=\"alertdialog\"\n aria-label={title == null ? messages.common.confirm : undefined}\n aria-describedby={children != null ? contentId : undefined}\n className={[\n 'leaf-confirm',\n `leaf-confirm--${type}`,\n title != null && contentIcon != null && 'leaf-confirm--titled-icon',\n (icon != null || (icon === undefined && type !== 'default')) && 'leaf-confirm--has-icon',\n props.className,\n ]\n .filter(Boolean)\n .join(' ')}\n maskClosable={pending ? false : (props.maskClosable ?? false)}\n closable={!pending && (props.closable ?? false)}\n keyboard={!pending && (props.keyboard ?? true)}\n onClose={cancel}\n onCancel={cancel}\n footer={\n <>\n {(showCancel ?? type !== 'success') && (\n <ButtonControl\n type=\"button\"\n variant=\"outline\"\n {...cancelButtonProps}\n disabled={pending || confirmLoading || cancelButtonProps?.disabled}\n onClick={(event) => {\n cancelButtonProps?.onClick?.(event);\n if (!event.defaultPrevented) cancel();\n }}\n >\n {cancelText ?? messages.common.cancel}\n </ButtonControl>\n )}\n <ButtonControl\n type=\"button\"\n variant=\"solid\"\n {...confirmButtonProps}\n danger={type === 'danger'}\n loading={pending || confirmLoading || confirmButtonProps?.loading}\n onClick={(event) => {\n confirmButtonProps?.onClick?.(event);\n if (!event.defaultPrevented) void accept();\n }}\n >\n {confirmText ?? messages.common.confirm}\n </ButtonControl>\n </>\n }\n >\n {(contentIcon != null || children != null || error != null) && (\n <div className=\"leaf-confirm__body\">\n {title == null && contentIcon != null && (\n <span className=\"leaf-confirm__icon\" aria-hidden=\"true\">\n {contentIcon}\n </span>\n )}\n <div className=\"leaf-confirm__content\">\n {children != null && (\n <div id={contentId} className=\"leaf-confirm-description\">\n {children}\n </div>\n )}\n {error && (\n <p role=\"alert\" className=\"leaf-confirm-error\">\n {error}\n </p>\n )}\n </div>\n </div>\n )}\n </ModalBase>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","ConfirmDialog","open","title","icon","children","confirmText","cancelText","type","showCancel","confirmButtonProps","cancelButtonProps","onCancel","onConfirm","onClose","props","messages","useLeafConfig","contentId","useId","pending","setPending","useState","error","setError","mounted","useRef","busy","generation","confirmLoading","useEffect","undefined","accept","request","reason","Error","String","cancel","contentIcon","CircleAlert","FeedbackIcon","ModalBase","Boolean","ButtonControl","event"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC,SAASC;QAC1C,IAAIC,SAAS,CAACC,MAAMC;YACnB,IAAI,IAAIC,OAAOF,KACd,IAAGJ,oBAAoB,CAAC,CAACI,MAAME,QAAQ,CAACN,oBAAoB,CAAC,CAAC,UAASM,MACtEC,OAAO,cAAc,CAAC,UAASD,KAAK;gBAAE,YAAY;gBAAM,CAACD,KAAK,EAAED,IAAI,CAACE,IAAI;YAAC;QAG7E;QACAH,OAAOF,SAAS;QAChBE,OAAOD,QAAQ;IAChB;;;ICVAF,oBAAoB,CAAC,GAAG,CAACQ,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFT,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,MAAlB,OAAOU,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;;;;AC8BO,SAASI,cAAc,EAC5BC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,UAAU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runtime/define_property_getters","webpack://webpack/runtime/has_own_property","webpack://webpack/runtime/make_namespace_object","../../../../../src/confirm/confirm.tsx"],"sourcesContent":["__webpack_require__.d = (exports, getters, values) => {\n\tvar define = (defs, kind) => {\n\t\tfor(var key in defs) {\n\t\t\tif(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });\n\t\t\t}\n\t\t}\n\t};\n\tdefine(getters, \"get\");\n\tdefine(values, \"value\");\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { CircleAlert } from 'lucide-react';\nimport { type CSSProperties, type ReactNode, useEffect, useId, useRef, useState } from 'react';\nimport { FeedbackIcon } from '../alert/alert';\nimport { ButtonControl, type ButtonProps } from '../button/button';\nimport { useLeafConfig } from '../config-provider/context';\nimport { ModalBase } from '../modal/modal';\nimport type { DialogFocusOptions } from '../shared/dialog';\n\nexport interface ConfirmOptions extends DialogFocusOptions {\n title?: ReactNode;\n /** A short explanation of the action being confirmed. */\n children?: ReactNode;\n /** Bare semantic icon beside the title, or content when untitled. Use null to hide it. */\n icon?: ReactNode;\n type?: 'default' | 'danger' | 'success' | 'warning' | 'info';\n showCancel?: boolean;\n confirmText?: ReactNode;\n cancelText?: ReactNode;\n confirmButtonProps?: ButtonProps;\n cancelButtonProps?: ButtonProps;\n onConfirm?: () => void | Promise<void>;\n onCancel?: () => void;\n width?: number | string;\n closable?: boolean;\n maskClosable?: boolean;\n keyboard?: boolean;\n className?: string;\n style?: CSSProperties;\n}\ninterface ConfirmDialogProps extends ConfirmOptions {\n open: boolean;\n onClose: () => void;\n afterClose?: () => void;\n}\n\n// Rendered only by the confirmation queue; consumers call useConfirm().confirm().\nexport function ConfirmDialog({\n open,\n title,\n icon,\n children,\n confirmText,\n cancelText,\n type = 'info',\n showCancel,\n confirmButtonProps,\n cancelButtonProps,\n onCancel,\n onConfirm,\n onClose,\n ...props\n}: ConfirmDialogProps) {\n const { messages } = useLeafConfig();\n const contentId = useId();\n const [pending, setPending] = useState(false);\n const [error, setError] = useState<string>();\n const mounted = useRef(true);\n const busy = useRef(false);\n const generation = useRef(0);\n const confirmLoading = confirmButtonProps?.loading ?? false;\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n useEffect(() => {\n generation.current++;\n busy.current = false;\n setPending(false);\n if (open) setError(undefined);\n }, [open]);\n async function accept() {\n if (busy.current || confirmLoading) return;\n busy.current = true;\n const request = generation.current;\n setPending(true);\n setError(undefined);\n try {\n await onConfirm?.();\n if (mounted.current && generation.current === request) onClose?.();\n } catch (reason) {\n if (mounted.current && generation.current === request)\n setError(reason instanceof Error ? reason.message : String(reason));\n } finally {\n if (generation.current === request) {\n busy.current = false;\n if (mounted.current) setPending(false);\n }\n }\n }\n const cancel = () => {\n if (!pending && !confirmLoading) {\n onCancel?.();\n onClose?.();\n }\n };\n const contentIcon =\n icon === undefined && type !== 'default' ? (\n type === 'danger' ? (\n <CircleAlert aria-hidden=\"true\" />\n ) : (\n <FeedbackIcon type={type} />\n )\n ) : (\n icon\n );\n return (\n <ModalBase\n {...props}\n open={open}\n title={\n title != null && contentIcon != null ? (\n <>\n <span className=\"leaf-confirm__icon\" aria-hidden=\"true\">\n {contentIcon}\n </span>\n <span className=\"leaf-confirm__title\">{title}</span>\n </>\n ) : (\n title\n )\n }\n width={props.width ?? 420}\n divided={false}\n confirmLoading={pending || confirmLoading}\n role=\"alertdialog\"\n aria-label={title == null ? messages.common.confirm : undefined}\n aria-describedby={children != null ? contentId : undefined}\n className={[\n 'leaf-confirm',\n `leaf-confirm--${type}`,\n title != null && contentIcon != null && 'leaf-confirm--titled-icon',\n (icon != null || (icon === undefined && type !== 'default')) && 'leaf-confirm--has-icon',\n props.className,\n ]\n .filter(Boolean)\n .join(' ')}\n maskClosable={pending ? false : (props.maskClosable ?? false)}\n closable={!pending && (props.closable ?? false)}\n keyboard={!pending && (props.keyboard ?? true)}\n onClose={cancel}\n onCancel={cancel}\n footer={\n <>\n {(showCancel ?? type !== 'success') && (\n <ButtonControl\n type=\"button\"\n variant=\"outline\"\n {...cancelButtonProps}\n disabled={pending || confirmLoading || cancelButtonProps?.disabled}\n onClick={(event) => {\n cancelButtonProps?.onClick?.(event);\n if (!event.defaultPrevented) cancel();\n }}\n >\n {cancelText ?? messages.common.cancel}\n </ButtonControl>\n )}\n <ButtonControl\n type=\"button\"\n variant=\"solid\"\n {...confirmButtonProps}\n danger={type === 'danger'}\n loading={pending || confirmLoading || confirmButtonProps?.loading}\n onClick={(event) => {\n confirmButtonProps?.onClick?.(event);\n if (!event.defaultPrevented) void accept();\n }}\n >\n {confirmText ?? messages.common.confirm}\n </ButtonControl>\n </>\n }\n >\n {(contentIcon != null || children != null || error != null) && (\n <div className=\"leaf-confirm__body\">\n {title == null && contentIcon != null && (\n <span className=\"leaf-confirm__icon\" aria-hidden=\"true\">\n {contentIcon}\n </span>\n )}\n <div className=\"leaf-confirm__content\">\n {children != null && (\n <div id={contentId} className=\"leaf-confirm-description\">\n {children}\n </div>\n )}\n {error && (\n <p role=\"alert\" className=\"leaf-confirm-error\">\n {error}\n </p>\n )}\n </div>\n </div>\n )}\n </ModalBase>\n );\n}\n"],"names":["__webpack_require__","getters","values","define","defs","kind","key","Object","obj","prop","Symbol","ConfirmDialog","open","title","icon","children","confirmText","cancelText","type","showCancel","confirmButtonProps","cancelButtonProps","onCancel","onConfirm","onClose","props","messages","useLeafConfig","contentId","useId","pending","setPending","useState","error","setError","mounted","useRef","busy","generation","confirmLoading","useEffect","undefined","accept","request","reason","Error","String","cancel","contentIcon","CircleAlert","FeedbackIcon","ModalBase","Boolean","ButtonControl","event"],"mappings":";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,qCAAC2B,2BAAAA,aAAaA,EAAAA;oBACZ,MAAK;oBACL,SAAQ;oBACP,GAAGjC,kBAAkB;oBACtB,QAAQF,AAAS,aAATA;oBACR,SAASY,WAAWS,kBAAkBnB,oBAAoB;oBAC1D,SAAS,CAACkC;wBACRlC,oBAAoB,UAAUkC;wBAC9B,IAAI,CAACA,MAAM,gBAAgB,EAAOZ;oBACpC;8BAEC1B,eAAeU,SAAS,MAAM,CAAC,OAAO;;;;kBAK3CsB,AAAAA,CAAAA,AAAe,QAAfA,eAAuBjC,AAAY,QAAZA,YAAoBkB,AAAS,QAATA,KAAY,KACvD,AADuD,cACvD,sCAAC;YAAI,WAAU;;gBACH,QAATpB,SAAiBmC,AAAe,QAAfA,eAChB,AADuC,WAAR,GAC/B,qCAAC;oBAAK,WAAU;oBAAqB,eAAY;8BAC9CA;;8BAGL,sCAAC;oBAAI,WAAU;;wBACA,QAAZjC,YACC,AADmB,WAAR,GACX,qCAAC;4BAAI,IAAIa;4BAAW,WAAU;sCAC3Bb;;wBAGJkB,SACC,AADQ,WAATA,GACC,qCAAC;4BAAE,MAAK;4BAAQ,WAAU;sCACvBA;;;;;;;AAQjB"}
@@ -46,6 +46,7 @@ const floating_cjs_namespaceObject = require("../shared/floating.cjs");
46
46
  const parse_date_cjs_namespaceObject = require("../shared/parse-date.cjs");
47
47
  const segments_cjs_namespaceObject = require("../shared/segments.cjs");
48
48
  const time_cjs_namespaceObject = require("../shared/time.cjs");
49
+ const tabs_cjs_namespaceObject = require("../tabs/tabs.cjs");
49
50
  const time_panel_cjs_namespaceObject = require("../timepicker/time-panel.cjs");
50
51
  const timerangepicker_cjs_namespaceObject = require("../timerangepicker/timerangepicker.cjs");
51
52
  const getTime = (date)=>({
@@ -290,25 +291,23 @@ const daterangepicker_CalendarDateRangePicker = /*#__PURE__*/ (0, external_react
290
291
  panelClassName: (0, classes_cjs_namespaceObject.classes)('leaf-range-panel', datetime && 'leaf-range-panel--datetime'),
291
292
  renderPanel: (close)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
292
293
  children: [
293
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("fieldset", {
294
+ datetime && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsControl, {
294
295
  className: "leaf-range-panel__endpoints",
295
- "data-active": endpoint,
296
296
  "aria-label": messages.dateRangePicker.placeholder,
297
- children: [
298
- 0,
299
- 1
300
- ].map((index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
301
- type: "button",
302
- "aria-pressed": endpoint === index,
303
- onClick: ()=>switchEndpoint(index),
304
- children: [
305
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
306
- className: "leaf-range-panel__endpoint-label",
307
- children: 0 === index ? messages.common.start : messages.common.end
308
- }),
309
- ' '
310
- ]
311
- }, index))
297
+ size: "sm",
298
+ overflow: false,
299
+ items: [
300
+ {
301
+ key: 'start',
302
+ label: messages.common.start
303
+ },
304
+ {
305
+ key: 'end',
306
+ label: messages.common.end
307
+ }
308
+ ],
309
+ activeKey: 0 === endpoint ? 'start' : 'end',
310
+ onChange: (key)=>switchEndpoint('start' === key ? 0 : 1)
312
311
  }),
313
312
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
314
313
  className: (0, classes_cjs_namespaceObject.classes)('leaf-range-panel__body', Boolean(presets?.length) && 'leaf-range-panel__body--presets'),
@@ -364,7 +363,7 @@ const daterangepicker_CalendarDateRangePicker = /*#__PURE__*/ (0, external_react
364
363
  range: preview ?? draft,
365
364
  hoverDate: preview ? null : hover,
366
365
  onHover: (date)=>{
367
- if (1 === endpoint && draft[0] && !draft[1]) setHover(date);
366
+ if (1 === endpoint && draft[0]) setHover(date);
368
367
  },
369
368
  showOutsideDays: datetime,
370
369
  onChange: (date)=>choose(date, close)