@purpurds/notification 4.6.0 → 5.1.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 +187 -191
- package/dist/notification.es.js.map +1 -1
- package/package.json +6 -6
package/dist/notification.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as w, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as L } from "react";
|
|
3
|
-
const
|
|
3
|
+
const j = {
|
|
4
4
|
SM: "sm",
|
|
5
5
|
MD: "md",
|
|
6
6
|
LG: "lg"
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function B(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
|
|
@@ -20,11 +20,11 @@ var M = { exports: {} };
|
|
|
20
20
|
function u() {
|
|
21
21
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
22
22
|
var n = arguments[t];
|
|
23
|
-
n && (r =
|
|
23
|
+
n && (r = i(r, a(n)));
|
|
24
24
|
}
|
|
25
25
|
return r;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function a(r) {
|
|
28
28
|
if (typeof r == "string" || typeof r == "number")
|
|
29
29
|
return r;
|
|
30
30
|
if (typeof r != "object")
|
|
@@ -35,58 +35,53 @@ var M = { exports: {} };
|
|
|
35
35
|
return r.toString();
|
|
36
36
|
var t = "";
|
|
37
37
|
for (var n in r)
|
|
38
|
-
p.call(r, n) && r[n] && (t =
|
|
38
|
+
p.call(r, n) && r[n] && (t = i(t, n));
|
|
39
39
|
return t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function i(r, t) {
|
|
42
42
|
return t ? r ? r + " " + t : r + t : r;
|
|
43
43
|
}
|
|
44
44
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
45
45
|
})();
|
|
46
|
-
})(
|
|
47
|
-
var
|
|
48
|
-
const
|
|
49
|
-
"purpur-spinner": "_purpur-
|
|
50
|
-
rotate:
|
|
51
|
-
"purpur-spinner--xxs": "_purpur-spinner--
|
|
52
|
-
"purpur-spinner--xs": "_purpur-spinner--
|
|
53
|
-
"purpur-spinner--sm": "_purpur-spinner--
|
|
54
|
-
"purpur-spinner--md": "_purpur-spinner--
|
|
55
|
-
"purpur-spinner--lg": "_purpur-spinner--
|
|
56
|
-
"purpur-spinner__circle": "_purpur-
|
|
46
|
+
})(R);
|
|
47
|
+
var Z = R.exports;
|
|
48
|
+
const q = /* @__PURE__ */ B(Z), V = "_rotate_1xozj_1", H = "_dash_1xozj_1", v = {
|
|
49
|
+
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
50
|
+
rotate: V,
|
|
51
|
+
"purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
|
|
52
|
+
"purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
|
|
53
|
+
"purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
|
|
54
|
+
"purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
|
|
55
|
+
"purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
|
|
56
|
+
"purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
|
|
57
57
|
dash: H,
|
|
58
|
-
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--
|
|
59
|
-
"purpur-spinner__circle--negative": "_purpur-spinner__circle--
|
|
60
|
-
|
|
61
|
-
}, x = "purpur-spinner", F = {
|
|
62
|
-
PRIMARY: "primary",
|
|
63
|
-
DISABLED: "disabled",
|
|
64
|
-
NEGATIVE: "negative",
|
|
65
|
-
NEGATIVE_DISABLED: "negative-disabled"
|
|
66
|
-
}, U = {
|
|
58
|
+
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
|
|
59
|
+
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
|
|
60
|
+
}, y = "purpur-spinner", F = {
|
|
67
61
|
XXS: "xxs",
|
|
68
62
|
XS: "xs",
|
|
69
63
|
SM: "sm",
|
|
70
64
|
MD: "md",
|
|
71
65
|
LG: "lg"
|
|
72
|
-
},
|
|
66
|
+
}, U = ({
|
|
73
67
|
["data-testid"]: e,
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
disabled: p = !1,
|
|
69
|
+
negative: u = !1,
|
|
70
|
+
size: a = F.SM,
|
|
76
71
|
...i
|
|
77
|
-
}) => /* @__PURE__ */
|
|
72
|
+
}) => /* @__PURE__ */ s(
|
|
78
73
|
"div",
|
|
79
74
|
{
|
|
80
|
-
className:
|
|
75
|
+
className: q([v[y], v[`${y}--${a}`]]),
|
|
81
76
|
"data-testid": e,
|
|
82
77
|
...i,
|
|
83
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ s("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ s(
|
|
84
79
|
"circle",
|
|
85
80
|
{
|
|
86
|
-
className:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
),
|
|
81
|
+
className: q(v[`${y}__circle`], {
|
|
82
|
+
[v[`${y}__circle--disabled`]]: p,
|
|
83
|
+
[v[`${y}__circle--negative`]]: u
|
|
84
|
+
}),
|
|
90
85
|
cx: "25",
|
|
91
86
|
cy: "25",
|
|
92
87
|
r: "20"
|
|
@@ -94,10 +89,10 @@ const I = /* @__PURE__ */ Z(V), z = "_rotate_7s2g1_1", H = "_dash_7s2g1_1", w =
|
|
|
94
89
|
) })
|
|
95
90
|
}
|
|
96
91
|
);
|
|
97
|
-
function
|
|
92
|
+
function X(e) {
|
|
98
93
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
99
94
|
}
|
|
100
|
-
var
|
|
95
|
+
var M = { exports: {} };
|
|
101
96
|
/*!
|
|
102
97
|
Copyright (c) 2018 Jed Watson.
|
|
103
98
|
Licensed under the MIT License (MIT), see
|
|
@@ -109,11 +104,11 @@ var P = { exports: {} };
|
|
|
109
104
|
function u() {
|
|
110
105
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
111
106
|
var n = arguments[t];
|
|
112
|
-
n && (r =
|
|
107
|
+
n && (r = i(r, a(n)));
|
|
113
108
|
}
|
|
114
109
|
return r;
|
|
115
110
|
}
|
|
116
|
-
function
|
|
111
|
+
function a(r) {
|
|
117
112
|
if (typeof r == "string" || typeof r == "number")
|
|
118
113
|
return r;
|
|
119
114
|
if (typeof r != "object")
|
|
@@ -124,17 +119,17 @@ var P = { exports: {} };
|
|
|
124
119
|
return r.toString();
|
|
125
120
|
var t = "";
|
|
126
121
|
for (var n in r)
|
|
127
|
-
p.call(r, n) && r[n] && (t =
|
|
122
|
+
p.call(r, n) && r[n] && (t = i(t, n));
|
|
128
123
|
return t;
|
|
129
124
|
}
|
|
130
|
-
function
|
|
125
|
+
function i(r, t) {
|
|
131
126
|
return t ? r ? r + " " + t : r + t : r;
|
|
132
127
|
}
|
|
133
128
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
134
129
|
})();
|
|
135
|
-
})(
|
|
136
|
-
var
|
|
137
|
-
const
|
|
130
|
+
})(M);
|
|
131
|
+
var W = M.exports;
|
|
132
|
+
const Y = /* @__PURE__ */ X(W), g = {
|
|
138
133
|
"purpur-button": "_purpur-button_u2yv5_1",
|
|
139
134
|
"purpur-button--sm": "_purpur-button--sm_u2yv5_33",
|
|
140
135
|
"purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
|
|
@@ -155,61 +150,62 @@ const J = /* @__PURE__ */ Y(X), g = {
|
|
|
155
150
|
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
|
|
156
151
|
"purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
|
|
157
152
|
"purpur-button--text": "_purpur-button--text_u2yv5_175"
|
|
158
|
-
}, f = "purpur-button",
|
|
153
|
+
}, f = "purpur-button", J = ({
|
|
159
154
|
children: e,
|
|
160
155
|
className: p,
|
|
161
156
|
["data-testid"]: u,
|
|
162
|
-
disabled:
|
|
163
|
-
fullWidth:
|
|
157
|
+
disabled: a = !1,
|
|
158
|
+
fullWidth: i = !1,
|
|
164
159
|
iconOnly: r,
|
|
165
160
|
loading: t = !1,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
161
|
+
negative: n = !1,
|
|
162
|
+
onClick: c,
|
|
163
|
+
size: d = j.MD,
|
|
164
|
+
variant: o,
|
|
165
|
+
type: h = "button",
|
|
166
|
+
...$
|
|
167
|
+
}, A) => {
|
|
168
|
+
if (r && o === "destructive")
|
|
173
169
|
return null;
|
|
174
|
-
const
|
|
170
|
+
const D = Y(
|
|
175
171
|
[
|
|
176
172
|
g[f],
|
|
177
|
-
g[`${f}--${
|
|
178
|
-
g[`${f}--${
|
|
173
|
+
g[`${f}--${n ? `${o}-negative` : o}`],
|
|
174
|
+
g[`${f}--${d}`]
|
|
179
175
|
],
|
|
180
176
|
{
|
|
181
177
|
[g[`${f}--icon-only`]]: r,
|
|
182
|
-
[g[`${f}--negative`]]:
|
|
183
|
-
[g[`${f}--full-width`]]:
|
|
184
|
-
[g[`${f}--disabled`]]:
|
|
178
|
+
[g[`${f}--negative`]]: n,
|
|
179
|
+
[g[`${f}--full-width`]]: i,
|
|
180
|
+
[g[`${f}--disabled`]]: a || t
|
|
185
181
|
},
|
|
186
182
|
p
|
|
187
183
|
), G = (N) => {
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
return /* @__PURE__ */
|
|
184
|
+
a || t ? N.preventDefault() : c && c(N);
|
|
185
|
+
};
|
|
186
|
+
return /* @__PURE__ */ w(
|
|
191
187
|
"button",
|
|
192
188
|
{
|
|
193
|
-
className:
|
|
189
|
+
className: D,
|
|
194
190
|
"data-testid": u,
|
|
195
|
-
type:
|
|
196
|
-
ref:
|
|
197
|
-
"aria-disabled":
|
|
191
|
+
type: h,
|
|
192
|
+
ref: A,
|
|
193
|
+
"aria-disabled": $["aria-disabled"] || a || t,
|
|
198
194
|
onClick: G,
|
|
199
|
-
|
|
195
|
+
...$,
|
|
200
196
|
children: [
|
|
201
|
-
t && /* @__PURE__ */
|
|
197
|
+
t && /* @__PURE__ */ s(U, { size: d === j.LG ? "xs" : "xxs", negative: n, disabled: a }),
|
|
202
198
|
" ",
|
|
203
199
|
e
|
|
204
200
|
]
|
|
205
201
|
}
|
|
206
202
|
);
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
function
|
|
203
|
+
}, P = L(J);
|
|
204
|
+
P.displayName = "Button";
|
|
205
|
+
function K(e) {
|
|
210
206
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
211
207
|
}
|
|
212
|
-
var
|
|
208
|
+
var k = { exports: {} };
|
|
213
209
|
/*!
|
|
214
210
|
Copyright (c) 2018 Jed Watson.
|
|
215
211
|
Licensed under the MIT License (MIT), see
|
|
@@ -221,11 +217,11 @@ var T = { exports: {} };
|
|
|
221
217
|
function u() {
|
|
222
218
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
223
219
|
var n = arguments[t];
|
|
224
|
-
n && (r =
|
|
220
|
+
n && (r = i(r, a(n)));
|
|
225
221
|
}
|
|
226
222
|
return r;
|
|
227
223
|
}
|
|
228
|
-
function
|
|
224
|
+
function a(r) {
|
|
229
225
|
if (typeof r == "string" || typeof r == "number")
|
|
230
226
|
return r;
|
|
231
227
|
if (typeof r != "object")
|
|
@@ -236,17 +232,17 @@ var T = { exports: {} };
|
|
|
236
232
|
return r.toString();
|
|
237
233
|
var t = "";
|
|
238
234
|
for (var n in r)
|
|
239
|
-
p.call(r, n) && r[n] && (t =
|
|
235
|
+
p.call(r, n) && r[n] && (t = i(t, n));
|
|
240
236
|
return t;
|
|
241
237
|
}
|
|
242
|
-
function
|
|
238
|
+
function i(r, t) {
|
|
243
239
|
return t ? r ? r + " " + t : r + t : r;
|
|
244
240
|
}
|
|
245
241
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
246
242
|
})();
|
|
247
|
-
})(
|
|
248
|
-
var
|
|
249
|
-
const
|
|
243
|
+
})(k);
|
|
244
|
+
var Q = k.exports;
|
|
245
|
+
const rr = /* @__PURE__ */ K(Q), S = {
|
|
250
246
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
251
247
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
252
248
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -262,7 +258,7 @@ const tr = /* @__PURE__ */ Q(rr), $ = {
|
|
|
262
258
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
263
259
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
264
260
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
265
|
-
},
|
|
261
|
+
}, tr = {
|
|
266
262
|
TITLE100: "title-100",
|
|
267
263
|
TITLE200: "title-200",
|
|
268
264
|
TITLE300: "title-300",
|
|
@@ -271,31 +267,31 @@ const tr = /* @__PURE__ */ Q(rr), $ = {
|
|
|
271
267
|
TITLE600: "title-600",
|
|
272
268
|
TITLE700: "title-700",
|
|
273
269
|
SUBSECTION100: "subsection-100"
|
|
274
|
-
},
|
|
270
|
+
}, O = "purpur-heading", er = ({
|
|
275
271
|
["data-testid"]: e,
|
|
276
272
|
children: p,
|
|
277
273
|
className: u = "",
|
|
278
|
-
enableHyphenation:
|
|
279
|
-
negative:
|
|
274
|
+
enableHyphenation: a = !1,
|
|
275
|
+
negative: i = !1,
|
|
280
276
|
tag: r,
|
|
281
|
-
variant: t =
|
|
277
|
+
variant: t = tr.TITLE100,
|
|
282
278
|
...n
|
|
283
279
|
}) => {
|
|
284
|
-
const c = r, d =
|
|
280
|
+
const c = r, d = rr([
|
|
285
281
|
u,
|
|
286
|
-
|
|
287
|
-
|
|
282
|
+
S[O],
|
|
283
|
+
S[`${O}--${t}`],
|
|
288
284
|
{
|
|
289
|
-
[
|
|
290
|
-
[
|
|
285
|
+
[S[`${O}--hyphens`]]: a,
|
|
286
|
+
[S[`${O}--negative`]]: i
|
|
291
287
|
}
|
|
292
288
|
]);
|
|
293
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ s(c, { ...n, className: d, "data-testid": e, children: p });
|
|
294
290
|
};
|
|
295
|
-
function
|
|
291
|
+
function nr(e) {
|
|
296
292
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
297
293
|
}
|
|
298
|
-
var
|
|
294
|
+
var T = { exports: {} };
|
|
299
295
|
/*!
|
|
300
296
|
Copyright (c) 2018 Jed Watson.
|
|
301
297
|
Licensed under the MIT License (MIT), see
|
|
@@ -307,11 +303,11 @@ var k = { exports: {} };
|
|
|
307
303
|
function u() {
|
|
308
304
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
309
305
|
var n = arguments[t];
|
|
310
|
-
n && (r =
|
|
306
|
+
n && (r = i(r, a.call(this, n)));
|
|
311
307
|
}
|
|
312
308
|
return r;
|
|
313
309
|
}
|
|
314
|
-
function
|
|
310
|
+
function a(r) {
|
|
315
311
|
if (typeof r == "string" || typeof r == "number")
|
|
316
312
|
return this && this[r] || r;
|
|
317
313
|
if (typeof r != "object")
|
|
@@ -322,17 +318,17 @@ var k = { exports: {} };
|
|
|
322
318
|
return r.toString();
|
|
323
319
|
var t = "";
|
|
324
320
|
for (var n in r)
|
|
325
|
-
p.call(r, n) && r[n] && (t =
|
|
321
|
+
p.call(r, n) && r[n] && (t = i(t, this && this[n] || n));
|
|
326
322
|
return t;
|
|
327
323
|
}
|
|
328
|
-
function
|
|
324
|
+
function i(r, t) {
|
|
329
325
|
return t ? r ? r + " " + t : r + t : r;
|
|
330
326
|
}
|
|
331
327
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
332
328
|
})();
|
|
333
|
-
})(
|
|
334
|
-
var
|
|
335
|
-
const
|
|
329
|
+
})(T);
|
|
330
|
+
var ur = T.exports;
|
|
331
|
+
const pr = /* @__PURE__ */ nr(ur), ir = {
|
|
336
332
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
337
333
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
338
334
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -340,52 +336,52 @@ const ir = /* @__PURE__ */ ur(pr), ar = {
|
|
|
340
336
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
341
337
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
342
338
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
343
|
-
},
|
|
339
|
+
}, ar = {
|
|
344
340
|
name: "alert-filled",
|
|
345
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>',
|
|
346
342
|
keywords: ["alert-filled"],
|
|
347
343
|
category: "status"
|
|
348
|
-
},
|
|
344
|
+
}, or = {
|
|
349
345
|
name: "check-circle-filled",
|
|
350
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>',
|
|
351
347
|
keywords: ["check-circle-filled"],
|
|
352
348
|
category: "status"
|
|
353
|
-
},
|
|
349
|
+
}, sr = {
|
|
354
350
|
name: "close",
|
|
355
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>',
|
|
356
352
|
keywords: ["close"],
|
|
357
353
|
category: "utility"
|
|
358
|
-
},
|
|
354
|
+
}, lr = {
|
|
359
355
|
name: "error-filled",
|
|
360
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>',
|
|
361
357
|
keywords: ["error-filled"],
|
|
362
358
|
category: "status"
|
|
363
|
-
},
|
|
359
|
+
}, _r = {
|
|
364
360
|
name: "info-filled",
|
|
365
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>',
|
|
366
362
|
keywords: ["info-filled"],
|
|
367
363
|
category: "status"
|
|
368
|
-
},
|
|
364
|
+
}, cr = pr.bind(ir), E = "purpur-icon", dr = "md", gr = (e) => e.filter((p) => Object.keys(p).length >= 1).map((p) => `${p.name}="${p.value}"`).join(" "), fr = ({ content: e = "", title: p } = {}) => {
|
|
369
365
|
const u = [
|
|
370
366
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
371
367
|
{ name: "fill", value: "currentColor" },
|
|
372
368
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
373
369
|
p ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
374
|
-
],
|
|
375
|
-
return `<svg ${
|
|
376
|
-
},
|
|
370
|
+
], a = p ? `<title>${p}</title>` : "";
|
|
371
|
+
return `<svg ${gr(u)}>${a}${e}</svg>`;
|
|
372
|
+
}, hr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), I = ({
|
|
377
373
|
["data-testid"]: e,
|
|
378
374
|
svg: p,
|
|
379
375
|
allyTitle: u,
|
|
380
|
-
className:
|
|
381
|
-
size:
|
|
376
|
+
className: a = "",
|
|
377
|
+
size: i = dr,
|
|
382
378
|
...r
|
|
383
379
|
}) => {
|
|
384
|
-
const t =
|
|
385
|
-
content:
|
|
380
|
+
const t = fr({
|
|
381
|
+
content: hr(p.svg),
|
|
386
382
|
title: u
|
|
387
|
-
}), n =
|
|
388
|
-
return /* @__PURE__ */
|
|
383
|
+
}), n = cr(a, E, `${E}--${i}`);
|
|
384
|
+
return /* @__PURE__ */ s(
|
|
389
385
|
"span",
|
|
390
386
|
{
|
|
391
387
|
"aria-label": u,
|
|
@@ -396,10 +392,10 @@ const ir = /* @__PURE__ */ ur(pr), ar = {
|
|
|
396
392
|
}
|
|
397
393
|
);
|
|
398
394
|
};
|
|
399
|
-
function
|
|
395
|
+
function vr(e) {
|
|
400
396
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
401
397
|
}
|
|
402
|
-
var
|
|
398
|
+
var z = { exports: {} };
|
|
403
399
|
/*!
|
|
404
400
|
Copyright (c) 2018 Jed Watson.
|
|
405
401
|
Licensed under the MIT License (MIT), see
|
|
@@ -411,11 +407,11 @@ var D = { exports: {} };
|
|
|
411
407
|
function u() {
|
|
412
408
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
413
409
|
var n = arguments[t];
|
|
414
|
-
n && (r =
|
|
410
|
+
n && (r = i(r, a(n)));
|
|
415
411
|
}
|
|
416
412
|
return r;
|
|
417
413
|
}
|
|
418
|
-
function
|
|
414
|
+
function a(r) {
|
|
419
415
|
if (typeof r == "string" || typeof r == "number")
|
|
420
416
|
return r;
|
|
421
417
|
if (typeof r != "object")
|
|
@@ -426,17 +422,17 @@ var D = { exports: {} };
|
|
|
426
422
|
return r.toString();
|
|
427
423
|
var t = "";
|
|
428
424
|
for (var n in r)
|
|
429
|
-
p.call(r, n) && r[n] && (t =
|
|
425
|
+
p.call(r, n) && r[n] && (t = i(t, n));
|
|
430
426
|
return t;
|
|
431
427
|
}
|
|
432
|
-
function
|
|
428
|
+
function i(r, t) {
|
|
433
429
|
return t ? r ? r + " " + t : r + t : r;
|
|
434
430
|
}
|
|
435
431
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
436
432
|
})();
|
|
437
|
-
})(
|
|
438
|
-
var
|
|
439
|
-
const
|
|
433
|
+
})(z);
|
|
434
|
+
var yr = z.exports;
|
|
435
|
+
const mr = /* @__PURE__ */ vr(yr), m = {
|
|
440
436
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
441
437
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
442
438
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -451,7 +447,7 @@ const br = /* @__PURE__ */ yr(mr), v = {
|
|
|
451
447
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
452
448
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
453
449
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
454
|
-
},
|
|
450
|
+
}, br = {
|
|
455
451
|
PARAGRAPH100: "paragraph-100",
|
|
456
452
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
457
453
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -462,29 +458,29 @@ const br = /* @__PURE__ */ yr(mr), v = {
|
|
|
462
458
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
463
459
|
OVERLINE100: "overline-100",
|
|
464
460
|
OVERLINE200: "overline-200"
|
|
465
|
-
},
|
|
461
|
+
}, b = "purpur-paragraph", wr = ({
|
|
466
462
|
["data-testid"]: e,
|
|
467
463
|
children: p,
|
|
468
464
|
className: u = "",
|
|
469
|
-
disabled:
|
|
470
|
-
enableHyphenation:
|
|
465
|
+
disabled: a,
|
|
466
|
+
enableHyphenation: i = !1,
|
|
471
467
|
negative: r = !1,
|
|
472
|
-
variant: t =
|
|
468
|
+
variant: t = br.PARAGRAPH100,
|
|
473
469
|
...n
|
|
474
470
|
}) => {
|
|
475
|
-
const c =
|
|
471
|
+
const c = mr([
|
|
476
472
|
u,
|
|
477
|
-
|
|
478
|
-
|
|
473
|
+
m[b],
|
|
474
|
+
m[`${b}--${t}`],
|
|
479
475
|
{
|
|
480
|
-
[
|
|
481
|
-
[
|
|
482
|
-
[
|
|
476
|
+
[m[`${b}--hyphens`]]: i,
|
|
477
|
+
[m[`${b}--disabled`]]: a,
|
|
478
|
+
[m[`${b}--negative`]]: r
|
|
483
479
|
}
|
|
484
480
|
]);
|
|
485
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ s("p", { ...n, className: c, "data-testid": e, children: p });
|
|
486
482
|
};
|
|
487
|
-
function
|
|
483
|
+
function xr(e) {
|
|
488
484
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
489
485
|
}
|
|
490
486
|
var C = { exports: {} };
|
|
@@ -499,11 +495,11 @@ var C = { exports: {} };
|
|
|
499
495
|
function u() {
|
|
500
496
|
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
501
497
|
var n = arguments[t];
|
|
502
|
-
n && (r =
|
|
498
|
+
n && (r = i(r, a(n)));
|
|
503
499
|
}
|
|
504
500
|
return r;
|
|
505
501
|
}
|
|
506
|
-
function
|
|
502
|
+
function a(r) {
|
|
507
503
|
if (typeof r == "string" || typeof r == "number")
|
|
508
504
|
return r;
|
|
509
505
|
if (typeof r != "object")
|
|
@@ -514,17 +510,17 @@ var C = { exports: {} };
|
|
|
514
510
|
return r.toString();
|
|
515
511
|
var t = "";
|
|
516
512
|
for (var n in r)
|
|
517
|
-
p.call(r, n) && r[n] && (t =
|
|
513
|
+
p.call(r, n) && r[n] && (t = i(t, n));
|
|
518
514
|
return t;
|
|
519
515
|
}
|
|
520
|
-
function
|
|
516
|
+
function i(r, t) {
|
|
521
517
|
return t ? r ? r + " " + t : r + t : r;
|
|
522
518
|
}
|
|
523
519
|
e.exports ? (u.default = u, e.exports = u) : window.classNames = u;
|
|
524
520
|
})();
|
|
525
521
|
})(C);
|
|
526
|
-
var
|
|
527
|
-
const Sr = /* @__PURE__ */ $r
|
|
522
|
+
var $r = C.exports;
|
|
523
|
+
const Sr = /* @__PURE__ */ xr($r), l = {
|
|
528
524
|
"purpur-notification": "_purpur-notification_10qwf_1",
|
|
529
525
|
"purpur-notification__top": "_purpur-notification__top_10qwf_14",
|
|
530
526
|
"purpur-notification__header": "_purpur-notification__header_10qwf_20",
|
|
@@ -538,107 +534,107 @@ const Sr = /* @__PURE__ */ $r(Ar), l = {
|
|
|
538
534
|
"purpur-notification--info": "_purpur-notification--info_10qwf_63",
|
|
539
535
|
"purpur-notification--hidden": "_purpur-notification--hidden_10qwf_72",
|
|
540
536
|
"purpur-notification--has-close-button": "_purpur-notification--has-close-button_10qwf_76"
|
|
541
|
-
},
|
|
537
|
+
}, x = {
|
|
542
538
|
SUCCESS: "success",
|
|
543
539
|
WARNING: "warning",
|
|
544
540
|
ERROR: "error",
|
|
545
541
|
INFO: "info"
|
|
546
|
-
},
|
|
542
|
+
}, Lr = Object.values(x), Or = {
|
|
547
543
|
POLITE: "polite",
|
|
548
544
|
ASSERTIVE: "assertive"
|
|
549
|
-
},
|
|
545
|
+
}, Rr = Object.values(Or), Ar = {
|
|
550
546
|
ALERT: "alert",
|
|
551
547
|
DIALOG: "dialog",
|
|
552
548
|
ALERTDIALOG: "alertdialog"
|
|
553
|
-
},
|
|
549
|
+
}, Mr = Object.values(Ar), _ = "purpur-notification", Nr = (e) => {
|
|
554
550
|
switch (e) {
|
|
555
|
-
case
|
|
556
|
-
return cr;
|
|
557
|
-
case b.SUCCESS:
|
|
558
|
-
return sr;
|
|
559
|
-
case b.WARNING:
|
|
560
|
-
return or;
|
|
561
|
-
case b.ERROR:
|
|
551
|
+
case x.INFO:
|
|
562
552
|
return _r;
|
|
553
|
+
case x.SUCCESS:
|
|
554
|
+
return or;
|
|
555
|
+
case x.WARNING:
|
|
556
|
+
return ar;
|
|
557
|
+
case x.ERROR:
|
|
558
|
+
return lr;
|
|
563
559
|
}
|
|
564
|
-
},
|
|
560
|
+
}, jr = ({
|
|
565
561
|
["data-testid"]: e,
|
|
566
562
|
["aria-live"]: p,
|
|
567
563
|
children: u,
|
|
568
|
-
className:
|
|
569
|
-
closeButtonAllyLabel:
|
|
564
|
+
className: a,
|
|
565
|
+
closeButtonAllyLabel: i,
|
|
570
566
|
headingTag: r = "h4",
|
|
571
567
|
role: t,
|
|
572
568
|
status: n = "info",
|
|
573
569
|
heading: c,
|
|
574
570
|
hidden: d,
|
|
575
|
-
id:
|
|
571
|
+
id: o,
|
|
576
572
|
onClose: h,
|
|
577
|
-
|
|
578
|
-
},
|
|
573
|
+
...$
|
|
574
|
+
}, A) => /* @__PURE__ */ w(
|
|
579
575
|
"div",
|
|
580
576
|
{
|
|
581
|
-
id:
|
|
582
|
-
"aria-labelledby":
|
|
583
|
-
"aria-describedby":
|
|
577
|
+
id: o,
|
|
578
|
+
"aria-labelledby": o ? `${o}-heading` : void 0,
|
|
579
|
+
"aria-describedby": o ? `${o}-body` : void 0,
|
|
584
580
|
"aria-live": p,
|
|
585
581
|
"aria-hidden": !!d,
|
|
586
|
-
className: Sr(
|
|
582
|
+
className: Sr(a, l[_], l[`${_}--${n}`], {
|
|
587
583
|
[l[`${_}--hidden`]]: d,
|
|
588
584
|
[l[`${_}--has-close-button`]]: !!h
|
|
589
585
|
}),
|
|
590
586
|
"data-testid": e,
|
|
591
|
-
ref:
|
|
587
|
+
ref: A,
|
|
592
588
|
role: t,
|
|
593
|
-
|
|
589
|
+
...$,
|
|
594
590
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
|
|
591
|
+
/* @__PURE__ */ w("div", { className: l[`${_}__top`], children: [
|
|
592
|
+
/* @__PURE__ */ w("div", { className: l[`${_}__header`], children: [
|
|
593
|
+
/* @__PURE__ */ s(
|
|
594
|
+
I,
|
|
599
595
|
{
|
|
600
596
|
"data-testid": e ? `${e}-icon` : void 0,
|
|
601
597
|
className: l[`${_}__icon`],
|
|
602
|
-
svg:
|
|
598
|
+
svg: Nr(n),
|
|
603
599
|
size: "md"
|
|
604
600
|
}
|
|
605
601
|
),
|
|
606
|
-
!!c && /* @__PURE__ */
|
|
607
|
-
|
|
602
|
+
!!c && /* @__PURE__ */ s(
|
|
603
|
+
er,
|
|
608
604
|
{
|
|
609
605
|
"data-testid": e ? `${e}-heading` : void 0,
|
|
610
606
|
variant: "subsection-100",
|
|
611
607
|
tag: r,
|
|
612
608
|
className: l[`${_}__heading`],
|
|
613
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ w("span", { id: o ? `${o}-heading` : void 0, children: [
|
|
614
610
|
" ",
|
|
615
611
|
c
|
|
616
612
|
] })
|
|
617
613
|
}
|
|
618
614
|
)
|
|
619
615
|
] }),
|
|
620
|
-
h && /* @__PURE__ */
|
|
621
|
-
|
|
616
|
+
h && /* @__PURE__ */ s(
|
|
617
|
+
P,
|
|
622
618
|
{
|
|
623
619
|
"data-testid": e ? `${e}-close-button` : void 0,
|
|
624
620
|
variant: "tertiary-purple",
|
|
625
621
|
size: "sm",
|
|
626
622
|
iconOnly: !0,
|
|
627
|
-
"aria-label":
|
|
623
|
+
"aria-label": i,
|
|
628
624
|
onClick: h,
|
|
629
625
|
className: l[`${_}__close-button`],
|
|
630
|
-
children: /* @__PURE__ */
|
|
626
|
+
children: /* @__PURE__ */ s(I, { svg: sr, size: "sm" })
|
|
631
627
|
}
|
|
632
628
|
)
|
|
633
629
|
] }),
|
|
634
|
-
u && /* @__PURE__ */
|
|
630
|
+
u && /* @__PURE__ */ s(
|
|
635
631
|
"div",
|
|
636
632
|
{
|
|
637
633
|
"data-testid": e ? `${e}-body` : void 0,
|
|
638
634
|
className: l[`${_}__body`],
|
|
639
|
-
id:
|
|
640
|
-
children: typeof u == "string" ? /* @__PURE__ */
|
|
641
|
-
|
|
635
|
+
id: o ? `${o}-body` : void 0,
|
|
636
|
+
children: typeof u == "string" ? /* @__PURE__ */ s(
|
|
637
|
+
wr,
|
|
642
638
|
{
|
|
643
639
|
"data-testid": e ? `${e}-paragraph` : void 0,
|
|
644
640
|
variant: "paragraph-100",
|
|
@@ -649,15 +645,15 @@ const Sr = /* @__PURE__ */ $r(Ar), l = {
|
|
|
649
645
|
)
|
|
650
646
|
]
|
|
651
647
|
}
|
|
652
|
-
), qr = L(
|
|
648
|
+
), qr = L(jr);
|
|
653
649
|
qr.displayName = "Notification";
|
|
654
650
|
export {
|
|
655
651
|
Or as NOTIFICATION_ARIA_LIVE,
|
|
656
|
-
|
|
657
|
-
|
|
652
|
+
Ar as NOTIFICATION_ROLE,
|
|
653
|
+
x as NOTIFICATION_STATUS,
|
|
658
654
|
qr as Notification,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
655
|
+
Rr as notificationAriaLiveValues,
|
|
656
|
+
Mr as notificationRoles,
|
|
657
|
+
Lr as notificationStatuses
|
|
662
658
|
};
|
|
663
659
|
//# sourceMappingURL=notification.es.js.map
|