@apify/ui-library 0.63.2-featcodeblockwithtabs-5a4360.38 → 0.64.1-featcodeblockwithtabs-5a4360.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "0.63.2-featcodeblockwithtabs-5a4360.38+7660e9dd669",
3
+ "version": "0.64.1-featcodeblockwithtabs-5a4360.30+e5db735eb87",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,7 +26,6 @@
26
26
  "It's not nice, but helps us to get around the problem of multiple react instances."
27
27
  ],
28
28
  "dependencies": {
29
- "@apify/log": "^2.5.11",
30
29
  "@apify/ui-icons": "^0.9.0",
31
30
  "@floating-ui/react": "^0.26.2",
32
31
  "clsx": "^2.0.0",
@@ -66,5 +65,5 @@
66
65
  "typescript": "^5.1.6",
67
66
  "typescript-eslint": "^8.24.0"
68
67
  },
69
- "gitHead": "7660e9dd669289ecd48e71c385b1ebc013b8b80f"
68
+ "gitHead": "e5db735eb871d1296037d5e73adae45604b3c4d8"
70
69
  }
@@ -95,12 +95,36 @@ const CodeBlockWithTabsWrapper = styled(Box)`
95
95
  border-bottom: none;
96
96
  border-top-right-radius: ${theme.radius.radius12};
97
97
  border-top-left-radius: ${theme.radius.radius12};
98
+ position: relative;
99
+
100
+ & > [role="tabpanel"] {
101
+ position: sticky;
102
+ right: 0;
103
+ top: 0;
104
+ height: 100%;
105
+ width: 0;
106
+
107
+ &::after {
108
+ right: -${theme.space.space8};
109
+ height: 100%;
110
+ width: ${theme.space.space16};
111
+ background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${theme.color.neutral.backgroundSubtle} 100%);
112
+ content: ' ';
113
+ pointer-events: none;
114
+ position: absolute;
115
+ }
116
+ }
98
117
 
99
118
  @media ${theme.device.tablet} {
100
119
  height: 88px;
101
120
  justify-content: center;
102
121
  gap: ${theme.space.space24};
103
122
  padding-inline: ${theme.space.space24};
123
+
124
+ & > [role="tabpanel"]::after {
125
+ right: -${theme.space.space24};
126
+ width: ${theme.space.space32};
127
+ }
104
128
  }
105
129
  }
106
130
 
@@ -210,6 +234,8 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
210
234
  </div>
211
235
  );
212
236
  })}
237
+
238
+ <div role="tabpanel" />
213
239
  </div>
214
240
  <CodeBlock
215
241
  bashCommandsStart={currentTab?.bashCommandsStart}
@@ -3,8 +3,6 @@ import { FastAverageColor } from 'fast-average-color';
3
3
  import type { RefCallback } from 'react';
4
4
  import { useCallback, useState } from 'react';
5
5
 
6
- import log from '@apify/log';
7
-
8
6
  // Uses Luma (Y component of YIQ) computed from RGB to determine whether the color is dark.
9
7
  // See https://en.wikipedia.org/wiki/YIQ
10
8
  const isDark = (rgb: number[]): boolean => {
@@ -33,7 +31,7 @@ export const useImageColor = () => {
33
31
  try {
34
32
  setColor(patchDarknessInfo(await fac.getColorAsync(element)));
35
33
  } catch (error) {
36
- log.error('Failed to determine the image color.', { error });
34
+ console.error('Failed to determine the image color.', { error });
37
35
  }
38
36
  };
39
37