@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +96 -83
  2. package/constellation/bleed/code.mdx +1 -1
  3. package/constellation/box/code.mdx +1 -1
  4. package/constellation/box/examples.mdx +5 -1
  5. package/constellation/box/usage.mdx +3 -0
  6. package/constellation/flex/code.mdx +1 -1
  7. package/constellation/flex/examples.mdx +5 -3
  8. package/constellation/grid/code.mdx +1 -1
  9. package/constellation/grid/examples.mdx +4 -3
  10. package/constellation/inline/code.mdx +1 -1
  11. package/constellation/inline/examples.mdx +27 -10
  12. package/constellation/inline/usage.mdx +2 -0
  13. package/constellation/overview/index.mdx +8 -1
  14. package/constellation/responsive/01-show/code.mdx +1 -1
  15. package/constellation/responsive/01-show/examples.mdx +8 -3
  16. package/constellation/responsive/02-hide/code.mdx +1 -1
  17. package/constellation/responsive/02-hide/examples.mdx +8 -2
  18. package/constellation/responsive/03-breakpoints/examples.mdx +1 -1
  19. package/constellation/responsive/examples.mdx +9 -6
  20. package/constellation/stack/code.mdx +1 -1
  21. package/constellation/stack/examples.mdx +10 -4
  22. package/constellation/stack/usage.mdx +3 -0
  23. package/constellation/xcss/examples.mdx +0 -1
  24. package/constellation/xcss/migration.mdx +4 -6
  25. package/constellation/xcss/usage.mdx +20 -16
  26. package/dist/cjs/xcss/style-maps.partial.js +4 -3
  27. package/dist/es2019/xcss/style-maps.partial.js +4 -3
  28. package/dist/esm/xcss/style-maps.partial.js +4 -3
  29. package/dist/types/xcss/style-maps.partial.d.ts +3 -2
  30. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +3 -2
  31. package/package.json +3 -14
  32. package/report.api.md +1 -0
  33. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +1 -0
  34. package/scripts/typography-codegen-template.tsx +1 -1
  35. package/tmp/api-report-tmp.d.ts +1 -0
  36. package/constellation/heading/code.mdx +0 -19
  37. package/constellation/heading/examples.mdx +0 -28
  38. package/constellation/heading/usage.mdx +0 -21
  39. package/dist/cjs/components/heading-context.js +0 -44
  40. package/dist/cjs/components/heading.js +0 -95
  41. package/dist/es2019/components/heading-context.js +0 -35
  42. package/dist/es2019/components/heading.js +0 -87
  43. package/dist/esm/components/heading-context.js +0 -34
  44. package/dist/esm/components/heading.js +0 -87
  45. package/dist/types/components/heading-context.d.ts +0 -31
  46. package/dist/types/components/heading.d.ts +0 -45
  47. package/dist/types-ts4.5/components/heading-context.d.ts +0 -31
  48. package/dist/types-ts4.5/components/heading.d.ts +0 -45
  49. package/extract-react-types/heading-props.tsx +0 -3
  50. package/heading/package.json +0 -15
  51. 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;
@@ -1,3 +0,0 @@
1
- import { HeadingProps } from '../src/components/heading';
2
-
3
- export default function Heading(_: HeadingProps) {}
@@ -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
- }