@apify/ui-library 1.164.10 → 1.165.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 +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +23 -7
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/src/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/src/components/breadcrumb/breadcrumb.js +7 -3
- package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/breadcrumb/breadcrumb.tsx +20 -2
|
@@ -7,6 +7,8 @@ export declare const breadcrumbClassNames: {
|
|
|
7
7
|
};
|
|
8
8
|
export type BreadcrumbItem = {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Rendered after the label in muted, normal weight - e.g. a "+2" disclosing what the label omits. */
|
|
11
|
+
labelSuffix?: string;
|
|
10
12
|
url?: string;
|
|
11
13
|
/** Fires a `Clicked` event with this `element` when the crumb is a link. Ignored on the active crumb. */
|
|
12
14
|
trackingId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAkDX,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yGAAyG;IACzG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsDlD,CAAC"}
|
|
@@ -27,7 +27,7 @@ var StyledBreadcrumbLink = styled(Link)`
|
|
|
27
27
|
/* Reserve the bolder hover width via a hidden ::after copy of the label on the same span, so it
|
|
28
28
|
inherits identical font-size/line-height and (with height: 0) adds no height — hovering changes
|
|
29
29
|
the weight without widening the label or shifting the rest of the row. */
|
|
30
|
-
> span {
|
|
30
|
+
> span[data-label] {
|
|
31
31
|
display: inline-block;
|
|
32
32
|
/* Center the label within its reserved (bold) width so it grows symmetrically on hover. */
|
|
33
33
|
text-align: center;
|
|
@@ -44,7 +44,7 @@ var StyledBreadcrumbLink = styled(Link)`
|
|
|
44
44
|
|
|
45
45
|
&:hover {
|
|
46
46
|
color: ${theme.color.neutral.textMuted};
|
|
47
|
-
span {
|
|
47
|
+
> span[data-label] {
|
|
48
48
|
/* TODO: (typography-partial) font-weight override without paired font-size/line-height — revisit to confirm intended typography token. */
|
|
49
49
|
font-weight: 500;
|
|
50
50
|
}
|
|
@@ -53,6 +53,10 @@ var StyledBreadcrumbLink = styled(Link)`
|
|
|
53
53
|
var StyledBreadcrumbItemText = styled(TextShared)`
|
|
54
54
|
padding: ${theme.space.space2} ${theme.space.space4};
|
|
55
55
|
white-space: nowrap;
|
|
56
|
+
|
|
57
|
+
> span {
|
|
58
|
+
margin-left: ${theme.space.space4};
|
|
59
|
+
}
|
|
56
60
|
`;
|
|
57
61
|
var Breadcrumbs = ({ items, className }) => /* @__PURE__ */ jsx(StyledBreadcrumbs, {
|
|
58
62
|
className: clsx$1(breadcrumbClassNames.WRAPPER, className),
|
|
@@ -67,22 +71,34 @@ var Breadcrumbs = ({ items, className }) => /* @__PURE__ */ jsx(StyledBreadcrumb
|
|
|
67
71
|
children: "/"
|
|
68
72
|
}), /* @__PURE__ */ jsx("span", {
|
|
69
73
|
className: clsx$1(breadcrumbClassNames.ITEM, isActive && breadcrumbClassNames.ITEM_ACTIVE),
|
|
70
|
-
children: !isActive && item.url ? /* @__PURE__ */
|
|
74
|
+
children: !isActive && item.url ? /* @__PURE__ */ jsxs(StyledBreadcrumbLink, {
|
|
71
75
|
to: item.url,
|
|
72
76
|
trackingId: item.trackingId,
|
|
73
77
|
trackingData: item.trackingData,
|
|
74
|
-
children: /* @__PURE__ */ jsx(TextShared, {
|
|
78
|
+
children: [/* @__PURE__ */ jsx(TextShared, {
|
|
75
79
|
as: "span",
|
|
76
80
|
size: "small",
|
|
77
81
|
weight: "normal",
|
|
78
82
|
"data-label": item.label,
|
|
79
83
|
children: item.label
|
|
80
|
-
})
|
|
81
|
-
|
|
84
|
+
}), item.labelSuffix && /* @__PURE__ */ jsx(TextShared, {
|
|
85
|
+
as: "span",
|
|
86
|
+
size: "small",
|
|
87
|
+
weight: "normal",
|
|
88
|
+
"data-label": item.labelSuffix,
|
|
89
|
+
children: item.labelSuffix
|
|
90
|
+
})]
|
|
91
|
+
}) : /* @__PURE__ */ jsxs(StyledBreadcrumbItemText, {
|
|
82
92
|
size: "small",
|
|
83
93
|
weight: isActive ? "bold" : "normal",
|
|
84
94
|
color: isActive ? theme.color.neutral.text : theme.color.neutral.textSubtle,
|
|
85
|
-
children: item.label
|
|
95
|
+
children: [item.label, item.labelSuffix && /* @__PURE__ */ jsx(TextShared, {
|
|
96
|
+
as: "span",
|
|
97
|
+
size: "small",
|
|
98
|
+
weight: "normal",
|
|
99
|
+
color: theme.color.neutral.textSubtle,
|
|
100
|
+
children: item.labelSuffix
|
|
101
|
+
})]
|
|
86
102
|
})
|
|
87
103
|
})] }, item.label);
|
|
88
104
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ff6bb281182bd85071c70323b0f93b6ba0b8ea92
|
|
@@ -7,6 +7,8 @@ export declare const breadcrumbClassNames: {
|
|
|
7
7
|
};
|
|
8
8
|
export type BreadcrumbItem = {
|
|
9
9
|
label: string;
|
|
10
|
+
/** Rendered after the label in muted, normal weight - e.g. a "+2" disclosing what the label omits. */
|
|
11
|
+
labelSuffix?: string;
|
|
10
12
|
url?: string;
|
|
11
13
|
/** Fires a `Clicked` event with this `element` when the crumb is a link. Ignored on the active crumb. */
|
|
12
14
|
trackingId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAkDX,MAAM,MAAM,cAAc,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yGAAyG;IACzG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsDlD,CAAC"}
|
|
@@ -26,7 +26,7 @@ const StyledBreadcrumbLink = styled(Link) `
|
|
|
26
26
|
/* Reserve the bolder hover width via a hidden ::after copy of the label on the same span, so it
|
|
27
27
|
inherits identical font-size/line-height and (with height: 0) adds no height — hovering changes
|
|
28
28
|
the weight without widening the label or shifting the rest of the row. */
|
|
29
|
-
> span {
|
|
29
|
+
> span[data-label] {
|
|
30
30
|
display: inline-block;
|
|
31
31
|
/* Center the label within its reserved (bold) width so it grows symmetrically on hover. */
|
|
32
32
|
text-align: center;
|
|
@@ -43,7 +43,7 @@ const StyledBreadcrumbLink = styled(Link) `
|
|
|
43
43
|
|
|
44
44
|
&:hover {
|
|
45
45
|
color: ${theme.color.neutral.textMuted};
|
|
46
|
-
span {
|
|
46
|
+
> span[data-label] {
|
|
47
47
|
/* TODO: (typography-partial) font-weight override without paired font-size/line-height — revisit to confirm intended typography token. */
|
|
48
48
|
font-weight: 500;
|
|
49
49
|
}
|
|
@@ -52,9 +52,13 @@ const StyledBreadcrumbLink = styled(Link) `
|
|
|
52
52
|
const StyledBreadcrumbItemText = styled(Text) `
|
|
53
53
|
padding: ${theme.space.space2} ${theme.space.space4};
|
|
54
54
|
white-space: nowrap;
|
|
55
|
+
|
|
56
|
+
> span {
|
|
57
|
+
margin-left: ${theme.space.space4};
|
|
58
|
+
}
|
|
55
59
|
`;
|
|
56
60
|
export const Breadcrumbs = ({ items, className }) => (_jsx(StyledBreadcrumbs, { className: clsx(breadcrumbClassNames.WRAPPER, className), children: items.map((item, index) => {
|
|
57
61
|
const isActive = index === items.length - 1;
|
|
58
|
-
return (_jsxs(React.Fragment, { children: [index > 0 && (_jsx(Text, { as: "span", size: "small", weight: "medium", color: theme.color.neutral.textSubtle, className: breadcrumbClassNames.SEPARATOR, children: "/" })), _jsx("span", { className: clsx(breadcrumbClassNames.ITEM, isActive && breadcrumbClassNames.ITEM_ACTIVE), children: !isActive && item.url ? (
|
|
62
|
+
return (_jsxs(React.Fragment, { children: [index > 0 && (_jsx(Text, { as: "span", size: "small", weight: "medium", color: theme.color.neutral.textSubtle, className: breadcrumbClassNames.SEPARATOR, children: "/" })), _jsx("span", { className: clsx(breadcrumbClassNames.ITEM, isActive && breadcrumbClassNames.ITEM_ACTIVE), children: !isActive && item.url ? (_jsxs(StyledBreadcrumbLink, { to: item.url, trackingId: item.trackingId, trackingData: item.trackingData, children: [_jsx(Text, { as: "span", size: "small", weight: "normal", "data-label": item.label, children: item.label }), item.labelSuffix && (_jsx(Text, { as: "span", size: "small", weight: "normal", "data-label": item.labelSuffix, children: item.labelSuffix }))] })) : (_jsxs(StyledBreadcrumbItemText, { size: "small", weight: isActive ? 'bold' : 'normal', color: isActive ? theme.color.neutral.text : theme.color.neutral.textSubtle, children: [item.label, item.labelSuffix && (_jsx(Text, { as: "span", size: "small", weight: "normal", color: theme.color.neutral.textSubtle, children: item.labelSuffix }))] })) })] }, item.label));
|
|
59
63
|
}) }));
|
|
60
64
|
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../../../src/components/breadcrumb/breadcrumb.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,OAAO,EAAE,sBAAsB;IAC/B,SAAS,EAAE,wBAAwB;IACnC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,2BA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