@purpurds/cta-link 4.2.0 → 4.3.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: 4.1.1
2
+ Version: 4.2.0
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
6
6
  ---
7
7
 
8
8
  Name: @purpurds/icon
9
- Version: 4.1.1
9
+ Version: 4.2.0
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"),o={SM:"sm",MD:"md",LG:"lg"};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),o={SM:"sm",MD:"md",LG:"lg"};function y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var g={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(t){(function(){var i={}.hasOwnProperty;function u(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(r=a(r,p.call(this,n)))}return r}function p(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return u.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var e="";for(var n in r)i.call(r,n)&&r[n]&&(e=a(e,this&&this[n]||n));return e}function a(r,e){return e?r?r+" "+e:r+e:r}t.exports?(u.default=u,t.exports=u):window.classNames=u})()})(d);var y=d.exports;const k=g(y),b={"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"},x={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"},h=k.bind(b),_="purpur-icon",w="md",$=t=>t.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),j=({content:t="",title:i}={})=>{const u=[{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"}],p=i?`<title>${i}</title>`:"";return`<svg ${$(u)}>${p}${t}</svg>`},S=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),O=({["data-testid"]:t,svg:i,allyTitle:u,className:p="",size:a=w,...r})=>{const e=j({content:S(i.svg),title:u}),n=h(p,_,`${_}--${a}`);return c.jsx("span",{"aria-label":u,className:n,"data-testid":t,dangerouslySetInnerHTML:{__html:e},...r})};function M(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f={exports:{}};/*!
5
+ */(function(t){(function(){var l={}.hasOwnProperty;function a(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];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 e="";for(var n in r)l.call(r,n)&&r[n]&&(e=u(e,this&&this[n]||n));return e}function u(r,e){return e?r?r+" "+e:r+e:r}t.exports?(a.default=a,t.exports=a):window.classNames=a})()})(g);var x=g.exports;const k=y(x),b={"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"},$={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"},M={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"},S={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"},L=k.bind(b),_="purpur-icon",O="md",C=t=>t.filter(l=>Object.keys(l).length>=1).map(l=>`${l.name}="${l.value}"`).join(" "),q=({content:t="",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 ${C(a)}>${i}${t}</svg>`},N=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),f=({["data-testid"]:t,svg:l,allyTitle:a,className:i="",size:u=O,...r})=>{const e=q({content:N(l.svg),title:a}),n=L(i,_,`${_}--${u}`);return c.jsx("span",{"aria-label":a,className:n,"data-testid":t,dangerouslySetInnerHTML:{__html:e},...r})};function A(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m={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(t){(function(){var i={}.hasOwnProperty;function u(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(r=a(r,p(n)))}return r}function p(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return u.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var e="";for(var n in r)i.call(r,n)&&r[n]&&(e=a(e,n));return e}function a(r,e){return e?r?r+" "+e:r+e:r}t.exports?(u.default=u,t.exports=u):window.classNames=u})()})(f);var q=f.exports;const N=M(q),s={"purpur-cta-link":"_purpur-cta-link_e7abc_1","purpur-cta-link--sm":"_purpur-cta-link--sm_e7abc_33","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_e7abc_36","purpur-cta-link--md":"_purpur-cta-link--md_e7abc_39","purpur-cta-link--lg":"_purpur-cta-link--lg_e7abc_45","purpur-cta-link--full-width":"_purpur-cta-link--full-width_e7abc_51","purpur-cta-link--primary":"_purpur-cta-link--primary_e7abc_54","purpur-cta-link--disabled":"_purpur-cta-link--disabled_e7abc_58","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_e7abc_64","purpur-cta-link--secondary":"_purpur-cta-link--secondary_e7abc_76","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_e7abc_87","purpur-cta-link--expressive":"_purpur-cta-link--expressive_e7abc_98","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_e7abc_108"},l="purpur-cta-link",P=({children:t,className:i,["data-testid"]:u,fullWidth:p=!1,iconOnly:a,size:r=o.MD,variant:e,...n})=>{const v=N([i,s[l],s[`${l}--${e}`],s[`${l}--${r}`]],{[s[`${l}--icon-only`]]:a,[s[`${l}--negative`]]:e.endsWith("negative"),[s[`${l}--full-width`]]:p}),m=n.href?"a":"span";return c.jsxs(m,{className:v,"data-testid":u,...n,children:[t&&!a&&t," ",c.jsx(O,{svg:x,size:r===o.LG?"sm":"xs"})]})};exports.CtaLink=P;
9
+ */(function(t){(function(){var l={}.hasOwnProperty;function a(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];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 e="";for(var n in r)l.call(r,n)&&r[n]&&(e=u(e,n));return e}function u(r,e){return e?r?r+" "+e:r+e:r}t.exports?(a.default=a,t.exports=a):window.classNames=a})()})(m);var H=m.exports;const P=A(H),s={"purpur-cta-link":"_purpur-cta-link_e7abc_1","purpur-cta-link--sm":"_purpur-cta-link--sm_e7abc_33","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_e7abc_36","purpur-cta-link--md":"_purpur-cta-link--md_e7abc_39","purpur-cta-link--lg":"_purpur-cta-link--lg_e7abc_45","purpur-cta-link--full-width":"_purpur-cta-link--full-width_e7abc_51","purpur-cta-link--primary":"_purpur-cta-link--primary_e7abc_54","purpur-cta-link--disabled":"_purpur-cta-link--disabled_e7abc_58","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_e7abc_64","purpur-cta-link--secondary":"_purpur-cta-link--secondary_e7abc_76","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_e7abc_87","purpur-cta-link--expressive":"_purpur-cta-link--expressive_e7abc_98","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_e7abc_108"},p="purpur-cta-link",V=["forward","external","back","phone"],B={forward:$,external:M,back:j,phone:S},I=({children:t,className:l,["data-testid"]:a,fullWidth:i=!1,iconOnly:u,size:r=o.MD,variant:e,icon:n="forward",...d})=>{const w=P([l,s[p],s[`${p}--${e}`],s[`${p}--${r}`]],{[s[`${p}--icon-only`]]:u,[s[`${p}--negative`]]:e.endsWith("negative"),[s[`${p}--full-width`]]:i}),h=d.href?"a":"span",v=B[n];return c.jsxs(h,{className:w,"data-testid":a,...d,children:[(n==="back"||n==="phone")&&c.jsx(f,{svg:v,size:r===o.LG?"sm":"xs"}),!u&&t,(n==="forward"||n==="external")&&c.jsx(f,{svg:v,size:r===o.LG?"sm":"xs"})]})};exports.CtaLink=I;exports.ctaLinkIcons=V;
10
10
  //# sourceMappingURL=cta-link.cjs.js.map