@purpurds/cta-link 4.4.0 → 4.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 +2 -2
- package/dist/cta-link.cjs.js +3 -3
- package/dist/cta-link.es.js +59 -59
- package/dist/styles.css +1 -1
- package/package.json +4 -4
package/dist/LICENSE.txt
CHANGED
package/dist/cta-link.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c={SM:"sm",MD:"md",LG:"lg"};function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(
|
|
5
|
+
*/(function(e){(function(){var l={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=u(r,i.call(this,n)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)l.call(r,n)&&r[n]&&(t=u(t,this&&this[n]||n));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(_);var x=_.exports;const k=y(x),b={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},j={name:"arrow-left",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-left"],category:"utility"},$={name:"arrow-right",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.9 12a.9.9 0 0 1-.264.636l-5.5 5.5a.9.9 0 0 1-1.272-1.272l3.963-3.964H4a.9.9 0 0 1 0-1.8h13.827l-3.963-3.964a.9.9 0 1 1 1.272-1.272l5.5 5.5A.9.9 0 0 1 20.9 12Z" clip-rule="evenodd"/></svg>',keywords:["arrow-right"],category:"utility"},M={name:"external",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M15 3.4a.9.9 0 1 1 0-1.8h6.5a.9.9 0 0 1 .9.9V9a.9.9 0 1 1-1.8 0V4.673l-7.964 7.963a.9.9 0 1 1-1.272-1.272L19.327 3.4H15ZM1.6 5c0-1.05.85-1.9 1.9-1.9h6a.9.9 0 0 1 0 1.8h-6a.1.1 0 0 0-.1.1v15.5a.1.1 0 0 0 .1.1h16a.1.1 0 0 0 .1-.1V14a.9.9 0 1 1 1.8 0v6.5a1.9 1.9 0 0 1-1.9 1.9h-16a1.9 1.9 0 0 1-1.9-1.9V5Z" clip-rule="evenodd"/></svg>',keywords:["external"],category:"media"},S={name:"phone",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M5.341 2.228c.75-.622 1.73-.43 2.305.145l2.783 2.783a1.9 1.9 0 0 1 0 2.687L8.843 9.43a.1.1 0 0 0 0 .142l5.586 5.585a.1.1 0 0 0 .142 0l1.585-1.585a1.9 1.9 0 0 1 2.687 0l3.5 3.5c.343.342.698 1.023.31 1.742-.346.645-1.173 1.615-3.154 2.936-1.75 1.167-3.667 1.269-5.297.903-1.61-.361-3.015-1.192-3.839-2.016a.9.9 0 0 1 1.273-1.272c.573.572 1.669 1.242 2.96 1.532 1.27.285 2.656.188 3.905-.645 1.483-.989 2.137-1.68 2.418-2.06l-3.348-3.347a.1.1 0 0 0-.142 0l-1.586 1.585a1.9 1.9 0 0 1-2.687 0l-5.585-5.585a1.9 1.9 0 0 1 0-2.688l1.585-1.585a.1.1 0 0 0 0-.142L6.41 3.682c-.447.383-1.183 1.102-2.206 2.38-.878 1.097-1.14 2.08-1.127 2.951.013.898.323 1.758.732 2.59.24.488.733 1.079 1.551 1.88.561.549 1.227 1.152 2.002 1.854.344.312.71.644 1.098 1a.9.9 0 0 1-1.215 1.327c-.367-.336-.722-.658-1.061-.965a77.443 77.443 0 0 1-2.082-1.93c-.831-.813-1.523-1.586-1.909-2.372-.456-.93-.896-2.07-.916-3.356-.02-1.314.399-2.7 1.521-4.103 1.148-1.435 1.995-2.254 2.544-2.71Z" clip-rule="evenodd"/></svg>',keywords:["phone"],category:"device"},L=k.bind(b),v="purpur-icon",O="md",C=e=>e.filter(l=>Object.keys(l).length>=1).map(l=>`${l.name}="${l.value}"`).join(" "),q=({content:e="",title:l}={})=>{const a=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},l?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],i=l?`<title>${l}</title>`:"";return`<svg ${C(a)}>${i}${e}</svg>`},N=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),m=({["data-testid"]:e,svg:l,allyTitle:a,className:i="",size:u=O,...r})=>{const t=q({content:N(l.svg),title:a}),n=L(i,v,`${v}--${u}`);return o.jsx("span",{"aria-label":a,className:n,"data-testid":e,dangerouslySetInnerHTML:{__html:t},...r})};function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}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(
|
|
9
|
+
*/(function(e){(function(){var l={}.hasOwnProperty;function a(){for(var r="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(r=u(r,i(n)))}return r}function i(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return a.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var t="";for(var n in r)l.call(r,n)&&r[n]&&(t=u(t,n));return t}function u(r,t){return t?r?r+" "+t:r+t:r}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(f);var I=f.exports;const V=A(I),s={"purpur-cta-link":"_purpur-cta-link_1mhg7_1","purpur-cta-link--sm":"_purpur-cta-link--sm_1mhg7_33","purpur-cta-link--icon-only":"_purpur-cta-link--icon-only_1mhg7_36","purpur-cta-link--md":"_purpur-cta-link--md_1mhg7_39","purpur-cta-link--lg":"_purpur-cta-link--lg_1mhg7_45","purpur-cta-link--full-width":"_purpur-cta-link--full-width_1mhg7_51","purpur-cta-link--primary":"_purpur-cta-link--primary_1mhg7_54","purpur-cta-link--disabled":"_purpur-cta-link--disabled_1mhg7_58","purpur-cta-link--primary-negative":"_purpur-cta-link--primary-negative_1mhg7_64","purpur-cta-link--secondary":"_purpur-cta-link--secondary_1mhg7_76","purpur-cta-link--secondary-negative":"_purpur-cta-link--secondary-negative_1mhg7_87","purpur-cta-link--expressive":"_purpur-cta-link--expressive_1mhg7_98","purpur-cta-link--expressive-negative":"_purpur-cta-link--expressive-negative_1mhg7_108"},p="purpur-cta-link",B=["forward","external","back","phone"],H={forward:$,external:M,back:j,phone:S},P=({children:e,className:l,["data-testid"]:a,fullWidth:i=!1,iconOnly:u,size:r=c.MD,variant:t,icon:n="forward",...d})=>{const h=V([l,s[p],s[`${p}--${t}`],s[`${p}--${r}`]],{[s[`${p}--icon-only`]]:u,[s[`${p}--negative`]]:t.endsWith("negative"),[s[`${p}--full-width`]]:i}),w=d.href?"a":"span",g=H[n];return o.jsxs(w,{className:h,"data-testid":a,...d,children:[(n==="back"||n==="phone")&&o.jsx(m,{svg:g,size:r===c.LG?"sm":"xs"}),!u&&e,(n==="forward"||n==="external")&&o.jsx(m,{svg:g,size:r===c.LG?"sm":"xs"})]})};exports.CtaLink=P;exports.ctaLinkIcons=B;
|
|
10
10
|
//# sourceMappingURL=cta-link.cjs.js.map
|
package/dist/cta-link.es.js
CHANGED
|
@@ -4,21 +4,21 @@ const o = {
|
|
|
4
4
|
MD: "md",
|
|
5
5
|
LG: "lg"
|
|
6
6
|
};
|
|
7
|
-
function x(
|
|
8
|
-
return
|
|
7
|
+
function x(e) {
|
|
8
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var _ = { exports: {} };
|
|
11
11
|
/*!
|
|
12
12
|
Copyright (c) 2018 Jed Watson.
|
|
13
13
|
Licensed under the MIT License (MIT), see
|
|
14
14
|
http://jedwatson.github.io/classnames
|
|
15
15
|
*/
|
|
16
|
-
(function(
|
|
16
|
+
(function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var l = {}.hasOwnProperty;
|
|
19
19
|
function a() {
|
|
20
|
-
for (var r = "",
|
|
21
|
-
var n = arguments[
|
|
20
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
21
|
+
var n = arguments[t];
|
|
22
22
|
n && (r = u(r, i.call(this, n)));
|
|
23
23
|
}
|
|
24
24
|
return r;
|
|
@@ -32,18 +32,18 @@ var g = { exports: {} };
|
|
|
32
32
|
return a.apply(this, r);
|
|
33
33
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
34
34
|
return r.toString();
|
|
35
|
-
var
|
|
35
|
+
var t = "";
|
|
36
36
|
for (var n in r)
|
|
37
|
-
l.call(r, n) && r[n] && (
|
|
38
|
-
return
|
|
37
|
+
l.call(r, n) && r[n] && (t = u(t, this && this[n] || n));
|
|
38
|
+
return t;
|
|
39
39
|
}
|
|
40
|
-
function u(r,
|
|
41
|
-
return
|
|
40
|
+
function u(r, t) {
|
|
41
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
44
44
|
})();
|
|
45
|
-
})(
|
|
46
|
-
var k =
|
|
45
|
+
})(_);
|
|
46
|
+
var k = _.exports;
|
|
47
47
|
const b = /* @__PURE__ */ x(k), $ = {
|
|
48
48
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
49
49
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
@@ -72,52 +72,52 @@ const b = /* @__PURE__ */ x(k), $ = {
|
|
|
72
72
|
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>',
|
|
73
73
|
keywords: ["phone"],
|
|
74
74
|
category: "device"
|
|
75
|
-
}, O = b.bind($),
|
|
75
|
+
}, O = b.bind($), v = "purpur-icon", C = "md", q = (e) => e.filter((l) => Object.keys(l).length >= 1).map((l) => `${l.name}="${l.value}"`).join(" "), N = ({ content: e = "", title: l } = {}) => {
|
|
76
76
|
const a = [
|
|
77
77
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
78
78
|
{ name: "fill", value: "currentColor" },
|
|
79
79
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
80
80
|
l ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
81
81
|
], i = l ? `<title>${l}</title>` : "";
|
|
82
|
-
return `<svg ${q(a)}>${i}${
|
|
83
|
-
}, A = (
|
|
84
|
-
["data-testid"]:
|
|
82
|
+
return `<svg ${q(a)}>${i}${e}</svg>`;
|
|
83
|
+
}, A = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), m = ({
|
|
84
|
+
["data-testid"]: e,
|
|
85
85
|
svg: l,
|
|
86
86
|
allyTitle: a,
|
|
87
87
|
className: i = "",
|
|
88
88
|
size: u = C,
|
|
89
89
|
...r
|
|
90
90
|
}) => {
|
|
91
|
-
const
|
|
91
|
+
const t = N({
|
|
92
92
|
content: A(l.svg),
|
|
93
93
|
title: a
|
|
94
|
-
}), n = O(i,
|
|
94
|
+
}), n = O(i, v, `${v}--${u}`);
|
|
95
95
|
return /* @__PURE__ */ c(
|
|
96
96
|
"span",
|
|
97
97
|
{
|
|
98
98
|
"aria-label": a,
|
|
99
99
|
className: n,
|
|
100
|
-
"data-testid":
|
|
101
|
-
dangerouslySetInnerHTML: { __html:
|
|
100
|
+
"data-testid": e,
|
|
101
|
+
dangerouslySetInnerHTML: { __html: t },
|
|
102
102
|
...r
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
105
|
};
|
|
106
|
-
function V(
|
|
107
|
-
return
|
|
106
|
+
function V(e) {
|
|
107
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
109
|
+
var f = { exports: {} };
|
|
110
110
|
/*!
|
|
111
111
|
Copyright (c) 2018 Jed Watson.
|
|
112
112
|
Licensed under the MIT License (MIT), see
|
|
113
113
|
http://jedwatson.github.io/classnames
|
|
114
114
|
*/
|
|
115
|
-
(function(
|
|
115
|
+
(function(e) {
|
|
116
116
|
(function() {
|
|
117
117
|
var l = {}.hasOwnProperty;
|
|
118
118
|
function a() {
|
|
119
|
-
for (var r = "",
|
|
120
|
-
var n = arguments[
|
|
119
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
120
|
+
var n = arguments[t];
|
|
121
121
|
n && (r = u(r, i(n)));
|
|
122
122
|
}
|
|
123
123
|
return r;
|
|
@@ -131,65 +131,65 @@ var m = { exports: {} };
|
|
|
131
131
|
return a.apply(null, r);
|
|
132
132
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
133
133
|
return r.toString();
|
|
134
|
-
var
|
|
134
|
+
var t = "";
|
|
135
135
|
for (var n in r)
|
|
136
|
-
l.call(r, n) && r[n] && (
|
|
137
|
-
return
|
|
136
|
+
l.call(r, n) && r[n] && (t = u(t, n));
|
|
137
|
+
return t;
|
|
138
138
|
}
|
|
139
|
-
function u(r,
|
|
140
|
-
return
|
|
139
|
+
function u(r, t) {
|
|
140
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
143
143
|
})();
|
|
144
|
-
})(
|
|
145
|
-
var B =
|
|
144
|
+
})(f);
|
|
145
|
+
var B = f.exports;
|
|
146
146
|
const H = /* @__PURE__ */ V(B), s = {
|
|
147
|
-
"purpur-cta-link": "_purpur-cta-
|
|
148
|
-
"purpur-cta-link--sm": "_purpur-cta-link--
|
|
149
|
-
"purpur-cta-link--icon-only": "_purpur-cta-link--icon-
|
|
150
|
-
"purpur-cta-link--md": "_purpur-cta-link--
|
|
151
|
-
"purpur-cta-link--lg": "_purpur-cta-link--
|
|
152
|
-
"purpur-cta-link--full-width": "_purpur-cta-link--full-
|
|
153
|
-
"purpur-cta-link--primary": "_purpur-cta-link--
|
|
154
|
-
"purpur-cta-link--disabled": "_purpur-cta-link--
|
|
155
|
-
"purpur-cta-link--primary-negative": "_purpur-cta-link--primary-
|
|
156
|
-
"purpur-cta-link--secondary": "_purpur-cta-link--
|
|
157
|
-
"purpur-cta-link--secondary-negative": "_purpur-cta-link--secondary-
|
|
158
|
-
"purpur-cta-link--expressive": "_purpur-cta-link--
|
|
159
|
-
"purpur-cta-link--expressive-negative": "_purpur-cta-link--expressive-
|
|
147
|
+
"purpur-cta-link": "_purpur-cta-link_1mhg7_1",
|
|
148
|
+
"purpur-cta-link--sm": "_purpur-cta-link--sm_1mhg7_33",
|
|
149
|
+
"purpur-cta-link--icon-only": "_purpur-cta-link--icon-only_1mhg7_36",
|
|
150
|
+
"purpur-cta-link--md": "_purpur-cta-link--md_1mhg7_39",
|
|
151
|
+
"purpur-cta-link--lg": "_purpur-cta-link--lg_1mhg7_45",
|
|
152
|
+
"purpur-cta-link--full-width": "_purpur-cta-link--full-width_1mhg7_51",
|
|
153
|
+
"purpur-cta-link--primary": "_purpur-cta-link--primary_1mhg7_54",
|
|
154
|
+
"purpur-cta-link--disabled": "_purpur-cta-link--disabled_1mhg7_58",
|
|
155
|
+
"purpur-cta-link--primary-negative": "_purpur-cta-link--primary-negative_1mhg7_64",
|
|
156
|
+
"purpur-cta-link--secondary": "_purpur-cta-link--secondary_1mhg7_76",
|
|
157
|
+
"purpur-cta-link--secondary-negative": "_purpur-cta-link--secondary-negative_1mhg7_87",
|
|
158
|
+
"purpur-cta-link--expressive": "_purpur-cta-link--expressive_1mhg7_98",
|
|
159
|
+
"purpur-cta-link--expressive-negative": "_purpur-cta-link--expressive-negative_1mhg7_108"
|
|
160
160
|
}, p = "purpur-cta-link", D = ["forward", "external", "back", "phone"], I = {
|
|
161
161
|
forward: S,
|
|
162
162
|
external: j,
|
|
163
163
|
back: M,
|
|
164
164
|
phone: L
|
|
165
165
|
}, P = ({
|
|
166
|
-
children:
|
|
166
|
+
children: e,
|
|
167
167
|
className: l,
|
|
168
168
|
["data-testid"]: a,
|
|
169
169
|
fullWidth: i = !1,
|
|
170
170
|
iconOnly: u,
|
|
171
171
|
size: r = o.MD,
|
|
172
|
-
variant:
|
|
172
|
+
variant: t,
|
|
173
173
|
icon: n = "forward",
|
|
174
174
|
...d
|
|
175
175
|
}) => {
|
|
176
|
-
const
|
|
176
|
+
const h = H(
|
|
177
177
|
[
|
|
178
178
|
l,
|
|
179
179
|
s[p],
|
|
180
|
-
s[`${p}--${
|
|
180
|
+
s[`${p}--${t}`],
|
|
181
181
|
s[`${p}--${r}`]
|
|
182
182
|
],
|
|
183
183
|
{
|
|
184
184
|
[s[`${p}--icon-only`]]: u,
|
|
185
|
-
[s[`${p}--negative`]]:
|
|
185
|
+
[s[`${p}--negative`]]: t.endsWith("negative"),
|
|
186
186
|
[s[`${p}--full-width`]]: i
|
|
187
187
|
}
|
|
188
|
-
),
|
|
189
|
-
return /* @__PURE__ */ y(
|
|
190
|
-
(n === "back" || n === "phone") && /* @__PURE__ */ c(
|
|
191
|
-
!u &&
|
|
192
|
-
(n === "forward" || n === "external") && /* @__PURE__ */ c(
|
|
188
|
+
), w = d.href ? "a" : "span", g = I[n];
|
|
189
|
+
return /* @__PURE__ */ y(w, { className: h, "data-testid": a, ...d, children: [
|
|
190
|
+
(n === "back" || n === "phone") && /* @__PURE__ */ c(m, { svg: g, size: r === o.LG ? "sm" : "xs" }),
|
|
191
|
+
!u && e,
|
|
192
|
+
(n === "forward" || n === "external") && /* @__PURE__ */ c(m, { svg: g, size: r === o.LG ? "sm" : "xs" })
|
|
193
193
|
] });
|
|
194
194
|
};
|
|
195
195
|
export {
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._purpur-cta-
|
|
1
|
+
._purpur-cta-link_1mhg7_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);outline:0;position:relative;text-decoration:none;transition:all var(--purpur-motion-duration-100) ease;width:auto}._purpur-cta-link_1mhg7_1:focus:before{border-radius:var(--purpur-border-radius-full);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_1mhg7_1:focus:not(:focus-visible):before{box-shadow:none}._purpur-cta-link_1mhg7_1 svg{display:block}._purpur-cta-link--sm_1mhg7_33{padding:var(--purpur-spacing-100) var(--purpur-spacing-250)}._purpur-cta-link--sm_1mhg7_33._purpur-cta-link--icon-only_1mhg7_36{padding:var(--purpur-spacing-100)}._purpur-cta-link--md_1mhg7_39{padding:var(--purpur-spacing-150) var(--purpur-spacing-300)}._purpur-cta-link--md_1mhg7_39._purpur-cta-link--icon-only_1mhg7_36{padding:var(--purpur-spacing-150)}._purpur-cta-link--lg_1mhg7_45{padding:var(--purpur-spacing-200) var(--purpur-spacing-400)}._purpur-cta-link--lg_1mhg7_45._purpur-cta-link--icon-only_1mhg7_36{padding:var(--purpur-spacing-200)}._purpur-cta-link--full-width_1mhg7_51{width:100%}._purpur-cta-link--primary_1mhg7_54{background-color:var(--purpur-color-background-interactive-primary);color:var(--purpur-color-text-interactive-on-primary)}._purpur-cta-link--primary_1mhg7_54:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-primary-hover)}._purpur-cta-link--primary_1mhg7_54:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-primary-active)}._purpur-cta-link--primary-negative_1mhg7_64{background-color:var(--purpur-color-background-interactive-primary-negative);color:var(--purpur-color-text-interactive-on-primary-negative)}._purpur-cta-link--primary-negative_1mhg7_64:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-primary-negative-hover);border-color:var(--purpur-color-background-interactive-primary-negative-hover)}._purpur-cta-link--primary-negative_1mhg7_64:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-primary-negative-active);border-color:var(--purpur-color-background-interactive-primary-negative-active)}._purpur-cta-link--secondary_1mhg7_76{background-color:var(--purpur-color-background-interactive-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_1mhg7_76:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-transparent-hover)}._purpur-cta-link--secondary_1mhg7_76:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-transparent-active)}._purpur-cta-link--secondary-negative_1mhg7_87{background-color:var(--purpur-color-background-interactive-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_1mhg7_87:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-transparent-negative-hover)}._purpur-cta-link--secondary-negative_1mhg7_87:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-transparent-negative-active)}._purpur-cta-link--expressive_1mhg7_98{background-color:var(--purpur-color-background-interactive-expressive);color:var(--purpur-color-text-interactive-on-expressive)}._purpur-cta-link--expressive_1mhg7_98:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-expressive-hover)}._purpur-cta-link--expressive_1mhg7_98:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-expressive-active)}._purpur-cta-link--expressive-negative_1mhg7_108{background-color:var(--purpur-color-background-interactive-expressive-negative);color:var(--purpur-color-text-interactive-on-expressive-negative)}._purpur-cta-link--expressive-negative_1mhg7_108:hover:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-expressive-negative-hover);color:var(--purpur-color-text-interactive-on-expressive-negative-hover)}._purpur-cta-link--expressive-negative_1mhg7_108:active:not(._purpur-cta-link--disabled_1mhg7_58){background-color:var(--purpur-color-background-interactive-expressive-negative-active);color:var(--purpur-color-text-interactive-on-expressive-negative-active)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/cta-link",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.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",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"source": "src/cta-link.tsx",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"classnames": "~2.5.0",
|
|
18
|
-
"@purpurds/action": "4.
|
|
19
|
-
"@purpurds/
|
|
20
|
-
"@purpurds/
|
|
18
|
+
"@purpurds/action": "4.5.0",
|
|
19
|
+
"@purpurds/tokens": "4.5.0",
|
|
20
|
+
"@purpurds/icon": "4.5.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@rushstack/eslint-patch": "~1.10.0",
|