@apify/ui-library 0.68.1-feattabs-4feb6d.95 → 0.68.1-feattabs-4feb6d.112
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/tabs/tab.d.ts.map +1 -1
- package/dist/src/components/tabs/tab.js +1 -1
- package/dist/src/components/tabs/tab.js.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.js +2 -1
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/components/tabs/tab.tsx +1 -0
- package/src/components/tabs/tabs.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "0.68.1-feattabs-4feb6d.
|
|
3
|
+
"version": "0.68.1-feattabs-4feb6d.112+7719fefdfd4",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apify/ui-icons": "^0.10.0",
|
|
30
30
|
"@floating-ui/react": "^0.26.2",
|
|
31
|
+
"@juggle/resize-observer": "^3.4.0",
|
|
31
32
|
"@react-hook/resize-observer": "^2.0.2",
|
|
32
33
|
"clsx": "^2.0.0",
|
|
33
34
|
"dayjs": "1.11.9",
|
|
@@ -66,5 +67,5 @@
|
|
|
66
67
|
"typescript": "^5.1.6",
|
|
67
68
|
"typescript-eslint": "^8.24.0"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "7719fefdfd47a748e36ef561734584b7d38b7fdf"
|
|
70
71
|
}
|
|
@@ -189,6 +189,7 @@ export const Tab = ({ variant = 'default', id, to, Icon, title, chip, rollout, c
|
|
|
189
189
|
to={to}
|
|
190
190
|
role="tab"
|
|
191
191
|
data-test="tab"
|
|
192
|
+
data-test-url={href}
|
|
192
193
|
className={clsx(className, { active, disabled })}
|
|
193
194
|
onClick={onSelect ? (event) => onSelect({ id, href, event }) : undefined}
|
|
194
195
|
$variant={variant}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResizeObserver } from '@juggle/resize-observer';
|
|
1
2
|
import useResizeObserver from '@react-hook/resize-observer';
|
|
2
3
|
import React, { useCallback, useRef, useState } from 'react';
|
|
3
4
|
import type { FlattenSimpleInterpolation } from 'styled-components';
|
|
@@ -146,7 +147,7 @@ export const Tabs = ({ variant = 'default', tabs, activeTab, onSelect, ...props
|
|
|
146
147
|
const ref = useRef<HTMLDivElement>(null);
|
|
147
148
|
const [overflowState, setOveflowState] = useState<TabOverflowState>();
|
|
148
149
|
|
|
149
|
-
useResizeObserver(ref, (entry) => setOveflowState(isTabsOverflowing(entry.target as HTMLDivElement)));
|
|
150
|
+
useResizeObserver(ref, (entry) => setOveflowState(isTabsOverflowing(entry.target as HTMLDivElement)), { polyfill: ResizeObserver });
|
|
150
151
|
const scrollHandler = useCallback((event: React.SyntheticEvent<HTMLDivElement>) => {
|
|
151
152
|
setOveflowState(isTabsOverflowing(event.currentTarget as HTMLDivElement));
|
|
152
153
|
}, []);
|