@apify/ui-library 0.67.0 → 0.67.2

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/eslint.config.mjs CHANGED
@@ -10,14 +10,21 @@ export default [
10
10
  { ignores: ['**/dist'] }, // Ignores need to happen first
11
11
  ...apifyTypescriptConfig,
12
12
  ...apifyJestConfig,
13
- {
14
13
 
14
+ {
15
+ files: ['**/*.ts', '**/*.tsx'],
16
+ settings: {
17
+ react: {
18
+ version: 'detect',
19
+ },
20
+ },
21
+ ...react.configs.flat.recommended,
22
+ },
23
+ {
15
24
  plugins: {
16
25
  sonarjs,
17
- react,
18
26
  'react-hooks': reactHooks,
19
27
  },
20
-
21
28
  languageOptions: {
22
29
  sourceType: 'module',
23
30
 
@@ -31,6 +38,7 @@ export default [
31
38
  'no-void': 'off',
32
39
  'react/display-name': 'off',
33
40
  'react-hooks/exhaustive-deps': 'error',
41
+ ...reactHooks.configs.recommended.rules,
34
42
  },
35
43
  },
36
44
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "0.67.0",
3
+ "version": "0.67.2",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -65,5 +65,5 @@
65
65
  "typescript": "^5.1.6",
66
66
  "typescript-eslint": "^8.24.0"
67
67
  },
68
- "gitHead": "fa29d195388b9162560e580b4cd125d75366027a"
68
+ "gitHead": "f42c29b074c4c31495fea789871887dcb72dd977"
69
69
  }
@@ -201,7 +201,6 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
201
201
  const selected = tab.key === currentTab?.key;
202
202
 
203
203
  const commonProps = {
204
- key: tab.key,
205
204
  className: clsx(CODE_BLOCK_WITH_TABS_CLASSNAMES.TAB, { selected }),
206
205
  'data-test': `code-block-tab-${tab.key}`,
207
206
  onClick: tab.onClick,
@@ -224,6 +223,7 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
224
223
  to={tab.to}
225
224
  rel={tab.rel}
226
225
  target={tab.target}
226
+ key={tab.key}
227
227
  >
228
228
  {children}
229
229
  </Link>
@@ -234,6 +234,7 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
234
234
  <div
235
235
  {...commonProps}
236
236
  role="button"
237
+ key={tab.key}
237
238
  >
238
239
  {children}
239
240
  </div>
@@ -27,18 +27,29 @@ export const getBashLinePrefixes = (
27
27
 
28
28
  if (bashCommandsStart.includes(i + 1)) {
29
29
  return (
30
- <CodeHighlighterLineBashPrefix $isOneLine={isOneLine} color={theme.color.lavender.base}>$</CodeHighlighterLineBashPrefix>
30
+ <CodeHighlighterLineBashPrefix
31
+ $isOneLine={isOneLine}
32
+ color={theme.color.lavender.base}
33
+ key={`code-highlighter-line-bash-prefix-${i}`}
34
+ >$</CodeHighlighterLineBashPrefix>
31
35
  );
32
36
  }
33
37
 
34
38
  if (isEmptyLine) {
35
39
  return (
36
- <CodeHighlighterLineBashPrefix $isOneLine={isOneLine}/>
40
+ <CodeHighlighterLineBashPrefix
41
+ $isOneLine={isOneLine}
42
+ key={`code-highlighter-line-bash-prefix-${i}`}
43
+ />
37
44
  );
38
45
  }
39
46
 
40
47
  return (
41
- <CodeHighlighterLineBashPrefix $isOneLine={isOneLine} color={theme.color.lavender.base}>&lt;</CodeHighlighterLineBashPrefix>
48
+ <CodeHighlighterLineBashPrefix
49
+ $isOneLine={isOneLine}
50
+ color={theme.color.lavender.base}
51
+ key={`code-highlighter-line-bash-prefix-${i}`}
52
+ >&lt;</CodeHighlighterLineBashPrefix>
42
53
  );
43
54
  });
44
55
 
@@ -49,5 +60,8 @@ export const getNumberLinePrefixes = (code: string): Record<number, ReactNode> =
49
60
  const numberOfLines = code.split('\n').length;
50
61
  const numbersArray = Array.from({ length: numberOfLines }, (_, i) => i + 1);
51
62
 
52
- return Object.fromEntries(numbersArray.map((number) => [number, <CodeHighlighterLinePrefix>{number}</CodeHighlighterLinePrefix>]));
63
+ return Object.fromEntries(numbersArray.map((number) => [
64
+ number,
65
+ <CodeHighlighterLinePrefix key={`code-highlighter-line-prefix-${number}`}>{number}</CodeHighlighterLinePrefix>,
66
+ ]));
53
67
  };