@alifd/chat 0.3.0-beta.6 → 0.3.0-beta.8

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.
@@ -5,6 +5,9 @@ $size-base: 4px !default;
5
5
  $shadow-1: 1px 1px 4px 0px rgba(0, 0, 0, 0.16) !default;
6
6
  $shadow-2: 2px 4px 16px 0px rgba(0, 0, 0, 0.12) !default;
7
7
 
8
+ $font-size-display-3: var(--font-size-display-3, 56px) !default;
9
+ $font-size-display-2: var(--font-size-display-2, 48px) !default;
10
+
8
11
  $font-size-headline: var(--font-size-headline, 24px) !default;
9
12
  $font-size-title: var(--font-size-title, 20px) !default;
10
13
  $font-size-subhead: var(--font-size-subhead, 16px) !default;
@@ -34,3 +37,24 @@ $color-line1-4: var(--color-line1-4, #a0a2ad) !default;
34
37
 
35
38
  $color-brand1-1: var(--color-brand1-1, #DEE8FF) !default;
36
39
 
40
+ $color-fill1-2: var(--color-fill1-2, #f2f3f7) !default;
41
+
42
+ $color-fill1-1: var(--color-fill1-1, #030b35) !default;
43
+
44
+ $color-data1-1: var(--color-data1-1, #DEE8FF) !default; // ??
45
+
46
+ $color-data1-2: var(--color-data1-2, #007FFF) !default; // blue
47
+
48
+ $color-data1-3: var(--color-data1-3, #B963D3) !default; // purple
49
+
50
+ $color-data1-4: var(--color-data1-4, #FF5219) !default; // red
51
+
52
+ $color-data1-5: var(--color-data1-5, #FF9200) !default; // orange
53
+
54
+ $color-data1-6: var(--color-data1-6, #F4C800) !default; // yellow
55
+
56
+ $color-data1-7: var(--color-data1-7, #77912b) !default; // ?
57
+
58
+ $color-data1-8: var(--color-data1-8, #4fae51) !default; // water
59
+
60
+ $color-data1-9: var(--color-data1-9, #da5388) !default; // ?
package/es/index.d.ts CHANGED
@@ -18,4 +18,5 @@ export { default as HtmlRender } from './html-render';
18
18
  export { default as Markdown } from './markdown';
19
19
  export { default as CardLoading } from './card-loading';
20
20
  export { default as Origin } from './origin';
21
+ export { default as Loading } from './loading';
21
22
  export declare const version: string;
package/es/index.js CHANGED
@@ -18,4 +18,5 @@ export { default as HtmlRender } from './html-render';
18
18
  export { default as Markdown } from './markdown';
19
19
  export { default as CardLoading } from './card-loading';
20
20
  export { default as Origin } from './origin';
21
- export const version = '0.3.0-beta.6';
21
+ export { default as Loading } from './loading';
22
+ export const version = '0.3.0-beta.8';
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @component 加载
3
+ * @en Loading
4
+ * * @remarks 同 Next Loading- Same as Next Loading component.
5
+ * @type 通用 - General
6
+ * @when
7
+ */
8
+ import React from 'react';
9
+ import type { LoadingProps } from './types';
10
+ export * from './types';
11
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<LoadingProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/loading").LoadingProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
12
+ render(): React.JSX.Element | React.ReactNode[];
13
+ context: any;
14
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/loading").LoadingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
15
+ forceUpdate(callback?: (() => void) | undefined): void;
16
+ readonly props: Readonly<import("@alifd/next/types/loading").LoadingProps> & Readonly<{
17
+ children?: React.ReactNode | undefined;
18
+ }>;
19
+ state: Readonly<{}>;
20
+ refs: {
21
+ [key: string]: React.ReactInstance;
22
+ };
23
+ componentDidMount?(): void;
24
+ shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
25
+ componentWillUnmount?(): void;
26
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
27
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>): any;
28
+ componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>, snapshot?: any): void;
29
+ componentWillMount?(): void;
30
+ UNSAFE_componentWillMount?(): void;
31
+ componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
32
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
33
+ componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
34
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
35
+ }>>, "key" | keyof LoadingProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/loading").LoadingProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
36
+ render(): React.JSX.Element | React.ReactNode[];
37
+ context: any;
38
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/loading").LoadingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
39
+ forceUpdate(callback?: (() => void) | undefined): void;
40
+ readonly props: Readonly<import("@alifd/next/types/loading").LoadingProps> & Readonly<{
41
+ children?: React.ReactNode | undefined;
42
+ }>;
43
+ state: Readonly<{}>;
44
+ refs: {
45
+ [key: string]: React.ReactInstance;
46
+ };
47
+ componentDidMount?(): void;
48
+ shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
49
+ componentWillUnmount?(): void;
50
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>): any;
52
+ componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>, snapshot?: any): void;
53
+ componentWillMount?(): void;
54
+ UNSAFE_componentWillMount?(): void;
55
+ componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
56
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
57
+ componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
58
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
59
+ }>, {}>;
60
+ export default _default;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @component 加载
3
+ * @en Loading
4
+ * * @remarks 同 Next Loading- Same as Next Loading component.
5
+ * @type 通用 - General
6
+ * @when
7
+ */
8
+ import { __rest } from "tslib";
9
+ import React, { forwardRef } from 'react';
10
+ import { Loading as NextLoading, ConfigProvider } from '@alifd/next';
11
+ import cs from 'classnames';
12
+ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
13
+ const Loading = forwardRef((_a, ref) => {
14
+ var { className, indicator, shape = 'default', size = 'large' } = _a, props = __rest(_a, ["className", "indicator", "shape", "size"]);
15
+ let indicatorDom = indicator;
16
+ const nextProps = Object.assign(Object.assign({}, props), { size });
17
+ if (!indicator && shape && shape !== 'default') {
18
+ const indicatorClass = `load-container ${shape}`;
19
+ indicatorDom = (React.createElement("div", { className: indicatorClass },
20
+ React.createElement("div", { className: "loader" })));
21
+ nextProps.indicator = indicatorDom;
22
+ }
23
+ return (React.createElement(NextLoading, Object.assign({}, nextProps, { ref: ref, className: cs(`${PREFIX_DEFAULT}loading ${size} ${shape}`, className) })));
24
+ });
25
+ const LoadingWithSub = assignSubComponent(Loading, {
26
+ displayName: 'Loading',
27
+ });
28
+ export * from './types';
29
+ export default ConfigProvider.config(LoadingWithSub);
@@ -0,0 +1,227 @@
1
+ @import "../core/variables.scss";
2
+
3
+ .#{$prefix}loading {
4
+ .load-container {
5
+ margin: 0 auto;
6
+ position: relative;
7
+ }
8
+
9
+ &.medium {
10
+ /* animation 1 */
11
+ .bar .loader,
12
+ .bar .loader:before,
13
+ .bar .loader:after {
14
+ width: 0.5em;
15
+ height: 1em;
16
+ border-radius: 0.5em;
17
+ }
18
+
19
+ .bar .loader:before,
20
+ .bar .loader:after {
21
+ }
22
+ .bar .loader:before {
23
+ left: -0.8em;
24
+ }
25
+ .bar .loader {
26
+ }
27
+ .bar .loader:after {
28
+ left: 0.8em;
29
+ }
30
+ @-webkit-keyframes bar {
31
+ 0%,
32
+ 80%,
33
+ 100% {
34
+ box-shadow: 0 0 ;
35
+ height: 1em;
36
+ }
37
+ 40% {
38
+ box-shadow: 0 -1em ;
39
+ height: 1.2em;
40
+ }
41
+ }
42
+ @keyframes bar {
43
+ 0%,
44
+ 80%,
45
+ 100% {
46
+ box-shadow: 0 0 ;
47
+ height: 1em;
48
+ }
49
+ 40% {
50
+ box-shadow: 0 -1em ;
51
+ height: 1.2em;
52
+ }
53
+ }
54
+ /* animation 2 */
55
+ .dot .loader:before,
56
+ .dot .loader:after,
57
+ .dot .loader {
58
+ width: 1em;
59
+ height: 1em;
60
+ // top: -1em;
61
+ }
62
+ .dot .loader:before {
63
+ left: -1.5em;
64
+ }
65
+ .dot .loader:after {
66
+ left: 1.5em;
67
+ }
68
+
69
+ @-webkit-keyframes dot {
70
+ 0%,
71
+ 80%,
72
+ 100% {
73
+ box-shadow: 0 1 0 -0.5em $color-brand1-6;
74
+ }
75
+ 40% {
76
+ box-shadow: 0 1 0 0 $color-brand1-6;
77
+ }
78
+ }
79
+
80
+ @keyframes dot {
81
+ 0%,
82
+ 80%,
83
+ 100% {
84
+ box-shadow: 0 1em 0 -0.5em $color-brand1-6;
85
+ }
86
+ 40% {
87
+ box-shadow: 0 1em 0 0 $color-brand1-6;
88
+ }
89
+ }
90
+ }
91
+
92
+ /* animation 1 */
93
+ .bar .loader,
94
+ .bar .loader:before,
95
+ .bar .loader:after {
96
+ background: $color-brand1-6;
97
+ color: $color-brand1-6;
98
+ -webkit-animation: bar 1s infinite ease-in-out;
99
+ animation: bar 1s infinite ease-in-out;
100
+ width: 0.8em;
101
+ height: 2em;
102
+ border-radius: 0.8em;
103
+ }
104
+
105
+ .bar .loader:before,
106
+ .bar .loader:after {
107
+ position: absolute;
108
+ top: 0;
109
+ content: '';
110
+ }
111
+ .bar .loader:before {
112
+ left: -1em;
113
+ -webkit-animation-delay: -0.32s;
114
+ animation-delay: -0.32s;
115
+ }
116
+ .bar .loader {
117
+ text-indent: -9999em;
118
+ margin: 0 auto !important;
119
+ position: relative;
120
+ font-size: 11px;
121
+ -webkit-animation-delay: -0.16s;
122
+ animation-delay: -0.16s;
123
+ }
124
+ .bar .loader:after {
125
+ left: 1em;
126
+ }
127
+ @-webkit-keyframes bar {
128
+ 0%,
129
+ 80%,
130
+ 100% {
131
+ box-shadow: 0 0 ;
132
+ height: 2em;
133
+ }
134
+ 40% {
135
+ box-shadow: 0 -1.5em ;
136
+ height: 2.2em;
137
+ }
138
+ }
139
+ @keyframes bar {
140
+ 0%,
141
+ 80%,
142
+ 100% {
143
+ box-shadow: 0 0 ;
144
+ height: 2em;
145
+ }
146
+ 40% {
147
+ box-shadow: 0 -1.5em ;
148
+ height: 2.2em;
149
+ }
150
+ }
151
+ /* animation 2 */
152
+ .dot .loader:before,
153
+ .dot .loader:after,
154
+ .dot .loader {
155
+ border-radius: 50%;
156
+ width: 1.5em;
157
+ height: 1.5em;
158
+ -webkit-animation-fill-mode: both;
159
+ animation-fill-mode: both;
160
+ -webkit-animation: dot 1.8s infinite ease-in-out;
161
+ animation: dot 1.8s infinite ease-in-out;
162
+ top: -1.5em;
163
+
164
+ &.medium {
165
+ width: 1.0em;
166
+ height: 1.0em;
167
+ top: -1.0em;
168
+ }
169
+ }
170
+
171
+ .dot .loader {
172
+ margin: 0 auto !important;
173
+ font-size: 10px;
174
+ position: relative;
175
+ text-indent: -9999em;
176
+ -webkit-animation-delay: -0.16s;
177
+ animation-delay: -0.16s;
178
+ }
179
+
180
+ .dot .loader:before {
181
+ left: -2em;
182
+ -webkit-animation-delay: -0.32s;
183
+ animation-delay: -0.32s;
184
+
185
+ &.medium {
186
+ left: -1.5em;
187
+ }
188
+ }
189
+
190
+ .dot .loader:after {
191
+ left: 2em;
192
+ &.medium {
193
+ left: 1.5em;
194
+ }
195
+ }
196
+
197
+ .dot .loader:before,
198
+ .dot .loader:after {
199
+ content: '';
200
+ position: absolute;
201
+ top: 0;
202
+ }
203
+
204
+ @-webkit-keyframes dot {
205
+ 0%,
206
+ 80%,
207
+ 100% {
208
+ box-shadow: 0 1.5em 0 -0.8em $color-brand1-6;
209
+ }
210
+ 40% {
211
+ box-shadow: 0 1.5em 0 0 $color-brand1-6;
212
+ }
213
+ }
214
+
215
+ @keyframes dot {
216
+ 0%,
217
+ 80%,
218
+ 100% {
219
+ box-shadow: 0 1.5em 0 -0.8em $color-brand1-6;
220
+ }
221
+ 40% {
222
+ box-shadow: 0 1.5em 0 0 $color-brand1-6;
223
+ }
224
+ }
225
+ }
226
+
227
+
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/loading/style2';
2
+ import './main.scss';
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/loading/style2';
2
+ import './main.scss';
@@ -0,0 +1,8 @@
1
+ import { type CommonProps } from '@alifd/next';
2
+ import type { LoadingProps as FusionLoadingProps } from '@alifd/next/types/loading';
3
+ /**
4
+ * @api Loading
5
+ */
6
+ export interface LoadingProps extends FusionLoadingProps, CommonProps {
7
+ shape?: 'default' | 'bar' | 'dot';
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -106,50 +106,49 @@ $subTextColor: $color-text1-2;
106
106
  background-color: #d2d2d2;
107
107
  }
108
108
 
109
+ //https://done.alibaba-inc.com/dsm/16247/theme/style/font?type=theme&themeid=126576
109
110
  :root {
110
- --common_hypertitle_text_style__font_size: 64px;
111
- --common_largetitle_text_style__font_size: 32px;
112
- --common_h1_text_style__font_size: 24px;
113
- --common_h2_text_style__font_size: 20px;
111
+ --common_hypertitle_text_style__font_size: #{$font-size-display-3};
112
+ --common_largetitle_text_style__font_size: #{$font-size-display-2};
113
+
114
+ --common_h1_text_style__font_size: #{$font-size-headline};
115
+ --common_h2_text_style__font_size: #{$font-size-title};
114
116
  --common_h3_text_style__font_size: 18px;
115
- --common_h4_text_style__font_size: 16px;
117
+ --common_h4_text_style__font_size: #{$font-size-subhead};
116
118
  --common_h5_text_style__font_size: 15px;
117
- --common_body_text_style__font_size: 14px;
118
- --common_footnote_text_style__font_size: 12px;
119
-
120
- --common_yellow1_color: #e5c442;
121
- --common_orange1_color: #f1a13b;
122
- --common_red1_color: #ec6033;
123
- --common_pink1_color: #da5388;
124
- --common_purple1_color: #af68cd;
125
- --common_blue1_color: #387df6;
126
- --common_water1_color: #79c6f5;
127
- --common_olive1_color: #77912b;
128
- --common_green1_color: #4fae51;
129
- --common_level1_base_color: #1a1a1f;
130
- --common_level2_base_color: #777578;
131
- --common_level3_base_color: #a2a3a5;
132
- --common_level4_base_color: #c8c8c9;
133
- --common_gray1_color: #888f94;
134
- --common_gray2_color: #abafb3;
135
- --common_gray3_color: #c4c7ca;
136
- --common_gray4_color: #696969;
137
- --common_gray5_color: #e5e6e8;
138
- --common_gray6_color: #f0f1f2;
119
+ --common_body_text_style__font_size: #{$font-size-body-2};
120
+ --common_footnote_text_style__font_size: #{$font-size-body-1};
121
+
122
+ // --common_h1_text_style__font_size: #{$s-6;
123
+ // --common_h2_text_style__font_size: 20px;
124
+ // --common_h3_text_style__font_size: 18px;
125
+ // --common_h4_text_style__font_size: 16px;
126
+ // --common_h5_text_style__font_size: 15px;
127
+ // --common_body_text_style__font_size: 14px;
128
+ // --common_footnote_text_style__font_size: 12px;
129
+
130
+ --common_yellow1_color: #{$color-data1-6}; // #F4C800
131
+ --common_orange1_color: #{$color-data1-5}; // #FF9200
132
+ --common_red1_color: #{$color-data1-4}; // #FF5219
133
+ --common_pink1_color: #da5388; //
134
+ --common_purple1_color: #{$color-data1-3}; // #B963D3
135
+ --common_blue1_color: #{$color-data1-2}; // #007FFF
136
+
137
+ --common_water1_color: #{$color-data1-8}; //浅蓝 #5AC8FA
138
+ --common_olive1_color: #77912b; // #6F9200 通用草绿色
139
+ --common_green1_color: #4fae51; // #00B042 通用绿色
140
+
141
+ --common_level1_base_color: #{$color-text1-4};
142
+ --common_level2_base_color: #{$color-text1-3};
143
+ --common_level3_base_color: #{$color-text1-2};
144
+ --common_level4_base_color: #{$color-text1-1};
145
+
146
+ --common_gray1_color: #{$color-line1-1};
147
+ --common_gray2_color: #{$color-line1-2};
148
+ --common_gray3_color: #{$color-line1-3};
149
+ --common_gray4_color: #{$color-line1-4};
150
+
151
+ --common_gray5_color: #{$color-fill1-2};
152
+ --common_gray6_color: #{$color-fill1-1};
139
153
  }
140
-
141
- //暗黑模式的变量设置
142
- @media (prefers-color-scheme: dark), (min-width: 0px) {
143
- :root {
144
- --common_level4_base_color:#47484a;
145
- --common_gray1_color:#bebebe;
146
- --common_gray2_color:#646464;
147
- --common_gray3_color:#4b4b4b;
148
- --common_gray4_color:#3a3a3a;
149
- --common_gray5_color:#2c2c2c;
150
- --common_gray6_color:#1e1e1e;
151
- --common_level1_base_color:#D1D1D1;
152
- --common_level2_base_color: #8C8C8D;
153
- --common_level3_base_color:#757577;
154
- }
155
- }
154
+
@@ -5,6 +5,9 @@ $size-base: 4px !default;
5
5
  $shadow-1: 1px 1px 4px 0px rgba(0, 0, 0, 0.16) !default;
6
6
  $shadow-2: 2px 4px 16px 0px rgba(0, 0, 0, 0.12) !default;
7
7
 
8
+ $font-size-display-3: var(--font-size-display-3, 56px) !default;
9
+ $font-size-display-2: var(--font-size-display-2, 48px) !default;
10
+
8
11
  $font-size-headline: var(--font-size-headline, 24px) !default;
9
12
  $font-size-title: var(--font-size-title, 20px) !default;
10
13
  $font-size-subhead: var(--font-size-subhead, 16px) !default;
@@ -34,3 +37,24 @@ $color-line1-4: var(--color-line1-4, #a0a2ad) !default;
34
37
 
35
38
  $color-brand1-1: var(--color-brand1-1, #DEE8FF) !default;
36
39
 
40
+ $color-fill1-2: var(--color-fill1-2, #f2f3f7) !default;
41
+
42
+ $color-fill1-1: var(--color-fill1-1, #030b35) !default;
43
+
44
+ $color-data1-1: var(--color-data1-1, #DEE8FF) !default; // ??
45
+
46
+ $color-data1-2: var(--color-data1-2, #007FFF) !default; // blue
47
+
48
+ $color-data1-3: var(--color-data1-3, #B963D3) !default; // purple
49
+
50
+ $color-data1-4: var(--color-data1-4, #FF5219) !default; // red
51
+
52
+ $color-data1-5: var(--color-data1-5, #FF9200) !default; // orange
53
+
54
+ $color-data1-6: var(--color-data1-6, #F4C800) !default; // yellow
55
+
56
+ $color-data1-7: var(--color-data1-7, #77912b) !default; // ?
57
+
58
+ $color-data1-8: var(--color-data1-8, #4fae51) !default; // water
59
+
60
+ $color-data1-9: var(--color-data1-9, #da5388) !default; // ?
package/lib/index.d.ts CHANGED
@@ -18,4 +18,5 @@ export { default as HtmlRender } from './html-render';
18
18
  export { default as Markdown } from './markdown';
19
19
  export { default as CardLoading } from './card-loading';
20
20
  export { default as Origin } from './origin';
21
+ export { default as Loading } from './loading';
21
22
  export declare const version: string;
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.version = exports.Origin = exports.CardLoading = exports.Markdown = exports.HtmlRender = exports.ImagePreview = exports.List = exports.Balloon = exports.Icon = exports.Message = exports.PersonPicker = exports.TimePicker = exports.DatePicker = exports.Input = exports.Tab = exports.Tag = exports.Text = exports.FloatButton = exports.Feedback = exports.Card = exports.Button = void 0;
3
+ exports.version = exports.Loading = exports.Origin = exports.CardLoading = exports.Markdown = exports.HtmlRender = exports.ImagePreview = exports.List = exports.Balloon = exports.Icon = exports.Message = exports.PersonPicker = exports.TimePicker = exports.DatePicker = exports.Input = exports.Tab = exports.Tag = exports.Text = exports.FloatButton = exports.Feedback = exports.Card = exports.Button = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  var button_1 = require("./button");
6
6
  Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return tslib_1.__importDefault(button_1).default; } });
@@ -42,4 +42,6 @@ var card_loading_1 = require("./card-loading");
42
42
  Object.defineProperty(exports, "CardLoading", { enumerable: true, get: function () { return tslib_1.__importDefault(card_loading_1).default; } });
43
43
  var origin_1 = require("./origin");
44
44
  Object.defineProperty(exports, "Origin", { enumerable: true, get: function () { return tslib_1.__importDefault(origin_1).default; } });
45
- exports.version = '0.3.0-beta.6';
45
+ var loading_1 = require("./loading");
46
+ Object.defineProperty(exports, "Loading", { enumerable: true, get: function () { return tslib_1.__importDefault(loading_1).default; } });
47
+ exports.version = '0.3.0-beta.8';
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @component 加载
3
+ * @en Loading
4
+ * * @remarks 同 Next Loading- Same as Next Loading component.
5
+ * @type 通用 - General
6
+ * @when
7
+ */
8
+ import React from 'react';
9
+ import type { LoadingProps } from './types';
10
+ export * from './types';
11
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<LoadingProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/loading").LoadingProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
12
+ render(): React.JSX.Element | React.ReactNode[];
13
+ context: any;
14
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/loading").LoadingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
15
+ forceUpdate(callback?: (() => void) | undefined): void;
16
+ readonly props: Readonly<import("@alifd/next/types/loading").LoadingProps> & Readonly<{
17
+ children?: React.ReactNode | undefined;
18
+ }>;
19
+ state: Readonly<{}>;
20
+ refs: {
21
+ [key: string]: React.ReactInstance;
22
+ };
23
+ componentDidMount?(): void;
24
+ shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
25
+ componentWillUnmount?(): void;
26
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
27
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>): any;
28
+ componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>, snapshot?: any): void;
29
+ componentWillMount?(): void;
30
+ UNSAFE_componentWillMount?(): void;
31
+ componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
32
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
33
+ componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
34
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
35
+ }>>, "key" | keyof LoadingProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/loading").LoadingProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
36
+ render(): React.JSX.Element | React.ReactNode[];
37
+ context: any;
38
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("@alifd/next/types/loading").LoadingProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
39
+ forceUpdate(callback?: (() => void) | undefined): void;
40
+ readonly props: Readonly<import("@alifd/next/types/loading").LoadingProps> & Readonly<{
41
+ children?: React.ReactNode | undefined;
42
+ }>;
43
+ state: Readonly<{}>;
44
+ refs: {
45
+ [key: string]: React.ReactInstance;
46
+ };
47
+ componentDidMount?(): void;
48
+ shouldComponentUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): boolean;
49
+ componentWillUnmount?(): void;
50
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
51
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>): any;
52
+ componentDidUpdate?(prevProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, prevState: Readonly<{}>, snapshot?: any): void;
53
+ componentWillMount?(): void;
54
+ UNSAFE_componentWillMount?(): void;
55
+ componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
56
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextContext: any): void;
57
+ componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
58
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/loading").LoadingProps>, nextState: Readonly<{}>, nextContext: any): void;
59
+ }>, {}>;
60
+ export default _default;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * @component 加载
4
+ * @en Loading
5
+ * * @remarks 同 Next Loading- Same as Next Loading component.
6
+ * @type 通用 - General
7
+ * @when
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const tslib_1 = require("tslib");
11
+ const react_1 = tslib_1.__importStar(require("react"));
12
+ const next_1 = require("@alifd/next");
13
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
+ const utils_1 = require("../utils");
15
+ const Loading = (0, react_1.forwardRef)((_a, ref) => {
16
+ var { className, indicator, shape = 'default', size = 'large' } = _a, props = tslib_1.__rest(_a, ["className", "indicator", "shape", "size"]);
17
+ let indicatorDom = indicator;
18
+ const nextProps = Object.assign(Object.assign({}, props), { size });
19
+ if (!indicator && shape && shape !== 'default') {
20
+ const indicatorClass = `load-container ${shape}`;
21
+ indicatorDom = (react_1.default.createElement("div", { className: indicatorClass },
22
+ react_1.default.createElement("div", { className: "loader" })));
23
+ nextProps.indicator = indicatorDom;
24
+ }
25
+ return (react_1.default.createElement(next_1.Loading, Object.assign({}, nextProps, { ref: ref, className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}loading ${size} ${shape}`, className) })));
26
+ });
27
+ const LoadingWithSub = (0, utils_1.assignSubComponent)(Loading, {
28
+ displayName: 'Loading',
29
+ });
30
+ tslib_1.__exportStar(require("./types"), exports);
31
+ exports.default = next_1.ConfigProvider.config(LoadingWithSub);
@@ -0,0 +1,227 @@
1
+ @import "../core/variables.scss";
2
+
3
+ .#{$prefix}loading {
4
+ .load-container {
5
+ margin: 0 auto;
6
+ position: relative;
7
+ }
8
+
9
+ &.medium {
10
+ /* animation 1 */
11
+ .bar .loader,
12
+ .bar .loader:before,
13
+ .bar .loader:after {
14
+ width: 0.5em;
15
+ height: 1em;
16
+ border-radius: 0.5em;
17
+ }
18
+
19
+ .bar .loader:before,
20
+ .bar .loader:after {
21
+ }
22
+ .bar .loader:before {
23
+ left: -0.8em;
24
+ }
25
+ .bar .loader {
26
+ }
27
+ .bar .loader:after {
28
+ left: 0.8em;
29
+ }
30
+ @-webkit-keyframes bar {
31
+ 0%,
32
+ 80%,
33
+ 100% {
34
+ box-shadow: 0 0 ;
35
+ height: 1em;
36
+ }
37
+ 40% {
38
+ box-shadow: 0 -1em ;
39
+ height: 1.2em;
40
+ }
41
+ }
42
+ @keyframes bar {
43
+ 0%,
44
+ 80%,
45
+ 100% {
46
+ box-shadow: 0 0 ;
47
+ height: 1em;
48
+ }
49
+ 40% {
50
+ box-shadow: 0 -1em ;
51
+ height: 1.2em;
52
+ }
53
+ }
54
+ /* animation 2 */
55
+ .dot .loader:before,
56
+ .dot .loader:after,
57
+ .dot .loader {
58
+ width: 1em;
59
+ height: 1em;
60
+ // top: -1em;
61
+ }
62
+ .dot .loader:before {
63
+ left: -1.5em;
64
+ }
65
+ .dot .loader:after {
66
+ left: 1.5em;
67
+ }
68
+
69
+ @-webkit-keyframes dot {
70
+ 0%,
71
+ 80%,
72
+ 100% {
73
+ box-shadow: 0 1 0 -0.5em $color-brand1-6;
74
+ }
75
+ 40% {
76
+ box-shadow: 0 1 0 0 $color-brand1-6;
77
+ }
78
+ }
79
+
80
+ @keyframes dot {
81
+ 0%,
82
+ 80%,
83
+ 100% {
84
+ box-shadow: 0 1em 0 -0.5em $color-brand1-6;
85
+ }
86
+ 40% {
87
+ box-shadow: 0 1em 0 0 $color-brand1-6;
88
+ }
89
+ }
90
+ }
91
+
92
+ /* animation 1 */
93
+ .bar .loader,
94
+ .bar .loader:before,
95
+ .bar .loader:after {
96
+ background: $color-brand1-6;
97
+ color: $color-brand1-6;
98
+ -webkit-animation: bar 1s infinite ease-in-out;
99
+ animation: bar 1s infinite ease-in-out;
100
+ width: 0.8em;
101
+ height: 2em;
102
+ border-radius: 0.8em;
103
+ }
104
+
105
+ .bar .loader:before,
106
+ .bar .loader:after {
107
+ position: absolute;
108
+ top: 0;
109
+ content: '';
110
+ }
111
+ .bar .loader:before {
112
+ left: -1em;
113
+ -webkit-animation-delay: -0.32s;
114
+ animation-delay: -0.32s;
115
+ }
116
+ .bar .loader {
117
+ text-indent: -9999em;
118
+ margin: 0 auto !important;
119
+ position: relative;
120
+ font-size: 11px;
121
+ -webkit-animation-delay: -0.16s;
122
+ animation-delay: -0.16s;
123
+ }
124
+ .bar .loader:after {
125
+ left: 1em;
126
+ }
127
+ @-webkit-keyframes bar {
128
+ 0%,
129
+ 80%,
130
+ 100% {
131
+ box-shadow: 0 0 ;
132
+ height: 2em;
133
+ }
134
+ 40% {
135
+ box-shadow: 0 -1.5em ;
136
+ height: 2.2em;
137
+ }
138
+ }
139
+ @keyframes bar {
140
+ 0%,
141
+ 80%,
142
+ 100% {
143
+ box-shadow: 0 0 ;
144
+ height: 2em;
145
+ }
146
+ 40% {
147
+ box-shadow: 0 -1.5em ;
148
+ height: 2.2em;
149
+ }
150
+ }
151
+ /* animation 2 */
152
+ .dot .loader:before,
153
+ .dot .loader:after,
154
+ .dot .loader {
155
+ border-radius: 50%;
156
+ width: 1.5em;
157
+ height: 1.5em;
158
+ -webkit-animation-fill-mode: both;
159
+ animation-fill-mode: both;
160
+ -webkit-animation: dot 1.8s infinite ease-in-out;
161
+ animation: dot 1.8s infinite ease-in-out;
162
+ top: -1.5em;
163
+
164
+ &.medium {
165
+ width: 1.0em;
166
+ height: 1.0em;
167
+ top: -1.0em;
168
+ }
169
+ }
170
+
171
+ .dot .loader {
172
+ margin: 0 auto !important;
173
+ font-size: 10px;
174
+ position: relative;
175
+ text-indent: -9999em;
176
+ -webkit-animation-delay: -0.16s;
177
+ animation-delay: -0.16s;
178
+ }
179
+
180
+ .dot .loader:before {
181
+ left: -2em;
182
+ -webkit-animation-delay: -0.32s;
183
+ animation-delay: -0.32s;
184
+
185
+ &.medium {
186
+ left: -1.5em;
187
+ }
188
+ }
189
+
190
+ .dot .loader:after {
191
+ left: 2em;
192
+ &.medium {
193
+ left: 1.5em;
194
+ }
195
+ }
196
+
197
+ .dot .loader:before,
198
+ .dot .loader:after {
199
+ content: '';
200
+ position: absolute;
201
+ top: 0;
202
+ }
203
+
204
+ @-webkit-keyframes dot {
205
+ 0%,
206
+ 80%,
207
+ 100% {
208
+ box-shadow: 0 1.5em 0 -0.8em $color-brand1-6;
209
+ }
210
+ 40% {
211
+ box-shadow: 0 1.5em 0 0 $color-brand1-6;
212
+ }
213
+ }
214
+
215
+ @keyframes dot {
216
+ 0%,
217
+ 80%,
218
+ 100% {
219
+ box-shadow: 0 1.5em 0 -0.8em $color-brand1-6;
220
+ }
221
+ 40% {
222
+ box-shadow: 0 1.5em 0 0 $color-brand1-6;
223
+ }
224
+ }
225
+ }
226
+
227
+
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/lib/loading/style2';
2
+ import './main.scss';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ require("@alifd/next/lib/loading/style2");
4
+ require("./main.scss");
@@ -0,0 +1,8 @@
1
+ import { type CommonProps } from '@alifd/next';
2
+ import type { LoadingProps as FusionLoadingProps } from '@alifd/next/types/loading';
3
+ /**
4
+ * @api Loading
5
+ */
6
+ export interface LoadingProps extends FusionLoadingProps, CommonProps {
7
+ shape?: 'default' | 'bar' | 'dot';
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -106,50 +106,49 @@ $subTextColor: $color-text1-2;
106
106
  background-color: #d2d2d2;
107
107
  }
108
108
 
109
+ //https://done.alibaba-inc.com/dsm/16247/theme/style/font?type=theme&themeid=126576
109
110
  :root {
110
- --common_hypertitle_text_style__font_size: 64px;
111
- --common_largetitle_text_style__font_size: 32px;
112
- --common_h1_text_style__font_size: 24px;
113
- --common_h2_text_style__font_size: 20px;
111
+ --common_hypertitle_text_style__font_size: #{$font-size-display-3};
112
+ --common_largetitle_text_style__font_size: #{$font-size-display-2};
113
+
114
+ --common_h1_text_style__font_size: #{$font-size-headline};
115
+ --common_h2_text_style__font_size: #{$font-size-title};
114
116
  --common_h3_text_style__font_size: 18px;
115
- --common_h4_text_style__font_size: 16px;
117
+ --common_h4_text_style__font_size: #{$font-size-subhead};
116
118
  --common_h5_text_style__font_size: 15px;
117
- --common_body_text_style__font_size: 14px;
118
- --common_footnote_text_style__font_size: 12px;
119
-
120
- --common_yellow1_color: #e5c442;
121
- --common_orange1_color: #f1a13b;
122
- --common_red1_color: #ec6033;
123
- --common_pink1_color: #da5388;
124
- --common_purple1_color: #af68cd;
125
- --common_blue1_color: #387df6;
126
- --common_water1_color: #79c6f5;
127
- --common_olive1_color: #77912b;
128
- --common_green1_color: #4fae51;
129
- --common_level1_base_color: #1a1a1f;
130
- --common_level2_base_color: #777578;
131
- --common_level3_base_color: #a2a3a5;
132
- --common_level4_base_color: #c8c8c9;
133
- --common_gray1_color: #888f94;
134
- --common_gray2_color: #abafb3;
135
- --common_gray3_color: #c4c7ca;
136
- --common_gray4_color: #696969;
137
- --common_gray5_color: #e5e6e8;
138
- --common_gray6_color: #f0f1f2;
119
+ --common_body_text_style__font_size: #{$font-size-body-2};
120
+ --common_footnote_text_style__font_size: #{$font-size-body-1};
121
+
122
+ // --common_h1_text_style__font_size: #{$s-6;
123
+ // --common_h2_text_style__font_size: 20px;
124
+ // --common_h3_text_style__font_size: 18px;
125
+ // --common_h4_text_style__font_size: 16px;
126
+ // --common_h5_text_style__font_size: 15px;
127
+ // --common_body_text_style__font_size: 14px;
128
+ // --common_footnote_text_style__font_size: 12px;
129
+
130
+ --common_yellow1_color: #{$color-data1-6}; // #F4C800
131
+ --common_orange1_color: #{$color-data1-5}; // #FF9200
132
+ --common_red1_color: #{$color-data1-4}; // #FF5219
133
+ --common_pink1_color: #da5388; //
134
+ --common_purple1_color: #{$color-data1-3}; // #B963D3
135
+ --common_blue1_color: #{$color-data1-2}; // #007FFF
136
+
137
+ --common_water1_color: #{$color-data1-8}; //浅蓝 #5AC8FA
138
+ --common_olive1_color: #77912b; // #6F9200 通用草绿色
139
+ --common_green1_color: #4fae51; // #00B042 通用绿色
140
+
141
+ --common_level1_base_color: #{$color-text1-4};
142
+ --common_level2_base_color: #{$color-text1-3};
143
+ --common_level3_base_color: #{$color-text1-2};
144
+ --common_level4_base_color: #{$color-text1-1};
145
+
146
+ --common_gray1_color: #{$color-line1-1};
147
+ --common_gray2_color: #{$color-line1-2};
148
+ --common_gray3_color: #{$color-line1-3};
149
+ --common_gray4_color: #{$color-line1-4};
150
+
151
+ --common_gray5_color: #{$color-fill1-2};
152
+ --common_gray6_color: #{$color-fill1-1};
139
153
  }
140
-
141
- //暗黑模式的变量设置
142
- @media (prefers-color-scheme: dark), (min-width: 0px) {
143
- :root {
144
- --common_level4_base_color:#47484a;
145
- --common_gray1_color:#bebebe;
146
- --common_gray2_color:#646464;
147
- --common_gray3_color:#4b4b4b;
148
- --common_gray4_color:#3a3a3a;
149
- --common_gray5_color:#2c2c2c;
150
- --common_gray6_color:#1e1e1e;
151
- --common_level1_base_color:#D1D1D1;
152
- --common_level2_base_color: #8C8C8D;
153
- --common_level3_base_color:#757577;
154
- }
155
- }
154
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.3.0-beta.6",
3
+ "version": "0.3.0-beta.8",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -301,6 +301,18 @@
301
301
  "./image-preview/style.js": {
302
302
  "import": "./es/image-preview/style.js",
303
303
  "require": "./lib/image-preview/style.js"
304
+ },
305
+ "./loading": {
306
+ "import": "./es/loading/index.js",
307
+ "require": "./lib/loading/index.js"
308
+ },
309
+ "./loading/style": {
310
+ "import": "./es/loading/style.js",
311
+ "require": "./lib/loading/style.js"
312
+ },
313
+ "./loading/style.js": {
314
+ "import": "./es/loading/style.js",
315
+ "require": "./lib/loading/style.js"
304
316
  }
305
317
  },
306
318
  "files": [