@tendaui/react 1.1.3 → 1.1.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 (344) hide show
  1. package/es/_chunks/{dep-COy5g3FT.js → dep-D68MD94M.js} +2 -2
  2. package/es/_chunks/{dep-COy5g3FT.js.map → dep-D68MD94M.js.map} +1 -1
  3. package/es/button/_example/base.js +4 -2
  4. package/es/button/_example/base.js.map +1 -1
  5. package/es/button/_example/icon.js +4 -2
  6. package/es/button/_example/icon.js.map +1 -1
  7. package/es/index.js +4 -2
  8. package/es/index.js.map +1 -1
  9. package/es/ip-input/IPInput.js +2 -2
  10. package/es/ip-input/index.js +2 -2
  11. package/es/ip-input/style/css.js +1 -0
  12. package/es/layout/index.js +1 -1
  13. package/es/layout/style/css.js +1 -0
  14. package/package.json +59 -59
  15. package/es/alert/Alert.d.ts +0 -7
  16. package/es/alert/defaultProps.d.ts +0 -2
  17. package/es/alert/index.d.ts +0 -5
  18. package/es/alert/style/css.d.ts +0 -1
  19. package/es/alert/style/index.d.ts +0 -1
  20. package/es/alert/type.d.ts +0 -45
  21. package/es/badge/Badge.d.ts +0 -7
  22. package/es/badge/defaultProps.d.ts +0 -2
  23. package/es/badge/index.d.ts +0 -5
  24. package/es/badge/style/css.d.ts +0 -1
  25. package/es/badge/style/index.d.ts +0 -1
  26. package/es/badge/type.d.ts +0 -50
  27. package/es/button/Button.d.ts +0 -6
  28. package/es/button/defaultProps.d.ts +0 -2
  29. package/es/button/index.d.ts +0 -5
  30. package/es/button/style/css.d.ts +0 -1
  31. package/es/button/style/index.d.ts +0 -1
  32. package/es/button/type.d.ts +0 -81
  33. package/es/checkbox/Checkbox.d.ts +0 -10
  34. package/es/checkbox/CheckboxGroup.d.ts +0 -14
  35. package/es/checkbox/defaultProps.d.ts +0 -3
  36. package/es/checkbox/index.d.ts +0 -11
  37. package/es/checkbox/style/css.d.ts +0 -1
  38. package/es/checkbox/style/index.d.ts +0 -1
  39. package/es/checkbox/type.d.ts +0 -115
  40. package/es/color-picker/ColorPickPanel.d.ts +0 -4
  41. package/es/color-picker/ColorPicker.d.ts +0 -4
  42. package/es/color-picker/components/panel/alpha.d.ts +0 -4
  43. package/es/color-picker/components/panel/format/index.d.ts +0 -10
  44. package/es/color-picker/components/panel/format/inputs.d.ts +0 -4
  45. package/es/color-picker/components/panel/header.d.ts +0 -13
  46. package/es/color-picker/components/panel/hue.d.ts +0 -4
  47. package/es/color-picker/components/panel/index.d.ts +0 -4
  48. package/es/color-picker/components/panel/saturation.d.ts +0 -4
  49. package/es/color-picker/components/panel/slider.d.ts +0 -11
  50. package/es/color-picker/components/panel/swatches.d.ts +0 -11
  51. package/es/color-picker/components/trigger.d.ts +0 -9
  52. package/es/color-picker/defaultProps.d.ts +0 -2
  53. package/es/color-picker/helpers.d.ts +0 -5
  54. package/es/color-picker/hooks/useClassNames.d.ts +0 -2
  55. package/es/color-picker/hooks/useStyles.d.ts +0 -14
  56. package/es/color-picker/index.d.ts +0 -6
  57. package/es/color-picker/style/index.d.ts +0 -1
  58. package/es/color-picker/type.d.ts +0 -135
  59. package/es/color-picker/utils/color-picker/cmyk.d.ts +0 -27
  60. package/es/color-picker/utils/color-picker/color.d.ts +0 -144
  61. package/es/color-picker/utils/color-picker/constants.d.ts +0 -30
  62. package/es/color-picker/utils/color-picker/draggable.d.ts +0 -23
  63. package/es/color-picker/utils/color-picker/format.d.ts +0 -64
  64. package/es/color-picker/utils/color-picker/gradient.d.ts +0 -22
  65. package/es/color-picker/utils/color-picker/index.d.ts +0 -7
  66. package/es/color-picker/utils/color-picker/types.d.ts +0 -28
  67. package/es/common/Check.d.ts +0 -22
  68. package/es/common/FakeArrow.d.ts +0 -9
  69. package/es/common/PluginContainer.d.ts +0 -9
  70. package/es/common/Portal.d.ts +0 -16
  71. package/es/common/observe.d.ts +0 -1
  72. package/es/common.d.ts +0 -81
  73. package/es/config-provider/ConfigContext.d.ts +0 -13
  74. package/es/config-provider/ConfigProvider.d.ts +0 -25
  75. package/es/config-provider/index.d.ts +0 -7
  76. package/es/config-provider/type.d.ts +0 -1029
  77. package/es/dialog/Dialog.d.ts +0 -8
  78. package/es/dialog/DialogCard.d.ts +0 -8
  79. package/es/dialog/defaultProps.d.ts +0 -6
  80. package/es/dialog/hooks/useDialogDrag.d.ts +0 -7
  81. package/es/dialog/hooks/useDialogEsc.d.ts +0 -3
  82. package/es/dialog/hooks/useDialogPosition.d.ts +0 -2
  83. package/es/dialog/hooks/useLockStyle.d.ts +0 -2
  84. package/es/dialog/index.d.ts +0 -8
  85. package/es/dialog/plugin.d.ts +0 -6
  86. package/es/dialog/style/css.d.ts +0 -1
  87. package/es/dialog/style/index.d.ts +0 -1
  88. package/es/dialog/type.d.ts +0 -227
  89. package/es/dialog/utils.d.ts +0 -1
  90. package/es/drawer/Drawer.d.ts +0 -11
  91. package/es/drawer/defaultProps.d.ts +0 -2
  92. package/es/drawer/hooks/useDrag.d.ts +0 -8
  93. package/es/drawer/hooks/useLockStyle.d.ts +0 -1
  94. package/es/drawer/index.d.ts +0 -4
  95. package/es/drawer/style/css.d.ts +0 -1
  96. package/es/drawer/style/index.d.ts +0 -1
  97. package/es/drawer/type.d.ts +0 -199
  98. package/es/drawer/utils/index.d.ts +0 -23
  99. package/es/fireworks/Fireworks.d.ts +0 -7
  100. package/es/fireworks/index.d.ts +0 -5
  101. package/es/fireworks/style/css.d.ts +0 -1
  102. package/es/fireworks/style/index.d.ts +0 -1
  103. package/es/fireworks/type.d.ts +0 -69
  104. package/es/form/Form.d.ts +0 -8
  105. package/es/form/FormContext.d.ts +0 -59
  106. package/es/form/FormItem.d.ts +0 -23
  107. package/es/form/FormList.d.ts +0 -4
  108. package/es/form/const.d.ts +0 -6
  109. package/es/form/defaultProps.d.ts +0 -3
  110. package/es/form/easing.d.ts +0 -2
  111. package/es/form/formModel.d.ts +0 -37
  112. package/es/form/hooks/interface.d.ts +0 -16
  113. package/es/form/hooks/useForm.d.ts +0 -3
  114. package/es/form/hooks/useFormItemInitialData.d.ts +0 -9
  115. package/es/form/hooks/useFormItemStyle.d.ts +0 -10
  116. package/es/form/hooks/useInstance.d.ts +0 -16
  117. package/es/form/hooks/useWatch.d.ts +0 -3
  118. package/es/form/index.d.ts +0 -7
  119. package/es/form/scroll.d.ts +0 -39
  120. package/es/form/style/css.d.ts +0 -1
  121. package/es/form/style/index.d.ts +0 -1
  122. package/es/form/type.d.ts +0 -486
  123. package/es/form/utils/index.d.ts +0 -5
  124. package/es/global-config/default-config.d.ts +0 -84
  125. package/es/global-config/locale/ar_KW.d.ts +0 -239
  126. package/es/global-config/locale/en_US.d.ts +0 -263
  127. package/es/global-config/locale/it_IT.d.ts +0 -263
  128. package/es/global-config/locale/ja_JP.d.ts +0 -263
  129. package/es/global-config/locale/ko_KR.d.ts +0 -263
  130. package/es/global-config/locale/ru_RU.d.ts +0 -263
  131. package/es/global-config/locale/zh_CN.d.ts +0 -263
  132. package/es/global-config/locale/zh_TW.d.ts +0 -263
  133. package/es/global-config/mobile/default-config.d.ts +0 -7
  134. package/es/global-config/mobile/locale/ar_KW.d.ts +0 -98
  135. package/es/global-config/mobile/locale/en_US.d.ts +0 -99
  136. package/es/global-config/mobile/locale/it_IT.d.ts +0 -99
  137. package/es/global-config/mobile/locale/ja_JP.d.ts +0 -99
  138. package/es/global-config/mobile/locale/ko_KR.d.ts +0 -99
  139. package/es/global-config/mobile/locale/ru_RU.d.ts +0 -99
  140. package/es/global-config/mobile/locale/zh_CN.d.ts +0 -99
  141. package/es/global-config/mobile/locale/zh_TW.d.ts +0 -99
  142. package/es/global-config/t.d.ts +0 -25
  143. package/es/hooks/useAttach.d.ts +0 -10
  144. package/es/hooks/useCommonClassName.d.ts +0 -54
  145. package/es/hooks/useConfig.d.ts +0 -2
  146. package/es/hooks/useControlled.d.ts +0 -9
  147. package/es/hooks/useDeepEffect.d.ts +0 -7
  148. package/es/hooks/useDefaultProps.d.ts +0 -1
  149. package/es/hooks/useDomCallback.d.ts +0 -1
  150. package/es/hooks/useDomRefCallback.d.ts +0 -1
  151. package/es/hooks/useDragSorter.d.ts +0 -28
  152. package/es/hooks/useEventCallback.d.ts +0 -9
  153. package/es/hooks/useGlobalConfig.d.ts +0 -1
  154. package/es/hooks/useGlobalIcon.d.ts +0 -5
  155. package/es/hooks/useLastest.d.ts +0 -2
  156. package/es/hooks/useLayoutEffect.d.ts +0 -3
  157. package/es/hooks/useMouseEvent.d.ts +0 -25
  158. package/es/hooks/useMutationObserver.d.ts +0 -4
  159. package/es/hooks/usePopper.d.ts +0 -19
  160. package/es/hooks/useResizeObserve.d.ts +0 -1
  161. package/es/hooks/useRipple.d.ts +0 -0
  162. package/es/hooks/useSetState.d.ts +0 -7
  163. package/es/hooks/useVirtualScroll.d.ts +0 -30
  164. package/es/hooks/useWindowSize.d.ts +0 -6
  165. package/es/index.d.ts +0 -25
  166. package/es/input/Input.d.ts +0 -16
  167. package/es/input/InputGroup.d.ts +0 -10
  168. package/es/input/defaultProps.d.ts +0 -17
  169. package/es/input/index.d.ts +0 -6
  170. package/es/input/style/css.d.ts +0 -1
  171. package/es/input/style/index.d.ts +0 -1
  172. package/es/input/type.d.ts +0 -237
  173. package/es/input-number/InputNumber.d.ts +0 -17
  174. package/es/input-number/defaultProps.d.ts +0 -2
  175. package/es/input-number/index.d.ts +0 -5
  176. package/es/input-number/style/css.d.ts +0 -1
  177. package/es/input-number/style/index.d.ts +0 -1
  178. package/es/input-number/type.d.ts +0 -156
  179. package/es/input-number/useInputNumber.d.ts +0 -51
  180. package/es/ip-input/IPInput.d.ts +0 -5
  181. package/es/ip-input/defaultProps.d.ts +0 -2
  182. package/es/ip-input/index.d.ts +0 -3
  183. package/es/ip-input/style/index.d.ts +0 -1
  184. package/es/ip-input/type.d.ts +0 -113
  185. package/es/ip-input/utils.d.ts +0 -35
  186. package/es/layout/Aside.d.ts +0 -11
  187. package/es/layout/Layout.d.ts +0 -26
  188. package/es/layout/defaultProps.d.ts +0 -5
  189. package/es/layout/index.d.ts +0 -10
  190. package/es/layout/style/index.d.ts +0 -1
  191. package/es/layout/type.d.ts +0 -38
  192. package/es/list/List.d.ts +0 -17
  193. package/es/list/ListItem.d.ts +0 -15
  194. package/es/list/ListItemMeta.d.ts +0 -10
  195. package/es/list/defaultProps.d.ts +0 -7
  196. package/es/list/hooks/useListVirtualScroll.d.ts +0 -24
  197. package/es/list/index.d.ts +0 -10
  198. package/es/list/style/css.d.ts +0 -1
  199. package/es/list/style/index.d.ts +0 -1
  200. package/es/list/type.d.ts +0 -92
  201. package/es/loading/Gradient.d.ts +0 -6
  202. package/es/loading/Loading.d.ts +0 -7
  203. package/es/loading/circleAdapter.d.ts +0 -1
  204. package/es/loading/defaultProps.d.ts +0 -2
  205. package/es/loading/index.d.ts +0 -5
  206. package/es/loading/style/css.d.ts +0 -1
  207. package/es/loading/style/index.d.ts +0 -1
  208. package/es/loading/type.d.ts +0 -68
  209. package/es/loading/utils/setStyle.d.ts +0 -7
  210. package/es/locale/LocalReceiver.d.ts +0 -6
  211. package/es/locale/ar_KW.d.ts +0 -3
  212. package/es/locale/en_US.d.ts +0 -3
  213. package/es/locale/it_IT.d.ts +0 -3
  214. package/es/locale/ja_JP.d.ts +0 -3
  215. package/es/locale/ko_KR.d.ts +0 -3
  216. package/es/locale/ru_RU.d.ts +0 -3
  217. package/es/locale/zh_CN.d.ts +0 -3
  218. package/es/locale/zh_TW.d.ts +0 -3
  219. package/es/myform/index.d.ts +0 -0
  220. package/es/notification/Notify.d.ts +0 -11
  221. package/es/notification/NotifyContainer.d.ts +0 -13
  222. package/es/notification/NotifyContext.d.ts +0 -23
  223. package/es/notification/NotifyItem.d.ts +0 -4
  224. package/es/notification/index.d.ts +0 -3
  225. package/es/notification/style/css.d.ts +0 -1
  226. package/es/notification/style/index.d.ts +0 -1
  227. package/es/notification/type.d.ts +0 -22
  228. package/es/popup/Popup.d.ts +0 -21
  229. package/es/popup/defaultProps.d.ts +0 -5
  230. package/es/popup/hooks/useTrigger.d.ts +0 -20
  231. package/es/popup/index.d.ts +0 -5
  232. package/es/popup/style/css.d.ts +0 -1
  233. package/es/popup/style/index.d.ts +0 -1
  234. package/es/popup/type.d.ts +0 -109
  235. package/es/portal/Portal.d.ts +0 -16
  236. package/es/portal/index.d.ts +0 -1
  237. package/es/radio/Radio.d.ts +0 -8
  238. package/es/radio/RadioGroup.d.ts +0 -14
  239. package/es/radio/defaultProps.d.ts +0 -3
  240. package/es/radio/index.d.ts +0 -10
  241. package/es/radio/style/css.d.ts +0 -0
  242. package/es/radio/style/index.d.ts +0 -1
  243. package/es/radio/type.d.ts +0 -117
  244. package/es/radio/useKeyboard.d.ts +0 -4
  245. package/es/select/Option.d.ts +0 -24
  246. package/es/select/OptionGroup.d.ts +0 -7
  247. package/es/select/PopupContent.d.ts +0 -24
  248. package/es/select/Select.d.ts +0 -13
  249. package/es/select/defaultProps.d.ts +0 -4
  250. package/es/select/hooks/useOptions.d.ts +0 -16
  251. package/es/select/hooks/usePanelVirtualScroll.d.ts +0 -24
  252. package/es/select/index.d.ts +0 -8
  253. package/es/select/style/css.d.ts +0 -1
  254. package/es/select/style/index.d.ts +0 -1
  255. package/es/select/type.d.ts +0 -344
  256. package/es/select/utils/helper.d.ts +0 -18
  257. package/es/select-input/SelectInput.d.ts +0 -11
  258. package/es/select-input/defaultProps.d.ts +0 -2
  259. package/es/select-input/hook/useMultiple.d.ts +0 -23
  260. package/es/select-input/hook/useOverlayInnerStyle.d.ts +0 -11
  261. package/es/select-input/hook/useSingle.d.ts +0 -16
  262. package/es/select-input/index.d.ts +0 -5
  263. package/es/select-input/interface.d.ts +0 -17
  264. package/es/select-input/style/css.d.ts +0 -1
  265. package/es/select-input/style/index.d.ts +0 -1
  266. package/es/select-input/type.d.ts +0 -243
  267. package/es/slider/Slider.d.ts +0 -7
  268. package/es/slider/SliderHandleButton.d.ts +0 -11
  269. package/es/slider/defaultProps.d.ts +0 -5
  270. package/es/slider/index.d.ts +0 -5
  271. package/es/slider/style/css.d.ts +0 -1
  272. package/es/slider/style/index.d.ts +0 -1
  273. package/es/slider/type.d.ts +0 -78
  274. package/es/space/defaultProps.d.ts +0 -0
  275. package/es/space/index.d.ts +0 -0
  276. package/es/space/type.d.ts +0 -0
  277. package/es/style/index.d.ts +0 -1
  278. package/es/switch/Switch.d.ts +0 -9
  279. package/es/switch/defaultProps.d.ts +0 -2
  280. package/es/switch/index.d.ts +0 -4
  281. package/es/switch/style/css.d.ts +0 -1
  282. package/es/switch/style/index.d.ts +0 -1
  283. package/es/switch/type.d.ts +0 -48
  284. package/es/tab/TabBar.d.ts +0 -9
  285. package/es/tab/TabNav.d.ts +0 -10
  286. package/es/tab/TabNavItem.d.ts +0 -15
  287. package/es/tab/TabPanel.d.ts +0 -9
  288. package/es/tab/Tabs.d.ts +0 -10
  289. package/es/tab/defaultProps.d.ts +0 -3
  290. package/es/tab/index.d.ts +0 -8
  291. package/es/tab/style/index.d.ts +0 -1
  292. package/es/tab/type.d.ts +0 -130
  293. package/es/tab/useTabClass.d.ts +0 -8
  294. package/es/table/Cell.d.ts +0 -18
  295. package/es/table/TBody.d.ts +0 -28
  296. package/es/table/THead.d.ts +0 -10
  297. package/es/table/TR.d.ts +0 -28
  298. package/es/table/Table.d.ts +0 -6
  299. package/es/table/defaultProps.d.ts +0 -2
  300. package/es/table/hooks/index.d.ts +0 -4
  301. package/es/table/hooks/useTableClassName.d.ts +0 -26
  302. package/es/table/hooks/useTableStyle.d.ts +0 -11
  303. package/es/table/index.d.ts +0 -5
  304. package/es/table/style/css.d.ts +0 -1
  305. package/es/table/style/index.d.ts +0 -1
  306. package/es/table/type.d.ts +0 -195
  307. package/es/tag/Tag.d.ts +0 -14
  308. package/es/tag/defaultProps.d.ts +0 -7
  309. package/es/tag/index.d.ts +0 -4
  310. package/es/tag/style/css.d.ts +0 -1
  311. package/es/tag/style/index.d.ts +0 -1
  312. package/es/tag/type.d.ts +0 -169
  313. package/es/tag-input/TagInput.d.ts +0 -9
  314. package/es/tag-input/defaultProps.d.ts +0 -2
  315. package/es/tag-input/hooks/useHover.d.ts +0 -17
  316. package/es/tag-input/hooks/useTagList.d.ts +0 -30
  317. package/es/tag-input/hooks/useTagScroll.d.ts +0 -25
  318. package/es/tag-input/index.d.ts +0 -5
  319. package/es/tag-input/style/css.d.ts +0 -1
  320. package/es/tag-input/style/index.d.ts +0 -1
  321. package/es/tag-input/type.d.ts +0 -235
  322. package/es/tag-input/useTagList.d.ts +0 -30
  323. package/es/utils/composeRefs.d.ts +0 -2
  324. package/es/utils/dom.d.ts +0 -7
  325. package/es/utils/forwardRefWithStatics.d.ts +0 -2
  326. package/es/utils/getScrollbarWidth.d.ts +0 -6
  327. package/es/utils/helper.d.ts +0 -46
  328. package/es/utils/input-number/large-number.d.ts +0 -85
  329. package/es/utils/input-number/number.d.ts +0 -81
  330. package/es/utils/isFragment.d.ts +0 -4
  331. package/es/utils/listener.d.ts +0 -4
  332. package/es/utils/log/index.d.ts +0 -2
  333. package/es/utils/log/log.d.ts +0 -3
  334. package/es/utils/log/types.d.ts +0 -8
  335. package/es/utils/noop.d.ts +0 -2
  336. package/es/utils/number.d.ts +0 -7
  337. package/es/utils/parentTNode.d.ts +0 -10
  338. package/es/utils/parseTNode.d.ts +0 -10
  339. package/es/utils/react-render.d.ts +0 -16
  340. package/es/utils/ref.d.ts +0 -1
  341. package/es/utils/refs.d.ts +0 -13
  342. package/es/utils/scroll.d.ts +0 -3
  343. package/es/utils/style.d.ts +0 -4
  344. package/es/utils/transition.d.ts +0 -20
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { BaseTableCellParams, TableRowData } from "./type";
3
- export interface CellProps<T extends TableRowData = TableRowData> {
4
- cellParams: BaseTableCellParams<T>;
5
- cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);
6
- onClick?: (e: React.MouseEvent<HTMLElement>) => void;
7
- }
8
- /**
9
- * 渲染单元格内容
10
- */
11
- export declare function renderCell<T extends TableRowData = TableRowData>(params: BaseTableCellParams<T>, extra?: {
12
- cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);
13
- }): React.ReactNode;
14
- declare const Cell: {
15
- <T extends TableRowData = TableRowData>(props: CellProps<T>): React.JSX.Element;
16
- displayName: string;
17
- };
18
- export default Cell;
@@ -1,28 +0,0 @@
1
- import React from "react";
2
- import { TableRowData, BaseTableCol, BaseTableCellParams } from "./type";
3
- export interface TBodyProps<T extends TableRowData = TableRowData> {
4
- data: T[];
5
- columns: BaseTableCol<T>[];
6
- rowKey: string;
7
- rowClassName?: string | ((params: {
8
- row: T;
9
- rowIndex: number;
10
- }) => string);
11
- rowAttributes?: Record<string, unknown> | ((params: {
12
- row: T;
13
- rowIndex: number;
14
- }) => Record<string, unknown>);
15
- cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);
16
- empty?: React.ReactNode;
17
- onRowClick?: (params: {
18
- row: T;
19
- rowIndex: number;
20
- e: React.MouseEvent<HTMLTableRowElement>;
21
- }) => void;
22
- onCellClick?: (params: BaseTableCellParams<T>) => void;
23
- }
24
- declare const TBody: {
25
- <T extends TableRowData = TableRowData>(props: TBodyProps<T>): React.JSX.Element;
26
- displayName: string;
27
- };
28
- export default TBody;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { BaseTableCol, TableRowData } from "./type";
3
- export interface THeadProps<T extends TableRowData = TableRowData> {
4
- columns: BaseTableCol<T>[];
5
- }
6
- declare const THead: {
7
- <T extends TableRowData = TableRowData>(props: THeadProps<T>): React.JSX.Element;
8
- displayName: string;
9
- };
10
- export default THead;
package/es/table/TR.d.ts DELETED
@@ -1,28 +0,0 @@
1
- import React, { MouseEvent } from "react";
2
- import { TableRowData, BaseTableCol, BaseTableCellParams } from "./type";
3
- export interface TRProps<T extends TableRowData = TableRowData> {
4
- row: T;
5
- rowIndex: number;
6
- columns: BaseTableCol<T>[];
7
- rowKey: string;
8
- rowClassName?: string | ((params: {
9
- row: T;
10
- rowIndex: number;
11
- }) => string);
12
- rowAttributes?: Record<string, unknown> | ((params: {
13
- row: T;
14
- rowIndex: number;
15
- }) => Record<string, unknown>);
16
- cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);
17
- onRowClick?: (params: {
18
- row: T;
19
- rowIndex: number;
20
- e: MouseEvent<HTMLTableRowElement>;
21
- }) => void;
22
- onCellClick?: (params: BaseTableCellParams<T>) => void;
23
- }
24
- declare const TR: {
25
- <T extends TableRowData = TableRowData>(props: TRProps<T>): React.JSX.Element;
26
- displayName: string;
27
- };
28
- export default TR;
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { BaseTableProps, TableRowData } from "./type";
3
- export interface TableProps<T extends TableRowData = TableRowData> extends Omit<React.HTMLAttributes<HTMLDivElement>, "onClick">, BaseTableProps<T> {
4
- }
5
- declare const Table: <T extends TableRowData = TableRowData>(props: TableProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
6
- export default Table;
@@ -1,2 +0,0 @@
1
- import { BaseTableProps } from "./type";
2
- export declare const tableDefaultProps: BaseTableProps;
@@ -1,4 +0,0 @@
1
- export { default as useTableClassName } from "./useTableClassName";
2
- export type { TableClassName } from "./useTableClassName";
3
- export { default as useTableStyle, formatCSSUnit } from "./useTableStyle";
4
- export type { TableStyleResult } from "./useTableStyle";
@@ -1,26 +0,0 @@
1
- export interface TableClassName {
2
- table: string;
3
- content: string;
4
- tableElm: string;
5
- header: string;
6
- body: string;
7
- empty: string;
8
- emptyRow: string;
9
- bordered: string;
10
- stripe: string;
11
- hover: string;
12
- sizeSmall: string;
13
- sizeMedium: string;
14
- sizeLarge: string;
15
- layoutFixed: string;
16
- layoutAuto: string;
17
- verticalAlignTop: string;
18
- verticalAlignMiddle: string;
19
- verticalAlignBottom: string;
20
- alignLeft: string;
21
- alignCenter: string;
22
- alignRight: string;
23
- ellipsis: string;
24
- cellEllipsis: string;
25
- }
26
- export default function useTableClassName(): TableClassName;
@@ -1,11 +0,0 @@
1
- import { BaseTableProps } from "../type";
2
- export interface TableStyleResult {
3
- tableClasses: string;
4
- tableContentStyles: React.CSSProperties;
5
- tableElementStyles: React.CSSProperties;
6
- }
7
- /**
8
- * 格式化 CSS 单位
9
- */
10
- export declare function formatCSSUnit(unit: string | number | undefined): string | undefined;
11
- export default function useTableStyle(props: BaseTableProps): TableStyleResult;
@@ -1,5 +0,0 @@
1
- import "./style/index";
2
- export type { TableProps } from "./Table";
3
- export type * from "./type";
4
- export declare const Table: <T extends import("./type").TableRowData = import("./type").TableRowData>(props: import("./Table").TableProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
5
- export default Table;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,195 +0,0 @@
1
- import { ReactNode, MouseEvent } from "react";
2
- /**
3
- * 表格行数据类型
4
- */
5
- export type TableRowData = Record<string, unknown>;
6
- /**
7
- * 列对齐方式
8
- */
9
- export type TableColumnAlign = "left" | "center" | "right";
10
- /**
11
- * 表格尺寸
12
- */
13
- export type TableSize = "small" | "medium" | "large";
14
- /**
15
- * 表格布局方式
16
- */
17
- export type TableLayout = "auto" | "fixed";
18
- /**
19
- * 单元格参数
20
- */
21
- export interface BaseTableCellParams<T extends TableRowData = TableRowData> {
22
- row: T;
23
- rowIndex: number;
24
- col: BaseTableCol<T>;
25
- colIndex: number;
26
- e?: React.MouseEvent<HTMLElement>;
27
- }
28
- /**
29
- * 表头单元格参数
30
- */
31
- export interface BaseTableHeadCellParams<T extends TableRowData = TableRowData> {
32
- col: BaseTableCol<T>;
33
- colIndex: number;
34
- }
35
- /**
36
- * 表格列配置
37
- */
38
- export interface BaseTableCol<T extends TableRowData = TableRowData> {
39
- /**
40
- * 列标识,必需
41
- */
42
- colKey: string;
43
- /**
44
- * 列标题
45
- */
46
- title?: string | ReactNode | ((params: BaseTableHeadCellParams<T>) => ReactNode);
47
- /**
48
- * 列宽度
49
- */
50
- width?: string | number;
51
- /**
52
- * 列最小宽度
53
- */
54
- minWidth?: string | number;
55
- /**
56
- * 列对齐方式
57
- */
58
- align?: TableColumnAlign;
59
- /**
60
- * 自定义单元格渲染
61
- */
62
- cell?: string | ReactNode | ((params: BaseTableCellParams<T>) => ReactNode);
63
- /**
64
- * 自定义表头渲染
65
- */
66
- render?: (params: BaseTableHeadCellParams<T> | BaseTableCellParams<T>) => ReactNode;
67
- /**
68
- * 是否固定列
69
- */
70
- fixed?: "left" | "right";
71
- /**
72
- * 列类名
73
- */
74
- className?: string | ((params: BaseTableCellParams<T>) => string);
75
- /**
76
- * 列属性
77
- */
78
- attrs?: Record<string, unknown> | ((params: BaseTableCellParams<T>) => Record<string, unknown>);
79
- /**
80
- * 是否省略文本
81
- */
82
- ellipsis?: boolean | {
83
- content?: ReactNode;
84
- props?: Record<string, unknown>;
85
- };
86
- /**
87
- * 子列(多级表头)
88
- */
89
- children?: BaseTableCol<T>[];
90
- }
91
- /**
92
- * 基础表格属性
93
- */
94
- export interface BaseTableProps<T extends TableRowData = TableRowData> {
95
- /**
96
- * 列配置
97
- * @default []
98
- */
99
- columns?: BaseTableCol<T>[];
100
- /**
101
- * 数据源
102
- * @default []
103
- */
104
- data?: T[];
105
- /**
106
- * 行唯一标识字段名
107
- * @default 'id'
108
- */
109
- rowKey?: string;
110
- /**
111
- * 是否显示表头
112
- * @default true
113
- */
114
- showHeader?: boolean;
115
- /**
116
- * 是否显示边框
117
- * @default false
118
- */
119
- bordered?: boolean;
120
- /**
121
- * 是否显示斑马纹
122
- * @default false
123
- */
124
- stripe?: boolean;
125
- /**
126
- * 是否显示悬浮效果
127
- * @default false
128
- */
129
- hover?: boolean;
130
- /**
131
- * 表格尺寸
132
- * @default 'medium'
133
- */
134
- size?: TableSize;
135
- /**
136
- * 表格布局方式
137
- * @default 'fixed'
138
- */
139
- tableLayout?: TableLayout;
140
- /**
141
- * 垂直对齐方式
142
- * @default 'middle'
143
- */
144
- verticalAlign?: "top" | "middle" | "bottom";
145
- /**
146
- * 表格高度,超出后会出现滚动条。示例:100, '30%', '300'。值为数字类型,会自动加上单位 px
147
- */
148
- height?: string | number;
149
- /**
150
- * 表格最大高度,超出后会出现滚动条。示例:100, '30%', '300'。值为数字类型,会自动加上单位 px
151
- */
152
- maxHeight?: string | number;
153
- /**
154
- * 空数据展示内容
155
- */
156
- empty?: ReactNode;
157
- /**
158
- * 单元格为空时的展示内容
159
- */
160
- cellEmptyContent?: ReactNode | ((params: BaseTableCellParams<T>) => ReactNode);
161
- /**
162
- * 行类名
163
- */
164
- rowClassName?: string | ((params: {
165
- row: T;
166
- rowIndex: number;
167
- }) => string);
168
- /**
169
- * 行属性
170
- */
171
- rowAttributes?: Record<string, unknown> | ((params: {
172
- row: T;
173
- rowIndex: number;
174
- }) => Record<string, unknown>);
175
- /**
176
- * 行点击事件
177
- */
178
- onRowClick?: (params: {
179
- row: T;
180
- rowIndex: number;
181
- e: MouseEvent<HTMLTableRowElement>;
182
- }) => void;
183
- /**
184
- * 单元格点击事件
185
- */
186
- onCellClick?: (params: BaseTableCellParams<T>) => void;
187
- /**
188
- * 自定义类名
189
- */
190
- className?: string;
191
- /**
192
- * 自定义样式
193
- */
194
- style?: React.CSSProperties;
195
- }
package/es/tag/Tag.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import React, { ForwardRefRenderFunction, FocusEvent } from "react";
2
- import { StyledProps } from "../common";
3
- import { TdTagProps } from "./type";
4
- export interface TagProps extends TdTagProps, StyledProps {
5
- /**
6
- * 标签内容
7
- */
8
- tabIndex?: number;
9
- onFocus?: (e: FocusEvent<HTMLDivElement>) => void;
10
- onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
11
- }
12
- export declare const TagFunction: ForwardRefRenderFunction<HTMLDivElement, TagProps>;
13
- export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
14
- export default Tag;
@@ -1,7 +0,0 @@
1
- /**
2
- * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
3
- * */
4
- import { TdTagProps, TdCheckTagProps, TdCheckTagGroupProps } from "./type";
5
- export declare const tagDefaultProps: TdTagProps;
6
- export declare const checkTagDefaultProps: TdCheckTagProps;
7
- export declare const checkTagGroupDefaultProps: TdCheckTagGroupProps;
package/es/tag/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import "./style/index.js";
2
- export type { TagProps } from "./Tag";
3
- export declare const Tag: import("react").FunctionComponent<import("./Tag").TagProps & import("react").RefAttributes<HTMLDivElement>>;
4
- export * from "./type";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
package/es/tag/type.d.ts DELETED
@@ -1,169 +0,0 @@
1
- import { TNode, TElement, SizeEnum } from "../common";
2
- import { MouseEvent, KeyboardEvent } from "react";
3
- export interface TdTagProps {
4
- /**
5
- * 组件子元素,同 `content`
6
- */
7
- children?: TNode;
8
- /**
9
- * 标签是否可关闭
10
- * @default false
11
- */
12
- closable?: boolean;
13
- /**
14
- * 自定义标签颜色
15
- * @default ''
16
- */
17
- color?: string;
18
- /**
19
- * 组件子元素
20
- */
21
- content?: TNode;
22
- /**
23
- * 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态
24
- * @default false
25
- */
26
- disabled?: boolean;
27
- /**
28
- * 标签中的图标,可自定义图标呈现
29
- */
30
- icon?: TElement;
31
- /**
32
- * 标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80
33
- */
34
- maxWidth?: string | number;
35
- /**
36
- * 标签类型,有三种:方形、圆角方形、标记型
37
- * @default square
38
- */
39
- shape?: "square" | "round" | "mark";
40
- /**
41
- * 标签尺寸
42
- * @default medium
43
- */
44
- size?: SizeEnum;
45
- /**
46
- * 组件风格,用于描述组件不同的应用场景
47
- * @default default
48
- */
49
- theme?: "default" | "primary" | "warning" | "danger" | "success";
50
- /**
51
- * 标签标题,在标签hover时展示,默认为标签内容
52
- * @default ''
53
- */
54
- title?: string;
55
- /**
56
- * 标签风格变体
57
- * @default dark
58
- */
59
- variant?: "dark" | "light" | "outline" | "light-outline";
60
- /**
61
- * 点击时触发
62
- */
63
- onClick?: (context: {
64
- e: MouseEvent<HTMLSpanElement>;
65
- }) => void;
66
- /**
67
- * 如果关闭按钮存在,点击关闭按钮时触发
68
- */
69
- onClose?: (context: {
70
- e: MouseEvent<SVGSVGElement>;
71
- }) => void;
72
- }
73
- export interface TdCheckTagProps {
74
- /**
75
- * 标签选中的状态,默认风格(theme=default)才有选中态
76
- */
77
- checked?: boolean;
78
- /**
79
- * 标签选中的状态,默认风格(theme=default)才有选中态,非受控属性
80
- */
81
- defaultChecked?: boolean;
82
- /**
83
- * 透传标签选中态属性
84
- */
85
- checkedProps?: TdTagProps;
86
- /**
87
- * 组件子元素
88
- */
89
- children?: TNode;
90
- /**
91
- * 组件子元素;传入数组时:[选中内容,非选中内容]
92
- */
93
- content?: [] | TNode;
94
- /**
95
- * 标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态
96
- * @default false
97
- */
98
- disabled?: boolean;
99
- /**
100
- * 标签尺寸
101
- * @default medium
102
- */
103
- size?: SizeEnum;
104
- /**
105
- * 透传标签未选态属性
106
- */
107
- uncheckedProps?: TdTagProps;
108
- /**
109
- * 标签唯一标识,一般用于标签组场景,单个可选择标签无需设置
110
- */
111
- value?: string | number;
112
- /**
113
- * 状态切换时触发
114
- */
115
- onChange?: (checked: boolean, context: CheckTagChangeContext) => void;
116
- /**
117
- * 点击标签时触发
118
- */
119
- onClick?: (context: {
120
- e: MouseEvent<HTMLSpanElement>;
121
- }) => void;
122
- }
123
- export interface TdCheckTagGroupProps {
124
- /**
125
- * 透传标签选中态属性
126
- */
127
- checkedProps?: TdTagProps;
128
- /**
129
- * 是否支持选中多个标签
130
- * @default false
131
- */
132
- multiple?: boolean;
133
- /**
134
- * 标签选项列表
135
- */
136
- options?: CheckTagGroupOption[];
137
- /**
138
- * 透传标签未选态属性
139
- */
140
- uncheckedProps?: TdTagProps;
141
- /**
142
- * 选中标签值
143
- * @default []
144
- */
145
- value?: CheckTagGroupValue;
146
- /**
147
- * 选中标签值,非受控属性
148
- * @default []
149
- */
150
- defaultValue?: CheckTagGroupValue;
151
- /**
152
- * null
153
- */
154
- onChange?: (value: CheckTagGroupValue, context: CheckTagGroupChangeContext) => void;
155
- }
156
- export interface CheckTagChangeContext {
157
- e: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>;
158
- value: string | number;
159
- }
160
- export interface CheckTagGroupOption extends TdCheckTagProps {
161
- label: string | TNode;
162
- value: string | number;
163
- }
164
- export type CheckTagGroupValue = Array<string | number>;
165
- export interface CheckTagGroupChangeContext {
166
- type: "check" | "uncheck";
167
- e: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>;
168
- value: string | number;
169
- }
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { InputRef } from "../input";
3
- import { TdTagInputProps } from "./type";
4
- import { StyledProps } from "../common";
5
- export interface TagInputProps extends TdTagInputProps, StyledProps {
6
- options?: unknown[];
7
- }
8
- declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<InputRef>>;
9
- export default TagInput;
@@ -1,2 +0,0 @@
1
- import { TdTagInputProps } from "./type";
2
- export declare const tagInputDefaultProps: TdTagInputProps;
@@ -1,17 +0,0 @@
1
- import { MouseEvent } from "react";
2
- import { TdTagInputProps } from "../type";
3
- export interface UseHoverParams {
4
- readonly: boolean;
5
- disabled: boolean;
6
- onMouseenter: (context: {
7
- e: MouseEvent<HTMLDivElement>;
8
- }) => void;
9
- onMouseleave: (context: {
10
- e: MouseEvent<HTMLDivElement>;
11
- }) => void;
12
- }
13
- export default function useHover(props: TdTagInputProps): {
14
- isHover: boolean;
15
- addHover: (context: Parameters<UseHoverParams["onMouseenter"]>[0]) => void;
16
- cancelHover: (context: Parameters<UseHoverParams["onMouseleave"]>[0]) => void;
17
- };
@@ -1,30 +0,0 @@
1
- import React, { MouseEvent, KeyboardEvent, ReactNode } from "react";
2
- import { TagInputChangeContext, TagInputValue, TdTagInputProps } from "../type";
3
- import { InputValue } from "../../input";
4
- import { DragSortInnerProps } from "../../hooks/useDragSorter";
5
- export type ChangeParams = [TagInputChangeContext];
6
- interface TagInputProps extends TdTagInputProps, DragSortInnerProps {
7
- options?: unknown[];
8
- }
9
- export default function useTagList(props: TagInputProps): {
10
- tagValue: TagInputValue;
11
- clearAll: (context: {
12
- e: MouseEvent<SVGSVGElement>;
13
- }) => void;
14
- onClose: (p: {
15
- e?: MouseEvent<SVGSVGElement>;
16
- index: number;
17
- }) => void;
18
- onInnerEnter: (value: InputValue, context: {
19
- e: KeyboardEvent<HTMLInputElement>;
20
- }) => void;
21
- onInputBackspaceKeyDown: (value: InputValue, context: {
22
- e: KeyboardEvent<HTMLInputElement>;
23
- }) => void;
24
- onInputBackspaceKeyUp: (_value: InputValue) => void;
25
- renderLabel: ({ displayNode, label }: {
26
- displayNode: ReactNode;
27
- label: ReactNode;
28
- }) => React.JSX.Element[];
29
- };
30
- export {};
@@ -1,25 +0,0 @@
1
- /**
2
- * 当标签数量过多时,输入框显示不下,则需要滚动查看,以下为滚动逻辑
3
- * 如果标签过多时的处理方式,是标签省略,则不需要此功能
4
- */
5
- import { WheelEvent } from "react";
6
- import { TdTagInputProps } from "../type";
7
- export default function useTagScroll(props: TdTagInputProps): {
8
- initScroll: (element: HTMLDivElement) => void;
9
- clearScroll: () => void;
10
- tagInputRef: import("react").MutableRefObject<{
11
- currentElement: HTMLDivElement;
12
- }>;
13
- scrollElement: HTMLDivElement;
14
- scrollDistance: number;
15
- scrollTo: (distance: number) => void;
16
- scrollToRight: () => void;
17
- scrollToLeft: () => void;
18
- updateScrollElement: (element: HTMLDivElement) => void;
19
- updateScrollDistance: () => void;
20
- onWheel: ({ e }: {
21
- e: WheelEvent<HTMLDivElement>;
22
- }) => void;
23
- scrollToRightOnEnter: () => void;
24
- scrollToLeftOnLeave: () => void;
25
- };
@@ -1,5 +0,0 @@
1
- import "./style/index.js";
2
- export * from "./type";
3
- export type { TagInputProps } from "./TagInput";
4
- export declare const TagInput: import("react").ForwardRefExoticComponent<import("./TagInput").TagInputProps & import("react").RefAttributes<import("..").InputRef>>;
5
- export default TagInput;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};