@purpurds/breadcrumbs 3.7.1 → 4.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: 3.7.0
2
+ Version: 3.7.1
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@purpurds/breadcrumbs",
3
- "version": "3.7.1",
3
+ "version": "4.0.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/breadcrumbs.cjs.js",
6
6
  "types": "./dist/breadcrumbs.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
9
  "require": "./dist/breadcrumbs.cjs.js",
10
- "systemjs": "./dist/breadcrumbs.system.js",
11
10
  "types": "./dist/breadcrumbs.d.ts",
12
11
  "default": "./dist/breadcrumbs.es.js"
13
12
  },
@@ -16,8 +15,8 @@
16
15
  "source": "src/breadcrumbs.tsx",
17
16
  "dependencies": {
18
17
  "classnames": "~2.5.0",
19
- "@purpurds/icon": "3.7.1",
20
- "@purpurds/tokens": "3.7.1"
18
+ "@purpurds/icon": "4.0.0",
19
+ "@purpurds/tokens": "4.0.0"
21
20
  },
22
21
  "devDependencies": {
23
22
  "@rushstack/eslint-patch": "~1.7.0",
@@ -46,7 +45,7 @@
46
45
  "scripts": {
47
46
  "build:dev": "vite",
48
47
  "build:watch": "vite build --watch",
49
- "build": "rm -rf dist && vite build && vite build --mode systemjs",
48
+ "build": "vite build",
50
49
  "ci:build": "rushx build",
51
50
  "coverage": "vitest run --coverage",
52
51
  "lint:fix": "eslint . --fix",
@@ -1,10 +0,0 @@
1
- System.register(["react","react/jsx-runtime"],function(y,X){"use strict";var x,E,i,S,w;return{setters:[o=>{x=o.Children,E=o.cloneElement,i=o.default,S=o.createElement},o=>{w=o.jsx}],execute:function(){function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var j={exports:{}};/*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */(function(t){(function(){var s={}.hasOwnProperty;function n(){for(var e="",r=0;r<arguments.length;r++){var u=arguments[r];u&&(e=c(e,a.call(this,u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var u in e)s.call(e,u)&&e[u]&&(r=c(r,this&&this[u]||u));return r}function c(e,r){return r?e?e+" "+r:e+r:e}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(j);var M=j.exports;const L=o(M),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"},q={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"},I=t=>w(D,{...t,svg:q});I.displayName="IconHome";const H=L.bind(R),A="purpur-icon",T="md",V=t=>t.filter(s=>Object.keys(s).length>=1).map(s=>`${s.name}="${s.value}"`).join(" "),C=({content:t="",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 ${V(n)}>${a}${t}</svg>`},P=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),D=({["data-testid"]:t,svg:s,allyTitle:n,className:a="",size:c=T,...e})=>{const r=C({content:P(s.svg),title:n}),u=H(a,A,`${A}--${c}`);return w("span",{"aria-label":n,className:u,"data-testid":t,dangerouslySetInnerHTML:{__html:r},...e})};function F(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var O={exports:{}};/*!
6
- Copyright (c) 2018 Jed Watson.
7
- Licensed under the MIT License (MIT), see
8
- http://jedwatson.github.io/classnames
9
- */(function(t){(function(){var s={}.hasOwnProperty;function n(){for(var e="",r=0;r<arguments.length;r++){var u=arguments[r];u&&(e=c(e,a(u)))}return e}function a(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var u in e)s.call(e,u)&&e[u]&&(r=c(r,u));return r}function c(e,r){return r?e?e+" "+r:e+r:e}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(O);var Z=O.exports;const B=F(Z),l={"purpur-breadcrumbs":"_purpur-breadcrumbs_1oiut_1","purpur-breadcrumbs--default":"_purpur-breadcrumbs--default_1oiut_18","purpur-breadcrumbs--negative":"_purpur-breadcrumbs--negative_1oiut_32","purpur-breadcrumbs__list":"_purpur-breadcrumbs__list_1oiut_46","purpur-breadcrumbs__home":"_purpur-breadcrumbs__home_1oiut_54","purpur-breadcrumb-item":"_purpur-breadcrumb-item_1oiut_64","purpur-breadcrumb-item--current":"_purpur-breadcrumb-item--current_1oiut_67","purpur-breadcrumb-item--negative":"_purpur-breadcrumb-item--negative_1oiut_87","purpur-breadcrumb-item__separator":"_purpur-breadcrumb-item__separator_1oiut_90"},U=(t,s,n)=>({"@type":"ListItem",position:n,name:t,item:s}),z=t=>JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t}),k=y("BREADCRUMB_VARIANT",{DEFAULT:"default",NEGATIVE:"negative"}),Y=y("breadcrumbVariants",Object.values(k)),d="purpur-breadcrumbs",_="purpur-breadcrumb-item",J=y("Breadcrumbs",({["data-testid"]:t,ariaLabel:s,children:n,className:a,meta:c=!0,variant:e="default"})=>{const r=B([a,l[d],l[`${d}--${e}`]]),u=x.count(n),m=[],f=x.map(n,(b,Q)=>{const $=Q+1,W=u===$,v=b.props.children,p=typeof v=="string"?null:v.props;let h=null,g=null;return typeof v=="string"?(h=v,g=b.props.href):p!=null&&p.children&&typeof(p==null?void 0:p.children)=="string"&&(h=p.children,g=p.href),h&&g&&m.push(U(h,g,$)),E(b,{current:W,variant:e,...$===1&&{children:i.createElement(i.Fragment,null,i.createElement("span",{className:l[`${d}__home`],"aria-hidden":"true"},i.createElement(I,{size:"xs"})),b.props.children)}})}),N=m.length===u?z(m):null;return i.createElement("nav",{"data-testid":t,"aria-label":s||"Breadcrumb",className:r},i.createElement("ol",{className:l[`${d}__list`]},f),c&&N?i.createElement("script",{type:"application/ld+json","data-testid":"breadcrumbs-meta",dangerouslySetInnerHTML:{__html:N}}):null)}),K=({href:t,["data-testid"]:s,children:n,current:a=!1,variant:c="default",onClick:e,...r})=>{const u=B([l[_],l[`${_}--${c}`]],{[l[`${_}--current`]]:a}),m=()=>{const f={href:t,"data-testid":s,"aria-current":a?"page":void 0,onClick:e};return t||typeof n=="string"?S("a",f,n):E(n,{...f,...n.props})};return i.createElement("li",{...r,className:u},m(),a?null:i.createElement("span",{"aria-hidden":!0,className:l[`${_}__separator`]},"/"))};J.Item=K}}});
10
- //# sourceMappingURL=breadcrumbs.system.js.map