@apify/ui-library 1.156.15 → 1.157.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/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +19 -0
- package/dist/components/floating/menu_components.js +2 -2
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.js +19 -1
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/src/components/floating/menu_components.js +2 -2
- package/dist/src/components/floating/menu_components.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/breadcrumb/breadcrumb.tsx +19 -1
- package/src/components/floating/menu_components.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.157.1",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"styled-components": "^6.1.19"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@apify-packages/types": "^3.
|
|
78
|
+
"@apify-packages/types": "^3.406.1",
|
|
79
79
|
"@storybook/react-vite": "^10.3.5",
|
|
80
80
|
"@testing-library/react": "^16.3.2",
|
|
81
81
|
"@types/hast": "^3.0.4",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"src",
|
|
96
96
|
"style"
|
|
97
97
|
],
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "620ceb2f2c491291e5c77f187fbc1a4fef001146"
|
|
99
99
|
}
|
|
@@ -26,6 +26,24 @@ const StyledBreadcrumbLink = styled(Link)`
|
|
|
26
26
|
border-radius: ${theme.radius.radius6};
|
|
27
27
|
color: ${theme.color.neutral.textSubtle};
|
|
28
28
|
|
|
29
|
+
/* Reserve the bolder hover width via a hidden ::after copy of the label on the same span, so it
|
|
30
|
+
inherits identical font-size/line-height and (with height: 0) adds no height — hovering changes
|
|
31
|
+
the weight without widening the label or shifting the rest of the row. */
|
|
32
|
+
> span {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
/* Center the label within its reserved (bold) width so it grows symmetrically on hover. */
|
|
35
|
+
text-align: center;
|
|
36
|
+
|
|
37
|
+
&::after {
|
|
38
|
+
content: attr(data-label);
|
|
39
|
+
display: block;
|
|
40
|
+
height: 0;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
visibility: hidden;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
29
47
|
&:hover {
|
|
30
48
|
color: ${theme.color.neutral.textMuted};
|
|
31
49
|
span {
|
|
@@ -70,7 +88,7 @@ export const Breadcrumbs: React.FC<BreadcrumbsProps> = ({ items, className }) =>
|
|
|
70
88
|
<span className={clsx(breadcrumbClassNames.ITEM, isActive && breadcrumbClassNames.ITEM_ACTIVE)}>
|
|
71
89
|
{!isActive && item.url ? (
|
|
72
90
|
<StyledBreadcrumbLink to={item.url}>
|
|
73
|
-
<Text as="span" size="small" weight="normal">
|
|
91
|
+
<Text as="span" size="small" weight="normal" data-label={item.label}>
|
|
74
92
|
{item.label}
|
|
75
93
|
</Text>
|
|
76
94
|
</StyledBreadcrumbLink>
|
|
@@ -119,7 +119,7 @@ type DropdownMenuBaseComponentWithCountProps = {
|
|
|
119
119
|
*/
|
|
120
120
|
export const DropdownMenuBaseComponentWithCount = forwardRef<HTMLElement, DropdownMenuBaseComponentWithCountProps>(
|
|
121
121
|
({ children, onClear, selectedCount, ...props }, ref) => {
|
|
122
|
-
const showCount = onClear && selectedCount !== undefined;
|
|
122
|
+
const showCount = onClear && selectedCount !== undefined && selectedCount > 0;
|
|
123
123
|
|
|
124
124
|
return (
|
|
125
125
|
<PlainMenuBaseComponent {...props} ref={ref}>
|
|
@@ -130,7 +130,7 @@ export const DropdownMenuBaseComponentWithCount = forwardRef<HTMLElement, Dropdo
|
|
|
130
130
|
</Badge>
|
|
131
131
|
)}
|
|
132
132
|
{showCount && <VerticalDivider />}
|
|
133
|
-
{
|
|
133
|
+
{showCount ? (
|
|
134
134
|
<CrossIcon
|
|
135
135
|
size="16"
|
|
136
136
|
color={theme.color.neutral.icon}
|