@omni-design/components 0.11.0 → 0.13.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/.claude/commands/ScanComponents.md +1 -1
- package/.claude/commands/ShareComponent.md +1 -1
- package/CLAUDE.md +5 -3
- package/dist/OmniDesignProvider.esm.js +1 -1
- package/dist/OmniDesignProvider.esm.js.map +1 -1
- package/dist/OmniDesignProvider.js +1 -1
- package/dist/OmniDesignProvider.js.map +1 -1
- package/dist/index.esm.js +8 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/types/components/BackgroundPicker.d.ts +1 -1
- package/dist/types/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/dist/types/components/BrandIcon/index.d.ts +1 -0
- package/dist/types/components/Button/Button.d.ts +3 -1
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -2
- package/dist/types/components/Charts/tokens.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Footer/Footer.d.ts +3 -1
- package/dist/types/components/Foundations/FoundationTopic.d.ts +4 -0
- package/dist/types/components/Foundations/HowToSlot.d.ts +16 -0
- package/dist/types/components/Foundations/TokenRoles.d.ts +19 -0
- package/dist/types/components/Foundations/TypographySummary.d.ts +2 -0
- package/dist/types/components/IconBadge/IconBadge.d.ts +1 -1
- package/dist/types/components/Loader/Loader.d.ts +66 -0
- package/dist/types/components/Loader/index.d.ts +1 -0
- package/dist/types/components/MiniSwatch/MiniSwatch.d.ts +7 -0
- package/dist/types/components/MiniSwatch/index.d.ts +1 -0
- package/dist/types/components/ShowcaseHeader.d.ts +5 -0
- package/dist/types/components/Swatch/Swatch.d.ts +14 -0
- package/dist/types/components/Swatch/index.d.ts +1 -0
- package/dist/types/components/Switch/Switch.d.ts +24 -8
- package/dist/types/components/Switch/index.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +1 -1
- package/dist/types/components/Typography/Typography.d.ts +54 -1
- package/dist/types/components/Typography/index.d.ts +1 -1
- package/dist/types/components/_states.d.ts +1 -1
- package/dist/types/components/a11yPanel.d.ts +37 -0
- package/dist/types/components/index.d.ts +7 -1
- package/dist/types/docs/DocPanels.d.ts +25 -0
- package/dist/types/docs/components.d.ts +220 -0
- package/dist/types/docs/componentsData.d.ts +587 -0
- package/dist/types/docs/componentsForms.d.ts +597 -0
- package/dist/types/docs/componentsNav.d.ts +420 -0
- package/dist/types/docs/componentsOverlays.d.ts +379 -0
- package/dist/types/docs/componentsRest.d.ts +158 -0
- package/dist/types/docs/componentsSurfaces.d.ts +429 -0
- package/dist/types/docs/docsLink.d.ts +32 -0
- package/dist/types/docs/examples.d.ts +48 -0
- package/dist/types/docs/figmaHowTo.d.ts +28 -0
- package/dist/types/docs/figmaLinks.d.ts +58 -0
- package/dist/types/docs/foundations.d.ts +40 -0
- package/dist/types/docs/index.d.ts +5 -0
- package/docs/components.md +71 -55
- package/package.json +4 -2
- package/public/styles/Dark-Mode.css +12062 -13009
- package/public/styles/Light-Mode.css +11246 -12370
- package/public/styles/base.css +387 -182
- package/public/styles/core.css +569 -133
- package/public/styles/foundation.css +142 -53
- package/public/styles/styles.css +5 -5
- package/public/styles/theme.json +2 -2
- package/public/styles/typography-tokens.css +873 -96
- package/dist/types/theme/useThemeMode.d.ts +0 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param name lowercase, hyphenated, as Figma's text layer holds it:
|
|
3
|
+
* 'github', 'x-twitter', 'linkedin', 'dribbble', 'instagram'
|
|
4
|
+
* @param icon a Font Awesome icon object, if you would rather import it
|
|
5
|
+
* yourself. Takes precedence over `name`.
|
|
6
|
+
* @param size any CSS length. Defaults to 1em so it rides the text beside it.
|
|
7
|
+
* @param color any CSS color or token. Defaults to currentColor.
|
|
8
|
+
* @param title accessible name. Omit for decoration beside a visible label —
|
|
9
|
+
* the icon is then aria-hidden, which is the common case in a
|
|
10
|
+
* footer where the link text already says "GitHub".
|
|
11
|
+
*/
|
|
12
|
+
export function BrandIcon({ name, icon, size, color, title, ...props }: {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
name: any;
|
|
15
|
+
icon: any;
|
|
16
|
+
size?: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
title: any;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
export default BrandIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BrandIcon, default } from "./BrandIcon";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function normalizeButtonVariant(variant: any): string;
|
|
2
|
-
export function Button({ variant, size, elevated, selected, fullWidth, disabled, iconOnly, letterNumber, avatar, swatch, swatchColor, startIcon, endIcon, startDecorator, endDecorator, badge, badgeContent, badgeVariant, badgeSize, badgeDot, badgeMax, badgeAnchorOrigin, children, className, sx, ...props }: {
|
|
2
|
+
export function Button({ variant, size, elevated, selected, fullWidth, disabled, contentType, iconOnly, letterNumber, avatar, swatch, swatchColor, startIcon, endIcon, startDecorator, endDecorator, badge, badgeContent, badgeVariant, badgeSize, badgeDot, badgeMax, badgeAnchorOrigin, children, className, sx, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
variant?: string;
|
|
5
5
|
size?: string;
|
|
@@ -7,6 +7,7 @@ export function Button({ variant, size, elevated, selected, fullWidth, disabled,
|
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
fullWidth?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
contentType: any;
|
|
10
11
|
iconOnly?: boolean;
|
|
11
12
|
letterNumber?: boolean;
|
|
12
13
|
avatar?: boolean;
|
|
@@ -30,6 +31,7 @@ export function Button({ variant, size, elevated, selected, fullWidth, disabled,
|
|
|
30
31
|
className?: string;
|
|
31
32
|
sx?: {};
|
|
32
33
|
}): JSX.Element;
|
|
34
|
+
export const BUTTON_CONTENT_TYPES: string[];
|
|
33
35
|
export function DefaultButton(p: any): JSX.Element;
|
|
34
36
|
export function DefaultOutlineButton(p: any): JSX.Element;
|
|
35
37
|
export function PrimaryButton(p: any): JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export function ButtonGroup({ variant, color, size, disabled, orientation, spacing, fit, fullWidth, equalWidth, multiple, value: controlledValue, defaultValue, onChange, children, className, sx, "aria-label": ariaLabel, ...props }: {
|
|
1
|
+
export function ButtonGroup({ variant, color, size, disabled, orientation, separated, spacing, fit, fullWidth, equalWidth, multiple, value: controlledValue, defaultValue, onChange, children, className, sx, "aria-label": ariaLabel, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
variant?: string;
|
|
4
4
|
color?: string;
|
|
5
5
|
size?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
orientation?: string;
|
|
8
|
-
|
|
8
|
+
separated?: boolean;
|
|
9
|
+
spacing: any;
|
|
9
10
|
fit: any;
|
|
10
11
|
fullWidth?: boolean;
|
|
11
12
|
equalWidth?: boolean;
|
|
@@ -16,7 +16,7 @@ export namespace CHART_TOKENS {
|
|
|
16
16
|
*
|
|
17
17
|
* Brand accents lead, because a category has no inherent meaning and should
|
|
18
18
|
* not borrow one — a green wedge next to a red one reads as pass/fail whether
|
|
19
|
-
* or not that is what the data says. The state
|
|
19
|
+
* or not that is what the data says. The state colors are still available for
|
|
20
20
|
* charts with more categories than accents, and a caller can pass its own
|
|
21
21
|
* subset (or reorder it) via the `colors` prop when the categories DO carry
|
|
22
22
|
* semantics: `colors={['Success', 'Warning', 'Error']}`.
|
|
@@ -2,7 +2,7 @@ export function normalizeChipVariant(variant: any): string;
|
|
|
2
2
|
export function Chip({ variant, size: sizeProp, label, clickable, disabled, selected, selectionMode, onDelete, onClick, startDecorator, endDecorator, children, className, sx, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
variant?: string;
|
|
5
|
-
size
|
|
5
|
+
size: any;
|
|
6
6
|
label: any;
|
|
7
7
|
clickable?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export function Footer({ color, brand, address, columns, socialLinks, subscribe, copyrightName, copyrightYear, className, style, ...rest }: {
|
|
1
|
+
export function Footer({ color, brand, address, columns, socialLinks, copyright, children, subscribe, copyrightName, copyrightYear, className, style, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
color?: string;
|
|
4
4
|
brand: any;
|
|
5
5
|
address: any;
|
|
6
6
|
columns?: any[];
|
|
7
7
|
socialLinks?: any[];
|
|
8
|
+
copyright?: boolean;
|
|
9
|
+
children: any;
|
|
8
10
|
subscribe: any;
|
|
9
11
|
copyrightName: any;
|
|
10
12
|
copyrightYear: any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param src path under public/, e.g. "/images/figma-surface-mode.png".
|
|
3
|
+
* Omit it to render the placeholder. A .mp4/.mov/.webm plays.
|
|
4
|
+
* @param title what the shot should show, in a few words.
|
|
5
|
+
* @param shows one line on what the viewer should come away knowing.
|
|
6
|
+
* @param aspect placeholder shape. Panel crops are tall; default suits them.
|
|
7
|
+
* @param maxWidth cap in px. Panel crops are narrow, so the default is too.
|
|
8
|
+
*/
|
|
9
|
+
export function HowToSlot({ src, title, shows, aspect, maxWidth }: {
|
|
10
|
+
src: any;
|
|
11
|
+
title: any;
|
|
12
|
+
shows: any;
|
|
13
|
+
aspect?: string;
|
|
14
|
+
maxWidth?: number;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
export default HowToSlot;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One swatch per role, painted from the token itself.
|
|
3
|
+
*
|
|
4
|
+
* The chip renders the REAL variable rather than a copy of its value, so it
|
|
5
|
+
* re-resolves with the theme and surface pickers above — which is the only way
|
|
6
|
+
* to show that these are roles and not colors.
|
|
7
|
+
*/
|
|
8
|
+
export function RoleSwatches({ title, note, roles, tokenFor }: {
|
|
9
|
+
title: any;
|
|
10
|
+
note: any;
|
|
11
|
+
roles: any;
|
|
12
|
+
tokenFor: any;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export function StyleTable({ styles, tokensFor, defaultColorFor, render }: {
|
|
15
|
+
styles: any;
|
|
16
|
+
tokensFor: any;
|
|
17
|
+
defaultColorFor: any;
|
|
18
|
+
render: any;
|
|
19
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function Loader({ theme, surface, size, color, message, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
theme: any;
|
|
4
|
+
surface: any;
|
|
5
|
+
size?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
sx?: {};
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
"aria-labelledby": any;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* LinearLoader Component
|
|
14
|
+
* Linear progress bar
|
|
15
|
+
*
|
|
16
|
+
* @param {number} value - Progress value 0-100
|
|
17
|
+
* @param {string} label - Optional label
|
|
18
|
+
* @param {object} props - Additional props
|
|
19
|
+
*/
|
|
20
|
+
export function LinearLoader({ value, label, sx, ...props }: number): JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* SkeletonLoader Component
|
|
23
|
+
* Skeleton placeholder for loading content
|
|
24
|
+
*
|
|
25
|
+
* @param {number} rows - Number of skeleton rows
|
|
26
|
+
* @param {number} height - Height of each skeleton
|
|
27
|
+
* @param {object} props - Additional props
|
|
28
|
+
*/
|
|
29
|
+
export function SkeletonLoader({ rows, height, spacing, sx, ...props }: number): JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* DotsLoader Component
|
|
32
|
+
* Animated dots loader
|
|
33
|
+
*
|
|
34
|
+
* @param {string} message - Loading message
|
|
35
|
+
* @param {object} props - Additional props
|
|
36
|
+
*/
|
|
37
|
+
export function DotsLoader({ message, sx, ...props }: string): JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* PageLoader Component
|
|
40
|
+
* Full page loader overlay
|
|
41
|
+
*
|
|
42
|
+
* @param {string} message - Loading message
|
|
43
|
+
* @param {number} size - Loader size
|
|
44
|
+
* @param {object} props - Additional props
|
|
45
|
+
*/
|
|
46
|
+
export function PageLoader({ message, size, sx, ...props }: string): JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* SkeletonCard Component
|
|
49
|
+
* Skeleton loading state for cards
|
|
50
|
+
*
|
|
51
|
+
* @param {number} lines - Number of text lines
|
|
52
|
+
* @param {boolean} showImage - Show image skeleton
|
|
53
|
+
* @param {object} props - Additional props
|
|
54
|
+
*/
|
|
55
|
+
export function SkeletonCard({ lines, showImage, sx, ...props }: number): JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* OverlayLoader Component
|
|
58
|
+
* Loader overlay for async operations
|
|
59
|
+
*
|
|
60
|
+
* @param {boolean} isLoading - Show loader
|
|
61
|
+
* @param {string} message - Loading message
|
|
62
|
+
* @param {ReactNode} children - Content to overlay
|
|
63
|
+
* @param {object} props - Additional props
|
|
64
|
+
*/
|
|
65
|
+
export function OverlayLoader({ isLoading, message, children, sx, ...props }: boolean): JSX.Element;
|
|
66
|
+
export default Loader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Loader, LinearLoader, SkeletonLoader, DotsLoader, PageLoader, SkeletonCard, OverlayLoader, default } from "./Loader";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MiniSwatch, default } from "./MiniSwatch";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function Swatch({ color, label, size, selected, disabled, radio, onClick, className, sx, "aria-label": ariaLabel, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
color: any;
|
|
4
|
+
label: any;
|
|
5
|
+
size?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
radio?: boolean;
|
|
9
|
+
onClick: any;
|
|
10
|
+
className?: string;
|
|
11
|
+
sx?: {};
|
|
12
|
+
"aria-label": any;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export default Swatch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Swatch, default } from "./Swatch";
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
export function themedStyles(): {
|
|
2
|
+
type: string;
|
|
3
|
+
trackOff: string;
|
|
4
|
+
trackOffBorder: string;
|
|
5
|
+
trackOn: string;
|
|
6
|
+
trackOnBorder: string;
|
|
7
|
+
dotOff: string;
|
|
8
|
+
dotOn: string;
|
|
9
|
+
iconOff: string;
|
|
10
|
+
iconOn: string;
|
|
11
|
+
};
|
|
12
|
+
export function outlineStyles(color: any): {
|
|
13
|
+
type: string;
|
|
14
|
+
color: any;
|
|
15
|
+
trackOff: string;
|
|
16
|
+
trackOffBorder: string;
|
|
17
|
+
trackOn: string;
|
|
18
|
+
trackOnBorder: string;
|
|
19
|
+
dotOff: string;
|
|
20
|
+
dotOn: string;
|
|
21
|
+
iconOff: string;
|
|
22
|
+
iconOn: string;
|
|
23
|
+
};
|
|
24
|
+
export function normalizeSwitchVariant(variant: any): string;
|
|
1
25
|
export function Switch({ variant, size, checked, defaultChecked, onChange, disabled, label, labelPlacement, name, value, icon, iconOn, iconOff, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
2
26
|
[x: string]: any;
|
|
3
27
|
variant?: string;
|
|
@@ -34,14 +58,6 @@ export function InfoOutlineSwitch(p: any): JSX.Element;
|
|
|
34
58
|
export function SuccessOutlineSwitch(p: any): JSX.Element;
|
|
35
59
|
export function WarningOutlineSwitch(p: any): JSX.Element;
|
|
36
60
|
export function ErrorOutlineSwitch(p: any): JSX.Element;
|
|
37
|
-
export function PrimaryLightSwitch(p: any): JSX.Element;
|
|
38
|
-
export function SecondaryLightSwitch(p: any): JSX.Element;
|
|
39
|
-
export function TertiaryLightSwitch(p: any): JSX.Element;
|
|
40
|
-
export function NeutralLightSwitch(p: any): JSX.Element;
|
|
41
|
-
export function InfoLightSwitch(p: any): JSX.Element;
|
|
42
|
-
export function SuccessLightSwitch(p: any): JSX.Element;
|
|
43
|
-
export function WarningLightSwitch(p: any): JSX.Element;
|
|
44
|
-
export function ErrorLightSwitch(p: any): JSX.Element;
|
|
45
61
|
export function SwitchInput({ variant, size, checked, defaultChecked, onChange, disabled, label, labelPlacement, name, value, icon, iconOn, iconOff, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
46
62
|
[x: string]: any;
|
|
47
63
|
variant?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { SwitchShowcase } from "./SwitchShowcase";
|
|
2
|
-
export { Switch, SwitchInput, PrimarySwitch, SecondarySwitch, TertiarySwitch, NeutralSwitch, InfoSwitch, SuccessSwitch, WarningSwitch, ErrorSwitch, PrimaryOutlineSwitch, SecondaryOutlineSwitch, TertiaryOutlineSwitch, NeutralOutlineSwitch, InfoOutlineSwitch, SuccessOutlineSwitch, WarningOutlineSwitch, ErrorOutlineSwitch,
|
|
2
|
+
export { Switch, SwitchInput, PrimarySwitch, SecondarySwitch, TertiarySwitch, NeutralSwitch, InfoSwitch, SuccessSwitch, WarningSwitch, ErrorSwitch, PrimaryOutlineSwitch, SecondaryOutlineSwitch, TertiaryOutlineSwitch, NeutralOutlineSwitch, InfoOutlineSwitch, SuccessOutlineSwitch, WarningOutlineSwitch, ErrorOutlineSwitch, default } from "./Switch";
|
|
@@ -92,7 +92,7 @@ export function URLTextField({ label, placeholder, ...props }: {
|
|
|
92
92
|
* - error / errorMessage where Input has validation / validationMessage, so
|
|
93
93
|
* the same state was spelled two ways depending on which control you
|
|
94
94
|
* reached for.
|
|
95
|
-
* - No size, no variant, no
|
|
95
|
+
* - No size, no variant, no color, no adornments, no floating label.
|
|
96
96
|
*
|
|
97
97
|
* Input already takes multiline / rows / maxRows and renders a <textarea>, so
|
|
98
98
|
* there was never a second thing to build — only a second thing to maintain.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export function Typography({ children, textStyle, color, width, component, noWrap, gutterBottom, className, sx, ...props }: {
|
|
1
|
+
export function Typography({ children, textStyle, color, altMode, width, component, noWrap, gutterBottom, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
children: any;
|
|
4
4
|
textStyle?: string;
|
|
5
5
|
color: any;
|
|
6
|
+
altMode: any;
|
|
6
7
|
width: any;
|
|
7
8
|
component: any;
|
|
8
9
|
noWrap?: boolean;
|
|
@@ -11,6 +12,39 @@ export function Typography({ children, textStyle, color, width, component, noWra
|
|
|
11
12
|
sx?: {};
|
|
12
13
|
}): JSX.Element;
|
|
13
14
|
export const STYLE_MAP: {
|
|
15
|
+
'alt-display-large': {
|
|
16
|
+
component: string;
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
fontWeight: string;
|
|
20
|
+
lineHeight: string;
|
|
21
|
+
letterSpacing: string;
|
|
22
|
+
defaultColor: string;
|
|
23
|
+
defaultWidth: string;
|
|
24
|
+
altDisplay: boolean;
|
|
25
|
+
};
|
|
26
|
+
'alt-display-medium': {
|
|
27
|
+
component: string;
|
|
28
|
+
fontFamily: string;
|
|
29
|
+
fontSize: string;
|
|
30
|
+
fontWeight: string;
|
|
31
|
+
lineHeight: string;
|
|
32
|
+
letterSpacing: string;
|
|
33
|
+
defaultColor: string;
|
|
34
|
+
defaultWidth: string;
|
|
35
|
+
altDisplay: boolean;
|
|
36
|
+
};
|
|
37
|
+
'alt-display-small': {
|
|
38
|
+
component: string;
|
|
39
|
+
fontFamily: string;
|
|
40
|
+
fontSize: string;
|
|
41
|
+
fontWeight: string;
|
|
42
|
+
lineHeight: string;
|
|
43
|
+
letterSpacing: string;
|
|
44
|
+
defaultColor: string;
|
|
45
|
+
defaultWidth: string;
|
|
46
|
+
altDisplay: boolean;
|
|
47
|
+
};
|
|
14
48
|
'display-large': {
|
|
15
49
|
component: string;
|
|
16
50
|
fontFamily: string;
|
|
@@ -427,6 +461,22 @@ export const STYLE_ALIASES: {
|
|
|
427
461
|
'subtitle-medium': string;
|
|
428
462
|
};
|
|
429
463
|
export const TYPOGRAPHY_STYLES: string[];
|
|
464
|
+
/**
|
|
465
|
+
* Every CSS variable each style reads, derived from the style's own config.
|
|
466
|
+
*
|
|
467
|
+
* Generated rather than listed, because a hand-kept table is a second source
|
|
468
|
+
* of truth that drifts the first time someone adds a style — and the docs in
|
|
469
|
+
* this repo have been wrong about bindings often enough today to make that a
|
|
470
|
+
* real cost rather than a theoretical one. The config strings already contain
|
|
471
|
+
* the token names; this just reads them back out.
|
|
472
|
+
*/
|
|
473
|
+
export const STYLE_TOKENS: {
|
|
474
|
+
[k: string]: string[];
|
|
475
|
+
};
|
|
476
|
+
/** 'header' or 'standard' — which color role a style takes by default. */
|
|
477
|
+
export const STYLE_DEFAULT_COLOR: {
|
|
478
|
+
[k: string]: string;
|
|
479
|
+
};
|
|
430
480
|
export const HEADER_COLORS: string[];
|
|
431
481
|
export const TEXT_COLORS: string[];
|
|
432
482
|
export const CAP_HEIGHT_TRIM: {
|
|
@@ -440,6 +490,9 @@ export const CAP_HEIGHT_TRIM: {
|
|
|
440
490
|
export function DisplayLarge(p: any): JSX.Element;
|
|
441
491
|
export function DisplayMedium(p: any): JSX.Element;
|
|
442
492
|
export function DisplaySmall(p: any): JSX.Element;
|
|
493
|
+
export function AltDisplayLarge(p: any): JSX.Element;
|
|
494
|
+
export function AltDisplayMedium(p: any): JSX.Element;
|
|
495
|
+
export function AltDisplaySmall(p: any): JSX.Element;
|
|
443
496
|
export function H1(p: any): JSX.Element;
|
|
444
497
|
export function H2(p: any): JSX.Element;
|
|
445
498
|
export function H3(p: any): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TypographyShowcase } from "./TypographyShowcase";
|
|
2
|
-
export { Typography, TYPOGRAPHY_STYLES, CAP_HEIGHT_TRIM, H1, H2, H3, H4, H5, H6, Heading, DisplayLarge, DisplayMedium, DisplaySmall, Subtitle, SubtitleSmall, SubtitleMedium, SubtitleLarge, Subtitle1, Subtitle2, Body, BodySmall, BodyLarge, BodySemibold, BodyBold, BodySmallSemibold, BodySmallBold, BodyLargeSemibold, BodyLargeBold, Body1, Body2, Label, LabelSmall, LabelLarge, LabelExtraSmall, Caption, CaptionBold, Legal, LegalSemibold, Button, ButtonSmall, ButtonExtraSmall, Eyebrow, EyebrowSmall, EyebrowMedium, EyebrowLarge, Overline, OverlineSmall, OverlineMedium, OverlineLarge, NumberLarge, NumberMedium, NumberSmall, default } from "./Typography";
|
|
2
|
+
export { TEXT_COLORS, HEADER_COLORS, Typography, TYPOGRAPHY_STYLES, STYLE_TOKENS, STYLE_DEFAULT_COLOR, CAP_HEIGHT_TRIM, H1, H2, H3, H4, H5, H6, Heading, DisplayLarge, DisplayMedium, DisplaySmall, AltDisplayLarge, AltDisplayMedium, AltDisplaySmall, Subtitle, SubtitleSmall, SubtitleMedium, SubtitleLarge, Subtitle1, Subtitle2, Body, BodySmall, BodyLarge, BodySemibold, BodyBold, BodySmallSemibold, BodySmallBold, BodyLargeSemibold, BodyLargeBold, Body1, Body2, Label, LabelSmall, LabelLarge, LabelExtraSmall, Caption, CaptionBold, Legal, LegalSemibold, Button, ButtonSmall, ButtonExtraSmall, Eyebrow, EyebrowSmall, EyebrowMedium, EyebrowLarge, Overline, OverlineSmall, OverlineMedium, OverlineLarge, NumberLarge, NumberMedium, NumberSmall, default } from "./Typography";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {object} [opts]
|
|
5
5
|
* @param {string} [opts.selectedBg] resting fill when selected
|
|
6
|
-
* @param {string} [opts.selectedText] text
|
|
6
|
+
* @param {string} [opts.selectedText] text color when selected
|
|
7
7
|
* @param {string} [opts.selectedHover] fill on hover while selected
|
|
8
8
|
* @param {string} [opts.selectedPressed] fill on press while selected
|
|
9
9
|
* @param {string} [opts.muiPrefix] 'Mui' to use MUI's class-based
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function ContrastBadge({ ratio, threshold }: {
|
|
2
|
+
ratio: any;
|
|
3
|
+
threshold?: number;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export function A11yRow({ label, ratio, threshold, note }: {
|
|
6
|
+
label: any;
|
|
7
|
+
ratio: any;
|
|
8
|
+
threshold: any;
|
|
9
|
+
note: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
export function A11yCheckRow({ label, pass, detail, note }: {
|
|
12
|
+
label: any;
|
|
13
|
+
pass: any;
|
|
14
|
+
detail: any;
|
|
15
|
+
note: any;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Read resolved CSS custom properties off a mounted element.
|
|
19
|
+
*
|
|
20
|
+
* Deferred with setTimeout and NOT requestAnimationFrame: rAF does not fire in
|
|
21
|
+
* a background or hidden tab, so a page opened in one measured nothing, and
|
|
22
|
+
* because the deps do not change afterwards it never retried — every row read
|
|
23
|
+
* "--" forever, even once the tab was focused.
|
|
24
|
+
*
|
|
25
|
+
* It also RETRIES, because the element can mount later than the effect: the
|
|
26
|
+
* preview often lives inside the Playground tab while the landing tab is
|
|
27
|
+
* Summary, so on first paint there is nothing to measure. Returning early used
|
|
28
|
+
* to end it permanently. Forty tries at 50ms, then stop, so a component with no
|
|
29
|
+
* preview does not poll forever.
|
|
30
|
+
*
|
|
31
|
+
* @param ref ref to the element whose computed style is read
|
|
32
|
+
* @param read (v) => data, where v(name) resolves one custom property
|
|
33
|
+
* @param deps re-measure when these change
|
|
34
|
+
*/
|
|
35
|
+
export function useMeasuredTokens(ref: any, read: any, deps: any): {};
|
|
36
|
+
export { getContrast };
|
|
37
|
+
import { getContrast } from './contrast';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { Colors } from "./Colors";
|
|
2
2
|
export { Spacing } from "./Spacing";
|
|
3
|
+
export { BrandIcon } from "./BrandIcon";
|
|
4
|
+
export { Swatch } from "./Swatch";
|
|
5
|
+
export { MiniSwatch } from "./MiniSwatch";
|
|
3
6
|
export { IconBadge } from "./IconBadge";
|
|
4
7
|
export { IconBadgeShowcase } from "./IconBadge/IconBadgeShowcase";
|
|
5
8
|
export { Button } from "./Button";
|
|
@@ -27,7 +30,7 @@ export { OmniStack as DynoStack } from "./Stack/Stack";
|
|
|
27
30
|
export { OmniTreeView as DynoTreeView } from "./TreeView/TreeView";
|
|
28
31
|
export * as chartGeometry from "./Charts/geometry";
|
|
29
32
|
export { StateMessage } from "./StateMessage";
|
|
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";
|
|
33
|
+
export { Typography, CAP_HEIGHT_TRIM, Heading, DisplayLarge, DisplayMedium, AltDisplayLarge, AltDisplayMedium, AltDisplaySmall, 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
34
|
export { Icon, IconShowcase } from "./Icon";
|
|
32
35
|
export { Fab, FabShowcase } from "./Fab";
|
|
33
36
|
export { Rail, RailShowcase } from "./Rail";
|
|
@@ -42,6 +45,7 @@ export { SwitchInput, SwitchInput as Switch } from "./Switch";
|
|
|
42
45
|
export { SliderInput, RangeSlider, SliderInput as Slider } from "./Slider";
|
|
43
46
|
export { RatingInput, RatingInput as Rating } from "./Rating";
|
|
44
47
|
export { SearchField, SearchFieldShowcase } from "./SearchField";
|
|
48
|
+
export { Tag, TAG_COLORS, TAG_COLOR_TOKEN_MAP, PrimaryTag, SecondaryTag, TertiaryTag, NeutralTag, InfoTag, SuccessTag, WarningTag, ErrorTag, TagShowcase } from "./Tag";
|
|
45
49
|
export { OmniStack, Stack, HStack, VStack, CenteredStack, SpaceBetweenStack, WrapStack, ResponsiveStack, GridStack, StackDivider, InsetStack, ScrollStack, StackShowcase } from "./Stack";
|
|
46
50
|
export { Box, BoxShowcase } from "./Box";
|
|
47
51
|
export { Section, SectionShowcase } from "./Section";
|
|
@@ -61,6 +65,7 @@ export { Alert, AlertShowcase } from "./Alert";
|
|
|
61
65
|
export { Snackbar, SnackbarShowcase } from "./Snackbar";
|
|
62
66
|
export { CircularProgress, CircularProgressShowcase } from "./CircularProgress";
|
|
63
67
|
export { LinearProgress, LinearProgressShowcase } from "./LinearProgress";
|
|
68
|
+
export { Loader, LinearLoader, SkeletonLoader, DotsLoader, PageLoader, SkeletonCard, OverlayLoader } from "./Loader";
|
|
64
69
|
export { Avatar, AvatarGroup, AvatarShowcase, DEFAULT_AVATAR_SRC } from "./Avatar";
|
|
65
70
|
export { Badge, BadgeShowcase } from "./Badge";
|
|
66
71
|
export { List, ListItem, ListItemDecorator } from "./List";
|
|
@@ -75,3 +80,4 @@ export { OmniDesignProvider, useOmniDesign, ThemedZone, Surfaced } from "../Omni
|
|
|
75
80
|
export { CodeBlock, CopyButton } from "./CodeBlock/CodeBlock";
|
|
76
81
|
export { BarChart, LineChart, PieChart, CHART_TOKENS, CHART_LABEL_TYPE } from "./Charts";
|
|
77
82
|
export { Ghost, useGhost, ghostBlockSx } from "./_ghost";
|
|
83
|
+
export { COMPONENT_DOCS, FOUNDATIONS, renderFoundations, renderColorSystem, renderColorSystem as renderColourSystem, renderComponentDoc, COLOR_COLLECTIONS, COLOR_COLLECTIONS as COLOUR_COLLECTIONS, docsSlug, componentDocsUrl, componentDocsIndexUrl, DOCS_ORIGIN, EXAMPLES, hasExample } from "../docs";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function docFor(component: any): {
|
|
2
|
+
name: any;
|
|
3
|
+
summary: any;
|
|
4
|
+
insteadUse: any;
|
|
5
|
+
props: any;
|
|
6
|
+
states: any;
|
|
7
|
+
theming: {
|
|
8
|
+
collection: string;
|
|
9
|
+
inCode: string;
|
|
10
|
+
inFigma: string;
|
|
11
|
+
}[];
|
|
12
|
+
tokens: any;
|
|
13
|
+
composition: any;
|
|
14
|
+
accessibility: any;
|
|
15
|
+
gotchas: any;
|
|
16
|
+
};
|
|
17
|
+
export function DocSummary({ component, theme, surface }: {
|
|
18
|
+
component: any;
|
|
19
|
+
theme?: any;
|
|
20
|
+
surface?: string;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
/** Breaking and silent changes, newest first, plus a way to report one. */
|
|
23
|
+
export function DocChanges({ component }: {
|
|
24
|
+
component: any;
|
|
25
|
+
}): JSX.Element;
|