idea-react 3.0.0-alpha.0 → 3.0.0-beta.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/AGENTS.md +31 -10
- package/ReadMe.md +75 -41
- package/dist/index.d.mts +451 -100
- package/dist/index.d.ts +451 -100
- package/dist/index.js +16 -16
- package/dist/index.mjs +15 -15
- package/dist/style.css +5 -5
- package/package.json +7 -8
- package/source/Avatar.tsx +65 -12
- package/source/Button.tsx +13 -4
- package/source/ButtonGroup.tsx +28 -0
- package/source/Card.tsx +34 -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/Form/Adorn.tsx +38 -0
- package/source/Form/Checkbox.tsx +73 -0
- package/source/Form/Chips.tsx +51 -0
- package/source/Form/Combobox.tsx +109 -0
- package/source/Form/Control.tsx +59 -0
- package/source/Form/DatePicker.tsx +89 -0
- package/source/Form/Feedback.tsx +29 -0
- package/source/Form/FloatingLabel.tsx +15 -0
- package/source/Form/InputGroup.tsx +23 -0
- package/source/Form/OTP.tsx +48 -0
- package/source/Form/PasswordStrength.tsx +157 -0
- package/source/Form/Primitives.tsx +46 -0
- package/source/Form/Radio.tsx +51 -0
- package/source/Form/Range.tsx +65 -0
- package/source/Form/Switch.tsx +35 -0
- package/source/Form/index.ts +15 -0
- 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 +99 -1
- package/source/MonthCalendar.tsx +60 -22
- package/source/NativeDialog/index.tsx +37 -1
- package/source/Nav.tsx +52 -0
- package/source/Navbar.tsx +58 -1
- 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 +120 -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 +14 -0
- package/source/TypeEcho.tsx +0 -49
package/source/index.ts
CHANGED
|
@@ -2,34 +2,48 @@ export * from './animate';
|
|
|
2
2
|
export * from './Avatar';
|
|
3
3
|
export * from './Badge';
|
|
4
4
|
export * from './Button';
|
|
5
|
+
export * from './ButtonGroup';
|
|
6
|
+
export * from './Card';
|
|
5
7
|
export * from './ClickBoundary';
|
|
8
|
+
export * from './CloseButton';
|
|
6
9
|
export * from './CodeBlock';
|
|
7
10
|
export * from './color';
|
|
8
11
|
export * from './Countdown';
|
|
9
12
|
export * from './Dialog';
|
|
13
|
+
export * from './Drawer';
|
|
10
14
|
export * from './Editor';
|
|
11
15
|
export * from './EditorHTML';
|
|
16
|
+
export * from './Form';
|
|
17
|
+
export * from './Grid';
|
|
12
18
|
export * from './HorizontalMarquee';
|
|
13
19
|
export * from './Icon';
|
|
20
|
+
export * from './Image';
|
|
21
|
+
export * from './ListGroup';
|
|
14
22
|
export * from './LiveTSX';
|
|
15
23
|
export * from './Loading';
|
|
16
24
|
export * from './Menu';
|
|
17
25
|
export * from './MonthCalendar';
|
|
18
26
|
export * from './Nameplate';
|
|
19
27
|
export * from './NativeDialog';
|
|
28
|
+
export * from './Nav';
|
|
20
29
|
export * from './Navbar';
|
|
21
30
|
export * from './OverlayBox';
|
|
22
31
|
export * from './PageNav';
|
|
32
|
+
export * from './Popover';
|
|
23
33
|
export * from './ScrollNav';
|
|
24
34
|
export * from './Select';
|
|
25
35
|
export * from './ShareBox';
|
|
36
|
+
export * from './Spinner';
|
|
26
37
|
export * from './SpinnerButton';
|
|
38
|
+
export * from './Table';
|
|
27
39
|
export * from './TableSpinner';
|
|
28
40
|
export * from './TextTruncate';
|
|
29
41
|
export * from './Time';
|
|
30
42
|
export * from './TimeDistance';
|
|
31
43
|
export * from './Timeline';
|
|
32
44
|
export * from './Toast';
|
|
45
|
+
export * from './ToggleButton';
|
|
46
|
+
export * from './Tooltip';
|
|
33
47
|
export * from './TypeEcho';
|
|
34
48
|
export * from './UserRank';
|
|
35
49
|
export * from './VerticalMarquee';
|
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
|
-
}
|