idea-react 2.0.0-rc.9 → 2.0.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.
@@ -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';
@@ -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
@@ -10,7 +10,7 @@
10
10
  "skipLibCheck": true,
11
11
  "lib": ["ES2023", "DOM"]
12
12
  },
13
- "include": ["source/**/*", "stories/**/*", "*.ts", ".storybook/**/*"],
13
+ "include": ["*.ts", "source/**/*"],
14
14
  "typedocOptions": {
15
15
  "name": "Idea React",
16
16
  "excludeExternals": true,
package/eslint.config.ts DELETED
@@ -1,69 +0,0 @@
1
- import { fixupPluginRules } from '@eslint/compat';
2
- import eslint from '@eslint/js';
3
- import eslintConfigPrettier from 'eslint-config-prettier';
4
- import reactPlugin from 'eslint-plugin-react';
5
- import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
6
- import globals from 'globals';
7
- import tsEslint from 'typescript-eslint';
8
- import { fileURLToPath } from 'url';
9
-
10
- const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url));
11
-
12
- export default tsEslint.config(
13
- // register all of the plugins up-front
14
- {
15
- plugins: {
16
- '@typescript-eslint': tsEslint.plugin,
17
- react: fixupPluginRules(reactPlugin),
18
- 'simple-import-sort': simpleImportSortPlugin
19
- }
20
- },
21
- // config with just ignores is the replacement for `.eslintignore`
22
- { ignores: ['**/node_modules/**', '**/dist/**', '**/.parcel-cache/**'] },
23
-
24
- // extends ...
25
- eslint.configs.recommended,
26
- ...tsEslint.configs.recommended,
27
-
28
- // base config
29
- {
30
- languageOptions: {
31
- globals: { ...globals.es2020, ...globals.browser, ...globals.node },
32
- parserOptions: {
33
- projectService: true,
34
- tsconfigRootDir,
35
- warnOnUnsupportedTypeScriptVersion: false
36
- }
37
- },
38
- rules: {
39
- 'simple-import-sort/exports': 'error',
40
- 'simple-import-sort/imports': 'error',
41
- 'react/jsx-no-target-blank': 'warn',
42
- 'react/jsx-sort-props': [
43
- 'error',
44
- {
45
- reservedFirst: true,
46
- shorthandLast: true,
47
- callbacksLast: true,
48
- noSortAlphabetically: true
49
- }
50
- ],
51
- '@typescript-eslint/no-unused-vars': 'warn',
52
- '@typescript-eslint/no-explicit-any': 'warn',
53
- '@typescript-eslint/no-empty-object-type': 'off',
54
- '@typescript-eslint/no-unsafe-declaration-merging': 'warn'
55
- }
56
- },
57
- {
58
- files: ['**/*.js'],
59
- extends: [tsEslint.configs.disableTypeChecked],
60
- rules: {
61
- // turn off other type-aware rules
62
- '@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',
63
-
64
- // turn off rules that don't apply to JS code
65
- '@typescript-eslint/explicit-function-return-type': 'off'
66
- }
67
- },
68
- eslintConfigPrettier
69
- );