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