@omni-design/components 0.12.0 → 0.14.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/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 +23 -0
- package/dist/types/components/BrandIcon/BrandIconShowcase.d.ts +2 -0
- package/dist/types/components/BrandIcon/index.d.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +35 -66
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/dist/types/components/Charts/tokens.d.ts +1 -1
- package/dist/types/components/CodeBlock/index.d.ts +1 -0
- 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/List/List.d.ts +2 -1
- package/dist/types/components/Rail/Rail.d.ts +2 -1
- package/dist/types/components/ShowcaseHeader.d.ts +5 -0
- package/dist/types/components/Slider/Slider.d.ts +6 -3
- package/dist/types/components/TextField/TextField.d.ts +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +8 -5
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroupShowcase.d.ts +2 -0
- package/dist/types/components/ToggleButtonGroup/index.d.ts +2 -0
- 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 +58 -0
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/docs/DocPanels.d.ts +0 -14
- package/dist/types/docs/components.d.ts +131 -0
- package/dist/types/docs/componentsNav.d.ts +29 -13
- package/dist/types/docs/componentsSurfaces.d.ts +113 -10
- package/dist/types/docs/examples.d.ts +55 -34
- package/dist/types/docs/examples.lead.d.ts +89 -0
- package/dist/types/docs/figmaHowTo.d.ts +28 -0
- package/dist/types/docs/figmaLinks.d.ts +59 -0
- package/dist/types/docs/foundations.d.ts +12 -0
- package/dist/types/docs/samples.buttongroup.d.ts +22 -0
- package/dist/types/docs/samples.core.d.ts +104 -0
- package/dist/types/docs/samples.d.ts +27 -0
- package/dist/types/docs/samples.forms.d.ts +69 -0
- package/dist/types/docs/samples.nav.d.ts +70 -0
- package/dist/types/docs/samples.slider.d.ts +12 -0
- package/dist/types/docs/samples.surfaces.d.ts +69 -0
- package/package.json +4 -2
- package/public/styles/Dark-Mode.css +6 -0
- package/public/styles/Light-Mode.css +6 -0
- package/public/styles/README.md +1 -1
- package/public/styles/base.css +64 -19
- package/public/styles/core.css +94 -15
- package/public/styles/foundation.css +18 -0
- package/public/styles/typography-tokens.css +269 -20
- package/dist/types/theme/useThemeMode.d.ts +0 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Does this build have a mark for that name? */
|
|
2
|
+
export function hasBrandIcon(name: any): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* @param name lowercase, hyphenated, as Figma's text layer holds it:
|
|
5
|
+
* 'github', 'x-twitter', 'linkedin', 'dribbble', 'instagram'
|
|
6
|
+
* @param icon a Font Awesome icon object, if you would rather import it
|
|
7
|
+
* yourself. Takes precedence over `name`.
|
|
8
|
+
* @param size any CSS length. Defaults to 1em so it rides the text beside it.
|
|
9
|
+
* @param color any CSS color or token. Defaults to currentColor.
|
|
10
|
+
* @param title accessible name. Omit for decoration beside a visible label —
|
|
11
|
+
* the icon is then aria-hidden, which is the common case in a
|
|
12
|
+
* footer where the link text already says "GitHub".
|
|
13
|
+
*/
|
|
14
|
+
export function BrandIcon({ name, icon, size, color, title, ...props }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
name: any;
|
|
17
|
+
icon: any;
|
|
18
|
+
size?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
title: any;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
export const BRAND_ICON_NAMES: any[];
|
|
23
|
+
export default BrandIcon;
|
|
@@ -1,69 +1,38 @@
|
|
|
1
1
|
export function normalizeButtonVariant(variant: any): string;
|
|
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
|
-
[x: string]: any;
|
|
4
|
-
variant?: string;
|
|
5
|
-
size?: string;
|
|
6
|
-
elevated?: boolean;
|
|
7
|
-
selected?: boolean;
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
contentType: any;
|
|
11
|
-
iconOnly?: boolean;
|
|
12
|
-
letterNumber?: boolean;
|
|
13
|
-
avatar?: boolean;
|
|
14
|
-
swatch?: boolean;
|
|
15
|
-
swatchColor: any;
|
|
16
|
-
startIcon: any;
|
|
17
|
-
endIcon: any;
|
|
18
|
-
startDecorator: any;
|
|
19
|
-
endDecorator: any;
|
|
20
|
-
badge?: boolean;
|
|
21
|
-
badgeContent: any;
|
|
22
|
-
badgeVariant?: string;
|
|
23
|
-
badgeSize: any;
|
|
24
|
-
badgeDot?: boolean;
|
|
25
|
-
badgeMax?: number;
|
|
26
|
-
badgeAnchorOrigin?: {
|
|
27
|
-
vertical: string;
|
|
28
|
-
horizontal: string;
|
|
29
|
-
};
|
|
30
|
-
children: any;
|
|
31
|
-
className?: string;
|
|
32
|
-
sx?: {};
|
|
33
|
-
}): JSX.Element;
|
|
34
2
|
export const BUTTON_CONTENT_TYPES: string[];
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
-
export
|
|
67
|
-
export
|
|
68
|
-
export
|
|
3
|
+
export const Button: any;
|
|
4
|
+
export const DefaultButton: any;
|
|
5
|
+
export const DefaultOutlineButton: any;
|
|
6
|
+
export const PrimaryButton: any;
|
|
7
|
+
export const SecondaryButton: any;
|
|
8
|
+
export const TertiaryButton: any;
|
|
9
|
+
export const NeutralButton: any;
|
|
10
|
+
export const InfoButton: any;
|
|
11
|
+
export const SuccessButton: any;
|
|
12
|
+
export const WarningButton: any;
|
|
13
|
+
export const ErrorButton: any;
|
|
14
|
+
export const DangerButton: any;
|
|
15
|
+
export const PrimaryOutlineButton: any;
|
|
16
|
+
export const SecondaryOutlineButton: any;
|
|
17
|
+
export const TertiaryOutlineButton: any;
|
|
18
|
+
export const NeutralOutlineButton: any;
|
|
19
|
+
export const InfoOutlineButton: any;
|
|
20
|
+
export const SuccessOutlineButton: any;
|
|
21
|
+
export const WarningOutlineButton: any;
|
|
22
|
+
export const ErrorOutlineButton: any;
|
|
23
|
+
export const PrimaryLightButton: any;
|
|
24
|
+
export const SecondaryLightButton: any;
|
|
25
|
+
export const TertiaryLightButton: any;
|
|
26
|
+
export const NeutralLightButton: any;
|
|
27
|
+
export const InfoLightButton: any;
|
|
28
|
+
export const SuccessLightButton: any;
|
|
29
|
+
export const WarningLightButton: any;
|
|
30
|
+
export const ErrorLightButton: any;
|
|
31
|
+
export const GhostButton: any;
|
|
32
|
+
export const TextButton: any;
|
|
33
|
+
export const OutlineButton: any;
|
|
34
|
+
export const IconButton: any;
|
|
35
|
+
export const LetterButton: any;
|
|
36
|
+
export const AvatarButton: any;
|
|
37
|
+
export const SwatchButton: any;
|
|
69
38
|
export default Button;
|
|
@@ -1,4 +1,4 @@
|
|
|
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 }: {
|
|
1
|
+
export function ButtonGroup({ variant, color, size, disabled, orientation, separated, spacing, fit, fullWidth, equalWidth, multiple, allowEmpty, __selectionOwner, value: controlledValue, defaultValue, onChange, children, className, sx, "aria-label": ariaLabel, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
variant?: string;
|
|
4
4
|
color?: string;
|
|
@@ -11,6 +11,8 @@ export function ButtonGroup({ variant, color, size, disabled, orientation, separ
|
|
|
11
11
|
fullWidth?: boolean;
|
|
12
12
|
equalWidth?: boolean;
|
|
13
13
|
multiple?: boolean;
|
|
14
|
+
allowEmpty?: boolean;
|
|
15
|
+
__selectionOwner?: boolean;
|
|
14
16
|
value: any;
|
|
15
17
|
defaultValue: any;
|
|
16
18
|
onChange: any;
|
|
@@ -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']}`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeBlock, CopyButton, default } from "./CodeBlock";
|
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ export function ListItemDecorator({ children, size, isButton, onAction, ariaLabe
|
|
|
5
5
|
onAction: any;
|
|
6
6
|
ariaLabel: any;
|
|
7
7
|
}): JSX.Element;
|
|
8
|
-
export function ListItem({ children, startDecorator, endDecorator, startDecoratorIsButton, endDecoratorIsButton, onStartDecoratorAction, onEndDecoratorAction, startDecoratorAriaLabel, endDecoratorAriaLabel, size, variant, color, eyebrow, overline, secondary, clickable, disabled, selected, selectionMode, onSelect, onClick, bottomBorder, rightBorder, sx, ...props }: {
|
|
8
|
+
export function ListItem({ children, startDecorator, endDecorator, startDecoratorIsButton, endDecoratorIsButton, onStartDecoratorAction, onEndDecoratorAction, startDecoratorAriaLabel, endDecoratorAriaLabel, size, variant, color, eyebrow, overline, secondary, clickable, disabled, selected, selectionMode, onSelect, onClick, bottomBorder, rightBorder, component, sx, ...props }: {
|
|
9
9
|
[x: string]: any;
|
|
10
10
|
children: any;
|
|
11
11
|
startDecorator: any;
|
|
@@ -30,6 +30,7 @@ export function ListItem({ children, startDecorator, endDecorator, startDecorato
|
|
|
30
30
|
onClick: any;
|
|
31
31
|
bottomBorder?: boolean;
|
|
32
32
|
rightBorder?: boolean;
|
|
33
|
+
component?: string;
|
|
33
34
|
sx?: {};
|
|
34
35
|
}): JSX.Element;
|
|
35
36
|
export function List({ children, items, variant, color, size, orientation, dividers, selectionMode, loading, skeletonRows, empty, error, selectedIndices, onSelectionChange, clickable, component, className, sx, ...props }: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Rail({ items, sections, value: controlledValue, defaultValue, onChange, expandable, expandedWidth, defaultExpanded, fabAction, labelStyle, size, className, sx, ...props }: {
|
|
1
|
+
export function Rail({ items, sections, value: controlledValue, defaultValue, onChange, expandable, expandedWidth, defaultExpanded, fabAction, labelStyle, variant, size, className, sx, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
items?: any[];
|
|
4
4
|
sections: any;
|
|
@@ -10,6 +10,7 @@ export function Rail({ items, sections, value: controlledValue, defaultValue, on
|
|
|
10
10
|
defaultExpanded?: boolean;
|
|
11
11
|
fabAction: any;
|
|
12
12
|
labelStyle?: string;
|
|
13
|
+
variant?: string;
|
|
13
14
|
size?: string;
|
|
14
15
|
className?: string;
|
|
15
16
|
sx?: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Slider({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
1
|
+
export function Slider({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, fill, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
theme: any;
|
|
4
4
|
surface: any;
|
|
@@ -14,6 +14,7 @@ export function Slider({ theme, surface, variant, size, value, defaultValue, onC
|
|
|
14
14
|
marks?: boolean;
|
|
15
15
|
valueLabelDisplay?: string;
|
|
16
16
|
orientation?: string;
|
|
17
|
+
fill: any;
|
|
17
18
|
track?: string;
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
label: any;
|
|
@@ -32,7 +33,7 @@ export function InfoSlider(p: any): JSX.Element;
|
|
|
32
33
|
export function SuccessSlider(p: any): JSX.Element;
|
|
33
34
|
export function WarningSlider(p: any): JSX.Element;
|
|
34
35
|
export function ErrorSlider(p: any): JSX.Element;
|
|
35
|
-
export function SliderInput({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
36
|
+
export function SliderInput({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, fill, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
36
37
|
[x: string]: any;
|
|
37
38
|
theme: any;
|
|
38
39
|
surface: any;
|
|
@@ -48,6 +49,7 @@ export function SliderInput({ theme, surface, variant, size, value, defaultValue
|
|
|
48
49
|
marks?: boolean;
|
|
49
50
|
valueLabelDisplay?: string;
|
|
50
51
|
orientation?: string;
|
|
52
|
+
fill: any;
|
|
51
53
|
track?: string;
|
|
52
54
|
disabled?: boolean;
|
|
53
55
|
label: any;
|
|
@@ -57,7 +59,7 @@ export function SliderInput({ theme, surface, variant, size, value, defaultValue
|
|
|
57
59
|
"aria-label": any;
|
|
58
60
|
"aria-labelledby": any;
|
|
59
61
|
}): JSX.Element;
|
|
60
|
-
export function RangeSlider({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
62
|
+
export function RangeSlider({ theme, surface, variant, size, value, defaultValue, onChange, onChangeCommitted, min, max, step, marks, valueLabelDisplay, orientation, fill, track, disabled, label, name, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
|
|
61
63
|
[x: string]: any;
|
|
62
64
|
theme: any;
|
|
63
65
|
surface: any;
|
|
@@ -73,6 +75,7 @@ export function RangeSlider({ theme, surface, variant, size, value, defaultValue
|
|
|
73
75
|
marks?: boolean;
|
|
74
76
|
valueLabelDisplay?: string;
|
|
75
77
|
orientation?: string;
|
|
78
|
+
fill: any;
|
|
76
79
|
track?: string;
|
|
77
80
|
disabled?: boolean;
|
|
78
81
|
label: any;
|
|
@@ -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,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export function ToggleButtonGroup({ variant, exclusive, onChange, ...props }: {
|
|
1
|
+
export function ToggleButtonGroup({ variant, color, exclusive, multiple, onChange, allowEmpty, separated, ...props }: {
|
|
3
2
|
[x: string]: any;
|
|
4
|
-
variant
|
|
5
|
-
|
|
3
|
+
variant: any;
|
|
4
|
+
color: any;
|
|
5
|
+
exclusive: any;
|
|
6
|
+
multiple: any;
|
|
6
7
|
onChange: any;
|
|
8
|
+
allowEmpty?: boolean;
|
|
9
|
+
separated?: boolean;
|
|
7
10
|
}): JSX.Element;
|
|
8
|
-
/**
|
|
11
|
+
/** A segment. Button already is one — this name ships publicly, so it stays. */
|
|
9
12
|
export function ToggleButton(props: any): JSX.Element;
|
|
10
13
|
export function DefaultToggleButtonGroup(p: any): JSX.Element;
|
|
11
14
|
export namespace DefaultToggleButtonGroup {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ToggleButtonGroupShowcase } from "./ToggleButtonGroupShowcase";
|
|
2
|
+
export { ToggleButtonGroup, ToggleButton, DefaultToggleButtonGroup, PrimaryToggleButtonGroup, SecondaryToggleButtonGroup, TertiaryToggleButtonGroup, NeutralToggleButtonGroup, BlackWhiteToggleButtonGroup, InfoToggleButtonGroup, SuccessToggleButtonGroup, WarningToggleButtonGroup, ErrorToggleButtonGroup, default } from "./ToggleButtonGroup";
|
|
@@ -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,58 @@
|
|
|
1
|
+
export function ContrastBadge({ ratio, threshold }: {
|
|
2
|
+
ratio: any;
|
|
3
|
+
threshold?: number;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* What the numbers below are a verdict ON.
|
|
7
|
+
*
|
|
8
|
+
* Every ratio in this tab is measured against the component AS CONFIGURED IN
|
|
9
|
+
* THE PLAYGROUND — the variant, color, size and surface currently selected
|
|
10
|
+
* there — not against the component in general. Change a control and these
|
|
11
|
+
* numbers change with it.
|
|
12
|
+
*
|
|
13
|
+
* Saying so matters because the two readings lead opposite ways. A FAIL here
|
|
14
|
+
* means "this combination fails", which is a thing the user chose and can
|
|
15
|
+
* change; read as "this component fails" it becomes a bug report against the
|
|
16
|
+
* library for a configuration nobody shipped. And a PASS on the default
|
|
17
|
+
* configuration says nothing about the eight palettes the user did not look
|
|
18
|
+
* at — so a tab that stated no scope was quietly inviting both mistakes.
|
|
19
|
+
*
|
|
20
|
+
* One component, one place: the wording lives here rather than in 54
|
|
21
|
+
* showcases, so it can be corrected once.
|
|
22
|
+
*/
|
|
23
|
+
export function A11yScopeNote({ configuration }: {
|
|
24
|
+
configuration: any;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
export function A11yRow({ label, ratio, threshold, note }: {
|
|
27
|
+
label: any;
|
|
28
|
+
ratio: any;
|
|
29
|
+
threshold: any;
|
|
30
|
+
note: any;
|
|
31
|
+
}): JSX.Element;
|
|
32
|
+
export function A11yCheckRow({ label, pass, detail, note }: {
|
|
33
|
+
label: any;
|
|
34
|
+
pass: any;
|
|
35
|
+
detail: any;
|
|
36
|
+
note: any;
|
|
37
|
+
}): JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Read resolved CSS custom properties off a mounted element.
|
|
40
|
+
*
|
|
41
|
+
* Deferred with setTimeout and NOT requestAnimationFrame: rAF does not fire in
|
|
42
|
+
* a background or hidden tab, so a page opened in one measured nothing, and
|
|
43
|
+
* because the deps do not change afterwards it never retried — every row read
|
|
44
|
+
* "--" forever, even once the tab was focused.
|
|
45
|
+
*
|
|
46
|
+
* It also RETRIES, because the element can mount later than the effect: the
|
|
47
|
+
* preview often lives inside the Playground tab while the landing tab is
|
|
48
|
+
* Summary, so on first paint there is nothing to measure. Returning early used
|
|
49
|
+
* to end it permanently. Forty tries at 50ms, then stop, so a component with no
|
|
50
|
+
* preview does not poll forever.
|
|
51
|
+
*
|
|
52
|
+
* @param ref ref to the element whose computed style is read
|
|
53
|
+
* @param read (v) => data, where v(name) resolves one custom property
|
|
54
|
+
* @param deps re-measure when these change
|
|
55
|
+
*/
|
|
56
|
+
export function useMeasuredTokens(ref: any, read: any, deps: any): {};
|
|
57
|
+
export { getContrast };
|
|
58
|
+
import { getContrast } from './contrast';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Colors } from "./Colors";
|
|
2
2
|
export { Spacing } from "./Spacing";
|
|
3
|
+
export { BrandIcon } from "./BrandIcon";
|
|
3
4
|
export { Swatch } from "./Swatch";
|
|
4
5
|
export { MiniSwatch } from "./MiniSwatch";
|
|
5
6
|
export { IconBadge } from "./IconBadge";
|
|
@@ -29,7 +30,7 @@ export { OmniStack as DynoStack } from "./Stack/Stack";
|
|
|
29
30
|
export { OmniTreeView as DynoTreeView } from "./TreeView/TreeView";
|
|
30
31
|
export * as chartGeometry from "./Charts/geometry";
|
|
31
32
|
export { StateMessage } from "./StateMessage";
|
|
32
|
-
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";
|
|
33
34
|
export { Icon, IconShowcase } from "./Icon";
|
|
34
35
|
export { Fab, FabShowcase } from "./Fab";
|
|
35
36
|
export { Rail, RailShowcase } from "./Rail";
|
|
@@ -79,4 +80,4 @@ export { OmniDesignProvider, useOmniDesign, ThemedZone, Surfaced } from "../Omni
|
|
|
79
80
|
export { CodeBlock, CopyButton } from "./CodeBlock/CodeBlock";
|
|
80
81
|
export { BarChart, LineChart, PieChart, CHART_TOKENS, CHART_LABEL_TYPE } from "./Charts";
|
|
81
82
|
export { Ghost, useGhost, ghostBlockSx } from "./_ghost";
|
|
82
|
-
export { COMPONENT_DOCS, FOUNDATIONS, renderFoundations, renderColourSystem, renderComponentDoc, COLOUR_COLLECTIONS, docsSlug, componentDocsUrl, componentDocsIndexUrl, DOCS_ORIGIN, EXAMPLES, hasExample } from "../docs";
|
|
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";
|
|
@@ -14,20 +14,6 @@ export function docFor(component: any): {
|
|
|
14
14
|
accessibility: any;
|
|
15
15
|
gotchas: any;
|
|
16
16
|
};
|
|
17
|
-
/**
|
|
18
|
-
* Everything written about the component, in reading order — led by ONE live
|
|
19
|
-
* example.
|
|
20
|
-
*
|
|
21
|
-
* The example is here because a page of prose gives no recognition: you cannot
|
|
22
|
-
* tell what a component IS from its prop table. It renders in the theme and
|
|
23
|
-
* surface currently selected, so the picture matches the pickers rather than
|
|
24
|
-
* showing some other configuration. It is the default instance and is not
|
|
25
|
-
* interactive — the Playground tab is where you change things.
|
|
26
|
-
*
|
|
27
|
-
* Components that need state or a portal to be shown honestly (Modal, Drawer,
|
|
28
|
-
* Snackbar) have no example, and simply lead with the summary instead of
|
|
29
|
-
* rendering a half-working one.
|
|
30
|
-
*/
|
|
31
17
|
export function DocSummary({ component, theme, surface }: {
|
|
32
18
|
component: any;
|
|
33
19
|
theme?: any;
|