@purpurds/cta-link 3.2.0 → 3.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: 3.1.0
2
+ Version: 3.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: 3.1.0
9
+ Version: 3.2.0
10
10
  License: AGPL-3.0-only
11
11
  Private: false
12
12
 
@@ -2,9 +2,9 @@
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 q(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var f={exports:{}};/*!
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 b=g(y),k={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},h={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"},x=b.bind(k),_="purpur-icon",w="md",S=t=>t.filter(i=>Object.keys(i).length>=1).map(i=>`${i.name}="${i.value}"`).join(" "),$=({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 ${S(u)}>${p}${t}</svg>`},j=t=>t.replace(/<(\/?)svg([^>]*)>/g,"").trim(),O=({["data-testid"]:t,svg:i,allyTitle:u,className:p="",size:a=w,...r})=>{const e=$({content:j(i.svg),title:u}),n=x(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:{}};/*!
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 M=f.exports;const N=q(M),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",C=({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=C;
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:h,size:r===o.LG?"sm":"xs"})]})};exports.CtaLink=P;
10
10
  //# sourceMappingURL=cta-link.cjs.js.map