@apify/ui-library 1.83.1-fixactorissuescomponentsoncl-2f1509.30 → 1.83.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/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js +2 -3
- package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.js +13 -15
- package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/code/code_block/code_block_with_tabs.tsx +4 -3
- package/src/components/simple_markdown/simple_markdown.tsx +13 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "1.83.1
|
|
3
|
+
"version": "1.83.1",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"src",
|
|
70
70
|
"style"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "6606ceabaff32097eb6ae5dfabc812f5d8a0b747"
|
|
73
73
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
import _ from 'lodash';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import styled from 'styled-components';
|
|
5
4
|
|
|
@@ -207,7 +206,7 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
|
|
|
207
206
|
const commonProps = {
|
|
208
207
|
className: clsx(CODE_BLOCK_WITH_TABS_CLASSNAMES.TAB, { selected }),
|
|
209
208
|
'data-test': `code-block-tab-${tab.key}`,
|
|
210
|
-
|
|
209
|
+
onClick: tab.onClick,
|
|
211
210
|
};
|
|
212
211
|
const children = (
|
|
213
212
|
<>
|
|
@@ -224,8 +223,10 @@ export const CodeBlockWithTabs = ({ className, codeBlockProps, currentTabKey, ta
|
|
|
224
223
|
return (
|
|
225
224
|
<Link
|
|
226
225
|
{...commonProps}
|
|
227
|
-
key={tab.key}
|
|
228
226
|
to={tab.to}
|
|
227
|
+
rel={tab.rel}
|
|
228
|
+
target={tab.target}
|
|
229
|
+
key={tab.key}
|
|
229
230
|
>
|
|
230
231
|
{children}
|
|
231
232
|
</Link>
|
|
@@ -15,9 +15,7 @@ import { useSharedUiDependencies } from '../../ui_dependency_provider.js';
|
|
|
15
15
|
import { Box } from '../box.js';
|
|
16
16
|
import { isUrlExternal } from '../link.js';
|
|
17
17
|
import { cleanMarkdown } from '../readme_renderer/utils.js';
|
|
18
|
-
import { HeadingContent } from '../text/
|
|
19
|
-
import { Heading, Text } from '../text/index.js';
|
|
20
|
-
import { TextContent } from '../text/text_content.js';
|
|
18
|
+
import { Heading, HeadingContent, Text, TextContent } from '../text/index.js';
|
|
21
19
|
import {
|
|
22
20
|
MarkdownBlockQuote,
|
|
23
21
|
MarkdownCode,
|
|
@@ -112,12 +110,12 @@ export const defaultRemarkPlugins = [remarkGfm];
|
|
|
112
110
|
|
|
113
111
|
// TODO: Add Image component
|
|
114
112
|
const regularMarkdownSizeComponents: Components = {
|
|
115
|
-
h1: ({ children }) => <HeadingContent
|
|
116
|
-
h2: ({ children }) => <HeadingContent
|
|
117
|
-
h3: ({ children }) => <HeadingContent
|
|
118
|
-
h4: ({ children }) => <HeadingContent
|
|
119
|
-
h5: ({ children }) => <HeadingContent
|
|
120
|
-
h6: ({ children }) => <HeadingContent
|
|
113
|
+
h1: ({ children }) => <HeadingContent mb='space16' type='heading1'>{children}</HeadingContent>,
|
|
114
|
+
h2: ({ children }) => <HeadingContent mb='space16' type='heading2'>{children}</HeadingContent>,
|
|
115
|
+
h3: ({ children }) => <HeadingContent mb='space16' type='heading3'>{children}</HeadingContent>,
|
|
116
|
+
h4: ({ children }) => <HeadingContent mb='space16' type='heading4'>{children}</HeadingContent>,
|
|
117
|
+
h5: ({ children }) => <HeadingContent mb='space16' type='heading5'>{children}</HeadingContent>,
|
|
118
|
+
h6: ({ children }) => <HeadingContent mb='space16' type='heading6'>{children}</HeadingContent>,
|
|
121
119
|
p: ({ children }) => (<TextContent my='space16'>{children}</TextContent>),
|
|
122
120
|
strong: ({ children }) => <TextContent as='strong' weight='bold'>{children}</TextContent>,
|
|
123
121
|
b: ({ children }) => <TextContent as='b' weight='bold'>{children}</TextContent>,
|
|
@@ -132,12 +130,12 @@ const regularMarkdownSizeComponents: Components = {
|
|
|
132
130
|
};
|
|
133
131
|
|
|
134
132
|
const smallMarkdownSizeComponents: Components = {
|
|
135
|
-
h1: ({ children }) => <Heading
|
|
136
|
-
h2: ({ children }) => <Heading
|
|
137
|
-
h3: ({ children }) => <Heading
|
|
138
|
-
h4: ({ children }) => <Heading
|
|
139
|
-
h5: ({ children }) => <Heading
|
|
140
|
-
h6: ({ children }) => <Heading
|
|
133
|
+
h1: ({ children }) => <Heading mb='space16' type='title2xl'>{children}</Heading>,
|
|
134
|
+
h2: ({ children }) => <Heading mb='space16' type='titleXl'>{children}</Heading>,
|
|
135
|
+
h3: ({ children }) => <Heading mb='space16' type='titleL'>{children}</Heading>,
|
|
136
|
+
h4: ({ children }) => <Heading mb='space16' type='titleM'>{children}</Heading>,
|
|
137
|
+
h5: ({ children }) => <Heading mb='space16' type='titleS'>{children}</Heading>,
|
|
138
|
+
h6: ({ children }) => <Heading mb='space16' type='titleXs'>{children}</Heading>,
|
|
141
139
|
p: ({ children }) => (<Text my='space16'>{children}</Text>),
|
|
142
140
|
strong: ({ children }) => <Text as='strong' weight='bold'>{children}</Text>,
|
|
143
141
|
b: ({ children }) => <Text as='b' weight='bold'>{children}</Text>,
|