@purpurds/notification 3.7.1 → 4.0.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 +7 -7
- package/dist/notification.cjs.js.map +1 -1
- package/dist/notification.es.js +103 -103
- package/dist/notification.es.js.map +1 -1
- package/package.json +7 -8
- package/dist/notification.system.js +0 -26
- package/dist/notification.system.js.map +0 -1
package/dist/notification.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
const
|
|
2
|
+
import { forwardRef as M } from "react";
|
|
3
|
+
const E = {
|
|
4
4
|
SM: "sm",
|
|
5
5
|
MD: "md",
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function Z(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var P = { exports: {} };
|
|
12
12
|
/*!
|
|
13
13
|
Copyright (c) 2018 Jed Watson.
|
|
14
14
|
Licensed under the MIT License (MIT), see
|
|
@@ -43,22 +43,22 @@ var M = { exports: {} };
|
|
|
43
43
|
}
|
|
44
44
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
45
45
|
})();
|
|
46
|
-
})(
|
|
47
|
-
var
|
|
48
|
-
const
|
|
46
|
+
})(P);
|
|
47
|
+
var V = P.exports;
|
|
48
|
+
const I = /* @__PURE__ */ Z(V), k = "_rotate_7s2g1_1", H = "_dash_7s2g1_1", m = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_7s2g1_1",
|
|
50
|
-
rotate:
|
|
50
|
+
rotate: k,
|
|
51
51
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_7s2g1_4",
|
|
52
52
|
"purpur-spinner--xs": "_purpur-spinner--xs_7s2g1_8",
|
|
53
53
|
"purpur-spinner--sm": "_purpur-spinner--sm_7s2g1_12",
|
|
54
54
|
"purpur-spinner--md": "_purpur-spinner--md_7s2g1_16",
|
|
55
55
|
"purpur-spinner--lg": "_purpur-spinner--lg_7s2g1_20",
|
|
56
56
|
"purpur-spinner__circle": "_purpur-spinner__circle_7s2g1_24",
|
|
57
|
-
dash:
|
|
57
|
+
dash: H,
|
|
58
58
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_7s2g1_33",
|
|
59
59
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_7s2g1_36",
|
|
60
60
|
"purpur-spinner__circle--negative-disabled": "_purpur-spinner__circle--negative-disabled_7s2g1_39"
|
|
61
|
-
},
|
|
61
|
+
}, y = "purpur-spinner", F = {
|
|
62
62
|
PRIMARY: "primary",
|
|
63
63
|
DISABLED: "disabled",
|
|
64
64
|
NEGATIVE: "negative",
|
|
@@ -72,20 +72,20 @@ const E = /* @__PURE__ */ V(k), H = "_rotate_7s2g1_1", F = "_dash_7s2g1_1", m =
|
|
|
72
72
|
}, W = ({
|
|
73
73
|
["data-testid"]: e,
|
|
74
74
|
size: u = U.SM,
|
|
75
|
-
variant: a =
|
|
75
|
+
variant: a = F.PRIMARY,
|
|
76
76
|
...i
|
|
77
77
|
}) => /* @__PURE__ */ o(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
|
-
className:
|
|
80
|
+
className: I([m[y], m[`${y}--${u}`]]),
|
|
81
81
|
"data-testid": e,
|
|
82
82
|
...i,
|
|
83
83
|
children: /* @__PURE__ */ o("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ o(
|
|
84
84
|
"circle",
|
|
85
85
|
{
|
|
86
|
-
className:
|
|
87
|
-
m[`${
|
|
88
|
-
m[`${
|
|
86
|
+
className: I(
|
|
87
|
+
m[`${y}__circle`],
|
|
88
|
+
m[`${y}__circle--${a}`]
|
|
89
89
|
),
|
|
90
90
|
cx: "25",
|
|
91
91
|
cy: "25",
|
|
@@ -97,7 +97,7 @@ const E = /* @__PURE__ */ V(k), H = "_rotate_7s2g1_1", F = "_dash_7s2g1_1", m =
|
|
|
97
97
|
function Y(e) {
|
|
98
98
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var j = { exports: {} };
|
|
101
101
|
/*!
|
|
102
102
|
Copyright (c) 2018 Jed Watson.
|
|
103
103
|
Licensed under the MIT License (MIT), see
|
|
@@ -132,8 +132,8 @@ var P = { exports: {} };
|
|
|
132
132
|
}
|
|
133
133
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
134
134
|
})();
|
|
135
|
-
})(
|
|
136
|
-
var X =
|
|
135
|
+
})(j);
|
|
136
|
+
var X = j.exports;
|
|
137
137
|
const J = /* @__PURE__ */ Y(X), f = {
|
|
138
138
|
"purpur-button": "_purpur-button_1fna2_1",
|
|
139
139
|
"purpur-button--sm": "_purpur-button--sm_1fna2_33",
|
|
@@ -164,7 +164,7 @@ const J = /* @__PURE__ */ Y(X), f = {
|
|
|
164
164
|
iconOnly: r,
|
|
165
165
|
loading: t = !1,
|
|
166
166
|
onClick: n,
|
|
167
|
-
size:
|
|
167
|
+
size: c = E.MD,
|
|
168
168
|
variant: d,
|
|
169
169
|
type: s = "button",
|
|
170
170
|
...h
|
|
@@ -175,7 +175,7 @@ const J = /* @__PURE__ */ Y(X), f = {
|
|
|
175
175
|
[
|
|
176
176
|
f[g],
|
|
177
177
|
f[`${g}--${d}`],
|
|
178
|
-
f[`${g}--${
|
|
178
|
+
f[`${g}--${c}`]
|
|
179
179
|
],
|
|
180
180
|
{
|
|
181
181
|
[f[`${g}--icon-only`]]: r,
|
|
@@ -184,9 +184,9 @@ const J = /* @__PURE__ */ Y(X), f = {
|
|
|
184
184
|
[f[`${g}--disabled`]]: i || t
|
|
185
185
|
},
|
|
186
186
|
u
|
|
187
|
-
),
|
|
187
|
+
), G = (N) => {
|
|
188
188
|
i || t ? N.preventDefault() : n && n(N);
|
|
189
|
-
},
|
|
189
|
+
}, B = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
|
|
190
190
|
return /* @__PURE__ */ v(
|
|
191
191
|
"button",
|
|
192
192
|
{
|
|
@@ -195,16 +195,16 @@ const J = /* @__PURE__ */ Y(X), f = {
|
|
|
195
195
|
type: s,
|
|
196
196
|
ref: $,
|
|
197
197
|
"aria-disabled": h["aria-disabled"] || i || t,
|
|
198
|
-
onClick:
|
|
198
|
+
onClick: G,
|
|
199
199
|
...h,
|
|
200
200
|
children: [
|
|
201
|
-
t && /* @__PURE__ */ o(W, { size:
|
|
201
|
+
t && /* @__PURE__ */ o(W, { size: c === E.LG ? "xs" : "xxs", variant: B() }),
|
|
202
202
|
" ",
|
|
203
203
|
e
|
|
204
204
|
]
|
|
205
205
|
}
|
|
206
206
|
);
|
|
207
|
-
}, T =
|
|
207
|
+
}, T = M(K);
|
|
208
208
|
T.displayName = "Button";
|
|
209
209
|
function Q(e) {
|
|
210
210
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -247,20 +247,20 @@ var q = { exports: {} };
|
|
|
247
247
|
})(q);
|
|
248
248
|
var rr = q.exports;
|
|
249
249
|
const tr = /* @__PURE__ */ Q(rr), A = {
|
|
250
|
-
"purpur-heading": "_purpur-
|
|
251
|
-
"purpur-heading--hyphens": "_purpur-heading--
|
|
252
|
-
"purpur-heading--subsection-100": "_purpur-heading--subsection-
|
|
253
|
-
"purpur-heading--title-100": "_purpur-heading--title-
|
|
254
|
-
"purpur-heading--title-200": "_purpur-heading--title-
|
|
255
|
-
"purpur-heading--title-300": "_purpur-heading--title-
|
|
256
|
-
"purpur-heading--title-400": "_purpur-heading--title-
|
|
257
|
-
"purpur-heading--title-500": "_purpur-heading--title-
|
|
258
|
-
"purpur-heading--title-600": "_purpur-heading--title-
|
|
259
|
-
"purpur-heading--title-700": "_purpur-heading--title-
|
|
260
|
-
"purpur-heading--display-25": "_purpur-heading--display-
|
|
261
|
-
"purpur-heading--display-50": "_purpur-heading--display-
|
|
262
|
-
"purpur-heading--display-100": "_purpur-heading--display-
|
|
263
|
-
"purpur-heading--display-200": "_purpur-heading--display-
|
|
250
|
+
"purpur-heading": "_purpur-heading_1abfh_1",
|
|
251
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_1abfh_8",
|
|
252
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_1abfh_11",
|
|
253
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_1abfh_17",
|
|
254
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_1abfh_23",
|
|
255
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_1abfh_29",
|
|
256
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_1abfh_35",
|
|
257
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_1abfh_41",
|
|
258
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_1abfh_47",
|
|
259
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_1abfh_53",
|
|
260
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_1abfh_59",
|
|
261
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_1abfh_65",
|
|
262
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_1abfh_71",
|
|
263
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_1abfh_77"
|
|
264
264
|
}, er = {
|
|
265
265
|
TITLE100: "title-100",
|
|
266
266
|
TITLE200: "title-200",
|
|
@@ -279,7 +279,7 @@ const tr = /* @__PURE__ */ Q(rr), A = {
|
|
|
279
279
|
variant: r = er.TITLE100,
|
|
280
280
|
...t
|
|
281
281
|
}) => {
|
|
282
|
-
const n = p,
|
|
282
|
+
const n = p, c = tr([
|
|
283
283
|
a,
|
|
284
284
|
A[O],
|
|
285
285
|
A[`${O}--${r}`],
|
|
@@ -287,12 +287,12 @@ const tr = /* @__PURE__ */ Q(rr), A = {
|
|
|
287
287
|
[A[`${O}--hyphens`]]: i
|
|
288
288
|
}
|
|
289
289
|
]);
|
|
290
|
-
return /* @__PURE__ */ o(n, { ...t, className:
|
|
290
|
+
return /* @__PURE__ */ o(n, { ...t, className: c, "data-testid": e, children: u });
|
|
291
291
|
};
|
|
292
292
|
function ar(e) {
|
|
293
293
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
294
294
|
}
|
|
295
|
-
var
|
|
295
|
+
var z = { exports: {} };
|
|
296
296
|
/*!
|
|
297
297
|
Copyright (c) 2018 Jed Watson.
|
|
298
298
|
Licensed under the MIT License (MIT), see
|
|
@@ -327,8 +327,8 @@ var D = { exports: {} };
|
|
|
327
327
|
}
|
|
328
328
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
329
329
|
})();
|
|
330
|
-
})(
|
|
331
|
-
var ur =
|
|
330
|
+
})(z);
|
|
331
|
+
var ur = z.exports;
|
|
332
332
|
const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
333
333
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
334
334
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
@@ -352,17 +352,17 @@ const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
352
352
|
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>',
|
|
353
353
|
keywords: ["close"],
|
|
354
354
|
category: "utility"
|
|
355
|
-
},
|
|
355
|
+
}, _r = {
|
|
356
356
|
name: "error-filled",
|
|
357
357
|
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>',
|
|
358
358
|
keywords: ["error-filled"],
|
|
359
359
|
category: "status"
|
|
360
|
-
},
|
|
360
|
+
}, cr = {
|
|
361
361
|
name: "info-filled",
|
|
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
|
-
}, dr = ir.bind(pr),
|
|
365
|
+
}, dr = ir.bind(pr), R = "purpur-icon", fr = "md", gr = (e) => e.filter((u) => Object.keys(u).length >= 1).map((u) => `${u.name}="${u.value}"`).join(" "), hr = ({ content: e = "", title: u } = {}) => {
|
|
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 ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
370
370
|
u ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
371
371
|
], i = u ? `<title>${u}</title>` : "";
|
|
372
372
|
return `<svg ${gr(a)}>${i}${e}</svg>`;
|
|
373
|
-
}, vr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
373
|
+
}, vr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), L = ({
|
|
374
374
|
["data-testid"]: e,
|
|
375
375
|
svg: u,
|
|
376
376
|
allyTitle: a,
|
|
@@ -381,7 +381,7 @@ const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
381
381
|
const t = hr({
|
|
382
382
|
content: vr(u.svg),
|
|
383
383
|
title: a
|
|
384
|
-
}), n = dr(i,
|
|
384
|
+
}), n = dr(i, R, `${R}--${p}`);
|
|
385
385
|
return /* @__PURE__ */ o(
|
|
386
386
|
"span",
|
|
387
387
|
{
|
|
@@ -393,10 +393,10 @@ const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
393
393
|
}
|
|
394
394
|
);
|
|
395
395
|
};
|
|
396
|
-
function
|
|
396
|
+
function br(e) {
|
|
397
397
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
398
398
|
}
|
|
399
|
-
var
|
|
399
|
+
var D = { exports: {} };
|
|
400
400
|
/*!
|
|
401
401
|
Copyright (c) 2018 Jed Watson.
|
|
402
402
|
Licensed under the MIT License (MIT), see
|
|
@@ -431,22 +431,22 @@ var C = { exports: {} };
|
|
|
431
431
|
}
|
|
432
432
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
433
433
|
})();
|
|
434
|
-
})(
|
|
435
|
-
var mr =
|
|
436
|
-
const
|
|
437
|
-
"purpur-paragraph": "_purpur-
|
|
438
|
-
"purpur-paragraph--disabled": "_purpur-paragraph--
|
|
439
|
-
"purpur-paragraph--hyphens": "_purpur-paragraph--
|
|
440
|
-
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-
|
|
441
|
-
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-
|
|
442
|
-
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-
|
|
443
|
-
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-
|
|
444
|
-
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-
|
|
445
|
-
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-
|
|
446
|
-
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-
|
|
447
|
-
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-
|
|
448
|
-
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-
|
|
449
|
-
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-
|
|
434
|
+
})(D);
|
|
435
|
+
var mr = D.exports;
|
|
436
|
+
const yr = /* @__PURE__ */ br(mr), w = {
|
|
437
|
+
"purpur-paragraph": "_purpur-paragraph_1fzxr_1",
|
|
438
|
+
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1fzxr_7",
|
|
439
|
+
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1fzxr_10",
|
|
440
|
+
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1fzxr_13",
|
|
441
|
+
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1fzxr_19",
|
|
442
|
+
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1fzxr_26",
|
|
443
|
+
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1fzxr_33",
|
|
444
|
+
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1fzxr_39",
|
|
445
|
+
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1fzxr_45",
|
|
446
|
+
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1fzxr_51",
|
|
447
|
+
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1fzxr_57",
|
|
448
|
+
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1fzxr_64",
|
|
449
|
+
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1fzxr_71"
|
|
450
450
|
}, wr = {
|
|
451
451
|
PARAGRAPH100: "paragraph-100",
|
|
452
452
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
@@ -467,7 +467,7 @@ const br = /* @__PURE__ */ yr(mr), w = {
|
|
|
467
467
|
variant: r = wr.PARAGRAPH100,
|
|
468
468
|
...t
|
|
469
469
|
}) => {
|
|
470
|
-
const n =
|
|
470
|
+
const n = yr([
|
|
471
471
|
a,
|
|
472
472
|
w[x],
|
|
473
473
|
w[`${x}--${r}`],
|
|
@@ -481,7 +481,7 @@ const br = /* @__PURE__ */ yr(mr), w = {
|
|
|
481
481
|
function $r(e) {
|
|
482
482
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
483
483
|
}
|
|
484
|
-
var
|
|
484
|
+
var C = { exports: {} };
|
|
485
485
|
/*!
|
|
486
486
|
Copyright (c) 2018 Jed Watson.
|
|
487
487
|
Licensed under the MIT License (MIT), see
|
|
@@ -516,8 +516,8 @@ var G = { exports: {} };
|
|
|
516
516
|
}
|
|
517
517
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
518
518
|
})();
|
|
519
|
-
})(
|
|
520
|
-
var Sr =
|
|
519
|
+
})(C);
|
|
520
|
+
var Sr = C.exports;
|
|
521
521
|
const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
522
522
|
"purpur-notification": "_purpur-notification_10qwf_1",
|
|
523
523
|
"purpur-notification__top": "_purpur-notification__top_10qwf_14",
|
|
@@ -532,30 +532,30 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
532
532
|
"purpur-notification--info": "_purpur-notification--info_10qwf_63",
|
|
533
533
|
"purpur-notification--hidden": "_purpur-notification--hidden_10qwf_72",
|
|
534
534
|
"purpur-notification--has-close-button": "_purpur-notification--has-close-button_10qwf_76"
|
|
535
|
-
},
|
|
535
|
+
}, b = {
|
|
536
536
|
SUCCESS: "success",
|
|
537
537
|
WARNING: "warning",
|
|
538
538
|
ERROR: "error",
|
|
539
539
|
INFO: "info"
|
|
540
|
-
},
|
|
540
|
+
}, Pr = Object.values(b), Or = {
|
|
541
541
|
POLITE: "polite",
|
|
542
542
|
ASSERTIVE: "assertive"
|
|
543
|
-
},
|
|
543
|
+
}, jr = Object.values(Or), Nr = {
|
|
544
544
|
ALERT: "alert",
|
|
545
545
|
DIALOG: "dialog",
|
|
546
546
|
ALERTDIALOG: "alertdialog"
|
|
547
|
-
}, Tr = Object.values(Nr),
|
|
547
|
+
}, Tr = Object.values(Nr), _ = "purpur-notification", Er = (e) => {
|
|
548
548
|
switch (e) {
|
|
549
|
-
case
|
|
550
|
-
return
|
|
551
|
-
case
|
|
549
|
+
case b.INFO:
|
|
550
|
+
return cr;
|
|
551
|
+
case b.SUCCESS:
|
|
552
552
|
return sr;
|
|
553
|
-
case
|
|
553
|
+
case b.WARNING:
|
|
554
554
|
return or;
|
|
555
|
-
case
|
|
556
|
-
return
|
|
555
|
+
case b.ERROR:
|
|
556
|
+
return _r;
|
|
557
557
|
}
|
|
558
|
-
},
|
|
558
|
+
}, Ir = ({
|
|
559
559
|
["data-testid"]: e,
|
|
560
560
|
["aria-live"]: u,
|
|
561
561
|
children: a,
|
|
@@ -564,7 +564,7 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
564
564
|
headingTag: r = "h4",
|
|
565
565
|
role: t,
|
|
566
566
|
status: n = "info",
|
|
567
|
-
heading:
|
|
567
|
+
heading: c,
|
|
568
568
|
hidden: d,
|
|
569
569
|
id: s,
|
|
570
570
|
onClose: h,
|
|
@@ -577,36 +577,36 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
577
577
|
"aria-describedby": s ? `${s}-body` : void 0,
|
|
578
578
|
"aria-live": u,
|
|
579
579
|
"aria-hidden": !!d,
|
|
580
|
-
className: Ar(i, l[
|
|
581
|
-
[l[`${
|
|
582
|
-
[l[`${
|
|
580
|
+
className: Ar(i, l[_], l[`${_}--${n}`], {
|
|
581
|
+
[l[`${_}--hidden`]]: d,
|
|
582
|
+
[l[`${_}--has-close-button`]]: !!h
|
|
583
583
|
}),
|
|
584
584
|
"data-testid": e,
|
|
585
585
|
ref: S,
|
|
586
586
|
role: t,
|
|
587
587
|
...$,
|
|
588
588
|
children: [
|
|
589
|
-
/* @__PURE__ */ v("div", { className: l[`${
|
|
590
|
-
/* @__PURE__ */ v("div", { className: l[`${
|
|
589
|
+
/* @__PURE__ */ v("div", { className: l[`${_}__top`], children: [
|
|
590
|
+
/* @__PURE__ */ v("div", { className: l[`${_}__header`], children: [
|
|
591
591
|
/* @__PURE__ */ o(
|
|
592
|
-
|
|
592
|
+
L,
|
|
593
593
|
{
|
|
594
594
|
"data-testid": e ? `${e}-icon` : void 0,
|
|
595
|
-
className: l[`${
|
|
596
|
-
svg:
|
|
595
|
+
className: l[`${_}__icon`],
|
|
596
|
+
svg: Er(n),
|
|
597
597
|
size: "md"
|
|
598
598
|
}
|
|
599
599
|
),
|
|
600
|
-
!!
|
|
600
|
+
!!c && /* @__PURE__ */ o(
|
|
601
601
|
nr,
|
|
602
602
|
{
|
|
603
603
|
"data-testid": e ? `${e}-heading` : void 0,
|
|
604
604
|
variant: "subsection-100",
|
|
605
605
|
tag: r,
|
|
606
|
-
className: l[`${
|
|
606
|
+
className: l[`${_}__heading`],
|
|
607
607
|
children: /* @__PURE__ */ v("span", { id: s ? `${s}-heading` : void 0, children: [
|
|
608
608
|
" ",
|
|
609
|
-
|
|
609
|
+
c
|
|
610
610
|
] })
|
|
611
611
|
}
|
|
612
612
|
)
|
|
@@ -620,8 +620,8 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
620
620
|
iconOnly: !0,
|
|
621
621
|
"aria-label": p,
|
|
622
622
|
onClick: h,
|
|
623
|
-
className: l[`${
|
|
624
|
-
children: /* @__PURE__ */ o(
|
|
623
|
+
className: l[`${_}__close-button`],
|
|
624
|
+
children: /* @__PURE__ */ o(L, { svg: lr, size: "sm" })
|
|
625
625
|
}
|
|
626
626
|
)
|
|
627
627
|
] }),
|
|
@@ -629,7 +629,7 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
629
629
|
"div",
|
|
630
630
|
{
|
|
631
631
|
"data-testid": e ? `${e}-body` : void 0,
|
|
632
|
-
className: l[`${
|
|
632
|
+
className: l[`${_}__body`],
|
|
633
633
|
id: s ? `${s}-body` : void 0,
|
|
634
634
|
children: typeof a == "string" ? /* @__PURE__ */ o(
|
|
635
635
|
xr,
|
|
@@ -643,15 +643,15 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
643
643
|
)
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
|
-
),
|
|
647
|
-
|
|
646
|
+
), Rr = M(Ir);
|
|
647
|
+
Rr.displayName = "Notification";
|
|
648
648
|
export {
|
|
649
649
|
Or as NOTIFICATION_ARIA_LIVE,
|
|
650
650
|
Nr as NOTIFICATION_ROLE,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
651
|
+
b as NOTIFICATION_STATUS,
|
|
652
|
+
Rr as Notification,
|
|
653
|
+
jr as notificationAriaLiveValues,
|
|
654
654
|
Tr as notificationRoles,
|
|
655
|
-
|
|
655
|
+
Pr as notificationStatuses
|
|
656
656
|
};
|
|
657
657
|
//# sourceMappingURL=notification.es.js.map
|