{"version":3,"file":"WidgetLoadingSkeleton-BZvZWHQo.mjs","names":[],"sources":["../../widgets/src/components/WidgetLoadingSkeleton.tsx"],"sourcesContent":["import { Skeleton } from \"@fluid-app/ui-primitives\";\nimport { useShellTranslationOptional } from \"@fluid-app/portal-core/shell-translation-api-context\";\n\n/**\n * Shared loading placeholder for data-backed widgets. Replaces the assortment\n * of per-widget spinners (border-spin divs, lucide Loader2) with one pulse\n * skeleton so a dashboard shows a single, consistent loading language instead\n * of several. Composes the shared Skeleton primitive; rows resemble the icon +\n * two-line content most widgets render.\n */\nexport function WidgetLoadingSkeleton({\n  minHeight = 120,\n  rows = 3,\n}: {\n  minHeight?: number;\n  rows?: number;\n}): React.JSX.Element {\n  // Give the status region an accessible label so screen readers announce the\n  // load. Optional so the skeleton still renders outside the shell provider.\n  const loadingLabel = useShellTranslationOptional()?.t(\"loading\");\n\n  return (\n    <div\n      className=\"flex flex-col justify-center gap-3 p-1\"\n      style={{ minHeight }}\n      role=\"status\"\n      aria-busy=\"true\"\n    >\n      {loadingLabel ? <span className=\"sr-only\">{loadingLabel}</span> : null}\n      {Array.from({ length: rows }).map((_, index) => (\n        <div key={index} className=\"flex items-center gap-3\">\n          <Skeleton className=\"size-9 shrink-0\" />\n          <div className=\"flex-1 space-y-2\">\n            <Skeleton className=\"h-3 w-3/4\" />\n            <Skeleton className=\"h-3 w-1/2\" />\n          </div>\n        </div>\n      ))}\n    </div>\n  );\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,sBAAsB,EACpC,YAAY,KACZ,OAAO,KAIa;CAGpB,MAAM,eAAe,6BAA6B,EAAE,EAAE,UAAU;AAEhE,QACE,qBAAC,OAAD;EACE,WAAU;EACV,OAAO,EAAE,WAAW;EACpB,MAAK;EACL,aAAU;YAJZ,CAMG,eAAe,oBAAC,QAAD;GAAM,WAAU;aAAW;GAAoB,CAAA,GAAG,MACjE,MAAM,KAAK,EAAE,QAAQ,MAAM,CAAC,CAAC,KAAK,GAAG,UACpC,qBAAC,OAAD;GAAiB,WAAU;aAA3B,CACE,oBAAC,UAAD,EAAU,WAAU,mBAAoB,CAAA,EACxC,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAAC,UAAD,EAAU,WAAU,aAAc,CAAA,EAClC,oBAAC,UAAD,EAAU,WAAU,aAAc,CAAA,CAC9B;MACF;KANI,MAMJ,CACN,CACE"}