@notificationapi/react 0.0.37 → 1.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.
Files changed (72) hide show
  1. package/dist/assets/Badge.js +456 -0
  2. package/dist/assets/Box.js +57 -0
  3. package/dist/assets/ButtonBase.js +1224 -0
  4. package/dist/assets/DefaultPropsProvider.js +4368 -0
  5. package/dist/assets/Divider.js +343 -0
  6. package/dist/assets/IconButton.js +225 -0
  7. package/dist/assets/Inbox.js +3051 -0
  8. package/dist/assets/InboxHeader.js +2338 -0
  9. package/dist/assets/Notification.js +5349 -7150
  10. package/dist/assets/NotificationPreferencesPopup.js +1694 -0
  11. package/dist/assets/Paper.js +154 -0
  12. package/dist/assets/Popover.js +451 -0
  13. package/dist/assets/Portal.js +110 -0
  14. package/dist/assets/PreferenceInput.js +1545 -1366
  15. package/dist/assets/Typography.js +292 -0
  16. package/dist/assets/WebPushOptInMessage.js +794 -407
  17. package/dist/assets/channelUtils.js +33 -65
  18. package/dist/assets/createSimplePaletteValueFilter.js +17 -0
  19. package/dist/assets/createSvgIcon.js +248 -0
  20. package/dist/assets/integerPropType.js +31 -0
  21. package/dist/assets/resolveComponentProps.js +93 -0
  22. package/dist/assets/style.css +1 -0
  23. package/dist/assets/useSlotProps.js +24 -0
  24. package/dist/assets/useTheme.js +10 -0
  25. package/dist/assets/useTheme2.js +16 -0
  26. package/dist/assets/utils.js +743 -0
  27. package/dist/components/Notifications/DefaultEmpty.d.ts +3 -0
  28. package/dist/components/Notifications/DefaultEmpty.js +7 -0
  29. package/dist/components/Notifications/Inbox.d.ts +4 -4
  30. package/dist/components/Notifications/Inbox.js +9 -6450
  31. package/dist/components/Notifications/InboxHeader.d.ts +1 -1
  32. package/dist/components/Notifications/InboxHeader.js +7 -53
  33. package/dist/components/Notifications/Notification.d.ts +3 -4
  34. package/dist/components/Notifications/Notification.js +6 -5
  35. package/dist/components/Notifications/NotificationCounter.js +16 -6
  36. package/dist/components/Notifications/NotificationFeed.d.ts +1 -2
  37. package/dist/components/Notifications/NotificationFeed.js +41 -38
  38. package/dist/components/Notifications/NotificationLauncher.d.ts +1 -0
  39. package/dist/components/Notifications/NotificationLauncher.js +100 -114
  40. package/dist/components/Notifications/NotificationPopup.d.ts +3 -4
  41. package/dist/components/Notifications/NotificationPopup.js +86 -88
  42. package/dist/components/Notifications/UnreadBadge.d.ts +7 -4
  43. package/dist/components/Notifications/UnreadBadge.js +28 -20
  44. package/dist/components/Notifications/interface.d.ts +0 -4
  45. package/dist/components/Notifications/interface.js +4 -5
  46. package/dist/components/Preferences/NotificationPreferencesInline.js +14 -14
  47. package/dist/components/Preferences/NotificationPreferencesPopup.js +7 -2068
  48. package/dist/components/Preferences/PreferenceInput.js +4 -3
  49. package/dist/components/Preferences/Preferences.js +1042 -547
  50. package/dist/components/Preferences/channelUtils.js +3 -4
  51. package/dist/components/Preferences/index.js +1 -1
  52. package/dist/components/Provider/context.d.ts +27 -0
  53. package/dist/components/Provider/context.js +7 -0
  54. package/dist/components/Provider/index.d.ts +2 -25
  55. package/dist/components/Provider/index.js +22 -24
  56. package/dist/components/WebPush/WebPushOptInMessage.js +3 -4
  57. package/dist/main.d.ts +1 -0
  58. package/dist/main.js +4 -4
  59. package/package.json +14 -12
  60. package/dist/assets/AntdIcon.js +0 -200
  61. package/dist/assets/CloseOutlined.js +0 -13
  62. package/dist/assets/PurePanel.js +0 -59
  63. package/dist/assets/RightOutlined.js +0 -13
  64. package/dist/assets/button.js +0 -1660
  65. package/dist/assets/colors.js +0 -36
  66. package/dist/assets/compact-item.js +0 -860
  67. package/dist/assets/index.js +0 -271
  68. package/dist/assets/index2.js +0 -647
  69. package/dist/assets/index3.js +0 -7527
  70. package/dist/assets/pickAttrs.js +0 -42
  71. package/dist/assets/presets.js +0 -810
  72. package/dist/assets/reactNode.js +0 -20821
@@ -1,406 +1,798 @@
1
- import { jsx as S, jsxs as P } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { useContext as ie } from "react";
4
- import { NotificationAPIContext as le } from "../components/Provider/index.js";
5
- import { a as $, c as z } from "./presets.js";
6
- import { I as E } from "./AntdIcon.js";
7
- import { R as ce } from "./compact-item.js";
8
- import { R as se } from "./CloseOutlined.js";
9
- import { g as ae, r as de, u as V, f as ue, a as pe, e as me, i as fe, j as ge, k as _, l as ve, n as ye, o as Ce, _ as he, b as be } from "./reactNode.js";
10
- import { p as Ie } from "./pickAttrs.js";
11
- import { B as H } from "./button.js";
12
- var Se = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, xe = function(e, n) {
13
- return /* @__PURE__ */ i.createElement(E, $({}, e, {
14
- ref: n,
15
- icon: Se
16
- }));
17
- }, k = /* @__PURE__ */ i.forwardRef(xe);
18
- process.env.NODE_ENV !== "production" && (k.displayName = "CheckCircleFilled");
19
- var $e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, Ee = function(e, n) {
20
- return /* @__PURE__ */ i.createElement(E, $({}, e, {
21
- ref: n,
22
- icon: $e
23
- }));
24
- }, D = /* @__PURE__ */ i.forwardRef(Ee);
25
- process.env.NODE_ENV !== "production" && (D.displayName = "ExclamationCircleFilled");
26
- var ze = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, Ne = function(e, n) {
27
- return /* @__PURE__ */ i.createElement(E, $({}, e, {
28
- ref: n,
29
- icon: ze
30
- }));
31
- }, W = /* @__PURE__ */ i.forwardRef(Ne);
32
- process.env.NODE_ENV !== "production" && (W.displayName = "InfoCircleFilled");
33
- const x = (o, e, n, t, l) => ({
34
- background: o,
35
- border: `${V(t.lineWidth)} ${t.lineType} ${e}`,
36
- [`${l}-icon`]: {
37
- color: n
38
- }
39
- }), we = (o) => {
1
+ import { jsx as r, jsxs as R } from "react/jsx-runtime";
2
+ import * as I from "react";
3
+ import { useContext as oo } from "react";
4
+ import { NotificationAPIContext as to } from "../components/Provider/context.js";
5
+ import { c as m } from "./createSvgIcon.js";
6
+ import { g as G, a as _, s as S, h as i, m as Z, r as j, t as V, u as Y, c as L, P as t, f as q, v as eo, b as O, w as no } from "./DefaultPropsProvider.js";
7
+ import { u as H, B as ao } from "./ButtonBase.js";
8
+ import { c as P } from "./createSimplePaletteValueFilter.js";
9
+ import { P as ro } from "./Paper.js";
10
+ import { I as so } from "./IconButton.js";
11
+ function io(o) {
12
+ return _("MuiAlert", o);
13
+ }
14
+ const F = G("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]), lo = m(/* @__PURE__ */ r("path", {
15
+ d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
16
+ }), "SuccessOutlined"), co = m(/* @__PURE__ */ r("path", {
17
+ d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
18
+ }), "ReportProblemOutlined"), po = m(/* @__PURE__ */ r("path", {
19
+ d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
20
+ }), "ErrorOutline"), uo = m(/* @__PURE__ */ r("path", {
21
+ d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
22
+ }), "InfoOutlined"), vo = m(/* @__PURE__ */ r("path", {
23
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
24
+ }), "Close"), go = (o) => {
40
25
  const {
41
- componentCls: e,
42
- motionDurationSlow: n,
43
- marginXS: t,
44
- marginSM: l,
45
- fontSize: c,
46
- fontSizeLG: a,
47
- lineHeight: p,
48
- borderRadiusLG: d,
49
- motionEaseInOutCirc: m,
50
- withDescriptionIconSize: v,
51
- colorText: y,
52
- colorTextHeading: C,
53
- withDescriptionPadding: h,
54
- defaultPadding: s
55
- } = o;
26
+ variant: n,
27
+ color: a,
28
+ severity: e,
29
+ classes: s
30
+ } = o, l = {
31
+ root: ["root", `color${i(a || e)}`, `${n}${i(a || e)}`, `${n}`],
32
+ icon: ["icon"],
33
+ message: ["message"],
34
+ action: ["action"]
35
+ };
36
+ return q(l, io, s);
37
+ }, fo = S(ro, {
38
+ name: "MuiAlert",
39
+ slot: "Root",
40
+ overridesResolver: (o, n) => {
41
+ const {
42
+ ownerState: a
43
+ } = o;
44
+ return [n.root, n[a.variant], n[`${a.variant}${i(a.color || a.severity)}`]];
45
+ }
46
+ })(Z(({
47
+ theme: o
48
+ }) => {
49
+ const n = o.palette.mode === "light" ? j : V, a = o.palette.mode === "light" ? V : j;
56
50
  return {
57
- [e]: Object.assign(Object.assign({}, de(o)), {
58
- position: "relative",
59
- display: "flex",
60
- alignItems: "center",
61
- padding: s,
62
- wordWrap: "break-word",
63
- borderRadius: d,
64
- [`&${e}-rtl`]: {
65
- direction: "rtl"
66
- },
67
- [`${e}-content`]: {
68
- flex: 1,
69
- minWidth: 0
70
- },
71
- [`${e}-icon`]: {
72
- marginInlineEnd: t,
73
- lineHeight: 0
74
- },
75
- "&-description": {
76
- display: "none",
77
- fontSize: c,
78
- lineHeight: p
79
- },
80
- "&-message": {
81
- color: C
82
- },
83
- [`&${e}-motion-leave`]: {
84
- overflow: "hidden",
85
- opacity: 1,
86
- transition: `max-height ${n} ${m}, opacity ${n} ${m},
87
- padding-top ${n} ${m}, padding-bottom ${n} ${m},
88
- margin-bottom ${n} ${m}`
51
+ ...o.typography.body2,
52
+ backgroundColor: "transparent",
53
+ display: "flex",
54
+ padding: "6px 16px",
55
+ variants: [...Object.entries(o.palette).filter(P(["light"])).map(([e]) => ({
56
+ props: {
57
+ colorSeverity: e,
58
+ variant: "standard"
89
59
  },
90
- [`&${e}-motion-leave-active`]: {
91
- maxHeight: 0,
92
- marginBottom: "0 !important",
93
- paddingTop: 0,
94
- paddingBottom: 0,
95
- opacity: 0
60
+ style: {
61
+ color: o.vars ? o.vars.palette.Alert[`${e}Color`] : n(o.palette[e].light, 0.6),
62
+ backgroundColor: o.vars ? o.vars.palette.Alert[`${e}StandardBg`] : a(o.palette[e].light, 0.9),
63
+ [`& .${F.icon}`]: o.vars ? {
64
+ color: o.vars.palette.Alert[`${e}IconColor`]
65
+ } : {
66
+ color: o.palette[e].main
67
+ }
96
68
  }
97
- }),
98
- [`${e}-with-description`]: {
99
- alignItems: "flex-start",
100
- padding: h,
101
- [`${e}-icon`]: {
102
- marginInlineEnd: l,
103
- fontSize: v,
104
- lineHeight: 0
69
+ })), ...Object.entries(o.palette).filter(P(["light"])).map(([e]) => ({
70
+ props: {
71
+ colorSeverity: e,
72
+ variant: "outlined"
105
73
  },
106
- [`${e}-message`]: {
107
- display: "block",
108
- marginBottom: t,
109
- color: C,
110
- fontSize: a
74
+ style: {
75
+ color: o.vars ? o.vars.palette.Alert[`${e}Color`] : n(o.palette[e].light, 0.6),
76
+ border: `1px solid ${(o.vars || o).palette[e].light}`,
77
+ [`& .${F.icon}`]: o.vars ? {
78
+ color: o.vars.palette.Alert[`${e}IconColor`]
79
+ } : {
80
+ color: o.palette[e].main
81
+ }
82
+ }
83
+ })), ...Object.entries(o.palette).filter(P(["dark"])).map(([e]) => ({
84
+ props: {
85
+ colorSeverity: e,
86
+ variant: "filled"
111
87
  },
112
- [`${e}-description`]: {
113
- display: "block",
114
- color: y
88
+ style: {
89
+ fontWeight: o.typography.fontWeightMedium,
90
+ ...o.vars ? {
91
+ color: o.vars.palette.Alert[`${e}FilledColor`],
92
+ backgroundColor: o.vars.palette.Alert[`${e}FilledBg`]
93
+ } : {
94
+ backgroundColor: o.palette.mode === "dark" ? o.palette[e].dark : o.palette[e].main,
95
+ color: o.palette.getContrastText(o.palette[e].main)
96
+ }
115
97
  }
98
+ }))]
99
+ };
100
+ })), yo = S("div", {
101
+ name: "MuiAlert",
102
+ slot: "Icon",
103
+ overridesResolver: (o, n) => n.icon
104
+ })({
105
+ marginRight: 12,
106
+ padding: "7px 0",
107
+ display: "flex",
108
+ fontSize: 22,
109
+ opacity: 0.9
110
+ }), xo = S("div", {
111
+ name: "MuiAlert",
112
+ slot: "Message",
113
+ overridesResolver: (o, n) => n.message
114
+ })({
115
+ padding: "8px 0",
116
+ minWidth: 0,
117
+ overflow: "auto"
118
+ }), D = S("div", {
119
+ name: "MuiAlert",
120
+ slot: "Action",
121
+ overridesResolver: (o, n) => n.action
122
+ })({
123
+ display: "flex",
124
+ alignItems: "flex-start",
125
+ padding: "4px 0 0 16px",
126
+ marginLeft: "auto",
127
+ marginRight: -8
128
+ }), U = {
129
+ success: /* @__PURE__ */ r(lo, {
130
+ fontSize: "inherit"
131
+ }),
132
+ warning: /* @__PURE__ */ r(co, {
133
+ fontSize: "inherit"
134
+ }),
135
+ error: /* @__PURE__ */ r(po, {
136
+ fontSize: "inherit"
137
+ }),
138
+ info: /* @__PURE__ */ r(uo, {
139
+ fontSize: "inherit"
140
+ })
141
+ }, J = /* @__PURE__ */ I.forwardRef(function(n, a) {
142
+ const e = Y({
143
+ props: n,
144
+ name: "MuiAlert"
145
+ }), {
146
+ action: s,
147
+ children: l,
148
+ className: d,
149
+ closeText: u = "Close",
150
+ color: c,
151
+ components: v = {},
152
+ componentsProps: h = {},
153
+ icon: g,
154
+ iconMapping: B = U,
155
+ onClose: f,
156
+ role: w = "alert",
157
+ severity: C = "success",
158
+ slotProps: A = {},
159
+ slots: T = {},
160
+ variant: $ = "standard",
161
+ ...M
162
+ } = e, p = {
163
+ ...e,
164
+ color: c,
165
+ severity: C,
166
+ variant: $,
167
+ colorSeverity: c || C
168
+ }, y = go(p), x = {
169
+ slots: {
170
+ closeButton: v.CloseButton,
171
+ closeIcon: v.CloseIcon,
172
+ ...T
116
173
  },
117
- [`${e}-banner`]: {
118
- marginBottom: 0,
119
- border: "0 !important",
120
- borderRadius: 0
174
+ slotProps: {
175
+ ...h,
176
+ ...A
121
177
  }
122
- };
123
- }, Oe = (o) => {
178
+ }, [b, N] = H("closeButton", {
179
+ elementType: so,
180
+ externalForwardedProps: x,
181
+ ownerState: p
182
+ }), [E, W] = H("closeIcon", {
183
+ elementType: vo,
184
+ externalForwardedProps: x,
185
+ ownerState: p
186
+ });
187
+ return /* @__PURE__ */ R(fo, {
188
+ role: w,
189
+ elevation: 0,
190
+ ownerState: p,
191
+ className: L(y.root, d),
192
+ ref: a,
193
+ ...M,
194
+ children: [g !== !1 ? /* @__PURE__ */ r(yo, {
195
+ ownerState: p,
196
+ className: y.icon,
197
+ children: g || B[C] || U[C]
198
+ }) : null, /* @__PURE__ */ r(xo, {
199
+ ownerState: p,
200
+ className: y.message,
201
+ children: l
202
+ }), s != null ? /* @__PURE__ */ r(D, {
203
+ ownerState: p,
204
+ className: y.action,
205
+ children: s
206
+ }) : null, s == null && f ? /* @__PURE__ */ r(D, {
207
+ ownerState: p,
208
+ className: y.action,
209
+ children: /* @__PURE__ */ r(b, {
210
+ size: "small",
211
+ "aria-label": u,
212
+ title: u,
213
+ color: "inherit",
214
+ onClick: f,
215
+ ...N,
216
+ children: /* @__PURE__ */ r(E, {
217
+ fontSize: "small",
218
+ ...W
219
+ })
220
+ })
221
+ }) : null]
222
+ });
223
+ });
224
+ process.env.NODE_ENV !== "production" && (J.propTypes = {
225
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
226
+ // │ These PropTypes are generated from the TypeScript type definitions. │
227
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
228
+ // └─────────────────────────────────────────────────────────────────────┘
229
+ /**
230
+ * The action to display. It renders after the message, at the end of the alert.
231
+ */
232
+ action: t.node,
233
+ /**
234
+ * The content of the component.
235
+ */
236
+ children: t.node,
237
+ /**
238
+ * Override or extend the styles applied to the component.
239
+ */
240
+ classes: t.object,
241
+ /**
242
+ * @ignore
243
+ */
244
+ className: t.string,
245
+ /**
246
+ * Override the default label for the *close popup* icon button.
247
+ *
248
+ * For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
249
+ * @default 'Close'
250
+ */
251
+ closeText: t.string,
252
+ /**
253
+ * The color of the component. Unless provided, the value is taken from the `severity` prop.
254
+ * It supports both default and custom theme colors, which can be added as shown in the
255
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
256
+ */
257
+ color: t.oneOfType([t.oneOf(["error", "info", "success", "warning"]), t.string]),
258
+ /**
259
+ * The components used for each slot inside.
260
+ *
261
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
262
+ *
263
+ * @default {}
264
+ */
265
+ components: t.shape({
266
+ CloseButton: t.elementType,
267
+ CloseIcon: t.elementType
268
+ }),
269
+ /**
270
+ * The extra props for the slot components.
271
+ * You can override the existing props or add new ones.
272
+ *
273
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
274
+ *
275
+ * @default {}
276
+ */
277
+ componentsProps: t.shape({
278
+ closeButton: t.object,
279
+ closeIcon: t.object
280
+ }),
281
+ /**
282
+ * Override the icon displayed before the children.
283
+ * Unless provided, the icon is mapped to the value of the `severity` prop.
284
+ * Set to `false` to remove the `icon`.
285
+ */
286
+ icon: t.node,
287
+ /**
288
+ * The component maps the `severity` prop to a range of different icons,
289
+ * for instance success to `<SuccessOutlined>`.
290
+ * If you wish to change this mapping, you can provide your own.
291
+ * Alternatively, you can use the `icon` prop to override the icon displayed.
292
+ */
293
+ iconMapping: t.shape({
294
+ error: t.node,
295
+ info: t.node,
296
+ success: t.node,
297
+ warning: t.node
298
+ }),
299
+ /**
300
+ * Callback fired when the component requests to be closed.
301
+ * When provided and no `action` prop is set, a close icon button is displayed that triggers the callback when clicked.
302
+ * @param {React.SyntheticEvent} event The event source of the callback.
303
+ */
304
+ onClose: t.func,
305
+ /**
306
+ * The ARIA role attribute of the element.
307
+ * @default 'alert'
308
+ */
309
+ role: t.string,
310
+ /**
311
+ * The severity of the alert. This defines the color and icon used.
312
+ * @default 'success'
313
+ */
314
+ severity: t.oneOfType([t.oneOf(["error", "info", "success", "warning"]), t.string]),
315
+ /**
316
+ * The props used for each slot inside.
317
+ * @default {}
318
+ */
319
+ slotProps: t.shape({
320
+ closeButton: t.oneOfType([t.func, t.object]),
321
+ closeIcon: t.oneOfType([t.func, t.object])
322
+ }),
323
+ /**
324
+ * The components used for each slot inside.
325
+ * @default {}
326
+ */
327
+ slots: t.shape({
328
+ closeButton: t.elementType,
329
+ closeIcon: t.elementType
330
+ }),
331
+ /**
332
+ * The system prop that allows defining system overrides as well as additional CSS styles.
333
+ */
334
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
335
+ /**
336
+ * The variant to use.
337
+ * @default 'standard'
338
+ */
339
+ variant: t.oneOfType([t.oneOf(["filled", "outlined", "standard"]), t.string])
340
+ });
341
+ function bo(o) {
342
+ return _("MuiButton", o);
343
+ }
344
+ const z = G("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), K = /* @__PURE__ */ I.createContext({});
345
+ process.env.NODE_ENV !== "production" && (K.displayName = "ButtonGroupContext");
346
+ const Q = /* @__PURE__ */ I.createContext(void 0);
347
+ process.env.NODE_ENV !== "production" && (Q.displayName = "ButtonGroupButtonContext");
348
+ const So = (o) => {
124
349
  const {
125
- componentCls: e,
126
- colorSuccess: n,
127
- colorSuccessBorder: t,
128
- colorSuccessBg: l,
129
- colorWarning: c,
130
- colorWarningBorder: a,
131
- colorWarningBg: p,
132
- colorError: d,
133
- colorErrorBorder: m,
134
- colorErrorBg: v,
135
- colorInfo: y,
136
- colorInfoBorder: C,
137
- colorInfoBg: h
138
- } = o;
350
+ color: n,
351
+ disableElevation: a,
352
+ fullWidth: e,
353
+ size: s,
354
+ variant: l,
355
+ classes: d
356
+ } = o, u = {
357
+ root: ["root", l, `${l}${i(n)}`, `size${i(s)}`, `${l}Size${i(s)}`, `color${i(n)}`, a && "disableElevation", e && "fullWidth"],
358
+ label: ["label"],
359
+ startIcon: ["icon", "startIcon", `iconSize${i(s)}`],
360
+ endIcon: ["icon", "endIcon", `iconSize${i(s)}`]
361
+ }, c = q(u, bo, d);
139
362
  return {
140
- [e]: {
141
- "&-success": x(l, t, n, o, e),
142
- "&-info": x(h, C, y, o, e),
143
- "&-warning": x(p, a, c, o, e),
144
- "&-error": Object.assign(Object.assign({}, x(v, m, d, o, e)), {
145
- [`${e}-description > pre`]: {
146
- margin: 0,
147
- padding: 0
148
- }
149
- })
150
- }
363
+ ...d,
364
+ // forward the focused, disabled, etc. classes to the ButtonBase
365
+ ...c
151
366
  };
152
- }, Me = (o) => {
153
- const {
154
- componentCls: e,
155
- iconCls: n,
156
- motionDurationMid: t,
157
- marginXS: l,
158
- fontSizeIcon: c,
159
- colorIcon: a,
160
- colorIconHover: p
161
- } = o;
367
+ }, X = [{
368
+ props: {
369
+ size: "small"
370
+ },
371
+ style: {
372
+ "& > *:nth-of-type(1)": {
373
+ fontSize: 18
374
+ }
375
+ }
376
+ }, {
377
+ props: {
378
+ size: "medium"
379
+ },
380
+ style: {
381
+ "& > *:nth-of-type(1)": {
382
+ fontSize: 20
383
+ }
384
+ }
385
+ }, {
386
+ props: {
387
+ size: "large"
388
+ },
389
+ style: {
390
+ "& > *:nth-of-type(1)": {
391
+ fontSize: 22
392
+ }
393
+ }
394
+ }], Co = S(ao, {
395
+ shouldForwardProp: (o) => eo(o) || o === "classes",
396
+ name: "MuiButton",
397
+ slot: "Root",
398
+ overridesResolver: (o, n) => {
399
+ const {
400
+ ownerState: a
401
+ } = o;
402
+ return [n.root, n[a.variant], n[`${a.variant}${i(a.color)}`], n[`size${i(a.size)}`], n[`${a.variant}Size${i(a.size)}`], a.color === "inherit" && n.colorInherit, a.disableElevation && n.disableElevation, a.fullWidth && n.fullWidth];
403
+ }
404
+ })(Z(({
405
+ theme: o
406
+ }) => {
407
+ const n = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
162
408
  return {
163
- [e]: {
164
- "&-action": {
165
- marginInlineStart: l
409
+ ...o.typography.button,
410
+ minWidth: 64,
411
+ padding: "6px 16px",
412
+ border: 0,
413
+ borderRadius: (o.vars || o).shape.borderRadius,
414
+ transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
415
+ duration: o.transitions.duration.short
416
+ }),
417
+ "&:hover": {
418
+ textDecoration: "none"
419
+ },
420
+ [`&.${z.disabled}`]: {
421
+ color: (o.vars || o).palette.action.disabled
422
+ },
423
+ variants: [{
424
+ props: {
425
+ variant: "contained"
426
+ },
427
+ style: {
428
+ color: "var(--variant-containedColor)",
429
+ backgroundColor: "var(--variant-containedBg)",
430
+ boxShadow: (o.vars || o).shadows[2],
431
+ "&:hover": {
432
+ boxShadow: (o.vars || o).shadows[4],
433
+ // Reset on touch devices, it doesn't add specificity
434
+ "@media (hover: none)": {
435
+ boxShadow: (o.vars || o).shadows[2]
436
+ }
437
+ },
438
+ "&:active": {
439
+ boxShadow: (o.vars || o).shadows[8]
440
+ },
441
+ [`&.${z.focusVisible}`]: {
442
+ boxShadow: (o.vars || o).shadows[6]
443
+ },
444
+ [`&.${z.disabled}`]: {
445
+ color: (o.vars || o).palette.action.disabled,
446
+ boxShadow: (o.vars || o).shadows[0],
447
+ backgroundColor: (o.vars || o).palette.action.disabledBackground
448
+ }
449
+ }
450
+ }, {
451
+ props: {
452
+ variant: "outlined"
453
+ },
454
+ style: {
455
+ padding: "5px 15px",
456
+ border: "1px solid currentColor",
457
+ borderColor: "var(--variant-outlinedBorder, currentColor)",
458
+ backgroundColor: "var(--variant-outlinedBg)",
459
+ color: "var(--variant-outlinedColor)",
460
+ [`&.${z.disabled}`]: {
461
+ border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
462
+ }
463
+ }
464
+ }, {
465
+ props: {
466
+ variant: "text"
166
467
  },
167
- [`${e}-close-icon`]: {
168
- marginInlineStart: l,
169
- padding: 0,
170
- overflow: "hidden",
171
- fontSize: c,
172
- lineHeight: V(c),
173
- backgroundColor: "transparent",
174
- border: "none",
175
- outline: "none",
176
- cursor: "pointer",
177
- [`${n}-close`]: {
178
- color: a,
179
- transition: `color ${t}`,
468
+ style: {
469
+ padding: "6px 8px",
470
+ color: "var(--variant-textColor)",
471
+ backgroundColor: "var(--variant-textBg)"
472
+ }
473
+ }, ...Object.entries(o.palette).filter(P()).map(([e]) => ({
474
+ props: {
475
+ color: e
476
+ },
477
+ style: {
478
+ "--variant-textColor": (o.vars || o).palette[e].main,
479
+ "--variant-outlinedColor": (o.vars || o).palette[e].main,
480
+ "--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / 0.5)` : O(o.palette[e].main, 0.5),
481
+ "--variant-containedColor": (o.vars || o).palette[e].contrastText,
482
+ "--variant-containedBg": (o.vars || o).palette[e].main,
483
+ "@media (hover: hover)": {
484
+ "&:hover": {
485
+ "--variant-containedBg": (o.vars || o).palette[e].dark,
486
+ "--variant-textBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : O(o.palette[e].main, o.palette.action.hoverOpacity),
487
+ "--variant-outlinedBorder": (o.vars || o).palette[e].main,
488
+ "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : O(o.palette[e].main, o.palette.action.hoverOpacity)
489
+ }
490
+ }
491
+ }
492
+ })), {
493
+ props: {
494
+ color: "inherit"
495
+ },
496
+ style: {
497
+ color: "inherit",
498
+ borderColor: "currentColor",
499
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : n,
500
+ "@media (hover: hover)": {
180
501
  "&:hover": {
181
- color: p
502
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
503
+ "--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : O(o.palette.text.primary, o.palette.action.hoverOpacity),
504
+ "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : O(o.palette.text.primary, o.palette.action.hoverOpacity)
182
505
  }
183
506
  }
507
+ }
508
+ }, {
509
+ props: {
510
+ size: "small",
511
+ variant: "text"
512
+ },
513
+ style: {
514
+ padding: "4px 5px",
515
+ fontSize: o.typography.pxToRem(13)
516
+ }
517
+ }, {
518
+ props: {
519
+ size: "large",
520
+ variant: "text"
521
+ },
522
+ style: {
523
+ padding: "8px 11px",
524
+ fontSize: o.typography.pxToRem(15)
525
+ }
526
+ }, {
527
+ props: {
528
+ size: "small",
529
+ variant: "outlined"
530
+ },
531
+ style: {
532
+ padding: "3px 9px",
533
+ fontSize: o.typography.pxToRem(13)
534
+ }
535
+ }, {
536
+ props: {
537
+ size: "large",
538
+ variant: "outlined"
539
+ },
540
+ style: {
541
+ padding: "7px 21px",
542
+ fontSize: o.typography.pxToRem(15)
543
+ }
544
+ }, {
545
+ props: {
546
+ size: "small",
547
+ variant: "contained"
548
+ },
549
+ style: {
550
+ padding: "4px 10px",
551
+ fontSize: o.typography.pxToRem(13)
552
+ }
553
+ }, {
554
+ props: {
555
+ size: "large",
556
+ variant: "contained"
557
+ },
558
+ style: {
559
+ padding: "8px 22px",
560
+ fontSize: o.typography.pxToRem(15)
561
+ }
562
+ }, {
563
+ props: {
564
+ disableElevation: !0
184
565
  },
185
- "&-close-text": {
186
- color: a,
187
- transition: `color ${t}`,
566
+ style: {
567
+ boxShadow: "none",
188
568
  "&:hover": {
189
- color: p
569
+ boxShadow: "none"
570
+ },
571
+ [`&.${z.focusVisible}`]: {
572
+ boxShadow: "none"
573
+ },
574
+ "&:active": {
575
+ boxShadow: "none"
576
+ },
577
+ [`&.${z.disabled}`]: {
578
+ boxShadow: "none"
190
579
  }
191
580
  }
192
- }
193
- };
194
- }, Be = (o) => ({
195
- withDescriptionIconSize: o.fontSizeHeading3,
196
- defaultPadding: `${o.paddingContentVerticalSM}px 12px`,
197
- withDescriptionPadding: `${o.paddingMD}px ${o.paddingContentHorizontalLG}px`
198
- }), Re = ae("Alert", (o) => [we(o), Oe(o), Me(o)], Be);
199
- var j = function(o, e) {
200
- var n = {};
201
- for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && e.indexOf(t) < 0 && (n[t] = o[t]);
202
- if (o != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(o); l < t.length; l++)
203
- e.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(o, t[l]) && (n[t[l]] = o[t[l]]);
204
- return n;
205
- };
206
- const Pe = {
207
- success: k,
208
- info: W,
209
- error: ce,
210
- warning: D
211
- }, _e = (o) => {
212
- const {
213
- icon: e,
214
- prefixCls: n,
215
- type: t
216
- } = o, l = Pe[t] || null;
217
- return e ? ge(e, /* @__PURE__ */ i.createElement("span", {
218
- className: `${n}-icon`
219
- }, e), () => ({
220
- className: z(`${n}-icon`, {
221
- [e.props.className]: e.props.className
222
- })
223
- })) : /* @__PURE__ */ i.createElement(l, {
224
- className: `${n}-icon`
225
- });
226
- }, He = (o) => {
227
- const {
228
- isClosable: e,
229
- prefixCls: n,
230
- closeIcon: t,
231
- handleClose: l,
232
- ariaProps: c
233
- } = o, a = t === !0 || t === void 0 ? /* @__PURE__ */ i.createElement(se, null) : t;
234
- return e ? /* @__PURE__ */ i.createElement("button", Object.assign({
235
- type: "button",
236
- onClick: l,
237
- className: `${n}-close-icon`,
238
- tabIndex: 0
239
- }, c), a) : null;
240
- }, N = /* @__PURE__ */ i.forwardRef((o, e) => {
241
- const {
242
- description: n,
243
- prefixCls: t,
244
- message: l,
245
- banner: c,
246
- className: a,
247
- rootClassName: p,
248
- style: d,
249
- onMouseEnter: m,
250
- onMouseLeave: v,
251
- onClick: y,
252
- afterClose: C,
253
- showIcon: h,
254
- closable: s,
255
- closeText: I,
256
- closeIcon: b,
257
- action: w,
258
- id: T
259
- } = o, L = j(o, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]), [O, G] = i.useState(!1);
260
- process.env.NODE_ENV !== "production" && ue("Alert").deprecated(!I, "closeText", "closable.closeIcon");
261
- const M = i.useRef(null);
262
- i.useImperativeHandle(e, () => ({
263
- nativeElement: M.current
264
- }));
265
- const {
266
- getPrefixCls: X,
267
- direction: U,
268
- alert: r
269
- } = i.useContext(pe), u = X("alert", t), [Y, q, J] = Re(u), K = (f) => {
270
- var g;
271
- G(!0), (g = o.onClose) === null || g === void 0 || g.call(o, f);
272
- }, B = i.useMemo(() => o.type !== void 0 ? o.type : c ? "warning" : "info", [o.type, c]), Q = i.useMemo(() => typeof s == "object" && s.closeIcon || I ? !0 : typeof s == "boolean" ? s : b !== !1 && b !== null && b !== void 0 ? !0 : !!(r != null && r.closable), [I, b, s, r == null ? void 0 : r.closable]), R = c && h === void 0 ? !0 : h, Z = z(u, `${u}-${B}`, {
273
- [`${u}-with-description`]: !!n,
274
- [`${u}-no-icon`]: !R,
275
- [`${u}-banner`]: !!c,
276
- [`${u}-rtl`]: U === "rtl"
277
- }, r == null ? void 0 : r.className, a, p, J, q), ee = Ie(L, {
278
- aria: !0,
279
- data: !0
280
- }), oe = i.useMemo(() => {
281
- var f, g;
282
- return typeof s == "object" && s.closeIcon ? s.closeIcon : I || (b !== void 0 ? b : typeof (r == null ? void 0 : r.closable) == "object" && (!((f = r == null ? void 0 : r.closable) === null || f === void 0) && f.closeIcon) ? (g = r == null ? void 0 : r.closable) === null || g === void 0 ? void 0 : g.closeIcon : r == null ? void 0 : r.closeIcon);
283
- }, [b, s, I, r == null ? void 0 : r.closeIcon]), ne = i.useMemo(() => {
284
- const f = s ?? (r == null ? void 0 : r.closable);
285
- return typeof f == "object" ? j(f, ["closeIcon"]) : {};
286
- }, [s, r == null ? void 0 : r.closable]);
287
- return Y(/* @__PURE__ */ i.createElement(me, {
288
- visible: !O,
289
- motionName: `${u}-motion`,
290
- motionAppear: !1,
291
- motionEnter: !1,
292
- onLeaveStart: (f) => ({
293
- maxHeight: f.offsetHeight
294
- }),
295
- onLeaveEnd: C
296
- }, (f, g) => {
297
- let {
298
- className: te,
299
- style: re
300
- } = f;
301
- return /* @__PURE__ */ i.createElement("div", Object.assign({
302
- id: T,
303
- ref: fe(M, g),
304
- "data-show": !O,
305
- className: z(Z, te),
306
- style: Object.assign(Object.assign(Object.assign({}, r == null ? void 0 : r.style), d), re),
307
- onMouseEnter: m,
308
- onMouseLeave: v,
309
- onClick: y,
310
- role: "alert"
311
- }, ee), R ? /* @__PURE__ */ i.createElement(_e, {
312
- description: n,
313
- icon: o.icon,
314
- prefixCls: u,
315
- type: B
316
- }) : null, /* @__PURE__ */ i.createElement("div", {
317
- className: `${u}-content`
318
- }, l ? /* @__PURE__ */ i.createElement("div", {
319
- className: `${u}-message`
320
- }, l) : null, n ? /* @__PURE__ */ i.createElement("div", {
321
- className: `${u}-description`
322
- }, n) : null), w ? /* @__PURE__ */ i.createElement("div", {
323
- className: `${u}-action`
324
- }, w) : null, /* @__PURE__ */ i.createElement(He, {
325
- isClosable: Q,
326
- prefixCls: u,
327
- closeIcon: oe,
328
- handleClose: K,
329
- ariaProps: ne
330
- }));
331
- }));
332
- });
333
- process.env.NODE_ENV !== "production" && (N.displayName = "Alert");
334
- function je(o, e, n) {
335
- return e = _(e), ve(o, ye() ? Reflect.construct(e, n || [], _(o).constructor) : e.apply(o, n));
336
- }
337
- let Ve = /* @__PURE__ */ function(o) {
338
- function e() {
339
- var n;
340
- return be(this, e), n = je(this, e, arguments), n.state = {
341
- error: void 0,
342
- info: {
343
- componentStack: ""
581
+ }, {
582
+ props: {
583
+ fullWidth: !0
584
+ },
585
+ style: {
586
+ width: "100%"
344
587
  }
345
- }, n;
588
+ }]
589
+ };
590
+ })), zo = S("span", {
591
+ name: "MuiButton",
592
+ slot: "StartIcon",
593
+ overridesResolver: (o, n) => {
594
+ const {
595
+ ownerState: a
596
+ } = o;
597
+ return [n.startIcon, n[`iconSize${i(a.size)}`]];
346
598
  }
347
- return Ce(e, o), he(e, [{
348
- key: "componentDidCatch",
349
- value: function(t, l) {
350
- this.setState({
351
- error: t,
352
- info: l
353
- });
599
+ })({
600
+ display: "inherit",
601
+ marginRight: 8,
602
+ marginLeft: -4,
603
+ variants: [{
604
+ props: {
605
+ size: "small"
606
+ },
607
+ style: {
608
+ marginLeft: -2
354
609
  }
355
- }, {
356
- key: "render",
357
- value: function() {
358
- const {
359
- message: t,
360
- description: l,
361
- id: c,
362
- children: a
363
- } = this.props, {
364
- error: p,
365
- info: d
366
- } = this.state, m = (d == null ? void 0 : d.componentStack) || null, v = typeof t > "u" ? (p || "").toString() : t, y = typeof l > "u" ? m : l;
367
- return p ? /* @__PURE__ */ i.createElement(N, {
368
- id: c,
369
- type: "error",
370
- message: v,
371
- description: /* @__PURE__ */ i.createElement("pre", {
372
- style: {
373
- fontSize: "0.9em",
374
- overflowX: "auto"
375
- }
376
- }, y)
377
- }) : a;
610
+ }, ...X]
611
+ }), Io = S("span", {
612
+ name: "MuiButton",
613
+ slot: "EndIcon",
614
+ overridesResolver: (o, n) => {
615
+ const {
616
+ ownerState: a
617
+ } = o;
618
+ return [n.endIcon, n[`iconSize${i(a.size)}`]];
619
+ }
620
+ })({
621
+ display: "inherit",
622
+ marginRight: -4,
623
+ marginLeft: 8,
624
+ variants: [{
625
+ props: {
626
+ size: "small"
627
+ },
628
+ style: {
629
+ marginRight: -2
378
630
  }
379
- }]);
380
- }(i.Component);
381
- const A = N;
382
- A.ErrorBoundary = Ve;
383
- var ke = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z" } }] }, name: "global", theme: "outlined" }, De = function(e, n) {
384
- return /* @__PURE__ */ i.createElement(E, $({}, e, {
385
- ref: n,
386
- icon: ke
387
- }));
388
- }, F = /* @__PURE__ */ i.forwardRef(De);
389
- process.env.NODE_ENV !== "production" && (F.displayName = "GlobalOutlined");
390
- const Je = ({
631
+ }, ...X]
632
+ }), k = /* @__PURE__ */ I.forwardRef(function(n, a) {
633
+ const e = I.useContext(K), s = I.useContext(Q), l = no(e, n), d = Y({
634
+ props: l,
635
+ name: "MuiButton"
636
+ }), {
637
+ children: u,
638
+ color: c = "primary",
639
+ component: v = "button",
640
+ className: h,
641
+ disabled: g = !1,
642
+ disableElevation: B = !1,
643
+ disableFocusRipple: f = !1,
644
+ endIcon: w,
645
+ focusVisibleClassName: C,
646
+ fullWidth: A = !1,
647
+ size: T = "medium",
648
+ startIcon: $,
649
+ type: M,
650
+ variant: p = "text",
651
+ ...y
652
+ } = d, x = {
653
+ ...d,
654
+ color: c,
655
+ component: v,
656
+ disabled: g,
657
+ disableElevation: B,
658
+ disableFocusRipple: f,
659
+ fullWidth: A,
660
+ size: T,
661
+ type: M,
662
+ variant: p
663
+ }, b = So(x), N = $ && /* @__PURE__ */ r(zo, {
664
+ className: b.startIcon,
665
+ ownerState: x,
666
+ children: $
667
+ }), E = w && /* @__PURE__ */ r(Io, {
668
+ className: b.endIcon,
669
+ ownerState: x,
670
+ children: w
671
+ }), W = s || "";
672
+ return /* @__PURE__ */ R(Co, {
673
+ ownerState: x,
674
+ className: L(e.className, b.root, h, W),
675
+ component: v,
676
+ disabled: g,
677
+ focusRipple: !f,
678
+ focusVisibleClassName: L(b.focusVisible, C),
679
+ ref: a,
680
+ type: M,
681
+ ...y,
682
+ classes: b,
683
+ children: [N, u, E]
684
+ });
685
+ });
686
+ process.env.NODE_ENV !== "production" && (k.propTypes = {
687
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
688
+ // │ These PropTypes are generated from the TypeScript type definitions. │
689
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
690
+ // └─────────────────────────────────────────────────────────────────────┘
691
+ /**
692
+ * The content of the component.
693
+ */
694
+ children: t.node,
695
+ /**
696
+ * Override or extend the styles applied to the component.
697
+ */
698
+ classes: t.object,
699
+ /**
700
+ * @ignore
701
+ */
702
+ className: t.string,
703
+ /**
704
+ * The color of the component.
705
+ * It supports both default and custom theme colors, which can be added as shown in the
706
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
707
+ * @default 'primary'
708
+ */
709
+ color: t.oneOfType([t.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), t.string]),
710
+ /**
711
+ * The component used for the root node.
712
+ * Either a string to use a HTML element or a component.
713
+ */
714
+ component: t.elementType,
715
+ /**
716
+ * If `true`, the component is disabled.
717
+ * @default false
718
+ */
719
+ disabled: t.bool,
720
+ /**
721
+ * If `true`, no elevation is used.
722
+ * @default false
723
+ */
724
+ disableElevation: t.bool,
725
+ /**
726
+ * If `true`, the keyboard focus ripple is disabled.
727
+ * @default false
728
+ */
729
+ disableFocusRipple: t.bool,
730
+ /**
731
+ * If `true`, the ripple effect is disabled.
732
+ *
733
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
734
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
735
+ * @default false
736
+ */
737
+ disableRipple: t.bool,
738
+ /**
739
+ * Element placed after the children.
740
+ */
741
+ endIcon: t.node,
742
+ /**
743
+ * @ignore
744
+ */
745
+ focusVisibleClassName: t.string,
746
+ /**
747
+ * If `true`, the button will take up the full width of its container.
748
+ * @default false
749
+ */
750
+ fullWidth: t.bool,
751
+ /**
752
+ * The URL to link to when the button is clicked.
753
+ * If defined, an `a` element will be used as the root node.
754
+ */
755
+ href: t.string,
756
+ /**
757
+ * The size of the component.
758
+ * `small` is equivalent to the dense button styling.
759
+ * @default 'medium'
760
+ */
761
+ size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
762
+ /**
763
+ * Element placed before the children.
764
+ */
765
+ startIcon: t.node,
766
+ /**
767
+ * The system prop that allows defining system overrides as well as additional CSS styles.
768
+ */
769
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
770
+ /**
771
+ * @ignore
772
+ */
773
+ type: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string]),
774
+ /**
775
+ * The variant to use.
776
+ * @default 'text'
777
+ */
778
+ variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
779
+ });
780
+ const mo = m(/* @__PURE__ */ r("path", {
781
+ d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"
782
+ }), "LanguageOutlined"), To = ({
391
783
  hideAfterInteraction: o,
392
- alertContainerStyle: e,
393
- descriptionStyle: n,
394
- buttonContainerStyle: t,
395
- yesButtonStyle: l,
396
- cancelButtonStyle: c,
397
- description: a,
398
- icon: p
784
+ alertContainerStyle: n,
785
+ descriptionStyle: a,
786
+ buttonContainerStyle: e,
787
+ yesButtonStyle: s,
788
+ cancelButtonStyle: l,
789
+ description: d,
790
+ icon: u
399
791
  }) => {
400
- const d = ie(le);
401
- if (!d)
792
+ const c = oo(to);
793
+ if (!c)
402
794
  return null;
403
- const m = {
795
+ const v = {
404
796
  marginBottom: "10px",
405
797
  borderRadius: "5px",
406
798
  padding: "10px",
@@ -411,55 +803,53 @@ const Je = ({
411
803
  display: "flex",
412
804
  alignItems: "center",
413
805
  // Align items vertically
414
- ...e
415
- }, v = {
806
+ ...n
807
+ }, h = {
416
808
  display: "flex",
417
809
  justifyContent: "space-between",
418
810
  alignItems: "center",
419
811
  // Align items vertically
420
812
  fontSize: "12px",
421
813
  width: "100%",
422
- ...n
423
- }, y = {
814
+ ...a
815
+ }, g = {
424
816
  display: "flex",
425
817
  alignItems: "center",
426
- ...t
427
- }, C = {
818
+ ...e
819
+ }, B = {
428
820
  marginLeft: "10px",
429
821
  marginRight: "10px",
430
822
  fontSize: "10px",
431
- ...l
432
- }, h = {
823
+ ...s
824
+ }, f = {
433
825
  fontSize: "10px",
434
- ...c
826
+ ...l
435
827
  };
436
- return /* @__PURE__ */ S(
437
- A,
828
+ return /* @__PURE__ */ r(
829
+ J,
438
830
  {
439
- type: "info",
440
- showIcon: !0,
441
- icon: p ?? /* @__PURE__ */ S(F, { type: "text" }),
442
- style: m,
443
- description: /* @__PURE__ */ P("div", { style: v, children: [
444
- /* @__PURE__ */ S("span", { children: a ?? "Would you like to enable web push notifications to stay updated?" }),
445
- /* @__PURE__ */ P("div", { style: y, children: [
446
- /* @__PURE__ */ S(
447
- H,
831
+ severity: "info",
832
+ icon: u ?? /* @__PURE__ */ r(mo, { type: "text" }),
833
+ style: v,
834
+ children: /* @__PURE__ */ R("div", { style: h, children: [
835
+ /* @__PURE__ */ r("span", { children: d ?? "Would you like to enable web push notifications to stay updated?" }),
836
+ /* @__PURE__ */ R("div", { style: g, children: [
837
+ /* @__PURE__ */ r(
838
+ k,
448
839
  {
449
- type: "primary",
450
- style: C,
840
+ style: B,
451
841
  onClick: () => {
452
- o && localStorage.setItem("hideWebPushOptInMessage", "true"), d.setWebPushOptIn(!0), d.setWebPushOptInMessage(!1);
842
+ o && localStorage.setItem("hideWebPushOptInMessage", "true"), c.setWebPushOptIn(!0), c.setWebPushOptInMessage(!1);
453
843
  },
454
844
  children: "Yes"
455
845
  }
456
846
  ),
457
- /* @__PURE__ */ S(
458
- H,
847
+ /* @__PURE__ */ r(
848
+ k,
459
849
  {
460
- style: h,
850
+ style: f,
461
851
  onClick: () => {
462
- o && localStorage.setItem("hideWebPushOptInMessage", "true"), d.setWebPushOptInMessage(!1);
852
+ o && localStorage.setItem("hideWebPushOptInMessage", "true"), c.setWebPushOptInMessage(!1);
463
853
  },
464
854
  children: "No"
465
855
  }
@@ -470,9 +860,6 @@ const Je = ({
470
860
  );
471
861
  };
472
862
  export {
473
- F as R,
474
- Je as W,
475
- D as a,
476
- k as b,
477
- W as c
863
+ mo as L,
864
+ To as W
478
865
  };