@purpurds/badge 5.10.1 → 5.11.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
@@ -38,8 +38,8 @@ var g = { exports: {} };
38
38
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
39
39
  })();
40
40
  })(g);
41
- var _ = g.exports;
42
- const w = /* @__PURE__ */ h(_), b = {
41
+ var w = g.exports;
42
+ const _ = /* @__PURE__ */ h(w), b = {
43
43
  "purpur-icon": "_purpur-icon_8u1lq_1",
44
44
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
45
45
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -77,7 +77,7 @@ const w = /* @__PURE__ */ h(_), b = {
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"],
79
79
  category: "status"
80
- }, O = w.bind(b), c = "purpur-icon", M = "md", C = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), E = ({ content: e = "", title: s } = {}) => {
80
+ }, O = _.bind(b), c = "purpur-icon", M = "md", C = (e) => e.filter((s) => Object.keys(s).length >= 1).map((s) => `${s.name}="${s.value}"`).join(" "), I = ({ content: e = "", title: s } = {}) => {
81
81
  const a = [
82
82
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
83
83
  { name: "fill", value: "currentColor" },
@@ -85,7 +85,7 @@ const w = /* @__PURE__ */ h(_), b = {
85
85
  s ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
86
86
  ], l = s ? `<title>${s}</title>` : "";
87
87
  return `<svg ${C(a)}>${l}${e}</svg>`;
88
- }, I = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), R = ({
88
+ }, T = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), E = ({
89
89
  ["data-testid"]: e,
90
90
  svg: s,
91
91
  allyTitle: a,
@@ -93,8 +93,8 @@ const w = /* @__PURE__ */ h(_), b = {
93
93
  size: u = M,
94
94
  ...r
95
95
  }) => {
96
- const t = E({
97
- content: I(s.svg),
96
+ const t = I({
97
+ content: T(s.svg),
98
98
  title: a
99
99
  }), n = O(l, c, `${c}--${u}`);
100
100
  return /* @__PURE__ */ d(
@@ -108,7 +108,7 @@ const w = /* @__PURE__ */ h(_), b = {
108
108
  }
109
109
  );
110
110
  };
111
- function T(e) {
111
+ function R(e) {
112
112
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
113
113
  }
114
114
  var v = { exports: {} };
@@ -148,7 +148,7 @@ var v = { exports: {} };
148
148
  })();
149
149
  })(v);
150
150
  var j = v.exports;
151
- const V = /* @__PURE__ */ T(j), i = {
151
+ const $ = /* @__PURE__ */ R(j), i = {
152
152
  "purpur-badge": "_purpur-badge_stlab_1",
153
153
  "purpur-badge--attention": "_purpur-badge--attention_stlab_13",
154
154
  "purpur-badge--special": "_purpur-badge--special_stlab_17",
@@ -165,7 +165,7 @@ const V = /* @__PURE__ */ T(j), i = {
165
165
  SUCCESS: "success",
166
166
  WARNING: "warning",
167
167
  ERROR: "error"
168
- }, B = Object.values(o), $ = (e) => {
168
+ }, V = Object.values(o), q = (e) => {
169
169
  switch (e) {
170
170
  case o.ATTENTION:
171
171
  case o.SPECIAL:
@@ -183,7 +183,7 @@ const V = /* @__PURE__ */ T(j), i = {
183
183
  default:
184
184
  return;
185
185
  }
186
- }, H = ({
186
+ }, k = ({
187
187
  children: e,
188
188
  showIcon: s = !0,
189
189
  variant: a,
@@ -192,15 +192,15 @@ const V = /* @__PURE__ */ T(j), i = {
192
192
  className: r = "",
193
193
  ...t
194
194
  }) => {
195
- const n = $(a), f = V([r, i[p], i[`${p}--${a}`]]);
195
+ const n = q(a), f = $([r, i[p], i[`${p}--${a}`]]);
196
196
  return /* @__PURE__ */ m("span", { "aria-label": u, className: f, "data-testid": l, ...t, children: [
197
- s && n && /* @__PURE__ */ d(R, { "data-testid": `${l}-icon`, allyTitle: u, size: "xs", svg: n }),
197
+ s && n && /* @__PURE__ */ d(E, { "data-testid": `${l}-icon`, allyTitle: u, size: "xs", svg: n }),
198
198
  e
199
199
  ] });
200
200
  };
201
201
  export {
202
202
  o as BADGE_VARIANT,
203
- H as Badge,
204
- B as badgeVariants
203
+ k as Badge,
204
+ V as badgeVariants
205
205
  };
206
206
  //# sourceMappingURL=badge.es.js.map