elseware-ui 2.36.6 → 2.36.7
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.css +18 -33
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -21045,32 +21045,31 @@ function AsyncStateCard({
|
|
|
21045
21045
|
title,
|
|
21046
21046
|
message,
|
|
21047
21047
|
actionText,
|
|
21048
|
-
actionLoading,
|
|
21048
|
+
actionLoading = false,
|
|
21049
21049
|
onAction,
|
|
21050
21050
|
className
|
|
21051
21051
|
}) {
|
|
21052
21052
|
const isError = type === "error";
|
|
21053
|
-
return /* @__PURE__ */ jsx(
|
|
21054
|
-
|
|
21053
|
+
return /* @__PURE__ */ jsx("div", { className: "flex min-h-[240px] w-full items-center justify-center py-6", children: /* @__PURE__ */ jsx(
|
|
21054
|
+
Card_default,
|
|
21055
21055
|
{
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-md flex-col items-center gap-4 text-center", children: [
|
|
21056
|
+
bgVariant: "default",
|
|
21057
|
+
borderVariant: isError ? "danger" : "secondary",
|
|
21058
|
+
shape: "softRoundedSquare",
|
|
21059
|
+
hoverAnimation: "softLift",
|
|
21060
|
+
styles: cn("w-full max-w-xl", className),
|
|
21061
|
+
children: /* @__PURE__ */ jsx(CardContent_default, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-5 px-4 py-8 text-center", children: [
|
|
21063
21062
|
/* @__PURE__ */ jsx(
|
|
21064
21063
|
"div",
|
|
21065
21064
|
{
|
|
21066
21065
|
className: cn(
|
|
21067
21066
|
"flex h-12 w-12 items-center justify-center rounded-full text-xl font-bold",
|
|
21068
|
-
isError ? "bg-eui-danger-500/10 text-eui-danger-500" : "bg-eui-
|
|
21067
|
+
isError ? "bg-eui-danger-500/10 text-eui-danger-500" : "bg-eui-secondary-500/10 text-eui-secondary-500"
|
|
21069
21068
|
),
|
|
21070
21069
|
children: isError ? "!" : "\u2013"
|
|
21071
21070
|
}
|
|
21072
21071
|
),
|
|
21073
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
21072
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
21074
21073
|
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-eui-dark-900 dark:text-eui-light-50", children: title }),
|
|
21075
21074
|
isError ? /* @__PURE__ */ jsx(FormResponse_default, { text: message, variant: "danger" }) : /* @__PURE__ */ jsx("p", { className: "text-sm text-eui-dark-500 dark:text-eui-light-400", children: message })
|
|
21076
21075
|
] }),
|
|
@@ -21087,9 +21086,9 @@ function AsyncStateCard({
|
|
|
21087
21086
|
size: "sm"
|
|
21088
21087
|
}
|
|
21089
21088
|
)
|
|
21090
|
-
] })
|
|
21089
|
+
] }) })
|
|
21091
21090
|
}
|
|
21092
|
-
);
|
|
21091
|
+
) });
|
|
21093
21092
|
}
|
|
21094
21093
|
var AsyncStateCard_default = React2.memo(AsyncStateCard);
|
|
21095
21094
|
|
|
@@ -21142,6 +21141,7 @@ function AsyncComponentWrapper({
|
|
|
21142
21141
|
emptyFallback,
|
|
21143
21142
|
errorFallback,
|
|
21144
21143
|
showFetchingIndicator = true,
|
|
21144
|
+
showLoadingOnRetry = true,
|
|
21145
21145
|
onRetry,
|
|
21146
21146
|
errorFormatter,
|
|
21147
21147
|
className,
|
|
@@ -21153,6 +21153,7 @@ function AsyncComponentWrapper({
|
|
|
21153
21153
|
return errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error);
|
|
21154
21154
|
}, [isError, error, errorFormatter]);
|
|
21155
21155
|
const hasSuccess = isSuccess ?? (!isLoading && !isError && !isUninitialized);
|
|
21156
|
+
const shouldShowLoading = isLoading || showLoadingOnRetry && isFetching && isError;
|
|
21156
21157
|
const renderLoading = () => {
|
|
21157
21158
|
if (loadingFallback) return loadingFallback;
|
|
21158
21159
|
if (loadingType === "skeleton") {
|
|
@@ -21182,7 +21183,7 @@ function AsyncComponentWrapper({
|
|
|
21182
21183
|
title: errorTitle,
|
|
21183
21184
|
message: errorMessage,
|
|
21184
21185
|
actionText: onRetry ? retryText : void 0,
|
|
21185
|
-
actionLoading:
|
|
21186
|
+
actionLoading: false,
|
|
21186
21187
|
onAction: onRetry,
|
|
21187
21188
|
className: stateClassName
|
|
21188
21189
|
}
|
|
@@ -21200,7 +21201,7 @@ function AsyncComponentWrapper({
|
|
|
21200
21201
|
}
|
|
21201
21202
|
);
|
|
21202
21203
|
};
|
|
21203
|
-
if (
|
|
21204
|
+
if (shouldShowLoading) {
|
|
21204
21205
|
return /* @__PURE__ */ jsx("div", { className, "aria-live": "polite", children: renderLoading() });
|
|
21205
21206
|
}
|
|
21206
21207
|
if (isError) {
|