@apify/ui-library 0.68.1-feattabs-4feb6d.72 → 0.68.1-feattabs-4feb6d.94
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 +1 -0
- package/dist/src/components/tabs/tab.d.ts.map +1 -1
- package/dist/src/components/tabs/tab.js.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +2 -1
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.js +8 -0
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/tabs/tab.tsx +1 -0
- package/src/components/tabs/tabs.tsx +12 -3
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.94+0bf4ae961f9",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"typescript": "^5.1.6",
|
|
67
67
|
"typescript-eslint": "^8.24.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "0bf4ae961f9aee815b791932332847b9864bffd7"
|
|
70
70
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import useResizeObserver from '@react-hook/resize-observer';
|
|
2
|
-
import {
|
|
2
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
3
3
|
import type { FlattenSimpleInterpolation } from 'styled-components';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
|
|
@@ -7,7 +7,8 @@ import { theme } from '../../design_system/theme.js';
|
|
|
7
7
|
import type { WithTransientProps } from '../../type_utils.js';
|
|
8
8
|
import type { MarginSpacingProps, RegularBoxProps } from '../box.js';
|
|
9
9
|
import { Box } from '../box.js';
|
|
10
|
-
import {
|
|
10
|
+
import type { TabData, TabVariant } from './tab.js';
|
|
11
|
+
import { Tab } from './tab.js';
|
|
11
12
|
|
|
12
13
|
type SharedTabsProps = Omit<RegularBoxProps, 'as' | 'onClick'> & MarginSpacingProps;
|
|
13
14
|
type TabsProps = SharedTabsProps & {
|
|
@@ -56,7 +57,7 @@ const tabsVariantStyle = {
|
|
|
56
57
|
} satisfies Record<TabVariant, FlattenSimpleInterpolation>;
|
|
57
58
|
|
|
58
59
|
type TabsWrapperProps = WithTransientProps<Required<Pick<TabsProps, 'variant'>>> & {
|
|
59
|
-
role?: AriaRole;
|
|
60
|
+
role?: React.AriaRole;
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
const TabsWrapper = styled(Box)<TabsWrapperProps>`
|
|
@@ -70,6 +71,14 @@ const TabsWrapper = styled(Box)<TabsWrapperProps>`
|
|
|
70
71
|
flex-grow: 1;
|
|
71
72
|
overflow-x: auto;
|
|
72
73
|
${({ $variant }) => tabsVariantStyle[$variant]};
|
|
74
|
+
|
|
75
|
+
/* Scrollbar */
|
|
76
|
+
-ms-overflow-style: none;
|
|
77
|
+
scrollbar-width: none;
|
|
78
|
+
|
|
79
|
+
&::-webkit-scrollbar {
|
|
80
|
+
display: none; /* Chrome, Safari, Opera */
|
|
81
|
+
}
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
& > [role="cell"] {
|