@purpurds/cta-link 8.4.0 → 8.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,5 +1,5 @@
1
1
  Name: @purpurds/icon
2
- Version: 8.3.1
2
+ Version: 8.4.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 s=require("react/jsx-runtime"),j=require("react");function S(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var x={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),S=require("react");function q(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h={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 w;function q(){return w||(w=1,(function(t){(function(){var a={}.hasOwnProperty;function i(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];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 i.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)a.call(r,n)&&r[n]&&(e=l(e,this&&this[n]||n));return e}function l(r,e){return e?r?r+" "+e:r+e:r}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})(x)),x.exports}var C=q();const L=S(C),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"},N=L.bind(M),y="purpur-icon",O="md",B=t=>t.filter(a=>Object.keys(a).length>=1).map(a=>`${a.name}="${a.value}"`).join(" "),A=({content:t="",title:a}={})=>{const i=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},a?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],u=a?`<title>${a}</title>`:"";return`<svg ${B(i)}>${u}${t}</svg>`},P=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),v=({svg:t,allyTitle:a,className:i,size:u=O,...l})=>{const r=A({content:P(t.svg),title:a}),e=N(i,y,`${y}--${u}`);return s.jsx("span",{className:e,dangerouslySetInnerHTML:{__html:r},...l})};v.displayName="Icon";const H={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"},V={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"},Z={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"},I={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"};function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={exports:{}};/*!
5
+ */var m;function M(){return m||(m=1,(function(t){(function(){var i={}.hasOwnProperty;function a(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(r=s(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 e="";for(var n in r)i.call(r,n)&&r[n]&&(e=s(e,this&&this[n]||n));return e}function s(r,e){return e?r?r+" "+e:r+e:r}t.exports?(a.default=a,t.exports=a):window.classNames=a})()})(h)),h.exports}var L=M();const N=q(L),C={"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"},O=N.bind(C),x="purpur-icon",B="md",A=t=>t.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),P=({content:t="",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 ${A(a)}>${u}${t}</svg>`},H=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),b=({svg:t,allyTitle:i,className:a,size:u=B,...s})=>{const r=P({content:H(t.svg),title:i}),e=O(a,x,`${x}--${u}`);return l.jsx("span",{className:e,dangerouslySetInnerHTML:{__html:r},...s})};b.displayName="Icon";const V={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"},Z={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"},I={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"},R={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"};function T(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={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 k;function T(){return k||(k=1,(function(t){(function(){var a={}.hasOwnProperty;function i(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];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 i.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)a.call(r,n)&&r[n]&&(e=l(e,this&&this[n]||n));return e}function l(r,e){return e?r?r+" "+e:r+e:r}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})(d)),d.exports}var E=T();const F=R(E),z={"purpur-cta-link":"_purpur-cta-link_1i7hm_1","purpur-cta-link--xs":"_purpur-cta-link--xs_1i7hm_22","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_1i7hm_25","purpur-cta-link--sm":"_purpur-cta-link--sm_1i7hm_28","purpur-cta-link--md":"_purpur-cta-link--md_1i7hm_34","purpur-cta-link--lg":"_purpur-cta-link--lg_1i7hm_40","purpur-cta-link--full-width":"_purpur-cta-link--full-width_1i7hm_46","purpur-cta-link--primary":"_purpur-cta-link--primary_1i7hm_64","purpur-cta-link--disabled":"_purpur-cta-link--disabled_1i7hm_68","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_1i7hm_74","purpur-cta-link--secondary":"_purpur-cta-link--secondary_1i7hm_86","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_1i7hm_97","purpur-cta-link--expressive":"_purpur-cta-link--expressive_1i7hm_108","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_1i7hm_118"},D=F.bind(z),o="purpur-cta-link",W=["forward","external","back","phone"],G={forward:V,external:Z,back:H,phone:I},b=j.forwardRef(({children:t,className:a,["data-testid"]:i,fullWidth:u=!1,iconOnly:l=!1,showIcon:r=!0,negative:e=!1,size:n="md",variant:f,icon:p="forward",...c},m)=>{const $=D([a,o,`${o}--${e?`${f}-negative`:f}`,`${o}--${n}`],{[`${o}--icon-only`]:l,[`${o}--negative`]:e,[`${o}--full-width`]:u}),_=G[p],h=s.jsxs(s.Fragment,{children:[r&&(p==="back"||p==="phone")&&s.jsx(v,{svg:_,size:n==="lg"?"sm":"xs"}),(!l||l&&!r)&&t,r&&(p==="forward"||p==="external")&&s.jsx(v,{svg:_,size:n==="lg"?"sm":"xs"})]}),g={...c,className:$,"data-testid":i};return"href"in c&&c.href?s.jsx("a",{...g,ref:m,children:h}):s.jsx("span",{...g,ref:m,children:h})});b.displayName="CtaLink";exports.CtaLink=b;exports.ctaLinkIcons=W;
9
+ */var w;function E(){return w||(w=1,(function(t){(function(){var i={}.hasOwnProperty;function a(){for(var r="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(r=s(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 e="";for(var n in r)i.call(r,n)&&r[n]&&(e=s(e,this&&this[n]||n));return e}function s(r,e){return e?r?r+" "+e:r+e:r}t.exports?(a.default=a,t.exports=a):window.classNames=a})()})(d)),d.exports}var F=E();const z=T(F),D={"purpur-cta-link":"_purpur-cta-link_y2ds9_1","purpur-cta-link--xs":"_purpur-cta-link--xs_y2ds9_22","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_y2ds9_25","purpur-cta-link--sm":"_purpur-cta-link--sm_y2ds9_28","purpur-cta-link--md":"_purpur-cta-link--md_y2ds9_34","purpur-cta-link--lg":"_purpur-cta-link--lg_y2ds9_40","purpur-cta-link--full-width":"_purpur-cta-link--full-width_y2ds9_46","purpur-cta-link--primary":"_purpur-cta-link--primary_y2ds9_64","purpur-cta-link--disabled":"_purpur-cta-link--disabled_y2ds9_68","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_y2ds9_74","purpur-cta-link--secondary":"_purpur-cta-link--secondary_y2ds9_86","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_y2ds9_97","purpur-cta-link--expressive":"_purpur-cta-link--expressive_y2ds9_108","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_y2ds9_118","purpur-cta-link__icon":"_purpur-cta-link__icon_y2ds9_130"},k=z.bind(D),o="purpur-cta-link",W=["forward","external","back","phone"],G={forward:Z,external:I,back:V,phone:R},$=S.forwardRef(({children:t,className:i,["data-testid"]:a,fullWidth:u=!1,iconOnly:s=!1,showIcon:r=!0,negative:e=!1,size:n="md",variant:_,icon:p="forward",...c},v)=>{const j=k([i,o,`${o}--${e?`${_}-negative`:_}`,`${o}--${n}`],{[`${o}--icon-only`]:s,[`${o}--negative`]:e,[`${o}--full-width`]:u}),f=()=>l.jsx(b,{svg:G[p],size:n==="lg"?"sm":"xs",className:k(`${o}__icon`)}),g=l.jsxs(l.Fragment,{children:[r&&(p==="back"||p==="phone")&&l.jsx(f,{}),(!s||s&&!r)&&t,r&&(p==="forward"||p==="external")&&l.jsx(f,{})]}),y={...c,className:j,"data-testid":a};return"href"in c&&c.href?l.jsx("a",{...y,ref:v,children:g}):l.jsx("span",{...y,ref:v,children:g})});$.displayName="CtaLink";exports.CtaLink=$;exports.ctaLinkIcons=W;
10
10
  //# sourceMappingURL=cta-link.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cta-link.cjs.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/arrow-left.es.js","../../icon/dist/assets/arrow-right.es.js","../../icon/dist/assets/external.es.js","../../icon/dist/assets/phone.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/cta-link.tsx"],"sourcesContent":["import { jsx as a } from \"react/jsx-runtime\";\nfunction f(r) {\n return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, \"default\") ? r.default : r;\n}\nvar c = { exports: {} };\n/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\nvar p;\nfunction m() {\n return p || (p = 1, (function(r) {\n (function() {\n var e = {}.hasOwnProperty;\n function s() {\n for (var t = \"\", n = 0; n < arguments.length; n++) {\n var o = arguments[n];\n o && (t = i(t, u.call(this, o)));\n }\n return t;\n }\n function u(t) {\n if (typeof t == \"string\" || typeof t == \"number\")\n return this && this[t] || t;\n if (typeof t != \"object\")\n return \"\";\n if (Array.isArray(t))\n return s.apply(this, t);\n if (t.toString !== Object.prototype.toString && !t.toString.toString().includes(\"[native code]\"))\n return t.toString();\n var n = \"\";\n for (var o in t)\n e.call(t, o) && t[o] && (n = i(n, this && this[o] || o));\n return n;\n }\n function i(t, n) {\n return n ? t ? t + \" \" + n : t + n : t;\n }\n r.exports ? (s.default = s, r.exports = s) : window.classNames = s;\n })();\n })(c)), c.exports;\n}\nvar _ = m();\nconst v = /* @__PURE__ */ f(_), d = {\n \"purpur-icon\": \"_purpur-icon_8u1lq_1\",\n \"purpur-icon--xxs\": \"_purpur-icon--xxs_8u1lq_4\",\n \"purpur-icon--xs\": \"_purpur-icon--xs_8u1lq_8\",\n \"purpur-icon--sm\": \"_purpur-icon--sm_8u1lq_12\",\n \"purpur-icon--md\": \"_purpur-icon--md_8u1lq_16\",\n \"purpur-icon--lg\": \"_purpur-icon--lg_8u1lq_20\",\n \"purpur-icon--xl\": \"_purpur-icon--xl_8u1lq_24\"\n}, x = v.bind(d), l = \"purpur-icon\", w = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"], g = \"md\", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}=\"${e.value}\"`).join(\" \"), y = ({ content: r = \"\", title: e } = {}) => {\n const s = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n e ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" }\n ], u = e ? `<title>${e}</title>` : \"\";\n return `<svg ${h(s)}>${u}${r}</svg>`;\n}, S = (r) => r.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim(), b = ({ svg: r, allyTitle: e, className: s, size: u = g, ...i }) => {\n const t = y({\n content: S(r.svg),\n title: e\n }), n = x(s, l, `${l}--${u}`);\n return /* @__PURE__ */ a(\"span\", { className: n, dangerouslySetInnerHTML: { __html: t }, ...i });\n};\nb.displayName = \"Icon\";\nexport {\n g as DEFAULT_SIZE,\n b as Icon,\n w as sizes\n};\n//# sourceMappingURL=icon.es.js.map\n","const e = {\n name: \"arrow-left\",\n 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>',\n keywords: [\"arrow-left\"],\n category: \"utility\"\n};\nexport {\n e as arrowLeft\n};\n//# sourceMappingURL=arrow-left.es.js.map\n","const r = {\n name: \"arrow-right\",\n 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>',\n keywords: [\"arrow-right\"],\n category: \"utility\"\n};\nexport {\n r as arrowRight\n};\n//# sourceMappingURL=arrow-right.es.js.map\n","const e = {\n name: \"external\",\n 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>',\n keywords: [\"external\"],\n category: \"media\"\n};\nexport {\n e as external\n};\n//# sourceMappingURL=external.es.js.map\n","const e = {\n name: \"phone\",\n 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>',\n keywords: [\"phone\"],\n category: \"device\"\n};\nexport {\n e as phone\n};\n//# sourceMappingURL=phone.es.js.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ForwardedRef, forwardRef } from \"react\";\nimport type { ActionProps } from \"@purpurds/action\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { arrowLeft } from \"@purpurds/icon/assets/arrow-left\";\nimport { arrowRight } from \"@purpurds/icon/assets/arrow-right\";\nimport { external } from \"@purpurds/icon/assets/external\";\nimport { phone } from \"@purpurds/icon/assets/phone\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./cta-link.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-cta-link\";\n\nexport const ctaLinkIcons = [\"forward\", \"external\", \"back\", \"phone\"] as const;\nexport type CtaLinkIcon = (typeof ctaLinkIcons)[number];\n\nconst iconMapping = {\n forward: arrowRight,\n external: external,\n back: arrowLeft,\n phone: phone,\n};\n\ntype CtaLinkBaseProps = {\n icon?: CtaLinkIcon;\n showIcon?: boolean;\n};\n\nexport type CtaAnchorProps = ActionProps &\n Omit<BaseProps<\"a\">, \"href\"> & {\n href: string;\n };\n\ntype SpanProps = ActionProps & BaseProps<\"span\">;\n\nexport type CtaLinkProps = CtaLinkBaseProps & (CtaAnchorProps | SpanProps);\n\nexport const CtaLink = forwardRef<HTMLAnchorElement | HTMLSpanElement, CtaLinkProps>(\n (\n {\n children,\n className,\n [\"data-testid\"]: dataTestid,\n fullWidth = false,\n iconOnly = false,\n showIcon = true,\n negative = false,\n size = \"md\",\n variant,\n icon = \"forward\",\n ...props\n },\n ref\n ) => {\n const classes = cx(\n [\n className,\n rootClassName,\n `${rootClassName}--${negative ? `${variant}-negative` : variant}`,\n `${rootClassName}--${size}`,\n ],\n {\n [`${rootClassName}--icon-only`]: iconOnly,\n [`${rootClassName}--negative`]: negative,\n [`${rootClassName}--full-width`]: fullWidth,\n }\n );\n\n const IconComponent = iconMapping[icon];\n\n const childrenWithIcons = (\n <>\n {showIcon && (icon === \"back\" || icon === \"phone\") && (\n <Icon svg={IconComponent} size={size === \"lg\" ? \"sm\" : \"xs\"} />\n )}\n {(!iconOnly || (iconOnly && !showIcon)) && children}\n {showIcon && (icon === \"forward\" || icon === \"external\") && (\n <Icon svg={IconComponent} size={size === \"lg\" ? \"sm\" : \"xs\"} />\n )}\n </>\n );\n\n const sharedProps = {\n ...props,\n className: classes,\n [\"data-testid\"]: dataTestid,\n };\n\n return \"href\" in props && props.href ? (\n <a {...sharedProps} ref={ref as ForwardedRef<HTMLAnchorElement>}>\n {childrenWithIcons}\n </a>\n ) : (\n <span {...sharedProps} ref={ref as ForwardedRef<HTMLSpanElement>}>\n {childrenWithIcons}\n </span>\n );\n }\n);\n\nCtaLink.displayName = \"CtaLink\";\n"],"names":["f","r","c","p","m","e","s","t","n","o","i","_","v","d","x","l","g","h","y","S","b","a","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","cx","styles","rootClassName","ctaLinkIcons","iconMapping","arrowRight","external","arrowLeft","phone","CtaLink","forwardRef","children","className","dataTestid","fullWidth","iconOnly","showIcon","negative","size","variant","icon","props","ref","IconComponent","childrenWithIcons","jsxs","Fragment","jsx","Icon","sharedProps"],"mappings":"wIACA,SAASA,EAAEC,EAAG,CACZ,OAAOA,GAAKA,EAAE,YAAc,OAAO,UAAU,eAAe,KAAKA,EAAG,SAAS,EAAIA,EAAE,QAAUA,CAC/F,CACA,IAAIC,EAAI,CAAE,QAAS,EAAE,EACrB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAIC,EACJ,SAASC,GAAI,CACX,OAAOD,IAAMA,EAAI,GAAI,SAASF,EAAG,EAC9B,UAAW,CACV,IAAII,EAAI,CAAA,EAAG,eACX,SAASC,GAAI,CACX,QAASC,EAAI,GAAIC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACjD,IAAIC,EAAI,UAAUD,CAAC,EACnBC,IAAMF,EAAIG,EAAEH,EAAG,EAAE,KAAK,KAAME,CAAC,CAAC,EAChC,CACA,OAAOF,CACT,CACA,SAAS,EAAEA,EAAG,CACZ,GAAI,OAAOA,GAAK,UAAY,OAAOA,GAAK,SACtC,OAAO,MAAQ,KAAKA,CAAC,GAAKA,EAC5B,GAAI,OAAOA,GAAK,SACd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EAChC,CAAC,GAAGf,CAAa,cAAc,EAAGY,CAAA,CACpC,EAGIS,EAAgBnB,EAAYgB,CAAI,EAEhCI,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACG,SAAA,CAAAV,IAAaI,IAAS,QAAUA,IAAS,UACxCO,EAAAA,IAACC,EAAA,CAAK,IAAKL,EAAe,KAAML,IAAS,KAAO,KAAO,KAAM,GAE7D,CAACH,GAAaA,GAAY,CAACC,IAAcL,EAC1CK,IAAaI,IAAS,WAAaA,IAAS,aAC3CO,EAAAA,IAACC,EAAA,CAAK,IAAKL,EAAe,KAAML,IAAS,KAAO,KAAO,IAAA,CAAM,CAAA,EAEjE,EAGIW,EAAc,CAClB,GAAGR,EACH,UAAW7B,EACV,cAAgBqB,CAAA,EAGnB,MAAO,SAAUQ,GAASA,EAAM,KAC9BM,EAAAA,IAAC,KAAG,GAAGE,EAAa,IAAAP,EACjB,SAAAE,CAAA,CACH,EAEAG,EAAAA,IAAC,OAAA,CAAM,GAAGE,EAAa,IAAAP,EACpB,SAAAE,EACH,CAEJ,CACF,EAEAf,EAAQ,YAAc","x_google_ignoreList":[5]}
1
+ {"version":3,"file":"cta-link.cjs.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/arrow-left.es.js","../../icon/dist/assets/arrow-right.es.js","../../icon/dist/assets/external.es.js","../../icon/dist/assets/phone.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/cta-link.tsx"],"sourcesContent":["import { jsx as a } from \"react/jsx-runtime\";\nfunction f(r) {\n return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, \"default\") ? r.default : r;\n}\nvar c = { exports: {} };\n/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\nvar p;\nfunction m() {\n return p || (p = 1, (function(r) {\n (function() {\n var e = {}.hasOwnProperty;\n function s() {\n for (var t = \"\", n = 0; n < arguments.length; n++) {\n var o = arguments[n];\n o && (t = i(t, u.call(this, o)));\n }\n return t;\n }\n function u(t) {\n if (typeof t == \"string\" || typeof t == \"number\")\n return this && this[t] || t;\n if (typeof t != \"object\")\n return \"\";\n if (Array.isArray(t))\n return s.apply(this, t);\n if (t.toString !== Object.prototype.toString && !t.toString.toString().includes(\"[native code]\"))\n return t.toString();\n var n = \"\";\n for (var o in t)\n e.call(t, o) && t[o] && (n = i(n, this && this[o] || o));\n return n;\n }\n function i(t, n) {\n return n ? t ? t + \" \" + n : t + n : t;\n }\n r.exports ? (s.default = s, r.exports = s) : window.classNames = s;\n })();\n })(c)), c.exports;\n}\nvar _ = m();\nconst v = /* @__PURE__ */ f(_), d = {\n \"purpur-icon\": \"_purpur-icon_8u1lq_1\",\n \"purpur-icon--xxs\": \"_purpur-icon--xxs_8u1lq_4\",\n \"purpur-icon--xs\": \"_purpur-icon--xs_8u1lq_8\",\n \"purpur-icon--sm\": \"_purpur-icon--sm_8u1lq_12\",\n \"purpur-icon--md\": \"_purpur-icon--md_8u1lq_16\",\n \"purpur-icon--lg\": \"_purpur-icon--lg_8u1lq_20\",\n \"purpur-icon--xl\": \"_purpur-icon--xl_8u1lq_24\"\n}, x = v.bind(d), l = \"purpur-icon\", w = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"], g = \"md\", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}=\"${e.value}\"`).join(\" \"), y = ({ content: r = \"\", title: e } = {}) => {\n const s = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n e ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" }\n ], u = e ? `<title>${e}</title>` : \"\";\n return `<svg ${h(s)}>${u}${r}</svg>`;\n}, S = (r) => r.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim(), b = ({ svg: r, allyTitle: e, className: s, size: u = g, ...i }) => {\n const t = y({\n content: S(r.svg),\n title: e\n }), n = x(s, l, `${l}--${u}`);\n return /* @__PURE__ */ a(\"span\", { className: n, dangerouslySetInnerHTML: { __html: t }, ...i });\n};\nb.displayName = \"Icon\";\nexport {\n g as DEFAULT_SIZE,\n b as Icon,\n w as sizes\n};\n//# sourceMappingURL=icon.es.js.map\n","const e = {\n name: \"arrow-left\",\n 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>',\n keywords: [\"arrow-left\"],\n category: \"utility\"\n};\nexport {\n e as arrowLeft\n};\n//# sourceMappingURL=arrow-left.es.js.map\n","const r = {\n name: \"arrow-right\",\n 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>',\n keywords: [\"arrow-right\"],\n category: \"utility\"\n};\nexport {\n r as arrowRight\n};\n//# sourceMappingURL=arrow-right.es.js.map\n","const e = {\n name: \"external\",\n 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>',\n keywords: [\"external\"],\n category: \"media\"\n};\nexport {\n e as external\n};\n//# sourceMappingURL=external.es.js.map\n","const e = {\n name: \"phone\",\n 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>',\n keywords: [\"phone\"],\n category: \"device\"\n};\nexport {\n e as phone\n};\n//# sourceMappingURL=phone.es.js.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ForwardedRef, forwardRef } from \"react\";\nimport type { ActionProps } from \"@purpurds/action\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { arrowLeft } from \"@purpurds/icon/assets/arrow-left\";\nimport { arrowRight } from \"@purpurds/icon/assets/arrow-right\";\nimport { external } from \"@purpurds/icon/assets/external\";\nimport { phone } from \"@purpurds/icon/assets/phone\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./cta-link.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-cta-link\";\n\nexport const ctaLinkIcons = [\"forward\", \"external\", \"back\", \"phone\"] as const;\nexport type CtaLinkIcon = (typeof ctaLinkIcons)[number];\n\nconst iconMapping = {\n forward: arrowRight,\n external: external,\n back: arrowLeft,\n phone: phone,\n};\n\ntype CtaLinkBaseProps = {\n icon?: CtaLinkIcon;\n showIcon?: boolean;\n};\n\nexport type CtaAnchorProps = ActionProps &\n Omit<BaseProps<\"a\">, \"href\"> & {\n href: string;\n };\n\ntype SpanProps = ActionProps & BaseProps<\"span\">;\n\nexport type CtaLinkProps = CtaLinkBaseProps & (CtaAnchorProps | SpanProps);\n\nexport const CtaLink = forwardRef<HTMLAnchorElement | HTMLSpanElement, CtaLinkProps>(\n (\n {\n children,\n className,\n [\"data-testid\"]: dataTestid,\n fullWidth = false,\n iconOnly = false,\n showIcon = true,\n negative = false,\n size = \"md\",\n variant,\n icon = \"forward\",\n ...props\n },\n ref\n ) => {\n const classes = cx(\n [\n className,\n rootClassName,\n `${rootClassName}--${negative ? `${variant}-negative` : variant}`,\n `${rootClassName}--${size}`,\n ],\n {\n [`${rootClassName}--icon-only`]: iconOnly,\n [`${rootClassName}--negative`]: negative,\n [`${rootClassName}--full-width`]: fullWidth,\n }\n );\n\n const MappedIcon = () => (\n <Icon\n svg={iconMapping[icon]}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n className={cx(`${rootClassName}__icon`)}\n />\n );\n\n const childrenWithIcons = (\n <>\n {showIcon && (icon === \"back\" || icon === \"phone\") && <MappedIcon />}\n {(!iconOnly || (iconOnly && !showIcon)) && children}\n {showIcon && (icon === \"forward\" || icon === \"external\") && <MappedIcon />}\n </>\n );\n\n const sharedProps = {\n ...props,\n className: classes,\n [\"data-testid\"]: dataTestid,\n };\n\n return \"href\" in props && props.href ? (\n <a {...sharedProps} ref={ref as ForwardedRef<HTMLAnchorElement>}>\n {childrenWithIcons}\n </a>\n ) : (\n <span {...sharedProps} ref={ref as ForwardedRef<HTMLSpanElement>}>\n {childrenWithIcons}\n </span>\n );\n }\n);\n\nCtaLink.displayName = \"CtaLink\";\n"],"names":["f","r","c","p","m","e","s","t","n","o","i","_","v","d","x","l","g","h","y","S","a","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","cx","styles","rootClassName","ctaLinkIcons","iconMapping","arrowRight","external","arrowLeft","phone","CtaLink","forwardRef","children","className","dataTestid","fullWidth","iconOnly","showIcon","negative","size","variant","icon","props","ref","MappedIcon","jsx","Icon","childrenWithIcons","jsxs","Fragment","sharedProps"],"mappings":"wIACA,SAASA,EAAEC,EAAG,CACZ,OAAOA,GAAKA,EAAE,YAAc,OAAO,UAAU,eAAe,KAAKA,EAAG,SAAS,EAAIA,EAAE,QAAUA,CAC/F,CACA,IAAIC,EAAI,CAAE,QAAS,EAAE,EACrB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAIC,EACJ,SAASC,GAAI,CACX,OAAOD,IAAMA,EAAI,GAAI,SAASF,EAAG,EAC9B,UAAW,CACV,IAAII,EAAI,CAAA,EAAG,eACX,SAASC,GAAI,CACX,QAASC,EAAI,GAAIC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACjD,IAAIC,EAAI,UAAUD,CAAC,EACnBC,IAAMF,EAAIG,EAAEH,EAAG,EAAE,KAAK,KAAME,CAAC,CAAC,EAChC,CACA,OAAOF,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C,cAAc,GAAG,SAAS,CAAC,CAAC;AAE3E,eAAO,MAAM,OAAO;;;;;;;;;;;;;;UAPV,MAAM;;;;;;;;;;;;;;UAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;sEAsEf,CAAC"}
@@ -1,20 +1,20 @@
1
- import { jsx as p, jsxs as $, Fragment as S } from "react/jsx-runtime";
2
- import { forwardRef as j } from "react";
3
- function q(t) {
1
+ import { jsx as p, jsxs as S, Fragment as j } from "react/jsx-runtime";
2
+ import { forwardRef as M } from "react";
3
+ function N(t) {
4
4
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
5
5
  }
6
- var w = { exports: {} };
6
+ var m = { exports: {} };
7
7
  /*!
8
8
  Copyright (c) 2018 Jed Watson.
9
9
  Licensed under the MIT License (MIT), see
10
10
  http://jedwatson.github.io/classnames
11
11
  */
12
- var x;
13
- function C() {
14
- return x || (x = 1, (function(t) {
12
+ var h;
13
+ function q() {
14
+ return h || (h = 1, (function(t) {
15
15
  (function() {
16
- var a = {}.hasOwnProperty;
17
- function i() {
16
+ var i = {}.hasOwnProperty;
17
+ function a() {
18
18
  for (var r = "", e = 0; e < arguments.length; e++) {
19
19
  var n = arguments[e];
20
20
  n && (r = l(r, u.call(this, n)));
@@ -27,23 +27,23 @@ function C() {
27
27
  if (typeof r != "object")
28
28
  return "";
29
29
  if (Array.isArray(r))
30
- return i.apply(this, r);
30
+ return a.apply(this, r);
31
31
  if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
32
32
  return r.toString();
33
33
  var e = "";
34
34
  for (var n in r)
35
- a.call(r, n) && r[n] && (e = l(e, this && this[n] || n));
35
+ i.call(r, n) && r[n] && (e = l(e, this && this[n] || n));
36
36
  return e;
37
37
  }
38
38
  function l(r, e) {
39
39
  return e ? r ? r + " " + e : r + e : r;
40
40
  }
41
- t.exports ? (i.default = i, t.exports = i) : window.classNames = i;
41
+ t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
42
42
  })();
43
- })(w)), w.exports;
43
+ })(m)), m.exports;
44
44
  }
45
- var M = C();
46
- const N = /* @__PURE__ */ q(M), L = {
45
+ var C = q();
46
+ const L = /* @__PURE__ */ N(C), O = {
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,44 +51,44 @@ const N = /* @__PURE__ */ q(M), L = {
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
- }, O = N.bind(L), y = "purpur-icon", B = "md", A = (t) => t.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), H = ({ content: t = "", title: a } = {}) => {
55
- const i = [
54
+ }, B = L.bind(O), w = "purpur-icon", A = "md", H = (t) => t.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), P = ({ content: t = "", title: i } = {}) => {
55
+ const a = [
56
56
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
57
57
  { name: "fill", value: "currentColor" },
58
58
  { name: "viewBox", value: "0 0 24 24" },
59
- a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
60
- ], u = a ? `<title>${a}</title>` : "";
61
- return `<svg ${A(i)}>${u}${t}</svg>`;
62
- }, P = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), f = ({ svg: t, allyTitle: a, className: i, size: u = B, ...l }) => {
63
- const r = H({
64
- content: P(t.svg),
65
- title: a
66
- }), e = O(i, y, `${y}--${u}`);
59
+ i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
60
+ ], u = i ? `<title>${i}</title>` : "";
61
+ return `<svg ${H(a)}>${u}${t}</svg>`;
62
+ }, V = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), $ = ({ svg: t, allyTitle: i, className: a, size: u = A, ...l }) => {
63
+ const r = P({
64
+ content: V(t.svg),
65
+ title: i
66
+ }), e = B(a, w, `${w}--${u}`);
67
67
  return /* @__PURE__ */ p("span", { className: e, dangerouslySetInnerHTML: { __html: r }, ...l });
68
68
  };
69
- f.displayName = "Icon";
70
- const V = {
69
+ $.displayName = "Icon";
70
+ const Z = {
71
71
  name: "arrow-left",
72
72
  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>',
73
73
  keywords: ["arrow-left"],
74
74
  category: "utility"
75
- }, Z = {
75
+ }, I = {
76
76
  name: "arrow-right",
77
77
  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>',
78
78
  keywords: ["arrow-right"],
79
79
  category: "utility"
80
- }, I = {
80
+ }, E = {
81
81
  name: "external",
82
82
  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>',
83
83
  keywords: ["external"],
84
84
  category: "media"
85
- }, E = {
85
+ }, F = {
86
86
  name: "phone",
87
87
  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>',
88
88
  keywords: ["phone"],
89
89
  category: "device"
90
90
  };
91
- function F(t) {
91
+ function R(t) {
92
92
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
93
93
  }
94
94
  var d = { exports: {} };
@@ -97,12 +97,12 @@ var d = { exports: {} };
97
97
  Licensed under the MIT License (MIT), see
98
98
  http://jedwatson.github.io/classnames
99
99
  */
100
- var k;
101
- function R() {
102
- return k || (k = 1, (function(t) {
100
+ var x;
101
+ function T() {
102
+ return x || (x = 1, (function(t) {
103
103
  (function() {
104
- var a = {}.hasOwnProperty;
105
- function i() {
104
+ var i = {}.hasOwnProperty;
105
+ function a() {
106
106
  for (var r = "", e = 0; e < arguments.length; e++) {
107
107
  var n = arguments[e];
108
108
  n && (r = l(r, u.call(this, n)));
@@ -115,61 +115,62 @@ function R() {
115
115
  if (typeof r != "object")
116
116
  return "";
117
117
  if (Array.isArray(r))
118
- return i.apply(this, r);
118
+ return a.apply(this, r);
119
119
  if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
120
120
  return r.toString();
121
121
  var e = "";
122
122
  for (var n in r)
123
- a.call(r, n) && r[n] && (e = l(e, this && this[n] || n));
123
+ i.call(r, n) && r[n] && (e = l(e, this && this[n] || n));
124
124
  return e;
125
125
  }
126
126
  function l(r, e) {
127
127
  return e ? r ? r + " " + e : r + e : r;
128
128
  }
129
- t.exports ? (i.default = i, t.exports = i) : window.classNames = i;
129
+ t.exports ? (a.default = a, t.exports = a) : window.classNames = a;
130
130
  })();
131
131
  })(d)), d.exports;
132
132
  }
133
- var T = R();
134
- const z = /* @__PURE__ */ F(T), D = {
135
- "purpur-cta-link": "_purpur-cta-link_1i7hm_1",
136
- "purpur-cta-link--xs": "_purpur-cta-link--xs_1i7hm_22",
137
- "purpur-cta-link--icon-only": "_purpur-cta-link--icon-only_1i7hm_25",
138
- "purpur-cta-link--sm": "_purpur-cta-link--sm_1i7hm_28",
139
- "purpur-cta-link--md": "_purpur-cta-link--md_1i7hm_34",
140
- "purpur-cta-link--lg": "_purpur-cta-link--lg_1i7hm_40",
141
- "purpur-cta-link--full-width": "_purpur-cta-link--full-width_1i7hm_46",
142
- "purpur-cta-link--primary": "_purpur-cta-link--primary_1i7hm_64",
143
- "purpur-cta-link--disabled": "_purpur-cta-link--disabled_1i7hm_68",
144
- "purpur-cta-link--primary-negative": "_purpur-cta-link--primary-negative_1i7hm_74",
145
- "purpur-cta-link--secondary": "_purpur-cta-link--secondary_1i7hm_86",
146
- "purpur-cta-link--secondary-negative": "_purpur-cta-link--secondary-negative_1i7hm_97",
147
- "purpur-cta-link--expressive": "_purpur-cta-link--expressive_1i7hm_108",
148
- "purpur-cta-link--expressive-negative": "_purpur-cta-link--expressive-negative_1i7hm_118"
149
- }, W = z.bind(D), s = "purpur-cta-link", U = ["forward", "external", "back", "phone"], G = {
150
- forward: Z,
151
- external: I,
152
- back: V,
153
- phone: E
154
- }, J = j(
133
+ var z = T();
134
+ const D = /* @__PURE__ */ R(z), W = {
135
+ "purpur-cta-link": "_purpur-cta-link_y2ds9_1",
136
+ "purpur-cta-link--xs": "_purpur-cta-link--xs_y2ds9_22",
137
+ "purpur-cta-link--icon-only": "_purpur-cta-link--icon-only_y2ds9_25",
138
+ "purpur-cta-link--sm": "_purpur-cta-link--sm_y2ds9_28",
139
+ "purpur-cta-link--md": "_purpur-cta-link--md_y2ds9_34",
140
+ "purpur-cta-link--lg": "_purpur-cta-link--lg_y2ds9_40",
141
+ "purpur-cta-link--full-width": "_purpur-cta-link--full-width_y2ds9_46",
142
+ "purpur-cta-link--primary": "_purpur-cta-link--primary_y2ds9_64",
143
+ "purpur-cta-link--disabled": "_purpur-cta-link--disabled_y2ds9_68",
144
+ "purpur-cta-link--primary-negative": "_purpur-cta-link--primary-negative_y2ds9_74",
145
+ "purpur-cta-link--secondary": "_purpur-cta-link--secondary_y2ds9_86",
146
+ "purpur-cta-link--secondary-negative": "_purpur-cta-link--secondary-negative_y2ds9_97",
147
+ "purpur-cta-link--expressive": "_purpur-cta-link--expressive_y2ds9_108",
148
+ "purpur-cta-link--expressive-negative": "_purpur-cta-link--expressive-negative_y2ds9_118",
149
+ "purpur-cta-link__icon": "_purpur-cta-link__icon_y2ds9_130"
150
+ }, k = D.bind(W), s = "purpur-cta-link", U = ["forward", "external", "back", "phone"], G = {
151
+ forward: I,
152
+ external: E,
153
+ back: Z,
154
+ phone: F
155
+ }, J = M(
155
156
  ({
156
157
  children: t,
157
- className: a,
158
- ["data-testid"]: i,
158
+ className: i,
159
+ ["data-testid"]: a,
159
160
  fullWidth: u = !1,
160
161
  iconOnly: l = !1,
161
162
  showIcon: r = !0,
162
163
  negative: e = !1,
163
164
  size: n = "md",
164
- variant: v,
165
+ variant: _,
165
166
  icon: o = "forward",
166
167
  ...c
167
- }, m) => {
168
- const b = W(
168
+ }, f) => {
169
+ const b = k(
169
170
  [
170
- a,
171
+ i,
171
172
  s,
172
- `${s}--${e ? `${v}-negative` : v}`,
173
+ `${s}--${e ? `${_}-negative` : _}`,
173
174
  `${s}--${n}`
174
175
  ],
175
176
  {
@@ -177,16 +178,23 @@ const z = /* @__PURE__ */ F(T), D = {
177
178
  [`${s}--negative`]: e,
178
179
  [`${s}--full-width`]: u
179
180
  }
180
- ), _ = G[o], h = /* @__PURE__ */ $(S, { children: [
181
- r && (o === "back" || o === "phone") && /* @__PURE__ */ p(f, { svg: _, size: n === "lg" ? "sm" : "xs" }),
181
+ ), v = () => /* @__PURE__ */ p(
182
+ $,
183
+ {
184
+ svg: G[o],
185
+ size: n === "lg" ? "sm" : "xs",
186
+ className: k(`${s}__icon`)
187
+ }
188
+ ), g = /* @__PURE__ */ S(j, { children: [
189
+ r && (o === "back" || o === "phone") && /* @__PURE__ */ p(v, {}),
182
190
  (!l || l && !r) && t,
183
- r && (o === "forward" || o === "external") && /* @__PURE__ */ p(f, { svg: _, size: n === "lg" ? "sm" : "xs" })
184
- ] }), g = {
191
+ r && (o === "forward" || o === "external") && /* @__PURE__ */ p(v, {})
192
+ ] }), y = {
185
193
  ...c,
186
194
  className: b,
187
- "data-testid": i
195
+ "data-testid": a
188
196
  };
189
- return "href" in c && c.href ? /* @__PURE__ */ p("a", { ...g, ref: m, children: h }) : /* @__PURE__ */ p("span", { ...g, ref: m, children: h });
197
+ return "href" in c && c.href ? /* @__PURE__ */ p("a", { ...y, ref: f, children: g }) : /* @__PURE__ */ p("span", { ...y, ref: f, children: g });
190
198
  }
191
199
  );
192
200
  J.displayName = "CtaLink";
@@ -1 +1 @@
1
- {"version":3,"file":"cta-link.es.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/arrow-left.es.js","../../icon/dist/assets/arrow-right.es.js","../../icon/dist/assets/external.es.js","../../icon/dist/assets/phone.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/cta-link.tsx"],"sourcesContent":["import { jsx as a } from \"react/jsx-runtime\";\nfunction f(r) {\n return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, \"default\") ? r.default : r;\n}\nvar c = { exports: {} };\n/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\nvar p;\nfunction m() {\n return p || (p = 1, (function(r) {\n (function() {\n var e = {}.hasOwnProperty;\n function s() {\n for (var t = \"\", n = 0; n < arguments.length; n++) {\n var o = arguments[n];\n o && (t = i(t, u.call(this, o)));\n }\n return t;\n }\n function u(t) {\n if (typeof t == \"string\" || typeof t == \"number\")\n return this && this[t] || t;\n if (typeof t != \"object\")\n return \"\";\n if (Array.isArray(t))\n return s.apply(this, t);\n if (t.toString !== Object.prototype.toString && !t.toString.toString().includes(\"[native code]\"))\n return t.toString();\n var n = \"\";\n for (var o in t)\n e.call(t, o) && t[o] && (n = i(n, this && this[o] || o));\n return n;\n }\n function i(t, n) {\n return n ? t ? t + \" \" + n : t + n : t;\n }\n r.exports ? (s.default = s, r.exports = s) : window.classNames = s;\n })();\n })(c)), c.exports;\n}\nvar _ = m();\nconst v = /* @__PURE__ */ f(_), d = {\n \"purpur-icon\": \"_purpur-icon_8u1lq_1\",\n \"purpur-icon--xxs\": \"_purpur-icon--xxs_8u1lq_4\",\n \"purpur-icon--xs\": \"_purpur-icon--xs_8u1lq_8\",\n \"purpur-icon--sm\": \"_purpur-icon--sm_8u1lq_12\",\n \"purpur-icon--md\": \"_purpur-icon--md_8u1lq_16\",\n \"purpur-icon--lg\": \"_purpur-icon--lg_8u1lq_20\",\n \"purpur-icon--xl\": \"_purpur-icon--xl_8u1lq_24\"\n}, x = v.bind(d), l = \"purpur-icon\", w = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"], g = \"md\", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}=\"${e.value}\"`).join(\" \"), y = ({ content: r = \"\", title: e } = {}) => {\n const s = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n e ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" }\n ], u = e ? `<title>${e}</title>` : \"\";\n return `<svg ${h(s)}>${u}${r}</svg>`;\n}, S = (r) => r.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim(), b = ({ svg: r, allyTitle: e, className: s, size: u = g, ...i }) => {\n const t = y({\n content: S(r.svg),\n title: e\n }), n = x(s, l, `${l}--${u}`);\n return /* @__PURE__ */ a(\"span\", { className: n, dangerouslySetInnerHTML: { __html: t }, ...i });\n};\nb.displayName = \"Icon\";\nexport {\n g as DEFAULT_SIZE,\n b as Icon,\n w as sizes\n};\n//# sourceMappingURL=icon.es.js.map\n","const e = {\n name: \"arrow-left\",\n 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>',\n keywords: [\"arrow-left\"],\n category: \"utility\"\n};\nexport {\n e as arrowLeft\n};\n//# sourceMappingURL=arrow-left.es.js.map\n","const r = {\n name: \"arrow-right\",\n 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>',\n keywords: [\"arrow-right\"],\n category: \"utility\"\n};\nexport {\n r as arrowRight\n};\n//# sourceMappingURL=arrow-right.es.js.map\n","const e = {\n name: \"external\",\n 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>',\n keywords: [\"external\"],\n category: \"media\"\n};\nexport {\n e as external\n};\n//# sourceMappingURL=external.es.js.map\n","const e = {\n name: \"phone\",\n 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>',\n keywords: [\"phone\"],\n category: \"device\"\n};\nexport {\n e as phone\n};\n//# sourceMappingURL=phone.es.js.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ForwardedRef, forwardRef } from \"react\";\nimport type { ActionProps } from \"@purpurds/action\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { arrowLeft } from \"@purpurds/icon/assets/arrow-left\";\nimport { arrowRight } from \"@purpurds/icon/assets/arrow-right\";\nimport { external } from \"@purpurds/icon/assets/external\";\nimport { phone } from \"@purpurds/icon/assets/phone\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./cta-link.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-cta-link\";\n\nexport const ctaLinkIcons = [\"forward\", \"external\", \"back\", \"phone\"] as const;\nexport type CtaLinkIcon = (typeof ctaLinkIcons)[number];\n\nconst iconMapping = {\n forward: arrowRight,\n external: external,\n back: arrowLeft,\n phone: phone,\n};\n\ntype CtaLinkBaseProps = {\n icon?: CtaLinkIcon;\n showIcon?: boolean;\n};\n\nexport type CtaAnchorProps = ActionProps &\n Omit<BaseProps<\"a\">, \"href\"> & {\n href: string;\n };\n\ntype SpanProps = ActionProps & BaseProps<\"span\">;\n\nexport type CtaLinkProps = CtaLinkBaseProps & (CtaAnchorProps | SpanProps);\n\nexport const CtaLink = forwardRef<HTMLAnchorElement | HTMLSpanElement, CtaLinkProps>(\n (\n {\n children,\n className,\n [\"data-testid\"]: dataTestid,\n fullWidth = false,\n iconOnly = false,\n showIcon = true,\n negative = false,\n size = \"md\",\n variant,\n icon = \"forward\",\n ...props\n },\n ref\n ) => {\n const classes = cx(\n [\n className,\n rootClassName,\n `${rootClassName}--${negative ? `${variant}-negative` : variant}`,\n `${rootClassName}--${size}`,\n ],\n {\n [`${rootClassName}--icon-only`]: iconOnly,\n [`${rootClassName}--negative`]: negative,\n [`${rootClassName}--full-width`]: fullWidth,\n }\n );\n\n const IconComponent = iconMapping[icon];\n\n const childrenWithIcons = (\n <>\n {showIcon && (icon === \"back\" || icon === \"phone\") && (\n <Icon svg={IconComponent} size={size === \"lg\" ? \"sm\" : \"xs\"} />\n )}\n {(!iconOnly || (iconOnly && !showIcon)) && children}\n {showIcon && (icon === \"forward\" || icon === \"external\") && (\n <Icon svg={IconComponent} size={size === \"lg\" ? \"sm\" : \"xs\"} />\n )}\n </>\n );\n\n const sharedProps = {\n ...props,\n className: classes,\n [\"data-testid\"]: dataTestid,\n };\n\n return \"href\" in props && props.href ? (\n <a {...sharedProps} ref={ref as ForwardedRef<HTMLAnchorElement>}>\n {childrenWithIcons}\n </a>\n ) : (\n <span {...sharedProps} ref={ref as ForwardedRef<HTMLSpanElement>}>\n {childrenWithIcons}\n </span>\n );\n }\n);\n\nCtaLink.displayName = \"CtaLink\";\n"],"names":["f","r","c","p","m","e","s","t","n","o","i","_","v","d","x","l","g","h","y","S","b","a","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","cx","styles","rootClassName","ctaLinkIcons","iconMapping","arrowRight","external","arrowLeft","phone","CtaLink","forwardRef","children","className","dataTestid","fullWidth","iconOnly","showIcon","negative","size","variant","icon","props","ref","IconComponent","childrenWithIcons","jsxs","Fragment","jsx","Icon","sharedProps"],"mappings":";;AACA,SAASA,EAAEC,GAAG;AACZ,SAAOA,KAAKA,EAAE,cAAc,OAAO,UAAU,eAAe,KAAKA,GAAG,SAAS,IAAIA,EAAE,UAAUA;AAC/F;AACA,IAAIC,IAAI,EAAE,SAAS,GAAE;AACrB;AAAA;AAAA;AAAA;AAAA;AAKA,IAAIC;AACJ,SAASC,IAAI;AACX,SAAOD,MAAMA,IAAI,IAAI,SAASF,GAAG;AAC/B,KAAC,WAAW;AACV,UAAII,IAAI,CAAA,EAAG;AACX,eAASC,IAAI;AACX,iBAASC,IAAI,IAAIC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACjD,cAAIC,IAAI,UAAUD,CAAC;AACnB,UAAAC,MAAMF,IAAIG,EAAEH,GAAG,EAAE,KAAK,MAAME,CAAC,CAAC;AAAA,QAChC;AACA,eAAOF;AAAA,MACT;AACA,eAAS,EAAEA,GAAG;AACZ,YAAI,OAAOA,KAAK,YAAY,OAAOA,KAAK;AACtC,iBAAO,QAAQ,KAAKA,CAAC,KAAKA;AAC5B,YAAI,OAAOA,KAAK;AACd,iBAAO;AACT,YAAI,MAAM,QAAQA,CAAC;AACjB,iBAAOD,EAAE,MAAM,MAAMC,CAAC;AACxB,YAAIA,EAAE,aAAa,OAAO,UAAU,YAAY,CAACA,EAAE,SAAS,WAAW,SAAS,eAAe;AAC7F,iBAAOA,EAAE,SAAQ;AACnB,YAAIC,IAAI;AACR,iBAASC,KAAKF;AACZ,UAAAF,EAAE,KAAKE,GAAGE,CAAC,KAAKF,EA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AAAA,QACA,GAAGA,CAAa,KAAKe,IAAW,GAAGE,CAAO,cAAcA,CAAO;AAAA,QAC/D,GAAGjB,CAAa,KAAKgB,CAAI;AAAA,MAAA;AAAA,MAE3B;AAAA,QACE,CAAC,GAAGhB,CAAa,aAAa,GAAGa;AAAA,QACjC,CAAC,GAAGb,CAAa,YAAY,GAAGe;AAAA,QAChC,CAAC,GAAGf,CAAa,cAAc,GAAGY;AAAA,MAAA;AAAA,IACpC,GAGIS,IAAgBnB,EAAYgB,CAAI,GAEhCI,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,MAAAV,MAAaI,MAAS,UAAUA,MAAS,YACxC,gBAAAO,EAACC,GAAA,EAAK,KAAKL,GAAe,MAAML,MAAS,OAAO,OAAO,MAAM;AAAA,OAE7D,CAACH,KAAaA,KAAY,CAACC,MAAcL;AAAA,MAC1CK,MAAaI,MAAS,aAAaA,MAAS,eAC3C,gBAAAO,EAACC,GAAA,EAAK,KAAKL,GAAe,MAAML,MAAS,OAAO,OAAO,KAAA,CAAM;AAAA,IAAA,GAEjE,GAGIW,IAAc;AAAA,MAClB,GAAGR;AAAA,MACH,WAAW7B;AAAA,MACV,eAAgBqB;AAAA,IAAA;AAGnB,WAAO,UAAUQ,KAASA,EAAM,OAC9B,gBAAAM,EAAC,OAAG,GAAGE,GAAa,KAAAP,GACjB,UAAAE,EAAA,CACH,IAEA,gBAAAG,EAAC,QAAA,EAAM,GAAGE,GAAa,KAAAP,GACpB,UAAAE,GACH;AAAA,EAEJ;AACF;AAEAf,EAAQ,cAAc;","x_google_ignoreList":[5]}
1
+ {"version":3,"file":"cta-link.es.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/arrow-left.es.js","../../icon/dist/assets/arrow-right.es.js","../../icon/dist/assets/external.es.js","../../icon/dist/assets/phone.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/cta-link.tsx"],"sourcesContent":["import { jsx as a } from \"react/jsx-runtime\";\nfunction f(r) {\n return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, \"default\") ? r.default : r;\n}\nvar c = { exports: {} };\n/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\nvar p;\nfunction m() {\n return p || (p = 1, (function(r) {\n (function() {\n var e = {}.hasOwnProperty;\n function s() {\n for (var t = \"\", n = 0; n < arguments.length; n++) {\n var o = arguments[n];\n o && (t = i(t, u.call(this, o)));\n }\n return t;\n }\n function u(t) {\n if (typeof t == \"string\" || typeof t == \"number\")\n return this && this[t] || t;\n if (typeof t != \"object\")\n return \"\";\n if (Array.isArray(t))\n return s.apply(this, t);\n if (t.toString !== Object.prototype.toString && !t.toString.toString().includes(\"[native code]\"))\n return t.toString();\n var n = \"\";\n for (var o in t)\n e.call(t, o) && t[o] && (n = i(n, this && this[o] || o));\n return n;\n }\n function i(t, n) {\n return n ? t ? t + \" \" + n : t + n : t;\n }\n r.exports ? (s.default = s, r.exports = s) : window.classNames = s;\n })();\n })(c)), c.exports;\n}\nvar _ = m();\nconst v = /* @__PURE__ */ f(_), d = {\n \"purpur-icon\": \"_purpur-icon_8u1lq_1\",\n \"purpur-icon--xxs\": \"_purpur-icon--xxs_8u1lq_4\",\n \"purpur-icon--xs\": \"_purpur-icon--xs_8u1lq_8\",\n \"purpur-icon--sm\": \"_purpur-icon--sm_8u1lq_12\",\n \"purpur-icon--md\": \"_purpur-icon--md_8u1lq_16\",\n \"purpur-icon--lg\": \"_purpur-icon--lg_8u1lq_20\",\n \"purpur-icon--xl\": \"_purpur-icon--xl_8u1lq_24\"\n}, x = v.bind(d), l = \"purpur-icon\", w = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"], g = \"md\", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}=\"${e.value}\"`).join(\" \"), y = ({ content: r = \"\", title: e } = {}) => {\n const s = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n e ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" }\n ], u = e ? `<title>${e}</title>` : \"\";\n return `<svg ${h(s)}>${u}${r}</svg>`;\n}, S = (r) => r.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim(), b = ({ svg: r, allyTitle: e, className: s, size: u = g, ...i }) => {\n const t = y({\n content: S(r.svg),\n title: e\n }), n = x(s, l, `${l}--${u}`);\n return /* @__PURE__ */ a(\"span\", { className: n, dangerouslySetInnerHTML: { __html: t }, ...i });\n};\nb.displayName = \"Icon\";\nexport {\n g as DEFAULT_SIZE,\n b as Icon,\n w as sizes\n};\n//# sourceMappingURL=icon.es.js.map\n","const e = {\n name: \"arrow-left\",\n 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>',\n keywords: [\"arrow-left\"],\n category: \"utility\"\n};\nexport {\n e as arrowLeft\n};\n//# sourceMappingURL=arrow-left.es.js.map\n","const r = {\n name: \"arrow-right\",\n 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>',\n keywords: [\"arrow-right\"],\n category: \"utility\"\n};\nexport {\n r as arrowRight\n};\n//# sourceMappingURL=arrow-right.es.js.map\n","const e = {\n name: \"external\",\n 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>',\n keywords: [\"external\"],\n category: \"media\"\n};\nexport {\n e as external\n};\n//# sourceMappingURL=external.es.js.map\n","const e = {\n name: \"phone\",\n 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>',\n keywords: [\"phone\"],\n category: \"device\"\n};\nexport {\n e as phone\n};\n//# sourceMappingURL=phone.es.js.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ForwardedRef, forwardRef } from \"react\";\nimport type { ActionProps } from \"@purpurds/action\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { arrowLeft } from \"@purpurds/icon/assets/arrow-left\";\nimport { arrowRight } from \"@purpurds/icon/assets/arrow-right\";\nimport { external } from \"@purpurds/icon/assets/external\";\nimport { phone } from \"@purpurds/icon/assets/phone\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./cta-link.module.scss\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-cta-link\";\n\nexport const ctaLinkIcons = [\"forward\", \"external\", \"back\", \"phone\"] as const;\nexport type CtaLinkIcon = (typeof ctaLinkIcons)[number];\n\nconst iconMapping = {\n forward: arrowRight,\n external: external,\n back: arrowLeft,\n phone: phone,\n};\n\ntype CtaLinkBaseProps = {\n icon?: CtaLinkIcon;\n showIcon?: boolean;\n};\n\nexport type CtaAnchorProps = ActionProps &\n Omit<BaseProps<\"a\">, \"href\"> & {\n href: string;\n };\n\ntype SpanProps = ActionProps & BaseProps<\"span\">;\n\nexport type CtaLinkProps = CtaLinkBaseProps & (CtaAnchorProps | SpanProps);\n\nexport const CtaLink = forwardRef<HTMLAnchorElement | HTMLSpanElement, CtaLinkProps>(\n (\n {\n children,\n className,\n [\"data-testid\"]: dataTestid,\n fullWidth = false,\n iconOnly = false,\n showIcon = true,\n negative = false,\n size = \"md\",\n variant,\n icon = \"forward\",\n ...props\n },\n ref\n ) => {\n const classes = cx(\n [\n className,\n rootClassName,\n `${rootClassName}--${negative ? `${variant}-negative` : variant}`,\n `${rootClassName}--${size}`,\n ],\n {\n [`${rootClassName}--icon-only`]: iconOnly,\n [`${rootClassName}--negative`]: negative,\n [`${rootClassName}--full-width`]: fullWidth,\n }\n );\n\n const MappedIcon = () => (\n <Icon\n svg={iconMapping[icon]}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n className={cx(`${rootClassName}__icon`)}\n />\n );\n\n const childrenWithIcons = (\n <>\n {showIcon && (icon === \"back\" || icon === \"phone\") && <MappedIcon />}\n {(!iconOnly || (iconOnly && !showIcon)) && children}\n {showIcon && (icon === \"forward\" || icon === \"external\") && <MappedIcon />}\n </>\n );\n\n const sharedProps = {\n ...props,\n className: classes,\n [\"data-testid\"]: dataTestid,\n };\n\n return \"href\" in props && props.href ? (\n <a {...sharedProps} ref={ref as ForwardedRef<HTMLAnchorElement>}>\n {childrenWithIcons}\n </a>\n ) : (\n <span {...sharedProps} ref={ref as ForwardedRef<HTMLSpanElement>}>\n {childrenWithIcons}\n </span>\n );\n }\n);\n\nCtaLink.displayName = \"CtaLink\";\n"],"names":["f","r","c","p","m","e","s","t","n","o","i","_","v","d","x","l","g","h","y","S","b","a","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","cx","styles","rootClassName","ctaLinkIcons","iconMapping","arrowRight","external","arrowLeft","phone","CtaLink","forwardRef","children","className","dataTestid","fullWidth","iconOnly","showIcon","negative","size","variant","icon","props","ref","MappedIcon","jsx","Icon","childrenWithIcons","jsxs","Fragment","sharedProps"],"mappings":";;AACA,SAASA,EAAEC,GAAG;AACZ,SAAOA,KAAKA,EAAE,cAAc,OAAO,UAAU,eAAe,KAAKA,GAAG,SAAS,IAAIA,EAAE,UAAUA;AAC/F;AACA,IAAIC,IAAI,EAAE,SAAS,GAAE;AACrB;AAAA;AAAA;AAAA;AAAA;AAKA,IAAIC;AACJ,SAASC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,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,MAAAZ,MAAaI,MAAS,UAAUA,MAAS,8BAAaG,GAAA,EAAW;AAAA,OAChE,CAACR,KAAaA,KAAY,CAACC,MAAcL;AAAA,MAC1CK,MAAaI,MAAS,aAAaA,MAAS,iCAAgBG,GAAA,CAAA,CAAW;AAAA,IAAA,GAC1E,GAGIM,IAAc;AAAA,MAClB,GAAGR;AAAA,MACH,WAAW7B;AAAA,MACV,eAAgBqB;AAAA,IAAA;AAGnB,WAAO,UAAUQ,KAASA,EAAM,OAC9B,gBAAAG,EAAC,OAAG,GAAGK,GAAa,KAAAP,GACjB,UAAAI,EAAA,CACH,IAEA,gBAAAF,EAAC,QAAA,EAAM,GAAGK,GAAa,KAAAP,GACpB,UAAAI,GACH;AAAA,EAEJ;AACF;AAEAjB,EAAQ,cAAc;","x_google_ignoreList":[5]}
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- ._purpur-cta-link_1i7hm_1{align-items:center;border-radius:var(--purpur-border-radius-full);border-width:0;cursor:pointer;display:inline-flex;font-size:var(--purpur-typography-scale-100);font-family:var(--purpur-typography-family-default);font-weight:var(--purpur-typography-weight-medium);gap:var(--purpur-spacing-100);justify-content:center;line-height:var(--purpur-spacing-300);text-decoration:none;width:auto}._purpur-cta-link_1i7hm_1:focus:before{border-radius:var(--purpur-border-radius-full)}._purpur-cta-link_1i7hm_1 svg{display:block}._purpur-cta-link--xs_1i7hm_22{padding:var(--purpur-spacing-50) var(--purpur-spacing-250)}._purpur-cta-link--xs_1i7hm_22._purpur-cta-link--icon-only_1i7hm_25{padding:var(--purpur-spacing-100)}._purpur-cta-link--sm_1i7hm_28{padding:var(--purpur-spacing-100) var(--purpur-spacing-250)}._purpur-cta-link--sm_1i7hm_28._purpur-cta-link--icon-only_1i7hm_25{padding:var(--purpur-spacing-100)}._purpur-cta-link--md_1i7hm_34{padding:var(--purpur-spacing-150) var(--purpur-spacing-300)}._purpur-cta-link--md_1i7hm_34._purpur-cta-link--icon-only_1i7hm_25{padding:var(--purpur-spacing-150)}._purpur-cta-link--lg_1i7hm_40{padding:var(--purpur-spacing-200) var(--purpur-spacing-400)}._purpur-cta-link--lg_1i7hm_40._purpur-cta-link--icon-only_1i7hm_25{padding:var(--purpur-spacing-200)}._purpur-cta-link--full-width_1i7hm_46{width:100%}._purpur-cta-link_1i7hm_1{position:relative;outline:0;transition:all var(--purpur-motion-duration-100) ease}._purpur-cta-link_1i7hm_1:focus:before{box-shadow:0 0 0 var(--purpur-border-width-sm) var(--purpur-color-border-interactive-focus);content:"";display:block;inset:calc(var(--purpur-spacing-25) * -1);position:absolute}._purpur-cta-link_1i7hm_1:focus:not(:focus-visible):before{box-shadow:none}._purpur-cta-link--primary_1i7hm_64{background-color:var(--purpur-color-background-interactive-primary);color:var(--purpur-color-text-interactive-on-primary)}._purpur-cta-link--primary_1i7hm_64:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-primary-hover)}._purpur-cta-link--primary_1i7hm_64:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-primary-active)}._purpur-cta-link--primary-negative_1i7hm_74{background-color:var(--purpur-color-background-interactive-primary-negative);color:var(--purpur-color-text-interactive-on-primary-negative)}._purpur-cta-link--primary-negative_1i7hm_74:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-primary-hover-negative);border-color:var(--purpur-color-background-interactive-primary-hover-negative)}._purpur-cta-link--primary-negative_1i7hm_74:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-primary-active-negative);border-color:var(--purpur-color-background-interactive-primary-active-negative)}._purpur-cta-link--secondary_1i7hm_86{background-color:transparent;box-shadow:inset 0 0 0 var(--purpur-border-width-xs) var(--purpur-color-border-interactive-primary);color:var(--purpur-color-text-interactive-primary)}._purpur-cta-link--secondary_1i7hm_86:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-transparent-hover)}._purpur-cta-link--secondary_1i7hm_86:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-transparent-active)}._purpur-cta-link--secondary-negative_1i7hm_97{background-color:transparent;box-shadow:inset 0 0 0 var(--purpur-border-width-xs) var(--purpur-color-border-interactive-primary-negative);color:var(--purpur-color-text-interactive-primary-negative)}._purpur-cta-link--secondary-negative_1i7hm_97:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-transparent-hover-negative)}._purpur-cta-link--secondary-negative_1i7hm_97:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-transparent-active-negative)}._purpur-cta-link--expressive_1i7hm_108{background-color:var(--purpur-color-background-interactive-expressive);color:var(--purpur-color-text-interactive-on-expressive)}._purpur-cta-link--expressive_1i7hm_108:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-expressive-hover)}._purpur-cta-link--expressive_1i7hm_108:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-expressive-active)}._purpur-cta-link--expressive-negative_1i7hm_118{background-color:var(--purpur-color-background-interactive-expressive-negative);color:var(--purpur-color-text-interactive-on-expressive-negative)}._purpur-cta-link--expressive-negative_1i7hm_118:hover:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-expressive-hover-negative);color:var(--purpur-color-text-interactive-on-expressive-hover-negative)}._purpur-cta-link--expressive-negative_1i7hm_118:active:not(._purpur-cta-link--disabled_1i7hm_68){background-color:var(--purpur-color-background-interactive-expressive-active-negative);color:var(--purpur-color-text-interactive-on-expressive-active-negative)}
1
+ ._purpur-cta-link_y2ds9_1{align-items:center;border-radius:var(--purpur-border-radius-full);border-width:0;cursor:pointer;display:inline-flex;font-size:var(--purpur-typography-scale-100);font-family:var(--purpur-typography-family-default);font-weight:var(--purpur-typography-weight-medium);gap:var(--purpur-spacing-100);justify-content:center;line-height:var(--purpur-spacing-300);text-decoration:none;width:auto}._purpur-cta-link_y2ds9_1:focus:before{border-radius:var(--purpur-border-radius-full)}._purpur-cta-link_y2ds9_1 svg{display:block}._purpur-cta-link--xs_y2ds9_22{padding:var(--purpur-spacing-50) var(--purpur-spacing-250)}._purpur-cta-link--xs_y2ds9_22._purpur-cta-link--icon-only_y2ds9_25{padding:var(--purpur-spacing-100)}._purpur-cta-link--sm_y2ds9_28{padding:var(--purpur-spacing-100) var(--purpur-spacing-250)}._purpur-cta-link--sm_y2ds9_28._purpur-cta-link--icon-only_y2ds9_25{padding:var(--purpur-spacing-100)}._purpur-cta-link--md_y2ds9_34{padding:var(--purpur-spacing-150) var(--purpur-spacing-300)}._purpur-cta-link--md_y2ds9_34._purpur-cta-link--icon-only_y2ds9_25{padding:var(--purpur-spacing-150)}._purpur-cta-link--lg_y2ds9_40{padding:var(--purpur-spacing-200) var(--purpur-spacing-400)}._purpur-cta-link--lg_y2ds9_40._purpur-cta-link--icon-only_y2ds9_25{padding:var(--purpur-spacing-200)}._purpur-cta-link--full-width_y2ds9_46{width:100%}._purpur-cta-link_y2ds9_1{position:relative;outline:0;transition:all var(--purpur-motion-duration-100) ease}._purpur-cta-link_y2ds9_1:focus:before{box-shadow:0 0 0 var(--purpur-border-width-sm) var(--purpur-color-border-interactive-focus);content:"";display:block;inset:calc(var(--purpur-spacing-25) * -1);position:absolute}._purpur-cta-link_y2ds9_1:focus:not(:focus-visible):before{box-shadow:none}._purpur-cta-link--primary_y2ds9_64{background-color:var(--purpur-color-background-interactive-primary);color:var(--purpur-color-text-interactive-on-primary)}._purpur-cta-link--primary_y2ds9_64:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-primary-hover)}._purpur-cta-link--primary_y2ds9_64:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-primary-active)}._purpur-cta-link--primary-negative_y2ds9_74{background-color:var(--purpur-color-background-interactive-primary-negative);color:var(--purpur-color-text-interactive-on-primary-negative)}._purpur-cta-link--primary-negative_y2ds9_74:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-primary-hover-negative);border-color:var(--purpur-color-background-interactive-primary-hover-negative)}._purpur-cta-link--primary-negative_y2ds9_74:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-primary-active-negative);border-color:var(--purpur-color-background-interactive-primary-active-negative)}._purpur-cta-link--secondary_y2ds9_86{background-color:transparent;box-shadow:inset 0 0 0 var(--purpur-border-width-xs) var(--purpur-color-border-interactive-primary);color:var(--purpur-color-text-interactive-primary)}._purpur-cta-link--secondary_y2ds9_86:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-transparent-hover)}._purpur-cta-link--secondary_y2ds9_86:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-transparent-active)}._purpur-cta-link--secondary-negative_y2ds9_97{background-color:transparent;box-shadow:inset 0 0 0 var(--purpur-border-width-xs) var(--purpur-color-border-interactive-primary-negative);color:var(--purpur-color-text-interactive-primary-negative)}._purpur-cta-link--secondary-negative_y2ds9_97:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-transparent-hover-negative)}._purpur-cta-link--secondary-negative_y2ds9_97:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-transparent-active-negative)}._purpur-cta-link--expressive_y2ds9_108{background-color:var(--purpur-color-background-interactive-expressive);color:var(--purpur-color-text-interactive-on-expressive)}._purpur-cta-link--expressive_y2ds9_108:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-expressive-hover)}._purpur-cta-link--expressive_y2ds9_108:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-expressive-active)}._purpur-cta-link--expressive-negative_y2ds9_118{background-color:var(--purpur-color-background-interactive-expressive-negative);color:var(--purpur-color-text-interactive-on-expressive-negative)}._purpur-cta-link--expressive-negative_y2ds9_118:hover:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-expressive-hover-negative);color:var(--purpur-color-text-interactive-on-expressive-hover-negative)}._purpur-cta-link--expressive-negative_y2ds9_118:active:not(._purpur-cta-link--disabled_y2ds9_68){background-color:var(--purpur-color-background-interactive-expressive-active-negative);color:var(--purpur-color-text-interactive-on-expressive-active-negative)}._purpur-cta-link__icon_y2ds9_130{flex-shrink:0}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/cta-link",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/cta-link.cjs.js",
6
6
  "types": "./dist/cta-link.d.ts",
@@ -16,10 +16,10 @@
16
16
  "source": "src/cta-link.tsx",
17
17
  "dependencies": {
18
18
  "classnames": "~2.5.0",
19
- "@purpurds/common-types": "8.4.0",
20
- "@purpurds/icon": "8.4.0",
21
- "@purpurds/tokens": "8.4.0",
22
- "@purpurds/action": "8.4.0"
19
+ "@purpurds/common-types": "8.5.0",
20
+ "@purpurds/icon": "8.5.0",
21
+ "@purpurds/tokens": "8.5.0",
22
+ "@purpurds/action": "8.5.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@storybook/react-vite": "^9.0.18",
@@ -2,4 +2,8 @@
2
2
 
3
3
  .purpur-cta-link {
4
4
  @include action.action();
5
+
6
+ &__icon {
7
+ flex-shrink: 0;
8
+ }
5
9
  }
package/src/cta-link.tsx CHANGED
@@ -68,17 +68,19 @@ export const CtaLink = forwardRef<HTMLAnchorElement | HTMLSpanElement, CtaLinkPr
68
68
  }
69
69
  );
70
70
 
71
- const IconComponent = iconMapping[icon];
71
+ const MappedIcon = () => (
72
+ <Icon
73
+ svg={iconMapping[icon]}
74
+ size={size === "lg" ? "sm" : "xs"}
75
+ className={cx(`${rootClassName}__icon`)}
76
+ />
77
+ );
72
78
 
73
79
  const childrenWithIcons = (
74
80
  <>
75
- {showIcon && (icon === "back" || icon === "phone") && (
76
- <Icon svg={IconComponent} size={size === "lg" ? "sm" : "xs"} />
77
- )}
81
+ {showIcon && (icon === "back" || icon === "phone") && <MappedIcon />}
78
82
  {(!iconOnly || (iconOnly && !showIcon)) && children}
79
- {showIcon && (icon === "forward" || icon === "external") && (
80
- <Icon svg={IconComponent} size={size === "lg" ? "sm" : "xs"} />
81
- )}
83
+ {showIcon && (icon === "forward" || icon === "external") && <MappedIcon />}
82
84
  </>
83
85
  );
84
86