@apify/ui-library 0.61.2 → 0.62.1

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.61.2",
3
+ "version": "0.62.1",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@apify/log": "^2.5.11",
30
- "@apify/ui-icons": "^0.8.0",
30
+ "@apify/ui-icons": "^0.9.0",
31
31
  "@floating-ui/react": "^0.26.2",
32
32
  "clsx": "^2.0.0",
33
33
  "dayjs": "1.11.9",
@@ -66,5 +66,5 @@
66
66
  "typescript": "^5.1.6",
67
67
  "typescript-eslint": "^8.24.0"
68
68
  },
69
- "gitHead": "696be46bd05b9b6c07af9dcc9b213cda5c19b09e"
69
+ "gitHead": "ea30934a6190ba7c66dd9af5e0d0a8a667967a94"
70
70
  }
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
 
4
4
  import { theme } from '../design_system/theme.js';
5
- import { TextBaseComponent } from './text/text_base.js';
5
+ import { Badge } from './badge.js';
6
+ import { TextMarketing } from './text/text_marketing.js';
6
7
  import { VerticalTile } from './tile/index.js';
7
8
 
8
9
  interface ActorTemplateCardProps {
@@ -10,44 +11,16 @@ interface ActorTemplateCardProps {
10
11
  label: string;
11
12
  description: string;
12
13
  icons: React.ReactNode[];
14
+ useCases?: string[];
13
15
  }
14
16
 
15
17
  const WrapperClasses = {
16
18
  TEMPLATE_CARD_IMAGES: 'TemplateCard-Images',
17
19
  TEMPLATE_CARD_TEXT: 'TemplateCard-Text',
20
+ TEMPLATE_CARD_DESCRIPTION: 'TemplateCard-Description',
21
+ TEMPLATE_CARD_BADGES: 'TemplateCard-Badges',
18
22
  };
19
23
 
20
- const Text = styled(TextBaseComponent)`
21
- ${theme.typography.marketing.mobile.bodyM}
22
- color: ${theme.color.neutral.textMuted};
23
- overflow: hidden;
24
- text-overflow: ellipsis;
25
- display: -webkit-box;
26
- -webkit-line-clamp: 3;
27
- -webkit-box-orient: vertical;
28
-
29
- @media ${theme.layout.tablet} {
30
- ${theme.typography.marketing.tablet.bodyM}
31
- }
32
-
33
- @media ${theme.layout.desktop} {
34
- ${theme.typography.marketing.desktop.bodyM}
35
- }
36
- `;
37
-
38
- const Heading = styled(TextBaseComponent)`
39
- ${theme.typography.marketing.mobile.titleXs}
40
- color: ${theme.color.neutral.text};
41
-
42
- @media ${theme.layout.tablet} {
43
- ${theme.typography.marketing.tablet.titleXs}
44
- }
45
-
46
- @media ${theme.layout.desktop} {
47
- ${theme.typography.marketing.desktop.titleXs}
48
- }
49
- `;
50
-
51
24
  const TemplateCardContentWrapper = styled.div`
52
25
  display: flex;
53
26
  flex-direction: column;
@@ -55,11 +28,18 @@ const TemplateCardContentWrapper = styled.div`
55
28
  align-self: stretch;
56
29
  flex: 1 0 0;
57
30
  gap: ${theme.space.space16};
31
+ color: ${theme.color.neutral.text};
58
32
 
59
33
  .${WrapperClasses.TEMPLATE_CARD_IMAGES} {
60
34
  display: flex;
61
35
  align-items: flex-start;
62
36
  gap: ${theme.space.space16};
37
+ flex-wrap: wrap;
38
+ img,
39
+ svg {
40
+ max-width: ${theme.space.space40};
41
+ max-height: ${theme.space.space40};
42
+ }
63
43
  }
64
44
 
65
45
  .${WrapperClasses.TEMPLATE_CARD_TEXT} {
@@ -68,6 +48,20 @@ const TemplateCardContentWrapper = styled.div`
68
48
  align-items: flex-start;
69
49
  align-self: stretch;
70
50
  gap: ${theme.space.space4};
51
+
52
+ .${WrapperClasses.TEMPLATE_CARD_DESCRIPTION} {
53
+ color: ${theme.color.neutral.textMuted};
54
+ overflow: hidden;
55
+ text-overflow: ellipsis;
56
+ display: -webkit-box;
57
+ -webkit-line-clamp: 3;
58
+ -webkit-box-orient: vertical;
59
+ }
60
+ }
61
+
62
+ .${WrapperClasses.TEMPLATE_CARD_BADGES} {
63
+ display: flex;
64
+ gap: ${theme.space.space4};
71
65
  }
72
66
  `;
73
67
 
@@ -76,15 +70,38 @@ export const ActorTemplateCard: React.FC<ActorTemplateCardProps> = ({
76
70
  label,
77
71
  description,
78
72
  icons,
73
+ useCases,
79
74
  }) => {
80
75
  const templateCardContent = (
81
76
  <TemplateCardContentWrapper>
82
- <div className={WrapperClasses.TEMPLATE_CARD_IMAGES}>
83
- {icons}
84
- </div>
77
+ <div className={WrapperClasses.TEMPLATE_CARD_IMAGES}>{icons}</div>
85
78
  <div className={WrapperClasses.TEMPLATE_CARD_TEXT}>
86
- <Heading>{label}</Heading>
87
- <Text>{description}</Text>
79
+ <TextMarketing size="regular" weight="bold">
80
+ {label}
81
+ </TextMarketing>
82
+ <TextMarketing
83
+ size="small"
84
+ className={WrapperClasses.TEMPLATE_CARD_DESCRIPTION}
85
+ >
86
+ {description}
87
+ </TextMarketing>
88
+ </div>
89
+ <div className={WrapperClasses.TEMPLATE_CARD_BADGES}>
90
+ {useCases?.includes('STARTER') && (
91
+ <Badge variant="success">Starter</Badge>
92
+ )}
93
+ {useCases?.includes('AI') && (
94
+ <Badge
95
+ variant="success"
96
+ style={{
97
+ color: '#6E00F4',
98
+ fill: '#6E00F4',
99
+ background: '#E4D4F7',
100
+ }}
101
+ >
102
+ AI Agent
103
+ </Badge>
104
+ )}
88
105
  </div>
89
106
  </TemplateCardContentWrapper>
90
107
  );