@purpurds/notification 3.2.0 → 3.3.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 +4 -4
- package/dist/notification.cjs.js.map +1 -1
- package/dist/notification.es.js +36 -36
- package/dist/notification.es.js.map +1 -1
- package/dist/notification.system.js +6 -6
- package/dist/notification.system.js.map +1 -1
- package/package.json +6 -6
package/dist/notification.es.js
CHANGED
|
@@ -5,7 +5,7 @@ const j = {
|
|
|
5
5
|
MD: "md",
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function V(e) {
|
|
9
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
10
10
|
}
|
|
11
11
|
var M = { exports: {} };
|
|
@@ -44,8 +44,8 @@ var M = { exports: {} };
|
|
|
44
44
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
45
45
|
})();
|
|
46
46
|
})(M);
|
|
47
|
-
var
|
|
48
|
-
const E = /* @__PURE__ */ k
|
|
47
|
+
var k = M.exports;
|
|
48
|
+
const E = /* @__PURE__ */ V(k), H = "_rotate_7s2g1_1", F = "_dash_7s2g1_1", b = {
|
|
49
49
|
"purpur-spinner": "_purpur-spinner_7s2g1_1",
|
|
50
50
|
rotate: H,
|
|
51
51
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_7s2g1_4",
|
|
@@ -54,11 +54,11 @@ const E = /* @__PURE__ */ k(V), H = "_rotate_7s2g1_1", z = "_dash_7s2g1_1", m =
|
|
|
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: F,
|
|
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
|
+
}, m = "purpur-spinner", z = {
|
|
62
62
|
PRIMARY: "primary",
|
|
63
63
|
DISABLED: "disabled",
|
|
64
64
|
NEGATIVE: "negative",
|
|
@@ -72,20 +72,20 @@ const E = /* @__PURE__ */ k(V), H = "_rotate_7s2g1_1", z = "_dash_7s2g1_1", m =
|
|
|
72
72
|
}, W = ({
|
|
73
73
|
["data-testid"]: e,
|
|
74
74
|
size: u = U.SM,
|
|
75
|
-
variant: a =
|
|
75
|
+
variant: a = z.PRIMARY,
|
|
76
76
|
...i
|
|
77
77
|
}) => /* @__PURE__ */ o(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
|
-
className: E([m
|
|
80
|
+
className: E([b[m], b[`${m}--${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
86
|
className: E(
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
b[`${m}__circle`],
|
|
88
|
+
b[`${m}__circle--${a}`]
|
|
89
89
|
),
|
|
90
90
|
cx: "25",
|
|
91
91
|
cy: "25",
|
|
@@ -94,7 +94,7 @@ const E = /* @__PURE__ */ k(V), H = "_rotate_7s2g1_1", z = "_dash_7s2g1_1", m =
|
|
|
94
94
|
) })
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
|
-
function
|
|
97
|
+
function Y(e) {
|
|
98
98
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
99
99
|
}
|
|
100
100
|
var P = { exports: {} };
|
|
@@ -133,8 +133,8 @@ var P = { exports: {} };
|
|
|
133
133
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
134
134
|
})();
|
|
135
135
|
})(P);
|
|
136
|
-
var
|
|
137
|
-
const
|
|
136
|
+
var X = P.exports;
|
|
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",
|
|
140
140
|
"purpur-button--icon-only": "_purpur-button--icon-only_1fna2_36",
|
|
@@ -155,7 +155,7 @@ const K = /* @__PURE__ */ X(Y), f = {
|
|
|
155
155
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1fna2_160",
|
|
156
156
|
"purpur-button--text-negative": "_purpur-button--text-negative_1fna2_175",
|
|
157
157
|
"purpur-button--text": "_purpur-button--text_1fna2_175"
|
|
158
|
-
}, g = "purpur-button",
|
|
158
|
+
}, g = "purpur-button", K = ({
|
|
159
159
|
children: e,
|
|
160
160
|
className: u,
|
|
161
161
|
["data-testid"]: a,
|
|
@@ -171,7 +171,7 @@ const K = /* @__PURE__ */ X(Y), f = {
|
|
|
171
171
|
}, $) => {
|
|
172
172
|
if (r && d === "destructive")
|
|
173
173
|
return null;
|
|
174
|
-
const S =
|
|
174
|
+
const S = J(
|
|
175
175
|
[
|
|
176
176
|
f[g],
|
|
177
177
|
f[`${g}--${d}`],
|
|
@@ -184,7 +184,7 @@ const K = /* @__PURE__ */ X(Y), f = {
|
|
|
184
184
|
[f[`${g}--disabled`]]: i || t
|
|
185
185
|
},
|
|
186
186
|
u
|
|
187
|
-
),
|
|
187
|
+
), B = (N) => {
|
|
188
188
|
i || t ? N.preventDefault() : n && n(N);
|
|
189
189
|
}, Z = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
|
|
190
190
|
return /* @__PURE__ */ v(
|
|
@@ -195,7 +195,7 @@ const K = /* @__PURE__ */ X(Y), f = {
|
|
|
195
195
|
type: s,
|
|
196
196
|
ref: $,
|
|
197
197
|
"aria-disabled": h["aria-disabled"] || i || t,
|
|
198
|
-
onClick:
|
|
198
|
+
onClick: B,
|
|
199
199
|
...h,
|
|
200
200
|
children: [
|
|
201
201
|
t && /* @__PURE__ */ o(W, { size: _ === j.LG ? "xs" : "xxs", variant: Z() }),
|
|
@@ -204,7 +204,7 @@ const K = /* @__PURE__ */ X(Y), f = {
|
|
|
204
204
|
]
|
|
205
205
|
}
|
|
206
206
|
);
|
|
207
|
-
}, T = R(
|
|
207
|
+
}, T = R(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;
|
|
@@ -292,7 +292,7 @@ const tr = /* @__PURE__ */ Q(rr), A = {
|
|
|
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 D = { exports: {} };
|
|
296
296
|
/*!
|
|
297
297
|
Copyright (c) 2018 Jed Watson.
|
|
298
298
|
Licensed under the MIT License (MIT), see
|
|
@@ -327,8 +327,8 @@ var C = { exports: {} };
|
|
|
327
327
|
}
|
|
328
328
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
329
329
|
})();
|
|
330
|
-
})(
|
|
331
|
-
var ur =
|
|
330
|
+
})(D);
|
|
331
|
+
var ur = D.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",
|
|
@@ -362,7 +362,7 @@ const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
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), L = "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(), I = ({
|
|
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, L, `${L}--${p}`);
|
|
385
385
|
return /* @__PURE__ */ o(
|
|
386
386
|
"span",
|
|
387
387
|
{
|
|
@@ -396,7 +396,7 @@ const ir = /* @__PURE__ */ ar(ur), pr = {
|
|
|
396
396
|
function yr(e) {
|
|
397
397
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
398
398
|
}
|
|
399
|
-
var
|
|
399
|
+
var C = { exports: {} };
|
|
400
400
|
/*!
|
|
401
401
|
Copyright (c) 2018 Jed Watson.
|
|
402
402
|
Licensed under the MIT License (MIT), see
|
|
@@ -431,9 +431,9 @@ var D = { exports: {} };
|
|
|
431
431
|
}
|
|
432
432
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
433
433
|
})();
|
|
434
|
-
})(
|
|
435
|
-
var
|
|
436
|
-
const
|
|
434
|
+
})(C);
|
|
435
|
+
var br = C.exports;
|
|
436
|
+
const mr = /* @__PURE__ */ yr(br), w = {
|
|
437
437
|
"purpur-paragraph": "_purpur-paragraph_hwaj6_1",
|
|
438
438
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_hwaj6_7",
|
|
439
439
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_hwaj6_10",
|
|
@@ -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 = mr([
|
|
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 G = { exports: {} };
|
|
485
485
|
/*!
|
|
486
486
|
Copyright (c) 2018 Jed Watson.
|
|
487
487
|
Licensed under the MIT License (MIT), see
|
|
@@ -516,8 +516,8 @@ var B = { exports: {} };
|
|
|
516
516
|
}
|
|
517
517
|
e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
|
|
518
518
|
})();
|
|
519
|
-
})(
|
|
520
|
-
var Sr =
|
|
519
|
+
})(G);
|
|
520
|
+
var Sr = G.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",
|
|
@@ -589,7 +589,7 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
589
589
|
/* @__PURE__ */ v("div", { className: l[`${c}__top`], children: [
|
|
590
590
|
/* @__PURE__ */ v("div", { className: l[`${c}__header`], children: [
|
|
591
591
|
/* @__PURE__ */ o(
|
|
592
|
-
|
|
592
|
+
I,
|
|
593
593
|
{
|
|
594
594
|
"data-testid": e ? `${e}-icon` : void 0,
|
|
595
595
|
className: l[`${c}__icon`],
|
|
@@ -621,7 +621,7 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
621
621
|
"aria-label": p,
|
|
622
622
|
onClick: h,
|
|
623
623
|
className: l[`${c}__close-button`],
|
|
624
|
-
children: /* @__PURE__ */ o(
|
|
624
|
+
children: /* @__PURE__ */ o(I, { svg: lr, size: "sm" })
|
|
625
625
|
}
|
|
626
626
|
)
|
|
627
627
|
] }),
|
|
@@ -643,13 +643,13 @@ const Ar = /* @__PURE__ */ $r(Sr), l = {
|
|
|
643
643
|
)
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
|
-
),
|
|
647
|
-
|
|
646
|
+
), Lr = R(Er);
|
|
647
|
+
Lr.displayName = "Notification";
|
|
648
648
|
export {
|
|
649
649
|
Or as NOTIFICATION_ARIA_LIVE,
|
|
650
650
|
Nr as NOTIFICATION_ROLE,
|
|
651
651
|
y as NOTIFICATION_STATUS,
|
|
652
|
-
|
|
652
|
+
Lr as Notification,
|
|
653
653
|
Pr as notificationAriaLiveValues,
|
|
654
654
|
Tr as notificationRoles,
|
|
655
655
|
Mr as notificationStatuses
|