xladmin 0.3.3 → 0.3.4
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/index.js +27 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1061,7 +1061,7 @@ import { createContext as createContext3, useCallback as useCallback2, useContex
|
|
|
1061
1061
|
import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline";
|
|
1062
1062
|
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
|
|
1063
1063
|
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
|
|
1064
|
-
import { Box, Paper, Stack, Typography } from "@mui/material";
|
|
1064
|
+
import { Box, Paper, Portal, Stack, Typography } from "@mui/material";
|
|
1065
1065
|
import { alpha, useTheme } from "@mui/material/styles";
|
|
1066
1066
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1067
1067
|
var DEFAULT_DURATION_MS = 3e3;
|
|
@@ -1144,7 +1144,7 @@ function AdminMessageViewport({
|
|
|
1144
1144
|
items,
|
|
1145
1145
|
onDismiss
|
|
1146
1146
|
}) {
|
|
1147
|
-
return /* @__PURE__ */ jsx4(
|
|
1147
|
+
return /* @__PURE__ */ jsx4(Portal, { children: /* @__PURE__ */ jsx4(
|
|
1148
1148
|
Box,
|
|
1149
1149
|
{
|
|
1150
1150
|
"aria-live": "polite",
|
|
@@ -1152,14 +1152,14 @@ function AdminMessageViewport({
|
|
|
1152
1152
|
position: "fixed",
|
|
1153
1153
|
top: { xs: 12, sm: 16 },
|
|
1154
1154
|
right: { xs: 12, sm: 16 },
|
|
1155
|
-
zIndex: (theme) => theme.zIndex.
|
|
1155
|
+
zIndex: (theme) => theme.zIndex.modal + 40,
|
|
1156
1156
|
width: { xs: "calc(100vw - 24px)", sm: 360 },
|
|
1157
1157
|
maxWidth: "100%",
|
|
1158
1158
|
pointerEvents: "none"
|
|
1159
1159
|
},
|
|
1160
1160
|
children: /* @__PURE__ */ jsx4(Stack, { spacing: 1, children: items.map((item) => /* @__PURE__ */ jsx4(AdminMessageBubble, { item, onDismiss }, item.id)) })
|
|
1161
1161
|
}
|
|
1162
|
-
);
|
|
1162
|
+
) });
|
|
1163
1163
|
}
|
|
1164
1164
|
function AdminMessageBubble({
|
|
1165
1165
|
item,
|
|
@@ -1177,9 +1177,9 @@ function AdminMessageBubble({
|
|
|
1177
1177
|
sx: {
|
|
1178
1178
|
pointerEvents: "auto",
|
|
1179
1179
|
cursor: "pointer",
|
|
1180
|
-
borderRadius: "
|
|
1180
|
+
borderRadius: "11px",
|
|
1181
1181
|
px: 1.5,
|
|
1182
|
-
py: 1.
|
|
1182
|
+
py: 1.125,
|
|
1183
1183
|
border: `1px solid ${appearance.borderColor}`,
|
|
1184
1184
|
backgroundColor: appearance.backgroundColor,
|
|
1185
1185
|
boxShadow: `0 14px 32px ${alpha("#000000", 0.22)}`,
|
|
@@ -1198,14 +1198,13 @@ function AdminMessageBubble({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
1200
|
},
|
|
1201
|
-
children: /* @__PURE__ */ jsxs2(Stack, { direction: "row", spacing: 1.
|
|
1201
|
+
children: /* @__PURE__ */ jsxs2(Stack, { direction: "row", spacing: 1.125, alignItems: "center", children: [
|
|
1202
1202
|
/* @__PURE__ */ jsx4(
|
|
1203
1203
|
Box,
|
|
1204
1204
|
{
|
|
1205
1205
|
sx: {
|
|
1206
|
-
width:
|
|
1207
|
-
height:
|
|
1208
|
-
mt: 0.125,
|
|
1206
|
+
width: 26,
|
|
1207
|
+
height: 26,
|
|
1209
1208
|
borderRadius: "999px",
|
|
1210
1209
|
display: "flex",
|
|
1211
1210
|
alignItems: "center",
|
|
@@ -1222,10 +1221,14 @@ function AdminMessageBubble({
|
|
|
1222
1221
|
{
|
|
1223
1222
|
sx: {
|
|
1224
1223
|
fontSize: 14,
|
|
1225
|
-
lineHeight: 1.
|
|
1224
|
+
lineHeight: 1.35,
|
|
1226
1225
|
fontWeight: 500,
|
|
1227
1226
|
color: "text.primary",
|
|
1228
|
-
wordBreak: "break-word"
|
|
1227
|
+
wordBreak: "break-word",
|
|
1228
|
+
flex: 1,
|
|
1229
|
+
display: "flex",
|
|
1230
|
+
alignItems: "center",
|
|
1231
|
+
minHeight: 26
|
|
1229
1232
|
},
|
|
1230
1233
|
children: item.text
|
|
1231
1234
|
}
|
|
@@ -1238,27 +1241,27 @@ function getBubbleAppearance(theme, kind) {
|
|
|
1238
1241
|
if (kind === "success") {
|
|
1239
1242
|
return {
|
|
1240
1243
|
icon: CheckCircleOutlineIcon,
|
|
1241
|
-
borderColor: alpha(theme.palette.success.main, 0.
|
|
1242
|
-
backgroundColor: alpha(theme.palette.success.main, 0.
|
|
1243
|
-
iconColor: theme.palette.success.
|
|
1244
|
-
iconBackgroundColor: alpha(theme.palette.success.main, 0.
|
|
1244
|
+
borderColor: alpha(theme.palette.success.main, 0.5),
|
|
1245
|
+
backgroundColor: alpha(theme.palette.success.main, 0.18),
|
|
1246
|
+
iconColor: theme.palette.success.main,
|
|
1247
|
+
iconBackgroundColor: alpha(theme.palette.success.main, 0.24)
|
|
1245
1248
|
};
|
|
1246
1249
|
}
|
|
1247
1250
|
if (kind === "error") {
|
|
1248
1251
|
return {
|
|
1249
1252
|
icon: ErrorOutlineIcon,
|
|
1250
|
-
borderColor: alpha(theme.palette.error.main, 0.
|
|
1251
|
-
backgroundColor: alpha(theme.palette.error.main, 0.
|
|
1252
|
-
iconColor: theme.palette.error.
|
|
1253
|
-
iconBackgroundColor: alpha(theme.palette.error.main, 0.
|
|
1253
|
+
borderColor: alpha(theme.palette.error.main, 0.42),
|
|
1254
|
+
backgroundColor: alpha(theme.palette.error.main, 0.14),
|
|
1255
|
+
iconColor: theme.palette.error.main,
|
|
1256
|
+
iconBackgroundColor: alpha(theme.palette.error.main, 0.18)
|
|
1254
1257
|
};
|
|
1255
1258
|
}
|
|
1256
1259
|
return {
|
|
1257
1260
|
icon: InfoOutlinedIcon,
|
|
1258
|
-
borderColor: alpha(theme.palette.info.main, 0.
|
|
1259
|
-
backgroundColor: alpha(theme.palette.info.main, 0.
|
|
1260
|
-
iconColor: theme.palette.info.
|
|
1261
|
-
iconBackgroundColor: alpha(theme.palette.info.main, 0.
|
|
1261
|
+
borderColor: alpha(theme.palette.info.main, 0.42),
|
|
1262
|
+
backgroundColor: alpha(theme.palette.info.main, 0.14),
|
|
1263
|
+
iconColor: theme.palette.info.main,
|
|
1264
|
+
iconBackgroundColor: alpha(theme.palette.info.main, 0.18)
|
|
1262
1265
|
};
|
|
1263
1266
|
}
|
|
1264
1267
|
|