@alifd/chat 0.1.12 → 0.1.13-beta.1
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/button/index.d.ts +1 -9
- package/es/card/index.d.ts +1 -5
- package/es/card/view/card.d.ts +1 -4
- package/es/card/view/collapsable.d.ts +1 -1
- package/es/core/variables.scss +2 -0
- package/es/feedback/index.d.ts +1 -6
- package/es/feedback/index.js +1 -1
- package/es/feedback/main.scss +6 -3
- package/es/feedback/view/good.js +1 -1
- package/es/float-button/hooks/useDragable.js +0 -10
- package/es/float-button/index.d.ts +4 -26
- package/es/float-button/view/backtop.d.ts +1 -9
- package/es/float-button/view/drawer.d.ts +1 -4
- package/es/float-button/view/float-button.d.ts +1 -9
- package/es/float-button/view/inner-drawer.d.ts +1 -4
- package/es/icon/index.d.ts +13 -0
- package/es/icon/index.js +21 -0
- package/es/icon/main.scss +2 -0
- package/es/icon/style.d.ts +2 -0
- package/es/icon/style.js +2 -0
- package/es/icon/types.d.ts +0 -0
- package/es/icon/types.js +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/message/index.d.ts +22 -0
- package/es/message/index.js +30 -0
- package/es/message/main.scss +2 -0
- package/es/message/style.d.ts +2 -0
- package/es/message/style.js +2 -0
- package/es/message/types.d.ts +195 -0
- package/es/message/types.js +1 -0
- package/es/tab/index.d.ts +1 -8
- package/es/tag/index.d.ts +1769 -10
- package/es/tag/index.js +2 -2
- package/es/text/index.d.ts +1 -7
- package/lib/button/index.d.ts +1 -9
- package/lib/card/index.d.ts +1 -5
- package/lib/card/view/card.d.ts +1 -4
- package/lib/card/view/collapsable.d.ts +1 -1
- package/lib/core/variables.scss +2 -0
- package/lib/feedback/index.d.ts +1 -6
- package/lib/feedback/index.js +1 -1
- package/lib/feedback/main.scss +6 -3
- package/lib/feedback/view/good.js +1 -1
- package/lib/float-button/hooks/useDragable.js +0 -10
- package/lib/float-button/index.d.ts +4 -26
- package/lib/float-button/view/backtop.d.ts +1 -9
- package/lib/float-button/view/drawer.d.ts +1 -4
- package/lib/float-button/view/float-button.d.ts +1 -9
- package/lib/float-button/view/inner-drawer.d.ts +1 -4
- package/lib/icon/index.d.ts +13 -0
- package/lib/icon/index.js +23 -0
- package/lib/icon/main.scss +2 -0
- package/lib/icon/style.d.ts +2 -0
- package/lib/icon/style.js +4 -0
- package/lib/icon/types.d.ts +0 -0
- package/lib/icon/types.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -2
- package/lib/message/index.d.ts +22 -0
- package/lib/message/index.js +32 -0
- package/lib/message/main.scss +2 -0
- package/lib/message/style.d.ts +2 -0
- package/lib/message/style.js +4 -0
- package/lib/message/types.d.ts +195 -0
- package/lib/message/types.js +2 -0
- package/lib/tab/index.d.ts +1 -8
- package/lib/tag/index.d.ts +1769 -10
- package/lib/tag/index.js +2 -2
- package/lib/text/index.d.ts +1 -7
- package/package.json +25 -1
package/es/button/index.d.ts
CHANGED
|
@@ -20,13 +20,5 @@
|
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import type { ButtonProps } from './types';
|
|
22
22
|
export * from './types';
|
|
23
|
-
declare const _default: {
|
|
24
|
-
new (props: ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>;
|
|
25
|
-
contextType?: React.Context<any> | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
displayName: string;
|
|
28
|
-
defaultProps: Partial<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
|
|
29
|
-
propTypes: React.WeakValidationMap<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>> | undefined;
|
|
30
|
-
$$typeof: symbol;
|
|
31
|
-
};
|
|
23
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<ButtonProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>>, keyof ButtonProps | "key"> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/button").ButtonProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/button/view/button").default>, {}>;
|
|
32
24
|
export default _default;
|
package/es/card/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import Collapsable from './view/collapsable';
|
|
3
|
-
declare const CardWithSub: {
|
|
4
|
-
new (props: import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
5
|
-
contextType?: import("react").Context<any> | undefined;
|
|
6
|
-
} & {} & {
|
|
2
|
+
declare const CardWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}> & {
|
|
7
3
|
Collapsable: typeof Collapsable;
|
|
8
4
|
};
|
|
9
5
|
export * from './types';
|
package/es/card/view/card.d.ts
CHANGED
|
@@ -2,8 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import type { CardProps } from '../types';
|
|
3
3
|
export declare function useCardInner({ prefix, innerClassName, title, titleAlign, titleLine, footer, footerAlign, footerLine, components, children, }: CardProps): React.JSX.Element;
|
|
4
4
|
export declare function useCardOuter(props: CardProps): React.JSX.Element;
|
|
5
|
-
declare const _default: {
|
|
6
|
-
new (props: CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
7
|
-
contextType?: React.Context<any> | undefined;
|
|
8
|
-
} & {};
|
|
5
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<CardProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
9
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CollapsableCardProps } from '../types';
|
|
3
|
-
declare function CollapsableCard({ components, visible, defaultVisible, onVisibleChange, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
3
|
+
declare function CollapsableCard({ components, visible: _v, defaultVisible: _dv, onVisibleChange: _onVC, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
4
4
|
declare namespace CollapsableCard {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
package/es/core/variables.scss
CHANGED
package/es/feedback/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { FeedbackProps } from './types';
|
|
3
2
|
import Good from './view/good';
|
|
4
3
|
export * from './types';
|
|
5
|
-
declare const _default: {
|
|
6
|
-
new (props: FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
7
|
-
contextType?: React.Context<any> | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
displayName: string;
|
|
4
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FeedbackProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}> & {
|
|
10
5
|
Good: typeof Good;
|
|
11
6
|
};
|
|
12
7
|
export default _default;
|
package/es/feedback/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import Good from './view/good';
|
|
|
12
12
|
* @when 需要获取用户针对显示内容的赞同或否定意见时
|
|
13
13
|
*/
|
|
14
14
|
function Feedback(props) {
|
|
15
|
-
const { className, order = ['
|
|
15
|
+
const { className, order = ['bad', 'good'], size, direction = 'hoz', defaultValue, value: _value, onChange: _onChange, renderItem } = props, rests = __rest(props, ["className", "order", "size", "direction", "defaultValue", "value", "onChange", "renderItem"]);
|
|
16
16
|
const cls = `${PREFIX_DEFAULT}feedback`;
|
|
17
17
|
const [value, onChange] = useControlable(props);
|
|
18
18
|
const defaultRenderItem = useCallback((status) => {
|
package/es/feedback/main.scss
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
padding: 0 4px;
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: row;
|
|
10
|
+
button:first-child {
|
|
11
|
+
margin-right: 16px;
|
|
12
|
+
}
|
|
10
13
|
}
|
|
11
14
|
&-item {
|
|
12
15
|
background-color: transparent;
|
|
@@ -15,10 +18,10 @@
|
|
|
15
18
|
display: inline-flex;
|
|
16
19
|
justify-content: center;
|
|
17
20
|
align-items: center;
|
|
18
|
-
padding: 0 4px;
|
|
19
21
|
cursor: pointer;
|
|
20
|
-
color:
|
|
22
|
+
color: $color-line1-3;
|
|
21
23
|
font-size: inherit;
|
|
24
|
+
padding: 0px;
|
|
22
25
|
transition:
|
|
23
26
|
color 0.15s,
|
|
24
27
|
opacity 0.15s;
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
line-height: 1;
|
|
36
39
|
|
|
37
40
|
&--bad {
|
|
38
|
-
transform:
|
|
41
|
+
transform: rotateX(180deg);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
}
|
package/es/feedback/view/good.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
function Good(props) {
|
|
3
3
|
return (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, props),
|
|
4
|
-
React.createElement("path", { fill: "currentColor", d: "
|
|
4
|
+
React.createElement("path", { fill: "currentColor", d: "M925.2352 425.472h-215.7568c14.6432-52.3776 32.9216-134.656 21.9648-220.7232-7.3216-71.1168-47.5648-123.4944-106.0864-145.92-43.8784-14.9504-87.7568-7.4752-113.3568 18.688-29.2352 29.952-43.8784 89.8048-58.5216 149.6576-10.9568 41.1648-18.2784 82.2784-32.9216 104.7552C384 395.52 303.616 421.6832 288.9216 425.4208H182.784c-21.9136 0-36.5568 15.0016-36.5568 37.4272v523.776c0 22.4256 14.6432 37.376 36.5568 37.376h625.408C950.784 1024 1024 567.6032 1024 541.3888c0-67.328-51.2-115.968-98.7648-115.968z m-116.992 519.9872h-588.8V500.224H307.2c25.6-7.4752 124.3648-44.9024 171.8784-127.1808 18.2784-29.952 29.2864-74.8544 40.2432-123.4944 10.9568-44.8512 21.9136-100.9664 40.2432-115.968 3.6352-3.7376 21.9136-7.4752 43.8784 0 18.2784 3.7376 47.5136 22.4768 54.8352 78.592 14.6432 119.7056-36.5568 235.6736-36.5568 235.6736-3.6864 11.2128-3.6864 26.1632 3.6352 37.376 7.3216 11.264 18.2784 18.7392 29.2864 18.7392h270.592c7.3216 0 29.2864 14.9504 29.2864 37.376-3.6864 78.592-95.0784 404.0704-146.2784 404.0704zM36.5568 425.4208C14.6432 425.472 0 440.4224 0 462.848v523.776c0 22.4256 14.6432 37.376 36.5568 37.376 21.9648 0 36.608-14.9504 36.608-37.376V462.848c0-22.4256-14.6432-37.376-36.608-37.376z" })));
|
|
5
5
|
}
|
|
6
6
|
Good.displayName = 'FeedbackGood';
|
|
7
7
|
export default Good;
|
|
@@ -15,14 +15,8 @@ function parsePosition(position, element) {
|
|
|
15
15
|
const [widthRatio, heightRatio] = position;
|
|
16
16
|
const { width, height } = getScreenSize();
|
|
17
17
|
const rect = element.getBoundingClientRect();
|
|
18
|
-
console.log('getScreenSize', getScreenSize());
|
|
19
|
-
console.log('position', position);
|
|
20
|
-
debugger;
|
|
21
18
|
const maxLeft = width - rect.width;
|
|
22
19
|
const maxTop = height - rect.height;
|
|
23
|
-
console.log('maxLeft', maxLeft);
|
|
24
|
-
console.log('maxTop', maxTop);
|
|
25
|
-
debugger;
|
|
26
20
|
return {
|
|
27
21
|
transform: `translate(${Math.min(maxLeft, normalizePositionRatio(widthRatio) * width)}px, ${Math.min(maxTop, normalizePositionRatio(heightRatio) * height)}px)`,
|
|
28
22
|
left: 0,
|
|
@@ -35,7 +29,6 @@ function normalizePositionStyle(position) {
|
|
|
35
29
|
if (!position) {
|
|
36
30
|
return undefined;
|
|
37
31
|
}
|
|
38
|
-
debugger;
|
|
39
32
|
return {
|
|
40
33
|
transform: `translate(${position.left}px, ${position.top}px)`,
|
|
41
34
|
left: 0,
|
|
@@ -78,10 +71,8 @@ export function useDragable(dom, options) {
|
|
|
78
71
|
}
|
|
79
72
|
e.preventDefault();
|
|
80
73
|
isMoving = true;
|
|
81
|
-
debugger;
|
|
82
74
|
// do update dom position
|
|
83
75
|
const position = Object.assign({ left: e.clientX + leftOffset, top: e.clientY + topOffset }, domSize);
|
|
84
|
-
debugger;
|
|
85
76
|
const adjustPosition = adjustBySafeAreaMargin(position, domRect, optionsRef.current.safeAreaMargin);
|
|
86
77
|
const { left, top } = adjustPosition || position;
|
|
87
78
|
if (lastPosition && lastPosition.left === left && lastPosition.top === top) {
|
|
@@ -129,7 +120,6 @@ export function useDragable(dom, options) {
|
|
|
129
120
|
window.removeEventListener('up', up);
|
|
130
121
|
};
|
|
131
122
|
}, [dom, options.enable]);
|
|
132
|
-
debugger;
|
|
133
123
|
return {
|
|
134
124
|
className: '',
|
|
135
125
|
style: (position ? normalizePositionStyle(position) : undefined) ||
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const FloatButtonWithSub: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
displayName: string | undefined;
|
|
7
|
-
defaultProps: Partial<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>> | undefined;
|
|
8
|
-
propTypes: import("react").WeakValidationMap<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>> | undefined;
|
|
9
|
-
$$typeof: symbol;
|
|
10
|
-
} & {
|
|
11
|
-
Backtop: {
|
|
12
|
-
new (props: import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef>;
|
|
13
|
-
contextType?: import("react").Context<any> | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
displayName: string | undefined;
|
|
16
|
-
defaultProps: Partial<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>> | undefined;
|
|
17
|
-
propTypes: import("react").WeakValidationMap<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>> | undefined;
|
|
18
|
-
$$typeof: symbol;
|
|
19
|
-
};
|
|
20
|
-
Drawer: {
|
|
21
|
-
new (props: import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
22
|
-
contextType?: import("react").Context<any> | undefined;
|
|
23
|
-
} & {};
|
|
24
|
-
InnerDrawer: {
|
|
25
|
-
new (props: import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
26
|
-
contextType?: import("react").Context<any> | undefined;
|
|
27
|
-
} & {};
|
|
2
|
+
declare const FloatButtonWithSub: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").FloatButtonProps & import("react").RefAttributes<import("./types").FloatButtonRef>, "key" | keyof import("./types").FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").FloatButtonRef, {}> & {
|
|
3
|
+
Backtop: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").BacktopProps & import("react").RefAttributes<import("./types").BacktopRef>, "key" | keyof import("./types").BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").BacktopRef, {}>;
|
|
4
|
+
Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
5
|
+
InnerDrawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
28
6
|
};
|
|
29
7
|
export type { BacktopRef, BacktopProps, FloatButtonRef, FloatButtonProps, FloatButtonDrawerProps, FloatButtonInnerDrawerProps, Edge, Margin, Position, RequiredParts, ScreenRatioPosition, Size, TriggerType, } from './types';
|
|
30
8
|
export default FloatButtonWithSub;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BacktopProps, BacktopRef } from '../types';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
new (props: BacktopProps & React.RefAttributes<BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<BacktopProps & React.RefAttributes<BacktopRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, BacktopRef>;
|
|
5
|
-
contextType?: React.Context<any> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
displayName: string | undefined;
|
|
8
|
-
defaultProps: Partial<BacktopProps & React.RefAttributes<BacktopRef>> | undefined;
|
|
9
|
-
propTypes: React.WeakValidationMap<BacktopProps & React.RefAttributes<BacktopRef>> | undefined;
|
|
10
|
-
$$typeof: symbol;
|
|
11
|
-
};
|
|
3
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<BacktopProps & React.RefAttributes<BacktopRef>, "key" | keyof BacktopProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, BacktopRef, {}>;
|
|
12
4
|
export default _default;
|
|
@@ -6,8 +6,5 @@ export interface DrawerProps extends Omit<NextDrawerProps, 'triggerType' | 'cont
|
|
|
6
6
|
triggerType?: TriggerType | TriggerType[];
|
|
7
7
|
}
|
|
8
8
|
export declare function Drawer({ prefix, children, trigger, triggerType, visible, onVisibleChange, ...rests }: DrawerProps): React.JSX.Element;
|
|
9
|
-
declare const _default: {
|
|
10
|
-
new (props: FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
11
|
-
contextType?: React.Context<any> | undefined;
|
|
12
|
-
} & {};
|
|
9
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
13
10
|
export default _default;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FloatButtonProps, FloatButtonRef } from '../types';
|
|
3
|
-
declare const _default: {
|
|
4
|
-
new (props: FloatButtonProps & React.RefAttributes<FloatButtonRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonProps & React.RefAttributes<FloatButtonRef> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, FloatButtonRef>;
|
|
5
|
-
contextType?: React.Context<any> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
displayName: string | undefined;
|
|
8
|
-
defaultProps: Partial<FloatButtonProps & React.RefAttributes<FloatButtonRef>> | undefined;
|
|
9
|
-
propTypes: React.WeakValidationMap<FloatButtonProps & React.RefAttributes<FloatButtonRef>> | undefined;
|
|
10
|
-
$$typeof: symbol;
|
|
11
|
-
};
|
|
3
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<FloatButtonProps & React.RefAttributes<FloatButtonRef>, "key" | keyof FloatButtonProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, FloatButtonRef, {}>;
|
|
12
4
|
export default _default;
|
|
@@ -19,8 +19,5 @@ export interface InnerDrawerProps {
|
|
|
19
19
|
afterClose?: () => void;
|
|
20
20
|
}
|
|
21
21
|
export declare function InnerDrawer({ className, prefix, target, children, trigger, triggerType, visible, onVisibleChange, closable, title, cache, width, beforeOpen, beforeClose, afterOpen, afterClose, }: InnerDrawerProps): React.JSX.Element;
|
|
22
|
-
declare const _default: {
|
|
23
|
-
new (props: FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, unknown>;
|
|
24
|
-
contextType?: React.Context<any> | undefined;
|
|
25
|
-
} & {};
|
|
22
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
26
23
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Icon
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Icon - Same as Next.Icon
|
|
6
|
+
* @when Icon
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Icon as NextIcon } from '@alifd/next';
|
|
10
|
+
import type { IconProps } from '@alifd/next/types/icon';
|
|
11
|
+
export type { IconProps } from '@alifd/next/types/icon';
|
|
12
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<NextIcon>, "key" | keyof IconProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextIcon, {}>;
|
|
13
|
+
export default _default;
|
package/es/icon/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Icon
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Icon - Same as Next.Icon
|
|
6
|
+
* @when Icon
|
|
7
|
+
*/
|
|
8
|
+
import { __rest } from "tslib";
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { Icon as NextIcon, ConfigProvider } from '@alifd/next';
|
|
11
|
+
import cs from 'classnames';
|
|
12
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
13
|
+
const Icon = forwardRef((_a, ref) => {
|
|
14
|
+
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
15
|
+
return (React.createElement(NextIcon, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}icon`, className), size: size })));
|
|
16
|
+
});
|
|
17
|
+
// 暂时只开放 Tag 组件,其它子组件后续看需求
|
|
18
|
+
const IconWithSub = assignSubComponent(Icon, {
|
|
19
|
+
displayName: 'Icon',
|
|
20
|
+
});
|
|
21
|
+
export default ConfigProvider.config(IconWithSub);
|
package/es/icon/style.js
ADDED
|
File without changes
|
package/es/icon/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/es/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export { default as FloatButton } from './float-button';
|
|
|
5
5
|
export { default as Text } from './text';
|
|
6
6
|
export { default as Tag } from './tag';
|
|
7
7
|
export { default as Tab } from './tab';
|
|
8
|
+
export { default as Message } from './message';
|
|
9
|
+
export { default as Icon } from './icon';
|
|
8
10
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -5,4 +5,6 @@ export { default as FloatButton } from './float-button';
|
|
|
5
5
|
export { default as Text } from './text';
|
|
6
6
|
export { default as Tag } from './tag';
|
|
7
7
|
export { default as Tab } from './tab';
|
|
8
|
-
export
|
|
8
|
+
export { default as Message } from './message';
|
|
9
|
+
export { default as Icon } from './icon';
|
|
10
|
+
export const version = '0.1.13-beta.0';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Message
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
6
|
+
* @when Message
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Message as NextMessage } from '@alifd/next';
|
|
10
|
+
import type { MessageProps } from './types';
|
|
11
|
+
export * from './types';
|
|
12
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<NextMessage>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextMessage, {}> & {
|
|
13
|
+
loading: typeof NextMessage.loading;
|
|
14
|
+
warning: typeof NextMessage.warning;
|
|
15
|
+
error: typeof NextMessage.error;
|
|
16
|
+
help: typeof NextMessage.help;
|
|
17
|
+
hide: typeof NextMessage.hide;
|
|
18
|
+
show: typeof NextMessage.show;
|
|
19
|
+
success: typeof NextMessage.success;
|
|
20
|
+
notice: typeof NextMessage.notice;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Message
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
6
|
+
* @when Message
|
|
7
|
+
*/
|
|
8
|
+
import { __rest } from "tslib";
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { Message as NextMessage, ConfigProvider } from '@alifd/next';
|
|
11
|
+
import cs from 'classnames';
|
|
12
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
13
|
+
const Message = forwardRef((_a, ref) => {
|
|
14
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
15
|
+
return (React.createElement(NextMessage, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}message`, className) })));
|
|
16
|
+
});
|
|
17
|
+
const MessageWithSub = assignSubComponent(Message, {
|
|
18
|
+
show: NextMessage.show,
|
|
19
|
+
success: NextMessage.success,
|
|
20
|
+
warning: NextMessage.warning,
|
|
21
|
+
error: NextMessage.error,
|
|
22
|
+
notice: NextMessage.notice,
|
|
23
|
+
help: NextMessage.help,
|
|
24
|
+
loading: NextMessage.loading,
|
|
25
|
+
hide: NextMessage.hide,
|
|
26
|
+
});
|
|
27
|
+
export * from './types';
|
|
28
|
+
export default ConfigProvider.config(MessageWithSub, {
|
|
29
|
+
componentName: 'Message',
|
|
30
|
+
});
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { OverlayProps } from '@alifd/next/types/overlay';
|
|
3
|
+
import type { ConsumerState } from '@alifd/next/types/config-provider/consumer';
|
|
4
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
|
|
5
|
+
/**
|
|
6
|
+
* @api Message
|
|
7
|
+
*/
|
|
8
|
+
export interface MessageProps extends HTMLAttributesWeak {
|
|
9
|
+
/**
|
|
10
|
+
* 反馈类型
|
|
11
|
+
* @en type of message
|
|
12
|
+
* @defaultValue 'success'
|
|
13
|
+
*/
|
|
14
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
15
|
+
/**
|
|
16
|
+
* 反馈外观
|
|
17
|
+
* @en shape of message
|
|
18
|
+
* @defaultValue 'inline'
|
|
19
|
+
*/
|
|
20
|
+
shape?: 'inline' | 'addon' | 'toast';
|
|
21
|
+
/**
|
|
22
|
+
* 反馈大小
|
|
23
|
+
* @en size of message
|
|
24
|
+
* @defaultValue 'medium'
|
|
25
|
+
*/
|
|
26
|
+
size?: 'medium' | 'large';
|
|
27
|
+
/**
|
|
28
|
+
* 标题
|
|
29
|
+
* @en title of message
|
|
30
|
+
*/
|
|
31
|
+
title?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* 内容,非函数式调用下使用
|
|
34
|
+
* @en content of message
|
|
35
|
+
*/
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* 默认是否显示
|
|
39
|
+
* @en whether the message is visible in default
|
|
40
|
+
* @defaultValue false
|
|
41
|
+
*/
|
|
42
|
+
defaultVisible?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 当前是否显示
|
|
45
|
+
* @en whether the message is visible currently
|
|
46
|
+
*/
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
|
|
50
|
+
* @en type of icon, overriding the internally type of icon
|
|
51
|
+
*/
|
|
52
|
+
iconType?: string | false;
|
|
53
|
+
/**
|
|
54
|
+
* 显示关闭按钮
|
|
55
|
+
* @en whether to show the close button
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
closeable?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 关闭按钮的回调
|
|
61
|
+
* @en callback function triggered when close
|
|
62
|
+
* @defaultValue () =\> \{\}
|
|
63
|
+
*/
|
|
64
|
+
onClose?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* 关闭之后调用的函数
|
|
67
|
+
* @en callback function triggered after closed
|
|
68
|
+
* @defaultValue () =\> \{\}
|
|
69
|
+
*/
|
|
70
|
+
afterClose?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* 是否开启展开收起动画
|
|
73
|
+
* @en whether to enable expand and collapse animation
|
|
74
|
+
* @defaultValue true
|
|
75
|
+
*/
|
|
76
|
+
animation?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @api Message.show
|
|
80
|
+
* @remarks Message.show(props) 提供一个单例的调用方式,配置参数如下(继承 Overlay 的配置):
|
|
81
|
+
*
|
|
82
|
+
* ```js
|
|
83
|
+
* Message.show({
|
|
84
|
+
* type: 'error',
|
|
85
|
+
* title: '错误',
|
|
86
|
+
* content: '请联系相关人员反馈!',
|
|
87
|
+
* hasMask: true
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
* -
|
|
91
|
+
* `Message.show(props)` provides a singleton call with the following configuration parameters (inheriting `Overlay` configuration):
|
|
92
|
+
* ```js
|
|
93
|
+
* Message.show({
|
|
94
|
+
* type: 'error',
|
|
95
|
+
* title: 'Error',
|
|
96
|
+
* content: 'Please contact admin feedback!',
|
|
97
|
+
* hasMask: true
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'> {
|
|
102
|
+
/**
|
|
103
|
+
* 反馈类型
|
|
104
|
+
* @en type of message
|
|
105
|
+
* @defaultValue 'success'
|
|
106
|
+
*/
|
|
107
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
108
|
+
/**
|
|
109
|
+
* 反馈大小
|
|
110
|
+
* @en size of message
|
|
111
|
+
* @defaultValue 'medium'
|
|
112
|
+
*/
|
|
113
|
+
size?: 'medium' | 'large';
|
|
114
|
+
/**
|
|
115
|
+
* 标题
|
|
116
|
+
* @en title of message
|
|
117
|
+
*/
|
|
118
|
+
title?: React.ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* 内容,函数式调用下使用
|
|
121
|
+
* @en content of message
|
|
122
|
+
*/
|
|
123
|
+
content?: React.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* 弹层对齐方式,详情见 Overlay align
|
|
126
|
+
* @en alignment reference Overlay
|
|
127
|
+
* @defaultValue 'tc tc'
|
|
128
|
+
*/
|
|
129
|
+
align?: string | boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 弹层相对于参照元素定位的微调
|
|
132
|
+
* @en offset after positioned
|
|
133
|
+
* @defaultValue [0, 0]
|
|
134
|
+
*/
|
|
135
|
+
offset?: Array<number>;
|
|
136
|
+
/**
|
|
137
|
+
* 是否显示遮罩
|
|
138
|
+
* @en whether to have a mask
|
|
139
|
+
* @defaultValue false
|
|
140
|
+
*/
|
|
141
|
+
hasMask?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* 显示持续时间,0表示一直存在,以毫秒为单位
|
|
144
|
+
* @en show duration, 0 means always present, in milliseconds
|
|
145
|
+
* @defaultValue 3000
|
|
146
|
+
*/
|
|
147
|
+
duration?: number;
|
|
148
|
+
/**
|
|
149
|
+
* @skip
|
|
150
|
+
*/
|
|
151
|
+
timeoutId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* 显示关闭按钮
|
|
154
|
+
* @en whether to show the close button
|
|
155
|
+
* @defaultValue false
|
|
156
|
+
*/
|
|
157
|
+
closeable?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 关闭按钮的回调
|
|
160
|
+
* @en callback function triggered when close
|
|
161
|
+
* @defaultValue () =\> \{\}
|
|
162
|
+
*/
|
|
163
|
+
onClose?: () => void;
|
|
164
|
+
/**
|
|
165
|
+
* 关闭之后调用的函数
|
|
166
|
+
* @en callback function triggered after closed
|
|
167
|
+
* @defaultValue () =\> \{\}
|
|
168
|
+
*/
|
|
169
|
+
afterClose?: () => void;
|
|
170
|
+
/**
|
|
171
|
+
* 是否开启展开收起动画
|
|
172
|
+
* @en whether to enable expand and collapse animation
|
|
173
|
+
* @defaultValue true
|
|
174
|
+
*/
|
|
175
|
+
animation?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* 透传到弹层组件的属性对象
|
|
178
|
+
* @en props of Overlay
|
|
179
|
+
*/
|
|
180
|
+
overlayProps?: OverlayProps;
|
|
181
|
+
/**
|
|
182
|
+
* @skip
|
|
183
|
+
*/
|
|
184
|
+
contextConfig?: ConsumerState;
|
|
185
|
+
}
|
|
186
|
+
export type OpenProps = string | React.ReactElement | MessageQuickProps;
|
|
187
|
+
export interface MessageWrapperItem extends MessageQuickProps {
|
|
188
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
189
|
+
key: string;
|
|
190
|
+
}
|
|
191
|
+
export interface MessageWrapperProps {
|
|
192
|
+
prefix?: MessageQuickProps['prefix'];
|
|
193
|
+
dataSource: Array<MessageWrapperItem>;
|
|
194
|
+
}
|
|
195
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/tab/index.d.ts
CHANGED
|
@@ -2,14 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Tab as NextTab } from '@alifd/next';
|
|
3
3
|
import type { TabProps } from '@alifd/next/types/tab';
|
|
4
4
|
export type { TabProps, ItemProps } from '@alifd/next/types/tab';
|
|
5
|
-
declare const _default: {
|
|
6
|
-
new (props: TabProps & React.RefAttributes<NextTab> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, context?: unknown): import("@alifd/next/types/config-provider/types").ConfiguredComponent<TabProps & React.RefAttributes<NextTab> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTab>;
|
|
7
|
-
contextType?: React.Context<any> | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
displayName: string;
|
|
10
|
-
defaultProps: Partial<TabProps & React.RefAttributes<NextTab>> | undefined;
|
|
11
|
-
propTypes: React.WeakValidationMap<TabProps & React.RefAttributes<NextTab>> | undefined;
|
|
12
|
-
$$typeof: symbol;
|
|
5
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TabProps & React.RefAttributes<NextTab>, "key" | keyof TabProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTab, {}> & {
|
|
13
6
|
Item: typeof import("@alifd/next/types/tab").Item;
|
|
14
7
|
};
|
|
15
8
|
export default _default;
|