sage-nexus-ui 1.4.5 → 1.5.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.
@@ -1 +1 @@
1
- import{jsxs as r,jsx as i}from"react/jsx-runtime";import{GlassPaper as e}from"./GlassPaper.mjs";import{Box as o}from"./Box.mjs";import{H3 as l,Body2 as m}from"./Typography.mjs";import{LoadingSpinnerNexus as n}from"./LoadingSpinnerNexus.mjs";const s=({title:s,isLoading:c,isError:t,errorMessage:d,children:p,...a})=>c?r(e,{...a,children:[i(l,{children:s}),i(o,{sx:{display:"flex",flexDirection:"column",mt:1},children:i(n,{})})]}):t?r(e,{...a,children:[i(l,{children:s}),i(o,{sx:{display:"flex",flexDirection:"column",mt:1},children:i(m,{color:"error",sx:{p:2},children:d??`Failed to load ${s}.`})})]}):i(e,{...a,children:p});export{s as GlassPaperAsync};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{GlassPaper as i}from"./GlassPaper.mjs";import{Box as n}from"./Box.mjs";import{H3 as l,Body2 as s}from"./Typography.mjs";import{LoadingSpinnerNexus as t}from"./LoadingSpinnerNexus.mjs";const o=({title:o,description:c,actions:d,isLoading:m,isError:x,errorMessage:h,children:a,...p})=>{if(m)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(t,{})})]});if(x)return r(i,{...p,children:[r(n,{sx:{mb:2},children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),e(n,{sx:{display:"flex",flexDirection:"column",mt:1},children:e(s,{color:"error",sx:{p:2},children:h??`Failed to load ${o}.`})})]});const f=o||c||d;return r(i,{...p,children:[f&&r(n,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1,mb:2.5},children:[r(n,{children:[e(l,{children:o}),c&&e(s,{sx:{mt:.5},children:c})]}),d&&e(n,{sx:{flexShrink:0},children:d})]}),a]})};export{o as GlassPaperAsync};
@@ -1 +1 @@
1
- const o="1.4.5";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.5.1";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -230,12 +230,16 @@ declare const Divider: ({ children, ...rest }: DividerProps) => react_jsx_runtim
230
230
 
231
231
  type GlassPaperAsyncProps = Omit<GlassPaperProps, "children"> & {
232
232
  title: string;
233
+ /** Optional supporting description rendered below the title. */
234
+ description?: ReactNode;
235
+ /** Optional actions (e.g. chip toggles, buttons) rendered in the top-right of the header. Hidden while loading or in error state. */
236
+ actions?: ReactNode;
233
237
  isLoading: boolean;
234
238
  isError: boolean;
235
239
  errorMessage?: string;
236
240
  children?: ReactNode;
237
241
  };
238
- declare const GlassPaperAsync: ({ title, isLoading, isError, errorMessage, children, ...rest }: GlassPaperAsyncProps) => react_jsx_runtime.JSX.Element;
242
+ declare const GlassPaperAsync: ({ title, description, actions, isLoading, isError, errorMessage, children, ...rest }: GlassPaperAsyncProps) => react_jsx_runtime.JSX.Element;
239
243
 
240
244
  type GreenWaveBackgroundProps = BoxProps;
241
245
  declare const GreenWaveBackground: ({ sx, children, ...rest }: GreenWaveBackgroundProps) => react_jsx_runtime.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.4.5",
3
+ "version": "1.5.1",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",