@tendaui/react 1.1.2 → 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 -60
  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 +0,0 @@
1
- export {};
@@ -1,50 +0,0 @@
1
- import { TNode } from "../common";
2
- export interface TdBadgeProps {
3
- /**
4
- * 徽标内容,同 content
5
- */
6
- children?: TNode;
7
- /**
8
- * 颜色
9
- * @default ''
10
- */
11
- color?: string;
12
- /**
13
- * 徽标内容
14
- */
15
- content?: TNode;
16
- /**
17
- * 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+
18
- * @default 0
19
- */
20
- count?: TNode;
21
- /**
22
- * 是否为红点
23
- * @default false
24
- */
25
- dot?: boolean;
26
- /**
27
- * 封顶的数字值
28
- * @default 99
29
- */
30
- maxCount?: number;
31
- /**
32
- * 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']
33
- */
34
- offset?: Array<string | number>;
35
- /**
36
- * 形状
37
- * @default circle
38
- */
39
- shape?: "circle" | "round";
40
- /**
41
- * 当数值为 0 时,是否展示徽标
42
- * @default false
43
- */
44
- showZero?: boolean;
45
- /**
46
- * 尺寸
47
- * @default medium
48
- */
49
- size?: "small" | "medium";
50
- }
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- import { TdButtonProps } from "./type";
3
- export interface ButtonProps extends Omit<React.AllHTMLAttributes<HTMLElement>, "content" | "shape" | "size" | "type" | "children">, TdButtonProps {
4
- }
5
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
6
- export default Button;
@@ -1,2 +0,0 @@
1
- import { TdButtonProps } from "./type";
2
- export declare const buttonDefaultProps: TdButtonProps;
@@ -1,5 +0,0 @@
1
- import "./style/index";
2
- export type { ButtonProps } from "./Button";
3
- export declare const Button: import("react").ForwardRefExoticComponent<import("./Button").ButtonProps & import("react").RefAttributes<HTMLElement>>;
4
- export * from "./type";
5
- export default Button;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,81 +0,0 @@
1
- import { TNode, TElement, SizeEnum } from "../common";
2
- import { MouseEvent } from "react";
3
- export interface TdButtonProps {
4
- /**
5
- * 是否为块级元素
6
- * @default false
7
- */
8
- block?: boolean;
9
- /**
10
- * 按钮内容,同 content
11
- */
12
- children?: TNode;
13
- /**
14
- * 按钮内容
15
- */
16
- content?: TNode;
17
- /**
18
- * 禁用状态
19
- * @default false
20
- */
21
- disabled?: boolean;
22
- /**
23
- * 原生的form属性,支持用于通过 form 属性触发对应 id 的 form 的表单事件
24
- */
25
- form?: string;
26
- /**
27
- * 是否为幽灵按钮(镂空按钮)
28
- * @default false
29
- */
30
- ghost?: boolean;
31
- /**
32
- * 跳转地址。href 存在时,按钮标签默认使用 `<a>` 渲染;如果指定了 `tag` 则使用指定的标签渲染
33
- * @default ''
34
- */
35
- href?: string;
36
- /**
37
- * 按钮内部图标,可完全自定义
38
- */
39
- icon?: TElement;
40
- /**
41
- * 是否显示为加载状态
42
- * @default false
43
- */
44
- loading?: boolean;
45
- /**
46
- * 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形
47
- * @default rectangle
48
- */
49
- shape?: "rectangle" | "square" | "round" | "circle";
50
- /**
51
- * 组件尺寸
52
- * @default medium
53
- */
54
- size?: SizeEnum;
55
- /**
56
- * 右侧内容,可用于定义右侧图标
57
- */
58
- suffix?: TElement;
59
- /**
60
- * 渲染按钮的 HTML 标签,默认使用标签 `<button>` 渲染,可以自定义为 `<a>` `<div>` 等。透传全部 HTML 属性,如:`href/target/data-*` 等。⚠️ 禁用按钮 `<button disabled>`无法显示 Popup 浮层信息,可通过修改 `tag=div` 解决这个问题
61
- */
62
- tag?: "button" | "a" | "div";
63
- /**
64
- * 组件风格,依次为默认色、品牌色、危险色、警告色、成功色
65
- */
66
- theme?: "default" | "primary" | "danger" | "warning" | "success";
67
- /**
68
- * 按钮类型
69
- * @default button
70
- */
71
- type?: "submit" | "reset" | "button";
72
- /**
73
- * 按钮形式,基础、线框、虚线、文字
74
- * @default base
75
- */
76
- variant?: "base" | "outline" | "dashed" | "text";
77
- /**
78
- * 点击时触发
79
- */
80
- onClick?: (e: MouseEvent<HTMLElement>) => void;
81
- }
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { CheckProps } from "../common/Check";
3
- export type CheckboxProps = Omit<CheckProps, "type">;
4
- declare const Checkbox: React.FunctionComponent<CheckboxProps & React.RefAttributes<HTMLLabelElement>> & {
5
- Group: {
6
- <T extends import("./type").CheckboxGroupValue = import("./type").CheckboxGroupValue>(props: import("./CheckboxGroup").CheckboxGroupProps<T>): React.JSX.Element;
7
- displayName: string;
8
- };
9
- };
10
- export default Checkbox;
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { CheckboxGroupValue, TdCheckboxGroupProps } from "./type";
3
- import { StyledProps } from "../common";
4
- export interface CheckboxGroupProps<T extends CheckboxGroupValue = CheckboxGroupValue> extends TdCheckboxGroupProps<T>, StyledProps {
5
- children?: React.ReactNode;
6
- }
7
- /**
8
- * 多选选项组,里面可以嵌套 <Checkbox />
9
- */
10
- declare const CheckboxGroup: {
11
- <T extends CheckboxGroupValue = CheckboxGroupValue>(props: CheckboxGroupProps<T>): React.JSX.Element;
12
- displayName: string;
13
- };
14
- export default CheckboxGroup;
@@ -1,3 +0,0 @@
1
- import { TdCheckboxProps, TdCheckboxGroupProps } from "./type";
2
- export declare const checkboxDefaultProps: TdCheckboxProps;
3
- export declare const checkboxGroupDefaultProps: Partial<TdCheckboxGroupProps>;
@@ -1,11 +0,0 @@
1
- import "./style/index.js";
2
- export type { CheckboxProps } from "./Checkbox";
3
- export type { CheckboxGroupProps } from "./CheckboxGroup";
4
- export * from "./type";
5
- export declare const Checkbox: import("react").FunctionComponent<import("./Checkbox").CheckboxProps & import("react").RefAttributes<HTMLLabelElement>> & {
6
- Group: {
7
- <T extends import("./type").CheckboxGroupValue = import("./type").CheckboxGroupValue>(props: import("./CheckboxGroup").CheckboxGroupProps<T>): import("react").JSX.Element;
8
- displayName: string;
9
- };
10
- };
11
- export default Checkbox;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,115 +0,0 @@
1
- import { TNode } from "../common";
2
- import { MouseEvent, ChangeEvent } from "react";
3
- export interface TdCheckboxProps {
4
- /**
5
- * 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用
6
- * @default false
7
- */
8
- checkAll?: boolean;
9
- /**
10
- * 是否选中
11
- * @default false
12
- */
13
- checked?: boolean;
14
- /**
15
- * 是否选中,非受控属性
16
- * @default false
17
- */
18
- defaultChecked?: boolean;
19
- /**
20
- * 多选框内容,同 label
21
- */
22
- children?: TNode;
23
- /**
24
- * 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。Checkbox.disabled 优先级高于 CheckboxGroup.disabled
25
- */
26
- disabled?: boolean;
27
- /**
28
- * 是否为半选
29
- * @default false
30
- */
31
- indeterminate?: boolean;
32
- /**
33
- * 主文案
34
- */
35
- label?: TNode;
36
- /**
37
- * HTML 元素原生属性
38
- * @default ''
39
- */
40
- name?: string;
41
- /**
42
- * 只读状态
43
- * @default false
44
- */
45
- readonly?: boolean;
46
- /**
47
- * HTML 原生属性
48
- * @default ''
49
- */
50
- title?: string;
51
- /**
52
- * 多选框的值
53
- */
54
- value?: string | number | boolean;
55
- /**
56
- * 值变化时触发
57
- */
58
- onChange?: (checked: boolean, context: {
59
- e: ChangeEvent<HTMLInputElement>;
60
- }) => void;
61
- /**
62
- * 点击时触发,一般用于外层阻止冒泡场景
63
- */
64
- onClick?: (context: {
65
- e: MouseEvent<HTMLLabelElement>;
66
- }) => void;
67
- }
68
- export interface TdCheckboxGroupProps<T = CheckboxGroupValue> {
69
- /**
70
- * 是否禁用组件,默认为 false。CheckboxGroup.disabled 优先级低于 Checkbox.disabled
71
- */
72
- disabled?: boolean;
73
- /**
74
- * 支持最多选中的数量
75
- */
76
- max?: number;
77
- /**
78
- * 统一设置内部复选框 HTML 属性
79
- * @default ''
80
- */
81
- name?: string;
82
- /**
83
- * 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」
84
- */
85
- options?: Array<CheckboxOption>;
86
- /**
87
- * 选中值
88
- * @default []
89
- */
90
- value?: T;
91
- /**
92
- * 选中值,非受控属性
93
- * @default []
94
- */
95
- defaultValue?: T;
96
- /**
97
- * 值变化时触发,`context.current` 表示当前变化的数据值,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中;`context.option` 表示当前变化的数据项
98
- */
99
- onChange?: (value: T, context: CheckboxGroupChangeContext) => void;
100
- }
101
- export type CheckboxOption = string | number | CheckboxOptionObj;
102
- export interface CheckboxOptionObj {
103
- label?: string | TNode;
104
- value?: string | number;
105
- disabled?: boolean;
106
- name?: string;
107
- checkAll?: true;
108
- }
109
- export type CheckboxGroupValue = Array<string | number | boolean>;
110
- export interface CheckboxGroupChangeContext {
111
- e: ChangeEvent<HTMLDivElement>;
112
- current: CheckboxOption | TdCheckboxProps;
113
- option: CheckboxOption | TdCheckboxProps;
114
- type: "check" | "uncheck";
115
- }
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { ColorPickerProps } from "./type";
3
- declare const _default: React.NamedExoticComponent<ColorPickerProps>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import { ColorPickerProps } from "./type";
3
- declare const _default: React.NamedExoticComponent<ColorPickerProps>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { TdColorBaseProps } from "../../type";
3
- declare const _default: React.MemoExoticComponent<(props: TdColorBaseProps) => React.JSX.Element>;
4
- export default _default;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { Color } from "../../../utils/color-picker";
3
- import type { TdColorPickerProps } from "../../../type";
4
- export interface TdColorFormatProps extends TdColorPickerProps {
5
- onInputChange: () => void;
6
- baseClassName: string;
7
- color: Color;
8
- }
9
- declare const _default: React.MemoExoticComponent<(props: TdColorFormatProps) => React.JSX.Element>;
10
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { TdColorFormatProps } from ".";
3
- declare const _default: React.MemoExoticComponent<(props: TdColorFormatProps) => React.JSX.Element>;
4
- export default _default;
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import { RadioValue } from "../../../radio";
3
- import { TdColorModes, TdColorPickerProps } from "../../type";
4
- export interface ColorPanelHeaderProps extends TdColorPickerProps {
5
- mode?: TdColorModes;
6
- colorModes?: Array<TdColorModes>;
7
- onModeChange?: (value: RadioValue, context: {
8
- e: React.ChangeEvent<HTMLInputElement>;
9
- }) => void;
10
- baseClassName?: string;
11
- }
12
- declare const _default: React.MemoExoticComponent<(props: ColorPanelHeaderProps) => React.JSX.Element>;
13
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { TdColorBaseProps } from "../../type";
3
- declare const _default: React.MemoExoticComponent<(props: TdColorBaseProps) => React.JSX.Element>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { ColorPickerProps } from "../../type";
3
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- import type { TdColorBaseProps } from "../../type";
3
- declare const _default: React.MemoExoticComponent<(props: TdColorBaseProps) => React.JSX.Element>;
4
- export default _default;
@@ -1,11 +0,0 @@
1
- import React, { CSSProperties } from "react";
2
- import type { TdColorBaseProps } from "../../type";
3
- export interface TdColorSliderProps extends TdColorBaseProps {
4
- className?: string;
5
- value?: number;
6
- maxValue?: number;
7
- railStyle?: CSSProperties;
8
- type: "hue" | "alpha";
9
- }
10
- declare const _default: React.MemoExoticComponent<(props: TdColorSliderProps) => React.JSX.Element>;
11
- export default _default;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import { TdColorBaseProps } from "../../type";
3
- export interface TdColorSwatchesProps extends TdColorBaseProps {
4
- colors?: string[];
5
- title?: string;
6
- editable?: boolean;
7
- onSetColor?: (color: string) => void;
8
- handleAddColor?: () => void;
9
- }
10
- declare const _default: React.MemoExoticComponent<(props: TdColorSwatchesProps) => React.JSX.Element>;
11
- export default _default;
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- import { TdColorPickerProps } from "../type";
3
- import { TdColorContext } from "../type";
4
- export interface ColorTriggerProps extends Pick<TdColorPickerProps, "disabled" | "inputProps" | "borderless" | "clearable" | "onClear"> {
5
- value?: string;
6
- onChange?: (v?: string, context?: TdColorContext) => void;
7
- }
8
- declare const _default: React.MemoExoticComponent<(props: ColorTriggerProps) => React.JSX.Element>;
9
- export default _default;
@@ -1,2 +0,0 @@
1
- import { TdColorPickerProps } from "./type";
2
- export declare const colorPickerDefaultProps: TdColorPickerProps;
@@ -1,5 +0,0 @@
1
- import { ColorObject, ColorPickerChangeTrigger, TdColorContext } from "./type";
2
- export declare const DEFAULT_COLOR = "#0052D9";
3
- export declare const normalizeColorValue: (value?: string | null) => string;
4
- export declare const buildColorObject: (value: string) => ColorObject;
5
- export declare const buildChangeContext: (value: string, trigger: ColorPickerChangeTrigger) => TdColorContext;
@@ -1,2 +0,0 @@
1
- declare const useClassNames: () => string;
2
- export default useClassNames;
@@ -1,14 +0,0 @@
1
- import { CSSProperties, MutableRefObject } from "react";
2
- import type { Color } from "../utils/color-picker/color";
3
- export interface TdColorSliderStyleParams {
4
- color: Color;
5
- value: number;
6
- maxValue: number;
7
- type: "hue" | "alpha";
8
- }
9
- declare const useStyles: (params: TdColorSliderStyleParams, panelRectRef: MutableRefObject<{
10
- width: number;
11
- }>) => {
12
- styles: CSSProperties;
13
- };
14
- export default useStyles;
@@ -1,6 +0,0 @@
1
- import "./style";
2
- export type { ColorPickerProps } from "./type";
3
- export * from "./type";
4
- export declare const ColorPickerPanel: import("react").NamedExoticComponent<import("./type").ColorPickerProps>;
5
- export declare const ColorPicker: import("react").NamedExoticComponent<import("./type").ColorPickerProps>;
6
- export default ColorPicker;
@@ -1 +0,0 @@
1
- export {};
@@ -1,135 +0,0 @@
1
- import { MouseEvent } from "react";
2
- import { StyledProps } from "../common";
3
- import { InputProps } from "../input";
4
- import { PopupProps } from "../popup";
5
- import { SelectInputProps } from "../select-input";
6
- import type { Color } from "./utils/color-picker/color";
7
- export interface TdColorPickerProps {
8
- /**
9
- * 无边框模式
10
- * @default false
11
- */
12
- borderless?: boolean;
13
- /**
14
- * 是否可清空
15
- * @default false
16
- */
17
- clearable?: boolean;
18
- /**
19
- * 是否禁用组件
20
- */
21
- disabled?: boolean;
22
- /**
23
- * 是否开启透明通道
24
- * @default false
25
- */
26
- enableAlpha?: boolean;
27
- /**
28
- * 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色
29
- * @default true
30
- */
31
- enableMultipleGradient?: boolean;
32
- /**
33
- * 格式化色值。`enableAlpha` 为真时,`HEX8/RGBA/HSLA/HSVA` 有效
34
- * @default RGB
35
- */
36
- format?: "HEX" | "HEX8" | "RGB" | "RGBA" | "HSL" | "HSLA" | "HSV" | "HSVA" | "CMYK" | "CSS";
37
- /**
38
- * 透传 Input 输入框组件全部属性
39
- */
40
- inputProps?: InputProps;
41
- /**
42
- * 透传 Popup 组件全部属性,如 `placement` `overlayStyle` `overlayClassName` `trigger`等
43
- */
44
- popupProps?: PopupProps;
45
- /**
46
- * 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 false 或 null 则完全不显示“最近使用颜色”
47
- * @default []
48
- */
49
- recentColors?: Array<string> | boolean | null;
50
- /**
51
- * 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 false 或 null 则完全不显示“最近使用颜色”,非受控属性
52
- * @default []
53
- */
54
- defaultRecentColors?: Array<string> | boolean | null;
55
- /**
56
- * 透传 SelectInputProps 筛选器输入框组件全部属性
57
- */
58
- selectInputProps?: SelectInputProps;
59
- /**
60
- * 是否展示颜色选择条右侧的颜色预览区域
61
- * @default true
62
- */
63
- showPrimaryColorPreview?: boolean;
64
- /**
65
- * 系统预设的颜色样例,值为 `null` 或 `[]` 则不显示系统色,值为 `undefined` 会显示组件内置的系统默认色
66
- */
67
- swatchColors?: Array<string> | null | undefined;
68
- /**
69
- * 色值
70
- * @default ''
71
- */
72
- value?: string;
73
- /**
74
- * 色值,非受控属性
75
- * @default ''
76
- */
77
- defaultValue?: string;
78
- /**
79
- * 选中的色值发生变化时触发,第一个参数 `value` 表示新色值,`context.color` 表示当前调色板控制器的色值,`context.trigger` 表示触发颜色变化的来源
80
- */
81
- onChange?: (value: string, context: {
82
- color: ColorObject;
83
- trigger: ColorPickerChangeTrigger;
84
- }) => void;
85
- /**
86
- * 清空按钮点击时触发
87
- */
88
- onClear?: (context: {
89
- e: MouseEvent<SVGElement>;
90
- }) => void;
91
- /**
92
- * 调色板控制器的值变化时触发,`context.color` 指调色板控制器的值
93
- */
94
- onPaletteBarChange?: (context: {
95
- color: ColorObject;
96
- }) => void;
97
- /**
98
- * 最近使用颜色发生变化时触发
99
- */
100
- onRecentColorsChange?: (value: Array<string>) => void;
101
- }
102
- export type ColorPickerChangeTrigger = "palette-saturation-brightness" | "palette-saturation" | "palette-brightness" | "palette-hue-bar" | "palette-alpha-bar" | "input" | "preset" | "recent";
103
- export interface ColorObject {
104
- alpha: number;
105
- css: string;
106
- hex: string;
107
- hex8: string;
108
- hsl: string;
109
- hsla: string;
110
- hsv: string;
111
- hsva: string;
112
- rgb: string;
113
- rgba: string;
114
- saturation: number;
115
- value: number;
116
- isGradient: boolean;
117
- linearGradient?: string;
118
- }
119
- export interface ColorPickerProps extends TdColorPickerProps, StyledProps {
120
- }
121
- export interface TdColorContext {
122
- color: ColorObject;
123
- trigger: ColorPickerChangeTrigger;
124
- }
125
- export type TdColorSaturationData = {
126
- saturation: number;
127
- value: number;
128
- };
129
- export interface TdColorBaseProps {
130
- disabled: boolean;
131
- color: Color;
132
- onChange?: (options?: any) => void;
133
- baseClassName: string;
134
- }
135
- export type TdColorModes = keyof typeof import("./utils/color-picker/constants").COLOR_MODES;
@@ -1,27 +0,0 @@
1
- /**
2
- * rgb 转 cmyk
3
- * @param red
4
- * @param green
5
- * @param blue
6
- * @returns
7
- */
8
- export declare const rgb2cmyk: (red: number, green: number, blue: number) => number[];
9
- /**
10
- * cmyk 转 rgb
11
- * @param cyan
12
- * @param magenta
13
- * @param yellow
14
- * @param black
15
- * @returns
16
- */
17
- export declare const cmyk2rgb: (cyan: number, magenta: number, yellow: number, black: number) => {
18
- r: number;
19
- g: number;
20
- b: number;
21
- };
22
- /**
23
- * 输入色转rgb
24
- * @param input
25
- * @returns
26
- */
27
- export declare const cmykInputToColor: (input: string) => string;