@purpurds/notification-banner 0.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 +59 -0
- package/dist/notification-banner.cjs.js +26 -0
- package/dist/notification-banner.cjs.js.map +1 -0
- package/dist/notification-banner.d.ts +27 -0
- package/dist/notification-banner.d.ts.map +1 -0
- package/dist/notification-banner.es.js +646 -0
- package/dist/notification-banner.es.js.map +1 -0
- package/dist/styles.css +1 -0
- package/package.json +63 -0
- package/readme.mdx +66 -0
- package/src/global.d.ts +4 -0
- package/src/notification-banner.module.scss +34 -0
- package/src/notification-banner.stories.tsx +60 -0
- package/src/notification-banner.test.tsx +16 -0
- package/src/notification-banner.tsx +105 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HeadingTagType } from '@purpurds/heading';
|
|
2
|
+
import { default as React, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type DefaultProps = {
|
|
5
|
+
["data-testid"]?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
closeButtonAllyLabel?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
hideIcon?: boolean;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
link?: ReactNode;
|
|
13
|
+
titleTag?: HeadingTagType;
|
|
14
|
+
title?: string;
|
|
15
|
+
};
|
|
16
|
+
type CloseButtonProps = {
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
closeButtonAllyLabel: string;
|
|
19
|
+
};
|
|
20
|
+
type NoCloseButtonProps = {
|
|
21
|
+
onClose?: never;
|
|
22
|
+
closeButtonAllyLabel?: never;
|
|
23
|
+
};
|
|
24
|
+
export type NotificationBannerProps = DefaultProps & (CloseButtonProps | NoCloseButtonProps);
|
|
25
|
+
export declare const NotificationBanner: React.ForwardRefExoticComponent<NotificationBannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=notification-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-banner.d.ts","sourceRoot":"","sources":["../src/notification-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAW,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAO5D,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,oBAAoB,CAAC,EAAE,KAAK,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC;AAI7F,eAAO,MAAM,kBAAkB,gGAiE9B,CAAC"}
|
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
import { jsxs as w, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k, Children as O, isValidElement as F } from "react";
|
|
3
|
+
const q = {
|
|
4
|
+
SM: "sm",
|
|
5
|
+
MD: "md",
|
|
6
|
+
LG: "lg"
|
|
7
|
+
};
|
|
8
|
+
function U(u) {
|
|
9
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
10
|
+
}
|
|
11
|
+
var T = { exports: {} };
|
|
12
|
+
/*!
|
|
13
|
+
Copyright (c) 2018 Jed Watson.
|
|
14
|
+
Licensed under the MIT License (MIT), see
|
|
15
|
+
http://jedwatson.github.io/classnames
|
|
16
|
+
*/
|
|
17
|
+
(function(u) {
|
|
18
|
+
(function() {
|
|
19
|
+
var i = {}.hasOwnProperty;
|
|
20
|
+
function n() {
|
|
21
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
22
|
+
var p = arguments[t];
|
|
23
|
+
p && (r = e(r, o(p)));
|
|
24
|
+
}
|
|
25
|
+
return r;
|
|
26
|
+
}
|
|
27
|
+
function o(r) {
|
|
28
|
+
if (typeof r == "string" || typeof r == "number")
|
|
29
|
+
return r;
|
|
30
|
+
if (typeof r != "object")
|
|
31
|
+
return "";
|
|
32
|
+
if (Array.isArray(r))
|
|
33
|
+
return n.apply(null, r);
|
|
34
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
35
|
+
return r.toString();
|
|
36
|
+
var t = "";
|
|
37
|
+
for (var p in r)
|
|
38
|
+
i.call(r, p) && r[p] && (t = e(t, p));
|
|
39
|
+
return t;
|
|
40
|
+
}
|
|
41
|
+
function e(r, t) {
|
|
42
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
43
|
+
}
|
|
44
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
45
|
+
})();
|
|
46
|
+
})(T);
|
|
47
|
+
var W = T.exports;
|
|
48
|
+
const M = /* @__PURE__ */ U(W), J = "_rotate_1xozj_1", K = "_dash_1xozj_1", b = {
|
|
49
|
+
"purpur-spinner": "_purpur-spinner_1xozj_1",
|
|
50
|
+
rotate: J,
|
|
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
|
+
dash: K,
|
|
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", Q = {
|
|
61
|
+
XXS: "xxs",
|
|
62
|
+
XS: "xs",
|
|
63
|
+
SM: "sm",
|
|
64
|
+
MD: "md",
|
|
65
|
+
LG: "lg"
|
|
66
|
+
}, Y = ({
|
|
67
|
+
["data-testid"]: u,
|
|
68
|
+
disabled: i = !1,
|
|
69
|
+
negative: n = !1,
|
|
70
|
+
size: o = Q.SM,
|
|
71
|
+
...e
|
|
72
|
+
}) => /* @__PURE__ */ a(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: M([b[y], b[`${y}--${o}`]]),
|
|
76
|
+
"data-testid": u,
|
|
77
|
+
...e,
|
|
78
|
+
children: /* @__PURE__ */ a("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ a(
|
|
79
|
+
"circle",
|
|
80
|
+
{
|
|
81
|
+
className: M(b[`${y}__circle`], {
|
|
82
|
+
[b[`${y}__circle--disabled`]]: i,
|
|
83
|
+
[b[`${y}__circle--negative`]]: n
|
|
84
|
+
}),
|
|
85
|
+
cx: "25",
|
|
86
|
+
cy: "25",
|
|
87
|
+
r: "20"
|
|
88
|
+
}
|
|
89
|
+
) })
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
function rr(u) {
|
|
93
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
94
|
+
}
|
|
95
|
+
var I = { exports: {} };
|
|
96
|
+
/*!
|
|
97
|
+
Copyright (c) 2018 Jed Watson.
|
|
98
|
+
Licensed under the MIT License (MIT), see
|
|
99
|
+
http://jedwatson.github.io/classnames
|
|
100
|
+
*/
|
|
101
|
+
(function(u) {
|
|
102
|
+
(function() {
|
|
103
|
+
var i = {}.hasOwnProperty;
|
|
104
|
+
function n() {
|
|
105
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
106
|
+
var p = arguments[t];
|
|
107
|
+
p && (r = e(r, o.call(this, p)));
|
|
108
|
+
}
|
|
109
|
+
return r;
|
|
110
|
+
}
|
|
111
|
+
function o(r) {
|
|
112
|
+
if (typeof r == "string" || typeof r == "number")
|
|
113
|
+
return this && this[r] || r;
|
|
114
|
+
if (typeof r != "object")
|
|
115
|
+
return "";
|
|
116
|
+
if (Array.isArray(r))
|
|
117
|
+
return n.apply(this, r);
|
|
118
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
119
|
+
return r.toString();
|
|
120
|
+
var t = "";
|
|
121
|
+
for (var p in r)
|
|
122
|
+
i.call(r, p) && r[p] && (t = e(t, this && this[p] || p));
|
|
123
|
+
return t;
|
|
124
|
+
}
|
|
125
|
+
function e(r, t) {
|
|
126
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
127
|
+
}
|
|
128
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
129
|
+
})();
|
|
130
|
+
})(I);
|
|
131
|
+
var tr = I.exports;
|
|
132
|
+
const ur = /* @__PURE__ */ rr(tr), pr = {
|
|
133
|
+
"purpur-button": "_purpur-button_u2yv5_1",
|
|
134
|
+
"purpur-button--sm": "_purpur-button--sm_u2yv5_33",
|
|
135
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
|
|
136
|
+
"purpur-button--md": "_purpur-button--md_u2yv5_39",
|
|
137
|
+
"purpur-button--lg": "_purpur-button--lg_u2yv5_45",
|
|
138
|
+
"purpur-button--full-width": "_purpur-button--full-width_u2yv5_51",
|
|
139
|
+
"purpur-button--primary": "_purpur-button--primary_u2yv5_54",
|
|
140
|
+
"purpur-button--disabled": "_purpur-button--disabled_u2yv5_58",
|
|
141
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_u2yv5_64",
|
|
142
|
+
"purpur-button--secondary": "_purpur-button--secondary_u2yv5_76",
|
|
143
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_u2yv5_87",
|
|
144
|
+
"purpur-button--expressive": "_purpur-button--expressive_u2yv5_98",
|
|
145
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_u2yv5_108",
|
|
146
|
+
"purpur-button--negative": "_purpur-button--negative_u2yv5_120",
|
|
147
|
+
"purpur-button--destructive": "_purpur-button--destructive_u2yv5_127",
|
|
148
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_u2yv5_137",
|
|
149
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_u2yv5_147",
|
|
150
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
|
|
151
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
|
|
152
|
+
"purpur-button--text": "_purpur-button--text_u2yv5_175"
|
|
153
|
+
}, nr = ur.bind(pr), g = "purpur-button", ir = ({
|
|
154
|
+
children: u,
|
|
155
|
+
className: i,
|
|
156
|
+
["data-testid"]: n,
|
|
157
|
+
disabled: o = !1,
|
|
158
|
+
fullWidth: e = !1,
|
|
159
|
+
iconOnly: r,
|
|
160
|
+
loading: t = !1,
|
|
161
|
+
negative: p = !1,
|
|
162
|
+
onClick: l,
|
|
163
|
+
size: c = q.MD,
|
|
164
|
+
variant: d,
|
|
165
|
+
type: s = "button",
|
|
166
|
+
...f
|
|
167
|
+
}, v) => {
|
|
168
|
+
if (r && d === "destructive")
|
|
169
|
+
return null;
|
|
170
|
+
const S = nr(
|
|
171
|
+
[
|
|
172
|
+
g,
|
|
173
|
+
`${g}--${p ? `${d}-negative` : d}`,
|
|
174
|
+
`${g}--${c}`
|
|
175
|
+
],
|
|
176
|
+
{
|
|
177
|
+
[`${g}--icon-only`]: r,
|
|
178
|
+
[`${g}--negative`]: p,
|
|
179
|
+
[`${g}--full-width`]: e,
|
|
180
|
+
[`${g}--disabled`]: o || t
|
|
181
|
+
},
|
|
182
|
+
i
|
|
183
|
+
), H = (N) => {
|
|
184
|
+
o || t ? N.preventDefault() : l && l(N);
|
|
185
|
+
}, j = !!f["aria-disabled"] || o || t;
|
|
186
|
+
return /* @__PURE__ */ w(
|
|
187
|
+
"button",
|
|
188
|
+
{
|
|
189
|
+
className: S,
|
|
190
|
+
"data-testid": n,
|
|
191
|
+
type: s,
|
|
192
|
+
ref: v,
|
|
193
|
+
"aria-disabled": j,
|
|
194
|
+
onClick: H,
|
|
195
|
+
...f,
|
|
196
|
+
children: [
|
|
197
|
+
t && /* @__PURE__ */ a(Y, { size: c === q.LG ? "xs" : "xxs", negative: p, disabled: j }),
|
|
198
|
+
" ",
|
|
199
|
+
u
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
}, A = k(ir);
|
|
204
|
+
A.displayName = "Button";
|
|
205
|
+
function er(u) {
|
|
206
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
207
|
+
}
|
|
208
|
+
var P = { exports: {} };
|
|
209
|
+
/*!
|
|
210
|
+
Copyright (c) 2018 Jed Watson.
|
|
211
|
+
Licensed under the MIT License (MIT), see
|
|
212
|
+
http://jedwatson.github.io/classnames
|
|
213
|
+
*/
|
|
214
|
+
(function(u) {
|
|
215
|
+
(function() {
|
|
216
|
+
var i = {}.hasOwnProperty;
|
|
217
|
+
function n() {
|
|
218
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
219
|
+
var p = arguments[t];
|
|
220
|
+
p && (r = e(r, o.call(this, p)));
|
|
221
|
+
}
|
|
222
|
+
return r;
|
|
223
|
+
}
|
|
224
|
+
function o(r) {
|
|
225
|
+
if (typeof r == "string" || typeof r == "number")
|
|
226
|
+
return this && this[r] || r;
|
|
227
|
+
if (typeof r != "object")
|
|
228
|
+
return "";
|
|
229
|
+
if (Array.isArray(r))
|
|
230
|
+
return n.apply(this, r);
|
|
231
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
232
|
+
return r.toString();
|
|
233
|
+
var t = "";
|
|
234
|
+
for (var p in r)
|
|
235
|
+
i.call(r, p) && r[p] && (t = e(t, this && this[p] || p));
|
|
236
|
+
return t;
|
|
237
|
+
}
|
|
238
|
+
function e(r, t) {
|
|
239
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
240
|
+
}
|
|
241
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
242
|
+
})();
|
|
243
|
+
})(P);
|
|
244
|
+
var or = P.exports;
|
|
245
|
+
const C = /* @__PURE__ */ er(or), ar = {
|
|
246
|
+
"purpur-grid-item": "_purpur-grid-item_zx9tz_1",
|
|
247
|
+
"purpur-grid-item--no-col-gap": "_purpur-grid-item--no-col-gap_zx9tz_6",
|
|
248
|
+
"purpur-grid-item-colspan-sm-4": "_purpur-grid-item-colspan-sm-4_zx9tz_24",
|
|
249
|
+
"purpur-grid-item-colspan-sm-3": "_purpur-grid-item-colspan-sm-3_zx9tz_27",
|
|
250
|
+
"purpur-grid-item-colspan-sm-2": "_purpur-grid-item-colspan-sm-2_zx9tz_30",
|
|
251
|
+
"purpur-grid-item-colspan-sm-1": "_purpur-grid-item-colspan-sm-1_zx9tz_33",
|
|
252
|
+
"purpur-grid-item-colspan-md-8": "_purpur-grid-item-colspan-md-8_zx9tz_37",
|
|
253
|
+
"purpur-grid-item-colspan-md-7": "_purpur-grid-item-colspan-md-7_zx9tz_42",
|
|
254
|
+
"purpur-grid-item-colspan-md-6": "_purpur-grid-item-colspan-md-6_zx9tz_47",
|
|
255
|
+
"purpur-grid-item-colspan-md-5": "_purpur-grid-item-colspan-md-5_zx9tz_52",
|
|
256
|
+
"purpur-grid-item-colspan-md-4": "_purpur-grid-item-colspan-md-4_zx9tz_57",
|
|
257
|
+
"purpur-grid-item-colspan-md-3": "_purpur-grid-item-colspan-md-3_zx9tz_62",
|
|
258
|
+
"purpur-grid-item-colspan-md-2": "_purpur-grid-item-colspan-md-2_zx9tz_67",
|
|
259
|
+
"purpur-grid-item-colspan-md-1": "_purpur-grid-item-colspan-md-1_zx9tz_72",
|
|
260
|
+
"purpur-grid-item-colspan-lg-12": "_purpur-grid-item-colspan-lg-12_zx9tz_77",
|
|
261
|
+
"purpur-grid-item-colspan-lg-11": "_purpur-grid-item-colspan-lg-11_zx9tz_82",
|
|
262
|
+
"purpur-grid-item-colspan-lg-10": "_purpur-grid-item-colspan-lg-10_zx9tz_87",
|
|
263
|
+
"purpur-grid-item-colspan-lg-9": "_purpur-grid-item-colspan-lg-9_zx9tz_92",
|
|
264
|
+
"purpur-grid-item-colspan-lg-8": "_purpur-grid-item-colspan-lg-8_zx9tz_97",
|
|
265
|
+
"purpur-grid-item-colspan-lg-7": "_purpur-grid-item-colspan-lg-7_zx9tz_102",
|
|
266
|
+
"purpur-grid-item-colspan-lg-6": "_purpur-grid-item-colspan-lg-6_zx9tz_107",
|
|
267
|
+
"purpur-grid-item-colspan-lg-5": "_purpur-grid-item-colspan-lg-5_zx9tz_112",
|
|
268
|
+
"purpur-grid-item-colspan-lg-4": "_purpur-grid-item-colspan-lg-4_zx9tz_117",
|
|
269
|
+
"purpur-grid-item-colspan-lg-3": "_purpur-grid-item-colspan-lg-3_zx9tz_122",
|
|
270
|
+
"purpur-grid-item-colspan-lg-2": "_purpur-grid-item-colspan-lg-2_zx9tz_127",
|
|
271
|
+
"purpur-grid-item-colspan-lg-1": "_purpur-grid-item-colspan-lg-1_zx9tz_77"
|
|
272
|
+
}, lr = C.bind(ar), x = "purpur-grid-item", E = ({
|
|
273
|
+
children: u,
|
|
274
|
+
className: i,
|
|
275
|
+
["data-testid"]: n,
|
|
276
|
+
colSpanSm: o = 4,
|
|
277
|
+
colSpanMd: e = 8,
|
|
278
|
+
colSpanLg: r = 12,
|
|
279
|
+
noColGap: t = !1
|
|
280
|
+
}) => {
|
|
281
|
+
const p = lr([
|
|
282
|
+
i,
|
|
283
|
+
x,
|
|
284
|
+
{
|
|
285
|
+
[`${x}--no-col-gap`]: t,
|
|
286
|
+
[`${x}-colspan-sm-${o}`]: o,
|
|
287
|
+
[`${x}-colspan-md-${e}`]: e,
|
|
288
|
+
[`${x}-colspan-lg-${r}`]: r
|
|
289
|
+
}
|
|
290
|
+
]);
|
|
291
|
+
return /* @__PURE__ */ a("div", { className: p, "data-testid": n, children: u });
|
|
292
|
+
}, sr = (u) => !!u && F(u) && (!!u.props.colSpanSm || !!u.props.colSpanMd || !!u.props.colSpanLg), _r = {
|
|
293
|
+
"purpur-grid": "_purpur-grid_1h3bu_1",
|
|
294
|
+
"purpur-grid--no-gap": "_purpur-grid--no-gap_1h3bu_12",
|
|
295
|
+
"purpur-grid--no-row-gap": "_purpur-grid--no-row-gap_1h3bu_12",
|
|
296
|
+
"purpur-grid--grid": "_purpur-grid--grid_1h3bu_36",
|
|
297
|
+
"purpur-grid--no-col-gap": "_purpur-grid--no-col-gap_1h3bu_40",
|
|
298
|
+
"purpur-grid-col-sm-4": "_purpur-grid-col-sm-4_1h3bu_43",
|
|
299
|
+
"purpur-grid-col-sm-3": "_purpur-grid-col-sm-3_1h3bu_46",
|
|
300
|
+
"purpur-grid-col-sm-2": "_purpur-grid-col-sm-2_1h3bu_49",
|
|
301
|
+
"purpur-grid-col-md-8": "_purpur-grid-col-md-8_1h3bu_53",
|
|
302
|
+
"purpur-grid-col-md-7": "_purpur-grid-col-md-7_1h3bu_58",
|
|
303
|
+
"purpur-grid-col-md-6": "_purpur-grid-col-md-6_1h3bu_63",
|
|
304
|
+
"purpur-grid-col-md-5": "_purpur-grid-col-md-5_1h3bu_68",
|
|
305
|
+
"purpur-grid-col-md-4": "_purpur-grid-col-md-4_1h3bu_73",
|
|
306
|
+
"purpur-grid-col-md-3": "_purpur-grid-col-md-3_1h3bu_78",
|
|
307
|
+
"purpur-grid-col-md-2": "_purpur-grid-col-md-2_1h3bu_83",
|
|
308
|
+
"purpur-grid-col-lg-12": "_purpur-grid-col-lg-12_1h3bu_88",
|
|
309
|
+
"purpur-grid-col-lg-11": "_purpur-grid-col-lg-11_1h3bu_93",
|
|
310
|
+
"purpur-grid-col-lg-10": "_purpur-grid-col-lg-10_1h3bu_98",
|
|
311
|
+
"purpur-grid-col-lg-9": "_purpur-grid-col-lg-9_1h3bu_103",
|
|
312
|
+
"purpur-grid-col-lg-8": "_purpur-grid-col-lg-8_1h3bu_108",
|
|
313
|
+
"purpur-grid-col-lg-7": "_purpur-grid-col-lg-7_1h3bu_113",
|
|
314
|
+
"purpur-grid-col-lg-6": "_purpur-grid-col-lg-6_1h3bu_118",
|
|
315
|
+
"purpur-grid-col-lg-5": "_purpur-grid-col-lg-5_1h3bu_123",
|
|
316
|
+
"purpur-grid-col-lg-4": "_purpur-grid-col-lg-4_1h3bu_128",
|
|
317
|
+
"purpur-grid-col-lg-3": "_purpur-grid-col-lg-3_1h3bu_133",
|
|
318
|
+
"purpur-grid-col-lg-2": "_purpur-grid-col-lg-2_1h3bu_138",
|
|
319
|
+
"purpur-grid--flex": "_purpur-grid--flex_1h3bu_142"
|
|
320
|
+
}, cr = C.bind(_r), _ = "purpur-grid", B = ({
|
|
321
|
+
children: u,
|
|
322
|
+
className: i,
|
|
323
|
+
["data-testid"]: n,
|
|
324
|
+
colsSm: o = 1,
|
|
325
|
+
colsMd: e = 1,
|
|
326
|
+
colsLg: r = 1,
|
|
327
|
+
noGap: t = !1,
|
|
328
|
+
noColGap: p = !1,
|
|
329
|
+
noRowGap: l = !1,
|
|
330
|
+
...c
|
|
331
|
+
}) => {
|
|
332
|
+
const d = O.toArray(u).filter(sr), s = d.length, f = cr([
|
|
333
|
+
i,
|
|
334
|
+
_,
|
|
335
|
+
{
|
|
336
|
+
[`${_}--grid`]: !s,
|
|
337
|
+
[`${_}--flex`]: s,
|
|
338
|
+
[`${_}--no-gap`]: t,
|
|
339
|
+
[`${_}--no-col-gap`]: p,
|
|
340
|
+
[`${_}--no-row-gap`]: l,
|
|
341
|
+
[`${_}-col-sm-${o}`]: o > 1 && !s,
|
|
342
|
+
[`${_}-col-md-${e}`]: e > 1 && !s,
|
|
343
|
+
[`${_}-col-lg-${r}`]: r > 1 && !s
|
|
344
|
+
}
|
|
345
|
+
]);
|
|
346
|
+
return /* @__PURE__ */ a("div", { className: f, "data-testid": n, ...c, children: s ? O.map(d, ({ props: { children: v, ...S } }) => /* @__PURE__ */ a(E, { ...S, noColGap: t || p, children: v })) : u });
|
|
347
|
+
};
|
|
348
|
+
B.Item = E;
|
|
349
|
+
function dr(u) {
|
|
350
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
351
|
+
}
|
|
352
|
+
var G = { exports: {} };
|
|
353
|
+
/*!
|
|
354
|
+
Copyright (c) 2018 Jed Watson.
|
|
355
|
+
Licensed under the MIT License (MIT), see
|
|
356
|
+
http://jedwatson.github.io/classnames
|
|
357
|
+
*/
|
|
358
|
+
(function(u) {
|
|
359
|
+
(function() {
|
|
360
|
+
var i = {}.hasOwnProperty;
|
|
361
|
+
function n() {
|
|
362
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
363
|
+
var p = arguments[t];
|
|
364
|
+
p && (r = e(r, o(p)));
|
|
365
|
+
}
|
|
366
|
+
return r;
|
|
367
|
+
}
|
|
368
|
+
function o(r) {
|
|
369
|
+
if (typeof r == "string" || typeof r == "number")
|
|
370
|
+
return r;
|
|
371
|
+
if (typeof r != "object")
|
|
372
|
+
return "";
|
|
373
|
+
if (Array.isArray(r))
|
|
374
|
+
return n.apply(null, r);
|
|
375
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
376
|
+
return r.toString();
|
|
377
|
+
var t = "";
|
|
378
|
+
for (var p in r)
|
|
379
|
+
i.call(r, p) && r[p] && (t = e(t, p));
|
|
380
|
+
return t;
|
|
381
|
+
}
|
|
382
|
+
function e(r, t) {
|
|
383
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
384
|
+
}
|
|
385
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
386
|
+
})();
|
|
387
|
+
})(G);
|
|
388
|
+
var gr = G.exports;
|
|
389
|
+
const mr = /* @__PURE__ */ dr(gr), z = {
|
|
390
|
+
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
391
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
392
|
+
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
393
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_k9fhq_14",
|
|
394
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_k9fhq_20",
|
|
395
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_k9fhq_26",
|
|
396
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_k9fhq_32",
|
|
397
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_k9fhq_38",
|
|
398
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_k9fhq_44",
|
|
399
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_k9fhq_50",
|
|
400
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_k9fhq_56",
|
|
401
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_k9fhq_62",
|
|
402
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
403
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
404
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
405
|
+
}, fr = {
|
|
406
|
+
TITLE100: "title-100",
|
|
407
|
+
TITLE200: "title-200",
|
|
408
|
+
TITLE300: "title-300",
|
|
409
|
+
TITLE400: "title-400",
|
|
410
|
+
TITLE500: "title-500",
|
|
411
|
+
TITLE600: "title-600",
|
|
412
|
+
TITLE700: "title-700",
|
|
413
|
+
SUBSECTION100: "subsection-100"
|
|
414
|
+
}, $ = "purpur-heading", hr = ({
|
|
415
|
+
["data-testid"]: u,
|
|
416
|
+
children: i,
|
|
417
|
+
className: n = "",
|
|
418
|
+
enableHyphenation: o = !1,
|
|
419
|
+
negative: e = !1,
|
|
420
|
+
tag: r,
|
|
421
|
+
variant: t = fr.TITLE100,
|
|
422
|
+
...p
|
|
423
|
+
}) => {
|
|
424
|
+
const l = r, c = mr([
|
|
425
|
+
n,
|
|
426
|
+
z[$],
|
|
427
|
+
z[`${$}--${t}`],
|
|
428
|
+
{
|
|
429
|
+
[z[`${$}--hyphens`]]: o,
|
|
430
|
+
[z[`${$}--negative`]]: e
|
|
431
|
+
}
|
|
432
|
+
]);
|
|
433
|
+
return /* @__PURE__ */ a(l, { ...p, className: c, "data-testid": u, children: i });
|
|
434
|
+
};
|
|
435
|
+
function vr(u) {
|
|
436
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
437
|
+
}
|
|
438
|
+
var D = { exports: {} };
|
|
439
|
+
/*!
|
|
440
|
+
Copyright (c) 2018 Jed Watson.
|
|
441
|
+
Licensed under the MIT License (MIT), see
|
|
442
|
+
http://jedwatson.github.io/classnames
|
|
443
|
+
*/
|
|
444
|
+
(function(u) {
|
|
445
|
+
(function() {
|
|
446
|
+
var i = {}.hasOwnProperty;
|
|
447
|
+
function n() {
|
|
448
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
449
|
+
var p = arguments[t];
|
|
450
|
+
p && (r = e(r, o.call(this, p)));
|
|
451
|
+
}
|
|
452
|
+
return r;
|
|
453
|
+
}
|
|
454
|
+
function o(r) {
|
|
455
|
+
if (typeof r == "string" || typeof r == "number")
|
|
456
|
+
return this && this[r] || r;
|
|
457
|
+
if (typeof r != "object")
|
|
458
|
+
return "";
|
|
459
|
+
if (Array.isArray(r))
|
|
460
|
+
return n.apply(this, r);
|
|
461
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
462
|
+
return r.toString();
|
|
463
|
+
var t = "";
|
|
464
|
+
for (var p in r)
|
|
465
|
+
i.call(r, p) && r[p] && (t = e(t, this && this[p] || p));
|
|
466
|
+
return t;
|
|
467
|
+
}
|
|
468
|
+
function e(r, t) {
|
|
469
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
470
|
+
}
|
|
471
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
472
|
+
})();
|
|
473
|
+
})(D);
|
|
474
|
+
var br = D.exports;
|
|
475
|
+
const yr = /* @__PURE__ */ vr(br), xr = {
|
|
476
|
+
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
477
|
+
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
478
|
+
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
479
|
+
"purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
|
|
480
|
+
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
481
|
+
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
482
|
+
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
483
|
+
}, zr = {
|
|
484
|
+
name: "close",
|
|
485
|
+
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>',
|
|
486
|
+
keywords: ["close"],
|
|
487
|
+
category: "utility"
|
|
488
|
+
}, $r = {
|
|
489
|
+
name: "info",
|
|
490
|
+
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
491
|
+
keywords: ["info"],
|
|
492
|
+
category: "status"
|
|
493
|
+
}, Z = (u) => /* @__PURE__ */ a(
|
|
494
|
+
V,
|
|
495
|
+
{
|
|
496
|
+
...u,
|
|
497
|
+
svg: zr
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
Z.displayName = "IconClose";
|
|
501
|
+
const R = (u) => /* @__PURE__ */ a(
|
|
502
|
+
V,
|
|
503
|
+
{
|
|
504
|
+
...u,
|
|
505
|
+
svg: $r
|
|
506
|
+
}
|
|
507
|
+
);
|
|
508
|
+
R.displayName = "IconInfo";
|
|
509
|
+
const wr = yr.bind(xr), L = "purpur-icon", Sr = "md", jr = (u) => u.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Nr = ({ content: u = "", title: i } = {}) => {
|
|
510
|
+
const n = [
|
|
511
|
+
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
512
|
+
{ name: "fill", value: "currentColor" },
|
|
513
|
+
{ name: "viewBox", value: "0 0 24 24" },
|
|
514
|
+
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
515
|
+
], o = i ? `<title>${i}</title>` : "";
|
|
516
|
+
return `<svg ${jr(n)}>${o}${u}</svg>`;
|
|
517
|
+
}, Or = (u) => u.replace(/<(\/?)svg([^>]*)>/g, "").trim(), V = ({
|
|
518
|
+
["data-testid"]: u,
|
|
519
|
+
svg: i,
|
|
520
|
+
allyTitle: n,
|
|
521
|
+
className: o = "",
|
|
522
|
+
size: e = Sr,
|
|
523
|
+
...r
|
|
524
|
+
}) => {
|
|
525
|
+
const t = Nr({
|
|
526
|
+
content: Or(i.svg),
|
|
527
|
+
title: n
|
|
528
|
+
}), p = wr(o, L, `${L}--${e}`);
|
|
529
|
+
return /* @__PURE__ */ a(
|
|
530
|
+
"span",
|
|
531
|
+
{
|
|
532
|
+
"aria-label": n,
|
|
533
|
+
className: p,
|
|
534
|
+
"data-testid": u,
|
|
535
|
+
dangerouslySetInnerHTML: { __html: t },
|
|
536
|
+
...r
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
};
|
|
540
|
+
function qr(u) {
|
|
541
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
542
|
+
}
|
|
543
|
+
var X = { exports: {} };
|
|
544
|
+
/*!
|
|
545
|
+
Copyright (c) 2018 Jed Watson.
|
|
546
|
+
Licensed under the MIT License (MIT), see
|
|
547
|
+
http://jedwatson.github.io/classnames
|
|
548
|
+
*/
|
|
549
|
+
(function(u) {
|
|
550
|
+
(function() {
|
|
551
|
+
var i = {}.hasOwnProperty;
|
|
552
|
+
function n() {
|
|
553
|
+
for (var r = "", t = 0; t < arguments.length; t++) {
|
|
554
|
+
var p = arguments[t];
|
|
555
|
+
p && (r = e(r, o.call(this, p)));
|
|
556
|
+
}
|
|
557
|
+
return r;
|
|
558
|
+
}
|
|
559
|
+
function o(r) {
|
|
560
|
+
if (typeof r == "string" || typeof r == "number")
|
|
561
|
+
return this && this[r] || r;
|
|
562
|
+
if (typeof r != "object")
|
|
563
|
+
return "";
|
|
564
|
+
if (Array.isArray(r))
|
|
565
|
+
return n.apply(this, r);
|
|
566
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
567
|
+
return r.toString();
|
|
568
|
+
var t = "";
|
|
569
|
+
for (var p in r)
|
|
570
|
+
i.call(r, p) && r[p] && (t = e(t, this && this[p] || p));
|
|
571
|
+
return t;
|
|
572
|
+
}
|
|
573
|
+
function e(r, t) {
|
|
574
|
+
return t ? r ? r + " " + t : r + t : r;
|
|
575
|
+
}
|
|
576
|
+
u.exports ? (n.default = n, u.exports = n) : window.classNames = n;
|
|
577
|
+
})();
|
|
578
|
+
})(X);
|
|
579
|
+
var Mr = X.exports;
|
|
580
|
+
const Lr = /* @__PURE__ */ qr(Mr), kr = {
|
|
581
|
+
"purpur-notification-banner": "_purpur-notification-banner_llblm_1",
|
|
582
|
+
"purpur-notification-banner__container": "_purpur-notification-banner__container_llblm_6",
|
|
583
|
+
"purpur-notification-banner__content": "_purpur-notification-banner__content_llblm_11",
|
|
584
|
+
"purpur-notification-banner__icon": "_purpur-notification-banner__icon_llblm_16",
|
|
585
|
+
"purpur-notification-banner__heading": "_purpur-notification-banner__heading_llblm_19",
|
|
586
|
+
"purpur-notification-banner__heading--no-overlap": "_purpur-notification-banner__heading--no-overlap_llblm_22",
|
|
587
|
+
"purpur-notification-banner__close-button": "_purpur-notification-banner__close-button_llblm_25"
|
|
588
|
+
}, h = Lr.bind(kr), m = "purpur-notification-banner", Tr = k(
|
|
589
|
+
({
|
|
590
|
+
["data-testid"]: u,
|
|
591
|
+
children: i,
|
|
592
|
+
className: n,
|
|
593
|
+
closeButtonAllyLabel: o,
|
|
594
|
+
description: e,
|
|
595
|
+
hideIcon: r,
|
|
596
|
+
icon: t,
|
|
597
|
+
link: p,
|
|
598
|
+
onClose: l,
|
|
599
|
+
titleTag: c = "h4",
|
|
600
|
+
title: d,
|
|
601
|
+
...s
|
|
602
|
+
}, f) => {
|
|
603
|
+
const v = h([n, m]);
|
|
604
|
+
return /* @__PURE__ */ a("div", { ...s, className: v, role: "alert", ref: f, "data-testid": u, children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ w("div", { className: h(`${m}__container`), children: [
|
|
605
|
+
r ? null : t || /* @__PURE__ */ a(R, { className: h(`${m}__icon`), size: "sm" }),
|
|
606
|
+
/* @__PURE__ */ w("div", { className: h(`${m}__content`), children: [
|
|
607
|
+
/* @__PURE__ */ a(
|
|
608
|
+
hr,
|
|
609
|
+
{
|
|
610
|
+
tag: c,
|
|
611
|
+
variant: "subsection-100",
|
|
612
|
+
className: h([
|
|
613
|
+
`${m}__heading`,
|
|
614
|
+
{ [`${m}__heading--no-overlap`]: l }
|
|
615
|
+
]),
|
|
616
|
+
children: d
|
|
617
|
+
}
|
|
618
|
+
),
|
|
619
|
+
/* @__PURE__ */ w("div", { children: [
|
|
620
|
+
e,
|
|
621
|
+
" ",
|
|
622
|
+
p
|
|
623
|
+
] })
|
|
624
|
+
] }),
|
|
625
|
+
i,
|
|
626
|
+
l && /* @__PURE__ */ a(
|
|
627
|
+
A,
|
|
628
|
+
{
|
|
629
|
+
"data-testid": u ? `${u}-close-button` : void 0,
|
|
630
|
+
variant: "tertiary-purple",
|
|
631
|
+
size: "sm",
|
|
632
|
+
iconOnly: !0,
|
|
633
|
+
"aria-label": o,
|
|
634
|
+
onClick: l,
|
|
635
|
+
className: h(`${m}__close-button`),
|
|
636
|
+
children: /* @__PURE__ */ a(Z, { size: "sm" })
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
] }) }) });
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
Tr.displayName = "NotificationBanner";
|
|
643
|
+
export {
|
|
644
|
+
Tr as NotificationBanner
|
|
645
|
+
};
|
|
646
|
+
//# sourceMappingURL=notification-banner.es.js.map
|