idea-react 2.3.5 → 3.0.0-alpha.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/AGENTS.md +253 -0
- package/ReadMe.md +81 -67
- package/dist/index.d.mts +419 -203
- package/dist/index.d.ts +419 -203
- package/dist/index.js +18 -18
- package/dist/index.mjs +17 -17
- package/dist/style.css +5 -1
- package/package.json +36 -35
- package/source/Avatar.tsx +65 -12
- package/source/Badge.tsx +34 -0
- package/source/Button.tsx +73 -0
- package/source/ButtonGroup.tsx +28 -0
- package/source/Card.tsx +26 -0
- package/source/ClickBoundary.tsx +6 -5
- package/source/CloseButton.tsx +23 -0
- package/source/CodeBlock.tsx +5 -3
- package/source/Countdown.tsx +2 -0
- package/source/Drawer.tsx +62 -0
- package/source/Editor.tsx +5 -8
- package/source/Grid.tsx +92 -0
- package/source/HorizontalMarquee/index.tsx +4 -10
- package/source/Image.tsx +15 -0
- package/source/ListGroup.tsx +103 -0
- package/source/LiveTSX.tsx +1 -1
- package/source/Loading.tsx +4 -3
- package/source/Menu.tsx +282 -0
- package/source/MonthCalendar.tsx +60 -22
- package/source/NativeDialog/index.tsx +139 -0
- package/source/NativeDialog/style.module.css +4 -0
- package/source/Nav.tsx +52 -0
- package/source/Navbar.tsx +64 -0
- package/source/Overlay.ts +22 -0
- package/source/OverlayBox.tsx +200 -32
- package/source/PageNav.tsx +56 -32
- package/source/Popover.tsx +36 -0
- package/source/ScrollNav/Scroller.tsx +107 -0
- package/source/ScrollNav/index.tsx +12 -99
- package/source/Select.tsx +66 -55
- package/source/ShareBox.tsx +5 -11
- package/source/Spinner.tsx +30 -0
- package/source/SpinnerButton.tsx +8 -10
- package/source/Table.tsx +59 -0
- package/source/TableSpinner.tsx +7 -5
- package/source/{TextTruncate.tsx → TextTruncate/Content.tsx} +24 -20
- package/source/TextTruncate/index.tsx +25 -0
- package/source/Time.tsx +7 -33
- package/source/TimeDistance.tsx +1 -1
- package/source/Timeline/index.tsx +7 -7
- package/source/Toast.tsx +114 -29
- package/source/ToggleButton.tsx +47 -0
- package/source/Tooltip.tsx +32 -0
- package/source/TypeEcho/Content.tsx +58 -0
- package/source/TypeEcho/index.tsx +14 -0
- package/source/UserRank/index.module.less +9 -20
- package/source/UserRank/index.tsx +35 -32
- package/source/VerticalMarquee/index.module.less +0 -1
- package/source/VerticalMarquee/index.tsx +3 -5
- package/source/ZodiacBar.tsx +1 -1
- package/source/animate.ts +4 -2
- package/source/color.ts +3 -5
- package/source/index.ts +18 -0
- package/source/types.d.ts +4 -0
- package/tsconfig.json +6 -2
- package/source/TypeEcho.tsx +0 -49
package/source/index.ts
CHANGED
|
@@ -1,30 +1,48 @@
|
|
|
1
1
|
export * from './animate';
|
|
2
2
|
export * from './Avatar';
|
|
3
|
+
export * from './Badge';
|
|
4
|
+
export * from './Button';
|
|
5
|
+
export * from './ButtonGroup';
|
|
6
|
+
export * from './Card';
|
|
3
7
|
export * from './ClickBoundary';
|
|
8
|
+
export * from './CloseButton';
|
|
4
9
|
export * from './CodeBlock';
|
|
5
10
|
export * from './color';
|
|
6
11
|
export * from './Countdown';
|
|
7
12
|
export * from './Dialog';
|
|
13
|
+
export * from './Drawer';
|
|
8
14
|
export * from './Editor';
|
|
9
15
|
export * from './EditorHTML';
|
|
16
|
+
export * from './Grid';
|
|
10
17
|
export * from './HorizontalMarquee';
|
|
11
18
|
export * from './Icon';
|
|
19
|
+
export * from './Image';
|
|
20
|
+
export * from './ListGroup';
|
|
12
21
|
export * from './LiveTSX';
|
|
13
22
|
export * from './Loading';
|
|
23
|
+
export * from './Menu';
|
|
14
24
|
export * from './MonthCalendar';
|
|
15
25
|
export * from './Nameplate';
|
|
26
|
+
export * from './NativeDialog';
|
|
27
|
+
export * from './Nav';
|
|
28
|
+
export * from './Navbar';
|
|
16
29
|
export * from './OverlayBox';
|
|
17
30
|
export * from './PageNav';
|
|
31
|
+
export * from './Popover';
|
|
18
32
|
export * from './ScrollNav';
|
|
19
33
|
export * from './Select';
|
|
20
34
|
export * from './ShareBox';
|
|
35
|
+
export * from './Spinner';
|
|
21
36
|
export * from './SpinnerButton';
|
|
37
|
+
export * from './Table';
|
|
22
38
|
export * from './TableSpinner';
|
|
23
39
|
export * from './TextTruncate';
|
|
24
40
|
export * from './Time';
|
|
25
41
|
export * from './TimeDistance';
|
|
26
42
|
export * from './Timeline';
|
|
27
43
|
export * from './Toast';
|
|
44
|
+
export * from './ToggleButton';
|
|
45
|
+
export * from './Tooltip';
|
|
28
46
|
export * from './TypeEcho';
|
|
29
47
|
export * from './UserRank';
|
|
30
48
|
export * from './VerticalMarquee';
|
package/source/types.d.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -8,14 +8,18 @@
|
|
|
8
8
|
"useDefineForClassFields": true,
|
|
9
9
|
"jsx": "react-jsx",
|
|
10
10
|
"skipLibCheck": true,
|
|
11
|
-
"lib": ["ES2024", "DOM"]
|
|
11
|
+
"lib": ["ES2024", "DOM", "DOM.Iterable"]
|
|
12
12
|
},
|
|
13
13
|
"include": ["*.ts", "source/**/*"],
|
|
14
14
|
"typedocOptions": {
|
|
15
15
|
"name": "Idea React",
|
|
16
|
+
"includeVersion": true,
|
|
16
17
|
"excludeExternals": true,
|
|
17
18
|
"excludePrivate": true,
|
|
19
|
+
"plugin": ["typedoc-plugin-mdn-links"],
|
|
18
20
|
"readme": "./ReadMe.md",
|
|
19
|
-
"
|
|
21
|
+
"navigationLinks": {
|
|
22
|
+
"GitHub": "https://github.com/idea2app/Idea-React"
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
}
|
package/source/TypeEcho.tsx
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
2
|
-
import { observable } from 'mobx';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
import { Component, HTMLAttributes, RefCallback } from 'react';
|
|
5
|
-
import { sleep } from 'web-utility';
|
|
6
|
-
|
|
7
|
-
export interface TypeEchoProps extends HTMLAttributes<HTMLPreElement> {
|
|
8
|
-
text: string;
|
|
9
|
-
intervals?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@observer
|
|
13
|
-
export class TypeEcho extends Component<TypeEchoProps> {
|
|
14
|
-
static displayName = 'TypeEcho';
|
|
15
|
-
|
|
16
|
-
@observable
|
|
17
|
-
accessor echoed = '';
|
|
18
|
-
|
|
19
|
-
init: RefCallback<HTMLPreElement> = node =>
|
|
20
|
-
node &&
|
|
21
|
-
new IntersectionObserver(async ([{ isIntersecting }], observer) => {
|
|
22
|
-
if (!isIntersecting) return;
|
|
23
|
-
|
|
24
|
-
observer.disconnect();
|
|
25
|
-
|
|
26
|
-
const { text, intervals = 150 } = this.props;
|
|
27
|
-
|
|
28
|
-
for (const char of text) {
|
|
29
|
-
await sleep(intervals / 1000);
|
|
30
|
-
|
|
31
|
-
this.echoed += char;
|
|
32
|
-
}
|
|
33
|
-
}).observe(node);
|
|
34
|
-
|
|
35
|
-
render() {
|
|
36
|
-
const { className, text, ...props } = this.props,
|
|
37
|
-
{ echoed } = this;
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<pre
|
|
41
|
-
{...props}
|
|
42
|
-
ref={this.init}
|
|
43
|
-
className={classNames('text-wrap', className)}
|
|
44
|
-
>
|
|
45
|
-
{echoed + (echoed === text ? '' : '_')}
|
|
46
|
-
</pre>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|