@notificationapi/react 1.4.1 → 1.5.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 (44) hide show
  1. package/dist/assets/Badge.js +1 -1
  2. package/dist/assets/Box.js +13 -13
  3. package/dist/assets/Button.js +781 -0
  4. package/dist/assets/ButtonBase.js +409 -622
  5. package/dist/assets/DefaultPropsProvider.js +220 -215
  6. package/dist/assets/Divider.js +105 -154
  7. package/dist/assets/Grow.js +201 -0
  8. package/dist/assets/IconButton.js +1 -1
  9. package/dist/assets/List.js +142 -0
  10. package/dist/assets/Modal.js +1094 -0
  11. package/dist/assets/Notification.js +71 -71
  12. package/dist/assets/Paper.js +1 -1
  13. package/dist/assets/Popover.js +8 -6
  14. package/dist/assets/Portal.js +2 -2
  15. package/dist/assets/Stack.js +216 -0
  16. package/dist/assets/Typography.js +193 -117
  17. package/dist/assets/WebPushOptInMessage.js +40 -814
  18. package/dist/assets/createSvgIcon.js +5 -5
  19. package/dist/assets/dividerClasses.js +56 -0
  20. package/dist/assets/index.js +151 -0
  21. package/dist/assets/useTheme2.js +253 -11
  22. package/dist/assets/utils.js +4 -4
  23. package/dist/components/Notifications/Inbox.js +2927 -9
  24. package/dist/components/Notifications/InboxHeader.js +2146 -7
  25. package/dist/components/Notifications/NotificationFeed.js +13 -13
  26. package/dist/components/Notifications/NotificationLauncher.js +2 -2
  27. package/dist/components/Notifications/NotificationPopup.js +7 -7
  28. package/dist/components/Preferences/NotificationPreferencesPopup.js +608 -7
  29. package/dist/components/Preferences/PreferenceInput.js +1451 -6
  30. package/dist/components/Preferences/Preferences.js +368 -515
  31. package/dist/components/Preferences/index.js +1 -1
  32. package/dist/components/Provider/index.js +226 -202
  33. package/dist/components/Slack/SlackConnect.d.ts +12 -0
  34. package/dist/components/Slack/SlackConnect.js +4826 -0
  35. package/dist/components/Slack/index.d.ts +1 -0
  36. package/dist/components/Slack/index.js +4 -0
  37. package/dist/components/WebPush/WebPushOptInMessage.js +3 -2
  38. package/dist/main.d.ts +1 -0
  39. package/dist/main.js +5 -3
  40. package/package.json +4 -4
  41. package/dist/assets/Inbox.js +0 -3061
  42. package/dist/assets/InboxHeader.js +0 -2338
  43. package/dist/assets/NotificationPreferencesPopup.js +0 -1694
  44. package/dist/assets/PreferenceInput.js +0 -1657
@@ -0,0 +1,142 @@
1
+ import * as i from "react";
2
+ import { g as y, e as h, s as L, u as v, c as x, P as s, b as N } from "./DefaultPropsProvider.js";
3
+ import { jsx as C, jsxs as P } from "react/jsx-runtime";
4
+ function w(e, o) {
5
+ var t, n, a;
6
+ return /* @__PURE__ */ i.isValidElement(e) && o.indexOf(
7
+ // For server components `muiName` is avaialble in element.type._payload.value.muiName
8
+ // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
9
+ // eslint-disable-next-line no-underscore-dangle
10
+ e.type.muiName ?? ((a = (n = (t = e.type) == null ? void 0 : t._payload) == null ? void 0 : n.value) == null ? void 0 : a.muiName)
11
+ ) !== -1;
12
+ }
13
+ function S(e) {
14
+ return typeof e == "string";
15
+ }
16
+ const c = /* @__PURE__ */ i.createContext({});
17
+ process.env.NODE_ENV !== "production" && (c.displayName = "ListContext");
18
+ function T(e) {
19
+ return h("MuiList", e);
20
+ }
21
+ y("MuiList", ["root", "padding", "dense", "subheader"]);
22
+ const E = (e) => {
23
+ const {
24
+ classes: o,
25
+ disablePadding: t,
26
+ dense: n,
27
+ subheader: a
28
+ } = e;
29
+ return N({
30
+ root: ["root", !t && "padding", n && "dense", a && "subheader"]
31
+ }, T, o);
32
+ }, M = L("ul", {
33
+ name: "MuiList",
34
+ slot: "Root",
35
+ overridesResolver: (e, o) => {
36
+ const {
37
+ ownerState: t
38
+ } = e;
39
+ return [o.root, !t.disablePadding && o.padding, t.dense && o.dense, t.subheader && o.subheader];
40
+ }
41
+ })({
42
+ listStyle: "none",
43
+ margin: 0,
44
+ padding: 0,
45
+ position: "relative",
46
+ variants: [{
47
+ props: ({
48
+ ownerState: e
49
+ }) => !e.disablePadding,
50
+ style: {
51
+ paddingTop: 8,
52
+ paddingBottom: 8
53
+ }
54
+ }, {
55
+ props: ({
56
+ ownerState: e
57
+ }) => e.subheader,
58
+ style: {
59
+ paddingTop: 0
60
+ }
61
+ }]
62
+ }), O = /* @__PURE__ */ i.forwardRef(function(o, t) {
63
+ const n = v({
64
+ props: o,
65
+ name: "MuiList"
66
+ }), {
67
+ children: a,
68
+ className: d,
69
+ component: l = "ul",
70
+ dense: r = !1,
71
+ disablePadding: u = !1,
72
+ subheader: m,
73
+ ...b
74
+ } = n, f = i.useMemo(() => ({
75
+ dense: r
76
+ }), [r]), p = {
77
+ ...n,
78
+ component: l,
79
+ dense: r,
80
+ disablePadding: u
81
+ }, g = E(p);
82
+ return /* @__PURE__ */ C(c.Provider, {
83
+ value: f,
84
+ children: /* @__PURE__ */ P(M, {
85
+ as: l,
86
+ className: x(g.root, d),
87
+ ref: t,
88
+ ownerState: p,
89
+ ...b,
90
+ children: [m, a]
91
+ })
92
+ });
93
+ });
94
+ process.env.NODE_ENV !== "production" && (O.propTypes = {
95
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
96
+ // │ These PropTypes are generated from the TypeScript type definitions. │
97
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
98
+ // └─────────────────────────────────────────────────────────────────────┘
99
+ /**
100
+ * The content of the component.
101
+ */
102
+ children: s.node,
103
+ /**
104
+ * Override or extend the styles applied to the component.
105
+ */
106
+ classes: s.object,
107
+ /**
108
+ * @ignore
109
+ */
110
+ className: s.string,
111
+ /**
112
+ * The component used for the root node.
113
+ * Either a string to use a HTML element or a component.
114
+ */
115
+ component: s.elementType,
116
+ /**
117
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used for
118
+ * the list and list items.
119
+ * The prop is available to descendant components as the `dense` context.
120
+ * @default false
121
+ */
122
+ dense: s.bool,
123
+ /**
124
+ * If `true`, vertical padding is removed from the list.
125
+ * @default false
126
+ */
127
+ disablePadding: s.bool,
128
+ /**
129
+ * The content of the subheader, normally `ListSubheader`.
130
+ */
131
+ subheader: s.node,
132
+ /**
133
+ * The system prop that allows defining system overrides as well as additional CSS styles.
134
+ */
135
+ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object])
136
+ });
137
+ export {
138
+ O as L,
139
+ w as a,
140
+ c as b,
141
+ S as i
142
+ };