sage-nexus-ui 1.0.15 → 1.0.16
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.
- package/dist/components/AiButton.d.ts +5 -5
- package/dist/components/AiGlassPaper.d.ts +3 -0
- package/dist/components/AiPaper.d.ts +1 -1
- package/dist/components/GlassPaper.d.ts +1 -1
- package/dist/components/Paper.d.ts +3 -0
- package/dist/components/PrimaryButtonLink.d.ts +9 -0
- package/dist/components/SecondaryButtonLink.d.ts +10 -0
- package/dist/components/Typography.d.ts +16 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/index.d.ts +59 -17
- package/dist/index.mjs +1 -1
- package/dist/stories/AiGlassPaper.stories.d.ts +13 -0
- package/dist/stories/Paper.stories.d.ts +16 -0
- package/dist/stories/PrimaryButtonLink.stories.d.ts +31 -0
- package/dist/stories/SecondaryButtonLink.stories.d.ts +33 -0
- package/dist/stories/Typography.stories.d.ts +321 -0
- package/dist/theme/tokens.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export interface AiButtonProps extends Omit<
|
|
3
|
-
|
|
4
|
-
|
|
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,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,15 @@
|
|
|
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";
|
|
7
10
|
export { CheckboxGroup } from "./CheckboxGroup";
|
|
11
|
+
export { Paper } from "./Paper";
|
|
12
|
+
export type { PaperProps } from "./Paper";
|
|
8
13
|
export { GlassPaper } from "./GlassPaper";
|
|
9
14
|
export { GreenWaveBackground } from "./GreenWaveBackground";
|
|
10
15
|
export type { GreenWaveBackgroundProps } from "./GreenWaveBackground";
|
|
@@ -15,6 +20,10 @@ export { PrimaryButton } from "./PrimaryButton";
|
|
|
15
20
|
export type { PrimaryButtonProps } from "./PrimaryButton";
|
|
16
21
|
export { SecondaryButton } from "./SecondaryButton";
|
|
17
22
|
export type { SecondaryButtonProps } from "./SecondaryButton";
|
|
23
|
+
export { PrimaryButtonLink } from "./PrimaryButtonLink";
|
|
24
|
+
export type { PrimaryButtonLinkProps } from "./PrimaryButtonLink";
|
|
25
|
+
export { SecondaryButtonLink } from "./SecondaryButtonLink";
|
|
26
|
+
export type { SecondaryButtonLinkProps } from "./SecondaryButtonLink";
|
|
18
27
|
export { default as RagDot } from "./RagDot";
|
|
19
28
|
export { SearchInput } from "./SearchInput";
|
|
20
29
|
export { SkillChip } from "./SkillChip";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as react from 'react';
|
|
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';
|
|
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,45 @@ interface ActionBarProps {
|
|
|
18
20
|
}
|
|
19
21
|
declare const ActionBar: ({ title, extraLeft, extraRight, }: ActionBarProps) => ReactElement;
|
|
20
22
|
|
|
21
|
-
|
|
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
|
-
|
|
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
|
+
|
|
32
62
|
interface CheckboxGroupProps {
|
|
33
63
|
title?: React.ReactNode;
|
|
34
64
|
labels?: string[];
|
|
@@ -40,9 +70,6 @@ interface CheckboxGroupProps {
|
|
|
40
70
|
}
|
|
41
71
|
declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
|
|
42
72
|
|
|
43
|
-
type GlassPaperProps = PaperProps;
|
|
44
|
-
declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react_jsx_runtime.JSX.Element;
|
|
45
|
-
|
|
46
73
|
type GreenWaveBackgroundProps = BoxProps;
|
|
47
74
|
declare const GreenWaveBackground: ({ sx, children, ...rest }: GreenWaveBackgroundProps) => react_jsx_runtime.JSX.Element;
|
|
48
75
|
|
|
@@ -56,7 +83,7 @@ interface LocationMultiSelectProps {
|
|
|
56
83
|
menuSx?: SxProps$1<Theme>;
|
|
57
84
|
selectSx?: SxProps$1<Theme>;
|
|
58
85
|
}
|
|
59
|
-
declare const LocationMultiSelect:
|
|
86
|
+
declare const LocationMultiSelect: react__default.FC<LocationMultiSelectProps>;
|
|
60
87
|
|
|
61
88
|
declare const NexusHome: React.FC;
|
|
62
89
|
|
|
@@ -70,10 +97,24 @@ interface PrimaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
|
|
|
70
97
|
}
|
|
71
98
|
declare const PrimaryButton: React.FC<PrimaryButtonProps>;
|
|
72
99
|
|
|
73
|
-
interface
|
|
74
|
-
|
|
100
|
+
interface PrimaryButtonLinkProps extends Omit<PrimaryButtonProps, "href" | "component"> {
|
|
101
|
+
href: string;
|
|
102
|
+
openInNewTab?: boolean;
|
|
103
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
|
|
104
|
+
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
|
|
105
|
+
download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
|
|
75
106
|
}
|
|
76
|
-
declare const
|
|
107
|
+
declare const PrimaryButtonLink: React.FC<PrimaryButtonLinkProps>;
|
|
108
|
+
|
|
109
|
+
interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component"> {
|
|
110
|
+
href: string;
|
|
111
|
+
color?: string;
|
|
112
|
+
openInNewTab?: boolean;
|
|
113
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
|
|
114
|
+
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
|
|
115
|
+
download?: React.AnchorHTMLAttributes<HTMLAnchorElement>["download"];
|
|
116
|
+
}
|
|
117
|
+
declare const SecondaryButtonLink: React.FC<SecondaryButtonLinkProps>;
|
|
77
118
|
|
|
78
119
|
type RagStatus = "On Track" | "At Risk" | "Off Track" | string;
|
|
79
120
|
interface RagDotProps {
|
|
@@ -89,13 +130,13 @@ interface SearchInputProps {
|
|
|
89
130
|
sx?: SxProps$1<Theme>;
|
|
90
131
|
styles?: SxProps$1<Theme>;
|
|
91
132
|
}
|
|
92
|
-
declare const SearchInput:
|
|
133
|
+
declare const SearchInput: react__default.FC<SearchInputProps>;
|
|
93
134
|
|
|
94
135
|
interface SkillChipProps extends ChipProps {
|
|
95
|
-
label?:
|
|
136
|
+
label?: react__default.ReactNode;
|
|
96
137
|
tone?: "default" | "matched" | "accent" | string;
|
|
97
138
|
}
|
|
98
|
-
declare const SkillChip:
|
|
139
|
+
declare const SkillChip: react__default.FC<SkillChipProps>;
|
|
99
140
|
|
|
100
141
|
type ChipSize = "default" | "small";
|
|
101
142
|
interface StatusChipProps extends ChipProps {
|
|
@@ -143,6 +184,7 @@ declare const colours: {
|
|
|
143
184
|
declare const gradients: {
|
|
144
185
|
readonly brand: "linear-gradient(135deg, #00D639 0%, #00A65C 42%, #006362 100%)";
|
|
145
186
|
readonly nexus: "linear-gradient(135deg, #00D639 0%, #00D6DE 40%, #2D60FF 100%)";
|
|
187
|
+
readonly aiConic: "conic-gradient(from var(--ai-angle), #00D639, #00D6DE, #2D60FF, #00D6DE, #00D639)";
|
|
146
188
|
};
|
|
147
189
|
declare const fontSageText = "SageText, Inter, Segoe UI, sans-serif";
|
|
148
190
|
declare const fontSageUI = "SageUI, Inter, Segoe UI, sans-serif";
|
|
@@ -204,5 +246,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
|
|
|
204
246
|
declare const leftPipe: SxProps$2<Theme>;
|
|
205
247
|
declare const expandableText: (isExpanded: boolean) => SxProps$2<Theme>;
|
|
206
248
|
|
|
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 };
|
|
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 };
|