@apify/ui-library 1.127.4 → 1.127.6

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.
Files changed (30) hide show
  1. package/dist/src/components/chip.d.ts +1 -0
  2. package/dist/src/components/chip.d.ts.map +1 -1
  3. package/dist/src/components/chip.js +1 -0
  4. package/dist/src/components/chip.js.map +1 -1
  5. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts +4 -1
  6. package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
  7. package/dist/src/components/code/code_block/code_block_with_tabs.js +8 -5
  8. package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
  9. package/dist/src/components/text/heading_content.d.ts +3 -0
  10. package/dist/src/components/text/heading_content.d.ts.map +1 -1
  11. package/dist/src/components/text/heading_content.js +3 -0
  12. package/dist/src/components/text/heading_content.js.map +1 -1
  13. package/dist/src/components/text/text_content.d.ts +3 -0
  14. package/dist/src/components/text/text_content.d.ts.map +1 -1
  15. package/dist/src/components/text/text_content.js +3 -0
  16. package/dist/src/components/text/text_content.js.map +1 -1
  17. package/dist/src/components/to_consolidate/markdown.d.ts +3 -0
  18. package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -1
  19. package/dist/src/components/to_consolidate/markdown.js +3 -0
  20. package/dist/src/components/to_consolidate/markdown.js.map +1 -1
  21. package/dist/tsconfig.build.tsbuildinfo +1 -1
  22. package/package.json +3 -3
  23. package/src/components/chip.tsx +1 -0
  24. package/src/components/code/code_block/code_block_with_tabs.tsx +13 -6
  25. package/src/components/text/heading_content.stories.tsx +1 -0
  26. package/src/components/text/heading_content.tsx +3 -0
  27. package/src/components/text/text_content.stories.tsx +1 -0
  28. package/src/components/text/text_content.tsx +3 -0
  29. package/src/components/to_consolidate/markdown.stories.tsx +1 -0
  30. package/src/components/to_consolidate/markdown.tsx +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.127.4",
3
+ "version": "1.127.6",
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
  "It's not nice, but helps us to get around the problem of multiple react instances."
28
28
  ],
29
29
  "dependencies": {
30
- "@apify/ui-icons": "^1.29.1",
30
+ "@apify/ui-icons": "^1.29.2",
31
31
  "@floating-ui/react": "^0.26.2",
32
32
  "@radix-ui/react-checkbox": "^1.3.3",
33
33
  "@react-hook/resize-observer": "^2.0.2",
@@ -67,5 +67,5 @@
67
67
  "src",
68
68
  "style"
69
69
  ],
70
- "gitHead": "63e5464863de833c981f4cca2369aea22b735b53"
70
+ "gitHead": "0fae65b571f8b1e6feedc7201a9b635e8e9212b4"
71
71
  }
@@ -104,6 +104,7 @@ export type ChipProps = RegularBoxProps & {
104
104
 
105
105
  /**
106
106
  * Component for displaying status and for labelling other components.
107
+ * @deprecated Use Tag or Badge
107
108
  */
108
109
  export const Chip = forwardRef(({
109
110
  type = CHIP_TYPES.DEFAULT,
@@ -3,6 +3,8 @@ import _ from 'lodash';
3
3
  import type React from 'react';
4
4
  import styled from 'styled-components';
5
5
 
6
+ import { CodeIcon, HttpIcon, type IconComponent, McpIcon } from '@apify/ui-icons';
7
+
6
8
  import { theme } from '../../../design_system/theme.js';
7
9
  import { useSharedUiDependencies } from '../../../ui_dependency_provider.js';
8
10
  import { Box, type MarginSpacingProps, type RegularBoxProps } from '../../box.js';
@@ -14,19 +16,21 @@ export type CodeBlockTabKey = 'cli' | 'http' | 'javascript' | 'mcp' | 'openapi'
14
16
  type CodeBlockTabConfig = {
15
17
  label: string;
16
18
  language: string;
17
- src: string;
19
+ Icon?: IconComponent;
20
+ /** Fallback image URL for tabs that don't have an Icon component yet */
21
+ src?: string;
18
22
  };
19
23
 
20
24
  export const CODE_BLOCK_TAB_CATALOG: Record<CodeBlockTabKey, CodeBlockTabConfig> = {
21
25
  cli: {
22
26
  label: 'CLI',
23
27
  language: 'bash',
24
- src: 'https://apify.com/img/icons/code.svg',
28
+ Icon: CodeIcon,
25
29
  },
26
30
  http: {
27
31
  label: 'HTTP',
28
32
  language: 'bash',
29
- src: 'https://apify.com/img/icons/http.svg',
33
+ Icon: HttpIcon,
30
34
  },
31
35
  javascript: {
32
36
  label: 'JavaScript',
@@ -37,7 +41,7 @@ export const CODE_BLOCK_TAB_CATALOG: Record<CodeBlockTabKey, CodeBlockTabConfig>
37
41
  mcp: {
38
42
  label: 'MCP',
39
43
  language: 'bash',
40
- src: 'https://apify.com/img/icons/mcp.svg',
44
+ Icon: McpIcon,
41
45
  },
42
46
  openapi: {
43
47
  label: 'OpenAPI',
@@ -201,7 +205,7 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
201
205
  <CodeBlockWithTabsWrapper className={clsx(CODE_BLOCK_WITH_TABS_CLASSNAMES.WRAPPER, className)} {...props}>
202
206
  <div className={CODE_BLOCK_WITH_TABS_CLASSNAMES.TABS}>
203
207
  {tabs.map((tab) => {
204
- const { label, src } = CODE_BLOCK_TAB_CATALOG[tab.key];
208
+ const { label, src, Icon } = CODE_BLOCK_TAB_CATALOG[tab.key];
205
209
  const selected = (optimisticCurrentTabKey ?? currentTabKey) === tab.key;
206
210
 
207
211
  const commonProps = {
@@ -211,7 +215,10 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
211
215
  };
212
216
  const children = (
213
217
  <>
214
- <img src={generateProxyImageUrl?.(src, { resize: IMG_RESIZE }) ?? src} alt={label} />
218
+ {Icon
219
+ ? <Icon size="20" />
220
+ : <img src={src && (generateProxyImageUrl?.(src, { resize: IMG_RESIZE }) ?? src)} alt={label} />
221
+ }
215
222
  <HeadingShared type="titleS" as="p">
216
223
  {label}
217
224
  </HeadingShared>
@@ -6,6 +6,7 @@ import { HeadingContent, type HeadingContentProps } from './heading_content.js';
6
6
  export default {
7
7
  title: 'Design Tokens/Typography/HeadingContent',
8
8
  component: HeadingContent,
9
+ tags: ['deprecated'],
9
10
  parameters: {
10
11
  docs: {
11
12
  description: {
@@ -40,6 +40,9 @@ const StyledHeadingContent = styled(TextBaseComponent)<StyledHeadingContentProps
40
40
  ${(props) => getContentHeadingStyles(props.$type || 'heading1')}
41
41
  `;
42
42
 
43
+ /**
44
+ * @deprecated Use Heading or HeadingMarketing from ui-library
45
+ */
43
46
  export const HeadingContent: React.FC<HeadingContentProps> = ({
44
47
  type,
45
48
  as,
@@ -6,6 +6,7 @@ import { type ContentTextProps, TextContent } from './text_content.js';
6
6
  export default {
7
7
  title: 'Design Tokens/Typography/TextContent',
8
8
  component: TextContent,
9
+ tags: ['deprecated'],
9
10
  parameters: {
10
11
  docs: {
11
12
  description: {
@@ -79,6 +79,9 @@ const StyledTextContent = styled(TextBaseComponent)<StyledContentTextProps>`
79
79
  ${(props) => TEXT_SHARED_VARIANTS_CSS[props.$type || 'paragraph'][props.$weight || 'normal']}
80
80
  `;
81
81
 
82
+ /**
83
+ * @deprecated Use Text or TextMarketing from ui-library
84
+ */
82
85
  export const TextContent = forwardRef<HTMLElement | undefined, ContentTextProps>(({
83
86
  type,
84
87
  weight,
@@ -5,6 +5,7 @@ import { Markdown, type MarkdownProps } from './markdown.js';
5
5
  export default {
6
6
  title: 'UI-Library/Markdown/Markdown',
7
7
  component: Markdown,
8
+ tags: ['deprecated'],
8
9
  argTypes: {
9
10
  markdown: {
10
11
  control: 'text',
@@ -642,4 +642,7 @@ const Markdown = ({
642
642
  };
643
643
 
644
644
  const MemoizedMarkdown = React.memo(Markdown, (prevProps, nextProps) => _.isEqual(prevProps, nextProps));
645
+ /**
646
+ * @deprecated Use SimpleMarkdown from ui-library
647
+ */
645
648
  export { MemoizedMarkdown as Markdown };