@phillips/seldon 1.38.5 → 1.38.6

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.
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { LinkProps } from '../../Link/Link';
2
3
  import { LinkVariants } from '../../Link/utils';
3
4
  export interface NavigationItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
4
5
  /**
@@ -25,6 +26,10 @@ export interface NavigationItemProps extends Omit<React.HTMLAttributes<HTMLLIEle
25
26
  * Optional type for navigation item
26
27
  */
27
28
  navType?: LinkVariants;
29
+ /**
30
+ * Element to render within the navigation item, renders <Link> by default
31
+ */
32
+ element?: React.ElementType<LinkProps>;
28
33
  }
29
- declare const NavigationItem: ({ badge, className, href, label, navGroup, navType, onClick, ...props }: React.PropsWithChildren<NavigationItemProps>) => import("react/jsx-runtime").JSX.Element;
34
+ declare const NavigationItem: ({ badge, className, href, label, navGroup, navType, onClick, element: Component, ...props }: React.PropsWithChildren<NavigationItemProps>) => import("react/jsx-runtime").JSX.Element;
30
35
  export default NavigationItem;
@@ -1,35 +1,36 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import { px as t } from "../../../utils/index.js";
4
- import f from "../../../node_modules/classnames/index.js";
5
- import x from "../../Link/Link.js";
6
- import { LinkVariants as v } from "../../Link/utils.js";
7
- import { HeaderContext as _ } from "../../Header/Header.js";
8
- const k = ({
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import { px as a } from "../../../utils/index.js";
4
+ import x from "../../../node_modules/classnames/index.js";
5
+ import v from "../../Link/Link.js";
6
+ import { LinkVariants as _ } from "../../Link/utils.js";
7
+ import { HeaderContext as h } from "../../Header/Header.js";
8
+ const C = ({
9
9
  badge: e,
10
- className: m = "",
10
+ className: i = "",
11
11
  href: r,
12
12
  label: n,
13
13
  navGroup: s,
14
- navType: i,
14
+ navType: m,
15
15
  onClick: o,
16
- ...l
16
+ element: l = v,
17
+ ...c
17
18
  }) => {
18
- const { expandedItem: c } = p.useContext(_);
19
- return /* @__PURE__ */ a(
19
+ const { expandedItem: d } = f.useContext(h);
20
+ return /* @__PURE__ */ t(
20
21
  "li",
21
22
  {
22
- ...l,
23
+ ...c,
23
24
  onClick: o,
24
25
  "data-testid": `nav-item-${n}`,
25
- className: f(`${t}-nav__item`, s, m),
26
- children: /* @__PURE__ */ d(x, { href: r, variant: i || v.navMain, tabIndex: c === "" ? 0 : -1, children: [
27
- /* @__PURE__ */ a("span", { className: `${t}-nav__item--label`, children: n }),
28
- e ? /* @__PURE__ */ a("span", { className: `${t}-nav__item--badge `, children: e }) : null
26
+ className: x(`${a}-nav__item`, s, i),
27
+ children: /* @__PURE__ */ p(l, { href: r, variant: m || _.navMain, tabIndex: d === "" ? 0 : -1, children: [
28
+ /* @__PURE__ */ t("span", { className: `${a}-nav__item--label`, children: n }),
29
+ e ? /* @__PURE__ */ t("span", { className: `${a}-nav__item--badge `, children: e }) : null
29
30
  ] })
30
31
  }
31
32
  );
32
33
  };
33
34
  export {
34
- k as default
35
+ C as default
35
36
  };
@@ -56,6 +56,7 @@
56
56
  display: grid;
57
57
  gap: $spacing-md;
58
58
  grid-template-columns: repeat($columns, 1fr);
59
+ row-gap: $spacing-lg;
59
60
 
60
61
  @if $margins-on {
61
62
  @include gridMargins;
@@ -66,6 +67,7 @@
66
67
  display: grid;
67
68
  gap: $spacing-md;
68
69
  grid-template-columns: repeat(2, 1fr);
70
+ row-gap: $spacing-lg;
69
71
 
70
72
  @media (min-width: $breakpoint-md) {
71
73
  grid-template-columns: repeat(4, 1fr);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.38.5",
3
+ "version": "1.38.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"