@notificationapi/react 1.7.0 → 1.9.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 (47) hide show
  1. package/dist/assets/Badge.js +60 -64
  2. package/dist/assets/Box.js +26 -24
  3. package/dist/assets/Button.js +22 -19
  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 +22 -18
  8. package/dist/assets/GlobalStyles.js +23 -0
  9. package/dist/assets/Grow.js +1513 -120
  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 +8 -8
  15. package/dist/assets/Popover.js +37 -36
  16. package/dist/assets/Portal.js +39 -49
  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/exactProp.js +13 -0
  22. package/dist/assets/index.js +19 -148
  23. package/dist/assets/index2.js +151 -0
  24. package/dist/assets/useControlled.js +49 -0
  25. package/dist/assets/usePreviousProps.js +10 -0
  26. package/dist/assets/useTheme.js +6 -7
  27. package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
  28. package/dist/assets/utils.js +4 -4
  29. package/dist/components/Notifications/Inbox.js +593 -583
  30. package/dist/components/Notifications/InboxHeader.js +360 -1754
  31. package/dist/components/Notifications/Notification.js +4 -2
  32. package/dist/components/Notifications/NotificationFeed.js +40 -32
  33. package/dist/components/Notifications/NotificationLauncher.js +90 -64
  34. package/dist/components/Notifications/NotificationPopup.js +76 -65
  35. package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
  36. package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
  37. package/dist/components/Preferences/PreferenceInput.js +427 -414
  38. package/dist/components/Preferences/Preferences.js +329 -278
  39. package/dist/components/Provider/index.d.ts +2 -0
  40. package/dist/components/Provider/index.js +1008 -401
  41. package/dist/components/Slack/SlackConnect.js +4627 -2024
  42. package/dist/main.d.ts +2 -0
  43. package/dist/main.js +6 -3
  44. package/dist/utils/theme.d.ts +17 -0
  45. package/dist/utils/theme.js +104 -0
  46. package/package.json +1 -1
  47. package/dist/assets/dividerClasses.js +0 -56
@@ -1,8 +1,12 @@
1
1
  import * as A from "react";
2
- import { s as b, m as u, a as D, u as T, c as R, P as i, b as S } from "./DefaultPropsProvider.js";
3
- import { g as C } from "./dividerClasses.js";
2
+ import { g as C, b as D, P as i } from "./createTheme.js";
3
+ import { g as R, s as u, m as b, u as T, c as S, a as L } from "./DefaultPropsProvider.js";
4
4
  import { jsx as v } from "react/jsx-runtime";
5
- const L = (e) => {
5
+ function W(e) {
6
+ return C("MuiDivider", e);
7
+ }
8
+ R("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
9
+ const I = (e) => {
6
10
  const {
7
11
  absolute: t,
8
12
  children: r,
@@ -13,11 +17,11 @@ const L = (e) => {
13
17
  textAlign: a,
14
18
  variant: l
15
19
  } = e;
16
- return S({
20
+ return L({
17
21
  root: ["root", t && "absolute", l, n && "light", o === "vertical" && "vertical", p && "flexItem", r && "withChildren", r && o === "vertical" && "withChildrenVertical", a === "right" && o !== "vertical" && "textAlignRight", a === "left" && o !== "vertical" && "textAlignLeft"],
18
22
  wrapper: ["wrapper", o === "vertical" && "wrapperVertical"]
19
- }, C, s);
20
- }, O = b("div", {
23
+ }, W, s);
24
+ }, O = u("div", {
21
25
  name: "MuiDivider",
22
26
  slot: "Root",
23
27
  overridesResolver: (e, t) => {
@@ -26,7 +30,7 @@ const L = (e) => {
26
30
  } = e;
27
31
  return [t.root, r.absolute && t.absolute, t[r.variant], r.light && t.light, r.orientation === "vertical" && t.vertical, r.flexItem && t.flexItem, r.children && t.withChildren, r.children && r.orientation === "vertical" && t.withChildrenVertical, r.textAlign === "right" && r.orientation !== "vertical" && t.textAlignRight, r.textAlign === "left" && r.orientation !== "vertical" && t.textAlignLeft];
28
32
  }
29
- })(u(({
33
+ })(b(({
30
34
  theme: e
31
35
  }) => ({
32
36
  margin: 0,
@@ -158,7 +162,7 @@ const L = (e) => {
158
162
  }
159
163
  }
160
164
  }]
161
- }))), W = b("span", {
165
+ }))), V = u("span", {
162
166
  name: "MuiDivider",
163
167
  slot: "Wrapper",
164
168
  overridesResolver: (e, t) => {
@@ -167,7 +171,7 @@ const L = (e) => {
167
171
  } = e;
168
172
  return [t.wrapper, r.orientation === "vertical" && t.wrapperVertical];
169
173
  }
170
- })(u(({
174
+ })(b(({
171
175
  theme: e
172
176
  }) => ({
173
177
  display: "inline-block",
@@ -183,7 +187,7 @@ const L = (e) => {
183
187
  paddingBottom: `calc(${e.spacing(1)} * 1.2)`
184
188
  }
185
189
  }]
186
- }))), f = /* @__PURE__ */ A.forwardRef(function(t, r) {
190
+ }))), g = /* @__PURE__ */ A.forwardRef(function(t, r) {
187
191
  const s = T({
188
192
  props: t,
189
193
  name: "MuiDivider"
@@ -193,7 +197,7 @@ const L = (e) => {
193
197
  className: o,
194
198
  orientation: a = "horizontal",
195
199
  component: l = n || a === "vertical" ? "div" : "hr",
196
- flexItem: g = !1,
200
+ flexItem: f = !1,
197
201
  light: m = !1,
198
202
  role: c = l !== "hr" ? "separator" : void 0,
199
203
  textAlign: x = "center",
@@ -203,30 +207,30 @@ const L = (e) => {
203
207
  ...s,
204
208
  absolute: p,
205
209
  component: l,
206
- flexItem: g,
210
+ flexItem: f,
207
211
  light: m,
208
212
  orientation: a,
209
213
  role: c,
210
214
  textAlign: x,
211
215
  variant: w
212
- }, h = L(d);
216
+ }, h = I(d);
213
217
  return /* @__PURE__ */ v(O, {
214
218
  as: l,
215
- className: R(h.root, o),
219
+ className: S(h.root, o),
216
220
  role: c,
217
221
  ref: r,
218
222
  ownerState: d,
219
223
  "aria-orientation": c === "separator" && (l !== "hr" || a === "vertical") ? a : void 0,
220
224
  ...y,
221
- children: n ? /* @__PURE__ */ v(W, {
225
+ children: n ? /* @__PURE__ */ v(V, {
222
226
  className: h.wrapper,
223
227
  ownerState: d,
224
228
  children: n
225
229
  }) : null
226
230
  });
227
231
  });
228
- f && (f.muiSkipListHighlight = !0);
229
- process.env.NODE_ENV !== "production" && (f.propTypes = {
232
+ g && (g.muiSkipListHighlight = !0);
233
+ process.env.NODE_ENV !== "production" && (g.propTypes = {
230
234
  // ┌────────────────────────────── Warning ──────────────────────────────┐
231
235
  // │ These PropTypes are generated from the TypeScript type definitions. │
232
236
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -290,5 +294,5 @@ process.env.NODE_ENV !== "production" && (f.propTypes = {
290
294
  variant: i.oneOfType([i.oneOf(["fullWidth", "inset", "middle"]), i.string])
291
295
  });
292
296
  export {
293
- f as D
297
+ g as D
294
298
  };
@@ -0,0 +1,23 @@
1
+ import "react";
2
+ import { P as e } from "./createTheme.js";
3
+ import { G as r } from "./useThemeWithoutDefault.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ function p(t) {
6
+ return t == null || Object.keys(t).length === 0;
7
+ }
8
+ function y(t) {
9
+ const {
10
+ styles: o,
11
+ defaultTheme: l = {}
12
+ } = t;
13
+ return /* @__PURE__ */ n(r, {
14
+ styles: typeof o == "function" ? (s) => o(p(s) ? l : s) : o
15
+ });
16
+ }
17
+ process.env.NODE_ENV !== "production" && (y.propTypes = {
18
+ defaultTheme: e.object,
19
+ styles: e.oneOfType([e.array, e.string, e.object, e.func])
20
+ });
21
+ export {
22
+ y as G
23
+ };