react-better-html 1.1.128 → 1.1.130
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 +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1667,7 +1667,7 @@ import styled5, { css } from "styled-components";
|
|
|
1667
1667
|
import { memo as memo3 } from "react";
|
|
1668
1668
|
import styled3 from "styled-components";
|
|
1669
1669
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
1670
|
-
var StyledDiv = styled3
|
|
1670
|
+
var StyledDiv = styled3.div`
|
|
1671
1671
|
@keyframes loaderAnimation {
|
|
1672
1672
|
to {
|
|
1673
1673
|
transform: rotate(360deg);
|
|
@@ -1691,8 +1691,8 @@ var LoaderComponent = function Loader({
|
|
|
1691
1691
|
const readyColor = color ?? theme2.colors.textPrimary;
|
|
1692
1692
|
const readyWidth = width ?? size / 3;
|
|
1693
1693
|
const mask = `radial-gradient(farthest-side, #0000 calc(100% - ${readyWidth}px), #000 0)`;
|
|
1694
|
-
return /* @__PURE__ */ jsx3(
|
|
1695
|
-
|
|
1694
|
+
return /* @__PURE__ */ jsx3(StyledDiv, { children: /* @__PURE__ */ jsx3(
|
|
1695
|
+
Div_default,
|
|
1696
1696
|
{
|
|
1697
1697
|
width: size + readyWidth * 2,
|
|
1698
1698
|
height: size + readyWidth * 2,
|
|
@@ -1704,7 +1704,7 @@ var LoaderComponent = function Loader({
|
|
|
1704
1704
|
animation: !disabled ? "loaderAnimation .6s infinite linear" : void 0,
|
|
1705
1705
|
...props
|
|
1706
1706
|
}
|
|
1707
|
-
);
|
|
1707
|
+
) });
|
|
1708
1708
|
};
|
|
1709
1709
|
LoaderComponent.box = function Box({ text = "Loading...", size = 20, ...props }) {
|
|
1710
1710
|
const theme2 = useTheme();
|
|
@@ -2146,6 +2146,7 @@ var StyledDiv2 = styled6.div.withConfig({
|
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
2148
|
`;
|
|
2149
|
+
var minWidth = 250;
|
|
2149
2150
|
var updateInterval = 20;
|
|
2150
2151
|
var getAnimationInName = (position) => ({
|
|
2151
2152
|
left: "fadeInFromLeft",
|
|
@@ -2263,7 +2264,9 @@ function Alert2({ alert }) {
|
|
|
2263
2264
|
return /* @__PURE__ */ jsx6(StyledDiv2, { theme: theme2, children: /* @__PURE__ */ jsx6(
|
|
2264
2265
|
Div_default.box,
|
|
2265
2266
|
{
|
|
2266
|
-
|
|
2267
|
+
width: "fit-content",
|
|
2268
|
+
maxWidth: Math.max(minWidth, pluginConfig.maxWidth ?? defaultAlertsPluginOptions.maxWidth),
|
|
2269
|
+
minWidth,
|
|
2267
2270
|
boxShadow: "0px 10px 20px #00000020",
|
|
2268
2271
|
onMouseEnter,
|
|
2269
2272
|
onMouseMove: onMouseEnter,
|
|
@@ -2293,7 +2296,7 @@ function Alert2({ alert }) {
|
|
|
2293
2296
|
),
|
|
2294
2297
|
/* @__PURE__ */ jsxs3(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
2295
2298
|
/* @__PURE__ */ jsx6(Text_default, { fontSize: 18, fontWeight: 700, children: alert.title ?? alertData[alert.type].title }),
|
|
2296
|
-
/* @__PURE__ */ jsx6(Text_default, {
|
|
2299
|
+
/* @__PURE__ */ jsx6(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2297
2300
|
] }),
|
|
2298
2301
|
pluginConfig.withCloseButton && /* @__PURE__ */ jsx6(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
2299
2302
|
] }),
|
|
@@ -2343,6 +2346,7 @@ function AlertsHolder() {
|
|
|
2343
2346
|
left,
|
|
2344
2347
|
right,
|
|
2345
2348
|
gap: theme2.styles.gap,
|
|
2349
|
+
alignItems: pluginConfig.align === "center" ? "center" : pluginConfig.align === "right" ? "flex-end" : void 0,
|
|
2346
2350
|
transform: pluginConfig.align === "center" ? "translateX(-50%)" : void 0,
|
|
2347
2351
|
children: alerts.map((alert) => /* @__PURE__ */ jsx7(Alert_default, { alert }, alert.id))
|
|
2348
2352
|
}
|