@marktiderman/genesis-ui 2.10.0 → 2.10.1
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.
|
@@ -142,29 +142,43 @@ function DataPageShell({
|
|
|
142
142
|
/* @__PURE__ */ jsx(Header, { ...sharedHeaderProps, options: baseHeaderOptions }),
|
|
143
143
|
filters
|
|
144
144
|
] }),
|
|
145
|
-
isLoading ?
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
children: Array.from({ length:
|
|
145
|
+
isLoading ? (
|
|
146
|
+
// Shaped like the view it stands in for, so a list inside a panel or
|
|
147
|
+
// tab doesn't reserve a page of card placeholders.
|
|
148
|
+
/* @__PURE__ */ jsxs("div", { "data-testid": "page-loader", role: "status", "aria-busy": "true", children: [
|
|
149
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading\u2026" }),
|
|
150
|
+
viewMode === "grid" ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(
|
|
151
151
|
Skeleton,
|
|
152
152
|
{
|
|
153
|
-
className: "h-
|
|
153
|
+
className: "h-32 rounded-xl",
|
|
154
154
|
style: { animationDelay: `${i * 75}ms` }
|
|
155
155
|
},
|
|
156
156
|
i
|
|
157
|
-
))
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
" Retry"
|
|
157
|
+
)) }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx(
|
|
158
|
+
Skeleton,
|
|
159
|
+
{
|
|
160
|
+
className: "h-10 rounded-md",
|
|
161
|
+
style: { animationDelay: `${i * 75}ms` }
|
|
162
|
+
},
|
|
163
|
+
i
|
|
164
|
+
)) })
|
|
166
165
|
] })
|
|
167
|
-
|
|
166
|
+
) : hasError ? /* @__PURE__ */ jsxs(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
role: "alert",
|
|
170
|
+
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "h-10 w-10 text-destructive mb-3", "aria-hidden": true }),
|
|
173
|
+
/* @__PURE__ */ jsx("p", { className: "mb-1 text-sm font-medium text-foreground", children: "Something went wrong" }),
|
|
174
|
+
/* @__PURE__ */ jsx("p", { className: "mb-4 text-sm text-muted-foreground", children: errorMessage2 || `Failed to load ${entity}s. Please try again.` }),
|
|
175
|
+
onRetry && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", onClick: onRetry, children: [
|
|
176
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "mr-1 h-4 w-4", "aria-hidden": true }),
|
|
177
|
+
" Retry"
|
|
178
|
+
] })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
) : isEmpty ? /* @__PURE__ */ jsx(
|
|
168
182
|
EmptyState,
|
|
169
183
|
{
|
|
170
184
|
icon: emptyIcon,
|