@atlaskit/heading 1.1.2 → 1.1.3

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/heading
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b6c5779d358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b6c5779d358) - Internal changes only to restrict usage of `Box` from the primitives package.
8
+
3
9
  ## 1.1.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  A heading is a typography component used to display text in different sizes and formats.
4
4
 
5
+ ## Installation
6
+
7
+ ```sh
8
+ yarn add @atlaskit/heading
9
+ ```
10
+
5
11
  ## Usage
6
12
 
7
- `import Heading from '@atlaskit/heading';`
13
+ Detailed docs and example usage can be found [here](https://atlassian.design/components/heading/).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -3,24 +3,47 @@ export declare type HeadingProps = {
3
3
  /**
4
4
  * A `testId` prop is provided for specified elements, which is a unique
5
5
  * string that appears as a data attribute `data-testid` in the rendered code,
6
- * serving as a hook for automated tests
6
+ * serving as a hook for automated tests.
7
7
  */
8
8
  testId?: string;
9
9
  /**
10
- * The text of the heading
10
+ * The text of the heading.
11
11
  */
12
12
  children: ReactNode;
13
13
  /**
14
- * The headling level as defined by by the ADG
14
+ The headling level as defined by the Atlasian Design [typography foundations](/foundations/typography/).
15
+
16
+ The `level` prop affects the actual HTML element rendered in the DOM:
17
+
18
+ ```
19
+ const levelMap = {
20
+ h900: 'h1',
21
+ h800: 'h1',
22
+ h700: 'h2',
23
+ h600: 'h3',
24
+ h500: 'h4',
25
+ h400: 'h5',
26
+ h300: 'h6',
27
+ h200: 'div',
28
+ h100: 'div',
29
+ }
30
+ ```
31
+
32
+ It's important to note that the final DOM may be impacted by the parent heading level context because of inferred accessibility level correction.
33
+ Therefore, it is recommended to check the final DOM to confirm the actual rendered HTML element.
15
34
  */
16
35
  level: 'h900' | 'h800' | 'h700' | 'h600' | 'h500' | 'h400' | 'h300' | 'h200' | 'h100';
36
+ /**
37
+ * Unique identifier for the heading DOM element.
38
+ */
17
39
  id?: string;
18
40
  /**
19
- * Allows the component to be rendered as the specified DOM Element
41
+ * Allows the component to be rendered as the specified DOM element, overriding a default element set by `level` prop.
20
42
  */
21
43
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
22
44
  /**
23
- * Text color of the heading.
45
+ * Text color of the heading. Use `"inverse"` option for a light text color over a dark background.
46
+ * Defaults to `"default"`.
24
47
  */
25
48
  color?: 'inverse' | 'default';
26
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A heading is a typography component used to display text in different sizes and formats.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -8,14 +8,13 @@
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "atlassian": {
11
- "disableProductCI": true,
12
11
  "team": "Design System Team",
13
12
  "releaseModel": "continuous",
14
13
  "website": {
15
14
  "name": "Heading",
16
15
  "category": "Components",
17
16
  "status": {
18
- "type": "alpha"
17
+ "type": "beta"
19
18
  }
20
19
  }
21
20
  },
@@ -30,7 +29,7 @@
30
29
  ".": "./src/index.tsx"
31
30
  },
32
31
  "dependencies": {
33
- "@atlaskit/tokens": "^1.0.0",
32
+ "@atlaskit/tokens": "^1.2.0",
34
33
  "@babel/runtime": "^7.0.0",
35
34
  "@emotion/react": "^11.7.1"
36
35
  },
@@ -42,7 +41,10 @@
42
41
  "@atlaskit/docs": "*",
43
42
  "@atlaskit/ds-explorations": "*",
44
43
  "@atlaskit/ds-lib": "^2.0.1",
44
+ "@atlaskit/form": "^8.8.0",
45
+ "@atlaskit/primitives": "*",
45
46
  "@atlaskit/ssr": "*",
47
+ "@atlaskit/toggle": "^12.5.0",
46
48
  "@atlaskit/visual-regression": "*",
47
49
  "@atlaskit/webdriver-runner": "*",
48
50
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
@@ -64,8 +66,10 @@
64
66
  ],
65
67
  "ui-components": "lite-mode",
66
68
  "analytics": "analytics-next",
67
- "design-tokens": "spacing",
68
- "theming": "tokens",
69
+ "design-tokens": [
70
+ "color",
71
+ "spacing"
72
+ ],
69
73
  "deprecation": "no-deprecated-imports"
70
74
  }
71
75
  },
@@ -1,13 +0,0 @@
1
- ---
2
- order: 0
3
- ---
4
-
5
- import HeadingDefault from '../../examples/constellation/heading-default';
6
-
7
- ## Basic
8
-
9
- Implements the Atlassian typography set as a component. The typography `level` can be configured to be one of the below types.
10
-
11
- <Example Component={HeadingDefault} packageName="@atlaskit/heading" />
12
-
13
-