@apify/ui-library 0.72.1-fixa11yaudit-b2e9ed.6 → 0.72.2
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/CHANGELOG.md +19 -0
- package/dist/src/components/button.d.ts.map +1 -1
- package/dist/src/components/button.js +0 -1
- package/dist/src/components/button.js.map +1 -1
- package/dist/src/components/code/action_button.js +1 -1
- package/dist/src/components/code/action_button.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js +2 -2
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/tabs/tabs.js +2 -2
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/button.tsx +0 -1
- package/src/components/code/action_button.tsx +1 -1
- package/src/components/code/prism_highlighter.tsx +6 -7
- package/src/components/tabs/tabs.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.2",
|
|
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": "^0.
|
|
29
|
+
"@apify/ui-icons": "^0.12.0",
|
|
30
30
|
"@floating-ui/react": "^0.26.2",
|
|
31
31
|
"@react-hook/resize-observer": "^2.0.2",
|
|
32
32
|
"clsx": "^2.0.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"typescript": "^5.1.6",
|
|
67
67
|
"typescript-eslint": "^8.24.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "de690dce31fd00c6237dca84f570309e96faaef3"
|
|
70
70
|
}
|
|
@@ -266,7 +266,6 @@ export const Button = forwardRef<HTMLElement, ButtonProps | AnchorButtonProps>((
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
const iconSize = size === 'medium' ? '16' : '12';
|
|
269
|
-
console.log('variant', variant);
|
|
270
269
|
|
|
271
270
|
if (isAnchorButton(props)) {
|
|
272
271
|
const isExternal = isUrlExternal(props.to, windowLocationHost);
|
|
@@ -89,7 +89,7 @@ interface CopyButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
89
89
|
export const CopyButton = ({ code, ...props }: CopyButtonProps) => {
|
|
90
90
|
const [isCopied, handleClick] = useCopyToClipboard({ text: code });
|
|
91
91
|
return (
|
|
92
|
-
<ActionButton onClick={handleClick} data-test='copy_to_clipboard'
|
|
92
|
+
<ActionButton onClick={handleClick} data-test='copy_to_clipboard' {...props}>
|
|
93
93
|
{isCopied ? <CheckIcon size="16" /> : <CopyIcon size="16" />}
|
|
94
94
|
</ActionButton>
|
|
95
95
|
);
|
|
@@ -46,12 +46,12 @@ const loadLanguages = async () => {
|
|
|
46
46
|
|
|
47
47
|
void loadLanguages();
|
|
48
48
|
|
|
49
|
-
type
|
|
49
|
+
type StyledPreProps = {
|
|
50
50
|
$hasLinePrefixes: boolean,
|
|
51
51
|
$isSingleLine: boolean
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
const
|
|
54
|
+
const StyledPre = styled.pre<StyledPreProps>`
|
|
55
55
|
width: 100%;
|
|
56
56
|
position: relative;
|
|
57
57
|
overflow: auto;
|
|
@@ -93,10 +93,10 @@ const PreWrapper = styled.pre<PreWrapperProps>`
|
|
|
93
93
|
}
|
|
94
94
|
`}
|
|
95
95
|
|
|
96
|
-
${({ $isSingleLine }) => ($isSingleLine ? css<
|
|
96
|
+
${({ $isSingleLine }) => ($isSingleLine ? css<StyledPreProps>`
|
|
97
97
|
white-space: nowrap;
|
|
98
98
|
vertical-align: text-top;
|
|
99
|
-
` : css<
|
|
99
|
+
` : css<StyledPreProps>`
|
|
100
100
|
padding-left: ${({ $hasLinePrefixes }) => ($hasLinePrefixes ? theme.space.space8 : theme.space.space16)};
|
|
101
101
|
padding-right: ${theme.space.space16};
|
|
102
102
|
|
|
@@ -153,8 +153,7 @@ export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlight
|
|
|
153
153
|
{...rest}
|
|
154
154
|
>
|
|
155
155
|
{({ className: prismClassName, tokens, getLineProps, getTokenProps }) => (
|
|
156
|
-
<
|
|
157
|
-
tabIndex={0}
|
|
156
|
+
<StyledPre
|
|
158
157
|
className={clsx(className, prismClassName)}
|
|
159
158
|
$hasLinePrefixes={hasLinePrefixes}
|
|
160
159
|
$isSingleLine={isSingleLine}
|
|
@@ -174,7 +173,7 @@ export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlight
|
|
|
174
173
|
</div>
|
|
175
174
|
))}
|
|
176
175
|
</Text>
|
|
177
|
-
</
|
|
176
|
+
</StyledPre>
|
|
178
177
|
)}
|
|
179
178
|
</Highlight>
|
|
180
179
|
);
|
|
@@ -66,7 +66,7 @@ const TabsWrapper = styled(Box)<TabsWrapperProps>`
|
|
|
66
66
|
display: flex;
|
|
67
67
|
position: relative;
|
|
68
68
|
|
|
69
|
-
[role='
|
|
69
|
+
[role='tabpanel'] {
|
|
70
70
|
min-width: 0;
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-grow: 1;
|
|
@@ -152,9 +152,9 @@ export const Tabs = ({ variant = 'default', tabs, activeTab, onSelect, ...props
|
|
|
152
152
|
setOveflowState(isTabsOverflowing(event.currentTarget as HTMLDivElement));
|
|
153
153
|
}, []);
|
|
154
154
|
|
|
155
|
-
return <TabsWrapper {...props} data-test="tabs-wrapper" $variant={variant}>
|
|
155
|
+
return <TabsWrapper {...props} role="tablist" data-test="tabs-wrapper" $variant={variant}>
|
|
156
156
|
<div role="cell" aria-hidden={!overflowState?.left} />
|
|
157
|
-
<div ref={ref} role="
|
|
157
|
+
<div ref={ref} role="tabpanel" onScroll={scrollHandler}>
|
|
158
158
|
{tabs.map((tab) => (
|
|
159
159
|
<Tab
|
|
160
160
|
{...tab}
|