@apify/ui-library 1.110.1-chorerewritepublishworkflowo-80feae.30 → 1.112.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": "1.110.1-chorerewritepublishworkflowo-80feae.30+4eb8cd8353c",
3
+ "version": "1.112.0",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
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/ui-icons": "^1.24.1-chorerewritepublishworkflowo-80feae.30+4eb8cd8353c",
29
+ "@apify/ui-icons": "^1.24.0",
30
30
  "@floating-ui/react": "^0.26.2",
31
31
  "@react-hook/resize-observer": "^2.0.2",
32
32
  "clsx": "^2.0.0",
@@ -64,5 +64,5 @@
64
64
  "src",
65
65
  "style"
66
66
  ],
67
- "gitHead": "4eb8cd8353c3c52c86c5317cb6629885dff9e690"
67
+ "gitHead": "bb74d410b278d8bd1d8937774292c51324e30c49"
68
68
  }
@@ -1,17 +1,20 @@
1
- import type React from 'react';
1
+ import React, { type FC } from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import { ArrowLeftIcon, ArrowRightIcon } from '@apify/ui-icons';
5
5
 
6
+ import type { RequiredBy } from '@apify-packages/types';
7
+
6
8
  import { theme } from '../design_system/theme.js';
7
- import { Box } from './box.js';
8
- import { Link, type LinkProps } from './link.js';
9
+ import { Box, type BoxProps } from './box.js';
10
+ import { Link, type LinkProps, StyledAsLink } from './link.js';
9
11
  import { Heading } from './text/index.js';
10
12
 
11
13
  const StyledGuidepost = styled(Box)<{ $isBackLink: boolean }>`
12
14
  display: inline-flex;
13
15
  align-items: center;
14
16
  color: ${theme.color.neutral.text};
17
+ cursor: pointer;
15
18
 
16
19
  svg {
17
20
  transition: transform 0.2s ease-in-out;
@@ -24,7 +27,25 @@ const StyledGuidepost = styled(Box)<{ $isBackLink: boolean }>`
24
27
  }
25
28
  `;
26
29
 
27
- export const ActionLink: React.FC<LinkProps & { contentProps?: object }> = ({
30
+ export const ActionBox: FC<RequiredBy<BoxProps, 'onClick'> & { contentProps?: object }> = ({
31
+ as = StyledAsLink,
32
+ contentProps,
33
+ children,
34
+ ...rest
35
+ }) => {
36
+ return (
37
+ <StyledGuidepost
38
+ forwardedAs={as}
39
+ $isBackLink={false}
40
+ {...rest}
41
+ >
42
+ <Heading as='span' type='titleM' {...contentProps}>{children}</Heading>
43
+ <ArrowRightIcon size="16" />
44
+ </StyledGuidepost>
45
+ );
46
+ };
47
+
48
+ export const ActionLink: FC<LinkProps & { contentProps?: object }> = ({
28
49
  children,
29
50
  as = Link,
30
51
  contentProps,
@@ -72,7 +72,7 @@ function getHref(to: To, isExternal?: boolean): string {
72
72
  return createPath(to);
73
73
  }
74
74
 
75
- const StyledLink = styled(Box)`
75
+ export const StyledAsLink = styled(Box)`
76
76
  /* Basic positioning */
77
77
  display: inline-flex;
78
78
  align-items: center;
@@ -131,7 +131,7 @@ export const Link = forwardRef<HTMLElement, LinkProps>(({
131
131
  const effectiveRel = clsx(Array.from(uniqRel));
132
132
 
133
133
  return (
134
- <StyledLink
134
+ <StyledAsLink
135
135
  // We use the InternalLink only for internal navigation
136
136
  forwardedAs={(isEmail || isExternal) ? 'a' : InternalLink}
137
137
  href={href}
@@ -143,6 +143,6 @@ export const Link = forwardRef<HTMLElement, LinkProps>(({
143
143
  >
144
144
  {children}
145
145
  {((isExternal && !hideExternalIcon) || showExternalIcon) && <ExternalLinkIcon size="16" />}
146
- </StyledLink>
146
+ </StyledAsLink>
147
147
  );
148
148
  });
@@ -8,7 +8,7 @@ import type { TextBaseProps } from './text_base.js';
8
8
  import { TextBaseComponent } from './text_base.js';
9
9
 
10
10
  export type MarketingTextSize = 'large' | 'regular' | 'small' | 'extraSmall';
11
- export type MarketingTextWeight = 'normal' | 'bold';
11
+ export type MarketingTextWeight = 'normal' | 'medium' | 'bold';
12
12
 
13
13
  export interface TransientMarketingTextProps {
14
14
  size?: MarketingTextSize,
@@ -37,6 +37,17 @@ const TEXT_MARKETING_VARIANTS_CSS: TextMarketingVariants = {
37
37
  ${theme.typography.marketing.desktop.bodyL}
38
38
  }
39
39
  `,
40
+ medium: css`
41
+ ${theme.typography.marketing.mobile.bodyLMedium}
42
+
43
+ @media (${theme.device.tablet}) {
44
+ ${theme.typography.marketing.tablet.bodyLMedium}
45
+ }
46
+
47
+ @media (${theme.device.desktop}) {
48
+ ${theme.typography.marketing.desktop.bodyLMedium}
49
+ }
50
+ `,
40
51
  bold: css`
41
52
  ${theme.typography.marketing.mobile.bodyLStrong}
42
53
 
@@ -61,6 +72,17 @@ const TEXT_MARKETING_VARIANTS_CSS: TextMarketingVariants = {
61
72
  ${theme.typography.marketing.desktop.bodyM}
62
73
  }
63
74
  `,
75
+ medium: css`
76
+ ${theme.typography.marketing.mobile.bodyMMedium}
77
+
78
+ @media (${theme.device.tablet}) {
79
+ ${theme.typography.marketing.tablet.bodyMMedium}
80
+ }
81
+
82
+ @media (${theme.device.desktop}) {
83
+ ${theme.typography.marketing.desktop.bodyMMedium}
84
+ }
85
+ `,
64
86
  bold: css`
65
87
  ${theme.typography.marketing.mobile.bodyMStrong}
66
88
 
@@ -85,6 +107,17 @@ const TEXT_MARKETING_VARIANTS_CSS: TextMarketingVariants = {
85
107
  ${theme.typography.marketing.desktop.bodyS}
86
108
  }
87
109
  `,
110
+ medium: css`
111
+ ${theme.typography.marketing.mobile.bodySMedium}
112
+
113
+ @media (${theme.device.tablet}) {
114
+ ${theme.typography.marketing.tablet.bodySMedium}
115
+ }
116
+
117
+ @media (${theme.device.desktop}) {
118
+ ${theme.typography.marketing.desktop.bodySMedium}
119
+ }
120
+ `,
88
121
  bold: css`
89
122
  ${theme.typography.marketing.mobile.bodySStrong}
90
123
 
@@ -109,6 +142,17 @@ const TEXT_MARKETING_VARIANTS_CSS: TextMarketingVariants = {
109
142
  ${theme.typography.marketing.desktop.bodyXs}
110
143
  }
111
144
  `,
145
+ medium: css`
146
+ ${theme.typography.marketing.mobile.bodyXsMedium}
147
+
148
+ @media (${theme.device.tablet}) {
149
+ ${theme.typography.marketing.tablet.bodyXsMedium}
150
+ }
151
+
152
+ @media (${theme.device.desktop}) {
153
+ ${theme.typography.marketing.desktop.bodyXsMedium}
154
+ }
155
+ `,
112
156
  bold: css`
113
157
  ${theme.typography.marketing.mobile.bodyXsStrong}
114
158