react-better-html 1.1.267 → 1.1.268
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2116,7 +2116,10 @@ var ButtonElement = styled6.button.withConfig({
|
|
|
2116
2116
|
${(props) => props.hoverStyle}
|
|
2117
2117
|
}
|
|
2118
2118
|
`;
|
|
2119
|
-
var ButtonComponent = function Button(
|
|
2119
|
+
var ButtonComponent = function Button({
|
|
2120
|
+
fromSubcomponent,
|
|
2121
|
+
...buttonProps
|
|
2122
|
+
}) {
|
|
2120
2123
|
const betterHtmlContextInternal = useBetterHtmlContextInternal();
|
|
2121
2124
|
const {
|
|
2122
2125
|
href,
|
|
@@ -2142,7 +2145,7 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2142
2145
|
onClickWithValue,
|
|
2143
2146
|
...props
|
|
2144
2147
|
} = useComponentsPropsMerger(
|
|
2145
|
-
!
|
|
2148
|
+
!fromSubcomponent ? betterHtmlContextInternal.components.button?.style?.default : {},
|
|
2146
2149
|
buttonProps
|
|
2147
2150
|
);
|
|
2148
2151
|
const theme2 = useTheme9();
|
|
@@ -2362,6 +2365,9 @@ import {
|
|
|
2362
2365
|
} from "react-better-core";
|
|
2363
2366
|
import styled7 from "styled-components";
|
|
2364
2367
|
import { Fragment, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2368
|
+
var isAlertModalProps = {
|
|
2369
|
+
isAlert: true
|
|
2370
|
+
};
|
|
2365
2371
|
var DialogStylesElement = styled7.dialog.withConfig({
|
|
2366
2372
|
shouldForwardProp: (prop) => !["theme", "colorTheme", "opacity"].includes(prop)
|
|
2367
2373
|
})`
|
|
@@ -2418,10 +2424,11 @@ var ModalComponent = forwardRef7(function Modal({
|
|
|
2418
2424
|
defaultIsOpened = false,
|
|
2419
2425
|
onOpen,
|
|
2420
2426
|
onClose,
|
|
2427
|
+
isAlert,
|
|
2421
2428
|
children
|
|
2422
2429
|
}, ref) {
|
|
2423
2430
|
const reactRouterDomPlugin2 = usePlugin("react-router-dom");
|
|
2424
|
-
const urlQuery = reactRouterDomPlugin2 ? useUrlQuery() : void 0;
|
|
2431
|
+
const urlQuery = reactRouterDomPlugin2 && !isAlert ? useUrlQuery() : void 0;
|
|
2425
2432
|
const theme2 = useTheme10();
|
|
2426
2433
|
const { app } = useBetterHtmlContextInternal();
|
|
2427
2434
|
const { colorTheme } = useBetterCoreContext4();
|
|
@@ -2927,7 +2934,7 @@ function Alert2({ alert }) {
|
|
|
2927
2934
|
const animation = `${isRemoved ? getAnimationOutName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align] : getAnimationInName(pluginConfig.position ?? defaultAlertsPluginOptions.position)[pluginConfig.align ?? defaultAlertsPluginOptions.align]} ${theme2.styles.transition}`;
|
|
2928
2935
|
const alertTitle = alert.title ?? alertData[alert.type].title;
|
|
2929
2936
|
return defaultAlertDisplay === "prominent" ? /* @__PURE__ */ jsx10(
|
|
2930
|
-
|
|
2937
|
+
ModalComponent,
|
|
2931
2938
|
{
|
|
2932
2939
|
defaultIsOpened: true,
|
|
2933
2940
|
icon: alertData[alert.type].icon,
|
|
@@ -2939,6 +2946,7 @@ function Alert2({ alert }) {
|
|
|
2939
2946
|
headerBackgroundColor: alertData[alert.type].backgroundColor,
|
|
2940
2947
|
withoutCloseButton: true,
|
|
2941
2948
|
ref: modalRef,
|
|
2949
|
+
...isAlertModalProps,
|
|
2942
2950
|
children: /* @__PURE__ */ jsx10(Div_default.row, { width: "100%", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx10(
|
|
2943
2951
|
Button_default,
|
|
2944
2952
|
{
|