@purpurds/badge 5.13.0 → 5.15.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/badge.es.js CHANGED
@@ -14,11 +14,11 @@ var g = { exports: {} };
14
14
  function a() {
15
15
  for (var r = "", t = 0; t < arguments.length; t++) {
16
16
  var n = arguments[t];
17
- n && (r = l(r, u.call(this, n)));
17
+ n && (r = u(r, l.call(this, n)));
18
18
  }
19
19
  return r;
20
20
  }
21
- function u(r) {
21
+ function l(r) {
22
22
  if (typeof r == "string" || typeof r == "number")
23
23
  return this && this[r] || r;
24
24
  if (typeof r != "object")
@@ -29,10 +29,10 @@ var g = { exports: {} };
29
29
  return r.toString();
30
30
  var t = "";
31
31
  for (var n in r)
32
- s.call(r, n) && r[n] && (t = l(t, this && this[n] || n));
32
+ s.call(r, n) && r[n] && (t = u(t, this && this[n] || n));
33
33
  return t;
34
34
  }
35
- function l(r, t) {
35
+ function u(r, t) {
36
36
  return t ? r ? r + " " + t : r + t : r;
37
37
  }
38
38
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
@@ -67,12 +67,12 @@ const _ = /* @__PURE__ */ h(w), y = {
67
67
  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>',
68
68
  keywords: ["info"],
69
69
  category: "status"
70
- }, S = {
70
+ }, N = {
71
71
  name: "offering",
72
72
  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>',
73
73
  keywords: ["offering"],
74
74
  category: "other"
75
- }, N = {
75
+ }, S = {
76
76
  name: "question",
77
77
  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>',
78
78
  keywords: ["question"],
@@ -82,26 +82,26 @@ const _ = /* @__PURE__ */ h(w), y = {
82
82
  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>',
83
83
  keywords: ["tag"],
84
84
  category: "other"
85
- }, O = _.bind(y), c = "purpur-icon", C = "md", I = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), R = ({ content: e = "", title: s } = {}) => {
85
+ }, C = _.bind(y), c = "purpur-icon", O = "md", I = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), R = ({ content: e = "", title: s } = {}) => {
86
86
  const a = [
87
87
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
88
88
  { name: "fill", value: "currentColor" },
89
89
  { name: "viewBox", value: "0 0 24 24" },
90
90
  s ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
91
- ], u = s ? `<title>${s}</title>` : "";
92
- return `<svg ${I(a)}>${u}${e}</svg>`;
93
- }, T = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), B = ({
91
+ ], l = s ? `<title>${s}</title>` : "";
92
+ return `<svg ${I(a)}>${l}${e}</svg>`;
93
+ }, E = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), T = ({
94
94
  ["data-testid"]: e,
95
95
  svg: s,
96
96
  allyTitle: a,
97
- className: u,
98
- size: l = C,
97
+ className: l,
98
+ size: u = O,
99
99
  ...r
100
100
  }) => {
101
101
  const t = R({
102
- content: T(s.svg),
102
+ content: E(s.svg),
103
103
  title: a
104
- }), n = O(u, c, `${c}--${l}`);
104
+ }), n = C(l, c, `${c}--${u}`);
105
105
  return /* @__PURE__ */ d(
106
106
  "span",
107
107
  {
@@ -113,7 +113,7 @@ const _ = /* @__PURE__ */ h(w), y = {
113
113
  }
114
114
  );
115
115
  };
116
- function E(e) {
116
+ function j(e) {
117
117
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
118
118
  }
119
119
  var v = { exports: {} };
@@ -128,11 +128,11 @@ var v = { exports: {} };
128
128
  function a() {
129
129
  for (var r = "", t = 0; t < arguments.length; t++) {
130
130
  var n = arguments[t];
131
- n && (r = l(r, u(n)));
131
+ n && (r = u(r, l(n)));
132
132
  }
133
133
  return r;
134
134
  }
135
- function u(r) {
135
+ function l(r) {
136
136
  if (typeof r == "string" || typeof r == "number")
137
137
  return r;
138
138
  if (typeof r != "object")
@@ -143,17 +143,17 @@ var v = { exports: {} };
143
143
  return r.toString();
144
144
  var t = "";
145
145
  for (var n in r)
146
- s.call(r, n) && r[n] && (t = l(t, n));
146
+ s.call(r, n) && r[n] && (t = u(t, n));
147
147
  return t;
148
148
  }
149
- function l(r, t) {
149
+ function u(r, t) {
150
150
  return t ? r ? r + " " + t : r + t : r;
151
151
  }
152
152
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
153
153
  })();
154
154
  })(v);
155
- var j = v.exports;
156
- const k = /* @__PURE__ */ E(j), i = {
155
+ var B = v.exports;
156
+ const $ = /* @__PURE__ */ j(B), i = {
157
157
  "purpur-badge": "_purpur-badge_1r1mu_1",
158
158
  "purpur-badge--attention": "_purpur-badge--attention_1r1mu_13",
159
159
  "purpur-badge--special": "_purpur-badge--special_1r1mu_17",
@@ -172,11 +172,11 @@ const k = /* @__PURE__ */ E(j), i = {
172
172
  WARNING: "warning",
173
173
  ERROR: "error",
174
174
  BLACK_FRIDAY: "black-friday"
175
- }, q = Object.values(o), V = (e) => {
175
+ }, L = Object.values(o), k = (e) => {
176
176
  switch (e) {
177
177
  case o.ATTENTION:
178
178
  case o.SPECIAL:
179
- return S;
179
+ return N;
180
180
  case o.INFORMATION:
181
181
  return A;
182
182
  case o.SUCCESS:
@@ -186,30 +186,30 @@ const k = /* @__PURE__ */ E(j), i = {
186
186
  case o.ERROR:
187
187
  return Z;
188
188
  case o.NEUTRAL:
189
- return N;
189
+ return S;
190
190
  case o.BLACK_FRIDAY:
191
191
  return M;
192
192
  default:
193
193
  return;
194
194
  }
195
- }, H = ({
195
+ }, q = ({
196
196
  children: e,
197
197
  showIcon: s = !0,
198
198
  variant: a,
199
- ["data-testid"]: u,
200
- allyLabel: l,
199
+ ["data-testid"]: l,
200
+ allyLabel: u,
201
201
  className: r = "",
202
202
  ...t
203
203
  }) => {
204
- const n = V(a), m = k([r, i[p], i[`${p}--${a}`]]);
205
- return /* @__PURE__ */ f("span", { "aria-label": l, className: m, "data-testid": u, ...t, children: [
206
- s && n && /* @__PURE__ */ d(B, { "data-testid": `${u}-icon`, allyTitle: l, size: "xs", svg: n }),
204
+ const n = k(a), m = $([r, i[p], i[`${p}--${a}`]]);
205
+ return /* @__PURE__ */ f("span", { "aria-label": u, className: m, "data-testid": l, ...t, children: [
206
+ s && n && /* @__PURE__ */ d(T, { "data-testid": `${l}-icon`, allyTitle: u, size: "xs", svg: n }),
207
207
  e
208
208
  ] });
209
209
  };
210
210
  export {
211
211
  o as BADGE_VARIANT,
212
- H as Badge,
213
- q as badgeVariants
212
+ q as Badge,
213
+ L as badgeVariants
214
214
  };
215
215
  //# sourceMappingURL=badge.es.js.map