@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.
- package/es/_chunks/{dep-COy5g3FT.js → dep-D68MD94M.js} +2 -2
- package/es/_chunks/{dep-COy5g3FT.js.map → dep-D68MD94M.js.map} +1 -1
- package/es/button/_example/base.js +4 -2
- package/es/button/_example/base.js.map +1 -1
- package/es/button/_example/icon.js +4 -2
- package/es/button/_example/icon.js.map +1 -1
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/ip-input/IPInput.js +2 -2
- package/es/ip-input/index.js +2 -2
- package/es/ip-input/style/css.js +1 -0
- package/es/layout/index.js +1 -1
- package/es/layout/style/css.js +1 -0
- package/package.json +59 -60
- package/es/alert/Alert.d.ts +0 -7
- package/es/alert/defaultProps.d.ts +0 -2
- package/es/alert/index.d.ts +0 -5
- package/es/alert/style/css.d.ts +0 -1
- package/es/alert/style/index.d.ts +0 -1
- package/es/alert/type.d.ts +0 -45
- package/es/badge/Badge.d.ts +0 -7
- package/es/badge/defaultProps.d.ts +0 -2
- package/es/badge/index.d.ts +0 -5
- package/es/badge/style/css.d.ts +0 -1
- package/es/badge/style/index.d.ts +0 -1
- package/es/badge/type.d.ts +0 -50
- package/es/button/Button.d.ts +0 -6
- package/es/button/defaultProps.d.ts +0 -2
- package/es/button/index.d.ts +0 -5
- package/es/button/style/css.d.ts +0 -1
- package/es/button/style/index.d.ts +0 -1
- package/es/button/type.d.ts +0 -81
- package/es/checkbox/Checkbox.d.ts +0 -10
- package/es/checkbox/CheckboxGroup.d.ts +0 -14
- package/es/checkbox/defaultProps.d.ts +0 -3
- package/es/checkbox/index.d.ts +0 -11
- package/es/checkbox/style/css.d.ts +0 -1
- package/es/checkbox/style/index.d.ts +0 -1
- package/es/checkbox/type.d.ts +0 -115
- package/es/color-picker/ColorPickPanel.d.ts +0 -4
- package/es/color-picker/ColorPicker.d.ts +0 -4
- package/es/color-picker/components/panel/alpha.d.ts +0 -4
- package/es/color-picker/components/panel/format/index.d.ts +0 -10
- package/es/color-picker/components/panel/format/inputs.d.ts +0 -4
- package/es/color-picker/components/panel/header.d.ts +0 -13
- package/es/color-picker/components/panel/hue.d.ts +0 -4
- package/es/color-picker/components/panel/index.d.ts +0 -4
- package/es/color-picker/components/panel/saturation.d.ts +0 -4
- package/es/color-picker/components/panel/slider.d.ts +0 -11
- package/es/color-picker/components/panel/swatches.d.ts +0 -11
- package/es/color-picker/components/trigger.d.ts +0 -9
- package/es/color-picker/defaultProps.d.ts +0 -2
- package/es/color-picker/helpers.d.ts +0 -5
- package/es/color-picker/hooks/useClassNames.d.ts +0 -2
- package/es/color-picker/hooks/useStyles.d.ts +0 -14
- package/es/color-picker/index.d.ts +0 -6
- package/es/color-picker/style/index.d.ts +0 -1
- package/es/color-picker/type.d.ts +0 -135
- package/es/color-picker/utils/color-picker/cmyk.d.ts +0 -27
- package/es/color-picker/utils/color-picker/color.d.ts +0 -144
- package/es/color-picker/utils/color-picker/constants.d.ts +0 -30
- package/es/color-picker/utils/color-picker/draggable.d.ts +0 -23
- package/es/color-picker/utils/color-picker/format.d.ts +0 -64
- package/es/color-picker/utils/color-picker/gradient.d.ts +0 -22
- package/es/color-picker/utils/color-picker/index.d.ts +0 -7
- package/es/color-picker/utils/color-picker/types.d.ts +0 -28
- package/es/common/Check.d.ts +0 -22
- package/es/common/FakeArrow.d.ts +0 -9
- package/es/common/PluginContainer.d.ts +0 -9
- package/es/common/Portal.d.ts +0 -16
- package/es/common/observe.d.ts +0 -1
- package/es/common.d.ts +0 -81
- package/es/config-provider/ConfigContext.d.ts +0 -13
- package/es/config-provider/ConfigProvider.d.ts +0 -25
- package/es/config-provider/index.d.ts +0 -7
- package/es/config-provider/type.d.ts +0 -1029
- package/es/dialog/Dialog.d.ts +0 -8
- package/es/dialog/DialogCard.d.ts +0 -8
- package/es/dialog/defaultProps.d.ts +0 -6
- package/es/dialog/hooks/useDialogDrag.d.ts +0 -7
- package/es/dialog/hooks/useDialogEsc.d.ts +0 -3
- package/es/dialog/hooks/useDialogPosition.d.ts +0 -2
- package/es/dialog/hooks/useLockStyle.d.ts +0 -2
- package/es/dialog/index.d.ts +0 -8
- package/es/dialog/plugin.d.ts +0 -6
- package/es/dialog/style/css.d.ts +0 -1
- package/es/dialog/style/index.d.ts +0 -1
- package/es/dialog/type.d.ts +0 -227
- package/es/dialog/utils.d.ts +0 -1
- package/es/drawer/Drawer.d.ts +0 -11
- package/es/drawer/defaultProps.d.ts +0 -2
- package/es/drawer/hooks/useDrag.d.ts +0 -8
- package/es/drawer/hooks/useLockStyle.d.ts +0 -1
- package/es/drawer/index.d.ts +0 -4
- package/es/drawer/style/css.d.ts +0 -1
- package/es/drawer/style/index.d.ts +0 -1
- package/es/drawer/type.d.ts +0 -199
- package/es/drawer/utils/index.d.ts +0 -23
- package/es/fireworks/Fireworks.d.ts +0 -7
- package/es/fireworks/index.d.ts +0 -5
- package/es/fireworks/style/css.d.ts +0 -1
- package/es/fireworks/style/index.d.ts +0 -1
- package/es/fireworks/type.d.ts +0 -69
- package/es/form/Form.d.ts +0 -8
- package/es/form/FormContext.d.ts +0 -59
- package/es/form/FormItem.d.ts +0 -23
- package/es/form/FormList.d.ts +0 -4
- package/es/form/const.d.ts +0 -6
- package/es/form/defaultProps.d.ts +0 -3
- package/es/form/easing.d.ts +0 -2
- package/es/form/formModel.d.ts +0 -37
- package/es/form/hooks/interface.d.ts +0 -16
- package/es/form/hooks/useForm.d.ts +0 -3
- package/es/form/hooks/useFormItemInitialData.d.ts +0 -9
- package/es/form/hooks/useFormItemStyle.d.ts +0 -10
- package/es/form/hooks/useInstance.d.ts +0 -16
- package/es/form/hooks/useWatch.d.ts +0 -3
- package/es/form/index.d.ts +0 -7
- package/es/form/scroll.d.ts +0 -39
- package/es/form/style/css.d.ts +0 -1
- package/es/form/style/index.d.ts +0 -1
- package/es/form/type.d.ts +0 -486
- package/es/form/utils/index.d.ts +0 -5
- package/es/global-config/default-config.d.ts +0 -84
- package/es/global-config/locale/ar_KW.d.ts +0 -239
- package/es/global-config/locale/en_US.d.ts +0 -263
- package/es/global-config/locale/it_IT.d.ts +0 -263
- package/es/global-config/locale/ja_JP.d.ts +0 -263
- package/es/global-config/locale/ko_KR.d.ts +0 -263
- package/es/global-config/locale/ru_RU.d.ts +0 -263
- package/es/global-config/locale/zh_CN.d.ts +0 -263
- package/es/global-config/locale/zh_TW.d.ts +0 -263
- package/es/global-config/mobile/default-config.d.ts +0 -7
- package/es/global-config/mobile/locale/ar_KW.d.ts +0 -98
- package/es/global-config/mobile/locale/en_US.d.ts +0 -99
- package/es/global-config/mobile/locale/it_IT.d.ts +0 -99
- package/es/global-config/mobile/locale/ja_JP.d.ts +0 -99
- package/es/global-config/mobile/locale/ko_KR.d.ts +0 -99
- package/es/global-config/mobile/locale/ru_RU.d.ts +0 -99
- package/es/global-config/mobile/locale/zh_CN.d.ts +0 -99
- package/es/global-config/mobile/locale/zh_TW.d.ts +0 -99
- package/es/global-config/t.d.ts +0 -25
- package/es/hooks/useAttach.d.ts +0 -10
- package/es/hooks/useCommonClassName.d.ts +0 -54
- package/es/hooks/useConfig.d.ts +0 -2
- package/es/hooks/useControlled.d.ts +0 -9
- package/es/hooks/useDeepEffect.d.ts +0 -7
- package/es/hooks/useDefaultProps.d.ts +0 -1
- package/es/hooks/useDomCallback.d.ts +0 -1
- package/es/hooks/useDomRefCallback.d.ts +0 -1
- package/es/hooks/useDragSorter.d.ts +0 -28
- package/es/hooks/useEventCallback.d.ts +0 -9
- package/es/hooks/useGlobalConfig.d.ts +0 -1
- package/es/hooks/useGlobalIcon.d.ts +0 -5
- package/es/hooks/useLastest.d.ts +0 -2
- package/es/hooks/useLayoutEffect.d.ts +0 -3
- package/es/hooks/useMouseEvent.d.ts +0 -25
- package/es/hooks/useMutationObserver.d.ts +0 -4
- package/es/hooks/usePopper.d.ts +0 -19
- package/es/hooks/useResizeObserve.d.ts +0 -1
- package/es/hooks/useRipple.d.ts +0 -0
- package/es/hooks/useSetState.d.ts +0 -7
- package/es/hooks/useVirtualScroll.d.ts +0 -30
- package/es/hooks/useWindowSize.d.ts +0 -6
- package/es/index.d.ts +0 -25
- package/es/input/Input.d.ts +0 -16
- package/es/input/InputGroup.d.ts +0 -10
- package/es/input/defaultProps.d.ts +0 -17
- package/es/input/index.d.ts +0 -6
- package/es/input/style/css.d.ts +0 -1
- package/es/input/style/index.d.ts +0 -1
- package/es/input/type.d.ts +0 -237
- package/es/input-number/InputNumber.d.ts +0 -17
- package/es/input-number/defaultProps.d.ts +0 -2
- package/es/input-number/index.d.ts +0 -5
- package/es/input-number/style/css.d.ts +0 -1
- package/es/input-number/style/index.d.ts +0 -1
- package/es/input-number/type.d.ts +0 -156
- package/es/input-number/useInputNumber.d.ts +0 -51
- package/es/ip-input/IPInput.d.ts +0 -5
- package/es/ip-input/defaultProps.d.ts +0 -2
- package/es/ip-input/index.d.ts +0 -3
- package/es/ip-input/style/index.d.ts +0 -1
- package/es/ip-input/type.d.ts +0 -113
- package/es/ip-input/utils.d.ts +0 -35
- package/es/layout/Aside.d.ts +0 -11
- package/es/layout/Layout.d.ts +0 -26
- package/es/layout/defaultProps.d.ts +0 -5
- package/es/layout/index.d.ts +0 -10
- package/es/layout/style/index.d.ts +0 -1
- package/es/layout/type.d.ts +0 -38
- package/es/list/List.d.ts +0 -17
- package/es/list/ListItem.d.ts +0 -15
- package/es/list/ListItemMeta.d.ts +0 -10
- package/es/list/defaultProps.d.ts +0 -7
- package/es/list/hooks/useListVirtualScroll.d.ts +0 -24
- package/es/list/index.d.ts +0 -10
- package/es/list/style/css.d.ts +0 -1
- package/es/list/style/index.d.ts +0 -1
- package/es/list/type.d.ts +0 -92
- package/es/loading/Gradient.d.ts +0 -6
- package/es/loading/Loading.d.ts +0 -7
- package/es/loading/circleAdapter.d.ts +0 -1
- package/es/loading/defaultProps.d.ts +0 -2
- package/es/loading/index.d.ts +0 -5
- package/es/loading/style/css.d.ts +0 -1
- package/es/loading/style/index.d.ts +0 -1
- package/es/loading/type.d.ts +0 -68
- package/es/loading/utils/setStyle.d.ts +0 -7
- package/es/locale/LocalReceiver.d.ts +0 -6
- package/es/locale/ar_KW.d.ts +0 -3
- package/es/locale/en_US.d.ts +0 -3
- package/es/locale/it_IT.d.ts +0 -3
- package/es/locale/ja_JP.d.ts +0 -3
- package/es/locale/ko_KR.d.ts +0 -3
- package/es/locale/ru_RU.d.ts +0 -3
- package/es/locale/zh_CN.d.ts +0 -3
- package/es/locale/zh_TW.d.ts +0 -3
- package/es/myform/index.d.ts +0 -0
- package/es/notification/Notify.d.ts +0 -11
- package/es/notification/NotifyContainer.d.ts +0 -13
- package/es/notification/NotifyContext.d.ts +0 -23
- package/es/notification/NotifyItem.d.ts +0 -4
- package/es/notification/index.d.ts +0 -3
- package/es/notification/style/css.d.ts +0 -1
- package/es/notification/style/index.d.ts +0 -1
- package/es/notification/type.d.ts +0 -22
- package/es/popup/Popup.d.ts +0 -21
- package/es/popup/defaultProps.d.ts +0 -5
- package/es/popup/hooks/useTrigger.d.ts +0 -20
- package/es/popup/index.d.ts +0 -5
- package/es/popup/style/css.d.ts +0 -1
- package/es/popup/style/index.d.ts +0 -1
- package/es/popup/type.d.ts +0 -109
- package/es/portal/Portal.d.ts +0 -16
- package/es/portal/index.d.ts +0 -1
- package/es/radio/Radio.d.ts +0 -8
- package/es/radio/RadioGroup.d.ts +0 -14
- package/es/radio/defaultProps.d.ts +0 -3
- package/es/radio/index.d.ts +0 -10
- package/es/radio/style/css.d.ts +0 -0
- package/es/radio/style/index.d.ts +0 -1
- package/es/radio/type.d.ts +0 -117
- package/es/radio/useKeyboard.d.ts +0 -4
- package/es/select/Option.d.ts +0 -24
- package/es/select/OptionGroup.d.ts +0 -7
- package/es/select/PopupContent.d.ts +0 -24
- package/es/select/Select.d.ts +0 -13
- package/es/select/defaultProps.d.ts +0 -4
- package/es/select/hooks/useOptions.d.ts +0 -16
- package/es/select/hooks/usePanelVirtualScroll.d.ts +0 -24
- package/es/select/index.d.ts +0 -8
- package/es/select/style/css.d.ts +0 -1
- package/es/select/style/index.d.ts +0 -1
- package/es/select/type.d.ts +0 -344
- package/es/select/utils/helper.d.ts +0 -18
- package/es/select-input/SelectInput.d.ts +0 -11
- package/es/select-input/defaultProps.d.ts +0 -2
- package/es/select-input/hook/useMultiple.d.ts +0 -23
- package/es/select-input/hook/useOverlayInnerStyle.d.ts +0 -11
- package/es/select-input/hook/useSingle.d.ts +0 -16
- package/es/select-input/index.d.ts +0 -5
- package/es/select-input/interface.d.ts +0 -17
- package/es/select-input/style/css.d.ts +0 -1
- package/es/select-input/style/index.d.ts +0 -1
- package/es/select-input/type.d.ts +0 -243
- package/es/slider/Slider.d.ts +0 -7
- package/es/slider/SliderHandleButton.d.ts +0 -11
- package/es/slider/defaultProps.d.ts +0 -5
- package/es/slider/index.d.ts +0 -5
- package/es/slider/style/css.d.ts +0 -1
- package/es/slider/style/index.d.ts +0 -1
- package/es/slider/type.d.ts +0 -78
- package/es/space/defaultProps.d.ts +0 -0
- package/es/space/index.d.ts +0 -0
- package/es/space/type.d.ts +0 -0
- package/es/style/index.d.ts +0 -1
- package/es/switch/Switch.d.ts +0 -9
- package/es/switch/defaultProps.d.ts +0 -2
- package/es/switch/index.d.ts +0 -4
- package/es/switch/style/css.d.ts +0 -1
- package/es/switch/style/index.d.ts +0 -1
- package/es/switch/type.d.ts +0 -48
- package/es/tab/TabBar.d.ts +0 -9
- package/es/tab/TabNav.d.ts +0 -10
- package/es/tab/TabNavItem.d.ts +0 -15
- package/es/tab/TabPanel.d.ts +0 -9
- package/es/tab/Tabs.d.ts +0 -10
- package/es/tab/defaultProps.d.ts +0 -3
- package/es/tab/index.d.ts +0 -8
- package/es/tab/style/index.d.ts +0 -1
- package/es/tab/type.d.ts +0 -130
- package/es/tab/useTabClass.d.ts +0 -8
- package/es/table/Cell.d.ts +0 -18
- package/es/table/TBody.d.ts +0 -28
- package/es/table/THead.d.ts +0 -10
- package/es/table/TR.d.ts +0 -28
- package/es/table/Table.d.ts +0 -6
- package/es/table/defaultProps.d.ts +0 -2
- package/es/table/hooks/index.d.ts +0 -4
- package/es/table/hooks/useTableClassName.d.ts +0 -26
- package/es/table/hooks/useTableStyle.d.ts +0 -11
- package/es/table/index.d.ts +0 -5
- package/es/table/style/css.d.ts +0 -1
- package/es/table/style/index.d.ts +0 -1
- package/es/table/type.d.ts +0 -195
- package/es/tag/Tag.d.ts +0 -14
- package/es/tag/defaultProps.d.ts +0 -7
- package/es/tag/index.d.ts +0 -4
- package/es/tag/style/css.d.ts +0 -1
- package/es/tag/style/index.d.ts +0 -1
- package/es/tag/type.d.ts +0 -169
- package/es/tag-input/TagInput.d.ts +0 -9
- package/es/tag-input/defaultProps.d.ts +0 -2
- package/es/tag-input/hooks/useHover.d.ts +0 -17
- package/es/tag-input/hooks/useTagList.d.ts +0 -30
- package/es/tag-input/hooks/useTagScroll.d.ts +0 -25
- package/es/tag-input/index.d.ts +0 -5
- package/es/tag-input/style/css.d.ts +0 -1
- package/es/tag-input/style/index.d.ts +0 -1
- package/es/tag-input/type.d.ts +0 -235
- package/es/tag-input/useTagList.d.ts +0 -30
- package/es/utils/composeRefs.d.ts +0 -2
- package/es/utils/dom.d.ts +0 -7
- package/es/utils/forwardRefWithStatics.d.ts +0 -2
- package/es/utils/getScrollbarWidth.d.ts +0 -6
- package/es/utils/helper.d.ts +0 -46
- package/es/utils/input-number/large-number.d.ts +0 -85
- package/es/utils/input-number/number.d.ts +0 -81
- package/es/utils/isFragment.d.ts +0 -4
- package/es/utils/listener.d.ts +0 -4
- package/es/utils/log/index.d.ts +0 -2
- package/es/utils/log/log.d.ts +0 -3
- package/es/utils/log/types.d.ts +0 -8
- package/es/utils/noop.d.ts +0 -2
- package/es/utils/number.d.ts +0 -7
- package/es/utils/parentTNode.d.ts +0 -10
- package/es/utils/parseTNode.d.ts +0 -10
- package/es/utils/react-render.d.ts +0 -16
- package/es/utils/ref.d.ts +0 -1
- package/es/utils/refs.d.ts +0 -13
- package/es/utils/scroll.d.ts +0 -3
- package/es/utils/style.d.ts +0 -4
- package/es/utils/transition.d.ts +0 -20
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { InputProps } from "../input";
|
|
2
|
-
import { TNode } from "../common";
|
|
3
|
-
import { MouseEvent, KeyboardEvent, FocusEvent, FormEvent, CompositionEvent } from "react";
|
|
4
|
-
export interface TdInputNumberProps<T = InputNumberValue> {
|
|
5
|
-
/**
|
|
6
|
-
* 文本内容位置,居左/居中/居右
|
|
7
|
-
*/
|
|
8
|
-
align?: "left" | "center" | "right";
|
|
9
|
-
/**
|
|
10
|
-
* 是否允许输入超过 `max` `min` 范围外的数字。为保障用户体验,仅在失去焦点时进行数字范围矫正。默认允许超出,数字超出范围时,输入框变红提醒
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
allowInputOverLimit?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* 宽度随内容自适应
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
autoWidth?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* [小数位数](https://en.wiktionary.org/wiki/decimal_place)
|
|
21
|
-
*/
|
|
22
|
-
decimalPlaces?: InputNumberDecimalPlaces;
|
|
23
|
-
/**
|
|
24
|
-
* 禁用组件
|
|
25
|
-
*/
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* 格式化输入框展示值。第二个事件参数 `context.fixedNumber` 表示处理过小数位数 `decimalPlaces` 的数字
|
|
29
|
-
*/
|
|
30
|
-
format?: (value: InputNumberValue, context?: {
|
|
31
|
-
fixedNumber?: InputNumberValue;
|
|
32
|
-
}) => InputNumberValue;
|
|
33
|
-
/**
|
|
34
|
-
* 透传 Input 输入框组件全部属性
|
|
35
|
-
*/
|
|
36
|
-
inputProps?: InputProps;
|
|
37
|
-
/**
|
|
38
|
-
* 左侧文本
|
|
39
|
-
*/
|
|
40
|
-
label?: TNode;
|
|
41
|
-
/**
|
|
42
|
-
* 是否作为大数使用。JS 支持的最大数字位数是 16 位,超过 16 位的数字需作为字符串大数处理。此时,数据类型必须保持为字符串,否则会丢失数据
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
largeNumber?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 最大值。如果是大数,请传入字符串
|
|
48
|
-
* @default Infinity
|
|
49
|
-
*/
|
|
50
|
-
max?: InputNumberValue;
|
|
51
|
-
/**
|
|
52
|
-
* 最小值。如果是大数,请传入字符串
|
|
53
|
-
* @default -Infinity
|
|
54
|
-
*/
|
|
55
|
-
min?: InputNumberValue;
|
|
56
|
-
/**
|
|
57
|
-
* 占位符
|
|
58
|
-
*/
|
|
59
|
-
placeholder?: string;
|
|
60
|
-
/**
|
|
61
|
-
* 只读状态
|
|
62
|
-
*/
|
|
63
|
-
readonly?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* 组件尺寸
|
|
66
|
-
* @default medium
|
|
67
|
-
*/
|
|
68
|
-
size?: "small" | "medium" | "large";
|
|
69
|
-
/**
|
|
70
|
-
* 文本框状态
|
|
71
|
-
* @default default
|
|
72
|
-
*/
|
|
73
|
-
status?: "default" | "success" | "warning" | "error";
|
|
74
|
-
/**
|
|
75
|
-
* 数值改变步数,可以是小数。如果是大数,请保证数据类型为字符串
|
|
76
|
-
* @default 1
|
|
77
|
-
*/
|
|
78
|
-
step?: InputNumberValue;
|
|
79
|
-
/**
|
|
80
|
-
* 后置内容
|
|
81
|
-
*/
|
|
82
|
-
suffix?: TNode;
|
|
83
|
-
/**
|
|
84
|
-
* 按钮布局
|
|
85
|
-
* @default row
|
|
86
|
-
*/
|
|
87
|
-
theme?: "column" | "row" | "normal";
|
|
88
|
-
/**
|
|
89
|
-
* 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式
|
|
90
|
-
*/
|
|
91
|
-
tips?: TNode;
|
|
92
|
-
/**
|
|
93
|
-
* 数字输入框的值。当值为 '' 时,输入框显示为空
|
|
94
|
-
*/
|
|
95
|
-
value?: T;
|
|
96
|
-
/**
|
|
97
|
-
* 数字输入框的值。当值为 '' 时,输入框显示为空,非受控属性
|
|
98
|
-
*/
|
|
99
|
-
defaultValue?: T;
|
|
100
|
-
/**
|
|
101
|
-
* 失去焦点时触发
|
|
102
|
-
*/
|
|
103
|
-
onBlur?: (value: InputNumberValue, context: {
|
|
104
|
-
e: FocusEvent<HTMLDivElement>;
|
|
105
|
-
}) => void;
|
|
106
|
-
/**
|
|
107
|
-
* 值变化时触发,`type` 表示触发本次变化的来源
|
|
108
|
-
*/
|
|
109
|
-
onChange?: (value: T, context: ChangeContext) => void;
|
|
110
|
-
/**
|
|
111
|
-
* 回车键按下时触发
|
|
112
|
-
*/
|
|
113
|
-
onEnter?: (value: InputNumberValue, context: {
|
|
114
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
115
|
-
}) => void;
|
|
116
|
-
/**
|
|
117
|
-
* 获取焦点时触发
|
|
118
|
-
*/
|
|
119
|
-
onFocus?: (value: InputNumberValue, context: {
|
|
120
|
-
e: FocusEvent<HTMLDivElement>;
|
|
121
|
-
}) => void;
|
|
122
|
-
/**
|
|
123
|
-
* 键盘按下时触发
|
|
124
|
-
*/
|
|
125
|
-
onKeydown?: (value: InputNumberValue, context: {
|
|
126
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
127
|
-
}) => void;
|
|
128
|
-
/**
|
|
129
|
-
* 按下字符键时触发(keydown -> keypress -> keyup)
|
|
130
|
-
*/
|
|
131
|
-
onKeypress?: (value: InputNumberValue, context: {
|
|
132
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
133
|
-
}) => void;
|
|
134
|
-
/**
|
|
135
|
-
* 释放键盘时触发
|
|
136
|
-
*/
|
|
137
|
-
onKeyup?: (value: InputNumberValue, context: {
|
|
138
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
139
|
-
}) => void;
|
|
140
|
-
/**
|
|
141
|
-
* 最大值或最小值校验结束后触发,`exceed-maximum` 表示超出最大值,`below-minimum` 表示小于最小值
|
|
142
|
-
*/
|
|
143
|
-
onValidate?: (context: {
|
|
144
|
-
error?: "exceed-maximum" | "below-minimum";
|
|
145
|
-
}) => void;
|
|
146
|
-
}
|
|
147
|
-
export type InputNumberDecimalPlaces = number | {
|
|
148
|
-
enableRound: boolean;
|
|
149
|
-
places: number;
|
|
150
|
-
};
|
|
151
|
-
export type InputNumberValue = number | string;
|
|
152
|
-
export interface ChangeContext {
|
|
153
|
-
type: ChangeSource;
|
|
154
|
-
e: FormEvent<HTMLInputElement> | MouseEvent<HTMLDivElement | SVGElement> | FocusEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement> | CompositionEvent<HTMLDivElement>;
|
|
155
|
-
}
|
|
156
|
-
export type ChangeSource = "add" | "reduce" | "input" | "blur" | "enter" | "clear" | "props";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { InputNumberValue, TdInputNumberProps } from "./type";
|
|
3
|
-
export declare const specialCode: string[];
|
|
4
|
-
/**
|
|
5
|
-
* 独立一个组件 Hook 方便用户直接使用相关逻辑 自定义任何样式的数字输入框
|
|
6
|
-
*/
|
|
7
|
-
export default function useInputNumber<T extends InputNumberValue = InputNumberValue>(props: TdInputNumberProps<T>): {
|
|
8
|
-
classPrefix: string;
|
|
9
|
-
wrapClasses: string;
|
|
10
|
-
reduceClasses: string;
|
|
11
|
-
addClasses: string;
|
|
12
|
-
inputRef: React.MutableRefObject<any>;
|
|
13
|
-
listeners: {
|
|
14
|
-
onBlur: (value: string, ctx: {
|
|
15
|
-
e: React.FocusEvent<HTMLDivElement, Element>;
|
|
16
|
-
}) => void;
|
|
17
|
-
onFocus: (_: string, ctx: {
|
|
18
|
-
e: React.FocusEvent<HTMLDivElement, Element>;
|
|
19
|
-
}) => void;
|
|
20
|
-
onKeydown: (value: string, ctx: {
|
|
21
|
-
e: React.KeyboardEvent<HTMLDivElement>;
|
|
22
|
-
}) => void;
|
|
23
|
-
onKeyup: (value: string, ctx: {
|
|
24
|
-
e: React.KeyboardEvent<HTMLDivElement>;
|
|
25
|
-
}) => void;
|
|
26
|
-
onKeypress: (value: string, ctx: {
|
|
27
|
-
e: React.KeyboardEvent<HTMLDivElement>;
|
|
28
|
-
}) => void;
|
|
29
|
-
onEnter: (value: string, ctx: {
|
|
30
|
-
e: React.KeyboardEvent<HTMLDivElement>;
|
|
31
|
-
}) => void;
|
|
32
|
-
onClick: () => void;
|
|
33
|
-
onClear: (context: {
|
|
34
|
-
e: React.MouseEvent<SVGElement>;
|
|
35
|
-
}) => void;
|
|
36
|
-
};
|
|
37
|
-
isError: "exceed-maximum" | "below-minimum";
|
|
38
|
-
setIsError: React.Dispatch<React.SetStateAction<"exceed-maximum" | "below-minimum">>;
|
|
39
|
-
userInput: string;
|
|
40
|
-
setUserInput: React.Dispatch<React.SetStateAction<string>>;
|
|
41
|
-
tValue: T;
|
|
42
|
-
focus: () => void;
|
|
43
|
-
blur: () => void;
|
|
44
|
-
onChange: import("../hooks/useControlled").ChangeHander<T, [context: import("./type").ChangeContext]>;
|
|
45
|
-
handleReduce: (e: any) => void;
|
|
46
|
-
handleAdd: (e: any) => void;
|
|
47
|
-
onInnerInputChange: (value: import("../input").InputValue, context?: {
|
|
48
|
-
e?: React.FormEvent<HTMLInputElement> | React.MouseEvent<Element> | React.CompositionEvent<HTMLDivElement>;
|
|
49
|
-
trigger: "input" | "initial" | "clear";
|
|
50
|
-
}) => void;
|
|
51
|
-
};
|
package/es/ip-input/IPInput.d.ts
DELETED
package/es/ip-input/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/ip-input/type.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { StyledProps } from "../common";
|
|
2
|
-
export interface TdIPInputProps {
|
|
3
|
-
/**
|
|
4
|
-
* 受控值,格式为 "192.168.0.1" 或 "2001:db8::1" 或 "192.168.0.1/24"
|
|
5
|
-
*/
|
|
6
|
-
value?: string;
|
|
7
|
-
/**
|
|
8
|
-
* 非受控初始值
|
|
9
|
-
*/
|
|
10
|
-
defaultValue?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 值变化时触发
|
|
13
|
-
*/
|
|
14
|
-
onChange?: (value: string) => void;
|
|
15
|
-
/**
|
|
16
|
-
* 失去焦点时触发
|
|
17
|
-
*/
|
|
18
|
-
onBlur?: (value: string) => void;
|
|
19
|
-
/**
|
|
20
|
-
* 获得焦点时触发
|
|
21
|
-
*/
|
|
22
|
-
onFocus?: () => void;
|
|
23
|
-
/**
|
|
24
|
-
* 是否允许 IPv6
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
allowIPv6?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 是否允许 CIDR 格式(带掩码)
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
allowCIDR?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 占位符
|
|
35
|
-
*/
|
|
36
|
-
placeholder?: string;
|
|
37
|
-
/**
|
|
38
|
-
* 是否禁用
|
|
39
|
-
*/
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* 是否只读
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
readOnly?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 是否显示清空按钮
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
showClear?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* 是否自动聚焦第一个输入框
|
|
53
|
-
* @default false
|
|
54
|
-
*/
|
|
55
|
-
autoFocus?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* 是否显示分隔符(仅视觉,不可编辑)
|
|
58
|
-
* @default true
|
|
59
|
-
*/
|
|
60
|
-
showSegmentSeparators?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* 自定义格式化函数
|
|
63
|
-
*/
|
|
64
|
-
formatter?: (value: string) => string;
|
|
65
|
-
/**
|
|
66
|
-
* 输入框 ID
|
|
67
|
-
*/
|
|
68
|
-
id?: string;
|
|
69
|
-
/**
|
|
70
|
-
* 输入框 name 属性
|
|
71
|
-
*/
|
|
72
|
-
name?: string;
|
|
73
|
-
/**
|
|
74
|
-
* aria-label
|
|
75
|
-
*/
|
|
76
|
-
ariaLabel?: string;
|
|
77
|
-
/**
|
|
78
|
-
* 段输入框的 className
|
|
79
|
-
*/
|
|
80
|
-
segmentClassName?: string;
|
|
81
|
-
/**
|
|
82
|
-
* 段输入框的 style
|
|
83
|
-
*/
|
|
84
|
-
inputStyle?: React.CSSProperties;
|
|
85
|
-
/**
|
|
86
|
-
* 分隔符(默认根据 IPv4/IPv6 自动选择)
|
|
87
|
-
*/
|
|
88
|
-
separator?: string;
|
|
89
|
-
/**
|
|
90
|
-
* 提示文本
|
|
91
|
-
*/
|
|
92
|
-
tips?: string;
|
|
93
|
-
}
|
|
94
|
-
export interface IPInputProps extends TdIPInputProps, StyledProps {
|
|
95
|
-
}
|
|
96
|
-
export interface IPInputRef {
|
|
97
|
-
/**
|
|
98
|
-
* 聚焦第一个输入框
|
|
99
|
-
*/
|
|
100
|
-
focus: () => void;
|
|
101
|
-
/**
|
|
102
|
-
* 失焦
|
|
103
|
-
*/
|
|
104
|
-
blur: () => void;
|
|
105
|
-
/**
|
|
106
|
-
* 清空所有输入
|
|
107
|
-
*/
|
|
108
|
-
clear: () => void;
|
|
109
|
-
/**
|
|
110
|
-
* 获取当前值
|
|
111
|
-
*/
|
|
112
|
-
getValue: () => string;
|
|
113
|
-
}
|
package/es/ip-input/utils.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IP 地址验证和解析工具函数
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* 验证 IPv4 地址段(0-255)
|
|
6
|
-
*/
|
|
7
|
-
export declare function isValidIPv4Segment(segment: string, allowLeadingZeros?: boolean): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* 验证 IPv4 地址
|
|
10
|
-
*/
|
|
11
|
-
export declare function isValidIPv4(ip: string, allowLeadingZeros?: boolean): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* 验证 CIDR 掩码(IPv4: 0-32, IPv6: 0-128)
|
|
14
|
-
*/
|
|
15
|
-
export declare function isValidCIDRMask(mask: string, isIPv6?: boolean): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* 验证 IPv6 地址(简化版,使用正则)
|
|
18
|
-
* 支持压缩表示法 :: 和混合 IPv4/IPv6
|
|
19
|
-
*/
|
|
20
|
-
export declare function isValidIPv6(ip: string): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* 从文本中提取 IP 地址
|
|
23
|
-
*/
|
|
24
|
-
export declare function extractIPFromText(text: string): {
|
|
25
|
-
ip: string;
|
|
26
|
-
cidr?: string;
|
|
27
|
-
} | null;
|
|
28
|
-
/**
|
|
29
|
-
* 解析 IP 地址为段数组(IPv4)
|
|
30
|
-
*/
|
|
31
|
-
export declare function parseIPv4ToSegments(ip: string): string[];
|
|
32
|
-
/**
|
|
33
|
-
* 将段数组组合为 IP 地址(IPv4)
|
|
34
|
-
*/
|
|
35
|
-
export declare function segmentsToIPv4(segments: string[]): string;
|
package/es/layout/Aside.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TdAsideProps } from "./type";
|
|
3
|
-
import { StyledProps } from "../common";
|
|
4
|
-
export interface AsideProps extends TdAsideProps, StyledProps {
|
|
5
|
-
/**
|
|
6
|
-
* 文本内容
|
|
7
|
-
*/
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare const Aside: React.FC<AsideProps>;
|
|
11
|
-
export default Aside;
|
package/es/layout/Layout.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyledProps } from "../common";
|
|
3
|
-
import { TdLayoutProps, TdHeaderProps, TdFooterProps } from "./type";
|
|
4
|
-
import Aside from "./Aside";
|
|
5
|
-
export interface LayoutProps extends TdLayoutProps, StyledProps, React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export interface HeaderProps extends TdHeaderProps, StyledProps, React.HTMLAttributes<HTMLElement> {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export interface ContentProps extends StyledProps, React.HTMLAttributes<HTMLElement> {
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export interface FooterProps extends TdFooterProps, StyledProps, React.HTMLAttributes<HTMLElement> {
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
declare const Header: React.FC<HeaderProps>;
|
|
18
|
-
declare const Footer: React.FC<FooterProps>;
|
|
19
|
-
declare const Content: React.FC<ContentProps>;
|
|
20
|
-
declare const Layout: React.FC<LayoutProps> & {
|
|
21
|
-
Header: typeof Header;
|
|
22
|
-
Content: typeof Content;
|
|
23
|
-
Footer: typeof Footer;
|
|
24
|
-
Aside: typeof Aside;
|
|
25
|
-
};
|
|
26
|
-
export default Layout;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TdAsideProps, TdFooterProps, TdHeaderProps, TdLayoutProps } from "./type";
|
|
2
|
-
export declare const asideDefaultProps: TdAsideProps;
|
|
3
|
-
export declare const footerDefaultProps: TdFooterProps;
|
|
4
|
-
export declare const headerDefaultProps: TdHeaderProps;
|
|
5
|
-
export declare const layoutDefaultProps: TdLayoutProps;
|
package/es/layout/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./style/index.js";
|
|
2
|
-
export type { LayoutProps } from "./Layout";
|
|
3
|
-
export * from "./type";
|
|
4
|
-
export declare const Layout: import("react").FC<import("./Layout").LayoutProps> & {
|
|
5
|
-
Header: import("react").FC<import("./Layout").HeaderProps>;
|
|
6
|
-
Content: import("react").FC<import("./Layout").ContentProps>;
|
|
7
|
-
Footer: import("react").FC<import("./Layout").FooterProps>;
|
|
8
|
-
Aside: import("react").FC<import("./Aside").AsideProps>;
|
|
9
|
-
};
|
|
10
|
-
export default Layout;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/layout/type.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { TNode } from "../common";
|
|
2
|
-
export interface TdLayoutProps {
|
|
3
|
-
/**
|
|
4
|
-
* 【开发中】布局方向
|
|
5
|
-
*/
|
|
6
|
-
direction?: "vertical" | "horizontal";
|
|
7
|
-
}
|
|
8
|
-
export interface TdHeaderProps {
|
|
9
|
-
/**
|
|
10
|
-
* 顶栏高度。样式表(class)中定义的默认高度为:64px
|
|
11
|
-
* @default ''
|
|
12
|
-
*/
|
|
13
|
-
height?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface TdAsideProps {
|
|
16
|
-
/**
|
|
17
|
-
* 侧边栏宽度。样式表(class)中定义的默认宽度为:232px
|
|
18
|
-
* @default ''
|
|
19
|
-
*/
|
|
20
|
-
width?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface TdContentProps {
|
|
23
|
-
/**
|
|
24
|
-
* 内容,同 content
|
|
25
|
-
*/
|
|
26
|
-
children?: TNode;
|
|
27
|
-
/**
|
|
28
|
-
* 内容
|
|
29
|
-
*/
|
|
30
|
-
content?: TNode;
|
|
31
|
-
}
|
|
32
|
-
export interface TdFooterProps {
|
|
33
|
-
/**
|
|
34
|
-
* 底栏高度。样式表(class)中定义的默认高度为:24px
|
|
35
|
-
* @default ''
|
|
36
|
-
*/
|
|
37
|
-
height?: string;
|
|
38
|
-
}
|
package/es/list/List.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { StyledProps } from "../common";
|
|
3
|
-
import type { ListInstanceFunctions, TdListProps } from "./type";
|
|
4
|
-
export interface ListProps extends TdListProps, StyledProps {
|
|
5
|
-
/**
|
|
6
|
-
* 文本内容
|
|
7
|
-
*/
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* 列表组件
|
|
12
|
-
*/
|
|
13
|
-
declare const List: React.FunctionComponent<ListProps & React.RefAttributes<ListInstanceFunctions>> & {
|
|
14
|
-
ListItem: React.ForwardRefExoticComponent<import("./ListItem").ListItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
15
|
-
ListItemMeta: React.ForwardRefExoticComponent<import("./ListItemMeta").ListItemMetaProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
};
|
|
17
|
-
export default List;
|
package/es/list/ListItem.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TdListItemProps } from "./type";
|
|
3
|
-
import { StyledProps } from "../common";
|
|
4
|
-
export interface ListItemProps extends TdListItemProps, StyledProps {
|
|
5
|
-
/**
|
|
6
|
-
* 文本内容
|
|
7
|
-
*/
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
content?: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* 列表组件
|
|
13
|
-
*/
|
|
14
|
-
declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
15
|
-
export default ListItem;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TdListItemMetaProps } from "./type";
|
|
3
|
-
import { StyledProps } from "../common";
|
|
4
|
-
export interface ListItemMetaProps extends TdListItemMetaProps, StyledProps {
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* 列表组件
|
|
8
|
-
*/
|
|
9
|
-
declare const ListItemMeta: React.ForwardRefExoticComponent<ListItemMetaProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export default ListItemMeta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
|
|
3
|
-
* */
|
|
4
|
-
import { TdListProps, TdListItemProps, TdListItemMetaProps } from "./type";
|
|
5
|
-
export declare const listDefaultProps: TdListProps;
|
|
6
|
-
export declare const listItemDefaultProps: TdListItemProps;
|
|
7
|
-
export declare const listItemMetaDefaultProps: TdListItemMetaProps;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TdListProps } from "../type";
|
|
3
|
-
import { type ScrollToElementParams } from "../../common";
|
|
4
|
-
export declare const useListVirtualScroll: (scroll: TdListProps["scroll"], listRef: React.MutableRefObject<HTMLElement>, listItems: any[]) => {
|
|
5
|
-
virtualConfig: {
|
|
6
|
-
visibleData: unknown[];
|
|
7
|
-
translateY: number;
|
|
8
|
-
scrollHeight: number;
|
|
9
|
-
isVirtualScroll: boolean;
|
|
10
|
-
handleScroll: () => void;
|
|
11
|
-
handleRowMounted: (rowData: {
|
|
12
|
-
ref: HTMLElement;
|
|
13
|
-
data: {
|
|
14
|
-
__VIRTUAL_SCROLL_INDEX: number;
|
|
15
|
-
};
|
|
16
|
-
}) => void;
|
|
17
|
-
scrollToElement: (p: ScrollToElementParams) => void;
|
|
18
|
-
};
|
|
19
|
-
cursorStyle: React.CSSProperties;
|
|
20
|
-
listStyle: React.CSSProperties;
|
|
21
|
-
isVirtualScroll: boolean;
|
|
22
|
-
onInnerVirtualScroll: (e: WheelEvent) => void;
|
|
23
|
-
scrollToElement: (params: ScrollToElementParams) => void;
|
|
24
|
-
};
|
package/es/list/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./style/index.js";
|
|
2
|
-
export type { ListProps } from "./List";
|
|
3
|
-
export type { ListItemProps } from "./ListItem";
|
|
4
|
-
export type { ListItemMetaProps } from "./ListItemMeta";
|
|
5
|
-
export * from "./type";
|
|
6
|
-
export declare const List: import("react").FunctionComponent<import("./List").ListProps & import("react").RefAttributes<import("./type").ListInstanceFunctions>> & {
|
|
7
|
-
ListItem: import("react").ForwardRefExoticComponent<import("./ListItem").ListItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
8
|
-
ListItemMeta: import("react").ForwardRefExoticComponent<import("./ListItemMeta").ListItemMetaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
-
};
|
|
10
|
-
export default List;
|
package/es/list/style/css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/list/style/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/list/type.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
|
|
3
|
-
* */
|
|
4
|
-
import { TNode, TScroll, ScrollToElementParams } from "../common";
|
|
5
|
-
import { MouseEvent, WheelEvent } from "react";
|
|
6
|
-
export interface TdListProps {
|
|
7
|
-
/**
|
|
8
|
-
* 自定义加载中。值为空不显示加载中,值为 'loading' 显示加载中状态,值为 'load-more' 显示加载更多状态。值类型为函数,则表示自定义加载状态呈现内容
|
|
9
|
-
*/
|
|
10
|
-
asyncLoading?: TNode;
|
|
11
|
-
/**
|
|
12
|
-
* 底部
|
|
13
|
-
*/
|
|
14
|
-
footer?: TNode;
|
|
15
|
-
/**
|
|
16
|
-
* 头部
|
|
17
|
-
*/
|
|
18
|
-
header?: TNode;
|
|
19
|
-
/**
|
|
20
|
-
* 排列方式(待设计稿输出)
|
|
21
|
-
* @default horizontal
|
|
22
|
-
*/
|
|
23
|
-
layout?: "horizontal" | "vertical";
|
|
24
|
-
/**
|
|
25
|
-
* 懒加载和虚拟滚动。为保证组件收益最大化,当数据量小于阈值 `scroll.threshold` 时,无论虚拟滚动的配置是否存在,组件内部都不会开启虚拟滚动,`scroll.threshold` 默认为 `100`
|
|
26
|
-
*/
|
|
27
|
-
scroll?: TScroll;
|
|
28
|
-
/**
|
|
29
|
-
* 尺寸
|
|
30
|
-
* @default medium
|
|
31
|
-
*/
|
|
32
|
-
size?: "small" | "medium" | "large";
|
|
33
|
-
/**
|
|
34
|
-
* 是否展示分割线
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
split?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 是否展示斑马纹
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
stripe?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 点击加载更多时触发
|
|
45
|
-
*/
|
|
46
|
-
onLoadMore?: (options: {
|
|
47
|
-
e: MouseEvent<HTMLDivElement>;
|
|
48
|
-
}) => void;
|
|
49
|
-
/**
|
|
50
|
-
* 列表滚动时触发,scrollTop 表示顶部滚动距离,scrollBottom 表示底部滚动距离
|
|
51
|
-
*/
|
|
52
|
-
onScroll?: (options: {
|
|
53
|
-
e: Event | WheelEvent<HTMLDivElement>;
|
|
54
|
-
scrollTop: number;
|
|
55
|
-
scrollBottom: number;
|
|
56
|
-
}) => void;
|
|
57
|
-
}
|
|
58
|
-
/** 组件实例方法 */
|
|
59
|
-
export interface ListInstanceFunctions {
|
|
60
|
-
/**
|
|
61
|
-
* 虚拟滚动场景下,支持指定滚动到具体的节点
|
|
62
|
-
*/
|
|
63
|
-
scrollTo?: (scrollToParams: ScrollToElementParams) => void;
|
|
64
|
-
}
|
|
65
|
-
export interface TdListItemProps {
|
|
66
|
-
/**
|
|
67
|
-
* 操作栏
|
|
68
|
-
*/
|
|
69
|
-
action?: TNode;
|
|
70
|
-
/**
|
|
71
|
-
* 内容,同 content
|
|
72
|
-
*/
|
|
73
|
-
children?: TNode;
|
|
74
|
-
/**
|
|
75
|
-
* 内容
|
|
76
|
-
*/
|
|
77
|
-
content?: TNode;
|
|
78
|
-
}
|
|
79
|
-
export interface TdListItemMetaProps {
|
|
80
|
-
/**
|
|
81
|
-
* 列表项内容
|
|
82
|
-
*/
|
|
83
|
-
description?: TNode;
|
|
84
|
-
/**
|
|
85
|
-
* 列表项图片
|
|
86
|
-
*/
|
|
87
|
-
image?: TNode;
|
|
88
|
-
/**
|
|
89
|
-
* 列表项标题
|
|
90
|
-
*/
|
|
91
|
-
title?: TNode;
|
|
92
|
-
}
|