@omni-design/components 0.7.10 → 0.9.0
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/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/types/components/Badge/Badge.d.ts +4 -10
- package/dist/types/components/Badge/index.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +2 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -8
- package/dist/types/components/Chip/index.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +14 -0
- package/dist/types/components/Icon/Icon.d.ts +0 -1
- package/dist/types/components/Input/Input.d.ts +0 -5
- package/dist/types/components/List/List.d.ts +5 -1
- package/dist/types/components/Paper/Paper.d.ts +1 -1
- package/dist/types/components/StateMessage/StateMessage.d.ts +11 -0
- package/dist/types/components/StateMessage/index.d.ts +1 -0
- package/dist/types/components/Stepper/Stepper.d.ts +5 -2
- package/dist/types/components/Table/Table.d.ts +5 -1
- package/dist/types/components/_ghost.d.ts +37 -0
- package/dist/types/components/_states.d.ts +67 -0
- package/dist/types/components/index.d.ts +2 -1
- package/package.json +10 -3
- package/dist/types/components/Header/Header.d.ts +0 -53
- package/dist/types/components/Header/index.d.ts +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function normalizeBadgeVariant(variant: any): string;
|
|
2
|
+
export function Badge({ variant, size, type, badgeContent, max, showZero, invisible, dot, overlap, anchorOrigin, children, className, sx, ...props }: {
|
|
2
3
|
[x: string]: any;
|
|
3
4
|
variant?: string;
|
|
4
|
-
size
|
|
5
|
+
size: any;
|
|
6
|
+
type?: string;
|
|
5
7
|
badgeContent: any;
|
|
6
8
|
max?: number;
|
|
7
9
|
showZero?: boolean;
|
|
@@ -32,12 +34,4 @@ export function InfoOutlineBadge(p: any): JSX.Element;
|
|
|
32
34
|
export function SuccessOutlineBadge(p: any): JSX.Element;
|
|
33
35
|
export function WarningOutlineBadge(p: any): JSX.Element;
|
|
34
36
|
export function ErrorOutlineBadge(p: any): JSX.Element;
|
|
35
|
-
export function PrimaryLightBadge(p: any): JSX.Element;
|
|
36
|
-
export function SecondaryLightBadge(p: any): JSX.Element;
|
|
37
|
-
export function TertiaryLightBadge(p: any): JSX.Element;
|
|
38
|
-
export function NeutralLightBadge(p: any): JSX.Element;
|
|
39
|
-
export function InfoLightBadge(p: any): JSX.Element;
|
|
40
|
-
export function SuccessLightBadge(p: any): JSX.Element;
|
|
41
|
-
export function WarningLightBadge(p: any): JSX.Element;
|
|
42
|
-
export function ErrorLightBadge(p: any): JSX.Element;
|
|
43
37
|
export default Badge;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BadgeShowcase } from "./BadgeShowcase";
|
|
2
|
-
export { Badge, PrimaryBadge, SecondaryBadge, TertiaryBadge, NeutralBadge, InfoBadge, SuccessBadge, WarningBadge, ErrorBadge, PrimaryOutlineBadge, SecondaryOutlineBadge, TertiaryOutlineBadge, NeutralOutlineBadge, InfoOutlineBadge, SuccessOutlineBadge, WarningOutlineBadge, ErrorOutlineBadge,
|
|
2
|
+
export { Badge, PrimaryBadge, SecondaryBadge, TertiaryBadge, NeutralBadge, InfoBadge, SuccessBadge, WarningBadge, ErrorBadge, PrimaryOutlineBadge, SecondaryOutlineBadge, TertiaryOutlineBadge, NeutralOutlineBadge, InfoOutlineBadge, SuccessOutlineBadge, WarningOutlineBadge, ErrorOutlineBadge, default } from "./Badge";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Card({ children, variant, color, surface, size, orientation, clickable, selected, elevated, draggable: draggableProp, onClick, href, className, sx, ...props }: {
|
|
1
|
+
export function Card({ children, variant, color, surface, size, orientation, clickable, selected, elevated, draggable: draggableProp, onClick, disabled, href, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
children: any;
|
|
4
4
|
variant?: string;
|
|
@@ -11,6 +11,7 @@ export function Card({ children, variant, color, surface, size, orientation, cli
|
|
|
11
11
|
elevated?: boolean;
|
|
12
12
|
draggable?: boolean;
|
|
13
13
|
onClick: any;
|
|
14
|
+
disabled?: boolean;
|
|
14
15
|
href: any;
|
|
15
16
|
className?: string;
|
|
16
17
|
sx?: {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export function normalizeChipVariant(variant: any): string;
|
|
1
2
|
export function Chip({ variant, size: sizeProp, label, clickable, disabled, selected, selectionMode, onDelete, onClick, startDecorator, endDecorator, children, className, sx, ...props }: {
|
|
2
3
|
[x: string]: any;
|
|
3
4
|
variant?: string;
|
|
@@ -31,12 +32,4 @@ export function InfoOutlineChip(p: any): JSX.Element;
|
|
|
31
32
|
export function SuccessOutlineChip(p: any): JSX.Element;
|
|
32
33
|
export function WarningOutlineChip(p: any): JSX.Element;
|
|
33
34
|
export function ErrorOutlineChip(p: any): JSX.Element;
|
|
34
|
-
export function PrimaryLightChip(p: any): JSX.Element;
|
|
35
|
-
export function SecondaryLightChip(p: any): JSX.Element;
|
|
36
|
-
export function TertiaryLightChip(p: any): JSX.Element;
|
|
37
|
-
export function NeutralLightChip(p: any): JSX.Element;
|
|
38
|
-
export function InfoLightChip(p: any): JSX.Element;
|
|
39
|
-
export function SuccessLightChip(p: any): JSX.Element;
|
|
40
|
-
export function WarningLightChip(p: any): JSX.Element;
|
|
41
|
-
export function ErrorLightChip(p: any): JSX.Element;
|
|
42
35
|
export default Chip;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ChipShowcase } from "./ChipShowcase";
|
|
2
|
-
export { Chip, PrimaryChip, SecondaryChip, TertiaryChip, NeutralChip, InfoChip, SuccessChip, WarningChip, ErrorChip, PrimaryOutlineChip, SecondaryOutlineChip, TertiaryOutlineChip, NeutralOutlineChip, InfoOutlineChip, SuccessOutlineChip, WarningOutlineChip, ErrorOutlineChip,
|
|
2
|
+
export { Chip, PrimaryChip, SecondaryChip, TertiaryChip, NeutralChip, InfoChip, SuccessChip, WarningChip, ErrorChip, PrimaryOutlineChip, SecondaryOutlineChip, TertiaryOutlineChip, NeutralOutlineChip, InfoOutlineChip, SuccessOutlineChip, WarningOutlineChip, ErrorOutlineChip, default } from "./Chip";
|
|
@@ -47,6 +47,13 @@ export namespace dialogButtonStyles {
|
|
|
47
47
|
'&:hover': {
|
|
48
48
|
backgroundColor: string;
|
|
49
49
|
};
|
|
50
|
+
'&:active': {
|
|
51
|
+
backgroundColor: string;
|
|
52
|
+
};
|
|
53
|
+
'&:disabled': {
|
|
54
|
+
opacity: string;
|
|
55
|
+
cursor: string;
|
|
56
|
+
};
|
|
50
57
|
fontFamily: string;
|
|
51
58
|
fontWeight: number;
|
|
52
59
|
fontSize: string;
|
|
@@ -66,6 +73,13 @@ export namespace dialogButtonStyles {
|
|
|
66
73
|
'&:hover': {
|
|
67
74
|
backgroundColor: string;
|
|
68
75
|
};
|
|
76
|
+
'&:active': {
|
|
77
|
+
backgroundColor: string;
|
|
78
|
+
};
|
|
79
|
+
'&:disabled': {
|
|
80
|
+
opacity: string;
|
|
81
|
+
cursor: string;
|
|
82
|
+
};
|
|
69
83
|
fontFamily: string;
|
|
70
84
|
fontWeight: number;
|
|
71
85
|
fontSize: string;
|
|
@@ -144,11 +144,6 @@ export function InfoOutlineInput(p: any): JSX.Element;
|
|
|
144
144
|
export function SuccessOutlineInput(p: any): JSX.Element;
|
|
145
145
|
export function WarningOutlineInput(p: any): JSX.Element;
|
|
146
146
|
export function ErrorOutlineInput(p: any): JSX.Element;
|
|
147
|
-
export function PrimaryLightInput(p: any): JSX.Element;
|
|
148
|
-
export function SecondaryLightInput(p: any): JSX.Element;
|
|
149
|
-
export function TertiaryLightInput(p: any): JSX.Element;
|
|
150
|
-
export function NeutralLightInput(p: any): JSX.Element;
|
|
151
147
|
export function OutlineInput(p: any): JSX.Element;
|
|
152
148
|
export function PrimaryInput(p: any): JSX.Element;
|
|
153
|
-
export function LightInput(p: any): JSX.Element;
|
|
154
149
|
export default Input;
|
|
@@ -32,7 +32,7 @@ export function ListItem({ children, startDecorator, endDecorator, startDecorato
|
|
|
32
32
|
rightBorder?: boolean;
|
|
33
33
|
sx?: {};
|
|
34
34
|
}): JSX.Element;
|
|
35
|
-
export function List({ children, items, variant, color, size, orientation, dividers, selectionMode, selectedIndices, onSelectionChange, clickable, component, className, sx, ...props }: {
|
|
35
|
+
export function List({ children, items, variant, color, size, orientation, dividers, selectionMode, loading, skeletonRows, empty, error, selectedIndices, onSelectionChange, clickable, component, className, sx, ...props }: {
|
|
36
36
|
[x: string]: any;
|
|
37
37
|
children: any;
|
|
38
38
|
items: any;
|
|
@@ -42,6 +42,10 @@ export function List({ children, items, variant, color, size, orientation, divid
|
|
|
42
42
|
orientation?: string;
|
|
43
43
|
dividers?: boolean;
|
|
44
44
|
selectionMode?: string;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
skeletonRows?: number;
|
|
47
|
+
empty: any;
|
|
48
|
+
error: any;
|
|
45
49
|
selectedIndices?: any[];
|
|
46
50
|
onSelectionChange: any;
|
|
47
51
|
clickable?: boolean;
|
|
@@ -41,7 +41,7 @@ export function Paper({ children, surface, outlined, variant, sx, ...props }: st
|
|
|
41
41
|
* @param {boolean} hoverable - Enable hover elevation
|
|
42
42
|
* @param {object} props - Additional props
|
|
43
43
|
*/
|
|
44
|
-
export function InteractivePaper({ children, surface, onClick, hoverable, sx, ...props }: string): JSX.Element;
|
|
44
|
+
export function InteractivePaper({ children, surface, onClick, disabled, hoverable, sx, ...props }: string): JSX.Element;
|
|
45
45
|
/**
|
|
46
46
|
* ElevatedPaper Component
|
|
47
47
|
* Paper with explicit elevation control
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {'empty'|'no-results'|'error'} type
|
|
3
|
+
* @param {ReactNode} icon overrides the type's default
|
|
4
|
+
* @param {string} title the headline. Required — a state with no words is
|
|
5
|
+
* an empty box, which is what this replaces.
|
|
6
|
+
* @param {ReactNode} body one line of explanation. Optional.
|
|
7
|
+
* @param {ReactNode} action a Button. Optional, but an error without a way
|
|
8
|
+
* forward is just bad news.
|
|
9
|
+
*/
|
|
10
|
+
export function StateMessage({ type, icon, title, body, action, size, className, sx, ...props }: "empty" | "no-results" | "error"): JSX.Element;
|
|
11
|
+
export default StateMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StateMessage, default } from "./StateMessage";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Stepper({ children, orientation, size, color, activeStep, clickable, onStepClick, dashedIncomplete, className, sx, ...props }: {
|
|
1
|
+
export function Stepper({ children, orientation, size, color, activeStep, clickable, onStepClick, dashedIncomplete, variant, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
children: any;
|
|
4
4
|
orientation?: string;
|
|
@@ -8,14 +8,16 @@ export function Stepper({ children, orientation, size, color, activeStep, clicka
|
|
|
8
8
|
clickable?: boolean;
|
|
9
9
|
onStepClick: any;
|
|
10
10
|
dashedIncomplete?: boolean;
|
|
11
|
+
variant?: string;
|
|
11
12
|
className?: string;
|
|
12
13
|
sx?: {};
|
|
13
14
|
}): JSX.Element;
|
|
14
|
-
export function Step({ children, icon, label, _index, className, sx, ...props }: {
|
|
15
|
+
export function Step({ children, icon, label, disabled, _index, className, sx, ...props }: {
|
|
15
16
|
[x: string]: any;
|
|
16
17
|
children: any;
|
|
17
18
|
icon: any;
|
|
18
19
|
label: any;
|
|
20
|
+
disabled?: boolean;
|
|
19
21
|
_index?: number;
|
|
20
22
|
className?: string;
|
|
21
23
|
sx?: {};
|
|
@@ -29,5 +31,6 @@ export function useStepperContext(): {
|
|
|
29
31
|
onStepClick: any;
|
|
30
32
|
dashedIncomplete: boolean;
|
|
31
33
|
totalSteps: number;
|
|
34
|
+
variant: string;
|
|
32
35
|
};
|
|
33
36
|
export default Stepper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Table({ children, columns, rows, footerRows, variant, color, size, stripe, stickyHeader, stickyFooter, className, sx, ...props }: {
|
|
1
|
+
export function Table({ children, columns, rows, footerRows, variant, color, loading, skeletonRows, empty, error, size, stripe, stickyHeader, stickyFooter, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
children: any;
|
|
4
4
|
columns: any;
|
|
@@ -6,6 +6,10 @@ export function Table({ children, columns, rows, footerRows, variant, color, siz
|
|
|
6
6
|
footerRows: any;
|
|
7
7
|
variant?: string;
|
|
8
8
|
color?: string;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
skeletonRows?: number;
|
|
11
|
+
empty: any;
|
|
12
|
+
error: any;
|
|
9
13
|
size?: string;
|
|
10
14
|
stripe?: string;
|
|
11
15
|
stickyHeader?: boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** The ghost options for this subtree, or null when not ghosting. */
|
|
2
|
+
export function useGhost(): any;
|
|
3
|
+
/**
|
|
4
|
+
* The block itself.
|
|
5
|
+
*
|
|
6
|
+
* `currentColor` is deliberate: the sweep is the SURFACE showing through the
|
|
7
|
+
* block, so it needs no second token and cannot disagree with the background
|
|
8
|
+
* it sits on.
|
|
9
|
+
*/
|
|
10
|
+
export function ghostBlockSx({ radius, animate }?: {
|
|
11
|
+
radius?: string;
|
|
12
|
+
animate?: boolean;
|
|
13
|
+
}): {
|
|
14
|
+
backgroundImage: string;
|
|
15
|
+
backgroundSize: string;
|
|
16
|
+
backgroundRepeat: string;
|
|
17
|
+
animation: string;
|
|
18
|
+
'@media (prefers-reduced-motion: reduce)': {
|
|
19
|
+
backgroundImage: string;
|
|
20
|
+
animation: string;
|
|
21
|
+
};
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
borderRadius: string;
|
|
24
|
+
color: string;
|
|
25
|
+
userSelect: string;
|
|
26
|
+
pointerEvents: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Marks a region as loading. Everything inside renders as a placeholder.
|
|
30
|
+
*
|
|
31
|
+
* @param {boolean} active ghost while true; render normally when false
|
|
32
|
+
* @param {boolean} animate sweep; false for a static block
|
|
33
|
+
* @param {string} label announced while loading
|
|
34
|
+
*/
|
|
35
|
+
export function Ghost({ active, animate, label, children, ...props }: boolean): JSX.Element;
|
|
36
|
+
export const GHOST_KEYFRAMES: "\n@keyframes omni-ghost-sweep {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n}\n";
|
|
37
|
+
export default Ghost;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The four states for a transparent control.
|
|
3
|
+
*
|
|
4
|
+
* @param {object} [opts]
|
|
5
|
+
* @param {string} [opts.selectedBg] resting fill when selected
|
|
6
|
+
* @param {string} [opts.selectedText] text colour when selected
|
|
7
|
+
* @param {string} [opts.selectedHover] fill on hover while selected
|
|
8
|
+
* @param {string} [opts.selectedPressed] fill on press while selected
|
|
9
|
+
* @param {string} [opts.muiPrefix] 'Mui' to use MUI's class-based
|
|
10
|
+
* selectors (.Mui-disabled /
|
|
11
|
+
* .Mui-focusVisible) instead of the
|
|
12
|
+
* pseudo-classes. MUI sets `disabled` on
|
|
13
|
+
* a real <button>, but its own
|
|
14
|
+
* components carry the class and often
|
|
15
|
+
* nothing else, so the plain selector
|
|
16
|
+
* silently matches nothing there.
|
|
17
|
+
*/
|
|
18
|
+
export function scrimStates(opts?: {
|
|
19
|
+
selectedBg?: string;
|
|
20
|
+
selectedText?: string;
|
|
21
|
+
selectedHover?: string;
|
|
22
|
+
selectedPressed?: string;
|
|
23
|
+
muiPrefix?: string;
|
|
24
|
+
}): {
|
|
25
|
+
[x: string]: {
|
|
26
|
+
outline: string;
|
|
27
|
+
outlineOffset: string;
|
|
28
|
+
} | {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
} | {
|
|
31
|
+
color: string;
|
|
32
|
+
opacity: string;
|
|
33
|
+
cursor: string;
|
|
34
|
+
backgroundColor?: undefined;
|
|
35
|
+
};
|
|
36
|
+
'&:hover': {
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
};
|
|
39
|
+
'&:active': {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
'&.Mui-selected': {
|
|
44
|
+
'&:hover': {
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
};
|
|
47
|
+
'&:active': {
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
};
|
|
50
|
+
color?: string;
|
|
51
|
+
backgroundColor: string;
|
|
52
|
+
};
|
|
53
|
+
'&:hover': {
|
|
54
|
+
backgroundColor: string;
|
|
55
|
+
};
|
|
56
|
+
'&:active': {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export namespace FOCUS_RING {
|
|
61
|
+
let outline: string;
|
|
62
|
+
let outlineOffset: string;
|
|
63
|
+
}
|
|
64
|
+
export namespace DISABLED_STATE {
|
|
65
|
+
let opacity: string;
|
|
66
|
+
let cursor: string;
|
|
67
|
+
}
|
|
@@ -17,7 +17,6 @@ export { DropZone } from "./DropZone";
|
|
|
17
17
|
export { Divider } from "./Divider";
|
|
18
18
|
export { Table } from "./Table";
|
|
19
19
|
export { Tooltip } from "./Tooltip";
|
|
20
|
-
export { Header } from "./Header";
|
|
21
20
|
export { Sidebar } from "./Sidebar";
|
|
22
21
|
export { MainLayout } from "./MainLayout";
|
|
23
22
|
export { Link } from "./Link";
|
|
@@ -27,6 +26,7 @@ export default _default;
|
|
|
27
26
|
export { OmniStack as DynoStack } from "./Stack/Stack";
|
|
28
27
|
export { OmniTreeView as DynoTreeView } from "./TreeView/TreeView";
|
|
29
28
|
export * as chartGeometry from "./Charts/geometry";
|
|
29
|
+
export { StateMessage } from "./StateMessage";
|
|
30
30
|
export { Typography, CAP_HEIGHT_TRIM, Heading, DisplayLarge, DisplayMedium, DisplaySmall, H1, H2, H3, H4, H5, H6, Body, Body1, Body2, BodySemibold, BodyBold, BodySmall, BodySmallSemibold, BodySmallBold, BodyLarge, BodyLargeSemibold, BodyLargeBold, Caption, CaptionBold, Subtitle, Subtitle1, Subtitle2, SubtitleSmall, SubtitleMedium, SubtitleLarge, Legal, LegalSemibold, Label, LabelExtraSmall, LabelSmall, LabelLarge, Eyebrow, EyebrowSmall, EyebrowMedium, EyebrowLarge, Overline, OverlineSmall, OverlineMedium, OverlineLarge, NumberSmall, NumberMedium, NumberLarge, Button as ButtonText, ButtonSmall } from "./Typography";
|
|
31
31
|
export { Icon, IconShowcase } from "./Icon";
|
|
32
32
|
export { Fab, FabShowcase } from "./Fab";
|
|
@@ -74,3 +74,4 @@ export { OmniTreeView, SolidTreeView, LightTreeView, DEFAULT_ITEMS, TreeBranch,
|
|
|
74
74
|
export { OmniDesignProvider, useOmniDesign, ThemedZone, Surfaced } from "../OmniDesignProvider";
|
|
75
75
|
export { CodeBlock, CopyButton } from "./CodeBlock/CodeBlock";
|
|
76
76
|
export { BarChart, LineChart, PieChart, CHART_TOKENS, CHART_LABEL_TYPE } from "./Charts";
|
|
77
|
+
export { Ghost, useGhost, ghostBlockSx } from "./_ghost";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omni-design/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "DynoDesign adaptive component library — token-driven React components with customizable CSS theming",
|
|
5
5
|
"author": "Lise Noble",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"start": "react-scripts start",
|
|
40
40
|
"dev-api": "node dev-server.js",
|
|
41
41
|
"build:app": "react-scripts build",
|
|
42
|
-
"build:lib": "rollup -c rollup.config.js && npm run build:types",
|
|
42
|
+
"build:lib": "npm run clean:lib && rollup -c rollup.config.js && npm run build:types",
|
|
43
43
|
"build": "npm run build:lib",
|
|
44
44
|
"test": "react-scripts test",
|
|
45
45
|
"test:coverage": "react-scripts test --coverage --watchAll=false",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"prepublishOnly": "npm run build:lib",
|
|
51
51
|
"predeploy": "npm run build:app",
|
|
52
52
|
"deploy": "gh-pages -d build",
|
|
53
|
-
"build:types": "npx -y -p typescript@5.9 tsc -p tsconfig.dts.json"
|
|
53
|
+
"build:types": "npx -y -p typescript@5.9 tsc -p tsconfig.dts.json",
|
|
54
|
+
"clean:lib": "rm -rf dist"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"@emotion/react": ">=11.0.0",
|
|
@@ -119,5 +120,11 @@
|
|
|
119
120
|
"last 1 firefox version",
|
|
120
121
|
"last 1 safari version"
|
|
121
122
|
]
|
|
123
|
+
},
|
|
124
|
+
"jest": {
|
|
125
|
+
"moduleNameMapper": {
|
|
126
|
+
"^react-router/dom$": "<rootDir>/node_modules/react-router/dist/development/dom-export.js",
|
|
127
|
+
"^react-router-dom$": "<rootDir>/node_modules/react-router-dom/dist/index.js"
|
|
128
|
+
}
|
|
122
129
|
}
|
|
123
130
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Header Component
|
|
3
|
-
* App header with navigation and theme toggle
|
|
4
|
-
* Uses design system variables for styling
|
|
5
|
-
*
|
|
6
|
-
* @param {string} title - App title/brand name
|
|
7
|
-
* @param {string} mode - Theme mode: light or dark
|
|
8
|
-
* @param {Array} navItems - Navigation menu items
|
|
9
|
-
* @param {ReactNode} rightContent - Right side content
|
|
10
|
-
* @param {object} props - Additional props
|
|
11
|
-
*/
|
|
12
|
-
export function Header({ title, mode, navItems, rightContent, sx, ...props }: string): JSX.Element;
|
|
13
|
-
/**
|
|
14
|
-
* SimpleHeader Component
|
|
15
|
-
* Minimal header with just title and theme toggle
|
|
16
|
-
*
|
|
17
|
-
* @param {string} title - App title
|
|
18
|
-
* @param {string} mode - Theme mode
|
|
19
|
-
* @param {function} onModeChange - Theme toggle handler
|
|
20
|
-
* @param {object} props - Additional props
|
|
21
|
-
*/
|
|
22
|
-
export function SimpleHeader({ title, mode, onModeChange, sx, ...props }: string): JSX.Element;
|
|
23
|
-
/**
|
|
24
|
-
* MinimalHeader Component
|
|
25
|
-
* Very minimal header with just title
|
|
26
|
-
*
|
|
27
|
-
* @param {string} title - App title
|
|
28
|
-
* @param {object} props - Additional props
|
|
29
|
-
*/
|
|
30
|
-
export function MinimalHeader({ title, sx, ...props }: string): JSX.Element;
|
|
31
|
-
/**
|
|
32
|
-
* CenteredHeader Component
|
|
33
|
-
* Header with centered navigation
|
|
34
|
-
*
|
|
35
|
-
* @param {string} title - App title
|
|
36
|
-
* @param {Array} navItems - Navigation items
|
|
37
|
-
* @param {string} mode - Theme mode
|
|
38
|
-
* @param {function} onModeChange - Theme toggle handler
|
|
39
|
-
* @param {object} props - Additional props
|
|
40
|
-
*/
|
|
41
|
-
export function CenteredHeader({ title, navItems, mode, onModeChange, sx, ...props }: string): JSX.Element;
|
|
42
|
-
/**
|
|
43
|
-
* StickyHeader Component
|
|
44
|
-
* Header that sticks to top on scroll
|
|
45
|
-
*
|
|
46
|
-
* @param {string} title - App title
|
|
47
|
-
* @param {Array} navItems - Navigation items
|
|
48
|
-
* @param {string} mode - Theme mode
|
|
49
|
-
* @param {function} onModeChange - Theme toggle handler
|
|
50
|
-
* @param {object} props - Additional props
|
|
51
|
-
*/
|
|
52
|
-
export function StickyHeader({ title, navItems, mode, onModeChange, sx, ...props }: string): JSX.Element;
|
|
53
|
-
export default Header;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header, SimpleHeader, MinimalHeader, CenteredHeader, StickyHeader, default } from "./Header";
|