@purpurds/notification 5.4.3 → 5.6.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 +4 -4
- package/dist/notification.cjs.js +7 -7
- package/dist/notification.cjs.js.map +1 -1
- package/dist/notification.es.js +116 -116
- package/dist/notification.es.js.map +1 -1
- package/package.json +6 -6
package/dist/notification.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I } from "react";
|
|
3
3
|
const j = {
|
|
4
4
|
SM: "sm",
|
|
5
5
|
MD: "md",
|
|
@@ -8,7 +8,7 @@ const j = {
|
|
|
8
8
|
function G(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var R = { exports: {} };
|
|
12
12
|
/*!
|
|
13
13
|
Copyright (c) 2018 Jed Watson.
|
|
14
14
|
Licensed under the MIT License (MIT), see
|
|
@@ -43,21 +43,21 @@ var I = { exports: {} };
|
|
|
43
43
|
}
|
|
44
44
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
45
45
|
})();
|
|
46
|
-
})(
|
|
47
|
-
var Z =
|
|
48
|
-
const q = /* @__PURE__ */ G(Z),
|
|
46
|
+
})(R);
|
|
47
|
+
var Z = R.exports;
|
|
48
|
+
const q = /* @__PURE__ */ G(Z), H = "_rotate_1xozj_1", V = "_dash_1xozj_1", h = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
50
|
-
rotate:
|
|
50
|
+
rotate: H,
|
|
51
51
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
52
52
|
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
53
53
|
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
54
54
|
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
55
55
|
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
56
56
|
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
57
|
-
dash:
|
|
57
|
+
dash: V,
|
|
58
58
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
59
59
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
60
|
-
},
|
|
60
|
+
}, v = "purpur-spinner", F = {
|
|
61
61
|
XXS: "xxs",
|
|
62
62
|
XS: "xs",
|
|
63
63
|
SM: "sm",
|
|
@@ -72,15 +72,15 @@ const q = /* @__PURE__ */ G(Z), V = "_rotate_1xozj_1", H = "_dash_1xozj_1", v =
|
|
|
72
72
|
}) => /* @__PURE__ */ s(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
|
-
className: q([v
|
|
75
|
+
className: q([h[v], h[`${v}--${a}`]]),
|
|
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: q(
|
|
82
|
-
[
|
|
83
|
-
[
|
|
81
|
+
className: q(h[`${v}__circle`], {
|
|
82
|
+
[h[`${v}__circle--disabled`]]: p,
|
|
83
|
+
[h[`${v}__circle--negative`]]: u
|
|
84
84
|
}),
|
|
85
85
|
cx: "25",
|
|
86
86
|
cy: "25",
|
|
@@ -104,22 +104,22 @@ var M = { exports: {} };
|
|
|
104
104
|
function u() {
|
|
105
105
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
106
106
|
var n = arguments[t];
|
|
107
|
-
n && (r = i(r, a(n)));
|
|
107
|
+
n && (r = i(r, a.call(this, n)));
|
|
108
108
|
}
|
|
109
109
|
return r;
|
|
110
110
|
}
|
|
111
111
|
function a(r) {
|
|
112
112
|
if (typeof r == "string" || typeof r == "number")
|
|
113
|
-
return r;
|
|
113
|
+
return this && this[r] || r;
|
|
114
114
|
if (typeof r != "object")
|
|
115
115
|
return "";
|
|
116
116
|
if (Array.isArray(r))
|
|
117
|
-
return u.apply(
|
|
117
|
+
return u.apply(this, r);
|
|
118
118
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
119
119
|
return r.toString();
|
|
120
120
|
var t = "";
|
|
121
121
|
for (var n in r)
|
|
122
|
-
p.call(r, n) && r[n] && (t = i(t, n));
|
|
122
|
+
p.call(r, n) && r[n] && (t = i(t, this && this[n] || n));
|
|
123
123
|
return t;
|
|
124
124
|
}
|
|
125
125
|
function i(r, t) {
|
|
@@ -129,7 +129,7 @@ var M = { exports: {} };
|
|
|
129
129
|
})();
|
|
130
130
|
})(M);
|
|
131
131
|
var W = M.exports;
|
|
132
|
-
const Y = /* @__PURE__ */ X(W),
|
|
132
|
+
const Y = /* @__PURE__ */ X(W), J = {
|
|
133
133
|
"purpur-button": "_purpur-button_u2yv5_1",
|
|
134
134
|
"purpur-button--sm": "_purpur-button--sm_u2yv5_33",
|
|
135
135
|
"purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
|
|
@@ -150,7 +150,7 @@ const Y = /* @__PURE__ */ X(W), g = {
|
|
|
150
150
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
|
|
151
151
|
"purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
|
|
152
152
|
"purpur-button--text": "_purpur-button--text_u2yv5_175"
|
|
153
|
-
}, f = "purpur-button",
|
|
153
|
+
}, K = Y.bind(J), f = "purpur-button", Q = ({
|
|
154
154
|
children: e,
|
|
155
155
|
className: p,
|
|
156
156
|
["data-testid"]: u,
|
|
@@ -162,47 +162,47 @@ const Y = /* @__PURE__ */ X(W), g = {
|
|
|
162
162
|
onClick: c,
|
|
163
163
|
size: d = j.MD,
|
|
164
164
|
variant: o,
|
|
165
|
-
type:
|
|
166
|
-
|
|
167
|
-
},
|
|
165
|
+
type: g = "button",
|
|
166
|
+
...x
|
|
167
|
+
}, O) => {
|
|
168
168
|
if (r && o === "destructive")
|
|
169
169
|
return null;
|
|
170
|
-
const D =
|
|
170
|
+
const D = K(
|
|
171
171
|
[
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
f,
|
|
173
|
+
`${f}--${n ? `${o}-negative` : o}`,
|
|
174
|
+
`${f}--${d}`
|
|
175
175
|
],
|
|
176
176
|
{
|
|
177
|
-
[
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
[
|
|
177
|
+
[`${f}--icon-only`]: r,
|
|
178
|
+
[`${f}--negative`]: n,
|
|
179
|
+
[`${f}--full-width`]: i,
|
|
180
|
+
[`${f}--disabled`]: a || t
|
|
181
181
|
},
|
|
182
182
|
p
|
|
183
183
|
), B = (N) => {
|
|
184
184
|
a || t ? N.preventDefault() : c && c(N);
|
|
185
|
-
};
|
|
186
|
-
return /* @__PURE__ */
|
|
185
|
+
}, A = !!x["aria-disabled"] || a || t;
|
|
186
|
+
return /* @__PURE__ */ b(
|
|
187
187
|
"button",
|
|
188
188
|
{
|
|
189
189
|
className: D,
|
|
190
190
|
"data-testid": u,
|
|
191
|
-
type:
|
|
192
|
-
ref:
|
|
193
|
-
"aria-disabled":
|
|
191
|
+
type: g,
|
|
192
|
+
ref: O,
|
|
193
|
+
"aria-disabled": A,
|
|
194
194
|
onClick: B,
|
|
195
|
-
|
|
195
|
+
...x,
|
|
196
196
|
children: [
|
|
197
|
-
t && /* @__PURE__ */ s(U, { size: d === j.LG ? "xs" : "xxs", negative: n, disabled:
|
|
197
|
+
t && /* @__PURE__ */ s(U, { size: d === j.LG ? "xs" : "xxs", negative: n, disabled: A }),
|
|
198
198
|
" ",
|
|
199
199
|
e
|
|
200
200
|
]
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
}, P =
|
|
203
|
+
}, P = I(Q);
|
|
204
204
|
P.displayName = "Button";
|
|
205
|
-
function
|
|
205
|
+
function rr(e) {
|
|
206
206
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
207
207
|
}
|
|
208
208
|
var k = { exports: {} };
|
|
@@ -241,8 +241,8 @@ var k = { exports: {} };
|
|
|
241
241
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
242
242
|
})();
|
|
243
243
|
})(k);
|
|
244
|
-
var
|
|
245
|
-
const
|
|
244
|
+
var tr = k.exports;
|
|
245
|
+
const er = /* @__PURE__ */ rr(tr), $ = {
|
|
246
246
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
247
247
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
248
248
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -258,7 +258,7 @@ const rr = /* @__PURE__ */ K(Q), S = {
|
|
|
258
258
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
259
259
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
260
260
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
261
|
-
},
|
|
261
|
+
}, nr = {
|
|
262
262
|
TITLE100: "title-100",
|
|
263
263
|
TITLE200: "title-200",
|
|
264
264
|
TITLE300: "title-300",
|
|
@@ -267,28 +267,28 @@ const rr = /* @__PURE__ */ K(Q), S = {
|
|
|
267
267
|
TITLE600: "title-600",
|
|
268
268
|
TITLE700: "title-700",
|
|
269
269
|
SUBSECTION100: "subsection-100"
|
|
270
|
-
},
|
|
270
|
+
}, S = "purpur-heading", ur = ({
|
|
271
271
|
["data-testid"]: e,
|
|
272
272
|
children: p,
|
|
273
273
|
className: u = "",
|
|
274
274
|
enableHyphenation: a = !1,
|
|
275
275
|
negative: i = !1,
|
|
276
276
|
tag: r,
|
|
277
|
-
variant: t =
|
|
277
|
+
variant: t = nr.TITLE100,
|
|
278
278
|
...n
|
|
279
279
|
}) => {
|
|
280
|
-
const c = r, d =
|
|
280
|
+
const c = r, d = er([
|
|
281
281
|
u,
|
|
282
|
-
S
|
|
283
|
-
|
|
282
|
+
$[S],
|
|
283
|
+
$[`${S}--${t}`],
|
|
284
284
|
{
|
|
285
|
-
[
|
|
286
|
-
[
|
|
285
|
+
[$[`${S}--hyphens`]]: a,
|
|
286
|
+
[$[`${S}--negative`]]: i
|
|
287
287
|
}
|
|
288
288
|
]);
|
|
289
289
|
return /* @__PURE__ */ s(c, { ...n, className: d, "data-testid": e, children: p });
|
|
290
290
|
};
|
|
291
|
-
function
|
|
291
|
+
function pr(e) {
|
|
292
292
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
293
293
|
}
|
|
294
294
|
var T = { exports: {} };
|
|
@@ -327,8 +327,8 @@ var T = { exports: {} };
|
|
|
327
327
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
328
328
|
})();
|
|
329
329
|
})(T);
|
|
330
|
-
var
|
|
331
|
-
const
|
|
330
|
+
var ir = T.exports;
|
|
331
|
+
const ar = /* @__PURE__ */ pr(ir), or = {
|
|
332
332
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
333
333
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
334
334
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -336,51 +336,51 @@ const pr = /* @__PURE__ */ nr(ur), ir = {
|
|
|
336
336
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
337
337
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
338
338
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
339
|
-
},
|
|
339
|
+
}, sr = {
|
|
340
340
|
name: "alert-filled",
|
|
341
341
|
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 10Zm1.038-14.81-.247 6.875h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.916c0 .649-.585 1.234-1.25 1.234-.649 0-1.25-.585-1.25-1.234 0-.633.601-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
342
342
|
keywords: ["alert-filled"],
|
|
343
343
|
category: "status"
|
|
344
|
-
},
|
|
344
|
+
}, lr = {
|
|
345
345
|
name: "check-circle-filled",
|
|
346
346
|
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 10Zm4.712-12.491a.875.875 0 1 0-1.424-1.018l-4.4 6.16-2.27-2.27a.875.875 0 0 0-1.237 1.238l3 3a.875.875 0 0 0 1.331-.11l5-7Z" clip-rule="evenodd"/></svg>',
|
|
347
347
|
keywords: ["check-circle-filled"],
|
|
348
348
|
category: "status"
|
|
349
|
-
},
|
|
349
|
+
}, _r = {
|
|
350
350
|
name: "close",
|
|
351
351
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
352
352
|
keywords: ["close"],
|
|
353
353
|
category: "utility"
|
|
354
|
-
},
|
|
354
|
+
}, cr = {
|
|
355
355
|
name: "error-filled",
|
|
356
356
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
357
357
|
keywords: ["error-filled"],
|
|
358
358
|
category: "status"
|
|
359
|
-
},
|
|
359
|
+
}, dr = {
|
|
360
360
|
name: "info-filled",
|
|
361
361
|
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>',
|
|
362
362
|
keywords: ["info-filled"],
|
|
363
363
|
category: "status"
|
|
364
|
-
},
|
|
364
|
+
}, fr = ar.bind(or), E = "purpur-icon", gr = "md", hr = (e) => e.filter((p) => Object.keys(p).length >= 1).map((p) => `${p.name}="${p.value}"`).join(" "), vr = ({ content: e = "", title: p } = {}) => {
|
|
365
365
|
const u = [
|
|
366
366
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
367
367
|
{ name: "fill", value: "currentColor" },
|
|
368
368
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
369
369
|
p ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
370
370
|
], a = p ? `<title>${p}</title>` : "";
|
|
371
|
-
return `<svg ${
|
|
372
|
-
},
|
|
371
|
+
return `<svg ${hr(u)}>${a}${e}</svg>`;
|
|
372
|
+
}, yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), L = ({
|
|
373
373
|
["data-testid"]: e,
|
|
374
374
|
svg: p,
|
|
375
375
|
allyTitle: u,
|
|
376
376
|
className: a = "",
|
|
377
|
-
size: i =
|
|
377
|
+
size: i = gr,
|
|
378
378
|
...r
|
|
379
379
|
}) => {
|
|
380
|
-
const t =
|
|
381
|
-
content:
|
|
380
|
+
const t = vr({
|
|
381
|
+
content: yr(p.svg),
|
|
382
382
|
title: u
|
|
383
|
-
}), n =
|
|
383
|
+
}), n = fr(a, E, `${E}--${i}`);
|
|
384
384
|
return /* @__PURE__ */ s(
|
|
385
385
|
"span",
|
|
386
386
|
{
|
|
@@ -392,7 +392,7 @@ const pr = /* @__PURE__ */ nr(ur), ir = {
|
|
|
392
392
|
}
|
|
393
393
|
);
|
|
394
394
|
};
|
|
395
|
-
function
|
|
395
|
+
function mr(e) {
|
|
396
396
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
397
397
|
}
|
|
398
398
|
var z = { exports: {} };
|
|
@@ -431,8 +431,8 @@ var z = { exports: {} };
|
|
|
431
431
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
432
432
|
})();
|
|
433
433
|
})(z);
|
|
434
|
-
var
|
|
435
|
-
const
|
|
434
|
+
var br = z.exports;
|
|
435
|
+
const wr = /* @__PURE__ */ mr(br), y = {
|
|
436
436
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
437
437
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
438
438
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -447,7 +447,7 @@ const mr = /* @__PURE__ */ vr(yr), m = {
|
|
|
447
447
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
448
448
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
449
449
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
450
|
-
},
|
|
450
|
+
}, xr = {
|
|
451
451
|
PARAGRAPH100: "paragraph-100",
|
|
452
452
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
453
453
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -458,29 +458,29 @@ const mr = /* @__PURE__ */ vr(yr), m = {
|
|
|
458
458
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
459
459
|
OVERLINE100: "overline-100",
|
|
460
460
|
OVERLINE200: "overline-200"
|
|
461
|
-
},
|
|
461
|
+
}, m = "purpur-paragraph", $r = ({
|
|
462
462
|
["data-testid"]: e,
|
|
463
463
|
children: p,
|
|
464
464
|
className: u = "",
|
|
465
465
|
disabled: a,
|
|
466
466
|
enableHyphenation: i = !1,
|
|
467
467
|
negative: r = !1,
|
|
468
|
-
variant: t =
|
|
468
|
+
variant: t = xr.PARAGRAPH100,
|
|
469
469
|
...n
|
|
470
470
|
}) => {
|
|
471
|
-
const c =
|
|
471
|
+
const c = wr([
|
|
472
472
|
u,
|
|
473
|
-
m
|
|
474
|
-
|
|
473
|
+
y[m],
|
|
474
|
+
y[`${m}--${t}`],
|
|
475
475
|
{
|
|
476
|
-
[
|
|
477
|
-
[
|
|
478
|
-
[
|
|
476
|
+
[y[`${m}--hyphens`]]: i,
|
|
477
|
+
[y[`${m}--disabled`]]: a,
|
|
478
|
+
[y[`${m}--negative`]]: r
|
|
479
479
|
}
|
|
480
480
|
]);
|
|
481
481
|
return /* @__PURE__ */ s("p", { ...n, className: c, "data-testid": e, children: p });
|
|
482
482
|
};
|
|
483
|
-
function
|
|
483
|
+
function Sr(e) {
|
|
484
484
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
485
485
|
}
|
|
486
486
|
var C = { exports: {} };
|
|
@@ -519,8 +519,8 @@ var C = { exports: {} };
|
|
|
519
519
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
520
520
|
})();
|
|
521
521
|
})(C);
|
|
522
|
-
var
|
|
523
|
-
const
|
|
522
|
+
var Or = C.exports;
|
|
523
|
+
const Ar = /* @__PURE__ */ Sr(Or), l = {
|
|
524
524
|
"purpur-notification": "_purpur-notification_10qwf_1",
|
|
525
525
|
"purpur-notification__top": "_purpur-notification__top_10qwf_14",
|
|
526
526
|
"purpur-notification__header": "_purpur-notification__header_10qwf_20",
|
|
@@ -534,30 +534,30 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
534
534
|
"purpur-notification--info": "_purpur-notification--info_10qwf_63",
|
|
535
535
|
"purpur-notification--hidden": "_purpur-notification--hidden_10qwf_72",
|
|
536
536
|
"purpur-notification--has-close-button": "_purpur-notification--has-close-button_10qwf_76"
|
|
537
|
-
},
|
|
537
|
+
}, w = {
|
|
538
538
|
SUCCESS: "success",
|
|
539
539
|
WARNING: "warning",
|
|
540
540
|
ERROR: "error",
|
|
541
541
|
INFO: "info"
|
|
542
|
-
},
|
|
542
|
+
}, Mr = Object.values(w), Nr = {
|
|
543
543
|
POLITE: "polite",
|
|
544
544
|
ASSERTIVE: "assertive"
|
|
545
|
-
},
|
|
545
|
+
}, Pr = Object.values(Nr), jr = {
|
|
546
546
|
ALERT: "alert",
|
|
547
547
|
DIALOG: "dialog",
|
|
548
548
|
ALERTDIALOG: "alertdialog"
|
|
549
|
-
},
|
|
549
|
+
}, kr = Object.values(jr), _ = "purpur-notification", qr = (e) => {
|
|
550
550
|
switch (e) {
|
|
551
|
-
case
|
|
552
|
-
return
|
|
553
|
-
case
|
|
554
|
-
return or;
|
|
555
|
-
case x.WARNING:
|
|
556
|
-
return ar;
|
|
557
|
-
case x.ERROR:
|
|
551
|
+
case w.INFO:
|
|
552
|
+
return dr;
|
|
553
|
+
case w.SUCCESS:
|
|
558
554
|
return lr;
|
|
555
|
+
case w.WARNING:
|
|
556
|
+
return sr;
|
|
557
|
+
case w.ERROR:
|
|
558
|
+
return cr;
|
|
559
559
|
}
|
|
560
|
-
},
|
|
560
|
+
}, Er = ({
|
|
561
561
|
["data-testid"]: e,
|
|
562
562
|
["aria-live"]: p,
|
|
563
563
|
children: u,
|
|
@@ -569,9 +569,9 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
569
569
|
heading: c,
|
|
570
570
|
hidden: d,
|
|
571
571
|
id: o,
|
|
572
|
-
onClose:
|
|
573
|
-
|
|
574
|
-
},
|
|
572
|
+
onClose: g,
|
|
573
|
+
...x
|
|
574
|
+
}, O) => /* @__PURE__ */ b(
|
|
575
575
|
"div",
|
|
576
576
|
{
|
|
577
577
|
id: o,
|
|
@@ -579,41 +579,41 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
579
579
|
"aria-describedby": o ? `${o}-body` : void 0,
|
|
580
580
|
"aria-live": p,
|
|
581
581
|
"aria-hidden": !!d,
|
|
582
|
-
className:
|
|
582
|
+
className: Ar(a, l[_], l[`${_}--${n}`], {
|
|
583
583
|
[l[`${_}--hidden`]]: d,
|
|
584
|
-
[l[`${_}--has-close-button`]]: !!
|
|
584
|
+
[l[`${_}--has-close-button`]]: !!g
|
|
585
585
|
}),
|
|
586
586
|
"data-testid": e,
|
|
587
|
-
ref:
|
|
587
|
+
ref: O,
|
|
588
588
|
role: t,
|
|
589
|
-
|
|
589
|
+
...x,
|
|
590
590
|
children: [
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ b("div", { className: l[`${_}__top`], children: [
|
|
592
|
+
/* @__PURE__ */ b("div", { className: l[`${_}__header`], children: [
|
|
593
593
|
/* @__PURE__ */ s(
|
|
594
594
|
L,
|
|
595
595
|
{
|
|
596
596
|
"data-testid": e ? `${e}-icon` : void 0,
|
|
597
597
|
className: l[`${_}__icon`],
|
|
598
|
-
svg:
|
|
598
|
+
svg: qr(n),
|
|
599
599
|
size: "md"
|
|
600
600
|
}
|
|
601
601
|
),
|
|
602
602
|
!!c && /* @__PURE__ */ s(
|
|
603
|
-
|
|
603
|
+
ur,
|
|
604
604
|
{
|
|
605
605
|
"data-testid": e ? `${e}-heading` : void 0,
|
|
606
606
|
variant: "subsection-100",
|
|
607
607
|
tag: r,
|
|
608
608
|
className: l[`${_}__heading`],
|
|
609
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ b("span", { id: o ? `${o}-heading` : void 0, children: [
|
|
610
610
|
" ",
|
|
611
611
|
c
|
|
612
612
|
] })
|
|
613
613
|
}
|
|
614
614
|
)
|
|
615
615
|
] }),
|
|
616
|
-
|
|
616
|
+
g && /* @__PURE__ */ s(
|
|
617
617
|
P,
|
|
618
618
|
{
|
|
619
619
|
"data-testid": e ? `${e}-close-button` : void 0,
|
|
@@ -621,9 +621,9 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
621
621
|
size: "sm",
|
|
622
622
|
iconOnly: !0,
|
|
623
623
|
"aria-label": i,
|
|
624
|
-
onClick:
|
|
624
|
+
onClick: g,
|
|
625
625
|
className: l[`${_}__close-button`],
|
|
626
|
-
children: /* @__PURE__ */ s(L, { svg:
|
|
626
|
+
children: /* @__PURE__ */ s(L, { svg: _r, size: "sm" })
|
|
627
627
|
}
|
|
628
628
|
)
|
|
629
629
|
] }),
|
|
@@ -634,7 +634,7 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
634
634
|
className: l[`${_}__body`],
|
|
635
635
|
id: o ? `${o}-body` : void 0,
|
|
636
636
|
children: typeof u == "string" ? /* @__PURE__ */ s(
|
|
637
|
-
|
|
637
|
+
$r,
|
|
638
638
|
{
|
|
639
639
|
"data-testid": e ? `${e}-paragraph` : void 0,
|
|
640
640
|
variant: "paragraph-100",
|
|
@@ -645,15 +645,15 @@ const Sr = /* @__PURE__ */ xr($r), l = {
|
|
|
645
645
|
)
|
|
646
646
|
]
|
|
647
647
|
}
|
|
648
|
-
),
|
|
649
|
-
|
|
648
|
+
), Lr = I(Er);
|
|
649
|
+
Lr.displayName = "Notification";
|
|
650
650
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
651
|
+
Nr as NOTIFICATION_ARIA_LIVE,
|
|
652
|
+
jr as NOTIFICATION_ROLE,
|
|
653
|
+
w as NOTIFICATION_STATUS,
|
|
654
|
+
Lr as Notification,
|
|
655
|
+
Pr as notificationAriaLiveValues,
|
|
656
|
+
kr as notificationRoles,
|
|
657
|
+
Mr as notificationStatuses
|
|
658
658
|
};
|
|
659
659
|
//# sourceMappingURL=notification.es.js.map
|