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.d.mts
CHANGED
|
@@ -2230,6 +2230,7 @@ interface AsyncComponentWrapperProps {
|
|
|
2230
2230
|
emptyFallback?: React__default.ReactNode;
|
|
2231
2231
|
errorFallback?: React__default.ReactNode | ((message: string) => React__default.ReactNode);
|
|
2232
2232
|
showFetchingIndicator?: boolean;
|
|
2233
|
+
showLoadingOnRetry?: boolean;
|
|
2233
2234
|
onRetry?: () => void;
|
|
2234
2235
|
errorFormatter?: (error: unknown) => string;
|
|
2235
2236
|
className?: string;
|
|
@@ -2237,7 +2238,7 @@ interface AsyncComponentWrapperProps {
|
|
|
2237
2238
|
stateClassName?: string;
|
|
2238
2239
|
}
|
|
2239
2240
|
|
|
2240
|
-
declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyTitle, emptyText, errorTitle, retryText, loadingType, skeletonCount, skeletonClassName, skeletonWrapperClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, onRetry, errorFormatter, className, contentClassName, stateClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
|
|
2241
|
+
declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyTitle, emptyText, errorTitle, retryText, loadingType, skeletonCount, skeletonClassName, skeletonWrapperClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, showLoadingOnRetry, onRetry, errorFormatter, className, contentClassName, stateClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
|
|
2241
2242
|
declare const _default: React__default.MemoExoticComponent<typeof AsyncComponentWrapper>;
|
|
2242
2243
|
|
|
2243
2244
|
interface GlowWrapperProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -2230,6 +2230,7 @@ interface AsyncComponentWrapperProps {
|
|
|
2230
2230
|
emptyFallback?: React__default.ReactNode;
|
|
2231
2231
|
errorFallback?: React__default.ReactNode | ((message: string) => React__default.ReactNode);
|
|
2232
2232
|
showFetchingIndicator?: boolean;
|
|
2233
|
+
showLoadingOnRetry?: boolean;
|
|
2233
2234
|
onRetry?: () => void;
|
|
2234
2235
|
errorFormatter?: (error: unknown) => string;
|
|
2235
2236
|
className?: string;
|
|
@@ -2237,7 +2238,7 @@ interface AsyncComponentWrapperProps {
|
|
|
2237
2238
|
stateClassName?: string;
|
|
2238
2239
|
}
|
|
2239
2240
|
|
|
2240
|
-
declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyTitle, emptyText, errorTitle, retryText, loadingType, skeletonCount, skeletonClassName, skeletonWrapperClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, onRetry, errorFormatter, className, contentClassName, stateClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
|
|
2241
|
+
declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyTitle, emptyText, errorTitle, retryText, loadingType, skeletonCount, skeletonClassName, skeletonWrapperClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, showLoadingOnRetry, onRetry, errorFormatter, className, contentClassName, stateClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
|
|
2241
2242
|
declare const _default: React__default.MemoExoticComponent<typeof AsyncComponentWrapper>;
|
|
2242
2243
|
|
|
2243
2244
|
interface GlowWrapperProps {
|
package/dist/index.js
CHANGED
|
@@ -21073,32 +21073,31 @@ function AsyncStateCard({
|
|
|
21073
21073
|
title,
|
|
21074
21074
|
message,
|
|
21075
21075
|
actionText,
|
|
21076
|
-
actionLoading,
|
|
21076
|
+
actionLoading = false,
|
|
21077
21077
|
onAction,
|
|
21078
21078
|
className
|
|
21079
21079
|
}) {
|
|
21080
21080
|
const isError = type === "error";
|
|
21081
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21082
|
-
|
|
21081
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-[240px] w-full items-center justify-center py-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
21082
|
+
Card_default,
|
|
21083
21083
|
{
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-w-md flex-col items-center gap-4 text-center", children: [
|
|
21084
|
+
bgVariant: "default",
|
|
21085
|
+
borderVariant: isError ? "danger" : "secondary",
|
|
21086
|
+
shape: "softRoundedSquare",
|
|
21087
|
+
hoverAnimation: "softLift",
|
|
21088
|
+
styles: cn("w-full max-w-xl", className),
|
|
21089
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CardContent_default, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center gap-5 px-4 py-8 text-center", children: [
|
|
21091
21090
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21092
21091
|
"div",
|
|
21093
21092
|
{
|
|
21094
21093
|
className: cn(
|
|
21095
21094
|
"flex h-12 w-12 items-center justify-center rounded-full text-xl font-bold",
|
|
21096
|
-
isError ? "bg-eui-danger-500/10 text-eui-danger-500" : "bg-eui-
|
|
21095
|
+
isError ? "bg-eui-danger-500/10 text-eui-danger-500" : "bg-eui-secondary-500/10 text-eui-secondary-500"
|
|
21097
21096
|
),
|
|
21098
21097
|
children: isError ? "!" : "\u2013"
|
|
21099
21098
|
}
|
|
21100
21099
|
),
|
|
21101
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
21100
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
21102
21101
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-eui-dark-900 dark:text-eui-light-50", children: title }),
|
|
21103
21102
|
isError ? /* @__PURE__ */ jsxRuntime.jsx(FormResponse_default, { text: message, variant: "danger" }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-eui-dark-500 dark:text-eui-light-400", children: message })
|
|
21104
21103
|
] }),
|
|
@@ -21115,9 +21114,9 @@ function AsyncStateCard({
|
|
|
21115
21114
|
size: "sm"
|
|
21116
21115
|
}
|
|
21117
21116
|
)
|
|
21118
|
-
] })
|
|
21117
|
+
] }) })
|
|
21119
21118
|
}
|
|
21120
|
-
);
|
|
21119
|
+
) });
|
|
21121
21120
|
}
|
|
21122
21121
|
var AsyncStateCard_default = React2__default.default.memo(AsyncStateCard);
|
|
21123
21122
|
|
|
@@ -21170,6 +21169,7 @@ function AsyncComponentWrapper({
|
|
|
21170
21169
|
emptyFallback,
|
|
21171
21170
|
errorFallback,
|
|
21172
21171
|
showFetchingIndicator = true,
|
|
21172
|
+
showLoadingOnRetry = true,
|
|
21173
21173
|
onRetry,
|
|
21174
21174
|
errorFormatter,
|
|
21175
21175
|
className,
|
|
@@ -21181,6 +21181,7 @@ function AsyncComponentWrapper({
|
|
|
21181
21181
|
return errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error);
|
|
21182
21182
|
}, [isError, error, errorFormatter]);
|
|
21183
21183
|
const hasSuccess = isSuccess ?? (!isLoading && !isError && !isUninitialized);
|
|
21184
|
+
const shouldShowLoading = isLoading || showLoadingOnRetry && isFetching && isError;
|
|
21184
21185
|
const renderLoading = () => {
|
|
21185
21186
|
if (loadingFallback) return loadingFallback;
|
|
21186
21187
|
if (loadingType === "skeleton") {
|
|
@@ -21210,7 +21211,7 @@ function AsyncComponentWrapper({
|
|
|
21210
21211
|
title: errorTitle,
|
|
21211
21212
|
message: errorMessage,
|
|
21212
21213
|
actionText: onRetry ? retryText : void 0,
|
|
21213
|
-
actionLoading:
|
|
21214
|
+
actionLoading: false,
|
|
21214
21215
|
onAction: onRetry,
|
|
21215
21216
|
className: stateClassName
|
|
21216
21217
|
}
|
|
@@ -21228,7 +21229,7 @@ function AsyncComponentWrapper({
|
|
|
21228
21229
|
}
|
|
21229
21230
|
);
|
|
21230
21231
|
};
|
|
21231
|
-
if (
|
|
21232
|
+
if (shouldShowLoading) {
|
|
21232
21233
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "aria-live": "polite", children: renderLoading() });
|
|
21233
21234
|
}
|
|
21234
21235
|
if (isError) {
|