@purpurds/cta-link 5.4.2 → 5.5.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,12 +1,12 @@
1
1
  Name: @purpurds/action
2
- Version: 5.4.1
2
+ Version: 5.4.3
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
6
6
  ---
7
7
 
8
8
  Name: @purpurds/icon
9
- Version: 5.4.1
9
+ Version: 5.4.3
10
10
  License: AGPL-3.0-only
11
11
  Private: false
12
12
 
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),d={SM:"sm",MD:"md",LG:"lg"};function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var f={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),d={SM:"sm",MD:"md",LG:"lg"};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w={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
- */(function(e){(function(){var l={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=u(r,i.call(this,n)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)l.call(r,n)&&r[n]&&(t=u(t,this&&this[n]||n));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(f);var k=f.exports;const b=x(k),$={"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"},j={name:"arrow-left",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-left"],category:"utility"},M={name:"arrow-right",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.9 12a.9.9 0 0 1-.264.636l-5.5 5.5a.9.9 0 0 1-1.272-1.272l3.963-3.964H4a.9.9 0 0 1 0-1.8h13.827l-3.963-3.964a.9.9 0 1 1 1.272-1.272l5.5 5.5A.9.9 0 0 1 20.9 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-right"],category:"utility"},S={name:"external",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M15 3.4a.9.9 0 1 1 0-1.8h6.5a.9.9 0 0 1 .9.9V9a.9.9 0 1 1-1.8 0V4.673l-7.964 7.963a.9.9 0 1 1-1.272-1.272L19.327 3.4H15ZM1.6 5c0-1.05.85-1.9 1.9-1.9h6a.9.9 0 0 1 0 1.8h-6a.1.1 0 0 0-.1.1v15.5a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1V14a.9.9 0 1 1 1.8 0v6.5a1.9 1.9 0 0 1-1.9 1.9h-16a1.9 1.9 0 0 1-1.9-1.9V5Z" clip-rule="evenodd"/></svg>',keywords:["external"],category:"media"},L={name:"phone",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M5.341 2.228c.75-.622 1.73-.43 2.305.145l2.783 2.783a1.9 1.9 0 0 1 0 2.687L8.843 9.43a.1.1 0 0 0 0 .142l5.586 5.585a.1.1 0 0 0 .142 0l1.585-1.585a1.9 1.9 0 0 1 2.687 0l3.5 3.5c.343.342.698 1.023.31 1.742-.346.645-1.173 1.615-3.154 2.936-1.75 1.167-3.667 1.269-5.297.903-1.61-.361-3.015-1.192-3.839-2.016a.9.9 0 0 1 1.273-1.272c.573.572 1.669 1.242 2.96 1.532 1.27.285 2.656.188 3.905-.645 1.483-.989 2.137-1.68 2.418-2.06l-3.348-3.347a.1.1 0 0 0-.142 0l-1.586 1.585a1.9 1.9 0 0 1-2.687 0l-5.585-5.585a1.9 1.9 0 0 1 0-2.688l1.585-1.585a.1.1 0 0 0 0-.142L6.41 3.682c-.447.383-1.183 1.102-2.206 2.38-.878 1.097-1.14 2.08-1.127 2.951.013.898.323 1.758.732 2.59.24.488.733 1.079 1.551 1.88.561.549 1.227 1.152 2.002 1.854.344.312.71.644 1.098 1a.9.9 0 0 1-1.215 1.327c-.367-.336-.722-.658-1.061-.965a77.443 77.443 0 0 1-2.082-1.93c-.831-.813-1.523-1.586-1.909-2.372-.456-.93-.896-2.07-.916-3.356-.02-1.314.399-2.7 1.521-4.103 1.148-1.435 1.995-2.254 2.544-2.71Z" clip-rule="evenodd"/></svg>',keywords:["phone"],category:"device"},O=b.bind($),m="purpur-icon",C="md",q=e=>e.filter(l=>Object.keys(l).length>=1).map(l=>`${l.name}="${l.value}"`).join(" "),N=({content:e="",title:l}={})=>{const a=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},l?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],i=l?`<title>${l}</title>`:"";return`<svg ${q(a)}>${i}${e}</svg>`},A=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),_=({["data-testid"]:e,svg:l,allyTitle:a,className:i="",size:u=C,...r})=>{const t=N({content:A(l.svg),title:a}),n=O(i,m,`${m}--${u}`);return c.jsx("span",{"aria-label":a,className:n,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h={exports:{}};/*!
5
+ */(function(e){(function(){var i={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=l(r,u.call(this,n)))}return r}function u(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)i.call(r,n)&&r[n]&&(t=l(t,this&&this[n]||n));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(w);var j=w.exports;const $=b(j),M={"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"},S={name:"arrow-left",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-left"],category:"utility"},L={name:"arrow-right",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.9 12a.9.9 0 0 1-.264.636l-5.5 5.5a.9.9 0 0 1-1.272-1.272l3.963-3.964H4a.9.9 0 0 1 0-1.8h13.827l-3.963-3.964a.9.9 0 1 1 1.272-1.272l5.5 5.5A.9.9 0 0 1 20.9 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-right"],category:"utility"},O={name:"external",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M15 3.4a.9.9 0 1 1 0-1.8h6.5a.9.9 0 0 1 .9.9V9a.9.9 0 1 1-1.8 0V4.673l-7.964 7.963a.9.9 0 1 1-1.272-1.272L19.327 3.4H15ZM1.6 5c0-1.05.85-1.9 1.9-1.9h6a.9.9 0 0 1 0 1.8h-6a.1.1 0 0 0-.1.1v15.5a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1V14a.9.9 0 1 1 1.8 0v6.5a1.9 1.9 0 0 1-1.9 1.9h-16a1.9 1.9 0 0 1-1.9-1.9V5Z" clip-rule="evenodd"/></svg>',keywords:["external"],category:"media"},q={name:"phone",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M5.341 2.228c.75-.622 1.73-.43 2.305.145l2.783 2.783a1.9 1.9 0 0 1 0 2.687L8.843 9.43a.1.1 0 0 0 0 .142l5.586 5.585a.1.1 0 0 0 .142 0l1.585-1.585a1.9 1.9 0 0 1 2.687 0l3.5 3.5c.343.342.698 1.023.31 1.742-.346.645-1.173 1.615-3.154 2.936-1.75 1.167-3.667 1.269-5.297.903-1.61-.361-3.015-1.192-3.839-2.016a.9.9 0 0 1 1.273-1.272c.573.572 1.669 1.242 2.96 1.532 1.27.285 2.656.188 3.905-.645 1.483-.989 2.137-1.68 2.418-2.06l-3.348-3.347a.1.1 0 0 0-.142 0l-1.586 1.585a1.9 1.9 0 0 1-2.687 0l-5.585-5.585a1.9 1.9 0 0 1 0-2.688l1.585-1.585a.1.1 0 0 0 0-.142L6.41 3.682c-.447.383-1.183 1.102-2.206 2.38-.878 1.097-1.14 2.08-1.127 2.951.013.898.323 1.758.732 2.59.24.488.733 1.079 1.551 1.88.561.549 1.227 1.152 2.002 1.854.344.312.71.644 1.098 1a.9.9 0 0 1-1.215 1.327c-.367-.336-.722-.658-1.061-.965a77.443 77.443 0 0 1-2.082-1.93c-.831-.813-1.523-1.586-1.909-2.372-.456-.93-.896-2.07-.916-3.356-.02-1.314.399-2.7 1.521-4.103 1.148-1.435 1.995-2.254 2.544-2.71Z" clip-rule="evenodd"/></svg>',keywords:["phone"],category:"device"},C=$.bind(M),m="purpur-icon",I="md",N=e=>e.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),A=({content:e="",title:i}={})=>{const a=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},i?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],u=i?`<title>${i}</title>`:"";return`<svg ${N(a)}>${u}${e}</svg>`},P=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),_=({["data-testid"]:e,svg:i,allyTitle:a,className:u="",size:l=I,...r})=>{const t=A({content:P(i.svg),title:a}),n=C(u,m,`${m}--${l}`);return s.jsx("span",{"aria-label":a,className:n,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function V(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var x={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
- */(function(e){(function(){var l={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=u(r,i(n)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)l.call(r,n)&&r[n]&&(t=u(t,n));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(h);var V=h.exports;const B=I(V),s={"purpur-cta-link":"_purpur-cta-link_1mhg7_1","purpur-cta-link--sm":"_purpur-cta-link--sm_1mhg7_33","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_1mhg7_36","purpur-cta-link--md":"_purpur-cta-link--md_1mhg7_39","purpur-cta-link--lg":"_purpur-cta-link--lg_1mhg7_45","purpur-cta-link--full-width":"_purpur-cta-link--full-width_1mhg7_51","purpur-cta-link--primary":"_purpur-cta-link--primary_1mhg7_54","purpur-cta-link--disabled":"_purpur-cta-link--disabled_1mhg7_58","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_1mhg7_64","purpur-cta-link--secondary":"_purpur-cta-link--secondary_1mhg7_76","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_1mhg7_87","purpur-cta-link--expressive":"_purpur-cta-link--expressive_1mhg7_98","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_1mhg7_108"},p="purpur-cta-link",H=["forward","external","back","phone"],P={forward:M,external:S,back:j,phone:L},Z=({children:e,className:l,["data-testid"]:a,fullWidth:i=!1,iconOnly:u,negative:r=!1,size:t=d.MD,variant:n,icon:o="forward",...g})=>{const w=B([l,s[p],s[`${p}--${r?`${n}-negative`:n}`],s[`${p}--${t}`]],{[s[`${p}--icon-only`]]:u,[s[`${p}--negative`]]:r,[s[`${p}--full-width`]]:i}),y=g.href?"a":"span",v=P[o];return c.jsxs(y,{className:w,"data-testid":a,...g,children:[(o==="back"||o==="phone")&&c.jsx(_,{svg:v,size:t===d.LG?"sm":"xs"}),!u&&e,(o==="forward"||o==="external")&&c.jsx(_,{svg:v,size:t===d.LG?"sm":"xs"})]})};exports.CtaLink=Z;exports.ctaLinkIcons=H;
9
+ */(function(e){(function(){var i={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=l(r,u.call(this,n)))}return r}function u(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)i.call(r,n)&&r[n]&&(t=l(t,this&&this[n]||n));return t}function l(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(x);var B=x.exports;const H=V(B),Z={"purpur-cta-link":"_purpur-cta-link_1mhg7_1","purpur-cta-link--sm":"_purpur-cta-link--sm_1mhg7_33","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_1mhg7_36","purpur-cta-link--md":"_purpur-cta-link--md_1mhg7_39","purpur-cta-link--lg":"_purpur-cta-link--lg_1mhg7_45","purpur-cta-link--full-width":"_purpur-cta-link--full-width_1mhg7_51","purpur-cta-link--primary":"_purpur-cta-link--primary_1mhg7_54","purpur-cta-link--disabled":"_purpur-cta-link--disabled_1mhg7_58","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_1mhg7_64","purpur-cta-link--secondary":"_purpur-cta-link--secondary_1mhg7_76","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_1mhg7_87","purpur-cta-link--expressive":"_purpur-cta-link--expressive_1mhg7_98","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_1mhg7_108"},D=H.bind(Z),o="purpur-cta-link",E=["forward","external","back","phone"],G={forward:L,external:O,back:S,phone:q},R=k.forwardRef(({children:e,className:i,["data-testid"]:a,fullWidth:u=!1,iconOnly:l,negative:r=!1,size:t=d.MD,variant:n,icon:p="forward",...c},g)=>{const y=D([i,o,`${o}--${r?`${n}-negative`:n}`,`${o}--${t}`],{[`${o}--icon-only`]:l,[`${o}--negative`]:r,[`${o}--full-width`]:u}),v=G[p],h=s.jsxs(s.Fragment,{children:[(p==="back"||p==="phone")&&s.jsx(_,{svg:v,size:t===d.LG?"sm":"xs"}),!l&&e,(p==="forward"||p==="external")&&s.jsx(_,{svg:v,size:t===d.LG?"sm":"xs"})]}),f={...c,className:y,"data-testid":a};return"href"in c&&c.href?s.jsx("a",{...f,ref:g,children:h}):s.jsx("span",{...f,ref:g,children:h})});exports.CtaLink=R;exports.ctaLinkIcons=E;
10
10
  //# sourceMappingURL=cta-link.cjs.js.map