@purpurds/notification 5.13.0 → 5.15.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.
@@ -1,5 +1,5 @@
1
- import { HeadingTagType } from '@purpurds/heading';
2
1
  import { default as React, ReactNode } from 'react';
2
+ import { HeadingTagType } from '@purpurds/heading';
3
3
 
4
4
  export declare const NOTIFICATION_STATUS: {
5
5
  readonly SUCCESS: "success";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as L } from "react";
2
+ import { forwardRef as E } from "react";
3
3
  const Z = {
4
4
  SM: "sm",
5
5
  MD: "md",
@@ -8,7 +8,7 @@ const Z = {
8
8
  function H(e) {
9
9
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
10
  }
11
- var I = { exports: {} };
11
+ var R = { exports: {} };
12
12
  /*!
13
13
  Copyright (c) 2018 Jed Watson.
14
14
  Licensed under the MIT License (MIT), see
@@ -43,31 +43,31 @@ var I = { exports: {} };
43
43
  }
44
44
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
45
45
  })();
46
- })(I);
47
- var U = I.exports;
48
- const j = /* @__PURE__ */ H(U), F = "_rotate_1xozj_1", V = "_dash_1xozj_1", h = {
46
+ })(R);
47
+ var U = R.exports;
48
+ const j = /* @__PURE__ */ H(U), V = "_rotate_1xozj_1", F = "_dash_1xozj_1", h = {
49
49
  "purpur-spinner": "_purpur-spinner_1xozj_1",
50
- rotate: F,
50
+ rotate: V,
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: V,
57
+ dash: F,
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", W = {
60
+ }, v = "purpur-spinner", X = {
61
61
  XXS: "xxs",
62
62
  XS: "xs",
63
63
  SM: "sm",
64
64
  MD: "md",
65
65
  LG: "lg"
66
- }, X = ({
66
+ }, W = ({
67
67
  ["data-testid"]: e,
68
68
  disabled: p = !1,
69
69
  negative: a = !1,
70
- size: u = W.SM,
70
+ size: u = X.SM,
71
71
  ...i
72
72
  }) => /* @__PURE__ */ s(
73
73
  "div",
@@ -89,10 +89,10 @@ const j = /* @__PURE__ */ H(U), F = "_rotate_1xozj_1", V = "_dash_1xozj_1", h =
89
89
  ) })
90
90
  }
91
91
  );
92
- function K(e) {
92
+ function Y(e) {
93
93
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
94
94
  }
95
- var R = { exports: {} };
95
+ var I = { exports: {} };
96
96
  /*!
97
97
  Copyright (c) 2018 Jed Watson.
98
98
  Licensed under the MIT License (MIT), see
@@ -127,9 +127,9 @@ var R = { exports: {} };
127
127
  }
128
128
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
129
129
  })();
130
- })(R);
131
- var Y = R.exports;
132
- const J = /* @__PURE__ */ K(Y), Q = {
130
+ })(I);
131
+ var J = I.exports;
132
+ const K = /* @__PURE__ */ Y(J), Q = {
133
133
  "purpur-button": "_purpur-button_1acxn_1",
134
134
  "purpur-button--sm": "_purpur-button--sm_1acxn_33",
135
135
  "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
@@ -150,7 +150,7 @@ const J = /* @__PURE__ */ K(Y), Q = {
150
150
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
151
151
  "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
152
152
  "purpur-button--text": "_purpur-button--text_1acxn_175"
153
- }, rr = J.bind(Q), g = "purpur-button", tr = ({
153
+ }, rr = K.bind(Q), g = "purpur-button", tr = ({
154
154
  children: e,
155
155
  className: p,
156
156
  ["data-testid"]: a,
@@ -167,7 +167,7 @@ const J = /* @__PURE__ */ K(Y), Q = {
167
167
  }, O) => {
168
168
  if (r && o === "destructive")
169
169
  return null;
170
- const D = rr(
170
+ const B = rr(
171
171
  [
172
172
  g,
173
173
  `${g}--${n ? `${o}-negative` : o}`,
@@ -186,7 +186,7 @@ const J = /* @__PURE__ */ K(Y), Q = {
186
186
  return /* @__PURE__ */ b(
187
187
  "button",
188
188
  {
189
- className: D,
189
+ className: B,
190
190
  "data-testid": a,
191
191
  type: f,
192
192
  ref: O,
@@ -194,18 +194,18 @@ const J = /* @__PURE__ */ K(Y), Q = {
194
194
  onClick: G,
195
195
  ...w,
196
196
  children: [
197
- t && /* @__PURE__ */ s(X, { size: d === Z.LG ? "xs" : "xxs", negative: n, disabled: N }),
197
+ t && /* @__PURE__ */ s(W, { size: d === Z.LG ? "xs" : "xxs", negative: n, disabled: N }),
198
198
  " ",
199
199
  e
200
200
  ]
201
201
  }
202
202
  );
203
- }, P = L(tr);
203
+ }, P = E(tr);
204
204
  P.displayName = "Button";
205
205
  function er(e) {
206
206
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
207
207
  }
208
- var T = { exports: {} };
208
+ var M = { exports: {} };
209
209
  /*!
210
210
  Copyright (c) 2018 Jed Watson.
211
211
  Licensed under the MIT License (MIT), see
@@ -240,8 +240,8 @@ var T = { exports: {} };
240
240
  }
241
241
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
242
242
  })();
243
- })(T);
244
- var nr = T.exports;
243
+ })(M);
244
+ var nr = M.exports;
245
245
  const ar = /* @__PURE__ */ er(nr), $ = {
246
246
  "purpur-heading": "_purpur-heading_k9fhq_1",
247
247
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
@@ -267,7 +267,7 @@ const ar = /* @__PURE__ */ er(nr), $ = {
267
267
  TITLE600: "title-600",
268
268
  TITLE700: "title-700",
269
269
  SUBSECTION100: "subsection-100"
270
- }, S = "purpur-heading", k = ({
270
+ }, S = "purpur-heading", T = ({
271
271
  ["data-testid"]: e,
272
272
  children: p,
273
273
  className: a = "",
@@ -288,11 +288,11 @@ const ar = /* @__PURE__ */ er(nr), $ = {
288
288
  ]);
289
289
  return /* @__PURE__ */ s(_, { ...n, className: d, "data-testid": e, children: p });
290
290
  };
291
- k.displayName = "Heading";
291
+ T.displayName = "Heading";
292
292
  function ir(e) {
293
293
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
294
294
  }
295
- var M = { exports: {} };
295
+ var k = { exports: {} };
296
296
  /*!
297
297
  Copyright (c) 2018 Jed Watson.
298
298
  Licensed under the MIT License (MIT), see
@@ -327,8 +327,8 @@ var M = { exports: {} };
327
327
  }
328
328
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
329
329
  })();
330
- })(M);
331
- var ur = M.exports;
330
+ })(k);
331
+ var ur = k.exports;
332
332
  const or = /* @__PURE__ */ ir(ur), sr = {
333
333
  "purpur-icon": "_purpur-icon_8u1lq_1",
334
334
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
@@ -370,7 +370,7 @@ const or = /* @__PURE__ */ ir(ur), sr = {
370
370
  p ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
371
371
  ], u = p ? `<title>${p}</title>` : "";
372
372
  return `<svg ${vr(a)}>${u}${e}</svg>`;
373
- }, yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), E = ({
373
+ }, yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), L = ({
374
374
  ["data-testid"]: e,
375
375
  svg: p,
376
376
  allyTitle: a,
@@ -485,7 +485,7 @@ C.displayName = "Paragraph";
485
485
  function Sr(e) {
486
486
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
487
487
  }
488
- var B = { exports: {} };
488
+ var D = { exports: {} };
489
489
  /*!
490
490
  Copyright (c) 2018 Jed Watson.
491
491
  Licensed under the MIT License (MIT), see
@@ -520,8 +520,8 @@ var B = { exports: {} };
520
520
  }
521
521
  e.exports ? (a.default = a, e.exports = a) : window.classNames = a;
522
522
  })();
523
- })(B);
524
- var Or = B.exports;
523
+ })(D);
524
+ var Or = D.exports;
525
525
  const Nr = /* @__PURE__ */ Sr(Or), l = {
526
526
  "purpur-notification": "_purpur-notification_10qwf_1",
527
527
  "purpur-notification__top": "_purpur-notification__top_10qwf_14",
@@ -544,11 +544,11 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
544
544
  }, Pr = Object.values(x), Ar = {
545
545
  POLITE: "polite",
546
546
  ASSERTIVE: "assertive"
547
- }, Tr = Object.values(Ar), jr = {
547
+ }, Mr = Object.values(Ar), jr = {
548
548
  ALERT: "alert",
549
549
  DIALOG: "dialog",
550
550
  ALERTDIALOG: "alertdialog"
551
- }, kr = Object.values(jr), c = "purpur-notification", qr = (e) => {
551
+ }, Tr = Object.values(jr), c = "purpur-notification", qr = (e) => {
552
552
  switch (e) {
553
553
  case x.INFO:
554
554
  return gr;
@@ -559,7 +559,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
559
559
  case x.ERROR:
560
560
  return dr;
561
561
  }
562
- }, Er = ({
562
+ }, Lr = ({
563
563
  ["data-testid"]: e,
564
564
  ["aria-live"]: p,
565
565
  children: a,
@@ -593,7 +593,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
593
593
  /* @__PURE__ */ b("div", { className: l[`${c}__top`], children: [
594
594
  /* @__PURE__ */ b("div", { className: l[`${c}__header`], children: [
595
595
  /* @__PURE__ */ s(
596
- E,
596
+ L,
597
597
  {
598
598
  "data-testid": e ? `${e}-icon` : void 0,
599
599
  className: l[`${c}__icon`],
@@ -602,7 +602,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
602
602
  }
603
603
  ),
604
604
  !!_ && /* @__PURE__ */ s(
605
- k,
605
+ T,
606
606
  {
607
607
  "data-testid": e ? `${e}-heading` : void 0,
608
608
  variant: "subsection-100",
@@ -625,7 +625,7 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
625
625
  "aria-label": i,
626
626
  onClick: f,
627
627
  className: l[`${c}__close-button`],
628
- children: /* @__PURE__ */ s(E, { svg: _r, size: "sm" })
628
+ children: /* @__PURE__ */ s(L, { svg: _r, size: "sm" })
629
629
  }
630
630
  )
631
631
  ] }),
@@ -647,15 +647,15 @@ const Nr = /* @__PURE__ */ Sr(Or), l = {
647
647
  )
648
648
  ]
649
649
  }
650
- ), Lr = L(Er);
651
- Lr.displayName = "Notification";
650
+ ), Er = E(Lr);
651
+ Er.displayName = "Notification";
652
652
  export {
653
653
  Ar as NOTIFICATION_ARIA_LIVE,
654
654
  jr as NOTIFICATION_ROLE,
655
655
  x as NOTIFICATION_STATUS,
656
- Lr as Notification,
657
- Tr as notificationAriaLiveValues,
658
- kr as notificationRoles,
656
+ Er as Notification,
657
+ Mr as notificationAriaLiveValues,
658
+ Tr as notificationRoles,
659
659
  Pr as notificationStatuses
660
660
  };
661
661
  //# sourceMappingURL=notification.es.js.map