@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "0.72.1-fixa11yaudit-b2e9ed.6+f7343ecc27c",
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.11.1",
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": "f7343ecc27c649336f6dac03889401c64c9143bf"
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' aria-label="Copy to clipboard" {...props}>
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 PreWrapperProps = {
49
+ type StyledPreProps = {
50
50
  $hasLinePrefixes: boolean,
51
51
  $isSingleLine: boolean
52
52
  };
53
53
 
54
- const PreWrapper = styled.pre<PreWrapperProps>`
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<PreWrapperProps>`
96
+ ${({ $isSingleLine }) => ($isSingleLine ? css<StyledPreProps>`
97
97
  white-space: nowrap;
98
98
  vertical-align: text-top;
99
- ` : css<PreWrapperProps>`
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
- <PreWrapper
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
- </PreWrapper>
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='tablist'] {
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="tablist" onScroll={scrollHandler}>
157
+ <div ref={ref} role="tabpanel" onScroll={scrollHandler}>
158
158
  {tabs.map((tab) => (
159
159
  <Tab
160
160
  {...tab}