@atlaskit/heading 5.3.0 → 5.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/heading
2
2
 
3
+ ## 5.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`8fdea38bd31f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8fdea38bd31f8) -
8
+ Autofix: add explicit package exports (barrel removal)
9
+
10
+ ## 5.3.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`02483200273ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/02483200273ec) -
15
+ Enrol all Design System UI packages into the React Compiler with platform gating via
16
+ isReactCompilerActivePlatform.
17
+ - Updated dependencies
18
+
3
19
  ## 5.3.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _headingContext.default;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, "useHeading", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _headingContext.useHeading;
17
+ }
18
+ });
19
+ var _headingContext = _interopRequireWildcard(require("../heading-context"));
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _heading.default;
11
+ }
12
+ });
13
+ var _heading = _interopRequireDefault(require("../heading"));
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -0,0 +1,2 @@
1
+ export { useHeading } from '../heading-context';
2
+ export { default } from '../heading-context';
@@ -0,0 +1 @@
1
+ export { default } from '../heading';
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  /* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors */
3
3
  import "./heading.compiled.css";
4
4
  import * as React from 'react';
@@ -0,0 +1,2 @@
1
+ export { useHeading } from '../heading-context';
2
+ export { default } from '../heading-context';
@@ -0,0 +1 @@
1
+ export { default } from '../heading';
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v0.38.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v0.39.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./heading.compiled.css";
4
4
  import * as React from 'react';
@@ -0,0 +1,2 @@
1
+ export { useHeading } from '../heading-context';
2
+ export { default } from '../heading-context';
@@ -0,0 +1,2 @@
1
+ export type { HeadingProps } from '../heading';
2
+ export { default } from '../heading';
@@ -4,10 +4,7 @@ type HeadingElement = `h${1 | 2 | 3 | 4 | 5 | 6}` | 'div';
4
4
  /**
5
5
  * Infers the correct heading markup based on the current heading level context.
6
6
  */
7
- export declare const useHeading: (fallback: HeadingElement) => readonly [
8
- HeadingLevel,
9
- HeadingElement
10
- ];
7
+ export declare const useHeading: (fallback: HeadingElement) => readonly [HeadingLevel, HeadingElement];
11
8
  interface HeadingLevelContextProps {
12
9
  /**
13
10
  * Optional - only apply this value if the intent is to reset the heading context outside the normal content flow, for example inside a `section`.
@@ -34,5 +31,5 @@ interface HeadingLevelContextProps {
34
31
  * </HeadingContext>
35
32
  * ```
36
33
  */
37
- declare const HeadingLevelContextProvider: ({ children, value }: HeadingLevelContextProps) => React.JSX.Element;
34
+ declare const HeadingLevelContextProvider: ({ children, value, }: HeadingLevelContextProps) => React.JSX.Element;
38
35
  export default HeadingLevelContextProvider;
@@ -0,0 +1,2 @@
1
+ export { useHeading } from '../heading-context';
2
+ export { default } from '../heading-context';
@@ -0,0 +1,2 @@
1
+ export type { HeadingProps } from '../heading';
2
+ export { default } from '../heading';
@@ -34,5 +34,5 @@ interface HeadingLevelContextProps {
34
34
  * </HeadingContext>
35
35
  * ```
36
36
  */
37
- declare const HeadingLevelContextProvider: ({ children, value }: HeadingLevelContextProps) => React.JSX.Element;
37
+ declare const HeadingLevelContextProvider: ({ children, value, }: HeadingLevelContextProps) => React.JSX.Element;
38
38
  export default HeadingLevelContextProvider;
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/heading/heading",
3
+ "main": "../dist/cjs/entry-points/heading.js",
4
+ "module": "../dist/esm/entry-points/heading.js",
5
+ "module:es2019": "../dist/es2019/entry-points/heading.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/heading.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/heading.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/heading/heading-context",
3
+ "main": "../dist/cjs/entry-points/heading-context.js",
4
+ "module": "../dist/esm/entry-points/heading-context.js",
5
+ "module:es2019": "../dist/es2019/entry-points/heading-context.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/heading-context.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/entry-points/heading-context.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,94 @@
1
+ import path from 'path';
2
+
3
+ import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
4
+
5
+ const documentation: ComponentStructuredContentSource[] = [
6
+ {
7
+ name: 'Heading',
8
+ description:
9
+ 'A component for creating accessible, consistently styled headings with proper hierarchy. Headings are sized to contrast with content, increase visual hierarchy, and help readers easily understand the structure of content.',
10
+ status: 'general-availability',
11
+ import: {
12
+ name: 'Heading',
13
+ package: '@atlaskit/heading',
14
+ type: 'default',
15
+ packagePath: path.resolve(__dirname),
16
+ packageJson: require('./package.json'),
17
+ },
18
+ usageGuidelines: [
19
+ 'Use the `HeadingContextProvider` offering to maintain heading levels in complex layouts',
20
+ 'Maintain proper heading hierarchy',
21
+ 'Keep headings concise and meaningful',
22
+ 'Use sentence case for most headings',
23
+ 'Use the `color` prop for inverse text on dark backgrounds',
24
+ 'Do NOT use any inline styles, you must use the `size` (required) and `color` (optional) props available',
25
+ ],
26
+ contentGuidelines: [
27
+ 'Use clear, descriptive heading text',
28
+ 'Maintain proper heading hierarchy',
29
+ 'Keep headings concise and meaningful',
30
+ 'Use sentence case for most headings',
31
+ 'Make headings descriptive of the content that follows',
32
+ ],
33
+ accessibilityGuidelines: [
34
+ 'Maintain proper heading hierarchy (h1 to h6)',
35
+ 'Use only one h1 per page for main page titles',
36
+ 'Ensure minimum 4.5:1 color contrast for text readability',
37
+ 'Use clear, descriptive heading text that describes the content below',
38
+ ],
39
+ examples: [
40
+ {
41
+ name: 'Basic',
42
+ description: 'Basic example',
43
+ source: path.resolve(__dirname, './examples/ai/basic.tsx'),
44
+ },
45
+ ],
46
+ keywords: [
47
+ 'heading',
48
+ 'title',
49
+ 'header',
50
+ 'typography',
51
+ 'text',
52
+ 'h1',
53
+ 'h2',
54
+ 'h3',
55
+ 'h4',
56
+ 'h5',
57
+ 'h6',
58
+ ],
59
+ categories: ['primitive', 'data-display'],
60
+ },
61
+ {
62
+ name: 'HeadingContextProvider',
63
+ description:
64
+ 'A context provider that allows you to configure the default HTML heading level for all headings within its subtree. Useful for maintaining proper heading hierarchy in complex layouts.',
65
+ status: 'general-availability',
66
+ import: {
67
+ name: 'HeadingContextProvider',
68
+ package: '@atlaskit/heading',
69
+ type: 'named',
70
+ packagePath: path.resolve(__dirname),
71
+ packageJson: require('./package.json'),
72
+ },
73
+ usageGuidelines: [
74
+ 'Wrap sections that need different heading hierarchy',
75
+ 'Use for complex layouts where heading levels need adjustment',
76
+ ],
77
+ contentGuidelines: [
78
+ 'Ensure proper heading hierarchy is maintained',
79
+ 'Use clear, descriptive heading text',
80
+ 'Keep headings concise and meaningful',
81
+ ],
82
+ examples: [
83
+ {
84
+ name: 'Heading Context Provider',
85
+ description: 'Heading Context Provider example',
86
+ source: path.resolve(__dirname, './examples/ai/heading-context-provider.tsx'),
87
+ },
88
+ ],
89
+ keywords: ['heading', 'context', 'provider', 'hierarchy', 'accessibility'],
90
+ categories: ['primitive', 'data-display'],
91
+ },
92
+ ];
93
+
94
+ export default documentation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/heading",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "A heading is a typography component used to display text in different sizes and formats.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -17,6 +17,13 @@
17
17
  ],
18
18
  "atlaskit:src": "src/index.tsx",
19
19
  "atlassian": {
20
+ "react-compiler": {
21
+ "enabled": true,
22
+ "gating": {
23
+ "source": "@atlassian/react-compiler-gating",
24
+ "importSpecifierName": "isReactCompilerActivePlatform"
25
+ }
26
+ },
20
27
  "team": "Design System Team",
21
28
  "website": {
22
29
  "name": "Heading",
@@ -24,10 +31,10 @@
24
31
  }
25
32
  },
26
33
  "dependencies": {
27
- "@atlaskit/primitives": "^18.0.0",
28
- "@atlaskit/tokens": "^11.0.0",
34
+ "@atlaskit/primitives": "^18.1.0",
35
+ "@atlaskit/tokens": "^11.4.0",
29
36
  "@babel/runtime": "^7.0.0",
30
- "@compiled/react": "^0.18.6"
37
+ "@compiled/react": "^0.20.0"
31
38
  },
32
39
  "peerDependencies": {
33
40
  "react": "^18.2.0"
@@ -37,10 +44,12 @@
37
44
  "@af/formatting": "workspace:^",
38
45
  "@af/integration-testing": "workspace:^",
39
46
  "@af/visual-regression": "workspace:^",
40
- "@atlaskit/button": "^23.9.0",
47
+ "@atlaskit/button": "^23.11.0",
41
48
  "@atlaskit/css": "^0.19.0",
42
49
  "@atlassian/codegen": "^0.1.0",
50
+ "@atlassian/react-compiler-gating": "workspace:^",
43
51
  "@atlassian/ssr-tests": "workspace:^",
52
+ "@atlassian/structured-docs-types": "workspace:^",
44
53
  "@testing-library/react": "^16.3.0",
45
54
  "react-dom": "^18.2.0",
46
55
  "ts-node": "^10.9.1"