@purpurds/breadcrumbs 7.14.0 → 8.0.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.
package/dist/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  Name: @purpurds/icon
2
- Version: 7.13.1
2
+ Version: 7.14.0
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),x=require("react");function P(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),x=require("react");function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var O;function Z(){return O||(O=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=i(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)s.call(r,u)&&r[u]&&(t=i(t,this&&this[u]||u));return t}function i(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(S)),S.exports}var k=Z();const T=P(k),R={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},D=T.bind(R),q="purpur-icon",F="md",J=e=>e.filter(s=>Object.keys(s).length>=1).map(s=>`${s.name}="${s.value}"`).join(" "),V=({content:e="",title:s}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},s?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=s?`<title>${s}</title>`:"";return`<svg ${J(n)}>${a}${e}</svg>`},G=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),I=({svg:e,allyTitle:s,className:n,size:a=F,...i})=>{const r=V({content:G(e.svg),title:s}),t=D(n,q,`${q}--${a}`);return c.jsx("span",{className:t,dangerouslySetInnerHTML:{__html:r},...i})};I.displayName="Icon";const K={name:"home",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>',keywords:["home"],category:"buildings"},B=e=>c.jsx(I,{...e,svg:K});B.displayName="IconHome";function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y={exports:{}};/*!
5
+ */var O;function k(){return O||(O=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=i(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)s.call(r,u)&&r[u]&&(t=i(t,this&&this[u]||u));return t}function i(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(S)),S.exports}var T=k();const z=Z(T),R={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},D=z.bind(R),q="purpur-icon",F="md",J=e=>e.filter(s=>Object.keys(s).length>=1).map(s=>`${s.name}="${s.value}"`).join(" "),V=({content:e="",title:s}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},s?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],a=s?`<title>${s}</title>`:"";return`<svg ${J(n)}>${a}${e}</svg>`},G=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),B=({svg:e,allyTitle:s,className:n,size:a=F,...i})=>{const r=V({content:G(e.svg),title:s}),t=D(n,q,`${q}--${a}`);return c.jsx("span",{className:t,dangerouslySetInnerHTML:{__html:r},...i})};B.displayName="Icon";const K={name:"home",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>',keywords:["home"],category:"buildings"},L=e=>c.jsx(B,{...e,svg:K});L.displayName="IconHome";function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y={exports:{}};/*!
6
6
  Copyright (c) 2018 Jed Watson.
7
7
  Licensed under the MIT License (MIT), see
8
8
  http://jedwatson.github.io/classnames
9
- */var z;function U(){return z||(z=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=i(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)s.call(r,u)&&r[u]&&(t=i(t,this&&this[u]||u));return t}function i(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(y)),y.exports}var W=U();const X=Q(W),d={"purpur-breadcrumbs":"_purpur-breadcrumbs_13trz_1","purpur-breadcrumbs__list":"_purpur-breadcrumbs__list_13trz_4","purpur-breadcrumb-item":"_purpur-breadcrumb-item_13trz_14","purpur-breadcrumb-item__element":"_purpur-breadcrumb-item__element_13trz_19","purpur-breadcrumb-item__link":"_purpur-breadcrumb-item__link_13trz_28","purpur-breadcrumb-item--default":"_purpur-breadcrumb-item--default_13trz_32","purpur-breadcrumb-item--negative":"_purpur-breadcrumb-item--negative_13trz_46","purpur-breadcrumb-item--current":"_purpur-breadcrumb-item--current_13trz_60","purpur-breadcrumb-item__home":"_purpur-breadcrumb-item__home_13trz_93"},Y=(e,s,n)=>{const a={"@type":"ListItem",position:s,name:e};return n&&(a.item=n),a},rr=e=>JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e}),m=X.bind(d),$="purpur-breadcrumbs",o="purpur-breadcrumb-item",L=({["aria-label"]:e,baseUrl:s,children:n,className:a,excludeCurrentPage:i=!1,linkElement:r="a",meta:t=!0,negative:u=!1,highlightLast:_=!0,hideHomeIcon:l,...f})=>{const b=m([a,$,`${$}--${u?"negative":"default"}`]),p=x.Children.count(n),h=[],H=x.Children.map(n,(v,C)=>{const g=C+1,w=p===g,A=_&&w,{children:E,href:N}=v.props;return h.push(Y(E,g,N&&`${s}${N}`)),x.cloneElement(v,{className:v.props.className,current:A,negative:u,first:!l&&g===1,last:w,linkElement:r,excludeCurrentPage:i})}),j=h.length===p?rr(h):null;return c.jsxs("nav",{"aria-label":e,className:b,...f,children:[c.jsx("ol",{className:d[`${$}__list`],children:H}),t&&j?c.jsx("script",{type:"application/ld+json","data-testid":"breadcrumbs-meta",dangerouslySetInnerHTML:{__html:j}}):null]})},M=({href:e,["data-testid"]:s,children:n,current:a=!1,linkElement:i="a",negative:r=!1,onClick:t,first:u=!1,last:_=!1,excludeCurrentPage:l=!1,...f})=>{const b=i,p=m([o],d[`${o}--${r?"negative":"default"}`],{[`${o}--current`]:!l&&a});return c.jsx("li",{...f,className:p,children:!_||l?c.jsxs(b,{href:e,"data-testid":s,onClick:t,className:m(`${o}__element`,`${o}__link`),children:[u&&c.jsx("span",{className:d[`${o}__home`],"aria-hidden":"true",children:c.jsx(B,{size:"xs"})}),n]}):c.jsx("span",{"aria-current":"page","data-testid":s,className:m(`${o}__element`),children:n})})};L.Item=M;exports.Breadcrumbs=L;exports.BreadcrumbsItem=M;
9
+ */var I;function U(){return I||(I=1,function(e){(function(){var s={}.hasOwnProperty;function n(){for(var r="",t=0;t<arguments.length;t++){var u=arguments[t];u&&(r=i(r,a.call(this,u)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var u in r)s.call(r,u)&&r[u]&&(t=i(t,this&&this[u]||u));return t}function i(r,t){return t?r?r+" "+t:r+t:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(y)),y.exports}var W=U();const X=Q(W),d={"purpur-breadcrumbs":"_purpur-breadcrumbs_x1byg_1","purpur-breadcrumbs__list":"_purpur-breadcrumbs__list_x1byg_4","purpur-breadcrumb-item":"_purpur-breadcrumb-item_x1byg_14","purpur-breadcrumb-item__element":"_purpur-breadcrumb-item__element_x1byg_19","purpur-breadcrumb-item__link":"_purpur-breadcrumb-item__link_x1byg_28","purpur-breadcrumb-item--default":"_purpur-breadcrumb-item--default_x1byg_32","purpur-breadcrumb-item--negative":"_purpur-breadcrumb-item--negative_x1byg_46","purpur-breadcrumb-item--current":"_purpur-breadcrumb-item--current_x1byg_60","purpur-breadcrumb-item__home":"_purpur-breadcrumb-item__home_x1byg_93"},Y=(e,s,n)=>{const a={"@type":"ListItem",position:s,name:e};return n&&(a.item=n),a},rr=e=>JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e}),m=X.bind(d),$="purpur-breadcrumbs",o="purpur-breadcrumb-item",M=({["aria-label"]:e,baseUrl:s,children:n,className:a,excludeCurrentPage:i=!1,linkElement:r="a",meta:t=!0,negative:u=!1,highlightLast:_=!0,hideHomeIcon:l,...b})=>{const f=m([a,$,`${$}--${u?"negative":"default"}`]),p=x.Children.count(n),h=[],C=x.Children.map(n,(v,A)=>{const g=A+1,w=p===g,E=_&&w,{children:P,href:N}=v.props;return h.push(Y(P,g,N&&`${s}${N}`)),x.cloneElement(v,{className:v.props.className,current:E,negative:u,first:!l&&g===1,last:w,linkElement:r,excludeCurrentPage:i})}),j=h.length===p?rr(h):null;return c.jsxs("nav",{"aria-label":e,className:f,...b,children:[c.jsx("ol",{className:d[`${$}__list`],children:C}),t&&j?c.jsx("script",{type:"application/ld+json","data-testid":"breadcrumbs-meta",dangerouslySetInnerHTML:{__html:j}}):null]})},H=({href:e,["data-testid"]:s,children:n,current:a=!1,linkElement:i="a",negative:r=!1,onClick:t,first:u=!1,last:_=!1,excludeCurrentPage:l=!1,...b})=>{const f=i,p=m([o],d[`${o}--${r?"negative":"default"}`],{[`${o}--current`]:!l&&a});return c.jsx("li",{...b,className:p,children:!_||l?c.jsxs(f,{href:e,"data-testid":s,onClick:t,className:m(`${o}__element`,`${o}__link`),children:[u&&c.jsx("span",{className:d[`${o}__home`],"aria-hidden":"true",children:c.jsx(L,{size:"xs"})}),n]}):c.jsx("span",{"aria-current":"page","data-testid":s,className:m(`${o}__element`),children:n})})};M.Item=H;exports.Breadcrumbs=M;exports.BreadcrumbsItem=H;
10
10
  //# sourceMappingURL=breadcrumbs.cjs.js.map
@@ -1,6 +1,6 @@
1
- import { jsx as c, jsxs as q } from "react/jsx-runtime";
2
- import { Children as S, cloneElement as E } from "react";
3
- function Z(e) {
1
+ import { jsx as c, jsxs as L } from "react/jsx-runtime";
2
+ import { Children as S, cloneElement as Z } from "react";
3
+ function k(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
5
  }
6
6
  var j = { exports: {} };
@@ -9,9 +9,9 @@ var j = { exports: {} };
9
9
  Licensed under the MIT License (MIT), see
10
10
  http://jedwatson.github.io/classnames
11
11
  */
12
- var z;
13
- function k() {
14
- return z || (z = 1, function(e) {
12
+ var O;
13
+ function P() {
14
+ return O || (O = 1, function(e) {
15
15
  (function() {
16
16
  var u = {}.hasOwnProperty;
17
17
  function n() {
@@ -42,8 +42,8 @@ function k() {
42
42
  })();
43
43
  }(j)), j.exports;
44
44
  }
45
- var P = k();
46
- const T = /* @__PURE__ */ Z(P), D = {
45
+ var z = P();
46
+ const T = /* @__PURE__ */ k(z), D = {
47
47
  "purpur-icon": "_purpur-icon_8u1lq_1",
48
48
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
49
49
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -51,7 +51,7 @@ const T = /* @__PURE__ */ Z(P), D = {
51
51
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
52
52
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
53
53
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
54
- }, F = T.bind(D), O = "purpur-icon", J = "md", R = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), V = ({ content: e = "", title: u } = {}) => {
54
+ }, F = T.bind(D), I = "purpur-icon", J = "md", R = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), V = ({ content: e = "", title: u } = {}) => {
55
55
  const n = [
56
56
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
57
57
  { name: "fill", value: "currentColor" },
@@ -59,21 +59,21 @@ const T = /* @__PURE__ */ Z(P), D = {
59
59
  u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
60
60
  ], a = u ? `<title>${u}</title>` : "";
61
61
  return `<svg ${R(n)}>${a}${e}</svg>`;
62
- }, G = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), L = ({ svg: e, allyTitle: u, className: n, size: a = J, ...i }) => {
62
+ }, G = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), B = ({ svg: e, allyTitle: u, className: n, size: a = J, ...i }) => {
63
63
  const r = V({
64
64
  content: G(e.svg),
65
65
  title: u
66
- }), t = F(n, O, `${O}--${a}`);
66
+ }), t = F(n, I, `${I}--${a}`);
67
67
  return /* @__PURE__ */ c("span", { className: t, dangerouslySetInnerHTML: { __html: r }, ...i });
68
68
  };
69
- L.displayName = "Icon";
69
+ B.displayName = "Icon";
70
70
  const K = {
71
71
  name: "home",
72
72
  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>',
73
73
  keywords: ["home"],
74
74
  category: "buildings"
75
- }, B = (e) => /* @__PURE__ */ c(L, { ...e, svg: K });
76
- B.displayName = "IconHome";
75
+ }, M = (e) => /* @__PURE__ */ c(B, { ...e, svg: K });
76
+ M.displayName = "IconHome";
77
77
  function Q(e) {
78
78
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
79
79
  }
@@ -83,9 +83,9 @@ var y = { exports: {} };
83
83
  Licensed under the MIT License (MIT), see
84
84
  http://jedwatson.github.io/classnames
85
85
  */
86
- var I;
86
+ var q;
87
87
  function U() {
88
- return I || (I = 1, function(e) {
88
+ return q || (q = 1, function(e) {
89
89
  (function() {
90
90
  var u = {}.hasOwnProperty;
91
91
  function n() {
@@ -118,15 +118,15 @@ function U() {
118
118
  }
119
119
  var W = U();
120
120
  const X = /* @__PURE__ */ Q(W), d = {
121
- "purpur-breadcrumbs": "_purpur-breadcrumbs_13trz_1",
122
- "purpur-breadcrumbs__list": "_purpur-breadcrumbs__list_13trz_4",
123
- "purpur-breadcrumb-item": "_purpur-breadcrumb-item_13trz_14",
124
- "purpur-breadcrumb-item__element": "_purpur-breadcrumb-item__element_13trz_19",
125
- "purpur-breadcrumb-item__link": "_purpur-breadcrumb-item__link_13trz_28",
126
- "purpur-breadcrumb-item--default": "_purpur-breadcrumb-item--default_13trz_32",
127
- "purpur-breadcrumb-item--negative": "_purpur-breadcrumb-item--negative_13trz_46",
128
- "purpur-breadcrumb-item--current": "_purpur-breadcrumb-item--current_13trz_60",
129
- "purpur-breadcrumb-item__home": "_purpur-breadcrumb-item__home_13trz_93"
121
+ "purpur-breadcrumbs": "_purpur-breadcrumbs_x1byg_1",
122
+ "purpur-breadcrumbs__list": "_purpur-breadcrumbs__list_x1byg_4",
123
+ "purpur-breadcrumb-item": "_purpur-breadcrumb-item_x1byg_14",
124
+ "purpur-breadcrumb-item__element": "_purpur-breadcrumb-item__element_x1byg_19",
125
+ "purpur-breadcrumb-item__link": "_purpur-breadcrumb-item__link_x1byg_28",
126
+ "purpur-breadcrumb-item--default": "_purpur-breadcrumb-item--default_x1byg_32",
127
+ "purpur-breadcrumb-item--negative": "_purpur-breadcrumb-item--negative_x1byg_46",
128
+ "purpur-breadcrumb-item--current": "_purpur-breadcrumb-item--current_x1byg_60",
129
+ "purpur-breadcrumb-item__home": "_purpur-breadcrumb-item__home_x1byg_93"
130
130
  }, Y = (e, u, n) => {
131
131
  const a = {
132
132
  "@type": "ListItem",
@@ -149,17 +149,17 @@ const X = /* @__PURE__ */ Q(W), d = {
149
149
  negative: s = !1,
150
150
  highlightLast: _ = !0,
151
151
  hideHomeIcon: l,
152
- ...f
152
+ ...b
153
153
  }) => {
154
- const b = m([
154
+ const f = m([
155
155
  a,
156
156
  x,
157
157
  `${x}--${s ? "negative" : "default"}`
158
- ]), p = S.count(n), h = [], M = S.map(n, (v, H) => {
159
- const g = H + 1, w = p === g, A = _ && w, { children: C, href: N } = v.props;
160
- return h.push(Y(C, g, N && `${u}${N}`)), E(v, {
158
+ ]), p = S.count(n), h = [], H = S.map(n, (v, A) => {
159
+ const g = A + 1, w = p === g, C = _ && w, { children: E, href: N } = v.props;
160
+ return h.push(Y(E, g, N && `${u}${N}`)), Z(v, {
161
161
  className: v.props.className,
162
- current: A,
162
+ current: C,
163
163
  negative: s,
164
164
  first: !l && g === 1,
165
165
  last: w,
@@ -167,8 +167,8 @@ const X = /* @__PURE__ */ Q(W), d = {
167
167
  excludeCurrentPage: i
168
168
  });
169
169
  }), $ = h.length === p ? rr(h) : null;
170
- return /* @__PURE__ */ q("nav", { "aria-label": e, className: b, ...f, children: [
171
- /* @__PURE__ */ c("ol", { className: d[`${x}__list`], children: M }),
170
+ return /* @__PURE__ */ L("nav", { "aria-label": e, className: f, ...b, children: [
171
+ /* @__PURE__ */ c("ol", { className: d[`${x}__list`], children: H }),
172
172
  t && $ ? /* @__PURE__ */ c(
173
173
  "script",
174
174
  {
@@ -189,24 +189,24 @@ const X = /* @__PURE__ */ Q(W), d = {
189
189
  first: s = !1,
190
190
  last: _ = !1,
191
191
  excludeCurrentPage: l = !1,
192
- ...f
192
+ ...b
193
193
  }) => {
194
- const b = i, p = m(
194
+ const f = i, p = m(
195
195
  [o],
196
196
  d[`${o}--${r ? "negative" : "default"}`],
197
197
  {
198
198
  [`${o}--current`]: !l && a
199
199
  }
200
200
  );
201
- return /* @__PURE__ */ c("li", { ...f, className: p, children: !_ || l ? /* @__PURE__ */ q(
202
- b,
201
+ return /* @__PURE__ */ c("li", { ...b, className: p, children: !_ || l ? /* @__PURE__ */ L(
202
+ f,
203
203
  {
204
204
  href: e,
205
205
  "data-testid": u,
206
206
  onClick: t,
207
207
  className: m(`${o}__element`, `${o}__link`),
208
208
  children: [
209
- s && /* @__PURE__ */ c("span", { className: d[`${o}__home`], "aria-hidden": "true", children: /* @__PURE__ */ c(B, { size: "xs" }) }),
209
+ s && /* @__PURE__ */ c("span", { className: d[`${o}__home`], "aria-hidden": "true", children: /* @__PURE__ */ c(M, { size: "xs" }) }),
210
210
  n
211
211
  ]
212
212
  }
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- ._purpur-breadcrumbs_13trz_1{font-family:var(--purpur-typography-family-default)}._purpur-breadcrumbs__list_13trz_4{display:flex;flex-direction:row;align-items:center;gap:var(--purpur-spacing-50);margin:0;padding:0;list-style:none}._purpur-breadcrumb-item_13trz_14{white-space:nowrap;display:flex;align-items:center}._purpur-breadcrumb-item__element_13trz_19{display:inline-flex;gap:var(--purpur-spacing-50);font-size:var(--purpur-typography-scale-75);text-underline-offset:3px;text-decoration-skip-ink:none;padding:14px 2px;letter-spacing:.3px}._purpur-breadcrumb-item__link_13trz_28:hover,._purpur-breadcrumb-item__link_13trz_28:active{text-decoration-thickness:2px;text-underline-offset:2px}._purpur-breadcrumb-item--default_13trz_32,._purpur-breadcrumb-item--default_13trz_32 ._purpur-breadcrumb-item__element_13trz_19{color:var(--purpur-color-text-interactive-primary)}._purpur-breadcrumb-item--default_13trz_32 ._purpur-breadcrumb-item__link_13trz_28:hover{color:var(--purpur-color-text-interactive-primary-hover);background:var(--purpur-color-background-interactive-transparent-hover)}._purpur-breadcrumb-item--default_13trz_32 ._purpur-breadcrumb-item__link_13trz_28:active{color:var(--purpur-color-text-interactive-primary-active);background:var(--purpur-color-background-interactive-transparent-active)}._purpur-breadcrumb-item--negative_13trz_46,._purpur-breadcrumb-item--negative_13trz_46 ._purpur-breadcrumb-item__element_13trz_19{color:var(--purpur-color-text-interactive-primary-negative)}._purpur-breadcrumb-item--negative_13trz_46 ._purpur-breadcrumb-item__link_13trz_28:hover{color:var(--purpur-color-text-interactive-primary-negative-hover);background:var(--purpur-color-background-interactive-transparent-negative-hover)}._purpur-breadcrumb-item--negative_13trz_46 ._purpur-breadcrumb-item__link_13trz_28:active{color:var(--purpur-color-text-interactive-primary-negative-active);background:var(--purpur-color-background-interactive-transparent-negative-active)}._purpur-breadcrumb-item--current_13trz_60{overflow:hidden}._purpur-breadcrumb-item--current_13trz_60 ._purpur-breadcrumb-item__element_13trz_19{display:block;text-overflow:ellipsis;overflow:hidden;color:var(--purpur-color-text-default);text-decoration:none;font-weight:var(--purpur-typography-weight-medium)}._purpur-breadcrumb-item--current_13trz_60 ._purpur-breadcrumb-item__link_13trz_28:hover{background:none}._purpur-breadcrumb-item_13trz_14:not(:nth-last-child(2)):not(:last-child){display:none}@media screen and (min-width: 600px){._purpur-breadcrumb-item_13trz_14:not(:nth-last-child(2)):not(:last-child){display:flex}}._purpur-breadcrumb-item--negative_13trz_46._purpur-breadcrumb-item--current_13trz_60,._purpur-breadcrumb-item--negative_13trz_46._purpur-breadcrumb-item--current_13trz_60 ._purpur-breadcrumb-item__element_13trz_19{color:var(--purpur-color-text-default-negative)}._purpur-breadcrumb-item_13trz_14:not(:last-child):after{font-size:var(--purpur-typography-scale-75);margin-left:var(--purpur-spacing-50);content:"/"/""}._purpur-breadcrumb-item__home_13trz_93{display:none}@media screen and (min-width: 600px){._purpur-breadcrumb-item__home_13trz_93{display:inline-flex;align-items:center}}
1
+ ._purpur-breadcrumbs_x1byg_1{font-family:var(--purpur-typography-family-default)}._purpur-breadcrumbs__list_x1byg_4{display:flex;flex-direction:row;align-items:center;gap:var(--purpur-spacing-50);margin:0;padding:0;list-style:none}._purpur-breadcrumb-item_x1byg_14{white-space:nowrap;display:flex;align-items:center}._purpur-breadcrumb-item__element_x1byg_19{display:inline-flex;gap:var(--purpur-spacing-50);font-size:var(--purpur-typography-scale-75);text-underline-offset:3px;text-decoration-skip-ink:none;padding:14px 2px;letter-spacing:.3px}._purpur-breadcrumb-item__link_x1byg_28:hover,._purpur-breadcrumb-item__link_x1byg_28:active{text-decoration-thickness:2px;text-underline-offset:2px}._purpur-breadcrumb-item--default_x1byg_32,._purpur-breadcrumb-item--default_x1byg_32 ._purpur-breadcrumb-item__element_x1byg_19{color:var(--purpur-color-text-interactive-primary)}._purpur-breadcrumb-item--default_x1byg_32 ._purpur-breadcrumb-item__link_x1byg_28:hover{color:var(--purpur-color-text-interactive-primary-hover);background:var(--purpur-color-background-interactive-transparent-hover)}._purpur-breadcrumb-item--default_x1byg_32 ._purpur-breadcrumb-item__link_x1byg_28:active{color:var(--purpur-color-text-interactive-primary-active);background:var(--purpur-color-background-interactive-transparent-active)}._purpur-breadcrumb-item--negative_x1byg_46,._purpur-breadcrumb-item--negative_x1byg_46 ._purpur-breadcrumb-item__element_x1byg_19{color:var(--purpur-color-text-interactive-primary-negative)}._purpur-breadcrumb-item--negative_x1byg_46 ._purpur-breadcrumb-item__link_x1byg_28:hover{color:var(--purpur-color-text-interactive-primary-hover-negative);background:var(--purpur-color-background-interactive-transparent-hover-negative)}._purpur-breadcrumb-item--negative_x1byg_46 ._purpur-breadcrumb-item__link_x1byg_28:active{color:var(--purpur-color-text-interactive-primary-active-negative);background:var(--purpur-color-background-interactive-transparent-active-negative)}._purpur-breadcrumb-item--current_x1byg_60{overflow:hidden}._purpur-breadcrumb-item--current_x1byg_60 ._purpur-breadcrumb-item__element_x1byg_19{display:block;text-overflow:ellipsis;overflow:hidden;color:var(--purpur-color-text-default);text-decoration:none;font-weight:var(--purpur-typography-weight-medium)}._purpur-breadcrumb-item--current_x1byg_60 ._purpur-breadcrumb-item__link_x1byg_28:hover{background:none}._purpur-breadcrumb-item_x1byg_14:not(:nth-last-child(2)):not(:last-child){display:none}@media screen and (min-width: 600px){._purpur-breadcrumb-item_x1byg_14:not(:nth-last-child(2)):not(:last-child){display:flex}}._purpur-breadcrumb-item--negative_x1byg_46._purpur-breadcrumb-item--current_x1byg_60,._purpur-breadcrumb-item--negative_x1byg_46._purpur-breadcrumb-item--current_x1byg_60 ._purpur-breadcrumb-item__element_x1byg_19{color:var(--purpur-color-text-default-negative)}._purpur-breadcrumb-item_x1byg_14:not(:last-child):after{font-size:var(--purpur-typography-scale-75);margin-left:var(--purpur-spacing-50);content:"/"/""}._purpur-breadcrumb-item__home_x1byg_93{display:none}@media screen and (min-width: 600px){._purpur-breadcrumb-item__home_x1byg_93{display:inline-flex;align-items:center}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/breadcrumbs",
3
- "version": "7.14.0",
3
+ "version": "8.0.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/breadcrumbs.cjs.js",
6
6
  "types": "./dist/breadcrumbs.d.ts",
@@ -16,9 +16,9 @@
16
16
  "source": "src/breadcrumbs.tsx",
17
17
  "dependencies": {
18
18
  "classnames": "~2.5.0",
19
- "@purpurds/common-types": "7.14.0",
20
- "@purpurds/icon": "7.14.0",
21
- "@purpurds/tokens": "7.14.0"
19
+ "@purpurds/common-types": "8.0.0",
20
+ "@purpurds/tokens": "8.0.0",
21
+ "@purpurds/icon": "8.0.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@storybook/react-vite": "^9.0.18",
@@ -39,7 +39,7 @@
39
39
  "vite": "^6.2.1",
40
40
  "vitest": "^3.1.2",
41
41
  "@purpurds/component-rig": "1.0.0",
42
- "@purpurds/paragraph": "7.14.0"
42
+ "@purpurds/paragraph": "8.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@types/react": "^18 || ^19",
@@ -69,13 +69,13 @@
69
69
 
70
70
  #{$root}__link {
71
71
  &:hover {
72
- color: var(--purpur-color-text-interactive-primary-negative-hover);
73
- background: var(--purpur-color-background-interactive-transparent-negative-hover);
72
+ color: var(--purpur-color-text-interactive-primary-hover-negative);
73
+ background: var(--purpur-color-background-interactive-transparent-hover-negative);
74
74
  }
75
75
 
76
76
  &:active {
77
- color: var(--purpur-color-text-interactive-primary-negative-active);
78
- background: var(--purpur-color-background-interactive-transparent-negative-active);
77
+ color: var(--purpur-color-text-interactive-primary-active-negative);
78
+ background: var(--purpur-color-background-interactive-transparent-active-negative);
79
79
  }
80
80
  }
81
81
  }
@@ -130,21 +130,13 @@ const Renderer =
130
130
  ({ children, negative, ...args }: BreadcrumbsProps) =>
131
131
  (
132
132
  <>
133
- <div
134
- style={{
135
- backgroundColor: negative
136
- ? "var(--purpur-color-background-tone-on-tone-primary)"
137
- : undefined,
138
- }}
133
+ <Breadcrumbs
134
+ negative={negative}
135
+ linkElement={customLink ? CustomTestLink : undefined}
136
+ {...args}
139
137
  >
140
- <Breadcrumbs
141
- negative={negative}
142
- linkElement={customLink ? CustomTestLink : undefined}
143
- {...args}
144
- >
145
- {children}
146
- </Breadcrumbs>
147
- </div>
138
+ {children}
139
+ </Breadcrumbs>
148
140
  {showMeta && <MetaData />}
149
141
  </>
150
142
  );