@phillips/seldon 1.58.3 → 1.58.4
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.
|
@@ -10,6 +10,10 @@ export interface NavigationItemProps extends ComponentProps<'li'> {
|
|
|
10
10
|
* href link
|
|
11
11
|
*/
|
|
12
12
|
href?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional value to give the navigation item unique styling
|
|
15
|
+
*/
|
|
16
|
+
isViewAllLink?: boolean;
|
|
13
17
|
/**
|
|
14
18
|
* Label for the navigation item
|
|
15
19
|
*/
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { px as i } from "../../../utils/index.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { LinkVariants as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
const
|
|
8
|
-
({
|
|
3
|
+
import v from "../../../node_modules/classnames/index.js";
|
|
4
|
+
import N from "../../Link/Link.js";
|
|
5
|
+
import { LinkVariants as _ } from "../../Link/types.js";
|
|
6
|
+
import { forwardRef as $ } from "react";
|
|
7
|
+
const h = $(
|
|
8
|
+
({
|
|
9
|
+
badge: e,
|
|
10
|
+
className: t = "",
|
|
11
|
+
href: n,
|
|
12
|
+
isViewAllLink: s = !1,
|
|
13
|
+
label: m,
|
|
14
|
+
navGroup: l,
|
|
15
|
+
navType: r,
|
|
16
|
+
onClick: o,
|
|
17
|
+
element: d = N,
|
|
18
|
+
...f
|
|
19
|
+
}, p) => /* @__PURE__ */ a(
|
|
9
20
|
"li",
|
|
10
21
|
{
|
|
11
|
-
...
|
|
22
|
+
...f,
|
|
12
23
|
onClick: o,
|
|
13
24
|
"data-testid": `nav-item-${m}`,
|
|
14
|
-
className:
|
|
25
|
+
className: v(`${i}-nav__item`, l, t, {
|
|
26
|
+
"view-all": s
|
|
27
|
+
}),
|
|
15
28
|
ref: p,
|
|
16
|
-
children: /* @__PURE__ */ c(
|
|
29
|
+
children: /* @__PURE__ */ c(d, { href: n, variant: r || _.snwHeaderLink, children: [
|
|
17
30
|
/* @__PURE__ */ a("span", { className: `${i}-nav__item--label`, children: m }),
|
|
18
31
|
e ? /* @__PURE__ */ a("span", { className: `${i}-nav__item--badge `, children: ` • ${e}` }) : null
|
|
19
32
|
] })
|
|
20
33
|
}
|
|
21
34
|
)
|
|
22
35
|
);
|
|
23
|
-
|
|
36
|
+
h.displayName = "NavigationItem";
|
|
24
37
|
export {
|
|
25
|
-
|
|
38
|
+
h as default
|
|
26
39
|
};
|
|
@@ -77,18 +77,8 @@
|
|
|
77
77
|
padding-bottom: 0.625rem;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&--end {
|
|
83
|
-
@include isHeaderMobile {
|
|
84
|
-
margin-top: $spacing-md;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&--start {
|
|
89
|
-
margin-right: 1rem;
|
|
90
80
|
|
|
91
|
-
&
|
|
81
|
+
& .view-all {
|
|
92
82
|
a {
|
|
93
83
|
border-bottom: 0;
|
|
94
84
|
padding: $spacing-sm 0;
|
|
@@ -99,6 +89,16 @@
|
|
|
99
89
|
}
|
|
100
90
|
}
|
|
101
91
|
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&--end {
|
|
95
|
+
@include isHeaderMobile {
|
|
96
|
+
margin-top: $spacing-md;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--start {
|
|
101
|
+
margin-right: 1rem;
|
|
102
102
|
|
|
103
103
|
@include isHeaderMobile {
|
|
104
104
|
margin-right: 0;
|