@atlaskit/primitives 1.6.0 → 1.6.2
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/CHANGELOG.md +96 -83
- package/constellation/bleed/code.mdx +1 -1
- package/constellation/box/code.mdx +1 -1
- package/constellation/box/examples.mdx +5 -1
- package/constellation/box/usage.mdx +3 -0
- package/constellation/flex/code.mdx +1 -1
- package/constellation/flex/examples.mdx +5 -3
- package/constellation/grid/code.mdx +1 -1
- package/constellation/grid/examples.mdx +4 -3
- package/constellation/inline/code.mdx +1 -1
- package/constellation/inline/examples.mdx +27 -10
- package/constellation/inline/usage.mdx +2 -0
- package/constellation/overview/index.mdx +8 -1
- package/constellation/responsive/01-show/code.mdx +1 -1
- package/constellation/responsive/01-show/examples.mdx +8 -3
- package/constellation/responsive/02-hide/code.mdx +1 -1
- package/constellation/responsive/02-hide/examples.mdx +8 -2
- package/constellation/responsive/03-breakpoints/examples.mdx +1 -1
- package/constellation/responsive/examples.mdx +9 -6
- package/constellation/stack/code.mdx +1 -1
- package/constellation/stack/examples.mdx +10 -4
- package/constellation/stack/usage.mdx +3 -0
- package/constellation/xcss/examples.mdx +0 -1
- package/constellation/xcss/migration.mdx +4 -6
- package/constellation/xcss/usage.mdx +20 -16
- package/dist/cjs/xcss/style-maps.partial.js +4 -3
- package/dist/es2019/xcss/style-maps.partial.js +4 -3
- package/dist/esm/xcss/style-maps.partial.js +4 -3
- package/dist/types/xcss/style-maps.partial.d.ts +3 -2
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +3 -2
- package/package.json +3 -14
- package/report.api.md +1 -0
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +1 -0
- package/scripts/typography-codegen-template.tsx +1 -1
- package/tmp/api-report-tmp.d.ts +1 -0
- package/constellation/heading/code.mdx +0 -19
- package/constellation/heading/examples.mdx +0 -28
- package/constellation/heading/usage.mdx +0 -21
- package/dist/cjs/components/heading-context.js +0 -44
- package/dist/cjs/components/heading.js +0 -95
- package/dist/es2019/components/heading-context.js +0 -35
- package/dist/es2019/components/heading.js +0 -87
- package/dist/esm/components/heading-context.js +0 -34
- package/dist/esm/components/heading.js +0 -87
- package/dist/types/components/heading-context.d.ts +0 -31
- package/dist/types/components/heading.d.ts +0 -45
- package/dist/types-ts4.5/components/heading-context.d.ts +0 -31
- package/dist/types-ts4.5/components/heading.d.ts +0 -45
- package/extract-react-types/heading-props.tsx +0 -3
- package/heading/package.json +0 -15
- package/heading-context/package.json +0 -15
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
type HeadingElement = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
3
|
-
export declare const useHeadingElement: () => HeadingElement;
|
|
4
|
-
export interface HeadingContextProps {
|
|
5
|
-
/**
|
|
6
|
-
* Optional - only apply this value if the intent is to reset the heading context outside the normal content flow, for example inside a `section`.
|
|
7
|
-
*/
|
|
8
|
-
value?: HeadingElement;
|
|
9
|
-
/**
|
|
10
|
-
* Semantic heirarchy of content below the heading context.
|
|
11
|
-
*/
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* __Heading context__
|
|
16
|
-
*
|
|
17
|
-
* The HeadingContext
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```tsx
|
|
21
|
-
* // Will correctly infer the heading level
|
|
22
|
-
* <HeadingContext value={1}>
|
|
23
|
-
* <Heading>H1</Heading>
|
|
24
|
-
* <HeadingContext>
|
|
25
|
-
* <Heading>H2</Heading>
|
|
26
|
-
* </HeadingContext>
|
|
27
|
-
* </HeadingContext>
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
declare const HeadingContextProvider: FC<HeadingContextProps>;
|
|
31
|
-
export default HeadingContextProvider;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import { BasePrimitiveProps } from './types';
|
|
5
|
-
export type TypographyLevel = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
|
|
6
|
-
type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
|
|
7
|
-
export type HeadingProps = {
|
|
8
|
-
/**
|
|
9
|
-
* The heading text for the element.
|
|
10
|
-
*/
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* The HTML element to render.
|
|
14
|
-
*/
|
|
15
|
-
as?: HeadingElement;
|
|
16
|
-
/**
|
|
17
|
-
* The HTML id attribute.
|
|
18
|
-
*/
|
|
19
|
-
id?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The level of the heading element.
|
|
22
|
-
*/
|
|
23
|
-
level: TypographyLevel;
|
|
24
|
-
/**
|
|
25
|
-
* The color of the heading text.
|
|
26
|
-
*/
|
|
27
|
-
color?: 'default' | 'inverse';
|
|
28
|
-
} & Pick<BasePrimitiveProps, 'testId'>;
|
|
29
|
-
/**
|
|
30
|
-
* __Heading__
|
|
31
|
-
*
|
|
32
|
-
* A heading is a typography component used to display text in different sizes and formats.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
*
|
|
36
|
-
* ```jsx
|
|
37
|
-
* import Heading from '@atlaskit/heading';
|
|
38
|
-
*
|
|
39
|
-
* const HeadingXXL = () => (
|
|
40
|
-
* <Heading level="xxl">XXL</Heading>
|
|
41
|
-
* );
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
declare const Heading: ({ children, level, id, testId, as, color, }: HeadingProps) => jsx.JSX.Element;
|
|
45
|
-
export default Heading;
|
package/heading/package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/primitives/heading",
|
|
3
|
-
"main": "../dist/cjs/components/heading.js",
|
|
4
|
-
"module": "../dist/esm/components/heading.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/components/heading.js",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/components/heading.d.ts",
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <4.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/components/heading.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/primitives/heading-context",
|
|
3
|
-
"main": "../dist/cjs/components/heading-context.js",
|
|
4
|
-
"module": "../dist/esm/components/heading-context.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/components/heading-context.js",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/components/heading-context.d.ts",
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <4.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/components/heading-context.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|