sage-nexus-ui 1.0.16 → 1.0.18

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.
@@ -0,0 +1,22 @@
1
+ import { type AccordionSummaryProps, type SxProps, type Theme } from "@mui/material";
2
+ import type { ReactNode } from "react";
3
+ export interface AccordionGroupProps {
4
+ children: ReactNode;
5
+ sx?: SxProps<Theme>;
6
+ }
7
+ export declare const AccordionGroup: ({ children, sx }: AccordionGroupProps) => import("react/jsx-runtime").JSX.Element;
8
+ export interface AccordionGroupItemProps {
9
+ /** ReactNode rendered inside AccordionSummary — can be as simple or complex as needed. */
10
+ summary: ReactNode;
11
+ children: ReactNode;
12
+ defaultExpanded?: boolean;
13
+ disabled?: boolean;
14
+ /** Props forwarded to AccordionSummary (e.g. aria-controls, id). */
15
+ summaryProps?: Omit<AccordionSummaryProps, "expandIcon" | "children">;
16
+ /** Override the default ExpandMoreIcon. */
17
+ expandIcon?: ReactNode;
18
+ sx?: SxProps<Theme>;
19
+ /** sx applied to the AccordionDetails wrapper. */
20
+ detailsSx?: SxProps<Theme>;
21
+ }
22
+ export declare const AccordionGroupItem: ({ summary, children, defaultExpanded, disabled, summaryProps, expandIcon, sx, detailsSx, }: AccordionGroupItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { type AccordionSummaryProps, type SxProps, type Theme } from "@mui/material";
2
+ import type { ReactNode } from "react";
3
+ export interface AccordionSingleProps {
4
+ /** ReactNode rendered inside AccordionSummary — can be as simple or complex as needed. */
5
+ summary: ReactNode;
6
+ children: ReactNode;
7
+ defaultExpanded?: boolean;
8
+ disabled?: boolean;
9
+ /** Props forwarded to AccordionSummary (e.g. aria-controls, id). */
10
+ summaryProps?: Omit<AccordionSummaryProps, "expandIcon" | "children">;
11
+ /** Override the default ExpandMoreIcon. */
12
+ expandIcon?: ReactNode;
13
+ sx?: SxProps<Theme>;
14
+ /** sx applied to the AccordionDetails wrapper. */
15
+ detailsSx?: SxProps<Theme>;
16
+ }
17
+ export declare const AccordionSingle: ({ summary, children, defaultExpanded, disabled, summaryProps, expandIcon, sx, detailsSx, }: AccordionSingleProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type CardProps } from "./Card";
2
+ export type AiCardProps = CardProps;
3
+ export declare const AiCard: ({ sx, children, ...rest }: AiCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type GlassCardProps } from "./GlassCard";
2
+ export type AiGlassCardProps = GlassCardProps;
3
+ export declare const AiGlassCard: ({ sx, children, ...rest }: AiGlassCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type CardProps as MuiCardProps } from "@mui/material";
2
+ export type CardTrend = "up" | "flat" | "down";
3
+ export interface CardProps extends MuiCardProps {
4
+ /** Small icon displayed beside the label. Pass an MUI SvgIcon element. */
5
+ icon?: React.ReactNode;
6
+ /** Card label / metric name. */
7
+ label?: string;
8
+ /** Primary large value. */
9
+ value?: string;
10
+ /** Supporting subtext (e.g. "+11% YoY"). Coloured by trend when provided. */
11
+ subtext?: string;
12
+ /** Controls the colour of subtext. */
13
+ trend?: CardTrend;
14
+ }
15
+ export declare const Card: ({ icon, label, value, subtext, trend, sx, children, ...rest }: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type CardProps } from "./Card";
2
+ export type GlassCardProps = CardProps;
3
+ export declare const GlassCard: ({ sx, ...rest }: GlassCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,5 @@
1
- export declare const NexusHome: React.FC;
1
+ interface NexusHomeProps {
2
+ href?: string;
3
+ }
4
+ export declare const NexusHome: React.FC<NexusHomeProps>;
5
+ export {};
@@ -1,5 +1,9 @@
1
1
  export * from "./DateFormats";
2
2
  export { ActionBar } from "./ActionBar";
3
+ export { AccordionGroup, AccordionGroupItem } from "./AccordionGroup";
4
+ export type { AccordionGroupProps, AccordionGroupItemProps } from "./AccordionGroup";
5
+ export { AccordionSingle } from "./AccordionSingle";
6
+ export type { AccordionSingleProps } from "./AccordionSingle";
3
7
  export { H1, H2, H3, H4, ActionBarTitle, Body1, Body2, Caption, } from "./Typography";
4
8
  export { AiButton } from "./AiButton";
5
9
  export type { AiButtonProps } from "./AiButton";
@@ -7,6 +11,14 @@ export { AiPaper } from "./AiPaper";
7
11
  export type { AiPaperProps } from "./AiPaper";
8
12
  export { AiGlassPaper } from "./AiGlassPaper";
9
13
  export type { AiGlassPaperProps } from "./AiGlassPaper";
14
+ export { Card } from "./Card";
15
+ export type { CardProps, CardTrend } from "./Card";
16
+ export { GlassCard } from "./GlassCard";
17
+ export type { GlassCardProps } from "./GlassCard";
18
+ export { AiCard } from "./AiCard";
19
+ export type { AiCardProps } from "./AiCard";
20
+ export { AiGlassCard } from "./AiGlassCard";
21
+ export type { AiGlassCardProps } from "./AiGlassCard";
10
22
  export { CheckboxGroup } from "./CheckboxGroup";
11
23
  export { Paper } from "./Paper";
12
24
  export type { PaperProps } from "./Paper";
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { ReactNode, ReactElement, CSSProperties, PropsWithChildren } from 'react';
3
- import { TypographyProps, ButtonProps, PaperProps, BoxProps, SxProps as SxProps$1, ChipProps } from '@mui/material';
4
- export { PaperProps } from '@mui/material';
5
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { SxProps } from '@mui/system';
7
- import { Theme, SxProps as SxProps$2 } from '@mui/material/styles';
4
+ import { SxProps, Theme, AccordionSummaryProps, TypographyProps, ButtonProps, PaperProps, CardProps as CardProps$1, BoxProps, ChipProps } from '@mui/material';
5
+ export { PaperProps } from '@mui/material';
6
+ import { SxProps as SxProps$1 } from '@mui/system';
7
+ import { Theme as Theme$1, SxProps as SxProps$2 } from '@mui/material/styles';
8
8
 
9
9
  declare const getFiscalPeriod: (date: Date) => {
10
10
  fiscalYear: number;
@@ -20,6 +20,43 @@ interface ActionBarProps {
20
20
  }
21
21
  declare const ActionBar: ({ title, extraLeft, extraRight, }: ActionBarProps) => ReactElement;
22
22
 
23
+ interface AccordionGroupProps {
24
+ children: ReactNode;
25
+ sx?: SxProps<Theme>;
26
+ }
27
+ declare const AccordionGroup: ({ children, sx }: AccordionGroupProps) => react_jsx_runtime.JSX.Element;
28
+ interface AccordionGroupItemProps {
29
+ /** ReactNode rendered inside AccordionSummary — can be as simple or complex as needed. */
30
+ summary: ReactNode;
31
+ children: ReactNode;
32
+ defaultExpanded?: boolean;
33
+ disabled?: boolean;
34
+ /** Props forwarded to AccordionSummary (e.g. aria-controls, id). */
35
+ summaryProps?: Omit<AccordionSummaryProps, "expandIcon" | "children">;
36
+ /** Override the default ExpandMoreIcon. */
37
+ expandIcon?: ReactNode;
38
+ sx?: SxProps<Theme>;
39
+ /** sx applied to the AccordionDetails wrapper. */
40
+ detailsSx?: SxProps<Theme>;
41
+ }
42
+ declare const AccordionGroupItem: ({ summary, children, defaultExpanded, disabled, summaryProps, expandIcon, sx, detailsSx, }: AccordionGroupItemProps) => react_jsx_runtime.JSX.Element;
43
+
44
+ interface AccordionSingleProps {
45
+ /** ReactNode rendered inside AccordionSummary — can be as simple or complex as needed. */
46
+ summary: ReactNode;
47
+ children: ReactNode;
48
+ defaultExpanded?: boolean;
49
+ disabled?: boolean;
50
+ /** Props forwarded to AccordionSummary (e.g. aria-controls, id). */
51
+ summaryProps?: Omit<AccordionSummaryProps, "expandIcon" | "children">;
52
+ /** Override the default ExpandMoreIcon. */
53
+ expandIcon?: ReactNode;
54
+ sx?: SxProps<Theme>;
55
+ /** sx applied to the AccordionDetails wrapper. */
56
+ detailsSx?: SxProps<Theme>;
57
+ }
58
+ declare const AccordionSingle: ({ summary, children, defaultExpanded, disabled, summaryProps, expandIcon, sx, detailsSx, }: AccordionSingleProps) => react_jsx_runtime.JSX.Element;
59
+
23
60
  /**
24
61
  * Typed wrappers around MUI Typography that fix the `variant` prop and
25
62
  * inherit colour from the sageTheme TYPOGRAPHY_COLOURS map.
@@ -59,14 +96,38 @@ declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react_
59
96
  type AiGlassPaperProps = GlassPaperProps;
60
97
  declare const AiGlassPaper: ({ sx, children, ...rest }: AiGlassPaperProps) => react_jsx_runtime.JSX.Element;
61
98
 
99
+ type CardTrend = "up" | "flat" | "down";
100
+ interface CardProps extends CardProps$1 {
101
+ /** Small icon displayed beside the label. Pass an MUI SvgIcon element. */
102
+ icon?: React.ReactNode;
103
+ /** Card label / metric name. */
104
+ label?: string;
105
+ /** Primary large value. */
106
+ value?: string;
107
+ /** Supporting subtext (e.g. "+11% YoY"). Coloured by trend when provided. */
108
+ subtext?: string;
109
+ /** Controls the colour of subtext. */
110
+ trend?: CardTrend;
111
+ }
112
+ declare const Card: ({ icon, label, value, subtext, trend, sx, children, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
113
+
114
+ type GlassCardProps = CardProps;
115
+ declare const GlassCard: ({ sx, ...rest }: GlassCardProps) => react_jsx_runtime.JSX.Element;
116
+
117
+ type AiCardProps = CardProps;
118
+ declare const AiCard: ({ sx, children, ...rest }: AiCardProps) => react_jsx_runtime.JSX.Element;
119
+
120
+ type AiGlassCardProps = GlassCardProps;
121
+ declare const AiGlassCard: ({ sx, children, ...rest }: AiGlassCardProps) => react_jsx_runtime.JSX.Element;
122
+
62
123
  interface CheckboxGroupProps {
63
124
  title?: React.ReactNode;
64
125
  labels?: string[];
65
126
  selectedValues?: string[];
66
127
  onChange?: (values: string[]) => void;
67
- rootSx?: SxProps<Theme>;
68
- groupSx?: SxProps<Theme>;
69
- titleSx?: SxProps<Theme>;
128
+ rootSx?: SxProps$1<Theme$1>;
129
+ groupSx?: SxProps$1<Theme$1>;
130
+ titleSx?: SxProps$1<Theme$1>;
70
131
  }
71
132
  declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
72
133
 
@@ -79,13 +140,16 @@ interface LocationMultiSelectProps {
79
140
  emptyLabel?: string;
80
141
  selectedLocations?: string[];
81
142
  onLocationsChange?: (next: string[]) => void;
82
- formControlSx?: SxProps$1<Theme>;
83
- menuSx?: SxProps$1<Theme>;
84
- selectSx?: SxProps$1<Theme>;
143
+ formControlSx?: SxProps<Theme$1>;
144
+ menuSx?: SxProps<Theme$1>;
145
+ selectSx?: SxProps<Theme$1>;
85
146
  }
86
147
  declare const LocationMultiSelect: react__default.FC<LocationMultiSelectProps>;
87
148
 
88
- declare const NexusHome: React.FC;
149
+ interface NexusHomeProps {
150
+ href?: string;
151
+ }
152
+ declare const NexusHome: React.FC<NexusHomeProps>;
89
153
 
90
154
  type LogoProps = {
91
155
  size?: "sm" | "md" | "lg";
@@ -127,8 +191,8 @@ interface SearchInputProps {
127
191
  onSearchChange: (value: string) => void;
128
192
  placeholder?: string;
129
193
  searchValue?: string;
130
- sx?: SxProps$1<Theme>;
131
- styles?: SxProps$1<Theme>;
194
+ sx?: SxProps<Theme$1>;
195
+ styles?: SxProps<Theme$1>;
132
196
  }
133
197
  declare const SearchInput: react__default.FC<SearchInputProps>;
134
198
 
@@ -157,6 +221,7 @@ type ModeTokens = {
157
221
  text: {
158
222
  primary: string;
159
223
  secondary: string;
224
+ blues: string;
160
225
  greens: string;
161
226
  greys: string;
162
227
  };
@@ -169,9 +234,11 @@ declare const colours: {
169
234
  readonly brilliantGreen: "#00D639";
170
235
  readonly primaryGreenHover: "#00BE32";
171
236
  readonly primaryGreenActive: "#00AA2D";
237
+ readonly cyan: "#00D6DE";
172
238
  readonly jade: "#00A65C";
173
239
  readonly teal: "#006362";
174
- readonly navy: "#2977a1";
240
+ readonly blue: "#2D60FF";
241
+ readonly navy: "#1531af";
175
242
  readonly cherry: "#cc0f4b";
176
243
  readonly terra: "#A13829";
177
244
  readonly amber: "#E9875B";
@@ -204,7 +271,7 @@ declare module "@mui/material/Typography" {
204
271
  }
205
272
  }
206
273
 
207
- declare const createSageTheme: (mode?: ThemeMode) => Theme;
274
+ declare const createSageTheme: (mode?: ThemeMode) => Theme$1;
208
275
 
209
276
  declare const useTokens: () => ModeTokens;
210
277
 
@@ -224,7 +291,7 @@ type GradientBorderOptions = {
224
291
  borderRadius?: number;
225
292
  padding?: number;
226
293
  };
227
- declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOptions) => {
294
+ declare const getGradientBorderStyles: (theme: Theme$1, options?: GradientBorderOptions) => {
228
295
  position: string;
229
296
  borderRadius: number;
230
297
  border: string;
@@ -243,8 +310,8 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
243
310
  pointerEvents: string;
244
311
  };
245
312
  };
246
- declare const leftPipe: SxProps$2<Theme>;
247
- declare const expandableText: (isExpanded: boolean) => SxProps$2<Theme>;
313
+ declare const leftPipe: SxProps$2<Theme$1>;
314
+ declare const expandableText: (isExpanded: boolean) => SxProps$2<Theme$1>;
248
315
 
249
- export { ActionBar, ActionBarTitle, AiButton, AiGlassPaper, AiPaper, Body1, Body2, Caption, CheckboxGroup, GlassPaper, GreenWaveBackground, H1, H2, H3, H4, LocationMultiSelect, MuiAppThemeProvider, NexusHome, NexusLogo, Paper, PrimaryButton, PrimaryButtonLink, RagDot, SearchInput, SecondaryButton, SecondaryButtonLink, SkillChip, StatusChip, ThemeModeProvider, ThemeToggle, colours, createSageTheme, expandableText, fontSageText, fontSageUI, formatDate, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, leftPipe, useThemeMode, useTokens };
250
- export type { AiButtonProps, AiGlassPaperProps, AiPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, ModeTokens, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, ThemeMode };
316
+ export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AiButton, AiCard, AiGlassCard, AiGlassPaper, AiPaper, Body1, Body2, Caption, Card, CheckboxGroup, GlassCard, GlassPaper, GreenWaveBackground, H1, H2, H3, H4, LocationMultiSelect, MuiAppThemeProvider, NexusHome, NexusLogo, Paper, PrimaryButton, PrimaryButtonLink, RagDot, SearchInput, SecondaryButton, SecondaryButtonLink, SkillChip, StatusChip, ThemeModeProvider, ThemeToggle, colours, createSageTheme, expandableText, fontSageText, fontSageUI, formatDate, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, leftPipe, useThemeMode, useTokens };
317
+ export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, AiButtonProps, AiCardProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, CardProps, CardTrend, GlassCardProps, GradientBorderOptions, GreenWaveBackgroundProps, ModeTokens, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, ThemeMode };