idea-react 2.0.0-rc.8 → 2.0.0-rc.9
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/ReadMe.md +208 -208
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +20 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/eslint.config.ts +69 -0
- package/package.json +68 -51
- package/source/CodeBlock.tsx +1 -1
- package/source/Dialog.tsx +41 -41
- package/source/Editor.tsx +46 -46
- package/source/EditorHTML.tsx +21 -23
- package/source/HorizontalMarquee/index.module.less +52 -52
- package/source/HorizontalMarquee/index.tsx +67 -67
- package/source/Loading.tsx +21 -21
- package/source/MonthCalendar.tsx +1 -1
- package/source/PageNav.tsx +102 -102
- package/source/Select.tsx +84 -84
- package/source/ShareBox.tsx +99 -99
- package/source/TableSpinner.tsx +24 -24
- package/source/Time.tsx +14 -14
- package/source/TimeDistance.tsx +41 -41
- package/source/Timeline/index.module.less +53 -53
- package/source/Timeline/index.tsx +3 -3
- package/source/TypeEcho.tsx +49 -49
- package/source/UserRank/index.tsx +122 -122
- package/source/VerticalMarquee/index.module.less +43 -43
- package/source/VerticalMarquee/index.tsx +27 -27
- package/source/index.ts +25 -25
- package/tsconfig.build.json +11 -11
- package/tsconfig.json +2 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
@keyframes scrollItem {
|
|
2
|
-
0%,
|
|
3
|
-
10% {
|
|
4
|
-
transform: translateY(0);
|
|
5
|
-
}
|
|
6
|
-
90%,
|
|
7
|
-
100% {
|
|
8
|
-
transform: translateY(-100%);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
@keyframes scrollWrap {
|
|
12
|
-
0%,
|
|
13
|
-
10% {
|
|
14
|
-
transform: translateY(0);
|
|
15
|
-
}
|
|
16
|
-
90%,
|
|
17
|
-
100% {
|
|
18
|
-
transform: translateY(100%);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.scrollWrap {
|
|
23
|
-
--duration: 10s;
|
|
24
|
-
animation: scrollWrap;
|
|
25
|
-
animation-duration: var(--duration);
|
|
26
|
-
animation-timing-function: linear;
|
|
27
|
-
animation-iteration-count: infinite;
|
|
28
|
-
animation-direction: alternate;
|
|
29
|
-
font-size: 0;
|
|
30
|
-
&:hover {
|
|
31
|
-
animation-play-state: paused;
|
|
32
|
-
.scrollItem {
|
|
33
|
-
animation-play-state: paused;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
.scrollItem {
|
|
37
|
-
animation: scrollItem;
|
|
38
|
-
animation-duration: var(--duration);
|
|
39
|
-
animation-timing-function: linear;
|
|
40
|
-
animation-iteration-count: infinite;
|
|
41
|
-
animation-direction: alternate;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
@keyframes scrollItem {
|
|
2
|
+
0%,
|
|
3
|
+
10% {
|
|
4
|
+
transform: translateY(0);
|
|
5
|
+
}
|
|
6
|
+
90%,
|
|
7
|
+
100% {
|
|
8
|
+
transform: translateY(-100%);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
@keyframes scrollWrap {
|
|
12
|
+
0%,
|
|
13
|
+
10% {
|
|
14
|
+
transform: translateY(0);
|
|
15
|
+
}
|
|
16
|
+
90%,
|
|
17
|
+
100% {
|
|
18
|
+
transform: translateY(100%);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.scrollWrap {
|
|
23
|
+
--duration: 10s;
|
|
24
|
+
animation: scrollWrap;
|
|
25
|
+
animation-duration: var(--duration);
|
|
26
|
+
animation-timing-function: linear;
|
|
27
|
+
animation-iteration-count: infinite;
|
|
28
|
+
animation-direction: alternate;
|
|
29
|
+
font-size: 0;
|
|
30
|
+
&:hover {
|
|
31
|
+
animation-play-state: paused;
|
|
32
|
+
.scrollItem {
|
|
33
|
+
animation-play-state: paused;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.scrollItem {
|
|
37
|
+
animation: scrollItem;
|
|
38
|
+
animation-duration: var(--duration);
|
|
39
|
+
animation-timing-function: linear;
|
|
40
|
+
animation-iteration-count: infinite;
|
|
41
|
+
animation-direction: alternate;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
import * as style from './index.module.less';
|
|
4
|
-
|
|
5
|
-
export interface VerticalMarqueeProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
duration?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const VerticalMarquee: FC<VerticalMarqueeProps> = ({
|
|
10
|
-
className = '',
|
|
11
|
-
children,
|
|
12
|
-
duration,
|
|
13
|
-
...props
|
|
14
|
-
}) => (
|
|
15
|
-
<div className={`overflow-hidden ${className}`} {...props}>
|
|
16
|
-
<div
|
|
17
|
-
className={`d-inline-block mw-100 mh-100 ${style.scrollWrap}`}
|
|
18
|
-
// @ts-expect-error remove after React 19 released
|
|
19
|
-
style={{ '--duration': duration }}
|
|
20
|
-
>
|
|
21
|
-
<div className={`d-inline-block ${style.scrollItem}`}>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
VerticalMarquee.displayName = 'VerticalMarquee';
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
import * as style from './index.module.less';
|
|
4
|
+
|
|
5
|
+
export interface VerticalMarqueeProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
duration?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const VerticalMarquee: FC<VerticalMarqueeProps> = ({
|
|
10
|
+
className = '',
|
|
11
|
+
children,
|
|
12
|
+
duration,
|
|
13
|
+
...props
|
|
14
|
+
}) => (
|
|
15
|
+
<div className={`overflow-hidden ${className}`} {...props}>
|
|
16
|
+
<div
|
|
17
|
+
className={`d-inline-block mw-100 mh-100 ${style.scrollWrap}`}
|
|
18
|
+
// @ts-expect-error remove after React 19 released
|
|
19
|
+
style={{ '--duration': duration }}
|
|
20
|
+
>
|
|
21
|
+
<div className={`d-inline-block ${style.scrollItem}`}>
|
|
22
|
+
{children}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
VerticalMarquee.displayName = 'VerticalMarquee';
|
package/source/index.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export * from './animate';
|
|
2
|
-
export * from './Avatar';
|
|
3
|
-
export * from './ClickBoundary';
|
|
4
|
-
export * from './CodeBlock';
|
|
5
|
-
export * from './color';
|
|
6
|
-
export * from './Dialog';
|
|
7
|
-
export * from './Editor';
|
|
8
|
-
export * from './EditorHTML';
|
|
9
|
-
export * from './HorizontalMarquee';
|
|
10
|
-
export * from './Icon';
|
|
11
|
-
export * from './Loading';
|
|
12
|
-
export * from './MonthCalendar';
|
|
13
|
-
export * from './Nameplate';
|
|
14
|
-
export * from './OverlayBox';
|
|
15
|
-
export * from './PageNav';
|
|
16
|
-
export * from './Select';
|
|
17
|
-
export * from './ShareBox';
|
|
18
|
-
export * from './SpinnerButton';
|
|
19
|
-
export * from './TableSpinner';
|
|
20
|
-
export * from './Time';
|
|
21
|
-
export * from './TimeDistance';
|
|
22
|
-
export * from './Timeline';
|
|
23
|
-
export * from './TypeEcho';
|
|
24
|
-
export * from './UserRank';
|
|
25
|
-
export * from './VerticalMarquee';
|
|
1
|
+
export * from './animate';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './ClickBoundary';
|
|
4
|
+
export * from './CodeBlock';
|
|
5
|
+
export * from './color';
|
|
6
|
+
export * from './Dialog';
|
|
7
|
+
export * from './Editor';
|
|
8
|
+
export * from './EditorHTML';
|
|
9
|
+
export * from './HorizontalMarquee';
|
|
10
|
+
export * from './Icon';
|
|
11
|
+
export * from './Loading';
|
|
12
|
+
export * from './MonthCalendar';
|
|
13
|
+
export * from './Nameplate';
|
|
14
|
+
export * from './OverlayBox';
|
|
15
|
+
export * from './PageNav';
|
|
16
|
+
export * from './Select';
|
|
17
|
+
export * from './ShareBox';
|
|
18
|
+
export * from './SpinnerButton';
|
|
19
|
+
export * from './TableSpinner';
|
|
20
|
+
export * from './Time';
|
|
21
|
+
export * from './TimeDistance';
|
|
22
|
+
export * from './Timeline';
|
|
23
|
+
export * from './TypeEcho';
|
|
24
|
+
export * from './UserRank';
|
|
25
|
+
export * from './VerticalMarquee';
|
package/tsconfig.build.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"emitDeclarationOnly": true,
|
|
6
|
-
"noEmit": false,
|
|
7
|
-
"outDir": "dist"
|
|
8
|
-
},
|
|
9
|
-
"include": ["source/**/*"],
|
|
10
|
-
"exclude": ["source/stories/*"]
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"emitDeclarationOnly": true,
|
|
6
|
+
"noEmit": false,
|
|
7
|
+
"outDir": "dist"
|
|
8
|
+
},
|
|
9
|
+
"include": ["source/**/*"],
|
|
10
|
+
"exclude": ["source/stories/*"]
|
|
11
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES6",
|
|
4
|
+
"module": "ES2020",
|
|
4
5
|
"moduleResolution": "Node",
|
|
5
6
|
"esModuleInterop": true,
|
|
6
7
|
"downlevelIteration": true,
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
"skipLibCheck": true,
|
|
10
11
|
"lib": ["ES2023", "DOM"]
|
|
11
12
|
},
|
|
12
|
-
"include": ["source/**/*", "stories/**/*"],
|
|
13
|
+
"include": ["source/**/*", "stories/**/*", "*.ts", ".storybook/**/*"],
|
|
13
14
|
"typedocOptions": {
|
|
14
15
|
"name": "Idea React",
|
|
15
16
|
"excludeExternals": true,
|