@notificationapi/react 1.4.0 → 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.
- package/dist/assets/Badge.js +1 -1
- package/dist/assets/Box.js +13 -13
- package/dist/assets/Button.js +781 -0
- package/dist/assets/ButtonBase.js +409 -622
- package/dist/assets/DefaultPropsProvider.js +220 -215
- package/dist/assets/Divider.js +105 -154
- package/dist/assets/Grow.js +201 -0
- package/dist/assets/IconButton.js +1 -1
- package/dist/assets/List.js +142 -0
- package/dist/assets/Modal.js +1094 -0
- package/dist/assets/Notification.js +80 -79
- package/dist/assets/Paper.js +1 -1
- package/dist/assets/Popover.js +8 -6
- package/dist/assets/Portal.js +2 -2
- package/dist/assets/Stack.js +216 -0
- package/dist/assets/Typography.js +193 -117
- package/dist/assets/WebPushOptInMessage.js +40 -814
- package/dist/assets/createSvgIcon.js +5 -5
- package/dist/assets/dividerClasses.js +56 -0
- package/dist/assets/index.js +151 -0
- package/dist/assets/useTheme2.js +253 -11
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +2927 -9
- package/dist/components/Notifications/InboxHeader.js +2146 -7
- package/dist/components/Notifications/NotificationFeed.js +13 -13
- package/dist/components/Notifications/NotificationLauncher.js +2 -2
- package/dist/components/Notifications/NotificationPopup.js +7 -7
- package/dist/components/Preferences/NotificationPreferencesPopup.js +608 -7
- package/dist/components/Preferences/PreferenceInput.js +1451 -6
- package/dist/components/Preferences/Preferences.js +368 -515
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/index.js +226 -202
- package/dist/components/Slack/SlackConnect.d.ts +12 -0
- package/dist/components/Slack/SlackConnect.js +4826 -0
- package/dist/components/Slack/index.d.ts +1 -0
- package/dist/components/Slack/index.js +4 -0
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -2
- package/dist/main.d.ts +1 -0
- package/dist/main.js +5 -3
- package/package.json +4 -4
- package/dist/assets/Inbox.js +0 -3061
- package/dist/assets/InboxHeader.js +0 -2338
- package/dist/assets/NotificationPreferencesPopup.js +0 -1694
- package/dist/assets/PreferenceInput.js +0 -1657
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { o as S, r as V, P as e, p as N, q as g, t as m, v as D, w as E, x as R, c as w, b as B, e as M, y as h, s as G, u as U } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
4
|
+
import { e as $ } from "./Typography.js";
|
|
5
|
+
import { u as A } from "./useTheme2.js";
|
|
6
|
+
const q = S();
|
|
7
|
+
function L(o) {
|
|
8
|
+
const {
|
|
9
|
+
theme: r,
|
|
10
|
+
name: n,
|
|
11
|
+
props: t
|
|
12
|
+
} = o;
|
|
13
|
+
return !r || !r.components || !r.components[n] || !r.components[n].defaultProps ? t : V(r.components[n].defaultProps, t);
|
|
14
|
+
}
|
|
15
|
+
function z({
|
|
16
|
+
props: o,
|
|
17
|
+
name: r,
|
|
18
|
+
defaultTheme: n,
|
|
19
|
+
themeId: t
|
|
20
|
+
}) {
|
|
21
|
+
let s = A(n);
|
|
22
|
+
return t && (s = s[t] || s), L({
|
|
23
|
+
theme: s,
|
|
24
|
+
name: r,
|
|
25
|
+
props: o
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function ne(...o) {
|
|
29
|
+
return o.reduce((r, n) => n == null ? r : function(...s) {
|
|
30
|
+
r.apply(this, s), n.apply(this, s);
|
|
31
|
+
}, () => {
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const H = N(), I = q("div", {
|
|
35
|
+
name: "MuiStack",
|
|
36
|
+
slot: "Root",
|
|
37
|
+
overridesResolver: (o, r) => r.root
|
|
38
|
+
});
|
|
39
|
+
function J(o) {
|
|
40
|
+
return z({
|
|
41
|
+
props: o,
|
|
42
|
+
name: "MuiStack",
|
|
43
|
+
defaultTheme: H
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function K(o, r) {
|
|
47
|
+
const n = l.Children.toArray(o).filter(Boolean);
|
|
48
|
+
return n.reduce((t, s, i) => (t.push(s), i < n.length - 1 && t.push(/* @__PURE__ */ l.cloneElement(r, {
|
|
49
|
+
key: `separator-${i}`
|
|
50
|
+
})), t), []);
|
|
51
|
+
}
|
|
52
|
+
const Q = (o) => ({
|
|
53
|
+
row: "Left",
|
|
54
|
+
"row-reverse": "Right",
|
|
55
|
+
column: "Top",
|
|
56
|
+
"column-reverse": "Bottom"
|
|
57
|
+
})[o], W = ({
|
|
58
|
+
ownerState: o,
|
|
59
|
+
theme: r
|
|
60
|
+
}) => {
|
|
61
|
+
let n = {
|
|
62
|
+
display: "flex",
|
|
63
|
+
flexDirection: "column",
|
|
64
|
+
...g({
|
|
65
|
+
theme: r
|
|
66
|
+
}, m({
|
|
67
|
+
values: o.direction,
|
|
68
|
+
breakpoints: r.breakpoints.values
|
|
69
|
+
}), (t) => ({
|
|
70
|
+
flexDirection: t
|
|
71
|
+
}))
|
|
72
|
+
};
|
|
73
|
+
if (o.spacing) {
|
|
74
|
+
const t = D(r), s = Object.keys(r.breakpoints.values).reduce((c, a) => ((typeof o.spacing == "object" && o.spacing[a] != null || typeof o.direction == "object" && o.direction[a] != null) && (c[a] = !0), c), {}), i = m({
|
|
75
|
+
values: o.direction,
|
|
76
|
+
base: s
|
|
77
|
+
}), u = m({
|
|
78
|
+
values: o.spacing,
|
|
79
|
+
base: s
|
|
80
|
+
});
|
|
81
|
+
typeof i == "object" && Object.keys(i).forEach((c, a, p) => {
|
|
82
|
+
if (!i[c]) {
|
|
83
|
+
const f = a > 0 ? i[p[a - 1]] : "column";
|
|
84
|
+
i[c] = f;
|
|
85
|
+
}
|
|
86
|
+
}), n = E(n, g({
|
|
87
|
+
theme: r
|
|
88
|
+
}, u, (c, a) => o.useFlexGap ? {
|
|
89
|
+
gap: h(t, c)
|
|
90
|
+
} : {
|
|
91
|
+
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
|
92
|
+
// We need to reset the margin to avoid double spacing.
|
|
93
|
+
"& > :not(style):not(style)": {
|
|
94
|
+
margin: 0
|
|
95
|
+
},
|
|
96
|
+
"& > :not(style) ~ :not(style)": {
|
|
97
|
+
[`margin${Q(a ? i[a] : o.direction)}`]: h(t, c)
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
return n = R(r.breakpoints, n), n;
|
|
102
|
+
};
|
|
103
|
+
function X(o = {}) {
|
|
104
|
+
const {
|
|
105
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
106
|
+
createStyledComponent: r = I,
|
|
107
|
+
useThemeProps: n = J,
|
|
108
|
+
componentName: t = "MuiStack"
|
|
109
|
+
} = o, s = () => B({
|
|
110
|
+
root: ["root"]
|
|
111
|
+
}, (c) => M(t, c), {}), i = r(W), u = /* @__PURE__ */ l.forwardRef(function(c, a) {
|
|
112
|
+
const p = n(c), y = $(p), {
|
|
113
|
+
component: f = "div",
|
|
114
|
+
direction: b = "column",
|
|
115
|
+
spacing: C = 0,
|
|
116
|
+
divider: v,
|
|
117
|
+
children: O,
|
|
118
|
+
className: x,
|
|
119
|
+
useFlexGap: j = !1,
|
|
120
|
+
...k
|
|
121
|
+
} = y, P = {
|
|
122
|
+
direction: b,
|
|
123
|
+
spacing: C,
|
|
124
|
+
useFlexGap: j
|
|
125
|
+
}, F = s();
|
|
126
|
+
return /* @__PURE__ */ _(i, {
|
|
127
|
+
as: f,
|
|
128
|
+
ownerState: P,
|
|
129
|
+
ref: a,
|
|
130
|
+
className: w(F.root, x),
|
|
131
|
+
...k,
|
|
132
|
+
children: v ? K(O, v) : O
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
return process.env.NODE_ENV !== "production" && (u.propTypes = {
|
|
136
|
+
children: e.node,
|
|
137
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
138
|
+
divider: e.node,
|
|
139
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
140
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
141
|
+
}), u;
|
|
142
|
+
}
|
|
143
|
+
function te({
|
|
144
|
+
props: o,
|
|
145
|
+
states: r,
|
|
146
|
+
muiFormControl: n
|
|
147
|
+
}) {
|
|
148
|
+
return r.reduce((t, s) => (t[s] = o[s], n && typeof o[s] > "u" && (t[s] = n[s]), t), {});
|
|
149
|
+
}
|
|
150
|
+
const T = /* @__PURE__ */ l.createContext(void 0);
|
|
151
|
+
process.env.NODE_ENV !== "production" && (T.displayName = "FormControlContext");
|
|
152
|
+
function se() {
|
|
153
|
+
return l.useContext(T);
|
|
154
|
+
}
|
|
155
|
+
const Y = X({
|
|
156
|
+
createStyledComponent: G("div", {
|
|
157
|
+
name: "MuiStack",
|
|
158
|
+
slot: "Root",
|
|
159
|
+
overridesResolver: (o, r) => r.root
|
|
160
|
+
}),
|
|
161
|
+
useThemeProps: (o) => U({
|
|
162
|
+
props: o,
|
|
163
|
+
name: "MuiStack"
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
167
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
168
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
169
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
170
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
171
|
+
/**
|
|
172
|
+
* The content of the component.
|
|
173
|
+
*/
|
|
174
|
+
children: e.node,
|
|
175
|
+
/**
|
|
176
|
+
* The component used for the root node.
|
|
177
|
+
* Either a string to use a HTML element or a component.
|
|
178
|
+
*/
|
|
179
|
+
component: e.elementType,
|
|
180
|
+
/**
|
|
181
|
+
* Defines the `flex-direction` style property.
|
|
182
|
+
* It is applied for all screen sizes.
|
|
183
|
+
* @default 'column'
|
|
184
|
+
*/
|
|
185
|
+
direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
|
|
186
|
+
/**
|
|
187
|
+
* Add an element between each child.
|
|
188
|
+
*/
|
|
189
|
+
divider: e.node,
|
|
190
|
+
/**
|
|
191
|
+
* Defines the space between immediate children.
|
|
192
|
+
* @default 0
|
|
193
|
+
*/
|
|
194
|
+
spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
|
|
195
|
+
/**
|
|
196
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
197
|
+
*/
|
|
198
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
199
|
+
/**
|
|
200
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
201
|
+
*
|
|
202
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
203
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
204
|
+
*
|
|
205
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
206
|
+
* @default false
|
|
207
|
+
*/
|
|
208
|
+
useFlexGap: e.bool
|
|
209
|
+
});
|
|
210
|
+
export {
|
|
211
|
+
T as F,
|
|
212
|
+
Y as S,
|
|
213
|
+
ne as c,
|
|
214
|
+
te as f,
|
|
215
|
+
se as u
|
|
216
|
+
};
|
|
@@ -1,48 +1,123 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as E from "react";
|
|
2
|
+
import { P as t, l as C, n as N, d as B, T as w, e as W, g as D, s as M, h as u, m as _, u as G, c as R, b as V } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
4
|
+
import { G as $, u as A } from "./useTheme2.js";
|
|
5
|
+
import { c as U } from "./createSimplePaletteValueFilter.js";
|
|
6
|
+
function k(o) {
|
|
7
|
+
return o == null || Object.keys(o).length === 0;
|
|
8
|
+
}
|
|
9
|
+
function T(o) {
|
|
10
|
+
const {
|
|
11
|
+
styles: r,
|
|
12
|
+
defaultTheme: e = {}
|
|
13
|
+
} = o;
|
|
14
|
+
return /* @__PURE__ */ p($, {
|
|
15
|
+
styles: typeof r == "function" ? (a) => r(k(a) ? e : a) : r
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
19
|
+
defaultTheme: t.object,
|
|
20
|
+
styles: t.oneOfType([t.array, t.string, t.object, t.func])
|
|
21
|
+
});
|
|
22
|
+
function x({
|
|
23
|
+
styles: o,
|
|
24
|
+
themeId: r,
|
|
25
|
+
defaultTheme: e = {}
|
|
26
|
+
}) {
|
|
27
|
+
const n = A(e), a = typeof o == "function" ? o(r && n[r] || n) : o;
|
|
28
|
+
return /* @__PURE__ */ p(T, {
|
|
29
|
+
styles: a
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
33
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
34
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
35
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
36
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
37
|
+
/**
|
|
38
|
+
* @ignore
|
|
39
|
+
*/
|
|
40
|
+
defaultTheme: t.object,
|
|
41
|
+
/**
|
|
42
|
+
* @ignore
|
|
43
|
+
*/
|
|
44
|
+
styles: t.oneOfType([t.array, t.func, t.number, t.object, t.string, t.bool]),
|
|
45
|
+
/**
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
48
|
+
themeId: t.string
|
|
49
|
+
});
|
|
50
|
+
const H = (o) => {
|
|
51
|
+
var n;
|
|
52
|
+
const r = {
|
|
8
53
|
systemProps: {},
|
|
9
54
|
otherProps: {}
|
|
10
|
-
},
|
|
11
|
-
return Object.keys(
|
|
12
|
-
|
|
13
|
-
}),
|
|
55
|
+
}, e = ((n = o == null ? void 0 : o.theme) == null ? void 0 : n.unstable_sxConfig) ?? C;
|
|
56
|
+
return Object.keys(o).forEach((a) => {
|
|
57
|
+
e[a] ? r.systemProps[a] = o[a] : r.otherProps[a] = o[a];
|
|
58
|
+
}), r;
|
|
14
59
|
};
|
|
15
|
-
function
|
|
60
|
+
function z(o) {
|
|
16
61
|
const {
|
|
17
|
-
sx:
|
|
18
|
-
...
|
|
19
|
-
} =
|
|
20
|
-
systemProps:
|
|
21
|
-
otherProps:
|
|
22
|
-
} =
|
|
62
|
+
sx: r,
|
|
63
|
+
...e
|
|
64
|
+
} = o, {
|
|
65
|
+
systemProps: n,
|
|
66
|
+
otherProps: a
|
|
67
|
+
} = H(e);
|
|
23
68
|
let s;
|
|
24
|
-
return Array.isArray(
|
|
25
|
-
const i =
|
|
26
|
-
return
|
|
27
|
-
...
|
|
69
|
+
return Array.isArray(r) ? s = [n, ...r] : typeof r == "function" ? s = (...l) => {
|
|
70
|
+
const i = r(...l);
|
|
71
|
+
return N(i) ? {
|
|
72
|
+
...n,
|
|
28
73
|
...i
|
|
29
|
-
} :
|
|
74
|
+
} : n;
|
|
30
75
|
} : s = {
|
|
31
|
-
...a,
|
|
32
|
-
...o
|
|
33
|
-
}, {
|
|
34
76
|
...n,
|
|
77
|
+
...r
|
|
78
|
+
}, {
|
|
79
|
+
...a,
|
|
35
80
|
sx: s
|
|
36
81
|
};
|
|
37
82
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
83
|
+
function v(o) {
|
|
84
|
+
return /* @__PURE__ */ p(x, {
|
|
85
|
+
...o,
|
|
86
|
+
defaultTheme: B,
|
|
87
|
+
themeId: w
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
91
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
92
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
93
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
94
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
95
|
+
/**
|
|
96
|
+
* The styles you want to apply globally.
|
|
97
|
+
*/
|
|
98
|
+
styles: t.oneOfType([t.array, t.func, t.number, t.object, t.string, t.bool])
|
|
99
|
+
});
|
|
100
|
+
function et(o) {
|
|
101
|
+
return function(e) {
|
|
102
|
+
return (
|
|
103
|
+
// Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
|
|
104
|
+
/* @__PURE__ */ p(v, {
|
|
105
|
+
styles: typeof o == "function" ? (n) => o({
|
|
106
|
+
theme: n,
|
|
107
|
+
...e
|
|
108
|
+
}) : o
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function F() {
|
|
114
|
+
return z;
|
|
40
115
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
116
|
+
function I(o) {
|
|
117
|
+
return W("MuiTypography", o);
|
|
43
118
|
}
|
|
44
|
-
|
|
45
|
-
const
|
|
119
|
+
D("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
120
|
+
const J = {
|
|
46
121
|
primary: !0,
|
|
47
122
|
secondary: !0,
|
|
48
123
|
error: !0,
|
|
@@ -52,31 +127,31 @@ const V = {
|
|
|
52
127
|
textPrimary: !0,
|
|
53
128
|
textSecondary: !0,
|
|
54
129
|
textDisabled: !0
|
|
55
|
-
},
|
|
130
|
+
}, L = F(), q = (o) => {
|
|
56
131
|
const {
|
|
57
|
-
align:
|
|
58
|
-
gutterBottom:
|
|
59
|
-
noWrap:
|
|
60
|
-
paragraph:
|
|
132
|
+
align: r,
|
|
133
|
+
gutterBottom: e,
|
|
134
|
+
noWrap: n,
|
|
135
|
+
paragraph: a,
|
|
61
136
|
variant: s,
|
|
62
|
-
classes:
|
|
63
|
-
} =
|
|
64
|
-
root: ["root", s,
|
|
137
|
+
classes: l
|
|
138
|
+
} = o, i = {
|
|
139
|
+
root: ["root", s, o.align !== "inherit" && `align${u(r)}`, e && "gutterBottom", n && "noWrap", a && "paragraph"]
|
|
65
140
|
};
|
|
66
|
-
return
|
|
67
|
-
},
|
|
141
|
+
return V(i, I, l);
|
|
142
|
+
}, K = M("span", {
|
|
68
143
|
name: "MuiTypography",
|
|
69
144
|
slot: "Root",
|
|
70
|
-
overridesResolver: (
|
|
145
|
+
overridesResolver: (o, r) => {
|
|
71
146
|
const {
|
|
72
|
-
ownerState:
|
|
73
|
-
} =
|
|
74
|
-
return [
|
|
147
|
+
ownerState: e
|
|
148
|
+
} = o;
|
|
149
|
+
return [r.root, e.variant && r[e.variant], e.align !== "inherit" && r[`align${u(e.align)}`], e.noWrap && r.noWrap, e.gutterBottom && r.gutterBottom, e.paragraph && r.paragraph];
|
|
75
150
|
}
|
|
76
|
-
})(
|
|
77
|
-
theme:
|
|
151
|
+
})(_(({
|
|
152
|
+
theme: o
|
|
78
153
|
}) => {
|
|
79
|
-
var
|
|
154
|
+
var r;
|
|
80
155
|
return {
|
|
81
156
|
margin: 0,
|
|
82
157
|
variants: [{
|
|
@@ -89,36 +164,36 @@ const V = {
|
|
|
89
164
|
lineHeight: "inherit",
|
|
90
165
|
letterSpacing: "inherit"
|
|
91
166
|
}
|
|
92
|
-
}, ...Object.entries(
|
|
167
|
+
}, ...Object.entries(o.typography).filter(([e, n]) => e !== "inherit" && n && typeof n == "object").map(([e, n]) => ({
|
|
93
168
|
props: {
|
|
94
|
-
variant:
|
|
169
|
+
variant: e
|
|
95
170
|
},
|
|
96
|
-
style:
|
|
97
|
-
})), ...Object.entries(
|
|
171
|
+
style: n
|
|
172
|
+
})), ...Object.entries(o.palette).filter(U()).map(([e]) => ({
|
|
98
173
|
props: {
|
|
99
|
-
color:
|
|
174
|
+
color: e
|
|
100
175
|
},
|
|
101
176
|
style: {
|
|
102
|
-
color: (
|
|
177
|
+
color: (o.vars || o).palette[e].main
|
|
103
178
|
}
|
|
104
|
-
})), ...Object.entries(((
|
|
179
|
+
})), ...Object.entries(((r = o.palette) == null ? void 0 : r.text) || {}).filter(([, e]) => typeof e == "string").map(([e]) => ({
|
|
105
180
|
props: {
|
|
106
|
-
color: `text${
|
|
181
|
+
color: `text${u(e)}`
|
|
107
182
|
},
|
|
108
183
|
style: {
|
|
109
|
-
color: (
|
|
184
|
+
color: (o.vars || o).palette.text[e]
|
|
110
185
|
}
|
|
111
186
|
})), {
|
|
112
187
|
props: ({
|
|
113
|
-
ownerState:
|
|
114
|
-
}) =>
|
|
188
|
+
ownerState: e
|
|
189
|
+
}) => e.align !== "inherit",
|
|
115
190
|
style: {
|
|
116
191
|
textAlign: "var(--Typography-textAlign)"
|
|
117
192
|
}
|
|
118
193
|
}, {
|
|
119
194
|
props: ({
|
|
120
|
-
ownerState:
|
|
121
|
-
}) =>
|
|
195
|
+
ownerState: e
|
|
196
|
+
}) => e.noWrap,
|
|
122
197
|
style: {
|
|
123
198
|
overflow: "hidden",
|
|
124
199
|
textOverflow: "ellipsis",
|
|
@@ -126,21 +201,21 @@ const V = {
|
|
|
126
201
|
}
|
|
127
202
|
}, {
|
|
128
203
|
props: ({
|
|
129
|
-
ownerState:
|
|
130
|
-
}) =>
|
|
204
|
+
ownerState: e
|
|
205
|
+
}) => e.gutterBottom,
|
|
131
206
|
style: {
|
|
132
207
|
marginBottom: "0.35em"
|
|
133
208
|
}
|
|
134
209
|
}, {
|
|
135
210
|
props: ({
|
|
136
|
-
ownerState:
|
|
137
|
-
}) =>
|
|
211
|
+
ownerState: e
|
|
212
|
+
}) => e.paragraph,
|
|
138
213
|
style: {
|
|
139
214
|
marginBottom: 16
|
|
140
215
|
}
|
|
141
216
|
}]
|
|
142
217
|
};
|
|
143
|
-
})),
|
|
218
|
+
})), d = {
|
|
144
219
|
h1: "h1",
|
|
145
220
|
h2: "h2",
|
|
146
221
|
h3: "h3",
|
|
@@ -152,55 +227,55 @@ const V = {
|
|
|
152
227
|
body1: "p",
|
|
153
228
|
body2: "p",
|
|
154
229
|
inherit: "p"
|
|
155
|
-
},
|
|
230
|
+
}, Q = /* @__PURE__ */ E.forwardRef(function(r, e) {
|
|
156
231
|
const {
|
|
157
|
-
color:
|
|
158
|
-
...
|
|
159
|
-
} =
|
|
160
|
-
props:
|
|
232
|
+
color: n,
|
|
233
|
+
...a
|
|
234
|
+
} = G({
|
|
235
|
+
props: r,
|
|
161
236
|
name: "MuiTypography"
|
|
162
|
-
}), s = !
|
|
163
|
-
...
|
|
237
|
+
}), s = !J[n], l = L({
|
|
238
|
+
...a,
|
|
164
239
|
...s && {
|
|
165
|
-
color:
|
|
240
|
+
color: n
|
|
166
241
|
}
|
|
167
242
|
}), {
|
|
168
243
|
align: i = "inherit",
|
|
169
|
-
className:
|
|
170
|
-
component:
|
|
171
|
-
gutterBottom:
|
|
172
|
-
noWrap:
|
|
173
|
-
paragraph:
|
|
174
|
-
variant:
|
|
175
|
-
variantMapping:
|
|
176
|
-
...
|
|
177
|
-
} =
|
|
178
|
-
...
|
|
244
|
+
className: y,
|
|
245
|
+
component: f,
|
|
246
|
+
gutterBottom: O = !1,
|
|
247
|
+
noWrap: S = !1,
|
|
248
|
+
paragraph: h = !1,
|
|
249
|
+
variant: c = "body1",
|
|
250
|
+
variantMapping: g = d,
|
|
251
|
+
...m
|
|
252
|
+
} = l, b = {
|
|
253
|
+
...l,
|
|
179
254
|
align: i,
|
|
180
|
-
color:
|
|
181
|
-
className:
|
|
182
|
-
component:
|
|
183
|
-
gutterBottom:
|
|
184
|
-
noWrap:
|
|
185
|
-
paragraph:
|
|
186
|
-
variant:
|
|
187
|
-
variantMapping:
|
|
188
|
-
},
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
as:
|
|
191
|
-
ref:
|
|
192
|
-
className:
|
|
193
|
-
...
|
|
194
|
-
ownerState:
|
|
255
|
+
color: n,
|
|
256
|
+
className: y,
|
|
257
|
+
component: f,
|
|
258
|
+
gutterBottom: O,
|
|
259
|
+
noWrap: S,
|
|
260
|
+
paragraph: h,
|
|
261
|
+
variant: c,
|
|
262
|
+
variantMapping: g
|
|
263
|
+
}, P = f || (h ? "p" : g[c] || d[c]) || "span", j = q(b);
|
|
264
|
+
return /* @__PURE__ */ p(K, {
|
|
265
|
+
as: P,
|
|
266
|
+
ref: e,
|
|
267
|
+
className: R(j.root, y),
|
|
268
|
+
...m,
|
|
269
|
+
ownerState: b,
|
|
195
270
|
style: {
|
|
196
271
|
...i !== "inherit" && {
|
|
197
272
|
"--Typography-textAlign": i
|
|
198
273
|
},
|
|
199
|
-
...
|
|
274
|
+
...m.style
|
|
200
275
|
}
|
|
201
276
|
});
|
|
202
277
|
});
|
|
203
|
-
process.env.NODE_ENV !== "production" && (
|
|
278
|
+
process.env.NODE_ENV !== "production" && (Q.propTypes = {
|
|
204
279
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
205
280
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
206
281
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -209,35 +284,35 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
209
284
|
* Set the text-align on the component.
|
|
210
285
|
* @default 'inherit'
|
|
211
286
|
*/
|
|
212
|
-
align:
|
|
287
|
+
align: t.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
213
288
|
/**
|
|
214
289
|
* The content of the component.
|
|
215
290
|
*/
|
|
216
|
-
children:
|
|
291
|
+
children: t.node,
|
|
217
292
|
/**
|
|
218
293
|
* Override or extend the styles applied to the component.
|
|
219
294
|
*/
|
|
220
|
-
classes:
|
|
295
|
+
classes: t.object,
|
|
221
296
|
/**
|
|
222
297
|
* @ignore
|
|
223
298
|
*/
|
|
224
|
-
className:
|
|
299
|
+
className: t.string,
|
|
225
300
|
/**
|
|
226
301
|
* The color of the component.
|
|
227
302
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
228
303
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
229
304
|
*/
|
|
230
|
-
color:
|
|
305
|
+
color: t.oneOfType([t.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), t.string]),
|
|
231
306
|
/**
|
|
232
307
|
* The component used for the root node.
|
|
233
308
|
* Either a string to use a HTML element or a component.
|
|
234
309
|
*/
|
|
235
|
-
component:
|
|
310
|
+
component: t.elementType,
|
|
236
311
|
/**
|
|
237
312
|
* If `true`, the text will have a bottom margin.
|
|
238
313
|
* @default false
|
|
239
314
|
*/
|
|
240
|
-
gutterBottom:
|
|
315
|
+
gutterBottom: t.bool,
|
|
241
316
|
/**
|
|
242
317
|
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
243
318
|
*
|
|
@@ -245,26 +320,26 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
245
320
|
* (the element needs to have a width in order to overflow).
|
|
246
321
|
* @default false
|
|
247
322
|
*/
|
|
248
|
-
noWrap:
|
|
323
|
+
noWrap: t.bool,
|
|
249
324
|
/**
|
|
250
325
|
* If `true`, the element will be a paragraph element.
|
|
251
326
|
* @default false
|
|
252
327
|
* @deprecated Use the `component` 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.
|
|
253
328
|
*/
|
|
254
|
-
paragraph:
|
|
329
|
+
paragraph: t.bool,
|
|
255
330
|
/**
|
|
256
331
|
* @ignore
|
|
257
332
|
*/
|
|
258
|
-
style:
|
|
333
|
+
style: t.object,
|
|
259
334
|
/**
|
|
260
335
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
261
336
|
*/
|
|
262
|
-
sx:
|
|
337
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
263
338
|
/**
|
|
264
339
|
* Applies the theme typography styles.
|
|
265
340
|
* @default 'body1'
|
|
266
341
|
*/
|
|
267
|
-
variant:
|
|
342
|
+
variant: t.oneOfType([t.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), t.string]),
|
|
268
343
|
/**
|
|
269
344
|
* The component maps the variant prop to a range of different HTML element types.
|
|
270
345
|
* For instance, subtitle1 to `<h6>`.
|
|
@@ -284,9 +359,10 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
284
359
|
* inherit: 'p',
|
|
285
360
|
* }
|
|
286
361
|
*/
|
|
287
|
-
variantMapping:
|
|
362
|
+
variantMapping: t.object
|
|
288
363
|
});
|
|
289
364
|
export {
|
|
290
|
-
|
|
291
|
-
|
|
365
|
+
Q as T,
|
|
366
|
+
z as e,
|
|
367
|
+
et as g
|
|
292
368
|
};
|