@purpurds/notification 5.20.1 → 5.21.1
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 +4 -4
- package/dist/notification.cjs.js +5 -5
- package/dist/notification.cjs.js.map +1 -1
- package/dist/notification.es.js +27 -26
- package/dist/notification.es.js.map +1 -1
- package/package.json +12 -12
package/dist/notification.es.js
CHANGED
|
@@ -8,7 +8,7 @@ const Z = {
|
|
|
8
8
|
function H(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var I = { exports: {} };
|
|
12
12
|
/*!
|
|
13
13
|
Copyright (c) 2018 Jed Watson.
|
|
14
14
|
Licensed under the MIT License (MIT), see
|
|
@@ -43,9 +43,9 @@ var R = { exports: {} };
|
|
|
43
43
|
}
|
|
44
44
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
45
45
|
})();
|
|
46
|
-
})(
|
|
47
|
-
var U =
|
|
48
|
-
const
|
|
46
|
+
})(I);
|
|
47
|
+
var U = I.exports;
|
|
48
|
+
const q = /* @__PURE__ */ H(U), V = "_rotate_1xozj_1", F = "_dash_1xozj_1", h = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
50
50
|
rotate: V,
|
|
51
51
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
@@ -72,13 +72,13 @@ const j = /* @__PURE__ */ H(U), V = "_rotate_1xozj_1", F = "_dash_1xozj_1", h =
|
|
|
72
72
|
}) => /* @__PURE__ */ s(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
|
-
className:
|
|
75
|
+
className: q([h[v], h[`${v}--${u}`]]),
|
|
76
76
|
"data-testid": e,
|
|
77
77
|
...i,
|
|
78
78
|
children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
|
|
79
79
|
"circle",
|
|
80
80
|
{
|
|
81
|
-
className:
|
|
81
|
+
className: q(h[`${v}__circle`], {
|
|
82
82
|
[h[`${v}__circle--disabled`]]: p,
|
|
83
83
|
[h[`${v}__circle--negative`]]: a
|
|
84
84
|
}),
|
|
@@ -92,7 +92,7 @@ const j = /* @__PURE__ */ H(U), V = "_rotate_1xozj_1", F = "_dash_1xozj_1", h =
|
|
|
92
92
|
function Y(e) {
|
|
93
93
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
94
94
|
}
|
|
95
|
-
var
|
|
95
|
+
var R = { exports: {} };
|
|
96
96
|
/*!
|
|
97
97
|
Copyright (c) 2018 Jed Watson.
|
|
98
98
|
Licensed under the MIT License (MIT), see
|
|
@@ -127,8 +127,8 @@ var I = { exports: {} };
|
|
|
127
127
|
}
|
|
128
128
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
129
129
|
})();
|
|
130
|
-
})(
|
|
131
|
-
var J =
|
|
130
|
+
})(R);
|
|
131
|
+
var J = R.exports;
|
|
132
132
|
const K = /* @__PURE__ */ Y(J), Q = {
|
|
133
133
|
"purpur-button": "_purpur-button_1acxn_1",
|
|
134
134
|
"purpur-button--sm": "_purpur-button--sm_1acxn_33",
|
|
@@ -164,7 +164,7 @@ const K = /* @__PURE__ */ Y(J), Q = {
|
|
|
164
164
|
variant: o,
|
|
165
165
|
type: f = "button",
|
|
166
166
|
...w
|
|
167
|
-
},
|
|
167
|
+
}, N) => {
|
|
168
168
|
if (r && o === "destructive")
|
|
169
169
|
return null;
|
|
170
170
|
const B = rr(
|
|
@@ -180,21 +180,21 @@ const K = /* @__PURE__ */ Y(J), Q = {
|
|
|
180
180
|
[`${g}--disabled`]: u || t
|
|
181
181
|
},
|
|
182
182
|
p
|
|
183
|
-
), G = (
|
|
184
|
-
u || t ?
|
|
185
|
-
},
|
|
183
|
+
), G = (j) => {
|
|
184
|
+
u || t ? j.preventDefault() : _ && _(j);
|
|
185
|
+
}, A = !!w["aria-disabled"] || u || t;
|
|
186
186
|
return /* @__PURE__ */ b(
|
|
187
187
|
"button",
|
|
188
188
|
{
|
|
189
189
|
className: B,
|
|
190
190
|
"data-testid": a,
|
|
191
191
|
type: f,
|
|
192
|
-
ref:
|
|
193
|
-
"aria-disabled":
|
|
192
|
+
ref: N,
|
|
193
|
+
"aria-disabled": A,
|
|
194
194
|
onClick: G,
|
|
195
195
|
...w,
|
|
196
196
|
children: [
|
|
197
|
-
t && /* @__PURE__ */ s(W, { size: d === Z.LG ? "xs" : "xxs", negative: n, disabled:
|
|
197
|
+
t && /* @__PURE__ */ s(W, { size: d === Z.LG ? "xs" : "xxs", negative: n, disabled: A }),
|
|
198
198
|
" ",
|
|
199
199
|
e
|
|
200
200
|
]
|
|
@@ -362,7 +362,7 @@ const or = /* @__PURE__ */ ir(ur), sr = {
|
|
|
362
362
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10ZM10.9 7.786c0 .591.516 1.077 1.108 1.077.576 0 1.092-.486 1.092-1.077 0-.592-.516-1.078-1.092-1.078-.592 0-1.108.486-1.108 1.078Zm.167 9.74h1.866V9.94h-1.866v7.586Z" clip-rule="evenodd"/></svg>',
|
|
363
363
|
keywords: ["info-filled"],
|
|
364
364
|
category: "status"
|
|
365
|
-
}, fr = or.bind(sr),
|
|
365
|
+
}, fr = or.bind(sr), L = "purpur-icon", hr = "md", vr = (e) => e.filter((p) => Object.keys(p).length >= 1).map((p) => `${p.name}="${p.value}"`).join(" "), mr = ({ content: e = "", title: p } = {}) => {
|
|
366
366
|
const a = [
|
|
367
367
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
368
368
|
{ name: "fill", value: "currentColor" },
|
|
@@ -370,7 +370,7 @@ const or = /* @__PURE__ */ ir(ur), sr = {
|
|
|
370
370
|
p ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
371
371
|
], u = p ? `<title>${p}</title>` : "";
|
|
372
372
|
return `<svg ${vr(a)}>${u}${e}</svg>`;
|
|
373
|
-
}, yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
373
|
+
}, yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), O = ({
|
|
374
374
|
["data-testid"]: e,
|
|
375
375
|
svg: p,
|
|
376
376
|
allyTitle: a,
|
|
@@ -381,7 +381,7 @@ const or = /* @__PURE__ */ ir(ur), sr = {
|
|
|
381
381
|
const t = mr({
|
|
382
382
|
content: yr(p.svg),
|
|
383
383
|
title: a
|
|
384
|
-
}), n = fr(u,
|
|
384
|
+
}), n = fr(u, L, `${L}--${i}`);
|
|
385
385
|
return /* @__PURE__ */ s(
|
|
386
386
|
"span",
|
|
387
387
|
{
|
|
@@ -393,6 +393,7 @@ const or = /* @__PURE__ */ ir(ur), sr = {
|
|
|
393
393
|
}
|
|
394
394
|
);
|
|
395
395
|
};
|
|
396
|
+
O.displayName = "Icon";
|
|
396
397
|
function br(e) {
|
|
397
398
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
398
399
|
}
|
|
@@ -521,8 +522,8 @@ var D = { exports: {} };
|
|
|
521
522
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
522
523
|
})();
|
|
523
524
|
})(D);
|
|
524
|
-
var
|
|
525
|
-
const
|
|
525
|
+
var Nr = D.exports;
|
|
526
|
+
const Or = /* @__PURE__ */ Sr(Nr), l = {
|
|
526
527
|
"purpur-notification": "_purpur-notification_10qwf_1",
|
|
527
528
|
"purpur-notification__top": "_purpur-notification__top_10qwf_14",
|
|
528
529
|
"purpur-notification__header": "_purpur-notification__header_10qwf_20",
|
|
@@ -573,7 +574,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
|
|
|
573
574
|
id: o,
|
|
574
575
|
onClose: f,
|
|
575
576
|
...w
|
|
576
|
-
},
|
|
577
|
+
}, N) => /* @__PURE__ */ b(
|
|
577
578
|
"div",
|
|
578
579
|
{
|
|
579
580
|
id: o,
|
|
@@ -581,19 +582,19 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
|
|
|
581
582
|
"aria-describedby": o ? `${o}-body` : void 0,
|
|
582
583
|
"aria-live": p,
|
|
583
584
|
"aria-hidden": !!d,
|
|
584
|
-
className:
|
|
585
|
+
className: Or(u, l[c], l[`${c}--${n}`], {
|
|
585
586
|
[l[`${c}--hidden`]]: d,
|
|
586
587
|
[l[`${c}--has-close-button`]]: !!f
|
|
587
588
|
}),
|
|
588
589
|
"data-testid": e,
|
|
589
|
-
ref:
|
|
590
|
+
ref: N,
|
|
590
591
|
role: t,
|
|
591
592
|
...w,
|
|
592
593
|
children: [
|
|
593
594
|
/* @__PURE__ */ b("div", { className: l[`${c}__top`], children: [
|
|
594
595
|
/* @__PURE__ */ b("div", { className: l[`${c}__header`], children: [
|
|
595
596
|
/* @__PURE__ */ s(
|
|
596
|
-
|
|
597
|
+
O,
|
|
597
598
|
{
|
|
598
599
|
"data-testid": e ? `${e}-icon` : void 0,
|
|
599
600
|
className: l[`${c}__icon`],
|
|
@@ -625,7 +626,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
|
|
|
625
626
|
"aria-label": i,
|
|
626
627
|
onClick: f,
|
|
627
628
|
className: l[`${c}__close-button`],
|
|
628
|
-
children: /* @__PURE__ */ s(
|
|
629
|
+
children: /* @__PURE__ */ s(O, { svg: _r, size: "sm" })
|
|
629
630
|
}
|
|
630
631
|
)
|
|
631
632
|
] }),
|