@purpurds/badge 7.13.1 → 8.0.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 +1 -1
- package/dist/badge.cjs.js +2 -2
- package/dist/badge.es.js +63 -63
- package/dist/badge.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/badge.module.scss +4 -4
package/dist/LICENSE.txt
CHANGED
package/dist/badge.cjs.js
CHANGED
|
@@ -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
|
-
*/var v;function b(){return v||(v=1,function(r){(function(){var s={}.hasOwnProperty;function t(){for(var e="",a=0;a<arguments.length;a++){var n=arguments[a];n&&(e=
|
|
5
|
+
*/var v;function b(){return v||(v=1,function(r){(function(){var s={}.hasOwnProperty;function t(){for(var e="",a=0;a<arguments.length;a++){var n=arguments[a];n&&(e=l(e,o.call(this,n)))}return e}function o(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return t.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var a="";for(var n in e)s.call(e,n)&&e[n]&&(a=l(a,this&&this[n]||n));return a}function l(e,a){return a?e?e+" "+a:e+a:e}r.exports?(t.default=t,r.exports=t):window.classNames=t})()}(g)),g.exports}var x=b();const Z=y(x),A={"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=Z.bind(A),f="purpur-icon",M="md",S=r=>r.filter(s=>Object.keys(s).length>=1).map(s=>`${s.name}="${s.value}"`).join(" "),C=({content:r="",title:s}={})=>{const t=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},s?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=s?`<title>${s}</title>`:"";return`<svg ${S(t)}>${o}${r}</svg>`},O=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),_=({svg:r,allyTitle:s,className:t,size:o=M,...l})=>{const e=C({content:O(r.svg),title:s}),a=N(t,f,`${f}--${o}`);return d.jsx("span",{className:a,dangerouslySetInnerHTML:{__html:e},...l})};_.displayName="Icon";const R={name:"alert",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="m13.038 7.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.586 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.664 0 1.25.601 1.25 1.234Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["alert"],category:"status"},E={name:"check-circle",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.487 9.514a.872.872 0 1 0-1.42-1.014l-4.248 5.948-2.18-2.18a.872.872 0 0 0-1.233 1.234l2.908 2.908a.872.872 0 0 0 1.326-.11l4.847-6.786Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["check-circle"],category:"status"},$={name:"devices",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10 3.4a.1.1 0 0 0-.1.1V4a.9.9 0 0 1-1.8 0v-.5c0-1.05.85-1.9 1.9-1.9h10c1.05 0 1.9.85 1.9 1.9v15a1.9 1.9 0 0 1-1.9 1.9h-6a.9.9 0 1 1 0-1.8h6a.1.1 0 0 0 .1-.1v-15a.1.1 0 0 0-.1-.1H10ZM2.1 8c0-1.05.85-1.9 1.9-1.9h6c1.05 0 1.9.85 1.9 1.9v12a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V8ZM4 7.9a.1.1 0 0 0-.1.1v12a.1.1 0 0 0 .1.1h6a.1.1 0 0 0 .1-.1V8a.1.1 0 0 0-.1-.1H4ZM14.6 17a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8h-.5a.9.9 0 0 1-.9-.9Zm-8.5 1.5a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8H7a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',keywords:["devices"],category:"device"},I={name:"error",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.354 3.05c.732-1.267 2.56-1.267 3.291 0l8.66 15c.732 1.267-.182 2.85-1.645 2.85H3.34c-1.463 0-2.377-1.583-1.646-2.85l8.66-15Zm1.595.862a.092.092 0 0 0-.036.038l-8.66 15a.092.092 0 0 0-.015.05c0 .014.005.032.015.05a.11.11 0 0 0 .036.038.09.09 0 0 0 .05.012H20.66a.088.088 0 0 0 .05-.012.106.106 0 0 0 .037-.038.105.105 0 0 0 .015-.05.092.092 0 0 0-.015-.05l-8.66-15a.092.092 0 0 0-.036-.038A.106.106 0 0 0 12 3.9a.105.105 0 0 0-.05.012Z" clip-rule="evenodd"/><path d="m12.523 14.922.412-6.25a.936.936 0 1 0-1.868 0l.421 6.25h1.035ZM12 17.52c.44 0 .826-.387.826-.815 0-.418-.387-.816-.826-.816-.428 0-.825.398-.825.816 0 .428.397.815.825.815Z"/><path fill-rule="evenodd" d="M12.691 15.096h-1.37l-.431-6.53a1 1 0 0 1 .997-1.066h.227a1 1 0 0 1 .998 1.064l-.42 6.532Zm.244-6.425a.936.936 0 1 0-1.868.002l.421 6.249h1.035l.412-6.25ZM13 16.706c0 .526-.466.99-1 .99-.522 0-1-.463-1-.99 0-.264.125-.51.304-.689.18-.178.429-.301.696-.301.536 0 1 .475 1 .99Zm-.174 0c0 .428-.387.815-.826.815-.428 0-.825-.387-.825-.815 0-.418.397-.816.825-.816.44 0 .826.398.826.816Z" clip-rule="evenodd"/></svg>',keywords:["error"],category:"status"},V={name:"info",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["info"],category:"status"},j={name:"offering",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.118 4.6H7a1.9 1.9 0 0 0-1.9 1.9V8a1.9 1.9 0 0 0 1.5 1.858v.642a.9.9 0 1 0 1.8 0v-.6h3.2v.6a.9.9 0 0 0 1.8 0v-.6h3.7V11a.9.9 0 0 0 1.8 0V9.858A1.9 1.9 0 0 0 20.4 8V6.5a1.9 1.9 0 0 0-1.9-1.9h-.618c-.063-.708-.3-1.394-.756-1.943-.56-.674-1.384-1.057-2.376-1.057-.92 0-1.696.33-2.25.915-.554-.585-1.33-.915-2.25-.915-.992 0-1.816.383-2.376 1.057-.457.549-.693 1.235-.756 1.943Zm1.812 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm4.5 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm-.03 3.5h5.1a.1.1 0 0 0 .1-.1V6.5a.1.1 0 0 0-.1-.1h-5.1v1.7Zm-1.8-1.7H7a.1.1 0 0 0-.1.1V8a.1.1 0 0 0 .1.1h4.6V6.4Zm8.335 5.147c.743-.107 1.52.135 2.201.817.474.473.695 1.011.708 1.548.012.508-.163.927-.318 1.2-.185.326-.47.607-.634.77l-.049.047-4.414 4.414a1.9 1.9 0 0 1-1.343.557H7.914a.1.1 0 0 0-.07.03l-.5.5a1.9 1.9 0 0 1-2.687 0L2.57 19.342a1.9 1.9 0 0 1 0-2.686l4-4a1.9 1.9 0 0 1 1.343-.557H14.5v.9-.9h.041l.065.004a2.73 2.73 0 0 1 .79.185 2.665 2.665 0 0 1 1.46 1.417c.188-.162.375-.324.551-.479.46-.401.815-.722.957-.863.338-.34.882-.719 1.571-.817ZM15.088 15.1a1.06 1.06 0 0 0 .08-.145c.1-.207.113-.38.027-.553a.867.867 0 0 0-.668-.497.628.628 0 0 0-.042-.005h-6.57a.1.1 0 0 0-.071.03l-4 4a.1.1 0 0 0 0 .14l2.085 2.087a.1.1 0 0 0 .142 0l.5-.5a1.9 1.9 0 0 1 1.343-.557h8.172a.1.1 0 0 0 .07-.03l4.415-4.414c.225-.225.334-.335.39-.434a.539.539 0 0 0 .083-.266.283.283 0 0 0-.026-.11.712.712 0 0 0-.154-.21c-.319-.318-.542-.326-.674-.307-.186.026-.392.146-.554.307-.191.192-.595.553-1.043.946-.904.79-2.143 1.838-2.561 2.144l-.238.174H10.5a.9.9 0 0 1 0-1.8h4.588Z" clip-rule="evenodd"/></svg>',keywords:["offering"],category:"other"},B={name:"question",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.672 12.056c-.635.547-1.242 1.07-1.164 2.062h-1.385c-.309-1.553.504-2.214 1.23-2.805.514-.419.986-.802.986-1.442 0-.593-.489-1.068-1.267-1.068-.764 0-1.345.422-1.872 1.187L9 9.067C9.712 7.92 10.807 7.3 12.086 7.3 13.906 7.3 15 8.42 15 9.78c0 1.133-.678 1.717-1.328 2.277Zm-.822 3.763c0 .54-.487 1.028-1.041 1.028-.554 0-1.042-.488-1.042-1.028 0-.528.488-1.029 1.042-1.029s1.042.501 1.042 1.029Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["question"],category:"status"},T={name:"tag",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 4a.9.9 0 0 1 .9-.9h6.5a.9.9 0 0 1 .636.264l10 10a.9.9 0 0 1 0 1.272l-4.5 4.5a.9.9 0 1 1-1.272-1.272L19.227 14l-9.1-9.1H4.9v5.227l9.736 9.737a.9.9 0 1 1-1.272 1.272l-10-10A.9.9 0 0 1 3.1 10.5V4ZM8 7.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2ZM5.6 8a2.4 2.4 0 1 1 4.8 0 2.4 2.4 0 0 1-4.8 0Z" clip-rule="evenodd"/></svg>',keywords:["tag"],category:"other"};function H(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var c={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
|
|
9
|
+
*/var h;function k(){return h||(h=1,function(r){(function(){var s={}.hasOwnProperty;function t(){for(var e="",a=0;a<arguments.length;a++){var n=arguments[a];n&&(e=l(e,o(n)))}return e}function o(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e!="object")return"";if(Array.isArray(e))return t.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var a="";for(var n in e)s.call(e,n)&&e[n]&&(a=l(a,n));return a}function l(e,a){return a?e?e+" "+a:e+a:e}r.exports?(t.default=t,r.exports=t):window.classNames=t})()}(c)),c.exports}var q=k();const m=H(q),i={"purpur-badge":"_purpur-badge_1nup9_1","purpur-badge__icon":"_purpur-badge__icon_1nup9_13","purpur-badge--attention":"_purpur-badge--attention_1nup9_17","purpur-badge--special":"_purpur-badge--special_1nup9_21","purpur-badge--neutral":"_purpur-badge--neutral_1nup9_25","purpur-badge--general":"_purpur-badge--general_1nup9_29","purpur-badge--information":"_purpur-badge--information_1nup9_33","purpur-badge--success":"_purpur-badge--success_1nup9_37","purpur-badge--warning":"_purpur-badge--warning_1nup9_41","purpur-badge--error":"_purpur-badge--error_1nup9_45","purpur-badge--black-friday":"_purpur-badge--black-friday_1nup9_49"},p="purpur-badge",u={ATTENTION:"attention",BLACK_FRIDAY:"black-friday",ERROR:"error",GENERAL:"general",INFORMATION:"information",NEUTRAL:"neutral",SPECIAL:"special",SUCCESS:"success",WARNING:"warning"},L=Object.values(u),P=r=>{switch(r){case u.ATTENTION:case u.SPECIAL:return j;case u.INFORMATION:return V;case u.GENERAL:return $;case u.SUCCESS:return E;case u.WARNING:return R;case u.ERROR:return I;case u.NEUTRAL:return B;case u.BLACK_FRIDAY:return T;default:return}},G=({children:r,showIcon:s=!0,iconAllyTitle:t,variant:o,["data-testid"]:l,className:e="",...a})=>{const n=P(o),w=m([e,i[p],i[`${p}--${o}`]]);return d.jsxs("span",{className:w,"data-testid":l,...a,children:[s&&n&&d.jsx(_,{"data-testid":`${l}-icon`,allyTitle:t,size:"xs",svg:n,className:m(i[`${p}__icon`])}),r]})};exports.BADGE_VARIANT=u;exports.Badge=G;exports.badgeVariants=L;
|
|
10
10
|
//# sourceMappingURL=badge.cjs.js.map
|
package/dist/badge.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as m, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
function b(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
@@ -16,11 +16,11 @@ function x() {
|
|
|
16
16
|
function t() {
|
|
17
17
|
for (var r = "", a = 0; a < arguments.length; a++) {
|
|
18
18
|
var n = arguments[a];
|
|
19
|
-
n && (r = o(r,
|
|
19
|
+
n && (r = o(r, u.call(this, n)));
|
|
20
20
|
}
|
|
21
21
|
return r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function u(r) {
|
|
24
24
|
if (typeof r == "string" || typeof r == "number")
|
|
25
25
|
return this && this[r] || r;
|
|
26
26
|
if (typeof r != "object")
|
|
@@ -50,64 +50,64 @@ const A = /* @__PURE__ */ b(Z), N = {
|
|
|
50
50
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
51
51
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
52
52
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
53
|
-
}, M = A.bind(N), v = "purpur-icon", S = "md",
|
|
53
|
+
}, M = A.bind(N), v = "purpur-icon", S = "md", C = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), O = ({ content: e = "", title: s } = {}) => {
|
|
54
54
|
const t = [
|
|
55
55
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
56
56
|
{ name: "fill", value: "currentColor" },
|
|
57
57
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
58
58
|
s ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
59
|
-
],
|
|
60
|
-
return `<svg ${
|
|
61
|
-
},
|
|
62
|
-
const r =
|
|
63
|
-
content:
|
|
59
|
+
], u = s ? `<title>${s}</title>` : "";
|
|
60
|
+
return `<svg ${C(t)}>${u}${e}</svg>`;
|
|
61
|
+
}, R = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), _ = ({ svg: e, allyTitle: s, className: t, size: u = S, ...o }) => {
|
|
62
|
+
const r = O({
|
|
63
|
+
content: R(e.svg),
|
|
64
64
|
title: s
|
|
65
|
-
}), a = M(t, v, `${v}--${
|
|
66
|
-
return /* @__PURE__ */
|
|
65
|
+
}), a = M(t, v, `${v}--${u}`);
|
|
66
|
+
return /* @__PURE__ */ m("span", { className: a, dangerouslySetInnerHTML: { __html: r }, ...o });
|
|
67
67
|
};
|
|
68
68
|
_.displayName = "Icon";
|
|
69
|
-
const
|
|
69
|
+
const $ = {
|
|
70
70
|
name: "alert",
|
|
71
71
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="m13.038 7.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.586 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.664 0 1.25.601 1.25 1.234Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
72
72
|
keywords: ["alert"],
|
|
73
73
|
category: "status"
|
|
74
|
-
},
|
|
74
|
+
}, E = {
|
|
75
75
|
name: "check-circle",
|
|
76
76
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.487 9.514a.872.872 0 1 0-1.42-1.014l-4.248 5.948-2.18-2.18a.872.872 0 0 0-1.233 1.234l2.908 2.908a.872.872 0 0 0 1.326-.11l4.847-6.786Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
77
77
|
keywords: ["check-circle"],
|
|
78
78
|
category: "status"
|
|
79
|
-
},
|
|
79
|
+
}, I = {
|
|
80
80
|
name: "devices",
|
|
81
81
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10 3.4a.1.1 0 0 0-.1.1V4a.9.9 0 0 1-1.8 0v-.5c0-1.05.85-1.9 1.9-1.9h10c1.05 0 1.9.85 1.9 1.9v15a1.9 1.9 0 0 1-1.9 1.9h-6a.9.9 0 1 1 0-1.8h6a.1.1 0 0 0 .1-.1v-15a.1.1 0 0 0-.1-.1H10ZM2.1 8c0-1.05.85-1.9 1.9-1.9h6c1.05 0 1.9.85 1.9 1.9v12a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V8ZM4 7.9a.1.1 0 0 0-.1.1v12a.1.1 0 0 0 .1.1h6a.1.1 0 0 0 .1-.1V8a.1.1 0 0 0-.1-.1H4ZM14.6 17a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8h-.5a.9.9 0 0 1-.9-.9Zm-8.5 1.5a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8H7a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"/></svg>',
|
|
82
82
|
keywords: ["devices"],
|
|
83
83
|
category: "device"
|
|
84
|
-
},
|
|
84
|
+
}, V = {
|
|
85
85
|
name: "error",
|
|
86
86
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.354 3.05c.732-1.267 2.56-1.267 3.291 0l8.66 15c.732 1.267-.182 2.85-1.645 2.85H3.34c-1.463 0-2.377-1.583-1.646-2.85l8.66-15Zm1.595.862a.092.092 0 0 0-.036.038l-8.66 15a.092.092 0 0 0-.015.05c0 .014.005.032.015.05a.11.11 0 0 0 .036.038.09.09 0 0 0 .05.012H20.66a.088.088 0 0 0 .05-.012.106.106 0 0 0 .037-.038.105.105 0 0 0 .015-.05.092.092 0 0 0-.015-.05l-8.66-15a.092.092 0 0 0-.036-.038A.106.106 0 0 0 12 3.9a.105.105 0 0 0-.05.012Z" clip-rule="evenodd"/><path d="m12.523 14.922.412-6.25a.936.936 0 1 0-1.868 0l.421 6.25h1.035ZM12 17.52c.44 0 .826-.387.826-.815 0-.418-.387-.816-.826-.816-.428 0-.825.398-.825.816 0 .428.397.815.825.815Z"/><path fill-rule="evenodd" d="M12.691 15.096h-1.37l-.431-6.53a1 1 0 0 1 .997-1.066h.227a1 1 0 0 1 .998 1.064l-.42 6.532Zm.244-6.425a.936.936 0 1 0-1.868.002l.421 6.249h1.035l.412-6.25ZM13 16.706c0 .526-.466.99-1 .99-.522 0-1-.463-1-.99 0-.264.125-.51.304-.689.18-.178.429-.301.696-.301.536 0 1 .475 1 .99Zm-.174 0c0 .428-.387.815-.826.815-.428 0-.825-.387-.825-.815 0-.418.397-.816.825-.816.44 0 .826.398.826.816Z" clip-rule="evenodd"/></svg>',
|
|
87
87
|
keywords: ["error"],
|
|
88
88
|
category: "status"
|
|
89
|
-
},
|
|
89
|
+
}, B = {
|
|
90
90
|
name: "info",
|
|
91
91
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
92
92
|
keywords: ["info"],
|
|
93
93
|
category: "status"
|
|
94
|
-
},
|
|
94
|
+
}, H = {
|
|
95
95
|
name: "offering",
|
|
96
96
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.118 4.6H7a1.9 1.9 0 0 0-1.9 1.9V8a1.9 1.9 0 0 0 1.5 1.858v.642a.9.9 0 1 0 1.8 0v-.6h3.2v.6a.9.9 0 0 0 1.8 0v-.6h3.7V11a.9.9 0 0 0 1.8 0V9.858A1.9 1.9 0 0 0 20.4 8V6.5a1.9 1.9 0 0 0-1.9-1.9h-.618c-.063-.708-.3-1.394-.756-1.943-.56-.674-1.384-1.057-2.376-1.057-.92 0-1.696.33-2.25.915-.554-.585-1.33-.915-2.25-.915-.992 0-1.816.383-2.376 1.057-.457.549-.693 1.235-.756 1.943Zm1.812 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm4.5 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm-.03 3.5h5.1a.1.1 0 0 0 .1-.1V6.5a.1.1 0 0 0-.1-.1h-5.1v1.7Zm-1.8-1.7H7a.1.1 0 0 0-.1.1V8a.1.1 0 0 0 .1.1h4.6V6.4Zm8.335 5.147c.743-.107 1.52.135 2.201.817.474.473.695 1.011.708 1.548.012.508-.163.927-.318 1.2-.185.326-.47.607-.634.77l-.049.047-4.414 4.414a1.9 1.9 0 0 1-1.343.557H7.914a.1.1 0 0 0-.07.03l-.5.5a1.9 1.9 0 0 1-2.687 0L2.57 19.342a1.9 1.9 0 0 1 0-2.686l4-4a1.9 1.9 0 0 1 1.343-.557H14.5v.9-.9h.041l.065.004a2.73 2.73 0 0 1 .79.185 2.665 2.665 0 0 1 1.46 1.417c.188-.162.375-.324.551-.479.46-.401.815-.722.957-.863.338-.34.882-.719 1.571-.817ZM15.088 15.1a1.06 1.06 0 0 0 .08-.145c.1-.207.113-.38.027-.553a.867.867 0 0 0-.668-.497.628.628 0 0 0-.042-.005h-6.57a.1.1 0 0 0-.071.03l-4 4a.1.1 0 0 0 0 .14l2.085 2.087a.1.1 0 0 0 .142 0l.5-.5a1.9 1.9 0 0 1 1.343-.557h8.172a.1.1 0 0 0 .07-.03l4.415-4.414c.225-.225.334-.335.39-.434a.539.539 0 0 0 .083-.266.283.283 0 0 0-.026-.11.712.712 0 0 0-.154-.21c-.319-.318-.542-.326-.674-.307-.186.026-.392.146-.554.307-.191.192-.595.553-1.043.946-.904.79-2.143 1.838-2.561 2.144l-.238.174H10.5a.9.9 0 0 1 0-1.8h4.588Z" clip-rule="evenodd"/></svg>',
|
|
97
97
|
keywords: ["offering"],
|
|
98
98
|
category: "other"
|
|
99
|
-
},
|
|
99
|
+
}, T = {
|
|
100
100
|
name: "question",
|
|
101
101
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.672 12.056c-.635.547-1.242 1.07-1.164 2.062h-1.385c-.309-1.553.504-2.214 1.23-2.805.514-.419.986-.802.986-1.442 0-.593-.489-1.068-1.267-1.068-.764 0-1.345.422-1.872 1.187L9 9.067C9.712 7.92 10.807 7.3 12.086 7.3 13.906 7.3 15 8.42 15 9.78c0 1.133-.678 1.717-1.328 2.277Zm-.822 3.763c0 .54-.487 1.028-1.041 1.028-.554 0-1.042-.488-1.042-1.028 0-.528.488-1.029 1.042-1.029s1.042.501 1.042 1.029Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
102
102
|
keywords: ["question"],
|
|
103
103
|
category: "status"
|
|
104
|
-
},
|
|
104
|
+
}, j = {
|
|
105
105
|
name: "tag",
|
|
106
106
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 4a.9.9 0 0 1 .9-.9h6.5a.9.9 0 0 1 .636.264l10 10a.9.9 0 0 1 0 1.272l-4.5 4.5a.9.9 0 1 1-1.272-1.272L19.227 14l-9.1-9.1H4.9v5.227l9.736 9.737a.9.9 0 1 1-1.272 1.272l-10-10A.9.9 0 0 1 3.1 10.5V4ZM8 7.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2ZM5.6 8a2.4 2.4 0 1 1 4.8 0 2.4 2.4 0 0 1-4.8 0Z" clip-rule="evenodd"/></svg>',
|
|
107
107
|
keywords: ["tag"],
|
|
108
108
|
category: "other"
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function k(e) {
|
|
111
111
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
112
112
|
}
|
|
113
113
|
var c = { exports: {} };
|
|
@@ -116,19 +116,19 @@ var c = { exports: {} };
|
|
|
116
116
|
Licensed under the MIT License (MIT), see
|
|
117
117
|
http://jedwatson.github.io/classnames
|
|
118
118
|
*/
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
return
|
|
119
|
+
var f;
|
|
120
|
+
function L() {
|
|
121
|
+
return f || (f = 1, function(e) {
|
|
122
122
|
(function() {
|
|
123
123
|
var s = {}.hasOwnProperty;
|
|
124
124
|
function t() {
|
|
125
125
|
for (var r = "", a = 0; a < arguments.length; a++) {
|
|
126
126
|
var n = arguments[a];
|
|
127
|
-
n && (r = o(r,
|
|
127
|
+
n && (r = o(r, u(n)));
|
|
128
128
|
}
|
|
129
129
|
return r;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function u(r) {
|
|
132
132
|
if (typeof r == "string" || typeof r == "number")
|
|
133
133
|
return r;
|
|
134
134
|
if (typeof r != "object")
|
|
@@ -149,20 +149,20 @@ function k() {
|
|
|
149
149
|
})();
|
|
150
150
|
}(c)), c.exports;
|
|
151
151
|
}
|
|
152
|
-
var
|
|
153
|
-
const
|
|
154
|
-
"purpur-badge": "_purpur-
|
|
155
|
-
"purpur-badge__icon": "_purpur-
|
|
156
|
-
"purpur-badge--attention": "_purpur-badge--
|
|
157
|
-
"purpur-badge--special": "_purpur-badge--
|
|
158
|
-
"purpur-badge--neutral": "_purpur-badge--
|
|
159
|
-
"purpur-badge--general": "_purpur-badge--
|
|
160
|
-
"purpur-badge--information": "_purpur-badge--
|
|
161
|
-
"purpur-badge--success": "_purpur-badge--
|
|
162
|
-
"purpur-badge--warning": "_purpur-badge--
|
|
163
|
-
"purpur-badge--error": "_purpur-badge--
|
|
164
|
-
"purpur-badge--black-friday": "_purpur-badge--black-
|
|
165
|
-
},
|
|
152
|
+
var q = L();
|
|
153
|
+
const h = /* @__PURE__ */ k(q), p = {
|
|
154
|
+
"purpur-badge": "_purpur-badge_1nup9_1",
|
|
155
|
+
"purpur-badge__icon": "_purpur-badge__icon_1nup9_13",
|
|
156
|
+
"purpur-badge--attention": "_purpur-badge--attention_1nup9_17",
|
|
157
|
+
"purpur-badge--special": "_purpur-badge--special_1nup9_21",
|
|
158
|
+
"purpur-badge--neutral": "_purpur-badge--neutral_1nup9_25",
|
|
159
|
+
"purpur-badge--general": "_purpur-badge--general_1nup9_29",
|
|
160
|
+
"purpur-badge--information": "_purpur-badge--information_1nup9_33",
|
|
161
|
+
"purpur-badge--success": "_purpur-badge--success_1nup9_37",
|
|
162
|
+
"purpur-badge--warning": "_purpur-badge--warning_1nup9_41",
|
|
163
|
+
"purpur-badge--error": "_purpur-badge--error_1nup9_45",
|
|
164
|
+
"purpur-badge--black-friday": "_purpur-badge--black-friday_1nup9_49"
|
|
165
|
+
}, i = "purpur-badge", l = {
|
|
166
166
|
ATTENTION: "attention",
|
|
167
167
|
BLACK_FRIDAY: "black-friday",
|
|
168
168
|
ERROR: "error",
|
|
@@ -172,55 +172,55 @@ const f = /* @__PURE__ */ T(L), i = {
|
|
|
172
172
|
SPECIAL: "special",
|
|
173
173
|
SUCCESS: "success",
|
|
174
174
|
WARNING: "warning"
|
|
175
|
-
},
|
|
175
|
+
}, G = Object.values(l), P = (e) => {
|
|
176
176
|
switch (e) {
|
|
177
|
-
case
|
|
178
|
-
case
|
|
179
|
-
return
|
|
180
|
-
case
|
|
181
|
-
return
|
|
182
|
-
case
|
|
177
|
+
case l.ATTENTION:
|
|
178
|
+
case l.SPECIAL:
|
|
179
|
+
return H;
|
|
180
|
+
case l.INFORMATION:
|
|
181
|
+
return B;
|
|
182
|
+
case l.GENERAL:
|
|
183
|
+
return I;
|
|
184
|
+
case l.SUCCESS:
|
|
183
185
|
return E;
|
|
184
|
-
case
|
|
186
|
+
case l.WARNING:
|
|
185
187
|
return $;
|
|
186
|
-
case
|
|
187
|
-
return
|
|
188
|
-
case
|
|
189
|
-
return
|
|
190
|
-
case
|
|
191
|
-
return
|
|
192
|
-
case u.BLACK_FRIDAY:
|
|
193
|
-
return H;
|
|
188
|
+
case l.ERROR:
|
|
189
|
+
return V;
|
|
190
|
+
case l.NEUTRAL:
|
|
191
|
+
return T;
|
|
192
|
+
case l.BLACK_FRIDAY:
|
|
193
|
+
return j;
|
|
194
194
|
default:
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, D = ({
|
|
198
198
|
children: e,
|
|
199
199
|
showIcon: s = !0,
|
|
200
200
|
iconAllyTitle: t,
|
|
201
|
-
variant:
|
|
201
|
+
variant: u,
|
|
202
202
|
["data-testid"]: o,
|
|
203
203
|
className: r = "",
|
|
204
204
|
...a
|
|
205
205
|
}) => {
|
|
206
|
-
const n =
|
|
206
|
+
const n = P(u), w = h([r, p[i], p[`${i}--${u}`]]);
|
|
207
207
|
return /* @__PURE__ */ y("span", { className: w, "data-testid": o, ...a, children: [
|
|
208
|
-
s && n && /* @__PURE__ */
|
|
208
|
+
s && n && /* @__PURE__ */ m(
|
|
209
209
|
_,
|
|
210
210
|
{
|
|
211
211
|
"data-testid": `${o}-icon`,
|
|
212
212
|
allyTitle: t,
|
|
213
213
|
size: "xs",
|
|
214
214
|
svg: n,
|
|
215
|
-
className:
|
|
215
|
+
className: h(p[`${i}__icon`])
|
|
216
216
|
}
|
|
217
217
|
),
|
|
218
218
|
e
|
|
219
219
|
] });
|
|
220
220
|
};
|
|
221
221
|
export {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
l as BADGE_VARIANT,
|
|
223
|
+
D as Badge,
|
|
224
|
+
G as badgeVariants
|
|
225
225
|
};
|
|
226
226
|
//# sourceMappingURL=badge.es.js.map
|
package/dist/badge.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.es.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/alert.es.js","../../icon/dist/assets/check-circle.es.js","../../icon/dist/assets/devices.es.js","../../icon/dist/assets/error.es.js","../../icon/dist/assets/info.es.js","../../icon/dist/assets/offering.es.js","../../icon/dist/assets/question.es.js","../../icon/dist/assets/tag.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/badge.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: \"alert\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"m13.038 7.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.586 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.664 0 1.25.601 1.25 1.234Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"alert\"],\n category: \"status\"\n};\nexport {\n e as alert\n};\n//# sourceMappingURL=alert.es.js.map\n","const e = {\n name: \"check-circle\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16.487 9.514a.872.872 0 1 0-1.42-1.014l-4.248 5.948-2.18-2.18a.872.872 0 0 0-1.233 1.234l2.908 2.908a.872.872 0 0 0 1.326-.11l4.847-6.786Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"check-circle\"],\n category: \"status\"\n};\nexport {\n e as checkCircle\n};\n//# sourceMappingURL=check-circle.es.js.map\n","const a = {\n name: \"devices\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 3.4a.1.1 0 0 0-.1.1V4a.9.9 0 0 1-1.8 0v-.5c0-1.05.85-1.9 1.9-1.9h10c1.05 0 1.9.85 1.9 1.9v15a1.9 1.9 0 0 1-1.9 1.9h-6a.9.9 0 1 1 0-1.8h6a.1.1 0 0 0 .1-.1v-15a.1.1 0 0 0-.1-.1H10ZM2.1 8c0-1.05.85-1.9 1.9-1.9h6c1.05 0 1.9.85 1.9 1.9v12a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V8ZM4 7.9a.1.1 0 0 0-.1.1v12a.1.1 0 0 0 .1.1h6a.1.1 0 0 0 .1-.1V8a.1.1 0 0 0-.1-.1H4ZM14.6 17a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8h-.5a.9.9 0 0 1-.9-.9Zm-8.5 1.5a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8H7a.9.9 0 0 1-.9-.9Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"devices\"],\n category: \"device\"\n};\nexport {\n a as devices\n};\n//# sourceMappingURL=devices.es.js.map\n","const l = {\n name: \"error\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10.354 3.05c.732-1.267 2.56-1.267 3.291 0l8.66 15c.732 1.267-.182 2.85-1.645 2.85H3.34c-1.463 0-2.377-1.583-1.646-2.85l8.66-15Zm1.595.862a.092.092 0 0 0-.036.038l-8.66 15a.092.092 0 0 0-.015.05c0 .014.005.032.015.05a.11.11 0 0 0 .036.038.09.09 0 0 0 .05.012H20.66a.088.088 0 0 0 .05-.012.106.106 0 0 0 .037-.038.105.105 0 0 0 .015-.05.092.092 0 0 0-.015-.05l-8.66-15a.092.092 0 0 0-.036-.038A.106.106 0 0 0 12 3.9a.105.105 0 0 0-.05.012Z\" clip-rule=\"evenodd\"/><path d=\"m12.523 14.922.412-6.25a.936.936 0 1 0-1.868 0l.421 6.25h1.035ZM12 17.52c.44 0 .826-.387.826-.815 0-.418-.387-.816-.826-.816-.428 0-.825.398-.825.816 0 .428.397.815.825.815Z\"/><path fill-rule=\"evenodd\" d=\"M12.691 15.096h-1.37l-.431-6.53a1 1 0 0 1 .997-1.066h.227a1 1 0 0 1 .998 1.064l-.42 6.532Zm.244-6.425a.936.936 0 1 0-1.868.002l.421 6.249h1.035l.412-6.25ZM13 16.706c0 .526-.466.99-1 .99-.522 0-1-.463-1-.99 0-.264.125-.51.304-.689.18-.178.429-.301.696-.301.536 0 1 .475 1 .99Zm-.174 0c0 .428-.387.815-.826.815-.428 0-.825-.387-.825-.815 0-.418.397-.816.825-.816.44 0 .826.398.826.816Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"error\"],\n category: \"status\"\n};\nexport {\n l as error\n};\n//# sourceMappingURL=error.es.js.map\n","const o = {\n name: \"info\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"info\"],\n category: \"status\"\n};\nexport {\n o as info\n};\n//# sourceMappingURL=info.es.js.map\n","const a = {\n name: \"offering\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M7.118 4.6H7a1.9 1.9 0 0 0-1.9 1.9V8a1.9 1.9 0 0 0 1.5 1.858v.642a.9.9 0 1 0 1.8 0v-.6h3.2v.6a.9.9 0 0 0 1.8 0v-.6h3.7V11a.9.9 0 0 0 1.8 0V9.858A1.9 1.9 0 0 0 20.4 8V6.5a1.9 1.9 0 0 0-1.9-1.9h-.618c-.063-.708-.3-1.394-.756-1.943-.56-.674-1.384-1.057-2.376-1.057-.92 0-1.696.33-2.25.915-.554-.585-1.33-.915-2.25-.915-.992 0-1.816.383-2.376 1.057-.457.549-.693 1.235-.756 1.943Zm1.812 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm4.5 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm-.03 3.5h5.1a.1.1 0 0 0 .1-.1V6.5a.1.1 0 0 0-.1-.1h-5.1v1.7Zm-1.8-1.7H7a.1.1 0 0 0-.1.1V8a.1.1 0 0 0 .1.1h4.6V6.4Zm8.335 5.147c.743-.107 1.52.135 2.201.817.474.473.695 1.011.708 1.548.012.508-.163.927-.318 1.2-.185.326-.47.607-.634.77l-.049.047-4.414 4.414a1.9 1.9 0 0 1-1.343.557H7.914a.1.1 0 0 0-.07.03l-.5.5a1.9 1.9 0 0 1-2.687 0L2.57 19.342a1.9 1.9 0 0 1 0-2.686l4-4a1.9 1.9 0 0 1 1.343-.557H14.5v.9-.9h.041l.065.004a2.73 2.73 0 0 1 .79.185 2.665 2.665 0 0 1 1.46 1.417c.188-.162.375-.324.551-.479.46-.401.815-.722.957-.863.338-.34.882-.719 1.571-.817ZM15.088 15.1a1.06 1.06 0 0 0 .08-.145c.1-.207.113-.38.027-.553a.867.867 0 0 0-.668-.497.628.628 0 0 0-.042-.005h-6.57a.1.1 0 0 0-.071.03l-4 4a.1.1 0 0 0 0 .14l2.085 2.087a.1.1 0 0 0 .142 0l.5-.5a1.9 1.9 0 0 1 1.343-.557h8.172a.1.1 0 0 0 .07-.03l4.415-4.414c.225-.225.334-.335.39-.434a.539.539 0 0 0 .083-.266.283.283 0 0 0-.026-.11.712.712 0 0 0-.154-.21c-.319-.318-.542-.326-.674-.307-.186.026-.392.146-.554.307-.191.192-.595.553-1.043.946-.904.79-2.143 1.838-2.561 2.144l-.238.174H10.5a.9.9 0 0 1 0-1.8h4.588Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"offering\"],\n category: \"other\"\n};\nexport {\n a as offering\n};\n//# sourceMappingURL=offering.es.js.map\n","const e = {\n name: \"question\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M13.672 12.056c-.635.547-1.242 1.07-1.164 2.062h-1.385c-.309-1.553.504-2.214 1.23-2.805.514-.419.986-.802.986-1.442 0-.593-.489-1.068-1.267-1.068-.764 0-1.345.422-1.872 1.187L9 9.067C9.712 7.92 10.807 7.3 12.086 7.3 13.906 7.3 15 8.42 15 9.78c0 1.133-.678 1.717-1.328 2.277Zm-.822 3.763c0 .54-.487 1.028-1.041 1.028-.554 0-1.042-.488-1.042-1.028 0-.528.488-1.029 1.042-1.029s1.042.501 1.042 1.029Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"question\"],\n category: \"status\"\n};\nexport {\n e as question\n};\n//# sourceMappingURL=question.es.js.map\n","const l = {\n name: \"tag\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M3.1 4a.9.9 0 0 1 .9-.9h6.5a.9.9 0 0 1 .636.264l10 10a.9.9 0 0 1 0 1.272l-4.5 4.5a.9.9 0 1 1-1.272-1.272L19.227 14l-9.1-9.1H4.9v5.227l9.736 9.737a.9.9 0 1 1-1.272 1.272l-10-10A.9.9 0 0 1 3.1 10.5V4ZM8 7.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2ZM5.6 8a2.4 2.4 0 1 1 4.8 0 2.4 2.4 0 0 1-4.8 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"tag\"],\n category: \"other\"\n};\nexport {\n l as tag\n};\n//# sourceMappingURL=tag.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(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 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(null, 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, 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 ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { alert } from \"@purpurds/icon/assets/alert\";\nimport { checkCircle } from \"@purpurds/icon/assets/check-circle\";\nimport { devices } from \"@purpurds/icon/assets/devices\";\nimport { error } from \"@purpurds/icon/assets/error\";\nimport { info } from \"@purpurds/icon/assets/info\";\nimport { offering } from \"@purpurds/icon/assets/offering\";\nimport { question } from \"@purpurds/icon/assets/question\";\nimport { tag } from \"@purpurds/icon/assets/tag\";\nimport c from \"classnames\";\n\nimport styles from \"./badge.module.scss\";\nconst rootClassName = \"purpur-badge\";\n\nexport const BADGE_VARIANT = {\n ATTENTION: \"attention\",\n BLACK_FRIDAY: \"black-friday\",\n ERROR: \"error\",\n GENERAL: \"general\",\n INFORMATION: \"information\",\n NEUTRAL: \"neutral\",\n SPECIAL: \"special\",\n SUCCESS: \"success\",\n WARNING: \"warning\",\n} as const;\n\nexport const badgeVariants = Object.values(BADGE_VARIANT);\nexport type BadgeVariant = (typeof BADGE_VARIANT)[keyof typeof BADGE_VARIANT];\n\nconst getIcon = (variant: BadgeVariant) => {\n switch (variant) {\n case BADGE_VARIANT.ATTENTION:\n case BADGE_VARIANT.SPECIAL:\n return offering;\n case BADGE_VARIANT.INFORMATION:\n return info;\n case BADGE_VARIANT.GENERAL:\n return devices;\n case BADGE_VARIANT.SUCCESS:\n return checkCircle;\n case BADGE_VARIANT.WARNING:\n return alert;\n case BADGE_VARIANT.ERROR:\n return error;\n case BADGE_VARIANT.NEUTRAL:\n return question;\n case BADGE_VARIANT.BLACK_FRIDAY:\n return tag;\n default:\n return;\n }\n};\n\ntype WithIcon = {\n showIcon?: true;\n iconAllyTitle?: string;\n};\n\ntype WithoutIcon = {\n showIcon: false;\n iconAllyTitle?: never;\n};\n\nexport type BadgeProps = Omit<BaseProps<\"span\">, \"children\"> & {\n children: ReactNode;\n variant: BadgeVariant;\n} & (WithIcon | WithoutIcon);\n\nexport const Badge = ({\n children,\n showIcon = true,\n iconAllyTitle,\n variant,\n [\"data-testid\"]: dataTestid,\n className = \"\",\n ...props\n}: BadgeProps) => {\n const icon = getIcon(variant);\n\n const classes = c([className, styles[rootClassName], styles[`${rootClassName}--${variant}`]]);\n\n return (\n <span className={classes} data-testid={dataTestid} {...props}>\n {showIcon && icon && (\n <Icon\n data-testid={`${dataTestid}-icon`}\n allyTitle={iconAllyTitle}\n size=\"xs\"\n svg={icon}\n className={c(styles[`${rootClassName}__icon`])}\n />\n )}\n {children}\n </span>\n );\n};\n"],"names":["f","r","c","p","m","e","s","t","n","o","i","u","_","v","d","x","l","g","h","y","S","b","a","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","rootClassName","BADGE_VARIANT","badgeVariants","getIcon","variant","offering","info","devices","checkCircle","alert","error","question","tag","Badge","children","showIcon","iconAllyTitle","dataTestid","className","props","icon","styles","jsx","Icon"],"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,GAAI;AACvB;AAAA;AAAA;AAAA;AAAA;AAKA,IAAIC;AACJ,SAASC,IAAI;AACX,SAAOD,MAAMA,IAAI,GAAG,SAASF,GAAG;AAC9B,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,GAAGI,EAAE,KAAK,MAAMF,CAAC,CAAC;AAAA,QACxC;AACQ,eAAOF;AAAA,MACf;A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AAA;AAAA,IAAAJ,KAAYK,KACX,gBAAAE;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,eAAa,GAAGN,CAAU;AAAA,QAC1B,WAAWD;AAAA,QACX,MAAK;AAAA,QACL,KAAKI;AAAA,QACL,WAAWnD,EAAEoD,EAAO,GAAGrB,CAAa,QAAQ,CAAC;AAAA,MAAA;AAAA,IAC/C;AAAA,IAEDc;AAAA,EAAA,GACH;AAEJ;","x_google_ignoreList":[9]}
|
|
1
|
+
{"version":3,"file":"badge.es.js","sources":["../../icon/dist/icon.es.js","../../icon/dist/assets/alert.es.js","../../icon/dist/assets/check-circle.es.js","../../icon/dist/assets/devices.es.js","../../icon/dist/assets/error.es.js","../../icon/dist/assets/info.es.js","../../icon/dist/assets/offering.es.js","../../icon/dist/assets/question.es.js","../../icon/dist/assets/tag.es.js","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/badge.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: \"alert\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"m13.038 7.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.586 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.664 0 1.25.601 1.25 1.234Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"alert\"],\n category: \"status\"\n};\nexport {\n e as alert\n};\n//# sourceMappingURL=alert.es.js.map\n","const e = {\n name: \"check-circle\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M16.487 9.514a.872.872 0 1 0-1.42-1.014l-4.248 5.948-2.18-2.18a.872.872 0 0 0-1.233 1.234l2.908 2.908a.872.872 0 0 0 1.326-.11l4.847-6.786Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"check-circle\"],\n category: \"status\"\n};\nexport {\n e as checkCircle\n};\n//# sourceMappingURL=check-circle.es.js.map\n","const a = {\n name: \"devices\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10 3.4a.1.1 0 0 0-.1.1V4a.9.9 0 0 1-1.8 0v-.5c0-1.05.85-1.9 1.9-1.9h10c1.05 0 1.9.85 1.9 1.9v15a1.9 1.9 0 0 1-1.9 1.9h-6a.9.9 0 1 1 0-1.8h6a.1.1 0 0 0 .1-.1v-15a.1.1 0 0 0-.1-.1H10ZM2.1 8c0-1.05.85-1.9 1.9-1.9h6c1.05 0 1.9.85 1.9 1.9v12a1.9 1.9 0 0 1-1.9 1.9H4A1.9 1.9 0 0 1 2.1 20V8ZM4 7.9a.1.1 0 0 0-.1.1v12a.1.1 0 0 0 .1.1h6a.1.1 0 0 0 .1-.1V8a.1.1 0 0 0-.1-.1H4ZM14.6 17a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8h-.5a.9.9 0 0 1-.9-.9Zm-8.5 1.5a.9.9 0 0 1 .9-.9h.5a.9.9 0 1 1 0 1.8H7a.9.9 0 0 1-.9-.9Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"devices\"],\n category: \"device\"\n};\nexport {\n a as devices\n};\n//# sourceMappingURL=devices.es.js.map\n","const l = {\n name: \"error\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M10.354 3.05c.732-1.267 2.56-1.267 3.291 0l8.66 15c.732 1.267-.182 2.85-1.645 2.85H3.34c-1.463 0-2.377-1.583-1.646-2.85l8.66-15Zm1.595.862a.092.092 0 0 0-.036.038l-8.66 15a.092.092 0 0 0-.015.05c0 .014.005.032.015.05a.11.11 0 0 0 .036.038.09.09 0 0 0 .05.012H20.66a.088.088 0 0 0 .05-.012.106.106 0 0 0 .037-.038.105.105 0 0 0 .015-.05.092.092 0 0 0-.015-.05l-8.66-15a.092.092 0 0 0-.036-.038A.106.106 0 0 0 12 3.9a.105.105 0 0 0-.05.012Z\" clip-rule=\"evenodd\"/><path d=\"m12.523 14.922.412-6.25a.936.936 0 1 0-1.868 0l.421 6.25h1.035ZM12 17.52c.44 0 .826-.387.826-.815 0-.418-.387-.816-.826-.816-.428 0-.825.398-.825.816 0 .428.397.815.825.815Z\"/><path fill-rule=\"evenodd\" d=\"M12.691 15.096h-1.37l-.431-6.53a1 1 0 0 1 .997-1.066h.227a1 1 0 0 1 .998 1.064l-.42 6.532Zm.244-6.425a.936.936 0 1 0-1.868.002l.421 6.249h1.035l.412-6.25ZM13 16.706c0 .526-.466.99-1 .99-.522 0-1-.463-1-.99 0-.264.125-.51.304-.689.18-.178.429-.301.696-.301.536 0 1 .475 1 .99Zm-.174 0c0 .428-.387.815-.826.815-.428 0-.825-.387-.825-.815 0-.418.397-.816.825-.816.44 0 .826.398.826.816Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"error\"],\n category: \"status\"\n};\nexport {\n l as error\n};\n//# sourceMappingURL=error.es.js.map\n","const o = {\n name: \"info\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"info\"],\n category: \"status\"\n};\nexport {\n o as info\n};\n//# sourceMappingURL=info.es.js.map\n","const a = {\n name: \"offering\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M7.118 4.6H7a1.9 1.9 0 0 0-1.9 1.9V8a1.9 1.9 0 0 0 1.5 1.858v.642a.9.9 0 1 0 1.8 0v-.6h3.2v.6a.9.9 0 0 0 1.8 0v-.6h3.7V11a.9.9 0 0 0 1.8 0V9.858A1.9 1.9 0 0 0 20.4 8V6.5a1.9 1.9 0 0 0-1.9-1.9h-.618c-.063-.708-.3-1.394-.756-1.943-.56-.674-1.384-1.057-2.376-1.057-.92 0-1.696.33-2.25.915-.554-.585-1.33-.915-2.25-.915-.992 0-1.816.383-2.376 1.057-.457.549-.693 1.235-.756 1.943Zm1.812 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm4.5 0h2.64c-.053-.34-.174-.607-.328-.792-.192-.232-.493-.408-.992-.408s-.8.176-.992.408c-.154.185-.275.452-.328.792Zm-.03 3.5h5.1a.1.1 0 0 0 .1-.1V6.5a.1.1 0 0 0-.1-.1h-5.1v1.7Zm-1.8-1.7H7a.1.1 0 0 0-.1.1V8a.1.1 0 0 0 .1.1h4.6V6.4Zm8.335 5.147c.743-.107 1.52.135 2.201.817.474.473.695 1.011.708 1.548.012.508-.163.927-.318 1.2-.185.326-.47.607-.634.77l-.049.047-4.414 4.414a1.9 1.9 0 0 1-1.343.557H7.914a.1.1 0 0 0-.07.03l-.5.5a1.9 1.9 0 0 1-2.687 0L2.57 19.342a1.9 1.9 0 0 1 0-2.686l4-4a1.9 1.9 0 0 1 1.343-.557H14.5v.9-.9h.041l.065.004a2.73 2.73 0 0 1 .79.185 2.665 2.665 0 0 1 1.46 1.417c.188-.162.375-.324.551-.479.46-.401.815-.722.957-.863.338-.34.882-.719 1.571-.817ZM15.088 15.1a1.06 1.06 0 0 0 .08-.145c.1-.207.113-.38.027-.553a.867.867 0 0 0-.668-.497.628.628 0 0 0-.042-.005h-6.57a.1.1 0 0 0-.071.03l-4 4a.1.1 0 0 0 0 .14l2.085 2.087a.1.1 0 0 0 .142 0l.5-.5a1.9 1.9 0 0 1 1.343-.557h8.172a.1.1 0 0 0 .07-.03l4.415-4.414c.225-.225.334-.335.39-.434a.539.539 0 0 0 .083-.266.283.283 0 0 0-.026-.11.712.712 0 0 0-.154-.21c-.319-.318-.542-.326-.674-.307-.186.026-.392.146-.554.307-.191.192-.595.553-1.043.946-.904.79-2.143 1.838-2.561 2.144l-.238.174H10.5a.9.9 0 0 1 0-1.8h4.588Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"offering\"],\n category: \"other\"\n};\nexport {\n a as offering\n};\n//# sourceMappingURL=offering.es.js.map\n","const e = {\n name: \"question\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M13.672 12.056c-.635.547-1.242 1.07-1.164 2.062h-1.385c-.309-1.553.504-2.214 1.23-2.805.514-.419.986-.802.986-1.442 0-.593-.489-1.068-1.267-1.068-.764 0-1.345.422-1.872 1.187L9 9.067C9.712 7.92 10.807 7.3 12.086 7.3 13.906 7.3 15 8.42 15 9.78c0 1.133-.678 1.717-1.328 2.277Zm-.822 3.763c0 .54-.487 1.028-1.041 1.028-.554 0-1.042-.488-1.042-1.028 0-.528.488-1.029 1.042-1.029s1.042.501 1.042 1.029Z\"/><path fill-rule=\"evenodd\" d=\"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"question\"],\n category: \"status\"\n};\nexport {\n e as question\n};\n//# sourceMappingURL=question.es.js.map\n","const l = {\n name: \"tag\",\n svg: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path fill-rule=\"evenodd\" d=\"M3.1 4a.9.9 0 0 1 .9-.9h6.5a.9.9 0 0 1 .636.264l10 10a.9.9 0 0 1 0 1.272l-4.5 4.5a.9.9 0 1 1-1.272-1.272L19.227 14l-9.1-9.1H4.9v5.227l9.736 9.737a.9.9 0 1 1-1.272 1.272l-10-10A.9.9 0 0 1 3.1 10.5V4ZM8 7.4a.6.6 0 1 0 0 1.2.6.6 0 0 0 0-1.2ZM5.6 8a2.4 2.4 0 1 1 4.8 0 2.4 2.4 0 0 1-4.8 0Z\" clip-rule=\"evenodd\"/></svg>',\n keywords: [\"tag\"],\n category: \"other\"\n};\nexport {\n l as tag\n};\n//# sourceMappingURL=tag.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(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 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(null, 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, 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 ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport { Icon } from \"@purpurds/icon\";\nimport { alert } from \"@purpurds/icon/assets/alert\";\nimport { checkCircle } from \"@purpurds/icon/assets/check-circle\";\nimport { devices } from \"@purpurds/icon/assets/devices\";\nimport { error } from \"@purpurds/icon/assets/error\";\nimport { info } from \"@purpurds/icon/assets/info\";\nimport { offering } from \"@purpurds/icon/assets/offering\";\nimport { question } from \"@purpurds/icon/assets/question\";\nimport { tag } from \"@purpurds/icon/assets/tag\";\nimport c from \"classnames\";\n\nimport styles from \"./badge.module.scss\";\nconst rootClassName = \"purpur-badge\";\n\nexport const BADGE_VARIANT = {\n ATTENTION: \"attention\",\n BLACK_FRIDAY: \"black-friday\",\n ERROR: \"error\",\n GENERAL: \"general\",\n INFORMATION: \"information\",\n NEUTRAL: \"neutral\",\n SPECIAL: \"special\",\n SUCCESS: \"success\",\n WARNING: \"warning\",\n} as const;\n\nexport const badgeVariants = Object.values(BADGE_VARIANT);\nexport type BadgeVariant = (typeof BADGE_VARIANT)[keyof typeof BADGE_VARIANT];\n\nconst getIcon = (variant: BadgeVariant) => {\n switch (variant) {\n case BADGE_VARIANT.ATTENTION:\n case BADGE_VARIANT.SPECIAL:\n return offering;\n case BADGE_VARIANT.INFORMATION:\n return info;\n case BADGE_VARIANT.GENERAL:\n return devices;\n case BADGE_VARIANT.SUCCESS:\n return checkCircle;\n case BADGE_VARIANT.WARNING:\n return alert;\n case BADGE_VARIANT.ERROR:\n return error;\n case BADGE_VARIANT.NEUTRAL:\n return question;\n case BADGE_VARIANT.BLACK_FRIDAY:\n return tag;\n default:\n return;\n }\n};\n\ntype WithIcon = {\n showIcon?: true;\n iconAllyTitle?: string;\n};\n\ntype WithoutIcon = {\n showIcon: false;\n iconAllyTitle?: never;\n};\n\nexport type BadgeProps = Omit<BaseProps<\"span\">, \"children\"> & {\n children: ReactNode;\n variant: BadgeVariant;\n} & (WithIcon | WithoutIcon);\n\nexport const Badge = ({\n children,\n showIcon = true,\n iconAllyTitle,\n variant,\n [\"data-testid\"]: dataTestid,\n className = \"\",\n ...props\n}: BadgeProps) => {\n const icon = getIcon(variant);\n\n const classes = c([className, styles[rootClassName], styles[`${rootClassName}--${variant}`]]);\n\n return (\n <span className={classes} data-testid={dataTestid} {...props}>\n {showIcon && icon && (\n <Icon\n data-testid={`${dataTestid}-icon`}\n allyTitle={iconAllyTitle}\n size=\"xs\"\n svg={icon}\n className={c(styles[`${rootClassName}__icon`])}\n />\n )}\n {children}\n </span>\n );\n};\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","rootClassName","BADGE_VARIANT","badgeVariants","getIcon","variant","offering","info","devices","checkCircle","alert","error","question","tag","Badge","children","showIcon","iconAllyTitle","dataTestid","className","props","icon","styles","jsx","Icon"],"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,GAAI;AACvB;AAAA;AAAA;AAAA;AAAA;AAKA,IAAIC;AACJ,SAASC,IAAI;AACX,SAAOD,MAAMA,IAAI,GAAG,SAASF,GAAG;AAC9B,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,QACxC;AACQ,eAAOF;AAAA,MACf;AACM,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,OA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,EAAA,GACH;AAEJ;","x_google_ignoreList":[9]}
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._purpur-
|
|
1
|
+
._purpur-badge_1nup9_1{font-family:var(--purpur-typography-family-default);font-weight:var(--purpur-typography-weight-medium);font-size:var(--purpur-typography-scale-75);min-height:var(--purpur-spacing-200);border-radius:var(--purpur-border-radius-xs);line-height:1;padding:var(--purpur-spacing-50) var(--purpur-spacing-100);display:inline-flex;align-items:center;gap:var(--purpur-spacing-50)}._purpur-badge__icon_1nup9_13{flex-shrink:0;align-self:flex-start}._purpur-badge--attention_1nup9_17{background-color:var(--purpur-color-background-status-attention);color:var(--purpur-color-text-status-attention)}._purpur-badge--special_1nup9_21{background-color:var(--purpur-color-background-status-special);color:var(--purpur-color-text-status-special)}._purpur-badge--neutral_1nup9_25{background-color:var(--purpur-color-background-status-neutral);color:var(--purpur-color-text-status-neutral)}._purpur-badge--general_1nup9_29{background-color:var(--purpur-color-background-tone-on-tone-tertiary);color:var(--purpur-color-text-tone-on-tone-tertiary)}._purpur-badge--information_1nup9_33{background-color:var(--purpur-color-background-status-info-medium);color:var(--purpur-color-text-status-info-strong)}._purpur-badge--success_1nup9_37{background-color:var(--purpur-color-background-status-success-medium);color:var(--purpur-color-text-status-success-strong)}._purpur-badge--warning_1nup9_41{background-color:var(--purpur-color-background-status-warning-medium);color:var(--purpur-color-text-status-warning-strong)}._purpur-badge--error_1nup9_45{background-color:var(--purpur-color-background-status-error-medium);color:var(--purpur-color-text-status-error-strong)}._purpur-badge--black-friday_1nup9_49{background-color:var(--purpur-color-background-status-black-friday);color:var(--purpur-color-text-status-black-friday)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/badge",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/badge.cjs.js",
|
|
6
6
|
"types": "./dist/badge.d.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"source": "src/badge.tsx",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"classnames": "~2.5.0",
|
|
19
|
-
"@purpurds/
|
|
20
|
-
"@purpurds/
|
|
21
|
-
"@purpurds/
|
|
19
|
+
"@purpurds/tokens": "8.0.0",
|
|
20
|
+
"@purpurds/icon": "8.0.0",
|
|
21
|
+
"@purpurds/common-types": "8.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@storybook/react-vite": "^9.0.18",
|
package/src/badge.module.scss
CHANGED
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&--information {
|
|
40
|
-
background-color: var(--purpur-color-background-status-info);
|
|
40
|
+
background-color: var(--purpur-color-background-status-info-medium);
|
|
41
41
|
color: var(--purpur-color-text-status-info-strong);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&--success {
|
|
45
|
-
background-color: var(--purpur-color-background-status-success);
|
|
45
|
+
background-color: var(--purpur-color-background-status-success-medium);
|
|
46
46
|
color: var(--purpur-color-text-status-success-strong);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&--warning {
|
|
50
|
-
background-color: var(--purpur-color-background-status-warning);
|
|
50
|
+
background-color: var(--purpur-color-background-status-warning-medium);
|
|
51
51
|
color: var(--purpur-color-text-status-warning-strong);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
&--error {
|
|
55
|
-
background-color: var(--purpur-color-background-status-error);
|
|
55
|
+
background-color: var(--purpur-color-background-status-error-medium);
|
|
56
56
|
color: var(--purpur-color-text-status-error-strong);
|
|
57
57
|
}
|
|
58
58
|
|