@lobehub/ui 6.15.2 → 6.15.4

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 (900) hide show
  1. package/es/A/index.d.mts +1 -2
  2. package/es/Accordion/Accordion.d.mts +1 -2
  3. package/es/Accordion/atoms.d.mts +1 -2
  4. package/es/Accordion/style.d.mts +1 -2
  5. package/es/Accordion/type.d.mts +1 -2
  6. package/es/ActionIcon/ActionIcon.d.mts +1 -2
  7. package/es/ActionIcon/style.d.mts +1 -2
  8. package/es/ActionIcon/type.d.mts +1 -2
  9. package/es/ActionIconGroup/ActionIconGroup.d.mts +1 -2
  10. package/es/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
  11. package/es/ActionIconGroup/type.d.mts +1 -2
  12. package/es/AgentAvatar/AgentAvatar.d.mts +1 -2
  13. package/es/AgentAvatar/type.d.mts +1 -2
  14. package/es/AgentAvatar/utils.d.mts +1 -2
  15. package/es/Alert/Alert.d.mts +1 -2
  16. package/es/Alert/style.d.mts +1 -2
  17. package/es/Alert/type.d.mts +1 -2
  18. package/es/Anchor/Anchor.d.mts +1 -2
  19. package/es/Anchor/Anchor.mjs +1 -1
  20. package/es/Anchor/type.d.mts +1 -2
  21. package/es/AutoComplete/AutoComplete.d.mts +1 -2
  22. package/es/AutoComplete/style.d.mts +2 -3
  23. package/es/AutoComplete/type.d.mts +1 -2
  24. package/es/Avatar/AvatarGroup/index.d.mts +1 -2
  25. package/es/Avatar/index.d.mts +1 -2
  26. package/es/Avatar/type.d.mts +1 -2
  27. package/es/Badge/Badge.d.mts +1 -2
  28. package/es/Badge/type.d.mts +1 -2
  29. package/es/Block/Block.d.mts +1 -2
  30. package/es/Block/type.d.mts +1 -2
  31. package/es/Breadcrumb/Breadcrumb.d.mts +1 -2
  32. package/es/Breadcrumb/type.d.mts +1 -2
  33. package/es/Burger/Burger.d.mts +1 -2
  34. package/es/Burger/type.d.mts +1 -2
  35. package/es/Button/Button.d.mts +1 -2
  36. package/es/Button/SplitButton.d.mts +1 -2
  37. package/es/Button/SplitButton.mjs.map +1 -1
  38. package/es/Button/style.d.mts +1 -2
  39. package/es/Button/type.d.mts +1 -2
  40. package/es/Carousel/Carousel.d.mts +1 -2
  41. package/es/Carousel/type.d.mts +1 -2
  42. package/es/Checkbox/Checkbox.d.mts +1 -2
  43. package/es/Checkbox/Checkbox.mjs +6 -6
  44. package/es/Checkbox/Checkbox.mjs.map +1 -1
  45. package/es/Checkbox/CheckboxGroup.d.mts +1 -2
  46. package/es/Checkbox/CheckboxGroup.mjs +5 -5
  47. package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
  48. package/es/Checkbox/style.d.mts +1 -2
  49. package/es/Checkbox/type.d.mts +1 -2
  50. package/es/CodeDiff/CodeDiff.d.mts +1 -2
  51. package/es/CodeDiff/PatchDiff.d.mts +1 -2
  52. package/es/CodeDiff/PatchDiff.mjs +5 -5
  53. package/es/CodeDiff/PatchDiff.mjs.map +1 -1
  54. package/es/CodeDiff/theme.mjs.map +1 -1
  55. package/es/CodeDiff/type.d.mts +1 -2
  56. package/es/CodeEditor/CodeEditor.d.mts +1 -2
  57. package/es/CodeEditor/type.d.mts +1 -2
  58. package/es/Collapsible/Collapsible.d.mts +1 -2
  59. package/es/Collapsible/Collapsible.mjs +5 -5
  60. package/es/Collapsible/Collapsible.mjs.map +1 -1
  61. package/es/Collapsible/type.d.mts +1 -2
  62. package/es/ColorPicker/ColorPicker.d.mts +1 -2
  63. package/es/ColorPicker/type.d.mts +1 -2
  64. package/es/ColorSwatches/ColorSwatches.d.mts +1 -2
  65. package/es/ColorSwatches/type.d.mts +1 -2
  66. package/es/ConfigProvider/AppElementContext.d.mts +1 -2
  67. package/es/ConfigProvider/index.d.mts +1 -2
  68. package/es/ContextMenu/ContextMenuHost.d.mts +1 -2
  69. package/es/ContextMenu/ContextMenuTrigger.d.mts +1 -2
  70. package/es/ContextMenu/renderItems.d.mts +1 -1
  71. package/es/ContextMenu/store.d.mts +1 -2
  72. package/es/ContextMenu/type.d.mts +1 -2
  73. package/es/CopyButton/CopyButton.d.mts +1 -2
  74. package/es/CopyButton/type.d.mts +1 -2
  75. package/es/DatePicker/DatePicker.d.mts +1 -2
  76. package/es/DatePicker/DateRangePicker.d.mts +1 -2
  77. package/es/DatePicker/DayjsDatePicker.d.mts +1 -2
  78. package/es/DatePicker/DayjsDateRangePicker.d.mts +1 -2
  79. package/es/DatePicker/RangePicker.mjs.map +1 -1
  80. package/es/DatePicker/SinglePicker.mjs.map +1 -1
  81. package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +2 -2
  82. package/es/DatePicker/core/PickerInput/Popup/Footer.mjs.map +1 -1
  83. package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs +4 -4
  84. package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs.map +1 -1
  85. package/es/DatePicker/core/PickerInput/Popup/index.mjs +14 -14
  86. package/es/DatePicker/core/PickerInput/Popup/index.mjs.map +1 -1
  87. package/es/DatePicker/core/PickerInput/RangePicker.d.mts +3 -4
  88. package/es/DatePicker/core/PickerInput/RangePicker.mjs +11 -11
  89. package/es/DatePicker/core/PickerInput/RangePicker.mjs.map +1 -1
  90. package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs +2 -2
  91. package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs.map +1 -1
  92. package/es/DatePicker/core/PickerInput/Selector/Icon.mjs +2 -2
  93. package/es/DatePicker/core/PickerInput/Selector/Icon.mjs.map +1 -1
  94. package/es/DatePicker/core/PickerInput/Selector/Input.mjs +15 -15
  95. package/es/DatePicker/core/PickerInput/Selector/Input.mjs.map +1 -1
  96. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.d.mts +1 -2
  97. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +11 -11
  98. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs.map +1 -1
  99. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs +2 -2
  100. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs.map +1 -1
  101. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +6 -6
  102. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs.map +1 -1
  103. package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs +4 -4
  104. package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs.map +1 -1
  105. package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs +2 -2
  106. package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs.map +1 -1
  107. package/es/DatePicker/core/PickerInput/SinglePicker.d.mts +6 -7
  108. package/es/DatePicker/core/PickerInput/SinglePicker.mjs +8 -8
  109. package/es/DatePicker/core/PickerInput/SinglePicker.mjs.map +1 -1
  110. package/es/DatePicker/core/PickerInput/context.mjs +2 -2
  111. package/es/DatePicker/core/PickerInput/context.mjs.map +1 -1
  112. package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs +3 -3
  113. package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs.map +1 -1
  114. package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs +2 -2
  115. package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs.map +1 -1
  116. package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs +3 -3
  117. package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs.map +1 -1
  118. package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs +5 -5
  119. package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs.map +1 -1
  120. package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs +2 -2
  121. package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs.map +1 -1
  122. package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs +2 -2
  123. package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs.map +1 -1
  124. package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs +3 -3
  125. package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs.map +1 -1
  126. package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs +2 -2
  127. package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs.map +1 -1
  128. package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs +3 -3
  129. package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs.map +1 -1
  130. package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs +2 -2
  131. package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs.map +1 -1
  132. package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs +4 -4
  133. package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs.map +1 -1
  134. package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs +3 -3
  135. package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs.map +1 -1
  136. package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs +5 -5
  137. package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs.map +1 -1
  138. package/es/DatePicker/core/PickerPanel/PanelBody.mjs +2 -2
  139. package/es/DatePicker/core/PickerPanel/PanelBody.mjs.map +1 -1
  140. package/es/DatePicker/core/PickerPanel/PanelHeader.mjs +6 -6
  141. package/es/DatePicker/core/PickerPanel/PanelHeader.mjs.map +1 -1
  142. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs +3 -3
  143. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs.map +1 -1
  144. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/geometry.mjs +1 -1
  145. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +2 -2
  146. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs.map +1 -1
  147. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs +3 -3
  148. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs.map +1 -1
  149. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +2 -2
  150. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs.map +1 -1
  151. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs +5 -5
  152. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs.map +1 -1
  153. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs +7 -7
  154. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs.map +1 -1
  155. package/es/DatePicker/core/PickerPanel/context.mjs +6 -6
  156. package/es/DatePicker/core/PickerPanel/context.mjs.map +1 -1
  157. package/es/DatePicker/core/PickerPanel/index.mjs +12 -12
  158. package/es/DatePicker/core/PickerPanel/index.mjs.map +1 -1
  159. package/es/DatePicker/core/generate/index.d.mts +1 -2
  160. package/es/DatePicker/core/hooks/react.mjs +8 -8
  161. package/es/DatePicker/core/hooks/react.mjs.map +1 -1
  162. package/es/DatePicker/core/hooks/useSyncState.mjs +3 -3
  163. package/es/DatePicker/core/hooks/useSyncState.mjs.map +1 -1
  164. package/es/DatePicker/core/hooks/useTimeInfo.mjs +6 -6
  165. package/es/DatePicker/core/hooks/useTimeInfo.mjs.map +1 -1
  166. package/es/DatePicker/core/index.d.mts +28 -0
  167. package/es/DatePicker/core/interface.d.mts +1 -2
  168. package/es/DatePicker/generatePicker.d.mts +1 -2
  169. package/es/DatePicker/legacyDate.mjs.map +1 -1
  170. package/es/DatePicker/locale.d.mts +1 -2
  171. package/es/DatePicker/locale.mjs.map +1 -1
  172. package/es/DatePicker/type.d.mts +1 -2
  173. package/es/DatePicker/usePickerShared.mjs.map +1 -1
  174. package/es/Descriptions/Descriptions.d.mts +1 -2
  175. package/es/Descriptions/type.d.mts +1 -2
  176. package/es/Divider/Divider.d.mts +1 -2
  177. package/es/Divider/type.d.mts +1 -2
  178. package/es/DownloadButton/DownloadButton.d.mts +1 -2
  179. package/es/DownloadButton/type.d.mts +1 -2
  180. package/es/DraggablePanel/DraggablePanel.d.mts +1 -2
  181. package/es/DraggablePanel/atoms.d.mts +1 -2
  182. package/es/DraggablePanel/context.d.mts +1 -2
  183. package/es/DraggablePanel/core/axes.d.mts +1 -2
  184. package/es/DraggablePanel/core/controller.d.mts +1 -2
  185. package/es/DraggablePanel/type.d.mts +1 -2
  186. package/es/DraggableSideNav/DraggableSideNav.d.mts +1 -2
  187. package/es/DraggableSideNav/type.d.mts +1 -2
  188. package/es/Drawer/Drawer.d.mts +1 -2
  189. package/es/Drawer/atoms.d.mts +1 -2
  190. package/es/Drawer/constants.d.mts +1 -2
  191. package/es/Drawer/type.d.mts +1 -2
  192. package/es/DropdownMenu/DropdownMenu.d.mts +1 -2
  193. package/es/DropdownMenu/atoms.d.mts +1 -2
  194. package/es/DropdownMenu/renderItems.d.mts +1 -2
  195. package/es/DropdownMenu/style.d.mts +1 -2
  196. package/es/DropdownMenu/type.d.mts +1 -2
  197. package/es/EditableText/ControlInput.d.mts +1 -2
  198. package/es/EditableText/EditableText.d.mts +1 -2
  199. package/es/EditableText/EditableText.mjs.map +1 -1
  200. package/es/EditableText/type.d.mts +1 -2
  201. package/es/EditorSlashMenu/EditorSlashMenu.d.mts +1 -2
  202. package/es/EditorSlashMenu/EditorSlashMenu.mjs.map +1 -1
  203. package/es/EditorSlashMenu/atoms.d.mts +1 -2
  204. package/es/EditorSlashMenu/type.d.mts +1 -2
  205. package/es/EmojiPicker/EmojiPicker.d.mts +1 -2
  206. package/es/EmojiPicker/type.d.mts +1 -2
  207. package/es/Empty/Empty.d.mts +1 -2
  208. package/es/Empty/Empty.mjs.map +1 -1
  209. package/es/Empty/type.d.mts +1 -2
  210. package/es/FileTypeIcon/FileTypeIcon.d.mts +1 -2
  211. package/es/FileTypeIcon/type.d.mts +1 -2
  212. package/es/Flex/Center.d.mts +1 -2
  213. package/es/Flex/FlexBasic.d.mts +1 -2
  214. package/es/Flex/type.d.mts +1 -2
  215. package/es/FloatingPanel/FloatingPanel.d.mts +1 -2
  216. package/es/FloatingPanel/type.d.mts +1 -2
  217. package/es/FloatingSheet/FloatingSheet.d.mts +1 -2
  218. package/es/FloatingSheet/type.d.mts +1 -2
  219. package/es/FluentEmoji/FluentEmoji.d.mts +1 -2
  220. package/es/FluentEmoji/type.d.mts +1 -2
  221. package/es/FluentEmoji/utils.d.mts +1 -2
  222. package/es/FocusScope/FocusScope.d.mts +1 -2
  223. package/es/FocusScope/store.d.mts +1 -2
  224. package/es/FocusScope/style.d.mts +1 -2
  225. package/es/FocusScope/useScopeArrowNav.d.mts +1 -2
  226. package/es/FocusScope/useScopeSwitcher.d.mts +1 -2
  227. package/es/FontLoader/index.d.mts +1 -2
  228. package/es/FontLoader/index.mjs +2 -2
  229. package/es/FontLoader/index.mjs.map +1 -1
  230. package/es/Form/Form.mjs +5 -5
  231. package/es/Form/Form.mjs.map +1 -1
  232. package/es/Form/components/FormDivider.d.mts +1 -2
  233. package/es/Form/components/FormField.d.mts +1 -2
  234. package/es/Form/components/FormFlatGroup.d.mts +1 -2
  235. package/es/Form/components/FormFooter.d.mts +1 -2
  236. package/es/Form/components/FormGroup.d.mts +1 -2
  237. package/es/Form/components/FormSubmitFooter.d.mts +1 -2
  238. package/es/Form/components/FormTitle.d.mts +1 -2
  239. package/es/Form/context.d.mts +1 -2
  240. package/es/Form/index.d.mts +1 -2
  241. package/es/Form/type.d.mts +1 -2
  242. package/es/FormKit/Field.d.mts +1 -2
  243. package/es/FormKit/List.d.mts +1 -2
  244. package/es/FormKit/SubmitFooter.d.mts +1 -2
  245. package/es/FormKit/context.d.mts +1 -2
  246. package/es/FormKit/engine/tanstack.mjs.map +1 -1
  247. package/es/FormKit/engine/types.d.mts +1 -2
  248. package/es/FormKit/index.d.mts +1 -2
  249. package/es/FormKit/schema.d.mts +1 -2
  250. package/es/FormKit/type.d.mts +1 -2
  251. package/es/FormKit/useForm.d.mts +1 -2
  252. package/es/FormKit/useWatch.d.mts +1 -2
  253. package/es/Freeze/Freeze.d.mts +1 -2
  254. package/es/Freeze/type.d.mts +1 -2
  255. package/es/GlobalFocusRing/index.d.mts +1 -2
  256. package/es/Grid/Grid.d.mts +1 -2
  257. package/es/Grid/type.d.mts +1 -2
  258. package/es/GroupAvatar/GroupAvatar.d.mts +1 -2
  259. package/es/GroupAvatar/type.d.mts +1 -2
  260. package/es/GuideCard/GuideCard.d.mts +1 -2
  261. package/es/GuideCard/type.d.mts +1 -2
  262. package/es/Header/Header.d.mts +1 -2
  263. package/es/Header/type.d.mts +1 -2
  264. package/es/Highlighter/Highlighter.d.mts +1 -2
  265. package/es/Highlighter/SyntaxHighlighter/index.d.mts +1 -2
  266. package/es/Highlighter/const.d.mts +1 -2
  267. package/es/Highlighter/theme/lobe-highlights-theme.d.mts +1 -2
  268. package/es/Highlighter/theme/lobe-theme.d.mts +1 -2
  269. package/es/Highlighter/type.d.mts +1 -2
  270. package/es/Hotkey/Hotkey.d.mts +1 -2
  271. package/es/Hotkey/const.d.mts +1 -2
  272. package/es/Hotkey/type.d.mts +1 -2
  273. package/es/Hotkey/utils.d.mts +1 -2
  274. package/es/HotkeyInput/HotkeyInput.d.mts +1 -2
  275. package/es/HotkeyInput/type.d.mts +1 -2
  276. package/es/HtmlPreview/HtmlPreview.d.mts +1 -2
  277. package/es/HtmlPreview/HtmlPreview.mjs.map +1 -1
  278. package/es/HtmlPreview/Iframe.d.mts +1 -2
  279. package/es/HtmlPreview/Iframe.mjs.map +1 -1
  280. package/es/HtmlPreview/const.d.mts +1 -2
  281. package/es/HtmlPreview/injectAutoHeightScript.d.mts +1 -2
  282. package/es/HtmlPreview/type.d.mts +1 -2
  283. package/es/Icon/Icon.d.mts +1 -2
  284. package/es/Icon/components/IconProvider.d.mts +1 -2
  285. package/es/Icon/type.d.mts +1 -2
  286. package/es/Image/PreviewGroup.d.mts +1 -2
  287. package/es/Image/index.d.mts +1 -2
  288. package/es/Image/type.d.mts +1 -2
  289. package/es/Image/useImagePreview.d.mts +1 -2
  290. package/es/Image/viewer/geometry.d.mts +1 -2
  291. package/es/Image/viewer/registry.d.mts +1 -1
  292. package/es/ImageSelect/ImageSelect.d.mts +1 -2
  293. package/es/ImageSelect/type.d.mts +1 -2
  294. package/es/Input/Input.d.mts +1 -2
  295. package/es/Input/Input.mjs +5 -5
  296. package/es/Input/Input.mjs.map +1 -1
  297. package/es/Input/InputNumber.d.mts +1 -2
  298. package/es/Input/InputOTP.d.mts +1 -2
  299. package/es/Input/InputPassword.d.mts +1 -2
  300. package/es/Input/TextArea.d.mts +1 -2
  301. package/es/Input/style.d.mts +1 -2
  302. package/es/Input/type.d.mts +1 -2
  303. package/es/Layout/components/LayoutFooter.d.mts +1 -2
  304. package/es/Layout/components/LayoutHeader.d.mts +1 -2
  305. package/es/Layout/components/LayoutMain.d.mts +1 -2
  306. package/es/Layout/components/LayoutSidebar.d.mts +1 -2
  307. package/es/Layout/components/LayoutSidebarInner.d.mts +1 -2
  308. package/es/Layout/components/LayoutToc.d.mts +1 -2
  309. package/es/Layout/index.d.mts +1 -2
  310. package/es/Layout/type.d.mts +1 -2
  311. package/es/List/List.d.mts +1 -2
  312. package/es/List/ListRow.d.mts +1 -1
  313. package/es/List/type.d.mts +1 -2
  314. package/es/Markdown/Markdown.d.mts +1 -2
  315. package/es/Markdown/Typography.d.mts +1 -2
  316. package/es/Markdown/components/SearchResultCards/index.d.mts +1 -2
  317. package/es/Markdown/plugins/rehypeCustomFootnotes.d.mts +1 -2
  318. package/es/Markdown/plugins/rehypeKatexDir.d.mts +1 -2
  319. package/es/Markdown/plugins/remarkBr.d.mts +1 -2
  320. package/es/Markdown/plugins/remarkColor.d.mts +1 -2
  321. package/es/Markdown/plugins/remarkCustomFootnotes.d.mts +1 -2
  322. package/es/Markdown/plugins/remarkGfmPlus.d.mts +1 -2
  323. package/es/Markdown/plugins/remarkVideo.d.mts +1 -2
  324. package/es/Markdown/type.d.mts +1 -2
  325. package/es/MaskShadow/MaskShadow.d.mts +1 -2
  326. package/es/MaskShadow/type.d.mts +1 -2
  327. package/es/MaterialFileTypeIcon/MaterialFileTypeIcon.d.mts +1 -2
  328. package/es/MaterialFileTypeIcon/icon-map.json.d.mts +1 -2
  329. package/es/MaterialFileTypeIcon/{icon-map.mjs → icon-map.json.mjs} +1 -1
  330. package/es/MaterialFileTypeIcon/icon-map.json.mjs.map +1 -0
  331. package/es/MaterialFileTypeIcon/type.d.mts +1 -2
  332. package/es/MaterialFileTypeIcon/utils.mjs +1 -1
  333. package/es/Mermaid/Mermaid.d.mts +1 -2
  334. package/es/Mermaid/SyntaxMermaid/index.d.mts +1 -2
  335. package/es/Mermaid/const.d.mts +1 -2
  336. package/es/Mermaid/index.d.mts +1 -2
  337. package/es/Mermaid/themes.d.mts +2 -3
  338. package/es/Mermaid/type.d.mts +1 -2
  339. package/es/Meta/Meta.d.mts +1 -2
  340. package/es/Modal/Modal.d.mts +1 -2
  341. package/es/Modal/atoms.d.mts +1 -2
  342. package/es/Modal/constants.d.mts +1 -2
  343. package/es/Modal/context.d.mts +1 -2
  344. package/es/Modal/imperative.d.mts +1 -2
  345. package/es/Modal/type.d.mts +1 -2
  346. package/es/MotionProvider/index.d.mts +1 -2
  347. package/es/Pagination/Pagination.d.mts +1 -2
  348. package/es/Pagination/type.d.mts +1 -2
  349. package/es/Popover/ArrowIcon.d.mts +1 -2
  350. package/es/Popover/Popover.d.mts +1 -2
  351. package/es/Popover/PopoverGroup.d.mts +1 -2
  352. package/es/Popover/PopoverPortal.d.mts +1 -2
  353. package/es/Popover/atoms.d.mts +1 -2
  354. package/es/Popover/context.d.mts +1 -2
  355. package/es/Popover/groupContext.d.mts +1 -2
  356. package/es/Popover/type.d.mts +10 -12
  357. package/es/ProTable/ProTable.d.mts +1 -2
  358. package/es/ProTable/ProTable.mjs.map +1 -1
  359. package/es/ProTable/hooks/useFetchData.mjs.map +1 -1
  360. package/es/ProTable/hooks/useFullscreen.mjs.map +1 -1
  361. package/es/ProTable/hooks/useProRequest.mjs.map +1 -1
  362. package/es/ProTable/locale.d.mts +1 -2
  363. package/es/ProTable/parts/LightFilter.mjs.map +1 -1
  364. package/es/ProTable/parts/renderValue.mjs.map +1 -1
  365. package/es/ProTable/type.d.mts +1 -2
  366. package/es/Progress/Progress.d.mts +1 -2
  367. package/es/Progress/type.d.mts +1 -2
  368. package/es/ProgressiveBlur/ProgressiveBlur.d.mts +1 -2
  369. package/es/ProgressiveBlur/type.d.mts +1 -2
  370. package/es/QRCode/QRCode.d.mts +1 -2
  371. package/es/QRCode/type.d.mts +1 -2
  372. package/es/Radio/Radio.d.mts +1 -2
  373. package/es/Radio/Radio.mjs +6 -6
  374. package/es/Radio/Radio.mjs.map +1 -1
  375. package/es/Radio/RadioGroup.d.mts +1 -2
  376. package/es/Radio/RadioGroup.mjs +5 -5
  377. package/es/Radio/RadioGroup.mjs.map +1 -1
  378. package/es/Radio/style.d.mts +1 -2
  379. package/es/Radio/type.d.mts +1 -2
  380. package/es/Rate/Rate.d.mts +1 -2
  381. package/es/Rate/type.d.mts +1 -2
  382. package/es/Result/Result.d.mts +1 -2
  383. package/es/Result/type.d.mts +1 -2
  384. package/es/ScrollArea/ScrollArea.d.mts +1 -2
  385. package/es/ScrollArea/atoms.d.mts +1 -2
  386. package/es/ScrollArea/type.d.mts +1 -2
  387. package/es/ScrollShadow/ScrollShadow.d.mts +1 -2
  388. package/es/ScrollShadow/type.d.mts +1 -2
  389. package/es/SearchBar/SearchBar.d.mts +1 -2
  390. package/es/SearchBar/type.d.mts +1 -2
  391. package/es/Segmented/Segmented.d.mts +1 -2
  392. package/es/Segmented/Segmented.mjs.map +1 -1
  393. package/es/Segmented/atoms.d.mts +1 -2
  394. package/es/Segmented/type.d.mts +3 -4
  395. package/es/Select/Select.d.mts +1 -2
  396. package/es/Select/Select.mjs +9 -9
  397. package/es/Select/Select.mjs.map +1 -1
  398. package/es/Select/atoms.d.mts +1 -2
  399. package/es/Select/hooks.mjs.map +1 -1
  400. package/es/Select/type.d.mts +1 -2
  401. package/es/SideNav/SideNav.d.mts +1 -2
  402. package/es/SideNav/type.d.mts +1 -2
  403. package/es/Skeleton/SkeletonAvatar.d.mts +1 -2
  404. package/es/Skeleton/SkeletonText.d.mts +1 -2
  405. package/es/Skeleton/index.d.mts +1 -2
  406. package/es/Skeleton/type.d.mts +1 -2
  407. package/es/Slider/Slider.d.mts +1 -2
  408. package/es/Slider/Slider.mjs +7 -7
  409. package/es/Slider/Slider.mjs.map +1 -1
  410. package/es/Slider/SliderWithInput.d.mts +1 -2
  411. package/es/Slider/style.d.mts +1 -2
  412. package/es/Slider/type.d.mts +1 -2
  413. package/es/Snippet/Snippet.d.mts +1 -2
  414. package/es/Snippet/type.d.mts +1 -2
  415. package/es/SortableList/SortableList.d.mts +1 -2
  416. package/es/SortableList/components/DragHandle.d.mts +1 -2
  417. package/es/SortableList/components/SortableItem.d.mts +1 -2
  418. package/es/SortableList/type.d.mts +1 -2
  419. package/es/Spin/Spin.d.mts +1 -2
  420. package/es/Spin/type.d.mts +1 -2
  421. package/es/Statistic/Statistic.d.mts +1 -2
  422. package/es/Statistic/formatValue.d.mts +1 -2
  423. package/es/Statistic/type.d.mts +1 -2
  424. package/es/Steps/Steps.d.mts +1 -2
  425. package/es/Steps/type.d.mts +1 -2
  426. package/es/Switch/Switch.d.mts +1 -2
  427. package/es/Switch/atoms.d.mts +1 -2
  428. package/es/Switch/style.d.mts +1 -2
  429. package/es/Switch/type.d.mts +1 -2
  430. package/es/Table/Column.d.mts +1 -2
  431. package/es/Table/ColumnGroup.d.mts +1 -2
  432. package/es/Table/Table.d.mts +1 -2
  433. package/es/Table/atoms/cells.d.mts +1 -2
  434. package/es/Table/atoms/layout.d.mts +1 -2
  435. package/es/Table/engine/types.d.mts +1 -1
  436. package/es/Table/internal.d.mts +1 -1
  437. package/es/Table/pipeline/columnUtils.d.mts +1 -2
  438. package/es/Table/pipeline/selectionUtils.d.mts +2 -3
  439. package/es/Table/render/SelectionCells.mjs.map +1 -1
  440. package/es/Table/render/Summary.d.mts +2 -3
  441. package/es/Table/store/createTableStore.d.mts +1 -1
  442. package/es/Table/type.d.mts +1 -2
  443. package/es/Tabs/Tabs.d.mts +1 -2
  444. package/es/Tabs/atoms.d.mts +1 -2
  445. package/es/Tabs/style.d.mts +1 -2
  446. package/es/Tabs/type.d.mts +1 -2
  447. package/es/Tag/Tag.d.mts +1 -2
  448. package/es/Tag/type.d.mts +1 -2
  449. package/es/Tag/utils.d.mts +1 -2
  450. package/es/Text/Text.d.mts +1 -2
  451. package/es/Text/Text.mjs.map +1 -1
  452. package/es/Text/style.d.mts +1 -2
  453. package/es/Text/type.d.mts +1 -2
  454. package/es/Toast/imperative.d.mts +1 -2
  455. package/es/Toast/type.d.mts +1 -2
  456. package/es/Toc/Toc.d.mts +1 -2
  457. package/es/Toc/Toc.mjs +1 -1
  458. package/es/Toc/toFlatTocItems.d.mts +1 -2
  459. package/es/Toc/tocPath.d.mts +1 -2
  460. package/es/Toc/type.d.mts +1 -2
  461. package/es/ToggleGroup/ToggleGroup.d.mts +1 -2
  462. package/es/ToggleGroup/atoms.d.mts +1 -2
  463. package/es/ToggleGroup/style.d.mts +1 -2
  464. package/es/ToggleGroup/type.d.mts +1 -2
  465. package/es/Tooltip/Tooltip.d.mts +1 -2
  466. package/es/Tooltip/TooltipGroup.d.mts +1 -2
  467. package/es/Tooltip/type.d.mts +8 -10
  468. package/es/Tree/Tree.d.mts +1 -2
  469. package/es/Tree/style.d.mts +1 -2
  470. package/es/Tree/type.d.mts +1 -2
  471. package/es/Tree/utils.d.mts +1 -2
  472. package/es/Upload/Upload.d.mts +1 -2
  473. package/es/Upload/Upload.mjs +5 -5
  474. package/es/Upload/Upload.mjs.map +1 -1
  475. package/es/Upload/UploadDragger.d.mts +1 -2
  476. package/es/Upload/type.d.mts +1 -2
  477. package/es/Video/index.d.mts +1 -2
  478. package/es/Video/parts/Caption.d.mts +1 -2
  479. package/es/Video/parts/CenterPlay.d.mts +1 -2
  480. package/es/Video/parts/CenterPlay.mjs.map +1 -1
  481. package/es/Video/parts/Controls.d.mts +1 -2
  482. package/es/Video/parts/Frame.d.mts +1 -2
  483. package/es/Video/parts/LoadError.d.mts +1 -2
  484. package/es/Video/parts/Root.d.mts +1 -2
  485. package/es/Video/parts/SectionList.d.mts +1 -2
  486. package/es/Video/parts/Timeline.d.mts +1 -2
  487. package/es/Video/store.mjs.map +1 -1
  488. package/es/Video/type.d.mts +1 -2
  489. package/es/Video/useVideo.d.mts +1 -2
  490. package/es/_virtual/_rolldown/runtime.mjs +4 -4
  491. package/es/awesome/AgentSkillCard/AgentSkillCard.d.mts +1 -2
  492. package/es/awesome/AgentSkillCard/AgentSkillCard.mjs +2 -2
  493. package/es/awesome/AgentSkillCard/AgentSkillCard.mjs.map +1 -1
  494. package/es/awesome/AgentSkillCard/agents.d.mts +1 -2
  495. package/es/awesome/AgentSkillCard/type.d.mts +2 -3
  496. package/es/awesome/AuroraBackground/AuroraBackground.d.mts +1 -2
  497. package/es/awesome/AuroraBackground/type.d.mts +1 -2
  498. package/es/awesome/BentoGrid/BentoCard.d.mts +1 -2
  499. package/es/awesome/BentoGrid/BentoGrid.d.mts +1 -2
  500. package/es/awesome/BentoGrid/type.d.mts +1 -2
  501. package/es/awesome/BottomGradientButton/BottomGradientButton.d.mts +1 -2
  502. package/es/awesome/BottomGradientButton/type.d.mts +1 -2
  503. package/es/awesome/CodeShowcase/CodeShowcase.d.mts +1 -2
  504. package/es/awesome/CodeShowcase/type.d.mts +1 -2
  505. package/es/awesome/FeatureGrid/FeatureGrid.d.mts +1 -2
  506. package/es/awesome/FeatureGrid/type.d.mts +1 -2
  507. package/es/awesome/Features/Features.d.mts +1 -2
  508. package/es/awesome/Features/type.d.mts +1 -2
  509. package/es/awesome/FluidGradient/FluidGradient.d.mts +1 -2
  510. package/es/awesome/FluidGradient/type.d.mts +1 -2
  511. package/es/awesome/Giscus/Giscus.d.mts +1 -2
  512. package/es/awesome/Giscus/type.d.mts +1 -2
  513. package/es/awesome/GradientButton/GradientButton.d.mts +1 -2
  514. package/es/awesome/GradientButton/type.d.mts +1 -2
  515. package/es/awesome/Grainient/Grainient.d.mts +1 -2
  516. package/es/awesome/Grainient/type.d.mts +1 -2
  517. package/es/awesome/GridBackground/GridBackground.d.mts +1 -2
  518. package/es/awesome/GridBackground/GridShowcase.d.mts +1 -2
  519. package/es/awesome/GridBackground/type.d.mts +1 -2
  520. package/es/awesome/Hero/Hero.d.mts +1 -2
  521. package/es/awesome/Hero/type.d.mts +1 -2
  522. package/es/awesome/InstallBanner/InstallBanner.d.mts +1 -2
  523. package/es/awesome/InstallBanner/type.d.mts +1 -2
  524. package/es/awesome/LandingHero/LandingHero.d.mts +1 -2
  525. package/es/awesome/LandingHero/type.d.mts +1 -2
  526. package/es/awesome/LandingSection/LandingSection.d.mts +1 -2
  527. package/es/awesome/LandingSection/type.d.mts +1 -2
  528. package/es/awesome/LogoMarquee/LogoMarquee.d.mts +1 -2
  529. package/es/awesome/LogoMarquee/type.d.mts +1 -2
  530. package/es/awesome/Spotlight/Spotlight.d.mts +1 -2
  531. package/es/awesome/Spotlight/type.d.mts +1 -2
  532. package/es/awesome/SpotlightCard/SpotlightCard.d.mts +1 -2
  533. package/es/awesome/SpotlightCard/SpotlightCard.mjs.map +1 -1
  534. package/es/awesome/SpotlightCard/type.d.mts +1 -2
  535. package/es/awesome/TypewriterEffect/TypewriterEffect.d.mts +1 -2
  536. package/es/awesome/TypewriterEffect/type.d.mts +1 -2
  537. package/es/awesome/landingActions.d.mts +1 -2
  538. package/es/awesome/landingLink.d.mts +1 -2
  539. package/es/awesome/landingTokens.d.mts +1 -2
  540. package/es/brand/BrandLoading/index.d.mts +1 -2
  541. package/es/brand/LobeChat/index.d.mts +1 -2
  542. package/es/brand/LobeChatText/index.d.mts +1 -2
  543. package/es/brand/LobeHub/index.d.mts +1 -2
  544. package/es/brand/LobeHubText/index.d.mts +1 -2
  545. package/es/brand/Logo3d/index.d.mts +1 -2
  546. package/es/brand/LogoFlat/index.d.mts +1 -2
  547. package/es/chat/BackBottom/BackBottom.d.mts +1 -2
  548. package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
  549. package/es/chat/BackBottom/type.d.mts +1 -2
  550. package/es/chat/ChatHeader/ChatHeaderTitle.d.mts +1 -2
  551. package/es/chat/ChatHeader/index.d.mts +1 -2
  552. package/es/chat/ChatHeader/type.d.mts +1 -2
  553. package/es/chat/ChatInputArea/components/ChatInputActionBar.d.mts +1 -2
  554. package/es/chat/ChatInputArea/components/ChatInputAreaInner.d.mts +1 -2
  555. package/es/chat/ChatInputArea/components/ChatSendButton.d.mts +1 -2
  556. package/es/chat/ChatInputArea/index.d.mts +1 -2
  557. package/es/chat/ChatInputArea/type.d.mts +1 -2
  558. package/es/chat/ChatItem/ChatItem.d.mts +1 -2
  559. package/es/chat/ChatItem/type.d.mts +1 -2
  560. package/es/chat/ChatList/ChatList.d.mts +1 -2
  561. package/es/chat/ChatList/components/ChatActionsBar.d.mts +1 -2
  562. package/es/chat/ChatList/type.d.mts +1 -2
  563. package/es/chat/EditableMessage/EditableMessage.d.mts +1 -2
  564. package/es/chat/EditableMessage/type.d.mts +1 -2
  565. package/es/chat/EditableMessageList/EditableMessageList.d.mts +1 -2
  566. package/es/chat/EditableMessageList/type.d.mts +1 -2
  567. package/es/chat/LoadingDots/LoadingDots.d.mts +1 -2
  568. package/es/chat/LoadingDots/type.d.mts +1 -2
  569. package/es/chat/MessageInput/MessageInput.d.mts +1 -2
  570. package/es/chat/MessageInput/type.d.mts +1 -2
  571. package/es/chat/MessageModal/MessageModal.d.mts +1 -2
  572. package/es/chat/MessageModal/type.d.mts +1 -2
  573. package/es/chat/TokenTag/TokenTag.d.mts +1 -2
  574. package/es/chat/TokenTag/type.d.mts +1 -2
  575. package/es/chat/types/chatMessage.d.mts +1 -2
  576. package/es/chat/types/error.d.mts +1 -2
  577. package/es/chat/types/llm.d.mts +1 -2
  578. package/es/chat/types/meta.d.mts +1 -2
  579. package/es/color/ColorScales/index.d.mts +1 -2
  580. package/es/color/CssVar/index.d.mts +1 -2
  581. package/es/color/colors/blue.d.mts +1 -2
  582. package/es/color/colors/cyan.d.mts +1 -2
  583. package/es/color/colors/geekblue.d.mts +1 -2
  584. package/es/color/colors/gold.d.mts +1 -2
  585. package/es/color/colors/gray.d.mts +1 -2
  586. package/es/color/colors/green.d.mts +1 -2
  587. package/es/color/colors/index.d.mts +1 -2
  588. package/es/color/colors/index.mjs.map +1 -1
  589. package/es/color/colors/lime.d.mts +1 -2
  590. package/es/color/colors/magenta.d.mts +1 -2
  591. package/es/color/colors/orange.d.mts +1 -2
  592. package/es/color/colors/primary.d.mts +1 -2
  593. package/es/color/colors/purple.d.mts +1 -2
  594. package/es/color/colors/red.d.mts +1 -2
  595. package/es/color/colors/volcano.d.mts +1 -2
  596. package/es/color/colors/yellow.d.mts +1 -2
  597. package/es/color/neutrals/index.d.mts +1 -2
  598. package/es/color/neutrals/mauve.d.mts +1 -2
  599. package/es/color/neutrals/olive.d.mts +1 -2
  600. package/es/color/neutrals/sage.d.mts +1 -2
  601. package/es/color/neutrals/sand.d.mts +1 -2
  602. package/es/color/neutrals/slate.d.mts +1 -2
  603. package/es/color/status/index.d.mts +1 -2
  604. package/es/color/types.d.mts +1 -2
  605. package/es/dashboard/AuthLayout/Aside.d.mts +1 -2
  606. package/es/dashboard/AuthLayout/AuthLayout.d.mts +1 -2
  607. package/es/dashboard/AuthLayout/type.d.mts +1 -2
  608. package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +1 -2
  609. package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +1 -2
  610. package/es/dashboard/AuthTools/type.d.mts +1 -2
  611. package/es/dashboard/Breadcrumb/Breadcrumb.d.mts +1 -2
  612. package/es/dashboard/Breadcrumb/type.d.mts +1 -2
  613. package/es/dashboard/ChartGrid/ChartGrid.d.mts +1 -2
  614. package/es/dashboard/ChartGrid/type.d.mts +1 -2
  615. package/es/dashboard/ConsoleNav/ConsoleNav.d.mts +1 -2
  616. package/es/dashboard/ConsoleNav/Skeleton.d.mts +1 -2
  617. package/es/dashboard/ConsoleNav/active.d.mts +1 -2
  618. package/es/dashboard/ConsoleNav/type.d.mts +1 -2
  619. package/es/dashboard/ConsoleShell/ConsoleBrand.d.mts +1 -2
  620. package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -2
  621. package/es/dashboard/ConsoleShell/context.d.mts +1 -2
  622. package/es/dashboard/ConsoleShell/type.d.mts +1 -2
  623. package/es/dashboard/FilterSidebar/FilterSidebar.d.mts +1 -2
  624. package/es/dashboard/FilterSidebar/context.d.mts +2 -3
  625. package/es/dashboard/FilterSidebar/type.d.mts +1 -2
  626. package/es/dashboard/FilterStrip/FilterStrip.d.mts +1 -2
  627. package/es/dashboard/FilterStrip/type.d.mts +1 -2
  628. package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +1 -2
  629. package/es/dashboard/LabelWithKey/type.d.mts +1 -2
  630. package/es/dashboard/MetricStrip/MetricStrip.d.mts +1 -2
  631. package/es/dashboard/MetricStrip/type.d.mts +1 -2
  632. package/es/dashboard/PageHeader/PageHeader.d.mts +1 -2
  633. package/es/dashboard/PageHeader/type.d.mts +1 -2
  634. package/es/dashboard/PageSkeleton/PageSkeleton.d.mts +1 -2
  635. package/es/dashboard/PageSkeleton/type.d.mts +1 -2
  636. package/es/dashboard/PageTabs/PageTabs.d.mts +1 -2
  637. package/es/dashboard/PageTabs/type.d.mts +1 -2
  638. package/es/dashboard/PageToolbar/PageToolbar.d.mts +1 -2
  639. package/es/dashboard/PageToolbar/type.d.mts +1 -2
  640. package/es/dashboard/PanelSurface/PanelSurface.d.mts +1 -2
  641. package/es/dashboard/PanelSurface/type.d.mts +1 -2
  642. package/es/dashboard/RouteProgress/RouteProgress.d.mts +1 -2
  643. package/es/dashboard/RouteProgress/type.d.mts +1 -2
  644. package/es/dashboard/Section/Section.d.mts +1 -2
  645. package/es/dashboard/Section/type.d.mts +1 -2
  646. package/es/dashboard/StatCard/StatCard.d.mts +1 -2
  647. package/es/dashboard/StatCard/type.d.mts +1 -2
  648. package/es/dashboard/Surface/Surface.d.mts +1 -2
  649. package/es/dashboard/Surface/link.d.mts +1 -2
  650. package/es/dashboard/Surface/style.d.mts +1 -2
  651. package/es/dashboard/Surface/type.d.mts +1 -2
  652. package/es/dashboard/TableIconActions/TableIconActions.d.mts +1 -2
  653. package/es/dashboard/TableIconActions/type.d.mts +1 -2
  654. package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +1 -2
  655. package/es/dashboard/TitleWithTips/type.d.mts +1 -2
  656. package/es/eslint/index.d.mts +1 -2
  657. package/es/hooks/useMarkdown/utils.d.mts +1 -2
  658. package/es/hooks/useScroll.d.mts +1 -2
  659. package/es/i18n/context.d.mts +1 -2
  660. package/es/i18n/resources/en/burger.d.mts +1 -2
  661. package/es/i18n/resources/en/chat.d.mts +1 -2
  662. package/es/i18n/resources/en/colorPicker.d.mts +1 -2
  663. package/es/i18n/resources/en/common.d.mts +1 -2
  664. package/es/i18n/resources/en/datePicker.d.mts +1 -2
  665. package/es/i18n/resources/en/editableMessage.d.mts +1 -2
  666. package/es/i18n/resources/en/emojiPicker.d.mts +1 -2
  667. package/es/i18n/resources/en/form.d.mts +1 -2
  668. package/es/i18n/resources/en/hotkey.d.mts +1 -2
  669. package/es/i18n/resources/en/image.d.mts +1 -2
  670. package/es/i18n/resources/en/index.d.mts +1 -2
  671. package/es/i18n/resources/en/messageModal.d.mts +1 -2
  672. package/es/i18n/resources/en/qrCode.d.mts +1 -2
  673. package/es/i18n/resources/en/sideNav.d.mts +1 -2
  674. package/es/i18n/resources/en/table.d.mts +1 -2
  675. package/es/i18n/resources/en/toc.d.mts +1 -2
  676. package/es/i18n/resources/en/video.d.mts +1 -2
  677. package/es/i18n/resources/zhCn/burger.d.mts +1 -2
  678. package/es/i18n/resources/zhCn/chat.d.mts +1 -2
  679. package/es/i18n/resources/zhCn/colorPicker.d.mts +1 -2
  680. package/es/i18n/resources/zhCn/common.d.mts +1 -2
  681. package/es/i18n/resources/zhCn/datePicker.d.mts +1 -2
  682. package/es/i18n/resources/zhCn/editableMessage.d.mts +1 -2
  683. package/es/i18n/resources/zhCn/emojiPicker.d.mts +1 -2
  684. package/es/i18n/resources/zhCn/form.d.mts +1 -2
  685. package/es/i18n/resources/zhCn/hotkey.d.mts +1 -2
  686. package/es/i18n/resources/zhCn/image.d.mts +1 -2
  687. package/es/i18n/resources/zhCn/index.d.mts +1 -2
  688. package/es/i18n/resources/zhCn/messageModal.d.mts +1 -2
  689. package/es/i18n/resources/zhCn/qrCode.d.mts +1 -2
  690. package/es/i18n/resources/zhCn/sideNav.d.mts +1 -2
  691. package/es/i18n/resources/zhCn/table.d.mts +1 -2
  692. package/es/i18n/resources/zhCn/toc.d.mts +1 -2
  693. package/es/i18n/resources/zhCn/video.d.mts +1 -2
  694. package/es/i18n/types.d.mts +1 -2
  695. package/es/i18n/useTranslation.d.mts +1 -2
  696. package/es/icons/Auth0/components/Avatar.d.mts +1 -2
  697. package/es/icons/Auth0/components/Mono.d.mts +1 -2
  698. package/es/icons/Auth0/index.d.mts +1 -2
  699. package/es/icons/Authelia/components/Avatar.d.mts +1 -2
  700. package/es/icons/Authelia/components/Color.d.mts +1 -2
  701. package/es/icons/Authelia/components/Mono.d.mts +1 -2
  702. package/es/icons/Authelia/index.d.mts +1 -2
  703. package/es/icons/Authentik/components/Avatar.d.mts +1 -2
  704. package/es/icons/Authentik/components/Color.d.mts +1 -2
  705. package/es/icons/Authentik/components/Mono.d.mts +1 -2
  706. package/es/icons/Authentik/index.d.mts +1 -2
  707. package/es/icons/Casdoor/components/Avatar.d.mts +1 -2
  708. package/es/icons/Casdoor/components/Color.d.mts +1 -2
  709. package/es/icons/Casdoor/components/Mono.d.mts +1 -2
  710. package/es/icons/Casdoor/index.d.mts +1 -2
  711. package/es/icons/Clerk/components/Avatar.d.mts +1 -2
  712. package/es/icons/Clerk/components/Color.d.mts +1 -2
  713. package/es/icons/Clerk/components/Mono.d.mts +1 -2
  714. package/es/icons/Clerk/index.d.mts +1 -2
  715. package/es/icons/DingTalk/components/Avatar.d.mts +1 -2
  716. package/es/icons/DingTalk/components/Color.d.mts +1 -2
  717. package/es/icons/DingTalk/components/Mono.d.mts +1 -2
  718. package/es/icons/DingTalk/index.d.mts +1 -2
  719. package/es/icons/Discord/components/Avatar.d.mts +1 -2
  720. package/es/icons/Discord/components/Color.d.mts +1 -2
  721. package/es/icons/Discord/components/Mono.d.mts +1 -2
  722. package/es/icons/Discord/index.d.mts +1 -2
  723. package/es/icons/GoogleChat/components/Avatar.d.mts +1 -2
  724. package/es/icons/GoogleChat/components/Color.d.mts +1 -2
  725. package/es/icons/GoogleChat/components/Mono.d.mts +1 -2
  726. package/es/icons/GoogleChat/index.d.mts +1 -2
  727. package/es/icons/IMessage/components/Avatar.d.mts +1 -2
  728. package/es/icons/IMessage/components/Color.d.mts +1 -2
  729. package/es/icons/IMessage/components/Mono.d.mts +1 -2
  730. package/es/icons/IMessage/index.d.mts +1 -2
  731. package/es/icons/Lark/components/Avatar.d.mts +1 -2
  732. package/es/icons/Lark/components/Color.d.mts +1 -2
  733. package/es/icons/Lark/components/Mono.d.mts +1 -2
  734. package/es/icons/Lark/index.d.mts +1 -2
  735. package/es/icons/Line/components/Avatar.d.mts +1 -2
  736. package/es/icons/Line/components/Color.d.mts +1 -2
  737. package/es/icons/Line/components/Mono.d.mts +1 -2
  738. package/es/icons/Line/index.d.mts +1 -2
  739. package/es/icons/Logto/components/Avatar.d.mts +1 -2
  740. package/es/icons/Logto/components/Color.d.mts +1 -2
  741. package/es/icons/Logto/components/Mono.d.mts +1 -2
  742. package/es/icons/Logto/index.d.mts +1 -2
  743. package/es/icons/MicrosoftEntra/components/Avatar.d.mts +1 -2
  744. package/es/icons/MicrosoftEntra/components/Color.d.mts +1 -2
  745. package/es/icons/MicrosoftEntra/components/Mono.d.mts +1 -2
  746. package/es/icons/MicrosoftEntra/index.d.mts +1 -2
  747. package/es/icons/MicrosoftTeams/components/Avatar.d.mts +1 -2
  748. package/es/icons/MicrosoftTeams/components/Color.d.mts +1 -2
  749. package/es/icons/MicrosoftTeams/components/Mono.d.mts +1 -2
  750. package/es/icons/MicrosoftTeams/index.d.mts +1 -2
  751. package/es/icons/NextAuth/components/Avatar.d.mts +1 -2
  752. package/es/icons/NextAuth/components/Color.d.mts +1 -2
  753. package/es/icons/NextAuth/components/Mono.d.mts +1 -2
  754. package/es/icons/NextAuth/index.d.mts +1 -2
  755. package/es/icons/QQ/components/Avatar.d.mts +1 -2
  756. package/es/icons/QQ/components/Color.d.mts +1 -2
  757. package/es/icons/QQ/components/Mono.d.mts +1 -2
  758. package/es/icons/QQ/index.d.mts +1 -2
  759. package/es/icons/Slack/components/Avatar.d.mts +1 -2
  760. package/es/icons/Slack/components/Color.d.mts +1 -2
  761. package/es/icons/Slack/components/Mono.d.mts +1 -2
  762. package/es/icons/Slack/index.d.mts +1 -2
  763. package/es/icons/Telegram/components/Avatar.d.mts +1 -2
  764. package/es/icons/Telegram/components/Color.d.mts +1 -2
  765. package/es/icons/Telegram/components/Mono.d.mts +1 -2
  766. package/es/icons/Telegram/index.d.mts +1 -2
  767. package/es/icons/WeChat/components/Avatar.d.mts +1 -2
  768. package/es/icons/WeChat/components/Color.d.mts +1 -2
  769. package/es/icons/WeChat/components/Mono.d.mts +1 -2
  770. package/es/icons/WeChat/index.d.mts +1 -2
  771. package/es/icons/WhatsApp/components/Avatar.d.mts +1 -2
  772. package/es/icons/WhatsApp/components/Color.d.mts +1 -2
  773. package/es/icons/WhatsApp/components/Mono.d.mts +1 -2
  774. package/es/icons/WhatsApp/index.d.mts +1 -2
  775. package/es/icons/Zitadel/components/Avatar.d.mts +1 -2
  776. package/es/icons/Zitadel/components/Color.d.mts +1 -2
  777. package/es/icons/Zitadel/components/Mono.d.mts +1 -2
  778. package/es/icons/Zitadel/index.d.mts +1 -2
  779. package/es/icons/lucideExtra/AndroidIcon.d.mts +1 -2
  780. package/es/icons/lucideExtra/AppleIcon.d.mts +1 -2
  781. package/es/icons/lucideExtra/AppstoreIcon.d.mts +1 -2
  782. package/es/icons/lucideExtra/BotPromptIcon.d.mts +1 -2
  783. package/es/icons/lucideExtra/BrainOffIcon.d.mts +1 -2
  784. package/es/icons/lucideExtra/ChromeIcon.d.mts +1 -2
  785. package/es/icons/lucideExtra/CodepenIcon.d.mts +1 -2
  786. package/es/icons/lucideExtra/CodesandboxIcon.d.mts +1 -2
  787. package/es/icons/lucideExtra/CreateBotIcon.d.mts +1 -2
  788. package/es/icons/lucideExtra/DiscordIcon.d.mts +1 -2
  789. package/es/icons/lucideExtra/FacebookIcon.d.mts +1 -2
  790. package/es/icons/lucideExtra/FigmaIcon.d.mts +1 -2
  791. package/es/icons/lucideExtra/FramerIcon.d.mts +1 -2
  792. package/es/icons/lucideExtra/GithubIcon.d.mts +1 -2
  793. package/es/icons/lucideExtra/GitlabIcon.d.mts +1 -2
  794. package/es/icons/lucideExtra/GlobeOffIcon.d.mts +1 -2
  795. package/es/icons/lucideExtra/GooglePlayIcon.d.mts +1 -2
  796. package/es/icons/lucideExtra/GroupBotIcon.d.mts +1 -2
  797. package/es/icons/lucideExtra/GroupBotSquareIcon.d.mts +1 -2
  798. package/es/icons/lucideExtra/InstagramIcon.d.mts +1 -2
  799. package/es/icons/lucideExtra/LeftClickIcon.d.mts +1 -2
  800. package/es/icons/lucideExtra/LeftDoubleClickIcon.d.mts +1 -2
  801. package/es/icons/lucideExtra/LinkedinIcon.d.mts +1 -2
  802. package/es/icons/lucideExtra/McpIcon.d.mts +1 -2
  803. package/es/icons/lucideExtra/NotionIcon.d.mts +1 -2
  804. package/es/icons/lucideExtra/PocketIcon.d.mts +1 -2
  805. package/es/icons/lucideExtra/ProviderIcon.d.mts +1 -2
  806. package/es/icons/lucideExtra/RailSymbolIcon.d.mts +1 -2
  807. package/es/icons/lucideExtra/RedditIcon.d.mts +1 -2
  808. package/es/icons/lucideExtra/RightClickIcon.d.mts +1 -2
  809. package/es/icons/lucideExtra/RightDoubleClickIcon.d.mts +1 -2
  810. package/es/icons/lucideExtra/ShapesUploadIcon.d.mts +1 -2
  811. package/es/icons/lucideExtra/SkillsIcon.d.mts +1 -2
  812. package/es/icons/lucideExtra/SlackIcon.d.mts +1 -2
  813. package/es/icons/lucideExtra/ThinkIcon.d.mts +1 -2
  814. package/es/icons/lucideExtra/TreeDownRightIcon.d.mts +1 -2
  815. package/es/icons/lucideExtra/TreeUpDownRightIcon.d.mts +1 -2
  816. package/es/internal/controlSize.d.mts +1 -2
  817. package/es/internal/floating/collisionPadding.d.mts +1 -2
  818. package/es/internal/menu/baseItem.d.mts +1 -2
  819. package/es/internal/menu/checkboxItem.d.mts +1 -2
  820. package/es/internal/menu/itemInterface.d.mts +1 -2
  821. package/es/internal/menu/renderUtils.d.mts +1 -2
  822. package/es/internal/menu/switchItem.d.mts +1 -2
  823. package/es/internal/menu/type.d.mts +1 -2
  824. package/es/internal/virtual/MenuVirtualList.d.mts +1 -1
  825. package/es/internal/virtual/VirtualScrollArea.d.mts +1 -1
  826. package/es/internal/virtual/type.d.mts +1 -2
  827. package/es/internal/virtual/useMenuVirtualList.d.mts +1 -1
  828. package/es/mdx/Callout/index.d.mts +1 -2
  829. package/es/mdx/Cards/Card.d.mts +1 -2
  830. package/es/mdx/Cards/index.d.mts +1 -2
  831. package/es/mdx/FileTree/File.d.mts +1 -2
  832. package/es/mdx/FileTree/File.mjs +3 -3
  833. package/es/mdx/FileTree/File.mjs.map +1 -1
  834. package/es/mdx/FileTree/Folder.d.mts +1 -2
  835. package/es/mdx/FileTree/Folder.mjs +3 -3
  836. package/es/mdx/FileTree/Folder.mjs.map +1 -1
  837. package/es/mdx/FileTree/index.d.mts +1 -2
  838. package/es/mdx/Mdx/index.d.mts +1 -2
  839. package/es/mdx/Steps/index.d.mts +1 -2
  840. package/es/mdx/Tabs/Tab.d.mts +1 -2
  841. package/es/mdx/Tabs/index.d.mts +1 -2
  842. package/es/mdx/mdxComponents/CodeBlock.d.mts +1 -2
  843. package/es/mdx/mdxComponents/Image.d.mts +1 -2
  844. package/es/mdx/mdxComponents/Link.d.mts +1 -2
  845. package/es/mdx/mdxComponents/Pre.d.mts +1 -2
  846. package/es/mdx/mdxComponents/Video.d.mts +1 -2
  847. package/es/mdx/mdxComponents/index.d.mts +1 -2
  848. package/es/mobile/ChatHeader/ChatHeaderTitle.d.mts +1 -2
  849. package/es/mobile/ChatHeader/index.d.mts +1 -2
  850. package/es/mobile/ChatHeader/type.d.mts +1 -2
  851. package/es/mobile/ChatInputArea/components/ChatSendButton.d.mts +1 -2
  852. package/es/mobile/ChatInputArea/index.d.mts +1 -2
  853. package/es/mobile/ChatInputArea/type.d.mts +1 -2
  854. package/es/mobile/SafeArea/SafeArea.d.mts +1 -2
  855. package/es/mobile/SafeArea/type.d.mts +1 -2
  856. package/es/mobile/TabBar/TabBar.d.mts +1 -2
  857. package/es/mobile/TabBar/type.d.mts +1 -2
  858. package/es/node_modules/.pnpm/@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.mts +4 -2
  859. package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.mts +1 -2
  860. package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/types.d.mts +5 -2
  861. package/es/node_modules/.pnpm/@types_estree@1.0.10/node_modules/@types/estree/index.d.mts +1 -2
  862. package/es/node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.d.mts +1 -2
  863. package/es/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.mts +1 -2
  864. package/es/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.mts +1 -2
  865. package/es/node_modules/.pnpm/eslint@10.14.0_jiti@2.7.0_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.mts +5 -2
  866. package/es/node_modules/.pnpm/unist-util-visit@5.2.0/node_modules/unist-util-visit/lib/index.mjs +2 -2
  867. package/es/spline/LogoThree/LogoSpline.d.mts +1 -2
  868. package/es/spline/LogoThree/index.d.mts +1 -2
  869. package/es/spline/Spline/Spine.d.mts +2 -3
  870. package/es/spline/Spline/Spine.mjs.map +1 -1
  871. package/es/spline/Spline/type.d.mts +1 -2
  872. package/es/storybook/StoryBook/index.d.mts +1 -2
  873. package/es/styles/classNames.d.mts +1 -2
  874. package/es/styles/createGlobalStyle.d.mts +1 -2
  875. package/es/styles/css.d.mts +1 -2
  876. package/es/styles/customTheme.d.mts +1 -2
  877. package/es/styles/stylex/props.d.mts +1 -1
  878. package/es/styles/theme/createLobeToken.d.mts +1 -2
  879. package/es/styles/theme/customNeutral.d.mts +1 -2
  880. package/es/styles/theme/customPalette.d.mts +1 -2
  881. package/es/styles/theme/customPrimary.d.mts +1 -2
  882. package/es/styles/theme/customStylishStatic.d.mts +1 -2
  883. package/es/styles/theme/generateColorPalette.d.mts +1 -2
  884. package/es/styles/theme/scope.d.mts +1 -2
  885. package/es/styles/theme/themeCss.d.mts +1 -2
  886. package/es/styles/theme/token/font.d.mts +1 -2
  887. package/es/styles/theme/token/neutralText.d.mts +1 -2
  888. package/es/types/citation.d.mts +1 -2
  889. package/es/types/customStylish.d.mts +1 -2
  890. package/es/types/customToken.d.mts +1 -2
  891. package/es/types/index.d.mts +1 -2
  892. package/es/types/trigger.d.mts +1 -2
  893. package/es/utils/copyToClipboard.d.mts +1 -2
  894. package/es/utils/dom.d.mts +1 -2
  895. package/es/utils/genCdnUrl.d.mts +1 -2
  896. package/es/utils/parseTrigger.d.mts +1 -2
  897. package/es/utils/placement.d.mts +1 -2
  898. package/es/utils/smoothCorners.d.mts +2 -3
  899. package/package.json +1 -1
  900. package/es/MaterialFileTypeIcon/icon-map.mjs.map +0 -1
@@ -4914,4 +4914,4 @@ var folderNames = {
4914
4914
  };
4915
4915
  export { fileExtensions, fileNames, folderNames };
4916
4916
 
4917
- //# sourceMappingURL=icon-map.mjs.map
4917
+ //# sourceMappingURL=icon-map.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-map.json.mjs","names":[],"sources":["../../src/MaterialFileTypeIcon/icon-map.json"],"sourcesContent":[""],"mappings":""}
@@ -10,5 +10,4 @@ export interface MaterialFileTypeIconProps extends DivProps {
10
10
  size?: number;
11
11
  type?: 'file' | 'folder';
12
12
  variant?: 'raw' | 'file' | 'folder';
13
- }
14
- //# sourceMappingURL=type.d.mts.map
13
+ }
@@ -1,4 +1,4 @@
1
- import { fileExtensions, fileNames, folderNames } from "./icon-map.mjs";
1
+ import { fileExtensions, fileNames, folderNames } from "./icon-map.json.mjs";
2
2
  // src/MaterialFileTypeIcon/utils.ts
3
3
  function getFileExtension(fileName) {
4
4
  return fileName.slice(Math.max(0, fileName.lastIndexOf(".") + 1));
@@ -1,4 +1,3 @@
1
1
  import { MermaidProps } from "./type.mjs";
2
2
  declare const Mermaid: import("react").NamedExoticComponent<MermaidProps>;
3
- export { Mermaid as default };
4
- //# sourceMappingURL=Mermaid.d.mts.map
3
+ export { Mermaid as default };
@@ -1,4 +1,3 @@
1
1
  import { SyntaxMermaidProps } from "../type.mjs";
2
2
  declare const SyntaxMermaid: import("react").NamedExoticComponent<SyntaxMermaidProps>;
3
- export { SyntaxMermaid as default };
4
- //# sourceMappingURL=index.d.mts.map
3
+ export { SyntaxMermaid as default };
@@ -4,5 +4,4 @@ interface MermaidThemeItem {
4
4
  id: string;
5
5
  }
6
6
  export declare const mermaidThemes: MermaidThemeItem[];
7
- export {};
8
- //# sourceMappingURL=const.d.mts.map
7
+ export {};
@@ -11,5 +11,4 @@ export declare const setMermaidCdnUrl: (_url: string) => void;
11
11
  * @deprecated Every diagram type now renders locally with pele; the CDN mermaid fallback is gone.
12
12
  */
13
13
  export declare const getMermaidCdnUrl: () => string | undefined;
14
- export { type MermaidProps, type MermaidThemeName, SyntaxMermaid, type SyntaxMermaidProps, Mermaid as default, mermaidThemes };
15
- //# sourceMappingURL=index.d.mts.map
14
+ export { type MermaidProps, type MermaidThemeName, SyntaxMermaid, type SyntaxMermaidProps, Mermaid as default, mermaidThemes };
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from "react";
1
+ import "react";
2
2
  export declare const MERMAID_PRESETS: {
3
3
  'zinc-light': {
4
4
  bg: string;
@@ -101,5 +101,4 @@ export declare const MERMAID_PRESETS: {
101
101
  };
102
102
  };
103
103
  export type MermaidPresetName = keyof typeof MERMAID_PRESETS;
104
- export type MermaidThemeName = 'lobe-theme' | MermaidPresetName;
105
- //# sourceMappingURL=themes.d.mts.map
104
+ export type MermaidThemeName = 'lobe-theme' | MermaidPresetName;
@@ -46,5 +46,4 @@ export interface MermaidProps extends DivProps {
46
46
  };
47
47
  theme?: MermaidThemeName;
48
48
  variant?: 'filled' | 'outlined' | 'borderless';
49
- }
50
- //# sourceMappingURL=type.d.mts.map
49
+ }
@@ -5,5 +5,4 @@ export interface MetaProps {
5
5
  withManifest?: boolean;
6
6
  }
7
7
  declare const Meta: FC<MetaProps>;
8
- export { Meta as default };
9
- //# sourceMappingURL=Meta.d.mts.map
8
+ export { Meta as default };
@@ -1,5 +1,4 @@
1
1
  import { ModalComponentProps } from "./type.mjs";
2
2
  import React from "react";
3
3
  declare const Modal: React.NamedExoticComponent<ModalComponentProps>;
4
- export { Modal as default };
5
- //# sourceMappingURL=Modal.d.mts.map
4
+ export { Modal as default };
@@ -50,5 +50,4 @@ export type ModalTriggerProps = Omit<React.ComponentPropsWithRef<typeof Dialog.T
50
50
  nativeButton?: boolean;
51
51
  };
52
52
  export declare const ModalTrigger: ({ children, className, nativeButton, ref: refProp, ...rest }: ModalTriggerProps) => React.JSX.Element;
53
- export {};
54
- //# sourceMappingURL=atoms.d.mts.map
53
+ export {};
@@ -5,5 +5,4 @@ export declare const backdropTransition: {
5
5
  duration: number;
6
6
  ease: CubicBezier;
7
7
  };
8
- export {};
9
- //# sourceMappingURL=constants.d.mts.map
8
+ export {};
@@ -1,4 +1,3 @@
1
1
  import { ModalContextValue } from "./type.mjs";
2
2
  export declare const ModalContext: import("react").Context<ModalContextValue>;
3
- export declare const useModalContext: () => ModalContextValue;
4
- //# sourceMappingURL=context.d.mts.map
3
+ export declare const useModalContext: () => ModalContextValue;
@@ -16,5 +16,4 @@ export declare const createModal: (props: ImperativeModalProps) => ModalInstance
16
16
  export declare const confirmModal: (config: ModalConfirmConfig) => {
17
17
  close: () => void;
18
18
  destroy: () => void;
19
- };
20
- //# sourceMappingURL=imperative.d.mts.map
19
+ };
@@ -102,5 +102,4 @@ export interface ModalConfirmConfig {
102
102
  title?: ReactNode;
103
103
  width?: number | string;
104
104
  }
105
- export {};
106
- //# sourceMappingURL=type.d.mts.map
105
+ export {};
@@ -6,5 +6,4 @@ export declare const MotionProvider: import("react").NamedExoticComponent<{
6
6
  children: ReactNode;
7
7
  motion: MotionComponentType;
8
8
  }>;
9
- export declare const useMotionComponent: () => MotionComponentType;
10
- //# sourceMappingURL=index.d.mts.map
9
+ export declare const useMotionComponent: () => MotionComponentType;
@@ -1,4 +1,3 @@
1
1
  import { PaginationProps } from "./type.mjs";
2
2
  declare const Pagination: import("react").NamedExoticComponent<PaginationProps>;
3
- export { Pagination as default };
4
- //# sourceMappingURL=Pagination.d.mts.map
3
+ export { Pagination as default };
@@ -53,5 +53,4 @@ export interface PaginationProps extends Omit<ComponentProps<'nav'>, 'onChange'>
53
53
  total: number;
54
54
  /** `total` above which `showSizeChanger` defaults to on. @default 50 */
55
55
  totalBoundaryShowSizeChanger?: number;
56
- }
57
- //# sourceMappingURL=type.d.mts.map
56
+ }
@@ -1,2 +1 @@
1
- export declare const PopoverArrowIcon: import("react").JSX.Element;
2
- //# sourceMappingURL=ArrowIcon.d.mts.map
1
+ export declare const PopoverArrowIcon: import("react").JSX.Element;
@@ -2,5 +2,4 @@ import { PopoverProps } from "./type.mjs";
2
2
  import { parseTrigger } from "../utils/parseTrigger.mjs";
3
3
  import { FC } from "react";
4
4
  declare const Popover: FC<PopoverProps>;
5
- export { Popover as default, parseTrigger };
6
- //# sourceMappingURL=Popover.d.mts.map
5
+ export { Popover as default, parseTrigger };
@@ -4,5 +4,4 @@ type PopoverGroupProps = PopoverGroupSharedProps & {
4
4
  children: ReactNode;
5
5
  };
6
6
  declare const PopoverGroup: FC<PopoverGroupProps>;
7
- export { PopoverGroup as default };
8
- //# sourceMappingURL=PopoverGroup.d.mts.map
7
+ export { PopoverGroup as default };
@@ -1,2 +1 @@
1
- export declare const usePopoverPortalContainer: (root?: HTMLElement | ShadowRoot | null) => HTMLElement | null;
2
- //# sourceMappingURL=PopoverPortal.d.mts.map
1
+ export declare const usePopoverPortalContainer: (root?: HTMLElement | ShadowRoot | null) => HTMLElement | null;
@@ -49,5 +49,4 @@ export type PopoverViewportAtomProps = ComponentProps<typeof Popover.Viewport>;
49
49
  export declare const PopoverViewport: {
50
50
  ({ className, ...rest }: PopoverViewportAtomProps): import("react").JSX.Element;
51
51
  displayName: string;
52
- };
53
- //# sourceMappingURL=atoms.d.mts.map
52
+ };
@@ -6,5 +6,4 @@ export declare const PopoverProvider: import("react").NamedExoticComponent<{
6
6
  children: ReactNode;
7
7
  value: PopoverContextValue;
8
8
  }>;
9
- export declare const usePopoverContext: () => PopoverContextValue;
10
- //# sourceMappingURL=context.d.mts.map
9
+ export declare const usePopoverContext: () => PopoverContextValue;
@@ -24,5 +24,4 @@ export type PopoverGroupHandle = ReturnType<typeof Popover.createHandle<PopoverG
24
24
  * neighbourhood drive the shared popup imperatively — `open(triggerId)` needs the
25
25
  * trigger to carry a matching `triggerProps.id`.
26
26
  */
27
- export declare const usePopoverGroupHandle: () => Popover.Handle<PopoverGroupItem> | null;
28
- //# sourceMappingURL=groupContext.d.mts.map
27
+ export declare const usePopoverGroupHandle: () => Popover.Handle<PopoverGroupItem> | null;
@@ -2,13 +2,13 @@ import { Trigger } from "../types/trigger.mjs";
2
2
  import "../types/index.mjs";
3
3
  import { Placement } from "../utils/placement.mjs";
4
4
  import { CSSProperties, ComponentPropsWithRef, ReactElement, ReactNode } from "react";
5
- import { Popover, PopoverBackdropProps, PopoverPopupProps, PopoverPortalProps, PopoverPositionerProps, PopoverTriggerProps } from "@base-ui/react/popover";
5
+ import { Popover, PopoverBackdropProps as PopoverBackdropProps$1, PopoverPopupProps as PopoverPopupProps$1, PopoverPortalProps as PopoverPortalProps$1, PopoverPositionerProps as PopoverPositionerProps$1, PopoverTriggerProps } from "@base-ui/react/popover";
6
6
  export type PopoverPlacement = Placement;
7
7
  export type PopoverTrigger = Trigger;
8
8
  /**
9
9
  * Base UI Positioner props that can be passed through
10
10
  */
11
- type PopoverPositionerProps$1 = Omit<PopoverPositionerProps, 'className' | 'style' | 'children'>;
11
+ export type PopoverPositionerProps = Omit<PopoverPositionerProps$1, 'className' | 'style' | 'children'>;
12
12
  /**
13
13
  * Base UI Trigger props that can be passed through
14
14
  */
@@ -16,15 +16,15 @@ export type PopoverTriggerComponentProps = Omit<PopoverTriggerProps, 'className'
16
16
  /**
17
17
  * Base UI Popup props that can be passed through
18
18
  */
19
- type PopoverPopupProps$1 = Omit<PopoverPopupProps, 'className' | 'style' | 'children'>;
19
+ export type PopoverPopupProps = Omit<PopoverPopupProps$1, 'className' | 'style' | 'children'>;
20
20
  /**
21
21
  * Base UI Backdrop props that can be passed through
22
22
  */
23
- type PopoverBackdropProps$1 = Omit<PopoverBackdropProps, 'className' | 'style'>;
23
+ export type PopoverBackdropProps = Omit<PopoverBackdropProps$1, 'className' | 'style'>;
24
24
  /**
25
25
  * Base UI Portal props that can be passed through
26
26
  */
27
- type PopoverPortalProps$1 = Omit<PopoverPortalProps, 'children' | 'container'>;
27
+ export type PopoverPortalProps = Omit<PopoverPortalProps$1, 'children' | 'container'>;
28
28
  export interface PopoverProps {
29
29
  /**
30
30
  * 是否显示箭头
@@ -34,7 +34,7 @@ export interface PopoverProps {
34
34
  /**
35
35
  * Base UI Backdrop 组件的 props
36
36
  */
37
- backdropProps?: PopoverBackdropProps$1;
37
+ backdropProps?: PopoverBackdropProps;
38
38
  /**
39
39
  * 触发元素
40
40
  */
@@ -108,15 +108,15 @@ export interface PopoverProps {
108
108
  /**
109
109
  * Base UI Popup 组件的 props
110
110
  */
111
- popupProps?: PopoverPopupProps$1;
111
+ popupProps?: PopoverPopupProps;
112
112
  /**
113
113
  * Base UI Portal 组件的 props
114
114
  */
115
- portalProps?: PopoverPortalProps$1;
115
+ portalProps?: PopoverPortalProps;
116
116
  /**
117
117
  * Base UI Positioner 组件的 props
118
118
  */
119
- positionerProps?: PopoverPositionerProps$1;
119
+ positionerProps?: PopoverPositionerProps;
120
120
  /**
121
121
  * ref
122
122
  */
@@ -146,6 +146,4 @@ export interface PopoverProps {
146
146
  * z-index
147
147
  */
148
148
  zIndex?: number;
149
- }
150
- export { PopoverBackdropProps$1 as PopoverBackdropProps, PopoverPopupProps$1 as PopoverPopupProps, PopoverPortalProps$1 as PopoverPortalProps, PopoverPositionerProps$1 as PopoverPositionerProps };
151
- //# sourceMappingURL=type.d.mts.map
149
+ }
@@ -5,5 +5,4 @@ declare const ProTable: {
5
5
  <T extends Record<string, any> = any, Params extends Record<string, any> = Record<string, any>>(props: ProTableProps<T, Params>): import("react").JSX.Element;
6
6
  displayName: string;
7
7
  };
8
- export { ProTable as default };
9
- //# sourceMappingURL=ProTable.d.mts.map
8
+ export { ProTable as default };
@@ -1 +1 @@
1
- {"version":3,"file":"ProTable.mjs","names":["clsx"],"sources":["../../src/ProTable/ProTable.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ComponentType, type ReactNode, type Ref, useEffect, useMemo, useRef } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\nimport Table from '@/Table';\nimport type { TableInternalHandle, TableInternalProps } from '@/Table/internal';\n\nimport { useColumnsState } from './hooks/useColumnsState';\nimport { useDensity } from './hooks/useDensity';\nimport { useFullscreen } from './hooks/useFullscreen';\nimport { usePageInfo } from './hooks/usePageInfo';\nimport { useProColumns } from './hooks/useProColumns';\nimport { useProLoading } from './hooks/useProLoading';\nimport { useProLocale } from './hooks/useProLocale';\nimport { useProRequest } from './hooks/useProRequest';\nimport { useRowCache } from './hooks/useRowCache';\nimport { useTableBindings } from './hooks/useTableBindings';\nimport { PRO_TABLE_LOCALE_EN_US } from './locale';\nimport KeywordInput from './parts/KeywordInput';\nimport LightFilter from './parts/LightFilter';\nimport SearchSection from './parts/SearchSection';\nimport TableAlert from './parts/TableAlert';\nimport Toolbar from './parts/Toolbar';\nimport ToolbarOptions from './parts/ToolbarOptions';\nimport { partClass, PRO_PREFIX_CLS, styles } from './style';\nimport type { ProTableActionType, ProTableProps } from './type';\nimport { toTableProps } from './utils';\n\nexport const DEFAULT_PRO_TABLE_LOCALE = PRO_TABLE_LOCALE_EN_US;\n\nconst DEFAULT_OPTIONS = { density: true, fullScreen: false, reload: true, setting: true };\n\nconst assignRef = <V,>(ref: Ref<V> | undefined, value: V) => {\n if (!ref) return;\n if (typeof ref === 'function') ref(value);\n else (ref as { current: V }).current = value;\n};\n\nconst ProTable = <\n T extends Record<string, any> = any,\n Params extends Record<string, any> = Record<string, any>,\n>(\n props: ProTableProps<T, Params>,\n) => {\n const {\n actionRef,\n cardBordered,\n className,\n columnEmptyText = '-',\n columns: columnsProp,\n columnsState,\n dataSource,\n defaultData,\n defaultSize,\n form: formConfig,\n headerTitle,\n loading: loadingProp,\n locale: localeProp,\n onSizeChange,\n options,\n pagination: paginationProp,\n request,\n rowSelection,\n search,\n size: sizeProp,\n style,\n tableAlertOptionRender,\n tableAlertRender,\n tableClassName,\n tableExtraRender,\n tableRender,\n tableStyle,\n toolbar,\n toolBarRender,\n tooltip,\n variant,\n } = props;\n const tableProps = toTableProps(props);\n const columns = useMemo(() => columnsProp ?? [], [columnsProp]);\n const InternalTable = Table as ComponentType<TableInternalProps<T>>;\n\n const { locale, tableLocale } = useProLocale(localeProp);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const handleRef = useRef<TableInternalHandle>(null);\n const actionHolderRef = useRef<ProTableActionType | undefined>(undefined);\n const [size, setSize] = useDensity(sizeProp, defaultSize, onSizeChange);\n const [fullscreen, toggleFullScreen] = useFullscreen(rootRef);\n const columnsStateApi = useColumnsState(columns, columnsState);\n const { config: paginationConfig, pageInfo, setPageInfo } = usePageInfo(paginationProp);\n\n const { settingColumns, sortFieldOf, tableColumns } = useProColumns<T>({\n actionRef: actionHolderRef,\n columnEmptyText,\n columns,\n copyLabel: locale.copy,\n current: pageInfo.current,\n pageSize: pageInfo.pageSize,\n state: columnsStateApi.state,\n });\n\n const requestApi = useProRequest<T>({\n pageInfo,\n paginated: paginationConfig !== false,\n props: props as ProTableProps<T, any>,\n setPageInfo,\n sortFieldOf,\n });\n const { fetcher, form, searchFields } = requestApi;\n\n const hasRequest = !!request;\n const rows: T[] = request ? fetcher.data : (dataSource ?? defaultData ?? []);\n const { loading, tableLoading } = useProLoading(loadingProp, fetcher.loading, hasRequest);\n\n const getRow = useRowCache(rows, (tableProps.rowKey ?? 'key') as string);\n const clearSelected = useEventCallback(() => handleRef.current?.clearSelection());\n\n const action: ProTableActionType = {\n clearSelected,\n fullScreen: toggleFullScreen,\n getSortFilter: requestApi.getSortFilter,\n nativeElement: rootRef.current,\n pageInfo,\n reload: requestApi.reload,\n reloadAndRest: async () => {\n clearSelected();\n await requestApi.reload(true);\n },\n reset: requestApi.reset,\n setPageInfo,\n };\n actionHolderRef.current = action;\n useEffect(() => {\n assignRef(actionRef as Ref<ProTableActionType>, actionHolderRef.current as ProTableActionType);\n });\n\n const bindings = useTableBindings<T>({\n hasRequest,\n pageInfo,\n paginationConfig,\n rowSelection,\n setPageInfo,\n });\n\n const optionConfig = options === false ? false : { ...DEFAULT_OPTIONS, ...options };\n const searchOption = optionConfig && optionConfig.search;\n const lightMode = search !== false && search?.filterType === 'light';\n const reloading = !!loading && !!request;\n\n const keywordDom = searchOption ? (\n <KeywordInput\n config={searchOption}\n placeholder={locale.searchPlaceholder}\n onSearch={requestApi.searchKeyword}\n />\n ) : null;\n const filterDom =\n lightMode && searchFields.length > 0 ? (\n <LightFilter\n fields={searchFields}\n form={form}\n ignoreRules={formConfig?.ignoreRules}\n placeholder={{ input: locale.searchPlaceholder, select: locale.selectPlaceholder }}\n />\n ) : null;\n const hasOptions =\n optionConfig &&\n Boolean(\n optionConfig.reload ||\n optionConfig.density ||\n optionConfig.fullScreen ||\n optionConfig.setting,\n );\n const settingsDom: ReactNode = toolbar?.settings?.length ? (\n toolbar.settings\n ) : toolbar?.settings === undefined && hasOptions ? (\n <ToolbarOptions\n columnsState={columnsStateApi.state}\n config={optionConfig}\n fullscreen={fullscreen}\n locale={locale}\n reloading={reloading}\n settingColumns={settingColumns}\n size={size}\n onColumnsStateChange={columnsStateApi.setState}\n onColumnsStateReset={columnsStateApi.resetState}\n onReload={() => void requestApi.reload()}\n onSizeChange={setSize}\n onToggleFullScreen={toggleFullScreen}\n />\n ) : null;\n\n const title = headerTitle ?? toolbar?.title;\n const toolbarDom =\n toolBarRender === false ? null : (\n <Toolbar<T>\n actionRef={actionHolderRef}\n actions={toolbar?.actions}\n filter={filterDom}\n getRow={getRow}\n handleRef={handleRef}\n keyword={keywordDom}\n settings={settingsDom}\n subTitle={toolbar?.subTitle}\n title={title}\n toolBarRender={toolBarRender || undefined}\n tooltip={tooltip ?? toolbar?.tooltip}\n />\n );\n\n const alertDom = rowSelection ? (\n <TableAlert<T>\n alwaysShow={rowSelection.alwaysShowAlert}\n getRow={getRow}\n handleRef={handleRef}\n locale={locale}\n optionRender={tableAlertOptionRender}\n render={tableAlertRender}\n onClear={clearSelected}\n />\n ) : null;\n\n const tableDom = (\n <InternalTable\n {...tableProps}\n className={tableClassName}\n columns={tableColumns}\n dataSource={rows}\n internalRef={handleRef}\n loading={tableLoading}\n locale={tableLocale}\n pagination={bindings.pagination}\n rowSelection={bindings.rowSelection}\n size={size}\n style={tableStyle}\n variant={variant}\n onChange={requestApi.handleTableChange}\n />\n );\n\n const tableBody = (\n <>\n {toolbarDom}\n {alertDom}\n {tableDom}\n </>\n );\n\n const searchDom =\n search !== false && !lightMode && searchFields.length > 0 ? (\n <SearchSection<T>\n fields={searchFields}\n form={form}\n loading={reloading}\n locale={locale}\n props={props}\n onReset={requestApi.handleReset}\n />\n ) : null;\n\n return (\n <div\n className={clsx(styles.root, PRO_PREFIX_CLS, className)}\n data-fullscreen={fullscreen || undefined}\n ref={rootRef}\n style={style}\n >\n {searchDom}\n {tableExtraRender?.(props, rows)}\n <div className={partClass(cardBordered, 'table')}>\n {tableRender\n ? tableRender(props, tableBody, { alert: alertDom, table: tableDom, toolbar: toolbarDom })\n : tableBody}\n </div>\n </div>\n );\n};\n\nProTable.displayName = 'ProTable';\n\nexport default ProTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAa,2BAA2B;AAExC,MAAM,kBAAkB;CAAE,SAAS;CAAM,YAAY;CAAO,QAAQ;CAAM,SAAS;AAAK;AAExF,MAAM,aAAiB,KAAyB,UAAa;CAC3D,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK;MACnC,IAAwB,UAAU;AACzC;AAEA,MAAM,YAIJ,UACG;CACH,MAAM,EACJ,WACA,cACA,WACA,kBAAkB,KAClB,SAAS,aACT,cACA,YACA,aACA,aACA,MAAM,YACN,aACA,SAAS,aACT,QAAQ,YACR,cACA,SACA,YAAY,gBACZ,SACA,cACA,QACA,MAAM,UACN,OACA,wBACA,kBACA,gBACA,kBACA,aACA,YACA,SACA,eACA,SACA,YACE;CACJ,MAAM,aAAa,aAAa,KAAK;CACrC,MAAM,UAAU,cAAc,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC;CAC9D,MAAM,gBAAgB;CAEtB,MAAM,EAAE,QAAQ,gBAAgB,aAAa,UAAU;CAEvD,MAAM,UAAU,OAAuB,IAAI;CAC3C,M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tB,CAAA;CAGH,MAAM,YACJ,qBAAA,YAAA,EAAA,UAAA;EACG;EACA;EACA;CACD,EAAA,CAAA;CAGJ,MAAM,YACJ,WAAW,SAAS,CAAC,aAAa,aAAa,SAAS,IACtD,oBAAC,eAAD;EACE,QAAQ;EACF;EACN,SAAS;EACD;EACD;EACP,SAAS,WAAW;CACrB,CAAA,IACC;CAEN,OACE,qBAAC,OAAD;EACE,WAAWA,OAAK,OAAO,MAAM,gBAAgB,SAAS;EACtD,mBAAiB,cAAc,KAAA;EAC/B,KAAK;EACE;EAJT,UAAA;GAMG;GACA,mBAAmB,OAAO,IAAI;GAC/B,oBAAC,OAAD;IAAK,WAAW,UAAU,cAAc,OAAO;IAC5C,UAAA,cACG,YAAY,OAAO,WAAW;KAAE,OAAO;KAAU,OAAO;KAAU,SAAS;IAAW,CAAC,IACvF;GACD,CAAA;EACF;;AAET;AAEA,SAAS,cAAc"}
1
+ {"version":3,"file":"ProTable.mjs","names":["clsx"],"sources":["../../src/ProTable/ProTable.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { type ComponentType, type ReactNode, type Ref, useEffect, useMemo, useRef } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\nimport Table from '@/Table';\nimport type { TableInternalHandle, TableInternalProps } from '@/Table/internal';\n\nimport { useColumnsState } from './hooks/useColumnsState';\nimport { useDensity } from './hooks/useDensity';\nimport { useFullscreen } from './hooks/useFullscreen';\nimport { usePageInfo } from './hooks/usePageInfo';\nimport { useProColumns } from './hooks/useProColumns';\nimport { useProLoading } from './hooks/useProLoading';\nimport { useProLocale } from './hooks/useProLocale';\nimport { useProRequest } from './hooks/useProRequest';\nimport { useRowCache } from './hooks/useRowCache';\nimport { useTableBindings } from './hooks/useTableBindings';\nimport { PRO_TABLE_LOCALE_EN_US } from './locale';\nimport KeywordInput from './parts/KeywordInput';\nimport LightFilter from './parts/LightFilter';\nimport SearchSection from './parts/SearchSection';\nimport TableAlert from './parts/TableAlert';\nimport Toolbar from './parts/Toolbar';\nimport ToolbarOptions from './parts/ToolbarOptions';\nimport { partClass, PRO_PREFIX_CLS, styles } from './style';\nimport type { ProTableActionType, ProTableProps } from './type';\nimport { toTableProps } from './utils';\n\nexport const DEFAULT_PRO_TABLE_LOCALE = PRO_TABLE_LOCALE_EN_US;\n\nconst DEFAULT_OPTIONS = { density: true, fullScreen: false, reload: true, setting: true };\n\nconst assignRef = <V,>(ref: Ref<V> | undefined, value: V) => {\n if (!ref) return;\n if (typeof ref === 'function') ref(value);\n else (ref as { current: V }).current = value;\n};\n\nconst ProTable = <\n T extends Record<string, any> = any,\n Params extends Record<string, any> = Record<string, any>,\n>(\n props: ProTableProps<T, Params>,\n) => {\n const {\n actionRef,\n cardBordered,\n className,\n columnEmptyText = '-',\n columns: columnsProp,\n columnsState,\n dataSource,\n defaultData,\n defaultSize,\n form: formConfig,\n headerTitle,\n loading: loadingProp,\n locale: localeProp,\n onSizeChange,\n options,\n pagination: paginationProp,\n request,\n rowSelection,\n search,\n size: sizeProp,\n style,\n tableAlertOptionRender,\n tableAlertRender,\n tableClassName,\n tableExtraRender,\n tableRender,\n tableStyle,\n toolbar,\n toolBarRender,\n tooltip,\n variant,\n } = props;\n const tableProps = toTableProps(props);\n const columns = useMemo(() => columnsProp ?? [], [columnsProp]);\n const InternalTable = Table as ComponentType<TableInternalProps<T>>;\n\n const { locale, tableLocale } = useProLocale(localeProp);\n\n const rootRef = useRef<HTMLDivElement>(null);\n const handleRef = useRef<TableInternalHandle>(null);\n const actionHolderRef = useRef<ProTableActionType | undefined>(undefined);\n const [size, setSize] = useDensity(sizeProp, defaultSize, onSizeChange);\n const [fullscreen, toggleFullScreen] = useFullscreen(rootRef);\n const columnsStateApi = useColumnsState(columns, columnsState);\n const { config: paginationConfig, pageInfo, setPageInfo } = usePageInfo(paginationProp);\n\n const { settingColumns, sortFieldOf, tableColumns } = useProColumns<T>({\n actionRef: actionHolderRef,\n columnEmptyText,\n columns,\n copyLabel: locale.copy,\n current: pageInfo.current,\n pageSize: pageInfo.pageSize,\n state: columnsStateApi.state,\n });\n\n const requestApi = useProRequest<T>({\n pageInfo,\n paginated: paginationConfig !== false,\n props: props as ProTableProps<T, any>,\n setPageInfo,\n sortFieldOf,\n });\n const { fetcher, form, searchFields } = requestApi;\n\n const hasRequest = !!request;\n const rows: T[] = request ? fetcher.data : (dataSource ?? defaultData ?? []);\n const { loading, tableLoading } = useProLoading(loadingProp, fetcher.loading, hasRequest);\n\n const getRow = useRowCache(rows, (tableProps.rowKey ?? 'key') as string);\n const clearSelected = useEventCallback(() => handleRef.current?.clearSelection());\n\n const action: ProTableActionType = {\n clearSelected,\n fullScreen: toggleFullScreen,\n getSortFilter: requestApi.getSortFilter,\n nativeElement: rootRef.current,\n pageInfo,\n reload: requestApi.reload,\n reloadAndRest: async () => {\n clearSelected();\n await requestApi.reload(true);\n },\n reset: requestApi.reset,\n setPageInfo,\n };\n actionHolderRef.current = action;\n useEffect(() => {\n assignRef(actionRef as Ref<ProTableActionType>, actionHolderRef.current as ProTableActionType);\n });\n\n const bindings = useTableBindings<T>({\n hasRequest,\n pageInfo,\n paginationConfig,\n rowSelection,\n setPageInfo,\n });\n\n const optionConfig = options === false ? false : { ...DEFAULT_OPTIONS, ...options };\n const searchOption = optionConfig && optionConfig.search;\n const lightMode = search !== false && search?.filterType === 'light';\n const reloading = !!loading && !!request;\n\n const keywordDom = searchOption ? (\n <KeywordInput\n config={searchOption}\n placeholder={locale.searchPlaceholder}\n onSearch={requestApi.searchKeyword}\n />\n ) : null;\n const filterDom =\n lightMode && searchFields.length > 0 ? (\n <LightFilter\n fields={searchFields}\n form={form}\n ignoreRules={formConfig?.ignoreRules}\n placeholder={{ input: locale.searchPlaceholder, select: locale.selectPlaceholder }}\n />\n ) : null;\n const hasOptions =\n optionConfig &&\n Boolean(\n optionConfig.reload ||\n optionConfig.density ||\n optionConfig.fullScreen ||\n optionConfig.setting,\n );\n const settingsDom: ReactNode = toolbar?.settings?.length ? (\n toolbar.settings\n ) : toolbar?.settings === undefined && hasOptions ? (\n <ToolbarOptions\n columnsState={columnsStateApi.state}\n config={optionConfig}\n fullscreen={fullscreen}\n locale={locale}\n reloading={reloading}\n settingColumns={settingColumns}\n size={size}\n onColumnsStateChange={columnsStateApi.setState}\n onColumnsStateReset={columnsStateApi.resetState}\n onReload={() => void requestApi.reload()}\n onSizeChange={setSize}\n onToggleFullScreen={toggleFullScreen}\n />\n ) : null;\n\n const title = headerTitle ?? toolbar?.title;\n const toolbarDom =\n toolBarRender === false ? null : (\n <Toolbar<T>\n actionRef={actionHolderRef}\n actions={toolbar?.actions}\n filter={filterDom}\n getRow={getRow}\n handleRef={handleRef}\n keyword={keywordDom}\n settings={settingsDom}\n subTitle={toolbar?.subTitle}\n title={title}\n toolBarRender={toolBarRender || undefined}\n tooltip={tooltip ?? toolbar?.tooltip}\n />\n );\n\n const alertDom = rowSelection ? (\n <TableAlert<T>\n alwaysShow={rowSelection.alwaysShowAlert}\n getRow={getRow}\n handleRef={handleRef}\n locale={locale}\n optionRender={tableAlertOptionRender}\n render={tableAlertRender}\n onClear={clearSelected}\n />\n ) : null;\n\n const tableDom = (\n <InternalTable\n {...tableProps}\n className={tableClassName}\n columns={tableColumns}\n dataSource={rows}\n internalRef={handleRef}\n loading={tableLoading}\n locale={tableLocale}\n pagination={bindings.pagination}\n rowSelection={bindings.rowSelection}\n size={size}\n style={tableStyle}\n variant={variant}\n onChange={requestApi.handleTableChange}\n />\n );\n\n const tableBody = (\n <>\n {toolbarDom}\n {alertDom}\n {tableDom}\n </>\n );\n\n const searchDom =\n search !== false && !lightMode && searchFields.length > 0 ? (\n <SearchSection<T>\n fields={searchFields}\n form={form}\n loading={reloading}\n locale={locale}\n props={props}\n onReset={requestApi.handleReset}\n />\n ) : null;\n\n return (\n <div\n className={clsx(styles.root, PRO_PREFIX_CLS, className)}\n data-fullscreen={fullscreen || undefined}\n ref={rootRef}\n style={style}\n >\n {searchDom}\n {tableExtraRender?.(props, rows)}\n <div className={partClass(cardBordered, 'table')}>\n {tableRender\n ? tableRender(props, tableBody, { alert: alertDom, table: tableDom, toolbar: toolbarDom })\n : tableBody}\n </div>\n </div>\n );\n};\n\nProTable.displayName = 'ProTable';\n\nexport default ProTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAa,2BAA2B;AAExC,MAAM,kBAAkB;CAAE,SAAS;CAAM,YAAY;CAAO,QAAQ;CAAM,SAAS;AAAK;AAExF,MAAM,aAAiB,KAAyB,UAAa;CAC3D,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK;MAClC,IAAuB,UAAU;AACzC;AAEA,MAAM,YAIJ,UACG;CACH,MAAM,EACJ,WACA,cACA,WACA,kBAAkB,KAClB,SAAS,aACT,cACA,YACA,aACA,aACA,MAAM,YACN,aACA,SAAS,aACT,QAAQ,YACR,cACA,SACA,YAAY,gBACZ,SACA,cACA,QACA,MAAM,UACN,OACA,wBACA,kBACA,gBACA,kBACA,aACA,YACA,SACA,eACA,SACA,YACE;CACJ,MAAM,aAAa,aAAa,KAAK;CACrC,MAAM,UAAU,cAAc,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC;CAC9D,MAAM,gBAAgB;CAEtB,MAAM,EAAE,QAAQ,gBAAgB,aAAa,UAAU;CAEvD,MAAM,UAAU,OAAuB,IAAI;CAC3C,MAAM,YAAY,OAA4B,IAAI;CAClD,MAAM,kBAAkB,OAAuC,KAAA,CAAS;CACxE,MAAM,CAAC,MAAM,WAAW,WAAW,UAAU,aAAa,YAAY;CACtE,MAAM,CAAC,YAAY,oBAAoB,cAAc,OAAO;CAC5D,MAAM,kBAAkB,gBAAgB,SAAS,YAAY;CAC7D,MAAM,EAAE,QAAQ,kBAAkB,UAAU,gBAAgB,YAAY,cAAc;CAEtF,MAAM,EAAE,gBAAgB,aAAa,iBAAiB,cAAiB;EACrE,WAAW;EACX;EACA;EACA,WAAW,OAAO;EAClB,SAA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A,mBAAmB,OAAO,IAAI;GAC/B,oBAAC,OAAD;IAAK,WAAW,UAAU,cAAc,OAAO;IAC5C,UAAA,cACG,YAAY,OAAO,WAAW;KAAE,OAAO;KAAU,OAAO;KAAU,SAAS;IAAW,CAAC,IACvF;GACD,CAAA;EACF;;AAET;AAEA,SAAS,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchData.mjs","names":[],"sources":["../../../src/ProTable/hooks/useFetchData.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { SortOrder } from '@/Table/type';\n\nimport type {\n ProTablePageInfo,\n ProTableRequest,\n ProTableRequestData,\n ProTableRequestFilter,\n} from '../type';\n\ntype Filter = Record<string, (string | number | boolean)[] | null>;\n\nexport interface UseFetchDataOptions<T> {\n debounceTime: number;\n defaultData?: T[];\n depsKey: string;\n filter: Filter;\n getParams: () => Record<string, any>;\n manual: boolean;\n onDataSourceChange?: (data: T[]) => void;\n onLoad?: (data: T[]) => void;\n onLoadingChange?: (loading: boolean) => void;\n onRequestError?: (error: Error) => void;\n pageInfo: ProTablePageInfo;\n paginated: boolean;\n polling?: number | ((data: T[]) => number);\n postData?: (data: T[]) => T[];\n request?: ProTableRequest<T, any>;\n setTotal: (total: number) => void;\n sort: Record<string, SortOrder>;\n}\n\nexport const useFetchData = <T>(options: UseFetchDataOptions<T>) => {\n const [data, setData] = useState<T[]>(options.defaultData ?? []);\n const [loading, setLoading] = useState(false);\n const latest = useRef(options);\n latest.current = options;\n const requestId = useRef(0);\n const [enabled, setEnabled] = useState(!options.manual);\n const [token, setToken] = useState(0);\n const pending = useRef<(() => void)[]>([]);\n\n const updateLoading = (next: boolean) => {\n setLoading(next);\n latest.current.onLoadingChange?.(next);\n };\n\n const run = useCallback(async () => {\n const opts = latest.current;\n if (!opts.request) return;\n const id = ++requestId.current;\n updateLoading(true);\n try {\n const params: Record<string, any> = { ...opts.getParams() };\n if (opts.paginated) {\n params.current = opts.pageInfo.current;\n params.pageSize = opts.pageInfo.pageSize;\n }\n // A `request` resolving `null` / `undefined` (e.g. an empty API body) is treated as empty data.\n const response: Partial<ProTableRequestData<T>> = (await opts.request(\n params as any,\n opts.sort,\n opts.filter as ProTableRequestFilter,\n )) ?? { data: [] };\n if (id !== requestId.current) return;\n if (response.success === false) {\n // Pro keeps the previous data when the request reports failure.\n return;\n }\n const raw = response.data ?? [];\n const next = opts.postData ? opts.postData(raw) : raw;\n setData(next);\n opts.setTotal(response.total ?? next.length);\n opts.onLoad?.(next);\n opts.onDataSourceChange?.(next);\n } catch (error) {\n if (id !== requestId.current) return;\n if (opts.onRequestError) opts.onRequestError(error as Error);\n else console.error(error);\n } finally {\n if (id === requestId.current) updateLoading(false);\n const resolvers = pending.current;\n pending.current = [];\n resolvers.forEach((resolve) => resolve());\n }\n }, []);\n\n const { current, pageSize } = options.pageInfo;\n useEffect(() => {\n if (!enabled || !latest.current.request) return;\n const delay = latest.current.debounceTime;\n if (delay <= 0) {\n void run();\n return;\n }\n const timer = setTimeout(() => void run(), delay);\n return () => clearTimeout(timer);\n }, [enabled, token, options.depsKey, current, pageSize, run]);\n\n useEffect(() => {\n const { polling } = latest.current;\n if (!polling || loading || !enabled) return;\n const interval = typeof polling === 'function' ? polling(data) : polling;\n if (!interval) return;\n const timer = setTimeout(() => void run(), Math.max(interval, 2000));\n return () => clearTimeout(timer);\n }, [data, loading, enabled, options.polling, run]);\n\n const reload = useCallback(\n () =>\n new Promise<void>((resolve) => {\n if (!latest.current.request) {\n resolve();\n return;\n }\n pending.current.push(resolve);\n setEnabled(true);\n setToken((value) => value + 1);\n }),\n [],\n );\n\n return { data, loading, reload, setData };\n};\n"],"mappings":";;AAiCA,MAAa,gBAAmB,YAAoC;CAClE,MAAM,CAAC,MAAM,WAAW,SAAc,QAAQ,eAAe,CAAC,CAAC;CAC/D,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,SAAS,OAAO,OAAO;CAC7B,OAAO,UAAU;CACjB,MAA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;EACd,IAAI,CAAC,WAAW,CAAC,OAAO,QAAQ,SAAS;EACzC,MAAM,QAAQ,OAAO,QAAQ;EAC7B,IAAI,SAAS,GAAG;GACd,IAAS;GACT;EACF;EACA,MAAM,QAAQ,iBAAiB,KAAK,IAAI,GAAG,KAAK;EAChD,aAAa,aAAa,KAAK;CACjC,GAAG;EAAC;EAAS;EAAO,QAAQ;EAAS;EAAS;EAAU;CAAG,CAAC;CAE5D,gBAAgB;EACd,MAAM,EAAE,YAAY,OAAO;EAC3B,IAAI,CAAC,WAAW,WAAW,CAAC,SAAS;EACrC,MAAM,WAAW,OAAO,YAAY,aAAa,QAAQ,IAAI,IAAI;EACjE,IAAI,CAAC,UAAU;EACf,MAAM,QAAQ,iBAAiB,KAAK,IAAI,GAAG,KAAK,IAAI,UAAU,GAAI,CAAC;EACnE,aAAa,aAAa,KAAK;CACjC,GAAG;EAAC;EAAM;EAAS;EAAS,QAAQ;EAAS;CAAG,CAAC;CAgBjD,OAAO;EAAE;EAAM;EAAS,QAdT,kBAEX,IAAI,SAAe,YAAY;GAC7B,IAAI,CAAC,OAAO,QAAQ,SAAS;IAC3B,QAAQ;IACR;GACF;GACA,QAAQ,QAAQ,KAAK,OAAO;GAC5B,WAAW,IAAI;GACf,UAAU,UAAU,QAAQ,CAAC;EAC/B,CAAC,GACH,CAAC,CAG0B;EAAG;CAAQ;AAC1C"}
1
+ {"version":3,"file":"useFetchData.mjs","names":[],"sources":["../../../src/ProTable/hooks/useFetchData.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { SortOrder } from '@/Table/type';\n\nimport type {\n ProTablePageInfo,\n ProTableRequest,\n ProTableRequestData,\n ProTableRequestFilter,\n} from '../type';\n\ntype Filter = Record<string, (string | number | boolean)[] | null>;\n\nexport interface UseFetchDataOptions<T> {\n debounceTime: number;\n defaultData?: T[];\n depsKey: string;\n filter: Filter;\n getParams: () => Record<string, any>;\n manual: boolean;\n onDataSourceChange?: (data: T[]) => void;\n onLoad?: (data: T[]) => void;\n onLoadingChange?: (loading: boolean) => void;\n onRequestError?: (error: Error) => void;\n pageInfo: ProTablePageInfo;\n paginated: boolean;\n polling?: number | ((data: T[]) => number);\n postData?: (data: T[]) => T[];\n request?: ProTableRequest<T, any>;\n setTotal: (total: number) => void;\n sort: Record<string, SortOrder>;\n}\n\nexport const useFetchData = <T>(options: UseFetchDataOptions<T>) => {\n const [data, setData] = useState<T[]>(options.defaultData ?? []);\n const [loading, setLoading] = useState(false);\n const latest = useRef(options);\n latest.current = options;\n const requestId = useRef(0);\n const [enabled, setEnabled] = useState(!options.manual);\n const [token, setToken] = useState(0);\n const pending = useRef<(() => void)[]>([]);\n\n const updateLoading = (next: boolean) => {\n setLoading(next);\n latest.current.onLoadingChange?.(next);\n };\n\n const run = useCallback(async () => {\n const opts = latest.current;\n if (!opts.request) return;\n const id = ++requestId.current;\n updateLoading(true);\n try {\n const params: Record<string, any> = { ...opts.getParams() };\n if (opts.paginated) {\n params.current = opts.pageInfo.current;\n params.pageSize = opts.pageInfo.pageSize;\n }\n // A `request` resolving `null` / `undefined` (e.g. an empty API body) is treated as empty data.\n const response: Partial<ProTableRequestData<T>> = (await opts.request(\n params as any,\n opts.sort,\n opts.filter as ProTableRequestFilter,\n )) ?? { data: [] };\n if (id !== requestId.current) return;\n if (response.success === false) {\n // Pro keeps the previous data when the request reports failure.\n return;\n }\n const raw = response.data ?? [];\n const next = opts.postData ? opts.postData(raw) : raw;\n setData(next);\n opts.setTotal(response.total ?? next.length);\n opts.onLoad?.(next);\n opts.onDataSourceChange?.(next);\n } catch (error) {\n if (id !== requestId.current) return;\n if (opts.onRequestError) opts.onRequestError(error as Error);\n else console.error(error);\n } finally {\n if (id === requestId.current) updateLoading(false);\n const resolvers = pending.current;\n pending.current = [];\n resolvers.forEach((resolve) => resolve());\n }\n }, []);\n\n const { current, pageSize } = options.pageInfo;\n useEffect(() => {\n if (!enabled || !latest.current.request) return;\n const delay = latest.current.debounceTime;\n if (delay <= 0) {\n void run();\n return;\n }\n const timer = setTimeout(() => void run(), delay);\n return () => clearTimeout(timer);\n }, [enabled, token, options.depsKey, current, pageSize, run]);\n\n useEffect(() => {\n const { polling } = latest.current;\n if (!polling || loading || !enabled) return;\n const interval = typeof polling === 'function' ? polling(data) : polling;\n if (!interval) return;\n const timer = setTimeout(() => void run(), Math.max(interval, 2000));\n return () => clearTimeout(timer);\n }, [data, loading, enabled, options.polling, run]);\n\n const reload = useCallback(\n () =>\n new Promise<void>((resolve) => {\n if (!latest.current.request) {\n resolve();\n return;\n }\n pending.current.push(resolve);\n setEnabled(true);\n setToken((value) => value + 1);\n }),\n [],\n );\n\n return { data, loading, reload, setData };\n};\n"],"mappings":";;AAiCA,MAAa,gBAAmB,YAAoC;CAClE,MAAM,CAAC,MAAM,WAAW,SAAc,QAAQ,eAAe,CAAC,CAAC;CAC/D,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,SAAS,OAAO,OAAO;CAC7B,OAAO,UAAU;CACjB,MAAM,YAAY,OAAO,CAAC;CAC1B,MAAM,CAAC,SAAS,cAAc,SAAS,CAAC,QAAQ,MAAM;CACtD,MAAM,CAAC,OAAO,YAAY,SAAS,CAAC;CACpC,MAAM,UAAU,OAAuB,CAAC,CAAC;CAEzC,MAAM,iBAAiB,SAAkB;EACvC,WAAW,IAAI;EACf,OAAO,QAAQ,kBAAkB,IAAI;CACvC;CAEA,MAAM,MAAM,YAAY,YAAY;EAClC,MAAM,OAAO,OAAO;EACpB,IAAI,CAAC,KAAK,SAAS;EACnB,MAAM,KAAK,EAAE,UAAU;EACvB,cAAc,IAAI;EAClB,IAAI;GACF,MAAM,SAA8B,EAAE,GAAG,KAAK,UAAU,EAAE;GAC1D,IAAI,KAAK,WAAW;IAClB,OAAO,UAAU,KAAK,SAAS;IAC/B,OAAO,WAAW,KAAK,SAAS;GAClC;GAEA,MAAM,WAA6C,MAAM,KAAK,QAC5D,QACA,KAAK,MACL,KAAK,MACP,K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AC;CAgBjD,OAAO;EAAE;EAAM;EAAS,QAdT,kBAEX,IAAI,SAAe,YAAY;GAC7B,IAAI,CAAC,OAAO,QAAQ,SAAS;IAC3B,QAAQ;IACR;GACF;GACA,QAAQ,QAAQ,KAAK,OAAO;GAC5B,WAAW,IAAI;GACf,UAAU,UAAU,QAAQ,CAAC;EAC/B,CAAC,GACH,CAAC,CAG0B;EAAG;CAAQ;AAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFullscreen.mjs","names":[],"sources":["../../../src/ProTable/hooks/useFullscreen.ts"],"sourcesContent":["import { type RefObject, useEffect, useState } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\n\nexport const useFullscreen = (rootRef: RefObject<HTMLDivElement | null>) => {\n const [fullscreen, setFullscreen] = useState(false);\n useEffect(() => {\n if (typeof document === 'undefined') return;\n const sync = () => setFullscreen(document.fullscreenElement === rootRef.current);\n document.addEventListener('fullscreenchange', sync);\n return () => document.removeEventListener('fullscreenchange', sync);\n }, [rootRef]);\n const toggle = useEventCallback(() => {\n const node = rootRef.current;\n if (!node || typeof document === 'undefined') return;\n if (document.fullscreenElement) void document.exitFullscreen?.();\n else void node.requestFullscreen?.();\n });\n return [fullscreen, toggle] as const;\n};\n"],"mappings":";;;AAIA,MAAa,iBAAiB,YAA8C;CAC1E,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,gBAAgB;EACd,IAAI,OAAO,aAAa,aAAa;EACrC,MAAM,aAAa,cAAc,SAAS,sBAAsB,QAAQ,OAAO;EAC/E,SAAS,iBAAiB,oBAAoB,IAAI;EAClD,aAAa,SAAS,oBAAoB,oBAAoB,IAAI;CACpE,GAAG,CAAC,OAAO,CAAC;CAOZ,OAAO,CAAC,YANO,uBAAuB;EACpC,MAAM,OAAO,QAAQ;EACrB,IAAI,CAAC,QAAQ,OAAO,aAAa,aAAa;EAC9C,IAAI,SAAS,mBAAmB,SAAc,iBAAiB;OAC1D,KAAU,oBAAoB;CACrC,CACyB,CAAC;AAC5B"}
1
+ {"version":3,"file":"useFullscreen.mjs","names":[],"sources":["../../../src/ProTable/hooks/useFullscreen.ts"],"sourcesContent":["import { type RefObject, useEffect, useState } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\n\nexport const useFullscreen = (rootRef: RefObject<HTMLDivElement | null>) => {\n const [fullscreen, setFullscreen] = useState(false);\n useEffect(() => {\n if (typeof document === 'undefined') return;\n const sync = () => setFullscreen(document.fullscreenElement === rootRef.current);\n document.addEventListener('fullscreenchange', sync);\n return () => document.removeEventListener('fullscreenchange', sync);\n }, [rootRef]);\n const toggle = useEventCallback(() => {\n const node = rootRef.current;\n if (!node || typeof document === 'undefined') return;\n if (document.fullscreenElement) void document.exitFullscreen?.();\n else void node.requestFullscreen?.();\n });\n return [fullscreen, toggle] as const;\n};\n"],"mappings":";;;AAIA,MAAa,iBAAiB,YAA8C;CAC1E,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,gBAAgB;EACd,IAAI,OAAO,aAAa,aAAa;EACrC,MAAM,aAAa,cAAc,SAAS,sBAAsB,QAAQ,OAAO;EAC/E,SAAS,iBAAiB,oBAAoB,IAAI;EAClD,aAAa,SAAS,oBAAoB,oBAAoB,IAAI;CACpE,GAAG,CAAC,OAAO,CAAC;CAOZ,OAAO,CAAC,YANO,uBAAuB;EACpC,MAAM,OAAO,QAAQ;EACrB,IAAI,CAAC,QAAQ,OAAO,aAAa,aAAa;EAC9C,IAAI,SAAS,mBAAwB,SAAS,iBAAiB;OACrD,KAAK,oBAAoB;CACrC,CACyB,CAAC;AAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"useProRequest.mjs","names":[],"sources":["../../../src/ProTable/hooks/useProRequest.ts"],"sourcesContent":["import { type Ref, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\nimport type {\n SortOrder,\n TableFilters,\n TablePaginationConfig,\n TableSorterResult,\n} from '@/Table/type';\n\nimport type { ProTableFormInstance, ProTablePageInfo, ProTableProps } from '../type';\nimport { useFetchData } from './useFetchData';\nimport { getSearchFields, useSearchForm } from './useSearchForm';\n\ntype Filter = Record<string, (string | number | boolean)[] | null>;\n\nconst stableKey = (value: unknown) => {\n try {\n return JSON.stringify(value, (_key, item) =>\n item instanceof Date ? item.toISOString() : item,\n );\n } catch {\n return String(Math.random());\n }\n};\n\ninterface ProRequestOptions<T> {\n pageInfo: ProTablePageInfo;\n paginated: boolean;\n props: ProTableProps<T, any>;\n setPageInfo: (next: Partial<ProTablePageInfo>) => void;\n sortFieldOf: Map<string, string>;\n}\n\nexport const useProRequest = <T>({\n pageInfo,\n paginated,\n props,\n setPageInfo,\n sortFieldOf,\n}: ProRequestOptions<T>) => {\n const {\n beforeSearchSubmit,\n columns = [],\n dateFormatter = 'string',\n debounceTime = 10,\n defaultData,\n form: formConfig,\n formRef,\n manualRequest = false,\n onChange,\n onDataSourceChange,\n onLoad,\n onLoadingChange,\n onRequestError,\n onReset,\n onSubmit,\n options,\n params,\n polling,\n postData,\n request,\n } = props;\n\n const [sort, setSort] = useState<Record<string, SortOrder>>({});\n const [filter, setFilter] = useState<Filter>({});\n const searchFields = useMemo(() => getSearchFields(columns), [columns]);\n const [formParams, setFormParams] = useState<Record<string, any>>({});\n const [keyword, setKeyword] = useState<string | undefined>(undefined);\n const formReadyRef = useRef(false);\n\n const applyFormValues = (formatted: Record<string, any>) => {\n const next = beforeSearchSubmit ? beforeSearchSubmit(formatted) : formatted;\n formReadyRef.current = true;\n setFormParams(next);\n setPageInfo({ current: 1 });\n return next;\n };\n\n const handleSubmit = useEventCallback((formatted: Record<string, any>) => {\n const next = applyFormValues(formatted);\n onSubmit?.(next);\n void fetcher.reload();\n });\n\n const { form } = useSearchForm({\n dateFormatter,\n fields: searchFields,\n initialValues: formConfig?.initialValues,\n onSubmit: handleSubmit,\n onValuesChange: formConfig?.onValuesChange,\n validateOn: formConfig?.validateOn,\n });\n const initialFormParams = useMemo(() => form.getFieldsFormatValue(), [form]);\n const effectiveFormParams = formReadyRef.current ? formParams : initialFormParams;\n useImperativeHandle(formRef as Ref<ProTableFormInstance>, () => form, [form]);\n\n const keywordName =\n options && typeof options.search === 'object' ? (options.search.name ?? 'keyword') : 'keyword';\n\n const fetcher = useFetchData<T>({\n debounceTime,\n defaultData,\n depsKey: stableKey([effectiveFormParams, params, keyword, sort, filter]),\n filter,\n getParams: () => ({\n ...effectiveFormParams,\n ...params,\n ...(keyword !== undefined && keyword !== '' && { [keywordName]: keyword }),\n }),\n manual: manualRequest,\n onDataSourceChange,\n onLoad,\n onLoadingChange,\n onRequestError,\n pageInfo,\n paginated,\n polling,\n postData,\n request,\n setTotal: (total) => setPageInfo({ total }),\n sort,\n });\n\n const paramsKey = stableKey(params);\n const firstParamsRef = useRef(true);\n useEffect(() => {\n if (firstParamsRef.current) {\n firstParamsRef.current = false;\n return;\n }\n setPageInfo({ current: 1 });\n }, [paramsKey, setPageInfo]);\n\n const reload = useEventCallback(async (resetPageIndex?: boolean) => {\n if (resetPageIndex) setPageInfo({ current: 1 });\n await fetcher.reload();\n });\n\n const reset = useEventCallback(() => {\n form.resetFields();\n applyFormValues(form.getFieldsFormatValue());\n void fetcher.reload();\n });\n\n const handleReset = useEventCallback(() => {\n reset();\n onReset?.();\n });\n\n const searchKeyword = useEventCallback((value: string | undefined) => {\n setKeyword(value);\n setPageInfo({ current: 1 });\n });\n\n const handleTableChange = useEventCallback(\n (\n pagination: TablePaginationConfig,\n filters: TableFilters,\n sorter: TableSorterResult<T> | TableSorterResult<T>[],\n extra: Parameters<NonNullable<ProTableProps<T>['onChange']>>[3],\n ) => {\n if (extra.action === 'sort') {\n const next: Record<string, SortOrder> = {};\n (Array.isArray(sorter) ? sorter : [sorter]).forEach((item) => {\n if (!item.order || item.columnKey === undefined) return;\n const columnKey = String(item.columnKey);\n next[sortFieldOf.get(columnKey) ?? columnKey] = item.order;\n });\n setSort(next);\n }\n if (extra.action === 'filter') {\n const next: Filter = {};\n Object.entries(filters).forEach(([columnKey, value]) => {\n next[sortFieldOf.get(columnKey) ?? columnKey] = value;\n });\n setFilter(next);\n }\n onChange?.(pagination, filters, sorter, extra);\n },\n );\n\n const getSortFilter = useEventCallback(() => ({ filter, sort }));\n\n return {\n fetcher,\n form,\n getSortFilter,\n handleReset,\n handleTableChange,\n reload,\n reset,\n searchFields,\n searchKeyword,\n };\n};\n"],"mappings":";;;;;AAgBA,MAAM,aAAa,UAAmB;CACpC,IAAI;EACF,OAAO,KAAK,UAAU,QAAQ,MAAM,SAClC,gBAAgB,OAAO,KAAK,YAAY,IAAI,IAC9C;CACF,QAAQ;EACN,OAAO,OAAO,KAAK,OAAO,CAAC;CAC7B;AACF;AAUA,MAAa,iBAAoB,EAC/B,UACA,WACA,OACA,aACA,kBAC0B;CAC1B,MAAM,EACJ,oBACA,UAAU,CAAC,GACX,gBAAgB,UAChB,eAAe,IACf,aACA,MAAM,YACN,SACA,gBAAgB,OAChB,UACA,oBACA,QACA,iBACA,gBACA,SACA,UACA,SACA,QACA,SACA,UACA,YACE;CAEJ,MAAM,CAAC,MAAM,WAAW,SAAoC,CAAC,CAAC;CAC9D,MAAM,CAAC,QAAQ,aAAa,SAAiB,CAAC,CAAC;CAC/C,MAAM,eAAe,cAAc,gBAAgB,OAAO,GAAG,CAAC,OAAO,CAAC;CACtE,MAAM,CAAC,YAAY,iBAAiB,SAA8B,CAAC,CAAC;CACpE,MAAM,CAAC,SAAS,cAAc,SAA6B,KAAA,CAAS;CACpE,MAAM,eAAe,OAAO,KAAK;CAEjC,MAAM,mBAAmB,cAAmC;EAC1D,MAAM,OAAO,qBAAqB,mBAAmB,SAAS,IAAI;EAClE,aAAa,UAAU;EACvB,cAAc,IAAI;EAClB,YAAY,EAAE,SAAS,EAAE,CAAC;EAC1B,OAAO;CACT;CAEA,MAAM,eAAe,kBAAkB,cAAmC;EACxE,MAAM,OAAO,gBAAgB,SAAS;EACtC,WAAW,IAAI;EACf,QA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UAA8B;EACpE,WAAW,KAAK;EAChB,YAAY,EAAE,SAAS,EAAE,CAAC;CAC5B,CAAC;CAED,MAAM,oBAAoB,kBAEtB,YACA,SACA,QACA,UACG;EACH,IAAI,MAAM,WAAW,QAAQ;GAC3B,MAAM,OAAkC,CAAC;GACzC,CAAC,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM,EAAA,CAAG,SAAS,SAAS;IAC5D,IAAI,CAAC,KAAK,SAAS,KAAK,cAAc,KAAA,GAAW;IACjD,MAAM,YAAY,OAAO,KAAK,SAAS;IACvC,KAAK,YAAY,IAAI,SAAS,KAAK,aAAa,KAAK;GACvD,CAAC;GACD,QAAQ,IAAI;EACd;EACA,IAAI,MAAM,WAAW,UAAU;GAC7B,MAAM,OAAe,CAAC;GACtB,OAAO,QAAQ,OAAO,CAAC,CAAC,SAAS,CAAC,WAAW,WAAW;IACtD,KAAK,YAAY,IAAI,SAAS,KAAK,aAAa;GAClD,CAAC;GACD,UAAU,IAAI;EAChB;EACA,WAAW,YAAY,SAAS,QAAQ,KAAK;CAC/C,CACF;CAIA,OAAO;EACL;EACA;EACA,eALoB,wBAAwB;GAAE;GAAQ;EAAK,EAK/C;EACZ;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useProRequest.mjs","names":[],"sources":["../../../src/ProTable/hooks/useProRequest.ts"],"sourcesContent":["import { type Ref, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';\n\nimport { useEventCallback } from '@/hooks/useEventCallback';\nimport type {\n SortOrder,\n TableFilters,\n TablePaginationConfig,\n TableSorterResult,\n} from '@/Table/type';\n\nimport type { ProTableFormInstance, ProTablePageInfo, ProTableProps } from '../type';\nimport { useFetchData } from './useFetchData';\nimport { getSearchFields, useSearchForm } from './useSearchForm';\n\ntype Filter = Record<string, (string | number | boolean)[] | null>;\n\nconst stableKey = (value: unknown) => {\n try {\n return JSON.stringify(value, (_key, item) =>\n item instanceof Date ? item.toISOString() : item,\n );\n } catch {\n return String(Math.random());\n }\n};\n\ninterface ProRequestOptions<T> {\n pageInfo: ProTablePageInfo;\n paginated: boolean;\n props: ProTableProps<T, any>;\n setPageInfo: (next: Partial<ProTablePageInfo>) => void;\n sortFieldOf: Map<string, string>;\n}\n\nexport const useProRequest = <T>({\n pageInfo,\n paginated,\n props,\n setPageInfo,\n sortFieldOf,\n}: ProRequestOptions<T>) => {\n const {\n beforeSearchSubmit,\n columns = [],\n dateFormatter = 'string',\n debounceTime = 10,\n defaultData,\n form: formConfig,\n formRef,\n manualRequest = false,\n onChange,\n onDataSourceChange,\n onLoad,\n onLoadingChange,\n onRequestError,\n onReset,\n onSubmit,\n options,\n params,\n polling,\n postData,\n request,\n } = props;\n\n const [sort, setSort] = useState<Record<string, SortOrder>>({});\n const [filter, setFilter] = useState<Filter>({});\n const searchFields = useMemo(() => getSearchFields(columns), [columns]);\n const [formParams, setFormParams] = useState<Record<string, any>>({});\n const [keyword, setKeyword] = useState<string | undefined>(undefined);\n const formReadyRef = useRef(false);\n\n const applyFormValues = (formatted: Record<string, any>) => {\n const next = beforeSearchSubmit ? beforeSearchSubmit(formatted) : formatted;\n formReadyRef.current = true;\n setFormParams(next);\n setPageInfo({ current: 1 });\n return next;\n };\n\n const handleSubmit = useEventCallback((formatted: Record<string, any>) => {\n const next = applyFormValues(formatted);\n onSubmit?.(next);\n void fetcher.reload();\n });\n\n const { form } = useSearchForm({\n dateFormatter,\n fields: searchFields,\n initialValues: formConfig?.initialValues,\n onSubmit: handleSubmit,\n onValuesChange: formConfig?.onValuesChange,\n validateOn: formConfig?.validateOn,\n });\n const initialFormParams = useMemo(() => form.getFieldsFormatValue(), [form]);\n const effectiveFormParams = formReadyRef.current ? formParams : initialFormParams;\n useImperativeHandle(formRef as Ref<ProTableFormInstance>, () => form, [form]);\n\n const keywordName =\n options && typeof options.search === 'object' ? (options.search.name ?? 'keyword') : 'keyword';\n\n const fetcher = useFetchData<T>({\n debounceTime,\n defaultData,\n depsKey: stableKey([effectiveFormParams, params, keyword, sort, filter]),\n filter,\n getParams: () => ({\n ...effectiveFormParams,\n ...params,\n ...(keyword !== undefined && keyword !== '' && { [keywordName]: keyword }),\n }),\n manual: manualRequest,\n onDataSourceChange,\n onLoad,\n onLoadingChange,\n onRequestError,\n pageInfo,\n paginated,\n polling,\n postData,\n request,\n setTotal: (total) => setPageInfo({ total }),\n sort,\n });\n\n const paramsKey = stableKey(params);\n const firstParamsRef = useRef(true);\n useEffect(() => {\n if (firstParamsRef.current) {\n firstParamsRef.current = false;\n return;\n }\n setPageInfo({ current: 1 });\n }, [paramsKey, setPageInfo]);\n\n const reload = useEventCallback(async (resetPageIndex?: boolean) => {\n if (resetPageIndex) setPageInfo({ current: 1 });\n await fetcher.reload();\n });\n\n const reset = useEventCallback(() => {\n form.resetFields();\n applyFormValues(form.getFieldsFormatValue());\n void fetcher.reload();\n });\n\n const handleReset = useEventCallback(() => {\n reset();\n onReset?.();\n });\n\n const searchKeyword = useEventCallback((value: string | undefined) => {\n setKeyword(value);\n setPageInfo({ current: 1 });\n });\n\n const handleTableChange = useEventCallback(\n (\n pagination: TablePaginationConfig,\n filters: TableFilters,\n sorter: TableSorterResult<T> | TableSorterResult<T>[],\n extra: Parameters<NonNullable<ProTableProps<T>['onChange']>>[3],\n ) => {\n if (extra.action === 'sort') {\n const next: Record<string, SortOrder> = {};\n (Array.isArray(sorter) ? sorter : [sorter]).forEach((item) => {\n if (!item.order || item.columnKey === undefined) return;\n const columnKey = String(item.columnKey);\n next[sortFieldOf.get(columnKey) ?? columnKey] = item.order;\n });\n setSort(next);\n }\n if (extra.action === 'filter') {\n const next: Filter = {};\n Object.entries(filters).forEach(([columnKey, value]) => {\n next[sortFieldOf.get(columnKey) ?? columnKey] = value;\n });\n setFilter(next);\n }\n onChange?.(pagination, filters, sorter, extra);\n },\n );\n\n const getSortFilter = useEventCallback(() => ({ filter, sort }));\n\n return {\n fetcher,\n form,\n getSortFilter,\n handleReset,\n handleTableChange,\n reload,\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AAM,EAAA,CAAG,SAAS,SAAS;IAC5D,IAAI,CAAC,KAAK,SAAS,KAAK,cAAc,KAAA,GAAW;IACjD,MAAM,YAAY,OAAO,KAAK,SAAS;IACvC,KAAK,YAAY,IAAI,SAAS,KAAK,aAAa,KAAK;GACvD,CAAC;GACD,QAAQ,IAAI;EACd;EACA,IAAI,MAAM,WAAW,UAAU;GAC7B,MAAM,OAAe,CAAC;GACtB,OAAO,QAAQ,OAAO,CAAC,CAAC,SAAS,CAAC,WAAW,WAAW;IACtD,KAAK,YAAY,IAAI,SAAS,KAAK,aAAa;GAClD,CAAC;GACD,UAAU,IAAI;EAChB;EACA,WAAW,YAAY,SAAS,QAAQ,KAAK;CAC/C,CACF;CAIA,OAAO;EACL;EACA;EACA,eALoB,wBAAwB;GAAE;GAAQ;EAAK,EAK/C;EACZ;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -9,5 +9,4 @@ export declare const PRO_TABLE_LOCALES: {
9
9
  readonly 'en-US': ProTableLocaleResolved;
10
10
  readonly 'zh-CN': ProTableLocaleResolved;
11
11
  };
12
- export declare const resolveProTableLocale: (language?: string) => ProTableLocaleResolved;
13
- //# sourceMappingURL=locale.d.mts.map
12
+ export declare const resolveProTableLocale: (language?: string) => ProTableLocaleResolved;
@@ -1 +1 @@
1
- {"version":3,"file":"LightFilter.mjs","names":[],"sources":["../../../src/ProTable/parts/LightFilter.tsx"],"sourcesContent":["import Form from '@lobehub/ui/form';\n\nimport { rulesToFieldProps, type SearchFieldSchema } from '../hooks/useSearchForm';\nimport { styles } from '../style';\nimport type { ProTableFormInstance } from '../type';\nimport FieldControl from './FieldControl';\n\nexport interface LightFilterProps {\n fields: SearchFieldSchema[];\n form: ProTableFormInstance;\n ignoreRules?: boolean;\n placeholder: { input: string; select: string };\n}\n\nconst TEXT_TYPES = new Set(['text', 'textarea', 'password', 'code']);\n\nconst LightFilter = ({ fields, form, ignoreRules, placeholder }: LightFilterProps) => (\n <Form\n className={styles.lightFilter}\n data-pro-table-light-filter=\"\"\n form={form}\n variant=\"borderless\"\n layout=\"horizontal\"\n // The base-ui Form root stacks its children; the light filter is one wrapping row.\n style={{\n alignItems: 'center',\n display: 'flex',\n flex: '0 1 auto',\n flexDirection: 'row',\n flexWrap: 'wrap',\n gap: 8,\n minWidth: 0,\n width: 'auto',\n }}\n >\n {fields.map(({ column, name }) => {\n const isText =\n !column.valueEnum &&\n !column.request &&\n !column.renderFormItem &&\n (!column.valueType || TEXT_TYPES.has(column.valueType as string));\n const wrapped = isText\n ? {\n ...column,\n fieldProps: {\n ...column.fieldProps,\n onClear: () => void form.submit(),\n },\n }\n : column;\n const { required, validate } = ignoreRules\n ? { required: undefined, validate: undefined }\n : rulesToFieldProps(column.formItemProps?.rules, column.formItemProps?.required);\n return (\n <div className={styles.lightFilterItem} key={name}>\n <Form.Field\n bare\n name={name}\n required={required}\n validate={validate}\n render={({ value, onChange }) => (\n <FieldControl\n light\n column={wrapped}\n form={form}\n placeholder={placeholder}\n value={value}\n onChange={(next) => {\n onChange(next);\n if (!isText) void form.submit();\n }}\n />\n )}\n />\n </div>\n );\n })}\n {/* Text fields query on Enter through the native form submit. */}\n <button hidden type=\"submit\" />\n </Form>\n);\n\nexport default LightFilter;\n"],"mappings":";;;;;;AAcA,MAAM,6BAAa,IAAI,IAAI;CAAC;CAAQ;CAAY;CAAY;AAAM,CAAC;AAEnE,MAAM,eAAe,EAAE,QAAQ,MAAM,aAAa,kBAChD,qBAAC,MAAD;CACE,WAAW,OAAO;CAClB,+BAA4B;CACtB;CACN,SAAQ;CACR,QAAO;CAEP,OAAO;EACL,YAAY;EACZ,SAAS;EACT,MAAM;EACN,eAAe;EACf,UAAU;EACV,KAAK;EACL,UAAU;EACV,OAAO;CACT;CAhBF,UAAA,CAkBG,OAAO,KAAK,EAAE,QAAQ,WAAW;EAChC,MAAM,SACJ,CAAC,OAAO,aACR,CAAC,OAAO,WACR,CAAC,OAAO,mBACP,CAAC,OAAO,aAAa,WAAW,IAAI,OAAO,SAAmB;EACjE,MAAM,UAAU,SACZ;GACE,GAAG;GACH,YAAY;IACV,GAAG,OAAO;IACV,eAAe,KAAK,KAAK,OAAO;GAClC;EACF,IACA;EACJ,MAAM,EAAE,UAAU,aAAa,cAC3B;GAAE,UAAU,KAAA;GAAW,UAAU,KAAA;EAAU,IAC3C,kBAAkB,OAAO,eAAe,OAAO,OAAO,eAAe,QAAQ;EACjF,OACE,oBAAC,OAAD;GAAK,WAAW,OAAO;GACrB,UAAA,oBAAC,KAAK,OAAN;IACE,MAAA;IACM;IACI;IACA;IACV,SAAS,EAAE,OAAO,eAChB,oBAAC,cAAD;KACE,OAAA;KACA,QAAQ;KACF;KACO;KACN;KACP,WAAW,SAAS;MAClB,SAAS,IAAI;MACb,IAAI,CAAC,QAAQ,KAAU,OAAO;KAChC;IACD,CAAA;GAEJ,CAAA;EACE,GApBwC,IAoBxC;CAET,CAAC,GAED,oBAAC,UAAD;EAAQ,QAAA;EAAO,MAAK;CAAU,CAAA,CAC1B"}
1
+ {"version":3,"file":"LightFilter.mjs","names":[],"sources":["../../../src/ProTable/parts/LightFilter.tsx"],"sourcesContent":["import Form from '@lobehub/ui/form';\n\nimport { rulesToFieldProps, type SearchFieldSchema } from '../hooks/useSearchForm';\nimport { styles } from '../style';\nimport type { ProTableFormInstance } from '../type';\nimport FieldControl from './FieldControl';\n\nexport interface LightFilterProps {\n fields: SearchFieldSchema[];\n form: ProTableFormInstance;\n ignoreRules?: boolean;\n placeholder: { input: string; select: string };\n}\n\nconst TEXT_TYPES = new Set(['text', 'textarea', 'password', 'code']);\n\nconst LightFilter = ({ fields, form, ignoreRules, placeholder }: LightFilterProps) => (\n <Form\n className={styles.lightFilter}\n data-pro-table-light-filter=\"\"\n form={form}\n variant=\"borderless\"\n layout=\"horizontal\"\n // The base-ui Form root stacks its children; the light filter is one wrapping row.\n style={{\n alignItems: 'center',\n display: 'flex',\n flex: '0 1 auto',\n flexDirection: 'row',\n flexWrap: 'wrap',\n gap: 8,\n minWidth: 0,\n width: 'auto',\n }}\n >\n {fields.map(({ column, name }) => {\n const isText =\n !column.valueEnum &&\n !column.request &&\n !column.renderFormItem &&\n (!column.valueType || TEXT_TYPES.has(column.valueType as string));\n const wrapped = isText\n ? {\n ...column,\n fieldProps: {\n ...column.fieldProps,\n onClear: () => void form.submit(),\n },\n }\n : column;\n const { required, validate } = ignoreRules\n ? { required: undefined, validate: undefined }\n : rulesToFieldProps(column.formItemProps?.rules, column.formItemProps?.required);\n return (\n <div className={styles.lightFilterItem} key={name}>\n <Form.Field\n bare\n name={name}\n required={required}\n validate={validate}\n render={({ value, onChange }) => (\n <FieldControl\n light\n column={wrapped}\n form={form}\n placeholder={placeholder}\n value={value}\n onChange={(next) => {\n onChange(next);\n if (!isText) void form.submit();\n }}\n />\n )}\n />\n </div>\n );\n })}\n {/* Text fields query on Enter through the native form submit. */}\n <button hidden type=\"submit\" />\n </Form>\n);\n\nexport default LightFilter;\n"],"mappings":";;;;;;AAcA,MAAM,6BAAa,IAAI,IAAI;CAAC;CAAQ;CAAY;CAAY;AAAM,CAAC;AAEnE,MAAM,eAAe,EAAE,QAAQ,MAAM,aAAa,kBAChD,qBAAC,MAAD;CACE,WAAW,OAAO;CAClB,+BAA4B;CACtB;CACN,SAAQ;CACR,QAAO;CAEP,OAAO;EACL,YAAY;EACZ,SAAS;EACT,MAAM;EACN,eAAe;EACf,UAAU;EACV,KAAK;EACL,UAAU;EACV,OAAO;CACT;CAhBF,UAAA,CAkBG,OAAO,KAAK,EAAE,QAAQ,WAAW;EAChC,MAAM,SACJ,CAAC,OAAO,aACR,CAAC,OAAO,WACR,CAAC,OAAO,mBACP,CAAC,OAAO,aAAa,WAAW,IAAI,OAAO,SAAmB;EACjE,MAAM,UAAU,SACZ;GACE,GAAG;GACH,YAAY;IACV,GAAG,OAAO;IACV,eAAe,KAAK,KAAK,OAAO;GAClC;EACF,IACA;EACJ,MAAM,EAAE,UAAU,aAAa,cAC3B;GAAE,UAAU,KAAA;GAAW,UAAU,KAAA;EAAU,IAC3C,kBAAkB,OAAO,eAAe,OAAO,OAAO,eAAe,QAAQ;EACjF,OACE,oBAAC,OAAD;GAAK,WAAW,OAAO;GACrB,UAAA,oBAAC,KAAK,OAAN;IACE,MAAA;IACM;IACI;IACA;IACV,SAAS,EAAE,OAAO,eAChB,oBAAC,cAAD;KACE,OAAA;KACA,QAAQ;KACF;KACO;KACN;KACP,WAAW,SAAS;MAClB,SAAS,IAAI;MACb,IAAI,CAAC,QAAa,KAAK,OAAO;KAChC;IACD,CAAA;GAEJ,CAAA;EACE,GApBwC,IAoBxC;CAET,CAAC,GAED,oBAAC,UAAD;EAAQ,QAAA;EAAO,MAAK;CAAU,CAAA,CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderValue.mjs","names":["cx"],"sources":["../../../src/ProTable/parts/renderValue.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Copy } from 'lucide-react';\nimport { type ReactNode } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport Progress from '@/Progress';\n\nimport { styles } from '../style';\nimport type { ProTableStatus, ProTableValueEnum, ProTableValueType } from '../type';\nimport { findValueEnum, formatDate, isEmptyValue, isNil, toDate } from '../utils';\n\nconst STATUS_COLOR: Record<ProTableStatus, string> = {\n Default: 'var(--lobe-pro-table-status-default)',\n Error: 'var(--lobe-pro-table-status-error)',\n Processing: 'var(--lobe-pro-table-status-processing)',\n Success: 'var(--lobe-pro-table-status-success)',\n Warning: 'var(--lobe-pro-table-status-warning)',\n};\n\nexport const StatusText = ({\n color,\n status,\n text,\n}: {\n color?: string;\n status?: ProTableStatus;\n text: ReactNode;\n}) => {\n if (!status && !color) return <>{text}</>;\n return (\n <span className={styles.status}>\n <span\n className={cx(styles.statusDot, status === 'Processing' && styles.statusProcessing)}\n data-status={status}\n style={{ background: color ?? STATUS_COLOR[status ?? 'Default'] }}\n />\n {text}\n </span>\n );\n};\n\nconst renderEnum = (valueEnum: ProTableValueEnum, value: unknown): ReactNode => {\n if (Array.isArray(value)) {\n return (\n <span className={styles.enumList}>\n {value.map((item) => (\n <span key={String(item)}>{renderEnum(valueEnum, item)}</span>\n ))}\n </span>\n );\n }\n const item = findValueEnum(valueEnum, value);\n if (!item) return String(value);\n return <StatusText color={item.color} status={item.status} text={item.text} />;\n};\n\nexport interface RenderValueOptions {\n copyText?: string;\n emptyText: ReactNode;\n fieldProps?: Record<string, any>;\n rowIndex: number;\n valueEnum?: ProTableValueEnum;\n valueType?: ProTableValueType;\n}\n\nconst formatNumber = (value: number, precision?: number) =>\n value.toLocaleString('en-US', {\n maximumFractionDigits: precision ?? 20,\n minimumFractionDigits: precision ?? 0,\n });\n\nexport const renderValue = (value: any, options: RenderValueOptions): ReactNode => {\n const { emptyText, fieldProps = {}, rowIndex, valueEnum, valueType } = options;\n\n if (valueType === 'index') return rowIndex + 1;\n if (valueType === 'indexBorder')\n return (\n <span className={styles.indexBorder} data-top={rowIndex < 3 ? '' : undefined}>\n {rowIndex + 1}\n </span>\n );\n if (valueType === 'option') return value;\n\n if (isEmptyValue(value)) return emptyText;\n if (valueEnum) return renderEnum(valueEnum, value);\n\n switch (valueType) {\n case 'password': {\n return '********';\n }\n case 'digit': {\n return typeof value === 'number' ? formatNumber(value, fieldProps.precision) : value;\n }\n case 'money': {\n const symbol = fieldProps.customSymbol ?? '¥';\n const number = Number(value);\n if (Number.isNaN(number)) return value;\n return `${number < 0 ? '-' : ''}${symbol}${formatNumber(Math.abs(number), fieldProps.precision ?? 2)}`;\n }\n case 'percent': {\n const number = Number(value);\n if (Number.isNaN(number)) return value;\n return `${formatNumber(number, fieldProps.precision)}%`;\n }\n case 'progress': {\n const number = Number(value);\n return (\n <Progress\n percent={Number.isNaN(number) ? 0 : number}\n size=\"small\"\n style={{ minWidth: 100 }}\n variant=\"inset\"\n />\n );\n }\n case 'switch': {\n return value ? (fieldProps.checkedChildren ?? 'On') : (fieldProps.unCheckedChildren ?? 'Off');\n }\n case 'date':\n case 'dateTime':\n case 'time': {\n const date = toDate(value);\n if (!date) return String(value);\n return formatDate(date, valueType === 'dateTime', valueType === 'time');\n }\n case 'dateRange':\n case 'dateTimeRange': {\n if (!Array.isArray(value)) return String(value);\n return value\n .map((item) => {\n const date = toDate(item);\n return date ? formatDate(date, valueType === 'dateTimeRange') : '';\n })\n .join(' ~ ');\n }\n case 'code': {\n return <code className={styles.code}>{String(value)}</code>;\n }\n default: {\n return isNil(value) || typeof value === 'object' ? value : String(value);\n }\n }\n};\n\nexport const CopyableText = ({\n children,\n label,\n text,\n}: {\n children: ReactNode;\n label: string;\n text: string;\n}) => (\n <span className={styles.copyable}>\n <span className={styles.copyableText}>{children}</span>\n <ActionIcon\n icon={Copy}\n size=\"small\"\n title={label}\n onClick={(event) => {\n event.stopPropagation();\n void navigator.clipboard?.writeText(text);\n }}\n />\n </span>\n);\n"],"mappings":";;;;;;;;AAWA,MAAM,eAA+C;CACnD,SAAS;CACT,OAAO;CACP,YAAY;CACZ,SAAS;CACT,SAAS;AACX;AAEA,MAAa,cAAc,EACzB,OACA,QACA,WAKI;CACJ,IAAI,CAAC,UAAU,CAAC,OAAO,OAAO,oBAAA,UAAA,EAAA,UAAG,KAAO,CAAA;CACxC,OACE,qBAAC,QAAD;EAAM,WAAW,OAAO;EAAxB,UAAA,CACE,oBAAC,QAAD;GACE,WAAWA,OAAG,OAAO,WAAW,WAAW,gBAAgB,OAAO,gBAAgB;GAClF,eAAa;GACb,OAAO,EAAE,YAAY,SAAS,aAAa,UAAU,WAAW;EACjE,CAAA,GACA,IACG;;AAEV;AAEA,MAAM,cAAc,WAA8B,UAA8B;CAC9E,IAAI,MAAM,QAAQ,KAAK,GACrB,OACE,oBAAC,QAAD;EAAM,WAAW,OAAO;EACrB,UAAA,MAAM,KAAK,SACV,oBAAC,QAAD,EAAA,UAA0B,WAAW,WAAW,IAAI,EAAQ,GAAjD,OAAO,IAAI,CAAsC,CAC7D;CACG,CAAA;CAGV,MAAM,OAAO,cAAc,WAAW,KAAK;CA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EAAE,UAAU,IAAI;IACvB,SAAQ;GACT,CAAA;EAEL;EACA,KAAK,UACH,OAAO,QAAS,WAAW,mBAAmB,OAAS,WAAW,qBAAqB;EAEzF,KAAK;EACL,KAAK;EACL,KAAK,QAAQ;GACX,MAAM,OAAO,OAAO,KAAK;GACzB,IAAI,CAAC,MAAM,OAAO,OAAO,KAAK;GAC9B,OAAO,WAAW,MAAM,cAAc,YAAY,cAAc,MAAM;EACxE;EACA,KAAK;EACL,KAAK;GACH,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,OAAO,KAAK;GAC9C,OAAO,MACJ,KAAK,SAAS;IACb,MAAM,OAAO,OAAO,IAAI;IACxB,OAAO,OAAO,WAAW,MAAM,cAAc,eAAe,IAAI;GAClE,CAAC,CAAC,CACD,KAAK,KAAK;EAEf,KAAK,QACH,OAAO,oBAAC,QAAD;GAAM,WAAW,OAAO;GAAO,UAAA,OAAO,KAAK;EAAQ,CAAA;EAE5D,SACE,OAAO,MAAM,KAAK,KAAK,OAAO,UAAU,WAAW,QAAQ,OAAO,KAAK;CAE3E;AACF;AAEA,MAAa,gBAAgB,EAC3B,UACA,OACA,WAMA,qBAAC,QAAD;CAAM,WAAW,OAAO;CAAxB,UAAA,CACE,oBAAC,QAAD;EAAM,WAAW,OAAO;EAAe;CAAe,CAAA,GACtD,oBAAC,YAAD;EACE,MAAM;EACN,MAAK;EACL,OAAO;EACP,UAAU,UAAU;GAClB,MAAM,gBAAgB;GACtB,UAAe,WAAW,UAAU,IAAI;EAC1C;CACD,CAAA,CACG"}
1
+ {"version":3,"file":"renderValue.mjs","names":["cx"],"sources":["../../../src/ProTable/parts/renderValue.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Copy } from 'lucide-react';\nimport { type ReactNode } from 'react';\n\nimport ActionIcon from '@/ActionIcon';\nimport Progress from '@/Progress';\n\nimport { styles } from '../style';\nimport type { ProTableStatus, ProTableValueEnum, ProTableValueType } from '../type';\nimport { findValueEnum, formatDate, isEmptyValue, isNil, toDate } from '../utils';\n\nconst STATUS_COLOR: Record<ProTableStatus, string> = {\n Default: 'var(--lobe-pro-table-status-default)',\n Error: 'var(--lobe-pro-table-status-error)',\n Processing: 'var(--lobe-pro-table-status-processing)',\n Success: 'var(--lobe-pro-table-status-success)',\n Warning: 'var(--lobe-pro-table-status-warning)',\n};\n\nexport const StatusText = ({\n color,\n status,\n text,\n}: {\n color?: string;\n status?: ProTableStatus;\n text: ReactNode;\n}) => {\n if (!status && !color) return <>{text}</>;\n return (\n <span className={styles.status}>\n <span\n className={cx(styles.statusDot, status === 'Processing' && styles.statusProcessing)}\n data-status={status}\n style={{ background: color ?? STATUS_COLOR[status ?? 'Default'] }}\n />\n {text}\n </span>\n );\n};\n\nconst renderEnum = (valueEnum: ProTableValueEnum, value: unknown): ReactNode => {\n if (Array.isArray(value)) {\n return (\n <span className={styles.enumList}>\n {value.map((item) => (\n <span key={String(item)}>{renderEnum(valueEnum, item)}</span>\n ))}\n </span>\n );\n }\n const item = findValueEnum(valueEnum, value);\n if (!item) return String(value);\n return <StatusText color={item.color} status={item.status} text={item.text} />;\n};\n\nexport interface RenderValueOptions {\n copyText?: string;\n emptyText: ReactNode;\n fieldProps?: Record<string, any>;\n rowIndex: number;\n valueEnum?: ProTableValueEnum;\n valueType?: ProTableValueType;\n}\n\nconst formatNumber = (value: number, precision?: number) =>\n value.toLocaleString('en-US', {\n maximumFractionDigits: precision ?? 20,\n minimumFractionDigits: precision ?? 0,\n });\n\nexport const renderValue = (value: any, options: RenderValueOptions): ReactNode => {\n const { emptyText, fieldProps = {}, rowIndex, valueEnum, valueType } = options;\n\n if (valueType === 'index') return rowIndex + 1;\n if (valueType === 'indexBorder')\n return (\n <span className={styles.indexBorder} data-top={rowIndex < 3 ? '' : undefined}>\n {rowIndex + 1}\n </span>\n );\n if (valueType === 'option') return value;\n\n if (isEmptyValue(value)) return emptyText;\n if (valueEnum) return renderEnum(valueEnum, value);\n\n switch (valueType) {\n case 'password': {\n return '********';\n }\n case 'digit': {\n return typeof value === 'number' ? formatNumber(value, fieldProps.precision) : value;\n }\n case 'money': {\n const symbol = fieldProps.customSymbol ?? '¥';\n const number = Number(value);\n if (Number.isNaN(number)) return value;\n return `${number < 0 ? '-' : ''}${symbol}${formatNumber(Math.abs(number), fieldProps.precision ?? 2)}`;\n }\n case 'percent': {\n const number = Number(value);\n if (Number.isNaN(number)) return value;\n return `${formatNumber(number, fieldProps.precision)}%`;\n }\n case 'progress': {\n const number = Number(value);\n return (\n <Progress\n percent={Number.isNaN(number) ? 0 : number}\n size=\"small\"\n style={{ minWidth: 100 }}\n variant=\"inset\"\n />\n );\n }\n case 'switch': {\n return value ? (fieldProps.checkedChildren ?? 'On') : (fieldProps.unCheckedChildren ?? 'Off');\n }\n case 'date':\n case 'dateTime':\n case 'time': {\n const date = toDate(value);\n if (!date) return String(value);\n return formatDate(date, valueType === 'dateTime', valueType === 'time');\n }\n case 'dateRange':\n case 'dateTimeRange': {\n if (!Array.isArray(value)) return String(value);\n return value\n .map((item) => {\n const date = toDate(item);\n return date ? formatDate(date, valueType === 'dateTimeRange') : '';\n })\n .join(' ~ ');\n }\n case 'code': {\n return <code className={styles.code}>{String(value)}</code>;\n }\n default: {\n return isNil(value) || typeof value === 'object' ? value : String(value);\n }\n }\n};\n\nexport const CopyableText = ({\n children,\n label,\n text,\n}: {\n children: ReactNode;\n label: string;\n text: string;\n}) => (\n <span className={styles.copyable}>\n <span className={styles.copyableText}>{children}</span>\n <ActionIcon\n icon={Copy}\n size=\"small\"\n title={label}\n onClick={(event) => {\n event.stopPropagation();\n void navigator.clipboard?.writeText(text);\n }}\n />\n </span>\n);\n"],"mappings":";;;;;;;;AAWA,MAAM,eAA+C;CACnD,SAAS;CACT,OAAO;CACP,YAAY;CACZ,SAAS;CACT,SAAS;AACX;AAEA,MAAa,cAAc,EACzB,OACA,QACA,WAKI;CACJ,IAAI,CAAC,UAAU,CAAC,OAAO,OAAO,oBAAA,UAAA,EAAA,UAAG,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C,QAAD;CAAM,WAAW,OAAO;CAAxB,UAAA,CACE,oBAAC,QAAD;EAAM,WAAW,OAAO;EAAe;CAAe,CAAA,GACtD,oBAAC,YAAD;EACE,MAAM;EACN,MAAK;EACL,OAAO;EACP,UAAU,UAAU;GAClB,MAAM,gBAAgB;GACjB,UAAU,WAAW,UAAU,IAAI;EAC1C;CACD,CAAA,CACG"}
@@ -394,5 +394,4 @@ export interface ProTableProps<T = any, Params = Record<string, any>> extends Om
394
394
  /** Table cell style; the card follows it. @default 'borderless' */
395
395
  variant?: TableVariant;
396
396
  }
397
- export type { SortOrder };
398
- //# sourceMappingURL=type.d.mts.map
397
+ export type { SortOrder };
@@ -1,4 +1,3 @@
1
1
  import { ProgressProps } from "./type.mjs";
2
2
  declare const Progress: import("react").NamedExoticComponent<ProgressProps>;
3
- export { Progress as default };
4
- //# sourceMappingURL=Progress.d.mts.map
3
+ export { Progress as default };
@@ -17,5 +17,4 @@ export interface ProgressProps extends Omit<ComponentProps<'div'>, 'children'> {
17
17
  style?: CSSProperties;
18
18
  type?: ProgressType;
19
19
  variant?: ProgressVariant;
20
- }
21
- //# sourceMappingURL=type.d.mts.map
20
+ }
@@ -1,4 +1,3 @@
1
1
  import { ProgressiveBlurProps } from "./type.mjs";
2
2
  declare const ProgressiveBlur: import("react").NamedExoticComponent<ProgressiveBlurProps>;
3
- export { ProgressiveBlur as default };
4
- //# sourceMappingURL=ProgressiveBlur.d.mts.map
3
+ export { ProgressiveBlur as default };
@@ -74,5 +74,4 @@ export interface ProgressiveBlurProps extends Omit<HTMLAttributes<HTMLDivElement
74
74
  ref?: Ref<HTMLDivElement>;
75
75
  /** Inline styles of the semantic parts. */
76
76
  styles?: ProgressiveBlurStyles;
77
- }
78
- //# sourceMappingURL=type.d.mts.map
77
+ }
@@ -1,4 +1,3 @@
1
1
  import { QRCodeProps } from "./type.mjs";
2
2
  declare const QRCode: import("react").NamedExoticComponent<QRCodeProps>;
3
- export { QRCode as default };
4
- //# sourceMappingURL=QRCode.d.mts.map
3
+ export { QRCode as default };
@@ -12,5 +12,4 @@ export interface QRCodeProps extends Omit<ComponentProps<'div'>, 'children'> {
12
12
  size?: number;
13
13
  status?: QRCodeStatus;
14
14
  value: string;
15
- }
16
- //# sourceMappingURL=type.d.mts.map
15
+ }
@@ -1,4 +1,3 @@
1
1
  import { RadioProps } from "./type.mjs";
2
2
  declare const Radio: import("react").NamedExoticComponent<RadioProps>;
3
- export { Radio as default };
4
- //# sourceMappingURL=Radio.d.mts.map
3
+ export { Radio as default };