@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
package/es/dialog/Dialog.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { StyledProps } from "../common";
|
|
3
|
-
import type { DialogInstance, TdDialogProps } from "./type";
|
|
4
|
-
export interface DialogProps extends TdDialogProps, StyledProps {
|
|
5
|
-
isPlugin?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<DialogInstance>>;
|
|
8
|
-
export default Dialog;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TdDialogCardProps } from "./type";
|
|
3
|
-
import { StyledProps } from "../common";
|
|
4
|
-
export interface DialogCardProps extends TdDialogCardProps, StyledProps, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const DialogCard: React.ForwardRefExoticComponent<Omit<DialogCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export default DialogCard;
|
package/es/dialog/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./style/index.js";
|
|
2
|
-
export type { DialogProps } from "./Dialog";
|
|
3
|
-
export * from "./type";
|
|
4
|
-
export declare const Dialog: import("react").ForwardRefExoticComponent<import("./Dialog").DialogProps & import("react").RefAttributes<import("./type").DialogInstance>>;
|
|
5
|
-
export declare const DialogCard: import("react").ForwardRefExoticComponent<Omit<import("./DialogCard").DialogCardProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export declare const dialog: import("./plugin").DialogPluginType;
|
|
7
|
-
export declare const DialogPlugin: import("./plugin").DialogPluginType;
|
|
8
|
-
export default Dialog;
|
package/es/dialog/plugin.d.ts
DELETED
package/es/dialog/style/css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/dialog/type.d.ts
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent, MouseEvent } from "react";
|
|
2
|
-
import { ButtonProps } from "../button";
|
|
3
|
-
import { AttachNode, Styles, TNode } from "../common";
|
|
4
|
-
export interface TdDialogProps {
|
|
5
|
-
/**
|
|
6
|
-
* 对话框挂载的节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
7
|
-
*/
|
|
8
|
-
attach?: AttachNode;
|
|
9
|
-
/**
|
|
10
|
-
* 对话框内容
|
|
11
|
-
*/
|
|
12
|
-
body?: TNode;
|
|
13
|
-
/**
|
|
14
|
-
* 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件
|
|
15
|
-
*/
|
|
16
|
-
cancelBtn?: ButtonProps | TNode | null;
|
|
17
|
-
/**
|
|
18
|
-
* 对话框内容,同 body
|
|
19
|
-
*/
|
|
20
|
-
children?: TNode;
|
|
21
|
-
/**
|
|
22
|
-
* 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。值类型为 TNode,则表示呈现自定义按钮示例
|
|
23
|
-
* @default true
|
|
24
|
-
*/
|
|
25
|
-
closeBtn?: TNode;
|
|
26
|
-
/**
|
|
27
|
-
* 按下 ESC 时是否触发对话框关闭事件
|
|
28
|
-
*/
|
|
29
|
-
closeOnEscKeydown?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* 点击蒙层时是否触发关闭事件
|
|
32
|
-
*/
|
|
33
|
-
closeOnOverlayClick?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件
|
|
36
|
-
*/
|
|
37
|
-
confirmBtn?: ButtonProps | TNode | null;
|
|
38
|
-
/**
|
|
39
|
-
* 确认按钮加载状态
|
|
40
|
-
*/
|
|
41
|
-
confirmLoading?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* 是否在按下回车键时,触发确认事件
|
|
44
|
-
*/
|
|
45
|
-
confirmOnEnter?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 是否在关闭弹框的时候销毁子元素
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
destroyOnClose?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* 弹框元素类名,示例:'t-class-dialog-first t-class-dialog-second'
|
|
53
|
-
* @default ''
|
|
54
|
-
*/
|
|
55
|
-
dialogClassName?: string;
|
|
56
|
-
/**
|
|
57
|
-
* 对话框是否可以拖拽(仅在非模态对话框时有效)
|
|
58
|
-
* @default false
|
|
59
|
-
*/
|
|
60
|
-
draggable?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 不显示任何内容,值类型为 Function 表示自定义底部内容
|
|
63
|
-
* @default true
|
|
64
|
-
*/
|
|
65
|
-
footer?: TNode;
|
|
66
|
-
/**
|
|
67
|
-
* 是否强制渲染 Dialog,请使用 lazy 代替
|
|
68
|
-
* @default false
|
|
69
|
-
* @deprecated
|
|
70
|
-
*/
|
|
71
|
-
forceRender?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 string 则直接显示值,值类型为 Function 表示自定义头部内容
|
|
74
|
-
* @default true
|
|
75
|
-
*/
|
|
76
|
-
header?: TNode;
|
|
77
|
-
/**
|
|
78
|
-
* 是否启用对话框懒加载,启用时对话框内的内容不渲染
|
|
79
|
-
* @default true
|
|
80
|
-
*/
|
|
81
|
-
lazy?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* 对话框类型,有 3 种:模态对话框、非模态对话框、全屏对话框。弹出「模态对话框」时,只能操作对话框里面的内容,不能操作其他内容。弹出「非模态对话框」时,则可以操作页面内所有内容。「普通对话框」是指没有脱离文档流的对话框,可以在这个基础上开发更多的插件
|
|
84
|
-
* @default modal
|
|
85
|
-
*/
|
|
86
|
-
mode?: "modal" | "modeless" | "full-screen";
|
|
87
|
-
/**
|
|
88
|
-
* 对话框位置,内置两种:垂直水平居中显示 和 靠近顶部(top:20%)显示。默认情况,为避免贴顶或贴底,顶部和底部距离最小为 `48px`,可通过调整 `top` 覆盖默认大小
|
|
89
|
-
* @default top
|
|
90
|
-
*/
|
|
91
|
-
placement?: "top" | "center";
|
|
92
|
-
/**
|
|
93
|
-
* 防止滚动穿透
|
|
94
|
-
* @default true
|
|
95
|
-
*/
|
|
96
|
-
preventScrollThrough?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
showInAttachedElement?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* 是否显示遮罩层
|
|
104
|
-
* @default true
|
|
105
|
-
*/
|
|
106
|
-
showOverlay?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* 对话框风格
|
|
109
|
-
* @default default
|
|
110
|
-
*/
|
|
111
|
-
theme?: "default" | "info" | "warning" | "danger" | "success";
|
|
112
|
-
/**
|
|
113
|
-
* 用于弹框具体窗口顶部的距离,优先级大于 placement
|
|
114
|
-
*/
|
|
115
|
-
top?: string | number;
|
|
116
|
-
/**
|
|
117
|
-
* 控制对话框是否显示
|
|
118
|
-
*/
|
|
119
|
-
visible?: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* 对话框宽度,示例:320, '500px', '80%'
|
|
122
|
-
*/
|
|
123
|
-
width?: string | number;
|
|
124
|
-
/**
|
|
125
|
-
* 对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500
|
|
126
|
-
*/
|
|
127
|
-
zIndex?: number;
|
|
128
|
-
/**
|
|
129
|
-
* 对话框执行消失动画效果前触发
|
|
130
|
-
*/
|
|
131
|
-
onBeforeClose?: () => void;
|
|
132
|
-
/**
|
|
133
|
-
* 对话框执行弹出动画效果前触发
|
|
134
|
-
*/
|
|
135
|
-
onBeforeOpen?: () => void;
|
|
136
|
-
/**
|
|
137
|
-
* 如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件
|
|
138
|
-
*/
|
|
139
|
-
onCancel?: (context: {
|
|
140
|
-
e: MouseEvent<HTMLButtonElement>;
|
|
141
|
-
}) => void;
|
|
142
|
-
/**
|
|
143
|
-
* 关闭事件,点击取消按钮、点击关闭按钮、点击蒙层、按下 ESC 等场景下触发
|
|
144
|
-
*/
|
|
145
|
-
onClose?: (context: DialogCloseContext) => void;
|
|
146
|
-
/**
|
|
147
|
-
* 点击右上角关闭按钮时触发
|
|
148
|
-
*/
|
|
149
|
-
onCloseBtnClick?: (context: {
|
|
150
|
-
e: MouseEvent<HTMLDivElement>;
|
|
151
|
-
}) => void;
|
|
152
|
-
/**
|
|
153
|
-
* 对话框消失动画效果结束后触发
|
|
154
|
-
*/
|
|
155
|
-
onClosed?: () => void;
|
|
156
|
-
/**
|
|
157
|
-
* 如果“确认”按钮存在,则点击“确认”按钮时触发,或者键盘按下回车键时触发
|
|
158
|
-
*/
|
|
159
|
-
onConfirm?: (context: {
|
|
160
|
-
e: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLDivElement>;
|
|
161
|
-
}) => void;
|
|
162
|
-
/**
|
|
163
|
-
* 按下 ESC 时触发事件
|
|
164
|
-
*/
|
|
165
|
-
onEscKeydown?: (context: {
|
|
166
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
167
|
-
}) => void;
|
|
168
|
-
/**
|
|
169
|
-
* 对话框弹出动画效果结束后触发
|
|
170
|
-
*/
|
|
171
|
-
onOpened?: () => void;
|
|
172
|
-
/**
|
|
173
|
-
* 如果蒙层存在,点击蒙层时触发
|
|
174
|
-
*/
|
|
175
|
-
onOverlayClick?: (context: {
|
|
176
|
-
e: MouseEvent<HTMLDivElement>;
|
|
177
|
-
}) => void;
|
|
178
|
-
}
|
|
179
|
-
export interface TdDialogCardProps extends Pick<TdDialogProps, "body" | "cancelBtn" | "closeBtn" | "confirmBtn" | "footer" | "header" | "theme" | "onCancel" | "onCloseBtnClick" | "onConfirm" | "confirmLoading"> {
|
|
180
|
-
[key: string]: unknown;
|
|
181
|
-
}
|
|
182
|
-
export interface DialogOptions extends Omit<TdDialogProps, "attach"> {
|
|
183
|
-
/**
|
|
184
|
-
* 对话框挂载的节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
185
|
-
* @default 'body'
|
|
186
|
-
*/
|
|
187
|
-
attach?: AttachNode;
|
|
188
|
-
/**
|
|
189
|
-
* 弹框类名,示例:'t-class-dialog-first t-class-dialog-second'
|
|
190
|
-
* @default ''
|
|
191
|
-
*/
|
|
192
|
-
className?: string;
|
|
193
|
-
/**
|
|
194
|
-
* 弹框 style 属性,输入 [CSSStyleDeclaration.cssText](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)
|
|
195
|
-
*/
|
|
196
|
-
style?: Styles;
|
|
197
|
-
}
|
|
198
|
-
export interface DialogInstance {
|
|
199
|
-
/**
|
|
200
|
-
* 销毁弹框
|
|
201
|
-
*/
|
|
202
|
-
destroy: () => void;
|
|
203
|
-
/**
|
|
204
|
-
* 隐藏弹框
|
|
205
|
-
*/
|
|
206
|
-
hide: () => void;
|
|
207
|
-
/**
|
|
208
|
-
* 设置确认按钮加载状态
|
|
209
|
-
*/
|
|
210
|
-
setConfirmLoading: (loading: boolean) => void;
|
|
211
|
-
/**
|
|
212
|
-
* 显示弹框
|
|
213
|
-
*/
|
|
214
|
-
show: () => void;
|
|
215
|
-
/**
|
|
216
|
-
* 更新弹框内容
|
|
217
|
-
*/
|
|
218
|
-
update: (props: DialogOptions) => void;
|
|
219
|
-
}
|
|
220
|
-
export type DialogEventSource = "esc" | "close-btn" | "cancel" | "overlay";
|
|
221
|
-
export interface DialogCloseContext {
|
|
222
|
-
trigger: DialogEventSource;
|
|
223
|
-
e: MouseEvent<HTMLElement> | KeyboardEvent;
|
|
224
|
-
}
|
|
225
|
-
export type DialogMethod = (options?: DialogOptions) => DialogInstance;
|
|
226
|
-
export type DialogConfirmMethod = (options?: DialogOptions) => DialogInstance;
|
|
227
|
-
export type DialogAlertMethod = (options?: Omit<DialogOptions, "cancelBtn">) => DialogInstance;
|
package/es/dialog/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function parseValueToPx(value: number | string): string;
|
package/es/drawer/Drawer.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { StyledProps } from "../common";
|
|
3
|
-
import type { DrawerEventSource, DrawerInstance, TdDrawerProps } from "./type";
|
|
4
|
-
export declare const CloseTriggerType: {
|
|
5
|
-
[key: string]: DrawerEventSource;
|
|
6
|
-
};
|
|
7
|
-
export interface DrawerProps extends TdDrawerProps, StyledProps {
|
|
8
|
-
isPlugin?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<DrawerInstance>>;
|
|
11
|
-
export default Drawer;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TdDrawerProps } from "../type";
|
|
2
|
-
declare const useDrag: (placement: TdDrawerProps["placement"], sizeDraggable: TdDrawerProps["sizeDraggable"], onSizeDragEnd: TdDrawerProps["onSizeDragEnd"]) => {
|
|
3
|
-
dragSizeValue: string;
|
|
4
|
-
enableDrag: () => void;
|
|
5
|
-
draggableLineStyles: import("react").CSSProperties;
|
|
6
|
-
draggingStyles: import("react").CSSProperties;
|
|
7
|
-
};
|
|
8
|
-
export default useDrag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useLockStyle: (props: any) => void;
|
package/es/drawer/index.d.ts
DELETED
package/es/drawer/style/css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/drawer/type.d.ts
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "../button";
|
|
2
|
-
import { TNode, Styles, AttachNode } from "../common";
|
|
3
|
-
import { MouseEvent, KeyboardEvent } from "react";
|
|
4
|
-
export interface TdDrawerProps {
|
|
5
|
-
/**
|
|
6
|
-
* 抽屉挂载的节点,默认挂在组件本身的位置。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
7
|
-
*/
|
|
8
|
-
attach?: AttachNode;
|
|
9
|
-
/**
|
|
10
|
-
* 抽屉内容
|
|
11
|
-
*/
|
|
12
|
-
body?: TNode;
|
|
13
|
-
/**
|
|
14
|
-
* 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件
|
|
15
|
-
*/
|
|
16
|
-
cancelBtn?: FooterButton;
|
|
17
|
-
/**
|
|
18
|
-
* 抽屉内容,同 body
|
|
19
|
-
*/
|
|
20
|
-
children?: TNode;
|
|
21
|
-
/**
|
|
22
|
-
* 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。值类型为 TNode,则表示呈现自定义按钮示例
|
|
23
|
-
*/
|
|
24
|
-
closeBtn?: TNode;
|
|
25
|
-
/**
|
|
26
|
-
* 按下 ESC 时是否触发抽屉关闭事件
|
|
27
|
-
*/
|
|
28
|
-
closeOnEscKeydown?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* 点击蒙层时是否触发抽屉关闭事件
|
|
31
|
-
*/
|
|
32
|
-
closeOnOverlayClick?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 取消按钮,可自定义。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件
|
|
35
|
-
*/
|
|
36
|
-
confirmBtn?: FooterButton;
|
|
37
|
-
/**
|
|
38
|
-
* 抽屉关闭时是否销毁节点
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
destroyOnClose?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 或 null 不显示任何内容,值类型为 TNode 表示自定义底部内容
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
footer?: TNode;
|
|
47
|
-
/**
|
|
48
|
-
* 是否强制渲染Drawer
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
forceRender?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
header?: TNode;
|
|
57
|
-
/**
|
|
58
|
-
* 是否启用抽屉懒加载,启用时抽屉的内容不渲染
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
lazy?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* 展开方式,有两种:直接展示在内容上方 和 推开内容区域
|
|
64
|
-
* @default overlay
|
|
65
|
-
*/
|
|
66
|
-
mode?: "overlay" | "push";
|
|
67
|
-
/**
|
|
68
|
-
* 抽屉方向
|
|
69
|
-
* @default right
|
|
70
|
-
*/
|
|
71
|
-
placement?: "left" | "right" | "top" | "bottom";
|
|
72
|
-
/**
|
|
73
|
-
* 防止滚动穿透
|
|
74
|
-
* @default true
|
|
75
|
-
*/
|
|
76
|
-
preventScrollThrough?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* 仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
showInAttachedElement?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* 是否显示遮罩层
|
|
84
|
-
* @default true
|
|
85
|
-
*/
|
|
86
|
-
showOverlay?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* 尺寸,支持 'small', 'medium', 'large','35px', '30%', '3em' 等。纵向抽屉调整的是抽屉宽度,横向抽屉调整的是抽屉高度
|
|
89
|
-
*/
|
|
90
|
-
size?: string;
|
|
91
|
-
/**
|
|
92
|
-
* 抽屉大小可拖拽调整,横向抽屉调整宽度
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
sizeDraggable?: boolean | SizeDragLimit;
|
|
96
|
-
/**
|
|
97
|
-
* 组件是否可见
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
visible?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* 抽屉层级,样式默认为 1500
|
|
103
|
-
*/
|
|
104
|
-
zIndex?: number;
|
|
105
|
-
/**
|
|
106
|
-
* 对话框执行消失动画效果前触发
|
|
107
|
-
*/
|
|
108
|
-
onBeforeClose?: () => void;
|
|
109
|
-
/**
|
|
110
|
-
* 对话框执行弹出动画效果前触发
|
|
111
|
-
*/
|
|
112
|
-
onBeforeOpen?: () => void;
|
|
113
|
-
/**
|
|
114
|
-
* 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
|
|
115
|
-
*/
|
|
116
|
-
onCancel?: (context: {
|
|
117
|
-
e: MouseEvent<HTMLDivElement | HTMLButtonElement>;
|
|
118
|
-
}) => void;
|
|
119
|
-
/**
|
|
120
|
-
* 关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发
|
|
121
|
-
*/
|
|
122
|
-
onClose?: (context: DrawerCloseContext) => void;
|
|
123
|
-
/**
|
|
124
|
-
* 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件
|
|
125
|
-
*/
|
|
126
|
-
onCloseBtnClick?: (context: {
|
|
127
|
-
e: MouseEvent<HTMLDivElement>;
|
|
128
|
-
}) => void;
|
|
129
|
-
/**
|
|
130
|
-
* 如果“确认”按钮存在,则点击“确认”按钮时触发
|
|
131
|
-
*/
|
|
132
|
-
onConfirm?: (context: {
|
|
133
|
-
e: MouseEvent<HTMLDivElement | HTMLButtonElement>;
|
|
134
|
-
}) => void;
|
|
135
|
-
/**
|
|
136
|
-
* 按下 ESC 键时触发
|
|
137
|
-
*/
|
|
138
|
-
onEscKeydown?: (context: {
|
|
139
|
-
e: KeyboardEvent<HTMLDivElement>;
|
|
140
|
-
}) => void;
|
|
141
|
-
/**
|
|
142
|
-
* 如果蒙层存在,点击蒙层时触发
|
|
143
|
-
*/
|
|
144
|
-
onOverlayClick?: (context: {
|
|
145
|
-
e: MouseEvent<HTMLDivElement>;
|
|
146
|
-
}) => void;
|
|
147
|
-
/**
|
|
148
|
-
* 抽屉大小调整结束事件
|
|
149
|
-
*/
|
|
150
|
-
onSizeDragEnd?: (context: {
|
|
151
|
-
e: globalThis.MouseEvent;
|
|
152
|
-
size: number;
|
|
153
|
-
}) => void;
|
|
154
|
-
}
|
|
155
|
-
export interface DrawerOptions extends Omit<TdDrawerProps, "attach"> {
|
|
156
|
-
/**
|
|
157
|
-
* 抽屉挂载的节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body
|
|
158
|
-
* @default 'body'
|
|
159
|
-
*/
|
|
160
|
-
attach?: AttachNode;
|
|
161
|
-
/**
|
|
162
|
-
* 抽屉类名,示例:'t-class-drawer-first t-class-drawer-second'
|
|
163
|
-
* @default ''
|
|
164
|
-
*/
|
|
165
|
-
className?: string;
|
|
166
|
-
/**
|
|
167
|
-
* 弹框 style 属性,输入 [CSSStyleDeclaration.cssText](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)
|
|
168
|
-
*/
|
|
169
|
-
style?: Styles;
|
|
170
|
-
}
|
|
171
|
-
export interface DrawerInstance {
|
|
172
|
-
/**
|
|
173
|
-
* 销毁抽屉
|
|
174
|
-
*/
|
|
175
|
-
destroy?: () => void;
|
|
176
|
-
/**
|
|
177
|
-
* 隐藏抽屉
|
|
178
|
-
*/
|
|
179
|
-
hide?: () => void;
|
|
180
|
-
/**
|
|
181
|
-
* 显示抽屉
|
|
182
|
-
*/
|
|
183
|
-
show?: () => void;
|
|
184
|
-
/**
|
|
185
|
-
* 更新抽屉内容
|
|
186
|
-
*/
|
|
187
|
-
update?: (props: DrawerOptions) => void;
|
|
188
|
-
}
|
|
189
|
-
export type FooterButton = string | ButtonProps | TNode;
|
|
190
|
-
export interface SizeDragLimit {
|
|
191
|
-
max: number;
|
|
192
|
-
min: number;
|
|
193
|
-
}
|
|
194
|
-
export type DrawerEventSource = "esc" | "close-btn" | "cancel" | "overlay";
|
|
195
|
-
export interface DrawerCloseContext {
|
|
196
|
-
trigger: DrawerEventSource;
|
|
197
|
-
e: MouseEvent<HTMLDivElement | HTMLButtonElement> | KeyboardEvent<HTMLDivElement>;
|
|
198
|
-
}
|
|
199
|
-
export type DrawerMethod = (options?: DrawerOptions) => DrawerInstance;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type Placement = "left" | "right" | "top" | "bottom";
|
|
2
|
-
interface SizeDragLimit {
|
|
3
|
-
max: number;
|
|
4
|
-
min: number;
|
|
5
|
-
}
|
|
6
|
-
export declare function getSizeDraggable(sizeDraggable: boolean | SizeDragLimit, limit: {
|
|
7
|
-
max: number;
|
|
8
|
-
min: number;
|
|
9
|
-
}): {
|
|
10
|
-
allowSizeDraggable: boolean;
|
|
11
|
-
max: number;
|
|
12
|
-
min: number;
|
|
13
|
-
};
|
|
14
|
-
type IOptions = {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
maxWidth: number;
|
|
18
|
-
maxHeight: number;
|
|
19
|
-
min: number;
|
|
20
|
-
max: number;
|
|
21
|
-
};
|
|
22
|
-
export declare function calcMoveSize(placement: Placement, opts: IOptions): number;
|
|
23
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyledProps } from "../common";
|
|
3
|
-
import type { TdFireworksProps } from "./type";
|
|
4
|
-
export interface FireworksProps extends TdFireworksProps, StyledProps {
|
|
5
|
-
}
|
|
6
|
-
declare const Fireworks: React.ForwardRefExoticComponent<FireworksProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export default Fireworks;
|
package/es/fireworks/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import "./style/index.js";
|
|
2
|
-
export type { FireworksProps } from "./Fireworks";
|
|
3
|
-
export * from "./type";
|
|
4
|
-
export declare const Fireworks: import("react").ForwardRefExoticComponent<import("./Fireworks").FireworksProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export default Fireworks;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/es/fireworks/type.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export interface FireworkBurst {
|
|
2
|
-
/**
|
|
3
|
-
* 唯一标识,用于 React 渲染
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
6
|
-
/**
|
|
7
|
-
* 烟花的主色
|
|
8
|
-
*/
|
|
9
|
-
color: string;
|
|
10
|
-
/**
|
|
11
|
-
* 爆炸中心的横向位置(百分比)
|
|
12
|
-
*/
|
|
13
|
-
left: number;
|
|
14
|
-
/**
|
|
15
|
-
* 爆炸中心的纵向位置(百分比)
|
|
16
|
-
*/
|
|
17
|
-
top: number;
|
|
18
|
-
/**
|
|
19
|
-
* 动画延迟,毫秒
|
|
20
|
-
*/
|
|
21
|
-
delay: number;
|
|
22
|
-
/**
|
|
23
|
-
* 每朵烟花的旋转偏移,度数
|
|
24
|
-
*/
|
|
25
|
-
rotationOffset: number;
|
|
26
|
-
}
|
|
27
|
-
export interface FireworksLaunchContext {
|
|
28
|
-
bursts: FireworkBurst[];
|
|
29
|
-
}
|
|
30
|
-
export interface TdFireworksProps {
|
|
31
|
-
/**
|
|
32
|
-
* 同时展示的烟花数量
|
|
33
|
-
* @default 6
|
|
34
|
-
*/
|
|
35
|
-
count?: number;
|
|
36
|
-
/**
|
|
37
|
-
* 烟花的随机颜色池
|
|
38
|
-
*/
|
|
39
|
-
colors?: string[];
|
|
40
|
-
/**
|
|
41
|
-
* 单次烟花动画时长,毫秒
|
|
42
|
-
* @default 2400
|
|
43
|
-
*/
|
|
44
|
-
duration?: number;
|
|
45
|
-
/**
|
|
46
|
-
* 单朵烟花的最大尺寸,像素
|
|
47
|
-
* @default 140
|
|
48
|
-
*/
|
|
49
|
-
size?: number;
|
|
50
|
-
/**
|
|
51
|
-
* 每轮重新生成烟花的间隔,毫秒
|
|
52
|
-
* @default 2800
|
|
53
|
-
*/
|
|
54
|
-
interval?: number;
|
|
55
|
-
/**
|
|
56
|
-
* 单朵烟花的光束数量
|
|
57
|
-
* @default 12
|
|
58
|
-
*/
|
|
59
|
-
particleCount?: number;
|
|
60
|
-
/**
|
|
61
|
-
* 是否持续循环播放
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
loop?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* 每次重新生成烟花时回调
|
|
67
|
-
*/
|
|
68
|
-
onLaunch?: (context: FireworksLaunchContext) => void;
|
|
69
|
-
}
|
package/es/form/Form.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { FormInstanceFunctions, TdFormProps } from "./type";
|
|
3
|
-
import { StyledProps } from "../common";
|
|
4
|
-
export interface FormProps extends TdFormProps, StyledProps {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const Form: React.FunctionComponent<FormProps & React.RefAttributes<FormInstanceFunctions<import("./type").Data>>> & Record<string, unknown>;
|
|
8
|
-
export default Form;
|