@orsetra/shared-ui 1.11.2 → 1.11.4

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.
@@ -5,6 +5,7 @@ import { useEnvironmentContext } from "../../context/environment-context"
5
5
  import { environmentGateView, environmentLabel } from "../../lib/environment-context"
6
6
  import { AlertBanner } from "../ui/alert-banner"
7
7
  import { EnvironmentRequired } from "../ui/environment-required"
8
+ import { Spinner } from "../ui/spinner"
8
9
 
9
10
  export interface EnvironmentGateProps {
10
11
  children: ReactNode
@@ -18,10 +19,8 @@ export function EnvironmentGate({ children, required = true, createHref }: Envir
18
19
 
19
20
  if (view === "waiting") {
20
21
  return (
21
- <div className="p-4 space-y-3" aria-busy="true">
22
- <div className="h-9 w-64 bg-ibm-gray-20 animate-pulse" />
23
- <div className="h-24 bg-white border border-ui-border animate-pulse" />
24
- <div className="h-24 bg-white border border-ui-border animate-pulse" />
22
+ <div className="flex items-center justify-center h-full min-h-[320px]" aria-busy="true">
23
+ <Spinner size="lg" label="Loading environments" />
25
24
  </div>
26
25
  )
27
26
  }
@@ -36,10 +36,11 @@ export interface AlertBannerProps
36
36
  onClose?: () => void
37
37
  closable?: boolean
38
38
  icon?: React.ReactNode
39
+ action?: React.ReactNode
39
40
  }
40
41
 
41
42
  const AlertBanner = React.forwardRef<HTMLDivElement, AlertBannerProps>(
42
- ({ className, variant = "info", message, onClose, closable = true, icon, ...props }, ref) => {
43
+ ({ className, variant = "info", message, onClose, closable = true, icon, action, ...props }, ref) => {
43
44
  const Icon = iconMap[variant || "info"]
44
45
 
45
46
  return (
@@ -51,6 +52,7 @@ const AlertBanner = React.forwardRef<HTMLDivElement, AlertBannerProps>(
51
52
  >
52
53
  {icon || <Icon className="h-5 w-5 flex-shrink-0" />}
53
54
  <span className="flex-1">{message}</span>
55
+ {action && <div className="flex-shrink-0 flex items-center">{action}</div>}
54
56
  {closable && onClose && (
55
57
  <button
56
58
  onClick={onClose}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.11.2",
3
+ "version": "1.11.4",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",