@alifd/chat 0.3.0-beta.9 → 0.3.0
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.js +1 -1
- package/es/button/main.scss +1 -1
- package/es/button/style.d.ts +1 -1
- package/es/button/style.js +1 -1
- package/es/core/variables.scss +33 -11
- package/es/date-picker/style.d.ts +1 -1
- package/es/date-picker/style.js +1 -1
- package/es/drawer/index.js +2 -4
- package/es/drawer/main.scss +3 -1
- package/es/float-button/hooks/useNestleEdge.js +1 -0
- package/es/float-button/index.d.ts +1 -0
- package/es/float-button/index.js +2 -1
- package/es/float-button/main.scss +23 -0
- package/es/float-button/style.d.ts +2 -2
- package/es/float-button/style.js +2 -2
- package/es/float-button/types.d.ts +23 -0
- package/es/float-button/util.js +2 -0
- package/es/float-button/view/addon-after.d.ts +4 -0
- package/es/float-button/view/addon-after.js +10 -0
- package/es/float-button/view/backtop.js +3 -1
- package/es/html-render/index.js +2 -2
- package/es/html-render/main.scss +16 -11
- package/es/index.js +1 -1
- package/es/input/style.d.ts +1 -1
- package/es/input/style.js +1 -1
- package/es/markdown/index.js +2 -2
- package/es/markdown/main.scss +103 -108
- package/es/person-picker/style.d.ts +1 -1
- package/es/person-picker/style.js +1 -1
- package/es/tab/style.d.ts +1 -1
- package/es/tab/style.js +1 -1
- package/es/tag/style.d.ts +1 -1
- package/es/tag/style.js +1 -1
- package/es/time-picker/style.d.ts +1 -1
- package/es/time-picker/style.js +1 -1
- package/lib/button/index.js +1 -1
- package/lib/button/main.scss +1 -1
- package/lib/button/style.d.ts +1 -1
- package/lib/button/style.js +1 -1
- package/lib/core/variables.scss +33 -11
- package/lib/date-picker/style.d.ts +1 -1
- package/lib/date-picker/style.js +1 -1
- package/lib/drawer/index.js +2 -4
- package/lib/drawer/main.scss +3 -1
- package/lib/float-button/hooks/useNestleEdge.js +1 -0
- package/lib/float-button/index.d.ts +1 -0
- package/lib/float-button/index.js +2 -1
- package/lib/float-button/main.scss +23 -0
- package/lib/float-button/style.d.ts +2 -2
- package/lib/float-button/style.js +2 -2
- package/lib/float-button/types.d.ts +23 -0
- package/lib/float-button/util.js +2 -0
- package/lib/float-button/view/addon-after.d.ts +4 -0
- package/lib/float-button/view/addon-after.js +13 -0
- package/lib/float-button/view/backtop.js +3 -1
- package/lib/html-render/index.js +1 -1
- package/lib/html-render/main.scss +16 -11
- package/lib/index.js +1 -1
- package/lib/input/style.d.ts +1 -1
- package/lib/input/style.js +1 -1
- package/lib/markdown/index.js +1 -1
- package/lib/markdown/main.scss +103 -108
- package/lib/person-picker/style.d.ts +1 -1
- package/lib/person-picker/style.js +1 -1
- package/lib/tab/style.d.ts +1 -1
- package/lib/tab/style.js +1 -1
- package/lib/tag/style.d.ts +1 -1
- package/lib/tag/style.js +1 -1
- package/lib/time-picker/style.d.ts +1 -1
- package/lib/time-picker/style.js +1 -1
- package/package.json +1 -1
- package/es/html-render/index.less +0 -192
- package/lib/html-render/index.less +0 -192
package/es/button/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import cs from 'classnames';
|
|
|
24
24
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
25
|
const Button = forwardRef((_a, ref) => {
|
|
26
26
|
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
|
-
return (React.createElement(NextButton, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}button`, className), size: size, ref: ref })));
|
|
27
|
+
return (React.createElement(NextButton, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}button ${size}`, className), size: size, ref: ref })));
|
|
28
28
|
});
|
|
29
29
|
const ButtonWithSub = assignSubComponent(Button, {
|
|
30
30
|
displayName: 'Button',
|
package/es/button/main.scss
CHANGED
package/es/button/style.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/button/
|
|
1
|
+
import '@alifd/next/lib/button/style2';
|
|
2
2
|
import './main.scss';
|
package/es/button/style.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '@alifd/next/lib/button/
|
|
1
|
+
import '@alifd/next/lib/button/style2';
|
|
2
2
|
import './main.scss';
|
package/es/core/variables.scss
CHANGED
|
@@ -7,6 +7,17 @@ $shadow-2: 2px 4px 16px 0px rgba(0, 0, 0, 0.12) !default;
|
|
|
7
7
|
|
|
8
8
|
$font-size-display-3: var(--font-size-display-3, 56px) !default;
|
|
9
9
|
$font-size-display-2: var(--font-size-display-2, 48px) !default;
|
|
10
|
+
$s-1: var(---s-1, 4px) !default;
|
|
11
|
+
$s-2: var(---s-2, 8px) !default;
|
|
12
|
+
$s-3: var(---s-3, 12px) !default;
|
|
13
|
+
$s-4: var(---s-4, 16px) !default;
|
|
14
|
+
$s-5: var(---s-5, 20px) !default;
|
|
15
|
+
$s-6: var(---s-6, 24px) !default;
|
|
16
|
+
$s-7: var(---s-7, 28px) !default;
|
|
17
|
+
$s-8: var(---s-8, 32px) !default;
|
|
18
|
+
$s-9: var(---s-9, 36px) !default;
|
|
19
|
+
$s-10: var(---s-10, 40px) !default;
|
|
20
|
+
|
|
10
21
|
|
|
11
22
|
$font-size-headline: var(--font-size-headline, 24px) !default;
|
|
12
23
|
$font-size-title: var(--font-size-title, 20px) !default;
|
|
@@ -37,24 +48,35 @@ $color-line1-4: var(--color-line1-4, #a0a2ad) !default;
|
|
|
37
48
|
|
|
38
49
|
$color-brand1-1: var(--color-brand1-1, #DEE8FF) !default;
|
|
39
50
|
|
|
40
|
-
$color-fill1-
|
|
51
|
+
$color-fill1-1: var(--color-fill1-1, rgba(3, 11, 53, 0.03)) !default;
|
|
52
|
+
|
|
53
|
+
$color-fill1-2: var(--color-fill1-2, rgb(242, 243, 247)) !default;
|
|
54
|
+
|
|
55
|
+
$color-fill1-3: var(--color-fill1-3, rgb(235, 236, 240)) !default;
|
|
56
|
+
|
|
57
|
+
$color-fill1-4: var(--color-fill1-4, rgb(226, 228, 232)) !default;
|
|
58
|
+
|
|
59
|
+
$color-data1-1: var(--color-data1-1, #2d9c9c) !default; // ??
|
|
60
|
+
|
|
61
|
+
$color-data1-2: var(--color-data1-2, #0089ff) !default; // blue
|
|
62
|
+
|
|
63
|
+
$color-data1-3: var(--color-data1-3, #b963d3) !default; // purple
|
|
41
64
|
|
|
42
|
-
$color-
|
|
65
|
+
$color-data1-4: var(--color-data1-4, #ff5219) !default; // red
|
|
43
66
|
|
|
44
|
-
$color-data1-
|
|
67
|
+
$color-data1-5: var(--color-data1-5, #ff9200) !default; // orange
|
|
45
68
|
|
|
46
|
-
$color-data1-
|
|
69
|
+
$color-data1-6: var(--color-data1-6, #f4c800) !default; // yellow
|
|
47
70
|
|
|
48
|
-
$color-data1-
|
|
71
|
+
$color-data1-7: var(--color-data1-7, #00b042) !default; // ?
|
|
49
72
|
|
|
50
|
-
$color-data1-
|
|
73
|
+
$color-data1-8: var(--color-data1-8, #5ac8fa) !default; // water
|
|
51
74
|
|
|
52
|
-
$color-data1-
|
|
75
|
+
$color-data1-9: var(--color-data1-9, #ec4589) !default; // ?
|
|
53
76
|
|
|
54
|
-
$color-data1-
|
|
77
|
+
$color-data1-10: var(--color-data1-10, #6f9200) !default; // ?
|
|
55
78
|
|
|
56
|
-
$color-
|
|
79
|
+
$color-link-3: var(--color-link-3, #0056ff) !default; // ?
|
|
57
80
|
|
|
58
|
-
$color-
|
|
81
|
+
$color-bg-1: var(--color-bg-1, #ffffff) !default; // ?
|
|
59
82
|
|
|
60
|
-
$color-data1-9: var(--color-data1-9, #da5388) !default; // ?
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/date-picker2/
|
|
1
|
+
import '@alifd/next/lib/date-picker2/style2';
|
package/es/date-picker/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/date-picker2/
|
|
1
|
+
import '@alifd/next/lib/date-picker2/style2';
|
package/es/drawer/index.js
CHANGED
|
@@ -14,11 +14,9 @@ const Drawer = forwardRef((_a, ref) => {
|
|
|
14
14
|
var { className, headerStyle, children, footer, footerClassName } = _a, props = __rest(_a, ["className", "headerStyle", "children", "footer", "footerClassName"]);
|
|
15
15
|
// 对齐小蜜现有的底部
|
|
16
16
|
const defaultHeaderStyle = {
|
|
17
|
-
"border-bottom:": "1px solid var(--40gmM)"
|
|
18
|
-
"border-top-left-radius": "16px",
|
|
19
|
-
"border-top-right-radius": "16px",
|
|
17
|
+
"border-bottom:": "1px solid var(--40gmM)"
|
|
20
18
|
};
|
|
21
|
-
return (React.createElement(NextDrawer, Object.assign({}, props, { ref: ref, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: cs(`${PREFIX_DEFAULT}drawer`, className) }),
|
|
19
|
+
return (React.createElement(NextDrawer, Object.assign({}, props, { v2: true, ref: ref, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: cs(`${PREFIX_DEFAULT}drawer`, className) }),
|
|
22
20
|
React.createElement("div", { className: 'draw-content' }, children),
|
|
23
21
|
footer && footer.length && React.createElement("div", { className: cs('draw-footer', footerClassName) }, footer)));
|
|
24
22
|
});
|
package/es/drawer/main.scss
CHANGED
|
@@ -9,6 +9,7 @@ export function useNestleEdge(dom, { enable, safeAreaMargin, interactiveEdges, o
|
|
|
9
9
|
if (!enable || !dom) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
+
// 悬浮球的dom的结构
|
|
12
13
|
const rect = dom.getBoundingClientRect();
|
|
13
14
|
const { left, top, width, height } = rect;
|
|
14
15
|
const { width: screenWidth, height: screenHeight } = getScreenSize();
|
|
@@ -2,6 +2,7 @@ declare const FloatButtonWithSub: import("@alifd/next/types/config-provider/type
|
|
|
2
2
|
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, {}>;
|
|
3
3
|
Drawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
4
4
|
InnerDrawer: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<import("./types").FloatButtonInnerDrawerProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, undefined, {}>;
|
|
5
|
+
AddonAfter: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<import("./types").AddonAfterProps & import("react").RefAttributes<import("./types").AddonAfterRef>, "key" | keyof import("./types").AddonAfterProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("./types").AddonAfterRef, {}>;
|
|
5
6
|
};
|
|
6
7
|
export type { BacktopRef, BacktopProps, FloatButtonRef, FloatButtonProps, FloatButtonDrawerProps, FloatButtonInnerDrawerProps, Edge, Margin, Position, RequiredParts, ScreenRatioPosition, Size, TriggerType, } from './types';
|
|
7
8
|
export default FloatButtonWithSub;
|
package/es/float-button/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import FloatButton from './view/float-button';
|
|
2
2
|
import Backtop from './view/backtop';
|
|
3
|
+
import AddonAfter from './view/addon-after';
|
|
3
4
|
import InnerDrawer from './view/inner-drawer';
|
|
4
5
|
import Drawer from './view/drawer';
|
|
5
6
|
import { assignSubComponent } from '../utils/index';
|
|
6
|
-
const FloatButtonWithSub = assignSubComponent(FloatButton, { Backtop, Drawer, InnerDrawer });
|
|
7
|
+
const FloatButtonWithSub = assignSubComponent(FloatButton, { Backtop, Drawer, InnerDrawer, AddonAfter });
|
|
7
8
|
export default FloatButtonWithSub;
|
|
@@ -16,6 +16,29 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
&-addon-after {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
transition:
|
|
22
|
+
opacity 0.2s,
|
|
23
|
+
transform 0.2s;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
&--show-with-hover {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:hover {
|
|
31
|
+
.ct-float-button-addon-after--show-with-hover{
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
&-addon-after {
|
|
35
|
+
&--show-with-hover {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
19
42
|
&-inner-drawer {
|
|
20
43
|
flex: 1;
|
|
21
44
|
overflow: hidden;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@alifd/next/lib/balloon/
|
|
2
|
-
import '@alifd/next/lib/drawer/
|
|
1
|
+
import '@alifd/next/lib/balloon/style2';
|
|
2
|
+
import '@alifd/next/lib/drawer/style2';
|
|
3
3
|
import './main.scss';
|
package/es/float-button/style.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@alifd/next/lib/balloon/
|
|
2
|
-
import '@alifd/next/lib/drawer/
|
|
1
|
+
import '@alifd/next/lib/balloon/style2';
|
|
2
|
+
import '@alifd/next/lib/drawer/style2';
|
|
3
3
|
import './main.scss';
|
|
@@ -257,3 +257,26 @@ export interface FloatButtonDrawerProps extends FloatButtonProps {
|
|
|
257
257
|
beforeClose?: () => void;
|
|
258
258
|
afterClose?: () => void;
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* 底部额外区域 ref 对象
|
|
262
|
+
* @api
|
|
263
|
+
* @order 4
|
|
264
|
+
*/
|
|
265
|
+
export interface AddonAfterRef {
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* 底部额外区域
|
|
269
|
+
* @api FloatButton.AddonAfter
|
|
270
|
+
* @order 3
|
|
271
|
+
*/
|
|
272
|
+
export interface AddonAfterProps extends CommonProps {
|
|
273
|
+
/**
|
|
274
|
+
* 内容
|
|
275
|
+
*/
|
|
276
|
+
children: React.ReactNode;
|
|
277
|
+
/**
|
|
278
|
+
* 是否hover trigger 元素才出现
|
|
279
|
+
* @defaultValue 10
|
|
280
|
+
*/
|
|
281
|
+
showWithHover?: boolean;
|
|
282
|
+
}
|
package/es/float-button/util.js
CHANGED
|
@@ -4,6 +4,7 @@ export function getScreenSize() {
|
|
|
4
4
|
height: document.documentElement.clientHeight,
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
+
// 返回距离最近的边:top, right, left, bottom
|
|
7
8
|
export function getNearlyEdge(el, interactiveEdges, rect = el.getBoundingClientRect()) {
|
|
8
9
|
if (!(interactiveEdges === null || interactiveEdges === void 0 ? void 0 : interactiveEdges.length)) {
|
|
9
10
|
return [];
|
|
@@ -45,6 +46,7 @@ export function isInScreen(dom) {
|
|
|
45
46
|
const bottom = height - rect.top - rect.height;
|
|
46
47
|
return [left, top, right, bottom].every(n => n >= 0);
|
|
47
48
|
}
|
|
49
|
+
// 返回当前位置在安全区域内的安全位置
|
|
48
50
|
export function adjustBySafeAreaMargin(position, rect, safeAreaMargin) {
|
|
49
51
|
if (!position || !rect || !safeAreaMargin) {
|
|
50
52
|
return undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AddonAfterRef, AddonAfterProps } from '../types';
|
|
3
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<AddonAfterProps & React.RefAttributes<AddonAfterRef>, "key" | keyof AddonAfterProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, AddonAfterRef, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { ConfigProvider } from '@alifd/next';
|
|
3
|
+
import cs from 'classnames';
|
|
4
|
+
import { PREFIX_DEFAULT } from '../../utils';
|
|
5
|
+
const AddonAfter = forwardRef(({ showWithHover = false, children }, ref) => {
|
|
6
|
+
// 页面没滚动的时候默认隐藏,如果要显示会由onScroll触发
|
|
7
|
+
const cls = `${PREFIX_DEFAULT}float-button-addon-after`;
|
|
8
|
+
return (React.createElement("button", { className: cs(cls, { [`${cls}--show-with-hover`]: showWithHover }) }, children));
|
|
9
|
+
});
|
|
10
|
+
export default ConfigProvider.config(AddonAfter);
|
|
@@ -12,7 +12,8 @@ function getScroller(scroller) {
|
|
|
12
12
|
return scroller;
|
|
13
13
|
}
|
|
14
14
|
const Backtop = forwardRef(({ autoHide = true, scroller, offset = 10, smooth = true, children }, ref) => {
|
|
15
|
-
|
|
15
|
+
// 页面没滚动的时候默认隐藏,如果要显示会由onScroll触发
|
|
16
|
+
const [visible, setVisible] = useState(false);
|
|
16
17
|
const cls = `${PREFIX_DEFAULT}float-button-backtop`;
|
|
17
18
|
const visibleRef = useRef(visible);
|
|
18
19
|
visibleRef.current = visible;
|
|
@@ -55,6 +56,7 @@ const Backtop = forwardRef(({ autoHide = true, scroller, offset = 10, smooth = t
|
|
|
55
56
|
if (!target) {
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
59
|
+
// 滚动时候的显隐控制
|
|
58
60
|
const onScroll = debounce(() => {
|
|
59
61
|
if (isAtTop(target)) {
|
|
60
62
|
visibleRef.current && setVisible(false);
|
package/es/html-render/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { PhotoProvider } from 'react-photo-view';
|
|
|
13
13
|
import qs from 'query-string';
|
|
14
14
|
import ImagePreview from '../image-preview';
|
|
15
15
|
import { ConfigProvider } from '@alifd/next';
|
|
16
|
-
import { assignSubComponent } from '../utils';
|
|
16
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
17
17
|
const sanitizeHtmlOptions = {
|
|
18
18
|
allowedTags: sanitizeHtml.defaults.allowedTags.concat([
|
|
19
19
|
'acronym', 'audio', 'big', 'center', 'del', 'dir', 'font',
|
|
@@ -125,7 +125,7 @@ const HTMLRenderer = memo(function HTMLRenderer({ className, children, imagePrev
|
|
|
125
125
|
const element = useMemo(() => {
|
|
126
126
|
return parse(sanitizeHtml(children || '', sanitizeHtmlOptions), parserOptions);
|
|
127
127
|
}, [children]);
|
|
128
|
-
return (React.createElement("div", { className: classnames(
|
|
128
|
+
return (React.createElement("div", { className: classnames(`${PREFIX_DEFAULT}html`, className, {
|
|
129
129
|
'loose': loose,
|
|
130
130
|
}) }, imagePreview ?
|
|
131
131
|
React.createElement(PhotoProvider, null, element)
|
package/es/html-render/main.scss
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
.
|
|
1
|
+
@import "../core/variables.scss";
|
|
2
|
+
|
|
3
|
+
.#{$prefix}html {
|
|
2
4
|
font-size: 14px;
|
|
3
5
|
// color: hsla(230, 10%, 11%, 0.9);
|
|
4
6
|
word-break: break-word;
|
|
5
7
|
font-family: inherit;
|
|
8
|
+
color: $color-text1-4;
|
|
6
9
|
|
|
7
10
|
&.loose {
|
|
8
11
|
font-size: 16px;
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
|
|
27
30
|
img {
|
|
28
31
|
body.global-dark & {
|
|
29
|
-
background:
|
|
32
|
+
background: $color-bg-1;
|
|
30
33
|
}
|
|
31
34
|
body.global-dark-dim & {
|
|
32
35
|
filter: hue-rotate(180deg) brightness(.75) invert(1);
|
|
@@ -48,6 +51,7 @@
|
|
|
48
51
|
|
|
49
52
|
h1, h2, h3, h4, h5, h6 {
|
|
50
53
|
font-weight: bold;
|
|
54
|
+
color: $color-text1-4;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
h1 {
|
|
@@ -108,7 +112,7 @@
|
|
|
108
112
|
padding: .12em .25em;
|
|
109
113
|
border-radius: 3px;
|
|
110
114
|
font-size: 86%;
|
|
111
|
-
background:
|
|
115
|
+
background: $color-fill1-2;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
pre {
|
|
@@ -127,15 +131,16 @@
|
|
|
127
131
|
font-size: inherit;
|
|
128
132
|
background: none;
|
|
129
133
|
border-radius: 0;
|
|
134
|
+
text-shadow: none;
|
|
135
|
+
color: $color-text1-3;
|
|
130
136
|
}
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
table, td, th {
|
|
134
|
-
border: 1px solid
|
|
140
|
+
border: 1px solid $color-line1-1;
|
|
135
141
|
|
|
136
142
|
body.global-dark & {
|
|
137
|
-
border-color:
|
|
138
|
-
// border-color: #c9cace;
|
|
143
|
+
border-color: $color-line1-2
|
|
139
144
|
}
|
|
140
145
|
|
|
141
146
|
border-collapse: collapse;
|
|
@@ -156,7 +161,7 @@
|
|
|
156
161
|
}
|
|
157
162
|
|
|
158
163
|
td, th {
|
|
159
|
-
border: 1px solid
|
|
164
|
+
border: 1px solid $color-line1-1;
|
|
160
165
|
padding: 10px 12px;
|
|
161
166
|
line-height: 1.3;
|
|
162
167
|
|
|
@@ -166,11 +171,11 @@
|
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
th {
|
|
169
|
-
background:
|
|
174
|
+
background: $color-fill1-2;
|
|
170
175
|
}
|
|
171
176
|
|
|
172
177
|
a, a:visited {
|
|
173
|
-
color:
|
|
178
|
+
color: $color-link-3;
|
|
174
179
|
text-decoration: none;
|
|
175
180
|
|
|
176
181
|
&:hover {
|
|
@@ -219,7 +224,7 @@
|
|
|
219
224
|
margin-left: -16px;
|
|
220
225
|
top: 0;
|
|
221
226
|
bottom: 0;
|
|
222
|
-
background:
|
|
227
|
+
background: $color-fill1-2;
|
|
223
228
|
}
|
|
224
229
|
}
|
|
225
230
|
|
|
@@ -227,7 +232,7 @@
|
|
|
227
232
|
height: 0;
|
|
228
233
|
border: none;
|
|
229
234
|
height: 1px;
|
|
230
|
-
background:
|
|
235
|
+
background: $color-fill1-2;
|
|
231
236
|
margin: 10px 0;
|
|
232
237
|
}
|
|
233
238
|
}
|
package/es/index.js
CHANGED
|
@@ -20,4 +20,4 @@ export { default as CardLoading } from './card-loading';
|
|
|
20
20
|
export { default as Origin } from './origin';
|
|
21
21
|
export { default as Loading } from './loading';
|
|
22
22
|
export { default as Drawer } from './drawer';
|
|
23
|
-
export const version = '0.3.0
|
|
23
|
+
export const version = '0.3.0';
|
package/es/input/style.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/input/
|
|
1
|
+
import '@alifd/next/lib/input/style2';
|
package/es/input/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import '@alifd/next/lib/input/
|
|
1
|
+
import '@alifd/next/lib/input/style2';
|
package/es/markdown/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import classnames from 'classnames';
|
|
|
3
3
|
import MarkdownIt from 'markdown-it';
|
|
4
4
|
import HTMLRenderer from '../html-render';
|
|
5
5
|
import { ConfigProvider } from '@alifd/next';
|
|
6
|
-
import { assignSubComponent } from '../utils';
|
|
6
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
7
7
|
import { init, transformTextWithEmoji } from '@ali/dingtalk-im-emoji';
|
|
8
8
|
import hljs from 'highlight.js'; // 引入 highlight.js
|
|
9
9
|
import 'highlight.js/styles/github.css'; // 引入代码高亮样式
|
|
@@ -170,7 +170,7 @@ const Markdown = forwardRef(({ className, onReady, content }, ref) => {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
}, [html]);
|
|
173
|
-
return (React.createElement("div", { ref: containerRef, className: classnames(className) },
|
|
173
|
+
return (React.createElement("div", { ref: containerRef, className: classnames(`${PREFIX_DEFAULT}markdown`, className) },
|
|
174
174
|
React.createElement(HTMLRenderer, { imagePreview: true }, html)));
|
|
175
175
|
});
|
|
176
176
|
const MarkdownWithSub = assignSubComponent(Markdown, {
|