@apify/ui-library 0.65.3 → 0.66.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "0.65.3",
3
+ "version": "0.66.0",
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": "d28107308e89cc139489334a352f51de1ce3ff8f"
68
+ "gitHead": "ac1f72d38faae0236e5cd402f18808c1f147fc34"
69
69
  }
@@ -24,18 +24,19 @@ const StyledGuidepost = styled(Box)<{ $isBackLink: boolean }>`
24
24
  }
25
25
  `;
26
26
 
27
- export const ActionLink: React.FC<LinkProps> = ({
27
+ export const ActionLink: React.FC<LinkProps & { contentProps?: object }> = ({
28
28
  children,
29
- as,
29
+ as = Link,
30
+ contentProps,
30
31
  ...rest
31
32
  }) => {
32
33
  return (
33
34
  <StyledGuidepost
34
- forwardedAs={as || Link}
35
+ forwardedAs={as}
35
36
  $isBackLink={false}
36
37
  {...rest}
37
38
  >
38
- <Heading as='span' type='titleM'>{children}</Heading>
39
+ <Heading as='span' type='titleM' {...contentProps}>{children}</Heading>
39
40
  <ArrowRightIcon size="16" />
40
41
  </StyledGuidepost>
41
42
  );
@@ -1,5 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
 
3
+ import type { ImageProxyOptions } from '../ui_dependency_provider.js';
3
4
  import { useSharedUiDependencies } from '../ui_dependency_provider.js';
4
5
  import { Box, type BoxProps } from './box.js';
5
6
 
@@ -9,7 +10,7 @@ type ImageProps = {
9
10
  width?: number,
10
11
  height?: number,
11
12
  loading?: 'eager' | 'lazy' | undefined;
12
- }
13
+ } & ImageProxyOptions
13
14
 
14
15
  export const Image = forwardRef<HTMLImageElement, ImageProps & Omit<BoxProps, 'as'>>((props, ref) => {
15
16
  const { InternalImage } = useSharedUiDependencies();
@@ -10,6 +10,14 @@ export interface AgnosticInternalLinkProps extends Omit<React.AnchorHTMLAttribut
10
10
  href: string;
11
11
  }
12
12
 
13
+ export type ImageProxyOptions = {
14
+ extension?: string,
15
+ resize?: {
16
+ width?: number,
17
+ height?: number,
18
+ }
19
+ }
20
+
13
21
  export interface UiDependencies {
14
22
  InternalLink: React.ForwardRefExoticComponent<AgnosticInternalLinkProps & React.RefAttributes<HTMLAnchorElement>>,
15
23
  InternalImage: React.ForwardRefExoticComponent<React.RefAttributes<HTMLImageElement>>,
@@ -22,7 +30,7 @@ export interface UiDependencies {
22
30
  isHrefTrusted: (href: string) => boolean,
23
31
  uiTheme?: UiThemeOption, // Optional - as we can just fallback to light theme on the web
24
32
  // TODO: Make required once we add it on the web
25
- generateProxyImageUrl?: (url: string, options: { extension?: string, resize?: { width?: number, height?: number } }) => string
33
+ generateProxyImageUrl?: (url: string, options: ImageProxyOptions) => string
26
34
  }
27
35
 
28
36
  interface UiDependencyProviderProps {