@notificationapi/react 1.7.0 → 1.8.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.
Files changed (45) hide show
  1. package/dist/assets/Badge.js +4 -3
  2. package/dist/assets/Box.js +26 -24
  3. package/dist/assets/Button.js +20 -18
  4. package/dist/assets/ButtonBase.js +193 -185
  5. package/dist/assets/DefaultPropsProvider.js +416 -4199
  6. package/dist/assets/DefaultPropsProvider2.js +992 -0
  7. package/dist/assets/Divider.js +2 -1
  8. package/dist/assets/GlobalStyles.js +23 -0
  9. package/dist/assets/Grow.js +87 -92
  10. package/dist/assets/IconButton.js +8 -7
  11. package/dist/assets/List.js +12 -11
  12. package/dist/assets/Modal.js +18 -17
  13. package/dist/assets/Notification.js +787 -770
  14. package/dist/assets/Paper.js +6 -6
  15. package/dist/assets/Popover.js +38 -37
  16. package/dist/assets/Portal.js +38 -48
  17. package/dist/assets/Stack.js +32 -30
  18. package/dist/assets/Typography.js +84 -97
  19. package/dist/assets/createSvgIcon.js +25 -24
  20. package/dist/assets/createTheme.js +2828 -0
  21. package/dist/assets/dividerClasses.js +16 -15
  22. package/dist/assets/exactProp.js +13 -0
  23. package/dist/assets/index.js +19 -148
  24. package/dist/assets/index2.js +151 -0
  25. package/dist/assets/useTheme.js +6 -7
  26. package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
  27. package/dist/assets/utils.js +2 -2
  28. package/dist/components/Notifications/Inbox.js +592 -582
  29. package/dist/components/Notifications/InboxHeader.js +31 -30
  30. package/dist/components/Notifications/Notification.js +4 -2
  31. package/dist/components/Notifications/NotificationFeed.js +40 -32
  32. package/dist/components/Notifications/NotificationLauncher.js +90 -64
  33. package/dist/components/Notifications/NotificationPopup.js +76 -65
  34. package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
  35. package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
  36. package/dist/components/Preferences/PreferenceInput.js +427 -414
  37. package/dist/components/Preferences/Preferences.js +329 -278
  38. package/dist/components/Provider/index.d.ts +2 -0
  39. package/dist/components/Provider/index.js +1008 -401
  40. package/dist/components/Slack/SlackConnect.js +8 -7
  41. package/dist/main.d.ts +2 -0
  42. package/dist/main.js +6 -3
  43. package/dist/utils/theme.d.ts +17 -0
  44. package/dist/utils/theme.js +104 -0
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { z as L, A as fe, E as le, B as me, D as ye, F as D, G as F, H as de, p as Ee } from "./DefaultPropsProvider.js";
1
+ import { s as L, h as ue, E as le, c as me, w as ye, a as z, u as I, i as de } from "./DefaultPropsProvider2.js";
2
2
  import * as b from "react";
3
3
  var h = { exports: {} }, o = {};
4
4
  /** @license React v16.13.1
@@ -9,11 +9,11 @@ var h = { exports: {} }, o = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var I;
13
- function ve() {
14
- if (I) return o;
15
- I = 1;
16
- var r = typeof Symbol == "function" && Symbol.for, n = r ? Symbol.for("react.element") : 60103, c = r ? Symbol.for("react.portal") : 60106, u = r ? Symbol.for("react.fragment") : 60107, l = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, s = r ? Symbol.for("react.provider") : 60109, y = r ? Symbol.for("react.context") : 60110, d = r ? Symbol.for("react.async_mode") : 60111, E = r ? Symbol.for("react.concurrent_mode") : 60111, v = r ? Symbol.for("react.forward_ref") : 60112, p = r ? Symbol.for("react.suspense") : 60113, R = r ? Symbol.for("react.suspense_list") : 60120, S = r ? Symbol.for("react.memo") : 60115, _ = r ? Symbol.for("react.lazy") : 60116, $ = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, P = r ? Symbol.for("react.responder") : 60118, A = r ? Symbol.for("react.scope") : 60119;
12
+ var F;
13
+ function Ee() {
14
+ if (F) return o;
15
+ F = 1;
16
+ var r = typeof Symbol == "function" && Symbol.for, n = r ? Symbol.for("react.element") : 60103, c = r ? Symbol.for("react.portal") : 60106, f = r ? Symbol.for("react.fragment") : 60107, l = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, s = r ? Symbol.for("react.provider") : 60109, y = r ? Symbol.for("react.context") : 60110, d = r ? Symbol.for("react.async_mode") : 60111, E = r ? Symbol.for("react.concurrent_mode") : 60111, v = r ? Symbol.for("react.forward_ref") : 60112, p = r ? Symbol.for("react.suspense") : 60113, R = r ? Symbol.for("react.suspense_list") : 60120, S = r ? Symbol.for("react.memo") : 60115, _ = r ? Symbol.for("react.lazy") : 60116, x = r ? Symbol.for("react.block") : 60121, P = r ? Symbol.for("react.fundamental") : 60117, $ = r ? Symbol.for("react.responder") : 60118, A = r ? Symbol.for("react.scope") : 60119;
17
17
  function m(e) {
18
18
  if (typeof e == "object" && e !== null) {
19
19
  var T = e.$$typeof;
@@ -22,7 +22,7 @@ function ve() {
22
22
  switch (e = e.type, e) {
23
23
  case d:
24
24
  case E:
25
- case u:
25
+ case f:
26
26
  case i:
27
27
  case l:
28
28
  case p:
@@ -44,12 +44,12 @@ function ve() {
44
44
  }
45
45
  }
46
46
  }
47
- function f(e) {
47
+ function u(e) {
48
48
  return m(e) === E;
49
49
  }
50
- return o.AsyncMode = d, o.ConcurrentMode = E, o.ContextConsumer = y, o.ContextProvider = s, o.Element = n, o.ForwardRef = v, o.Fragment = u, o.Lazy = _, o.Memo = S, o.Portal = c, o.Profiler = i, o.StrictMode = l, o.Suspense = p, o.isAsyncMode = function(e) {
51
- return f(e) || m(e) === d;
52
- }, o.isConcurrentMode = f, o.isContextConsumer = function(e) {
50
+ return o.AsyncMode = d, o.ConcurrentMode = E, o.ContextConsumer = y, o.ContextProvider = s, o.Element = n, o.ForwardRef = v, o.Fragment = f, o.Lazy = _, o.Memo = S, o.Portal = c, o.Profiler = i, o.StrictMode = l, o.Suspense = p, o.isAsyncMode = function(e) {
51
+ return u(e) || m(e) === d;
52
+ }, o.isConcurrentMode = u, o.isContextConsumer = function(e) {
53
53
  return m(e) === y;
54
54
  }, o.isContextProvider = function(e) {
55
55
  return m(e) === s;
@@ -58,7 +58,7 @@ function ve() {
58
58
  }, o.isForwardRef = function(e) {
59
59
  return m(e) === v;
60
60
  }, o.isFragment = function(e) {
61
- return m(e) === u;
61
+ return m(e) === f;
62
62
  }, o.isLazy = function(e) {
63
63
  return m(e) === _;
64
64
  }, o.isMemo = function(e) {
@@ -72,7 +72,7 @@ function ve() {
72
72
  }, o.isSuspense = function(e) {
73
73
  return m(e) === p;
74
74
  }, o.isValidElementType = function(e) {
75
- return typeof e == "string" || typeof e == "function" || e === u || e === E || e === i || e === l || e === p || e === R || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === S || e.$$typeof === s || e.$$typeof === y || e.$$typeof === v || e.$$typeof === x || e.$$typeof === P || e.$$typeof === A || e.$$typeof === $);
75
+ return typeof e == "string" || typeof e == "function" || e === f || e === E || e === i || e === l || e === p || e === R || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === S || e.$$typeof === s || e.$$typeof === y || e.$$typeof === v || e.$$typeof === P || e.$$typeof === $ || e.$$typeof === A || e.$$typeof === x);
76
76
  }, o.typeOf = m, o;
77
77
  }
78
78
  var a = {};
@@ -85,14 +85,14 @@ var a = {};
85
85
  * LICENSE file in the root directory of this source tree.
86
86
  */
87
87
  var Y;
88
- function pe() {
88
+ function ve() {
89
89
  return Y || (Y = 1, process.env.NODE_ENV !== "production" && function() {
90
- var r = typeof Symbol == "function" && Symbol.for, n = r ? Symbol.for("react.element") : 60103, c = r ? Symbol.for("react.portal") : 60106, u = r ? Symbol.for("react.fragment") : 60107, l = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, s = r ? Symbol.for("react.provider") : 60109, y = r ? Symbol.for("react.context") : 60110, d = r ? Symbol.for("react.async_mode") : 60111, E = r ? Symbol.for("react.concurrent_mode") : 60111, v = r ? Symbol.for("react.forward_ref") : 60112, p = r ? Symbol.for("react.suspense") : 60113, R = r ? Symbol.for("react.suspense_list") : 60120, S = r ? Symbol.for("react.memo") : 60115, _ = r ? Symbol.for("react.lazy") : 60116, $ = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, P = r ? Symbol.for("react.responder") : 60118, A = r ? Symbol.for("react.scope") : 60119;
90
+ var r = typeof Symbol == "function" && Symbol.for, n = r ? Symbol.for("react.element") : 60103, c = r ? Symbol.for("react.portal") : 60106, f = r ? Symbol.for("react.fragment") : 60107, l = r ? Symbol.for("react.strict_mode") : 60108, i = r ? Symbol.for("react.profiler") : 60114, s = r ? Symbol.for("react.provider") : 60109, y = r ? Symbol.for("react.context") : 60110, d = r ? Symbol.for("react.async_mode") : 60111, E = r ? Symbol.for("react.concurrent_mode") : 60111, v = r ? Symbol.for("react.forward_ref") : 60112, p = r ? Symbol.for("react.suspense") : 60113, R = r ? Symbol.for("react.suspense_list") : 60120, S = r ? Symbol.for("react.memo") : 60115, _ = r ? Symbol.for("react.lazy") : 60116, x = r ? Symbol.for("react.block") : 60121, P = r ? Symbol.for("react.fundamental") : 60117, $ = r ? Symbol.for("react.responder") : 60118, A = r ? Symbol.for("react.scope") : 60119;
91
91
  function m(t) {
92
92
  return typeof t == "string" || typeof t == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
93
- t === u || t === E || t === i || t === l || t === p || t === R || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === S || t.$$typeof === s || t.$$typeof === y || t.$$typeof === v || t.$$typeof === x || t.$$typeof === P || t.$$typeof === A || t.$$typeof === $);
93
+ t === f || t === E || t === i || t === l || t === p || t === R || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === S || t.$$typeof === s || t.$$typeof === y || t.$$typeof === v || t.$$typeof === P || t.$$typeof === $ || t.$$typeof === A || t.$$typeof === x);
94
94
  }
95
- function f(t) {
95
+ function u(t) {
96
96
  if (typeof t == "object" && t !== null) {
97
97
  var M = t.$$typeof;
98
98
  switch (M) {
@@ -101,7 +101,7 @@ function pe() {
101
101
  switch (C) {
102
102
  case d:
103
103
  case E:
104
- case u:
104
+ case f:
105
105
  case i:
106
106
  case l:
107
107
  case p:
@@ -124,57 +124,57 @@ function pe() {
124
124
  }
125
125
  }
126
126
  }
127
- var e = d, T = E, q = y, V = s, U = n, X = v, G = u, J = _, W = S, j = c, B = i, H = l, K = p, g = !1;
128
- function Z(t) {
129
- return g || (g = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), O(t) || f(t) === d;
127
+ var e = d, T = E, q = y, V = s, U = n, X = v, J = f, W = _, j = S, G = c, B = i, K = l, Z = p, g = !1;
128
+ function H(t) {
129
+ return g || (g = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), O(t) || u(t) === d;
130
130
  }
131
131
  function O(t) {
132
- return f(t) === E;
132
+ return u(t) === E;
133
133
  }
134
134
  function Q(t) {
135
- return f(t) === y;
135
+ return u(t) === y;
136
136
  }
137
137
  function ee(t) {
138
- return f(t) === s;
138
+ return u(t) === s;
139
139
  }
140
140
  function re(t) {
141
141
  return typeof t == "object" && t !== null && t.$$typeof === n;
142
142
  }
143
143
  function te(t) {
144
- return f(t) === v;
144
+ return u(t) === v;
145
145
  }
146
146
  function ne(t) {
147
- return f(t) === u;
147
+ return u(t) === f;
148
148
  }
149
149
  function oe(t) {
150
- return f(t) === _;
150
+ return u(t) === _;
151
151
  }
152
152
  function ae(t) {
153
- return f(t) === S;
153
+ return u(t) === S;
154
154
  }
155
155
  function se(t) {
156
- return f(t) === c;
156
+ return u(t) === c;
157
157
  }
158
158
  function ie(t) {
159
- return f(t) === i;
159
+ return u(t) === i;
160
160
  }
161
161
  function ce(t) {
162
- return f(t) === l;
162
+ return u(t) === l;
163
163
  }
164
- function ue(t) {
165
- return f(t) === p;
164
+ function fe(t) {
165
+ return u(t) === p;
166
166
  }
167
- a.AsyncMode = e, a.ConcurrentMode = T, a.ContextConsumer = q, a.ContextProvider = V, a.Element = U, a.ForwardRef = X, a.Fragment = G, a.Lazy = J, a.Memo = W, a.Portal = j, a.Profiler = B, a.StrictMode = H, a.Suspense = K, a.isAsyncMode = Z, a.isConcurrentMode = O, a.isContextConsumer = Q, a.isContextProvider = ee, a.isElement = re, a.isForwardRef = te, a.isFragment = ne, a.isLazy = oe, a.isMemo = ae, a.isPortal = se, a.isProfiler = ie, a.isStrictMode = ce, a.isSuspense = ue, a.isValidElementType = m, a.typeOf = f;
167
+ a.AsyncMode = e, a.ConcurrentMode = T, a.ContextConsumer = q, a.ContextProvider = V, a.Element = U, a.ForwardRef = X, a.Fragment = J, a.Lazy = W, a.Memo = j, a.Portal = G, a.Profiler = B, a.StrictMode = K, a.Suspense = Z, a.isAsyncMode = H, a.isConcurrentMode = O, a.isContextConsumer = Q, a.isContextProvider = ee, a.isElement = re, a.isForwardRef = te, a.isFragment = ne, a.isLazy = oe, a.isMemo = ae, a.isPortal = se, a.isProfiler = ie, a.isStrictMode = ce, a.isSuspense = fe, a.isValidElementType = m, a.typeOf = u;
168
168
  }()), a;
169
169
  }
170
- process.env.NODE_ENV === "production" ? h.exports = ve() : h.exports = pe();
171
- var Se = h.exports, z = Se, _e = {
170
+ process.env.NODE_ENV === "production" ? h.exports = Ee() : h.exports = ve();
171
+ var pe = h.exports, D = pe, Se = {
172
172
  $$typeof: !0,
173
173
  render: !0,
174
174
  defaultProps: !0,
175
175
  displayName: !0,
176
176
  propTypes: !0
177
- }, Te = {
177
+ }, _e = {
178
178
  $$typeof: !0,
179
179
  compare: !0,
180
180
  defaultProps: !0,
@@ -182,54 +182,54 @@ var Se = h.exports, z = Se, _e = {
182
182
  propTypes: !0,
183
183
  type: !0
184
184
  }, k = {};
185
- k[z.ForwardRef] = _e;
186
- k[z.Memo] = Te;
185
+ k[D.ForwardRef] = Se;
186
+ k[D.Memo] = _e;
187
187
  var N = function(n, c) {
188
- var u = arguments;
189
- if (c == null || !fe.call(c, "css"))
190
- return b.createElement.apply(void 0, u);
191
- var l = u.length, i = new Array(l);
188
+ var f = arguments;
189
+ if (c == null || !ue.call(c, "css"))
190
+ return b.createElement.apply(void 0, f);
191
+ var l = f.length, i = new Array(l);
192
192
  i[0] = le, i[1] = me(n, c);
193
193
  for (var s = 2; s < l; s++)
194
- i[s] = u[s];
194
+ i[s] = f[s];
195
195
  return b.createElement.apply(null, i);
196
196
  };
197
197
  (function(r) {
198
198
  var n;
199
199
  n || (n = r.JSX || (r.JSX = {}));
200
200
  })(N || (N = {}));
201
- var Pe = /* @__PURE__ */ ye(function(r, n) {
202
- var c = r.styles, u = L([c], void 0, b.useContext(D)), l = b.useRef();
203
- return F(function() {
201
+ var Re = /* @__PURE__ */ ye(function(r, n) {
202
+ var c = r.styles, f = L([c], void 0, b.useContext(z)), l = b.useRef();
203
+ return I(function() {
204
204
  var i = n.key + "-global", s = new n.sheet.constructor({
205
205
  key: i,
206
206
  nonce: n.sheet.nonce,
207
207
  container: n.sheet.container,
208
208
  speedy: n.sheet.isSpeedy
209
- }), y = !1, d = document.querySelector('style[data-emotion="' + i + " " + u.name + '"]');
209
+ }), y = !1, d = document.querySelector('style[data-emotion="' + i + " " + f.name + '"]');
210
210
  return n.sheet.tags.length && (s.before = n.sheet.tags[0]), d !== null && (y = !0, d.setAttribute("data-emotion", i), s.hydrate([d])), l.current = [s, y], function() {
211
211
  s.flush();
212
212
  };
213
- }, [n]), F(function() {
213
+ }, [n]), I(function() {
214
214
  var i = l.current, s = i[0], y = i[1];
215
215
  if (y) {
216
216
  i[1] = !1;
217
217
  return;
218
218
  }
219
- if (u.next !== void 0 && de(n, u.next, !0), s.tags.length) {
219
+ if (f.next !== void 0 && de(n, f.next, !0), s.tags.length) {
220
220
  var d = s.tags[s.tags.length - 1].nextElementSibling;
221
221
  s.before = d, s.flush();
222
222
  }
223
- n.insert("", u, s, !1);
224
- }, [n, u.name]), null;
223
+ n.insert("", f, s, !1);
224
+ }, [n, f.name]), null;
225
225
  });
226
- function be() {
226
+ function Te() {
227
227
  for (var r = arguments.length, n = new Array(r), c = 0; c < r; c++)
228
228
  n[c] = arguments[c];
229
229
  return L(n);
230
230
  }
231
- function Ae() {
232
- var r = be.apply(void 0, arguments), n = "animation-" + r.name;
231
+ function xe() {
232
+ var r = Te.apply(void 0, arguments), n = "animation-" + r.name;
233
233
  return {
234
234
  name: n,
235
235
  styles: "@keyframes " + n + "{" + r.styles + "}",
@@ -239,20 +239,16 @@ function Ae() {
239
239
  }
240
240
  };
241
241
  }
242
- function Ce(r) {
242
+ function be(r) {
243
243
  return Object.keys(r).length === 0;
244
244
  }
245
- function Re(r = null) {
246
- const n = b.useContext(D);
247
- return !n || Ce(n) ? r : n;
248
- }
249
- const $e = Ee();
250
- function Me(r = $e) {
251
- return Re(r);
245
+ function Pe(r = null) {
246
+ const n = b.useContext(z);
247
+ return !n || be(n) ? r : n;
252
248
  }
253
249
  export {
254
- Pe as G,
255
- be as c,
256
- Ae as k,
257
- Me as u
250
+ Re as G,
251
+ Te as c,
252
+ xe as k,
253
+ Pe as u
258
254
  };
@@ -1,5 +1,5 @@
1
- import { _ as k, f as I, T as A } from "./ButtonBase.js";
2
- import { M as U, P as c } from "./DefaultPropsProvider.js";
1
+ import { _ as k, g as I, T as A } from "./ButtonBase.js";
2
+ import { q as U, P as c } from "./createTheme.js";
3
3
  import T from "react";
4
4
  var N = { exports: {} }, y = {};
5
5
  /**