@zendeskgarden/react-typography 8.49.2 → 8.50.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.cjs.js +152 -145
- package/dist/index.esm.js +153 -146
- package/dist/typings/elements/Blockquote.d.ts +2 -5
- package/dist/typings/elements/Code.d.ts +2 -7
- package/dist/typings/elements/CodeBlock.d.ts +2 -17
- package/dist/typings/elements/Ellipsis.d.ts +2 -7
- package/dist/typings/elements/LG.d.ts +3 -10
- package/dist/typings/elements/MD.d.ts +3 -10
- package/dist/typings/elements/Paragraph.d.ts +2 -5
- package/dist/typings/elements/SM.d.ts +3 -10
- package/dist/typings/elements/XL.d.ts +3 -8
- package/dist/typings/elements/XXL.d.ts +3 -8
- package/dist/typings/elements/XXXL.d.ts +3 -8
- package/dist/typings/elements/lists/OrderedList.d.ts +2 -7
- package/dist/typings/elements/lists/UnorderedList.d.ts +2 -7
- package/dist/typings/elements/span/Span.d.ts +2 -15
- package/dist/typings/index.d.ts +1 -14
- package/dist/typings/styled/StyledBlockquote.d.ts +2 -5
- package/dist/typings/styled/StyledCode.d.ts +3 -2
- package/dist/typings/styled/StyledCodeBlockLine.d.ts +3 -4
- package/dist/typings/styled/StyledFont.d.ts +7 -1
- package/dist/typings/styled/StyledList.d.ts +3 -2
- package/dist/typings/styled/StyledListItem.d.ts +2 -1
- package/dist/typings/styled/StyledParagraph.d.ts +2 -5
- package/dist/typings/types/index.d.ts +84 -0
- package/dist/typings/utils/useOrderedListContext.d.ts +2 -1
- package/dist/typings/utils/useUnorderedListContext.d.ts +2 -1
- package/package.json +3 -3
|
@@ -4,24 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
export interface ICodeBlockProps extends HTMLAttributes<HTMLPreElement> {
|
|
10
|
-
/** Selects the language used by the [Prism](https://prismjs.com/) tokenizer */
|
|
11
|
-
language?: typeof LANGUAGES[number];
|
|
12
|
-
/** Specifies the font size */
|
|
13
|
-
size?: 'small' | 'medium' | 'large';
|
|
14
|
-
/** Applies light mode styling */
|
|
15
|
-
isLight?: boolean;
|
|
16
|
-
/** Displays line numbers */
|
|
17
|
-
isNumbered?: boolean;
|
|
18
|
-
/** Determines the lines to highlight */
|
|
19
|
-
highlightLines?: number[];
|
|
20
|
-
/** Passes props to the code block container */
|
|
21
|
-
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
22
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ICodeBlockProps } from '../types';
|
|
23
9
|
/**
|
|
24
10
|
* @extends HTMLAttributes<HTMLPreElement>
|
|
25
11
|
*/
|
|
26
12
|
export declare const CodeBlock: React.ForwardRefExoticComponent<ICodeBlockProps & React.RefAttributes<HTMLPreElement>>;
|
|
27
|
-
export {};
|
|
@@ -4,13 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Overrides the auto-generated `title` attribute */
|
|
10
|
-
title?: string;
|
|
11
|
-
/** Updates the element's HTML tag */
|
|
12
|
-
tag?: any;
|
|
13
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IEllipsisProps } from '../types';
|
|
14
9
|
/**
|
|
15
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
11
|
*/
|
|
@@ -4,16 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
/** Renders with monospace font */
|
|
14
|
-
isMonospace?: boolean;
|
|
15
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleMonospaceProps } from '../types';
|
|
16
9
|
/**
|
|
17
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
18
11
|
*/
|
|
19
|
-
export declare const LG: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const LG: React.ForwardRefExoticComponent<ITypescaleMonospaceProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,16 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
/** Renders with monospace font */
|
|
14
|
-
isMonospace?: boolean;
|
|
15
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleMonospaceProps } from '../types';
|
|
16
9
|
/**
|
|
17
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
18
11
|
*/
|
|
19
|
-
export declare const MD: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const MD: React.ForwardRefExoticComponent<ITypescaleMonospaceProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Controls the spacing between sibling paragraphs */
|
|
10
|
-
size?: 'small' | 'medium' | 'large';
|
|
11
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IParagraphProps } from '../types';
|
|
12
9
|
/**
|
|
13
10
|
* @extends HTMLAttributes<HTMLParagraphElement>
|
|
14
11
|
*/
|
|
@@ -4,16 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
/** Renders with monospace font */
|
|
14
|
-
isMonospace?: boolean;
|
|
15
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleMonospaceProps } from '../types';
|
|
16
9
|
/**
|
|
17
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
18
11
|
*/
|
|
19
|
-
export declare const SM: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const SM: React.ForwardRefExoticComponent<ITypescaleMonospaceProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleProps } from '../types';
|
|
14
9
|
/**
|
|
15
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
11
|
*/
|
|
17
|
-
export declare const XL: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const XL: React.ForwardRefExoticComponent<ITypescaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleProps } from '../types';
|
|
14
9
|
/**
|
|
15
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
11
|
*/
|
|
17
|
-
export declare const XXL: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const XXL: React.ForwardRefExoticComponent<ITypescaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
/** Updates the element's HTML tag */
|
|
10
|
-
tag?: any;
|
|
11
|
-
/** Applies bold font style */
|
|
12
|
-
isBold?: boolean;
|
|
13
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ITypescaleProps } from '../types';
|
|
14
9
|
/**
|
|
15
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
11
|
*/
|
|
17
|
-
export declare const XXXL: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const XXXL: React.ForwardRefExoticComponent<ITypescaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { Item } from './OrderedListItem';
|
|
9
|
-
|
|
10
|
-
/** Adjusts the vertical spacing between list items */
|
|
11
|
-
size?: 'small' | 'medium' | 'large';
|
|
12
|
-
/** Sets the marker style */
|
|
13
|
-
type?: 'decimal' | 'decimal-leading-zero' | 'lower-alpha' | 'lower-roman' | 'upper-alpha' | 'upper-roman';
|
|
14
|
-
}
|
|
9
|
+
import { IOrderedListProps } from '../../types';
|
|
15
10
|
/**
|
|
16
11
|
* @extends OlHTMLAttributes<HTMLOListElement>
|
|
17
12
|
*/
|
|
@@ -4,14 +4,9 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { Item } from './UnorderedListItem';
|
|
9
|
-
|
|
10
|
-
/** Adjusts the vertical spacing between list items */
|
|
11
|
-
size?: 'small' | 'medium' | 'large';
|
|
12
|
-
/** Sets the marker style */
|
|
13
|
-
type?: 'circle' | 'disc' | 'square';
|
|
14
|
-
}
|
|
9
|
+
import { IUnorderedListProps } from '../../types';
|
|
15
10
|
/**
|
|
16
11
|
* @extends HTMLAttributes<HTMLUListElement>
|
|
17
12
|
*/
|
|
@@ -4,23 +4,10 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { ISpanProps } from '../../types';
|
|
8
9
|
import { StartIcon } from './StartIcon';
|
|
9
10
|
import { Icon } from './Icon';
|
|
10
|
-
export interface ISpanProps extends HTMLAttributes<HTMLSpanElement> {
|
|
11
|
-
/** Updates the element's HTML tag */
|
|
12
|
-
tag?: any;
|
|
13
|
-
/** Applies bold font style. Font weight is inherited by default. */
|
|
14
|
-
isBold?: boolean;
|
|
15
|
-
/** Renders with monospace font */
|
|
16
|
-
isMonospace?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Applies a font color. Use
|
|
19
|
-
* [PALETTE](/components/palette#palette)
|
|
20
|
-
* colors when possible. Accepts all hex values.
|
|
21
|
-
*/
|
|
22
|
-
hue?: string;
|
|
23
|
-
}
|
|
24
11
|
/**
|
|
25
12
|
* @extends HTMLAttributes<HTMLSpanElement>
|
|
26
13
|
*/
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -18,17 +18,4 @@ export { Paragraph } from './elements/Paragraph';
|
|
|
18
18
|
export { OrderedList } from './elements/lists/OrderedList';
|
|
19
19
|
export { UnorderedList } from './elements/lists/UnorderedList';
|
|
20
20
|
export { Span } from './elements/span/Span';
|
|
21
|
-
export type { ISMProps } from './
|
|
22
|
-
export type { IMDProps } from './elements/MD';
|
|
23
|
-
export type { ILGProps } from './elements/LG';
|
|
24
|
-
export type { IXLProps } from './elements/XL';
|
|
25
|
-
export type { IXXLProps } from './elements/XXL';
|
|
26
|
-
export type { IXXXLProps } from './elements/XXXL';
|
|
27
|
-
export type { IBlockquoteProps } from './elements/Blockquote';
|
|
28
|
-
export type { ICodeProps } from './elements/Code';
|
|
29
|
-
export type { ICodeBlockProps } from './elements/CodeBlock';
|
|
30
|
-
export type { IEllipsisProps } from './elements/Ellipsis';
|
|
31
|
-
export type { IParagraphProps } from './elements/Paragraph';
|
|
32
|
-
export type { IOrderedListProps } from './elements/lists/OrderedList';
|
|
33
|
-
export type { IUnorderedListProps } from './elements/lists/UnorderedList';
|
|
34
|
-
export type { ISpanProps } from './elements/span/Span';
|
|
21
|
+
export type { ITypescaleMonospaceProps as ISMProps, ITypescaleMonospaceProps as IMDProps, ITypescaleMonospaceProps as ILGProps, ITypescaleProps as IXLProps, ITypescaleProps as IXXLProps, ITypescaleProps as IXXXLProps, IBlockquoteProps, ICodeProps, ICodeBlockProps, IEllipsisProps, IParagraphProps, IOrderedListProps, IUnorderedListProps, ISpanProps } from './types';
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
size?: 'sm' | 'md' | 'lg';
|
|
9
|
-
}
|
|
7
|
+
import { IBlockquoteProps } from '../types';
|
|
10
8
|
export declare const StyledBlockquote: import("styled-components").StyledComponent<"blockquote", import("styled-components").DefaultTheme, {
|
|
11
9
|
'data-garden-id': string;
|
|
12
10
|
'data-garden-version': string;
|
|
13
|
-
} &
|
|
14
|
-
export {};
|
|
11
|
+
} & IBlockquoteProps, "data-garden-id" | "data-garden-version">;
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
import { IStyledFontProps } from './StyledFont';
|
|
9
|
-
|
|
9
|
+
import { ICodeProps } from '../types';
|
|
10
|
+
interface IStyledCodeProps extends Omit<IStyledFontProps, 'size'> {
|
|
10
11
|
hue?: string;
|
|
11
|
-
size?: '
|
|
12
|
+
size?: ICodeProps['size'];
|
|
12
13
|
}
|
|
13
14
|
export declare const StyledCode: import("styled-components").StyledComponent<"code", DefaultTheme, {
|
|
14
15
|
'data-garden-id': string;
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
import { Language } from 'prism-react-renderer';
|
|
9
|
-
|
|
10
|
-
export declare type SIZE = 'sm' | 'md' | 'lg';
|
|
9
|
+
import { Diff, Size } from '../types';
|
|
11
10
|
export interface IStyledCodeBlockLineProps {
|
|
12
11
|
language?: Language;
|
|
13
12
|
isHighlighted?: boolean;
|
|
14
13
|
isLight?: boolean;
|
|
15
14
|
isNumbered?: boolean;
|
|
16
|
-
diff?:
|
|
17
|
-
size?:
|
|
15
|
+
diff?: Diff;
|
|
16
|
+
size?: Size;
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* 1. Fix line display for mobile.
|
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
declare const TYPOGRAPHY_SIZE: readonly ["small", "medium", "large", "extralarge", "2xlarge", "3xlarge"];
|
|
9
|
+
declare const FONT_SIZE: readonly ["inherit", "small", "medium", "large", "extralarge", "2xlarge", "3xlarge"];
|
|
10
|
+
declare type TypographySize = typeof TYPOGRAPHY_SIZE[number];
|
|
11
|
+
declare type ThemeSize = keyof DefaultTheme['lineHeights'];
|
|
12
|
+
export declare const THEME_SIZES: Record<TypographySize, ThemeSize>;
|
|
8
13
|
export interface IStyledFontProps {
|
|
9
14
|
isBold?: boolean;
|
|
10
15
|
isMonospace?: boolean;
|
|
11
|
-
size?:
|
|
16
|
+
size?: typeof FONT_SIZE[number];
|
|
12
17
|
hue?: string;
|
|
13
18
|
}
|
|
14
19
|
export declare const StyledFont: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
15
20
|
'data-garden-id': string;
|
|
16
21
|
'data-garden-version': string;
|
|
17
22
|
} & IStyledFontProps, "data-garden-id" | "data-garden-version">;
|
|
23
|
+
export {};
|
|
@@ -5,15 +5,16 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
import { IOrderedListProps, IUnorderedListProps } from '../types';
|
|
8
9
|
interface IStyledListProps {
|
|
9
|
-
listType?: '
|
|
10
|
+
listType?: IOrderedListProps['type'];
|
|
10
11
|
}
|
|
11
12
|
export declare const StyledOrderedList: import("styled-components").StyledComponent<"ol", DefaultTheme, {
|
|
12
13
|
'data-garden-id': string;
|
|
13
14
|
'data-garden-version': string;
|
|
14
15
|
} & IStyledListProps, "data-garden-id" | "data-garden-version">;
|
|
15
16
|
interface IStyledUnorderedListProps {
|
|
16
|
-
listType?: '
|
|
17
|
+
listType?: IUnorderedListProps['type'];
|
|
17
18
|
}
|
|
18
19
|
export declare const StyledUnorderedList: import("styled-components").StyledComponent<"ul", DefaultTheme, {
|
|
19
20
|
'data-garden-id': string;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
import { Size } from '../types';
|
|
8
9
|
interface IStyledListItemProps {
|
|
9
|
-
space?:
|
|
10
|
+
space?: Size;
|
|
10
11
|
}
|
|
11
12
|
export declare const StyledOrderedListItem: import("styled-components").StyledComponent<"li", DefaultTheme, {
|
|
12
13
|
'data-garden-id': string;
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
size?: 'sm' | 'md' | 'lg';
|
|
9
|
-
}
|
|
7
|
+
import { IParagraphProps } from '../types';
|
|
10
8
|
export declare const StyledParagraph: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {
|
|
11
9
|
'data-garden-id': string;
|
|
12
10
|
'data-garden-version': string;
|
|
13
|
-
} &
|
|
14
|
-
export {};
|
|
11
|
+
} & IParagraphProps, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { BlockquoteHTMLAttributes, HTMLAttributes, OlHTMLAttributes } from 'react';
|
|
8
|
+
export declare const HUE: readonly ["grey", "red", "green", "yellow"];
|
|
9
|
+
export declare const SIZE: readonly ["small", "medium", "large"];
|
|
10
|
+
export declare const INHERIT_SIZE: readonly ["inherit", "small", "medium", "large"];
|
|
11
|
+
export declare const TYPE_ORDERED_LIST: readonly ["decimal", "decimal-leading-zero", "lower-alpha", "lower-roman", "upper-alpha", "upper-roman"];
|
|
12
|
+
export declare const TYPE_UNORDERED_LIST: readonly ["circle", "disc", "square"];
|
|
13
|
+
export declare const LANGUAGES: readonly ["markup", "bash", "clike", "c", "cpp", "css", "javascript", "jsx", "coffeescript", "actionscript", "css-extr", "diff", "git", "go", "graphql", "handlebars", "json", "less", "makefile", "markdown", "objectivec", "ocaml", "python", "reason", "sass", "scss", "sql", "stylus", "tsx", "typescript", "wasm", "yaml"];
|
|
14
|
+
export declare type Diff = 'hunk' | 'add' | 'delete' | 'change';
|
|
15
|
+
export declare type Size = typeof SIZE[number];
|
|
16
|
+
export interface ITypescaleProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
/** Updates the element's HTML tag */
|
|
18
|
+
tag?: any;
|
|
19
|
+
/** Applies bold font style */
|
|
20
|
+
isBold?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ITypescaleMonospaceProps extends ITypescaleProps {
|
|
23
|
+
/** Renders with monospace font */
|
|
24
|
+
isMonospace?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface IBlockquoteProps extends BlockquoteHTMLAttributes<HTMLElement> {
|
|
27
|
+
/** Controls the spacing between sibling blockquotes and paragraphs */
|
|
28
|
+
size?: Size;
|
|
29
|
+
}
|
|
30
|
+
export interface ICodeProps extends HTMLAttributes<HTMLElement> {
|
|
31
|
+
/** Applies color to the background and the text */
|
|
32
|
+
hue?: typeof HUE[number];
|
|
33
|
+
/** Adjusts the font size. By default font size is inherited from the surrounding text. */
|
|
34
|
+
size?: typeof INHERIT_SIZE[number];
|
|
35
|
+
}
|
|
36
|
+
export interface ICodeBlockProps extends HTMLAttributes<HTMLPreElement> {
|
|
37
|
+
/** Selects the language used by the [Prism](https://prismjs.com/) tokenizer */
|
|
38
|
+
language?: typeof LANGUAGES[number];
|
|
39
|
+
/** Specifies the font size */
|
|
40
|
+
size?: Size;
|
|
41
|
+
/** Applies light mode styling */
|
|
42
|
+
isLight?: boolean;
|
|
43
|
+
/** Displays line numbers */
|
|
44
|
+
isNumbered?: boolean;
|
|
45
|
+
/** Determines the lines to highlight */
|
|
46
|
+
highlightLines?: number[];
|
|
47
|
+
/** Passes props to the code block container */
|
|
48
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
49
|
+
}
|
|
50
|
+
export interface IEllipsisProps extends HTMLAttributes<HTMLDivElement> {
|
|
51
|
+
/** Overrides the auto-generated `title` attribute */
|
|
52
|
+
title?: string;
|
|
53
|
+
/** Updates the element's HTML tag */
|
|
54
|
+
tag?: any;
|
|
55
|
+
}
|
|
56
|
+
export interface IParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
57
|
+
/** Controls the spacing between sibling paragraphs */
|
|
58
|
+
size?: Size;
|
|
59
|
+
}
|
|
60
|
+
export interface IOrderedListProps extends Omit<OlHTMLAttributes<HTMLOListElement>, 'type'> {
|
|
61
|
+
/** Adjusts the vertical spacing between list items */
|
|
62
|
+
size?: Size;
|
|
63
|
+
/** Sets the marker style */
|
|
64
|
+
type?: typeof TYPE_ORDERED_LIST[number];
|
|
65
|
+
}
|
|
66
|
+
export interface IUnorderedListProps extends HTMLAttributes<HTMLUListElement> {
|
|
67
|
+
/** Adjusts the vertical spacing between list items */
|
|
68
|
+
size?: Size;
|
|
69
|
+
/** Sets the marker style */
|
|
70
|
+
type?: typeof TYPE_UNORDERED_LIST[number];
|
|
71
|
+
}
|
|
72
|
+
export interface ISpanProps extends HTMLAttributes<HTMLSpanElement> {
|
|
73
|
+
/** Updates the element's HTML tag */
|
|
74
|
+
tag?: any;
|
|
75
|
+
/** Applies bold font style. Font weight is inherited by default. */
|
|
76
|
+
isBold?: boolean;
|
|
77
|
+
/** Renders with monospace font */
|
|
78
|
+
isMonospace?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Applies a font color. Use [PALETTE](/components/palette#palette) colors
|
|
81
|
+
* when possible. Accepts all hex values.
|
|
82
|
+
*/
|
|
83
|
+
hue?: string;
|
|
84
|
+
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
+
import { Size } from '../types';
|
|
8
9
|
interface IOrderedListContext {
|
|
9
|
-
size:
|
|
10
|
+
size: Size;
|
|
10
11
|
}
|
|
11
12
|
export declare const OrderedListContext: import("react").Context<IOrderedListContext | undefined>;
|
|
12
13
|
/**
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
+
import { Size } from '../types';
|
|
8
9
|
interface IUnorderedListContext {
|
|
9
|
-
size:
|
|
10
|
+
size: Size;
|
|
10
11
|
}
|
|
11
12
|
export declare const UnorderedListContext: import("react").Context<IUnorderedListContext | undefined>;
|
|
12
13
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-typography",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.50.0",
|
|
4
4
|
"description": "Components relating to typography in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^8.
|
|
36
|
+
"@zendeskgarden/react-theming": "^8.50.0"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"components",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"zendeskgarden:src": "src/index.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d5b66e1980faf0fd40818c9e74801dfa1c3550a0"
|
|
49
49
|
}
|