@nypl/design-system-react-components 3.1.7-rc-breadcrumbs → 3.1.7-rc-breadcrumbs-2

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.
@@ -2162,15 +2162,16 @@ const O_ = A1(
2162
2162
  }
2163
2163
  );
2164
2164
  })
2165
- ), sp = 40, N_ = (r, a, o = !1, s = !1) => {
2166
- const i = r.text.length, p = i >= sp, C = i <= sp ? r.text : g_(r.text, sp), v = /* @__PURE__ */ x.jsxs(
2165
+ ), sp = 40, N_ = (r, a, o, s = !1, i = !1) => {
2166
+ const p = r.text.length, C = p >= sp, v = p <= sp ? r.text : g_(r.text, sp), y = /* @__PURE__ */ x.jsxs(
2167
2167
  GS,
2168
2168
  {
2169
- as: r.link,
2169
+ as: o,
2170
2170
  href: r.url,
2171
- "aria-current": s ? "page" : void 0,
2171
+ "aria-current": i ? "page" : void 0,
2172
+ ...r.linkProps,
2172
2173
  children: [
2173
- o && /* @__PURE__ */ x.jsx(
2174
+ s && /* @__PURE__ */ x.jsx(
2174
2175
  B3,
2175
2176
  {
2176
2177
  name: "arrow",
@@ -2181,52 +2182,58 @@ const O_ = A1(
2181
2182
  type: "breadcrumbs"
2182
2183
  }
2183
2184
  ),
2184
- /* @__PURE__ */ x.jsx("span", { className: "breadcrumb-label", children: C })
2185
+ /* @__PURE__ */ x.jsx("span", { className: "breadcrumb-label", children: v })
2185
2186
  ]
2186
2187
  }
2187
2188
  );
2188
- return p ? /* @__PURE__ */ x.jsx(
2189
+ return C ? /* @__PURE__ */ x.jsx(
2189
2190
  pb,
2190
2191
  {
2191
2192
  content: r.text,
2192
2193
  id: `breadcrumb-${a}-tooltip`,
2193
- children: v
2194
+ children: y
2194
2195
  }
2195
- ) : /* @__PURE__ */ x.jsx(x.Fragment, { children: v });
2196
- }, P_ = (r, a) => r != null && r.length ? r.map((s, i) => {
2197
- const p = i === r.length - 2, C = i === r.length - 1;
2196
+ ) : /* @__PURE__ */ x.jsx(x.Fragment, { children: y });
2197
+ }, P_ = (r, a, o) => r != null && r.length ? r.map((i, p) => {
2198
+ const C = p === r.length - 2, v = p === r.length - 1;
2198
2199
  return /* @__PURE__ */ x.jsx(qS, { children: N_(
2199
- s,
2200
+ i,
2200
2201
  a,
2201
- p,
2202
- C
2203
- ) }, i);
2202
+ o,
2203
+ C,
2204
+ v
2205
+ ) }, p);
2204
2206
  }) : null, aI = A1(
2205
2207
  f2((r, a) => {
2206
2208
  const {
2207
2209
  breadcrumbsData: o,
2208
2210
  breadcrumbsType: s = "whatsOn",
2209
2211
  className: i,
2210
- id: p,
2211
- ...C
2212
+ customLink: p,
2213
+ id: C,
2214
+ ...v
2212
2215
  } = r;
2213
2216
  if (!o || o.length === 0)
2214
2217
  throw new Error(
2215
2218
  "NYPL Reservoir Breadcrumbs: No data was passed to the `breadcrumbsData` prop."
2216
2219
  );
2217
- const v = R3("CustomBreadcrumb", {
2220
+ const y = R3("CustomBreadcrumb", {
2218
2221
  variant: s
2219
- }), y = P_(o, p);
2222
+ }), L = P_(
2223
+ o,
2224
+ C,
2225
+ p
2226
+ );
2220
2227
  return /* @__PURE__ */ x.jsx(
2221
2228
  QS,
2222
2229
  {
2223
2230
  "aria-label": "Breadcrumb",
2224
2231
  className: i,
2225
- id: p,
2232
+ id: C,
2226
2233
  ref: a,
2227
- __css: v,
2228
- ...C,
2229
- children: y
2234
+ __css: y,
2235
+ ...v,
2236
+ children: L
2230
2237
  }
2231
2238
  );
2232
2239
  })
@@ -32840,6 +32847,7 @@ const { defineMultiStyleConfig: QP, definePartsStyle: qP } = Y2(["container", "b
32840
32847
  paddingEnd: "s"
32841
32848
  },
32842
32849
  a: {
32850
+ _visited: { color: "unset" },
32843
32851
  _hover: {
32844
32852
  color: "ui.gray.light-cool",
32845
32853
  textDecoration: "none"
@@ -1,11 +1,11 @@
1
1
  import { ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export declare const breadcrumbTypeArray: readonly ["blogs", "booksAndMore", "brand", "connect", "digitalCollections", "education", "locations", "research", "whatsOn"];
4
- export type BreadcrumbsTypes = (typeof breadcrumbTypeArray)[number];
4
+ export type BreadcrumbsTypes = typeof breadcrumbTypeArray[number];
5
5
  export interface BreadcrumbsDataProps {
6
6
  url: string;
7
7
  text: string | React.ReactNode;
8
- link?: any;
8
+ linkProps?: any;
9
9
  }
10
10
  export interface BreadcrumbProps {
11
11
  /** Breadcrumb links as an array */
@@ -16,6 +16,8 @@ export interface BreadcrumbProps {
16
16
  className?: string;
17
17
  /** ID that other components can cross reference for accessibility purposes */
18
18
  id?: string;
19
+ /** Custom Link component for apps with internal routing, defaults to BreadcrumbLink if not passed */
20
+ customLink?: any;
19
21
  }
20
22
  /**
21
23
  * The `Breadcrumbs` component is a navigation element that provides a
@@ -25,6 +25,9 @@ declare const Breadcrumb: {
25
25
  paddingEnd: string;
26
26
  };
27
27
  a: {
28
+ _visited: {
29
+ color: string;
30
+ };
28
31
  _hover: {
29
32
  color: string;
30
33
  textDecoration: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "3.1.7-rc-breadcrumbs",
3
+ "version": "3.1.7-rc-breadcrumbs-2",
4
4
  "description": "NYPL Reservoir Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",