sage-nexus-ui 1.0.15 → 1.0.17

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,8 +1,8 @@
1
- import { type ButtonBaseProps } from "@mui/material";
2
- export interface AiButtonProps extends Omit<ButtonBaseProps, "children"> {
3
- size?: "small" | "medium" | "large";
4
- children?: React.ReactNode;
1
+ import { type SecondaryButtonProps } from "./SecondaryButton";
2
+ export interface AiButtonProps extends Omit<SecondaryButtonProps, "color" | "children" | "startIcon"> {
3
+ /** Button label. Defaults to "Nexus Insights". */
4
+ label?: string;
5
+ /** Override the start icon. Defaults to AutoAwesomeIcon. */
5
6
  startIcon?: React.ReactNode;
6
- endIcon?: React.ReactNode;
7
7
  }
8
8
  export declare const AiButton: React.FC<AiButtonProps>;
@@ -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,3 @@
1
+ import { type GlassPaperProps } from "./GlassPaper";
2
+ export type AiGlassPaperProps = GlassPaperProps;
3
+ export declare const AiGlassPaper: ({ sx, children, ...rest }: AiGlassPaperProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
- import { type PaperProps } from "@mui/material";
1
+ import { type PaperProps } from "./Paper";
2
2
  export type AiPaperProps = PaperProps;
3
3
  export declare const AiPaper: ({ sx, children, ...rest }: AiPaperProps) => 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,3 +1,3 @@
1
- import { type PaperProps } from "@mui/material";
1
+ import { type PaperProps } from "./Paper";
2
2
  export type GlassPaperProps = PaperProps;
3
3
  export declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type PaperProps } from "@mui/material";
2
+ export type { PaperProps };
3
+ export declare const Paper: ({ children, ...rest }: PaperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type PrimaryButtonProps } from "./PrimaryButton";
2
+ export interface PrimaryButtonLinkProps extends Omit<PrimaryButtonProps, "href" | "component"> {
3
+ href: string;
4
+ openInNewTab?: boolean;
5
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
6
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
7
+ download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
8
+ }
9
+ export declare const PrimaryButtonLink: React.FC<PrimaryButtonLinkProps>;
@@ -0,0 +1,10 @@
1
+ import { type SecondaryButtonProps } from "./SecondaryButton";
2
+ export interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component"> {
3
+ href: string;
4
+ color?: string;
5
+ openInNewTab?: boolean;
6
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
7
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
8
+ download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
9
+ }
10
+ export declare const SecondaryButtonLink: React.FC<SecondaryButtonLinkProps>;
@@ -0,0 +1,16 @@
1
+ import { type TypographyProps } from "@mui/material";
2
+ /**
3
+ * Typed wrappers around MUI Typography that fix the `variant` prop and
4
+ * inherit colour from the sageTheme TYPOGRAPHY_COLOURS map.
5
+ * All other TypographyProps (sx, component, className, children, …) are forwarded.
6
+ */
7
+ type Props = Omit<TypographyProps, "variant">;
8
+ export declare const H1: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
9
+ export declare const H2: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
10
+ export declare const H3: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
11
+ export declare const H4: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
12
+ export declare const ActionBarTitle: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
13
+ export declare const Body1: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
14
+ export declare const Body2: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
15
+ export declare const Caption: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLElement>>;
16
+ export {};
@@ -1,10 +1,23 @@
1
1
  export * from "./DateFormats";
2
2
  export { ActionBar } from "./ActionBar";
3
+ export { H1, H2, H3, H4, ActionBarTitle, Body1, Body2, Caption, } from "./Typography";
3
4
  export { AiButton } from "./AiButton";
4
5
  export type { AiButtonProps } from "./AiButton";
5
6
  export { AiPaper } from "./AiPaper";
6
7
  export type { AiPaperProps } from "./AiPaper";
8
+ export { AiGlassPaper } from "./AiGlassPaper";
9
+ export type { AiGlassPaperProps } from "./AiGlassPaper";
10
+ export { Card } from "./Card";
11
+ export type { CardProps, CardTrend } from "./Card";
12
+ export { GlassCard } from "./GlassCard";
13
+ export type { GlassCardProps } from "./GlassCard";
14
+ export { AiCard } from "./AiCard";
15
+ export type { AiCardProps } from "./AiCard";
16
+ export { AiGlassCard } from "./AiGlassCard";
17
+ export type { AiGlassCardProps } from "./AiGlassCard";
7
18
  export { CheckboxGroup } from "./CheckboxGroup";
19
+ export { Paper } from "./Paper";
20
+ export type { PaperProps } from "./Paper";
8
21
  export { GlassPaper } from "./GlassPaper";
9
22
  export { GreenWaveBackground } from "./GreenWaveBackground";
10
23
  export type { GreenWaveBackgroundProps } from "./GreenWaveBackground";
@@ -15,6 +28,10 @@ export { PrimaryButton } from "./PrimaryButton";
15
28
  export type { PrimaryButtonProps } from "./PrimaryButton";
16
29
  export { SecondaryButton } from "./SecondaryButton";
17
30
  export type { SecondaryButtonProps } from "./SecondaryButton";
31
+ export { PrimaryButtonLink } from "./PrimaryButtonLink";
32
+ export type { PrimaryButtonLinkProps } from "./PrimaryButtonLink";
33
+ export { SecondaryButtonLink } from "./SecondaryButtonLink";
34
+ export type { SecondaryButtonLinkProps } from "./SecondaryButtonLink";
18
35
  export { default as RagDot } from "./RagDot";
19
36
  export { SearchInput } from "./SearchInput";
20
37
  export { SkillChip } from "./SkillChip";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import React$1, { ReactNode, ReactElement, CSSProperties, PropsWithChildren } from 'react';
2
- import { ButtonBaseProps, PaperProps, BoxProps, SxProps as SxProps$1, ButtonProps, ChipProps } from '@mui/material';
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode, ReactElement, CSSProperties, PropsWithChildren } from 'react';
3
+ import { TypographyProps, ButtonProps, PaperProps, CardProps as CardProps$1, BoxProps, SxProps as SxProps$1, ChipProps } from '@mui/material';
4
+ export { PaperProps } from '@mui/material';
3
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
6
  import { SxProps } from '@mui/system';
5
7
  import { Theme, SxProps as SxProps$2 } from '@mui/material/styles';
@@ -18,17 +20,69 @@ interface ActionBarProps {
18
20
  }
19
21
  declare const ActionBar: ({ title, extraLeft, extraRight, }: ActionBarProps) => ReactElement;
20
22
 
21
- interface AiButtonProps extends Omit<ButtonBaseProps, "children"> {
23
+ /**
24
+ * Typed wrappers around MUI Typography that fix the `variant` prop and
25
+ * inherit colour from the sageTheme TYPOGRAPHY_COLOURS map.
26
+ * All other TypographyProps (sx, component, className, children, …) are forwarded.
27
+ */
28
+ type Props = Omit<TypographyProps, "variant">;
29
+ declare const H1: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
30
+ declare const H2: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
31
+ declare const H3: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
32
+ declare const H4: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
33
+ declare const ActionBarTitle: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
34
+ declare const Body1: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
35
+ declare const Body2: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
36
+ declare const Caption: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
37
+
38
+ interface SecondaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
22
39
  size?: "small" | "medium" | "large";
23
- children?: React.ReactNode;
40
+ }
41
+ declare const SecondaryButton: React.FC<SecondaryButtonProps>;
42
+
43
+ interface AiButtonProps extends Omit<SecondaryButtonProps, "color" | "children" | "startIcon"> {
44
+ /** Button label. Defaults to "Nexus Insights". */
45
+ label?: string;
46
+ /** Override the start icon. Defaults to AutoAwesomeIcon. */
24
47
  startIcon?: React.ReactNode;
25
- endIcon?: React.ReactNode;
26
48
  }
27
49
  declare const AiButton: React.FC<AiButtonProps>;
28
50
 
51
+ declare const Paper: ({ children, ...rest }: PaperProps) => react_jsx_runtime.JSX.Element;
52
+
29
53
  type AiPaperProps = PaperProps;
30
54
  declare const AiPaper: ({ sx, children, ...rest }: AiPaperProps) => react_jsx_runtime.JSX.Element;
31
55
 
56
+ type GlassPaperProps = PaperProps;
57
+ declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react_jsx_runtime.JSX.Element;
58
+
59
+ type AiGlassPaperProps = GlassPaperProps;
60
+ declare const AiGlassPaper: ({ sx, children, ...rest }: AiGlassPaperProps) => react_jsx_runtime.JSX.Element;
61
+
62
+ type CardTrend = "up" | "flat" | "down";
63
+ interface CardProps extends CardProps$1 {
64
+ /** Small icon displayed beside the label. Pass an MUI SvgIcon element. */
65
+ icon?: React.ReactNode;
66
+ /** Card label / metric name. */
67
+ label?: string;
68
+ /** Primary large value. */
69
+ value?: string;
70
+ /** Supporting subtext (e.g. "+11% YoY"). Coloured by trend when provided. */
71
+ subtext?: string;
72
+ /** Controls the colour of subtext. */
73
+ trend?: CardTrend;
74
+ }
75
+ declare const Card: ({ icon, label, value, subtext, trend, sx, children, ...rest }: CardProps) => react_jsx_runtime.JSX.Element;
76
+
77
+ type GlassCardProps = CardProps;
78
+ declare const GlassCard: ({ sx, ...rest }: GlassCardProps) => react_jsx_runtime.JSX.Element;
79
+
80
+ type AiCardProps = CardProps;
81
+ declare const AiCard: ({ sx, children, ...rest }: AiCardProps) => react_jsx_runtime.JSX.Element;
82
+
83
+ type AiGlassCardProps = GlassCardProps;
84
+ declare const AiGlassCard: ({ sx, children, ...rest }: AiGlassCardProps) => react_jsx_runtime.JSX.Element;
85
+
32
86
  interface CheckboxGroupProps {
33
87
  title?: React.ReactNode;
34
88
  labels?: string[];
@@ -40,9 +94,6 @@ interface CheckboxGroupProps {
40
94
  }
41
95
  declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
42
96
 
43
- type GlassPaperProps = PaperProps;
44
- declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react_jsx_runtime.JSX.Element;
45
-
46
97
  type GreenWaveBackgroundProps = BoxProps;
47
98
  declare const GreenWaveBackground: ({ sx, children, ...rest }: GreenWaveBackgroundProps) => react_jsx_runtime.JSX.Element;
48
99
 
@@ -56,7 +107,7 @@ interface LocationMultiSelectProps {
56
107
  menuSx?: SxProps$1<Theme>;
57
108
  selectSx?: SxProps$1<Theme>;
58
109
  }
59
- declare const LocationMultiSelect: React$1.FC<LocationMultiSelectProps>;
110
+ declare const LocationMultiSelect: react__default.FC<LocationMultiSelectProps>;
60
111
 
61
112
  declare const NexusHome: React.FC;
62
113
 
@@ -70,10 +121,24 @@ interface PrimaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
70
121
  }
71
122
  declare const PrimaryButton: React.FC<PrimaryButtonProps>;
72
123
 
73
- interface SecondaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
74
- size?: "small" | "medium" | "large";
124
+ interface PrimaryButtonLinkProps extends Omit<PrimaryButtonProps, "href" | "component"> {
125
+ href: string;
126
+ openInNewTab?: boolean;
127
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
128
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
129
+ download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
75
130
  }
76
- declare const SecondaryButton: React.FC<SecondaryButtonProps>;
131
+ declare const PrimaryButtonLink: React.FC<PrimaryButtonLinkProps>;
132
+
133
+ interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component"> {
134
+ href: string;
135
+ color?: string;
136
+ openInNewTab?: boolean;
137
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
138
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
139
+ download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
140
+ }
141
+ declare const SecondaryButtonLink: React.FC<SecondaryButtonLinkProps>;
77
142
 
78
143
  type RagStatus = "On Track" | "At Risk" | "Off Track" | string;
79
144
  interface RagDotProps {
@@ -89,13 +154,13 @@ interface SearchInputProps {
89
154
  sx?: SxProps$1<Theme>;
90
155
  styles?: SxProps$1<Theme>;
91
156
  }
92
- declare const SearchInput: React$1.FC<SearchInputProps>;
157
+ declare const SearchInput: react__default.FC<SearchInputProps>;
93
158
 
94
159
  interface SkillChipProps extends ChipProps {
95
- label?: React$1.ReactNode;
160
+ label?: react__default.ReactNode;
96
161
  tone?: "default" | "matched" | "accent" | string;
97
162
  }
98
- declare const SkillChip: React$1.FC<SkillChipProps>;
163
+ declare const SkillChip: react__default.FC<SkillChipProps>;
99
164
 
100
165
  type ChipSize = "default" | "small";
101
166
  interface StatusChipProps extends ChipProps {
@@ -116,6 +181,7 @@ type ModeTokens = {
116
181
  text: {
117
182
  primary: string;
118
183
  secondary: string;
184
+ blues: string;
119
185
  greens: string;
120
186
  greys: string;
121
187
  };
@@ -128,9 +194,11 @@ declare const colours: {
128
194
  readonly brilliantGreen: "#00D639";
129
195
  readonly primaryGreenHover: "#00BE32";
130
196
  readonly primaryGreenActive: "#00AA2D";
197
+ readonly cyan: "#00D6DE";
131
198
  readonly jade: "#00A65C";
132
199
  readonly teal: "#006362";
133
- readonly navy: "#2977a1";
200
+ readonly blue: "#2D60FF";
201
+ readonly navy: "#1531af";
134
202
  readonly cherry: "#cc0f4b";
135
203
  readonly terra: "#A13829";
136
204
  readonly amber: "#E9875B";
@@ -143,6 +211,7 @@ declare const colours: {
143
211
  declare const gradients: {
144
212
  readonly brand: "linear-gradient(135deg, #00D639 0%, #00A65C 42%, #006362 100%)";
145
213
  readonly nexus: "linear-gradient(135deg, #00D639 0%, #00D6DE 40%, #2D60FF 100%)";
214
+ readonly aiConic: "conic-gradient(from var(--ai-angle), #00D639, #00D6DE, #2D60FF, #00D6DE, #00D639)";
146
215
  };
147
216
  declare const fontSageText = "SageText, Inter, Segoe UI, sans-serif";
148
217
  declare const fontSageUI = "SageUI, Inter, Segoe UI, sans-serif";
@@ -204,5 +273,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
204
273
  declare const leftPipe: SxProps$2<Theme>;
205
274
  declare const expandableText: (isExpanded: boolean) => SxProps$2<Theme>;
206
275
 
207
- export { ActionBar, AiButton, AiPaper, CheckboxGroup, GlassPaper, GreenWaveBackground, LocationMultiSelect, MuiAppThemeProvider, NexusHome, NexusLogo, PrimaryButton, RagDot, SearchInput, SecondaryButton, SkillChip, StatusChip, ThemeModeProvider, ThemeToggle, colours, createSageTheme, expandableText, fontSageText, fontSageUI, formatDate, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, leftPipe, useThemeMode, useTokens };
208
- export type { AiButtonProps, AiPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, ModeTokens, PrimaryButtonProps, SecondaryButtonProps, ThemeMode };
276
+ export { 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 };
277
+ export type { AiButtonProps, AiCardProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, CardProps, CardTrend, GlassCardProps, GradientBorderOptions, GreenWaveBackgroundProps, ModeTokens, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, ThemeMode };