@purpurds/breadcrumbs 5.10.1 → 5.11.0

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,6 +1,6 @@
1
1
  import { jsx as o, jsxs as x, Fragment as M } from "react/jsx-runtime";
2
- import { Children as w, cloneElement as N, createElement as H } from "react";
3
- function B(e) {
2
+ import { Children as w, cloneElement as N, createElement as B } from "react";
3
+ function H(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
5
  }
6
6
  var S = { exports: {} };
@@ -39,8 +39,8 @@ var S = { exports: {} };
39
39
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
40
40
  })();
41
41
  })(S);
42
- var E = S.exports;
43
- const P = /* @__PURE__ */ B(E), z = {
42
+ var P = S.exports;
43
+ const A = /* @__PURE__ */ H(P), E = {
44
44
  "purpur-icon": "_purpur-icon_8u1lq_1",
45
45
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
46
46
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -48,39 +48,39 @@ const P = /* @__PURE__ */ B(E), z = {
48
48
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
49
49
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
50
50
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
51
- }, A = {
51
+ }, T = {
52
52
  name: "home",
53
53
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M11.38 1.848a.9.9 0 0 1 1.24 0l8.69 8.276c1.242 1.183.405 3.276-1.31 3.276h-.6v8.1a.9.9 0 0 1-.9.9h-13a.9.9 0 0 1-.9-.9v-8.1H4c-1.715 0-2.552-2.093-1.31-3.276l8.69-8.276ZM12 3.743l-8.069 7.685c-.026.024-.03.04-.032.049a.11.11 0 0 0 .008.06.11.11 0 0 0 .036.049c.007.005.021.014.057.014h1.5a.9.9 0 0 1 .9.9v8.1h11.2v-8.1a.9.9 0 0 1 .9-.9H20c.036 0 .05-.009.057-.014a.111.111 0 0 0 .036-.049.111.111 0 0 0 .008-.06c-.002-.008-.006-.025-.032-.05L12 3.744ZM10.6 14a.9.9 0 0 1 .9-.9H15a.9.9 0 0 1 .9.9v4a.9.9 0 0 1-.9.9h-3.5a.9.9 0 0 1-.9-.9v-4Zm1.8.9v2.2h1.7v-2.2h-1.7Z" clip-rule="evenodd"/></svg>',
54
54
  keywords: ["home"],
55
55
  category: "buildings"
56
56
  }, j = (e) => /* @__PURE__ */ o(
57
- V,
57
+ W,
58
58
  {
59
59
  ...e,
60
- svg: A
60
+ svg: T
61
61
  }
62
62
  );
63
63
  j.displayName = "IconHome";
64
- const C = P.bind(z), $ = "purpur-icon", Z = "md", T = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), k = ({ content: e = "", title: u } = {}) => {
64
+ const Z = A.bind(E), $ = "purpur-icon", k = "md", C = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), z = ({ content: e = "", title: u } = {}) => {
65
65
  const n = [
66
66
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
67
67
  { name: "fill", value: "currentColor" },
68
68
  { name: "viewBox", value: "0 0 24 24" },
69
69
  u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
70
70
  ], a = u ? `<title>${u}</title>` : "";
71
- return `<svg ${T(n)}>${a}${e}</svg>`;
72
- }, F = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), V = ({
71
+ return `<svg ${C(n)}>${a}${e}</svg>`;
72
+ }, F = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), W = ({
73
73
  ["data-testid"]: e,
74
74
  svg: u,
75
75
  allyTitle: n,
76
76
  className: a = "",
77
- size: i = Z,
77
+ size: i = k,
78
78
  ...r
79
79
  }) => {
80
- const t = k({
80
+ const t = z({
81
81
  content: F(u.svg),
82
82
  title: n
83
- }), s = C(a, $, `${$}--${i}`);
83
+ }), s = Z(a, $, `${$}--${i}`);
84
84
  return /* @__PURE__ */ o(
85
85
  "span",
86
86
  {
@@ -95,7 +95,7 @@ const C = P.bind(z), $ = "purpur-icon", Z = "md", T = (e) => e.filter((u) => Obj
95
95
  function D(e) {
96
96
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
97
97
  }
98
- var O = { exports: {} };
98
+ var I = { exports: {} };
99
99
  /*!
100
100
  Copyright (c) 2018 Jed Watson.
101
101
  Licensed under the MIT License (MIT), see
@@ -130,9 +130,9 @@ var O = { exports: {} };
130
130
  }
131
131
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
132
132
  })();
133
- })(O);
134
- var J = O.exports;
135
- const I = /* @__PURE__ */ D(J), c = {
133
+ })(I);
134
+ var J = I.exports;
135
+ const O = /* @__PURE__ */ D(J), c = {
136
136
  "purpur-breadcrumbs": "_purpur-breadcrumbs_3f81v_1",
137
137
  "purpur-breadcrumbs--default": "_purpur-breadcrumbs--default_3f81v_21",
138
138
  "purpur-breadcrumbs--negative": "_purpur-breadcrumbs--negative_3f81v_35",
@@ -142,12 +142,12 @@ const I = /* @__PURE__ */ D(J), c = {
142
142
  "purpur-breadcrumb-item--current": "_purpur-breadcrumb-item--current_3f81v_70",
143
143
  "purpur-breadcrumb-item--negative": "_purpur-breadcrumb-item--negative_3f81v_92",
144
144
  "purpur-breadcrumb-item__separator": "_purpur-breadcrumb-item__separator_3f81v_95"
145
- }, W = (e, u, n) => ({
145
+ }, K = (e, u, n) => ({
146
146
  "@type": "ListItem",
147
147
  position: n,
148
148
  name: e,
149
149
  item: u
150
- }), K = (e) => JSON.stringify({
150
+ }), V = (e) => JSON.stringify({
151
151
  "@context": "https://schema.org",
152
152
  "@type": "BreadcrumbList",
153
153
  itemListElement: e
@@ -159,14 +159,14 @@ const I = /* @__PURE__ */ D(J), c = {
159
159
  meta: i = !0,
160
160
  negative: r = !1
161
161
  }) => {
162
- const t = I([
162
+ const t = O([
163
163
  a,
164
164
  c[b],
165
165
  c[`${b}--${r ? "negative" : "default"}`]
166
166
  ]), s = w.count(n), l = [], m = w.map(n, (d, q) => {
167
- const y = q + 1, L = s === y, _ = d.props.children, p = typeof _ == "string" ? null : _.props;
168
- let f = null, v = null;
169
- return typeof _ == "string" ? (f = _, v = d.props.href) : p != null && p.children && typeof (p == null ? void 0 : p.children) == "string" && (f = p.children, v = p.href), f && v && l.push(W(f, v, y)), N(d, {
167
+ const y = q + 1, L = s === y, f = d.props.children, p = typeof f == "string" ? null : f.props;
168
+ let _ = null, v = null;
169
+ return typeof f == "string" ? (_ = f, v = d.props.href) : p != null && p.children && typeof (p == null ? void 0 : p.children) == "string" && (_ = p.children, v = p.href), _ && v && l.push(K(_, v, y)), N(d, {
170
170
  current: L,
171
171
  negative: r,
172
172
  ...y === 1 && {
@@ -176,7 +176,7 @@ const I = /* @__PURE__ */ D(J), c = {
176
176
  ] })
177
177
  }
178
178
  });
179
- }), g = l.length === s ? K(l) : null;
179
+ }), g = l.length === s ? V(l) : null;
180
180
  return /* @__PURE__ */ x("nav", { "data-testid": e, "aria-label": u || "Breadcrumb", className: t, children: [
181
181
  /* @__PURE__ */ o("ol", { className: c[`${b}__list`], children: m }),
182
182
  i && g ? /* @__PURE__ */ o(
@@ -197,7 +197,7 @@ const I = /* @__PURE__ */ D(J), c = {
197
197
  onClick: r,
198
198
  ...t
199
199
  }) => {
200
- const s = I(
200
+ const s = O(
201
201
  [c[h], c[`${h}--${i ? "negative" : "default"}`]],
202
202
  {
203
203
  [c[`${h}--current`]]: a
@@ -211,7 +211,7 @@ const I = /* @__PURE__ */ D(J), c = {
211
211
  "aria-current": a ? "page" : void 0,
212
212
  onClick: r
213
213
  };
214
- return e || typeof n == "string" ? H("a", m, n) : N(n, {
214
+ return e || typeof n == "string" ? B("a", m, n) : N(n, {
215
215
  ...m,
216
216
  ...n.props
217
217
  });