@omni-design/components 0.7.8 → 0.8.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/BottomNavigation/BottomNavigation.d.ts +3 -1
- package/dist/types/components/Card/Card.d.ts +2 -1
- package/dist/types/components/Dialog/Dialog.d.ts +14 -0
- 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 +2 -1
- 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 +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function BottomNavigation({ items, value: controlledValue, defaultValue, onChange, showLabels, variant, orientation, barColor, fixed, "aria-label": ariaLabel, className, sx, ...props }: {
|
|
1
|
+
export function BottomNavigation({ items, value: controlledValue, defaultValue, onChange, showLabels, variant, orientation, barColor, fabAction, fabPosition, fixed, "aria-label": ariaLabel, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
items?: any[];
|
|
4
4
|
value: any;
|
|
@@ -8,6 +8,8 @@ export function BottomNavigation({ items, value: controlledValue, defaultValue,
|
|
|
8
8
|
variant?: string;
|
|
9
9
|
orientation?: string;
|
|
10
10
|
barColor?: string;
|
|
11
|
+
fabAction: any;
|
|
12
|
+
fabPosition?: string;
|
|
11
13
|
fixed?: boolean;
|
|
12
14
|
"aria-label"?: string;
|
|
13
15
|
className?: string;
|
|
@@ -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?: {};
|
|
@@ -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";
|
|
@@ -11,11 +11,12 @@ export function Stepper({ children, orientation, size, color, activeStep, clicka
|
|
|
11
11
|
className?: string;
|
|
12
12
|
sx?: {};
|
|
13
13
|
}): JSX.Element;
|
|
14
|
-
export function Step({ children, icon, label, _index, className, sx, ...props }: {
|
|
14
|
+
export function Step({ children, icon, label, disabled, _index, className, sx, ...props }: {
|
|
15
15
|
[x: string]: any;
|
|
16
16
|
children: any;
|
|
17
17
|
icon: any;
|
|
18
18
|
label: any;
|
|
19
|
+
disabled?: boolean;
|
|
19
20
|
_index?: number;
|
|
20
21
|
className?: string;
|
|
21
22
|
sx?: {};
|
|
@@ -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