@atlaskit/heading
Advanced tools
Comparing version 2.2.0 to 2.3.0
275
CHANGELOG.md
# @atlaskit/heading | ||
## 2.3.0 | ||
### Minor Changes | ||
- [#97580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97580) | ||
[`3e6f291ec2d5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3e6f291ec2d5) - | ||
Color prop to take color tokens when using heading with size prop. | ||
## 2.2.0 | ||
@@ -7,3 +15,5 @@ | ||
- [#91625](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91625) [`d7770083ff25`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d7770083ff25) - Add support for React 18. | ||
- [#91625](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91625) | ||
[`d7770083ff25`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d7770083ff25) - | ||
Add support for React 18. | ||
@@ -14,3 +24,5 @@ ## 2.1.2 | ||
- [#83130](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83130) [`4efd62cdc533`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4efd62cdc533) - SHPLVIII-481: Assign name to default export components to fix quick-fix imports | ||
- [#83130](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83130) | ||
[`4efd62cdc533`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4efd62cdc533) - | ||
SHPLVIII-481: Assign name to default export components to fix quick-fix imports | ||
@@ -21,3 +33,5 @@ ## 2.1.1 | ||
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2` | ||
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) | ||
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - | ||
Upgrade Typescript from `4.9.5` to `5.4.2` | ||
@@ -28,7 +42,9 @@ ## 2.1.0 | ||
- [#78900](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78900) [`2e05dc3106e3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e05dc3106e3) - Run codegen for Heading font family changes. | ||
- [#78900](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78900) | ||
[`2e05dc3106e3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2e05dc3106e3) - | ||
Run codegen for Heading font family changes. | ||
### Patch Changes | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -39,3 +55,5 @@ ## 2.0.1 | ||
- [#80571](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80571) [`c193ae1d1163`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c193ae1d1163) - Fix heading typography styles to for apple OS edge cases. | ||
- [#80571](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80571) | ||
[`c193ae1d1163`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c193ae1d1163) - | ||
Fix heading typography styles to for apple OS edge cases. | ||
@@ -46,3 +64,5 @@ ## 2.0.0 | ||
- [#81744](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81744) [`bc7085853ea2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc7085853ea2) - Renamed `variant` prop to `size`. The prop values remain unchanged. | ||
- [#81744](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81744) | ||
[`bc7085853ea2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc7085853ea2) - | ||
Renamed `variant` prop to `size`. The prop values remain unchanged. | ||
@@ -53,3 +73,5 @@ ## 1.8.1 | ||
- [#81644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81644) [`8ab7a816dca7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8ab7a816dca7) - Revert input border change from the previous version | ||
- [#81644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81644) | ||
[`8ab7a816dca7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8ab7a816dca7) - | ||
Revert input border change from the previous version | ||
@@ -60,3 +82,5 @@ ## 1.8.0 | ||
- [#80528](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80528) [`8877e9b57d55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8877e9b57d55) - Added `size` prop which will replace `variant` prop in the next major version. | ||
- [#80528](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80528) | ||
[`8877e9b57d55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8877e9b57d55) - | ||
Added `size` prop which will replace `variant` prop in the next major version. | ||
@@ -67,4 +91,6 @@ ## 1.7.1 | ||
- [#80805](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80805) [`427c2dd9e0d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/427c2dd9e0d6) - Update input border color token and width to meet 3:1 color contrast | ||
- Updated dependencies | ||
- [#80805](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80805) | ||
[`427c2dd9e0d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/427c2dd9e0d6) - | ||
Update input border color token and width to meet 3:1 color contrast | ||
- Updated dependencies | ||
@@ -75,7 +101,9 @@ ## 1.7.0 | ||
- [#79770](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79770) [`32e4d951a5ae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32e4d951a5ae) - Run the codegen and update heading.partial.tsx | ||
- [#79770](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79770) | ||
[`32e4d951a5ae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32e4d951a5ae) - | ||
Run the codegen and update heading.partial.tsx | ||
### Patch Changes | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -86,3 +114,6 @@ ## 1.6.0 | ||
- [#68604](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68604) [`fdf7f6635426`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fdf7f6635426) - Modified mapping of `variant` to the HTML element that gets rendered. Previously `xlarge` would render a `h2`, `large` would render a `h3` etc... Now `xlarge` renders a `h1` and so on... | ||
- [#68604](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68604) | ||
[`fdf7f6635426`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fdf7f6635426) - | ||
Modified mapping of `variant` to the HTML element that gets rendered. Previously `xlarge` would | ||
render a `h2`, `large` would render a `h3` etc... Now `xlarge` renders a `h1` and so on... | ||
@@ -93,3 +124,6 @@ ## 1.5.1 | ||
- [#70023](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70023) [`e2d35320717b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e2d35320717b) - Fix types to set either level or variant to be required props to prevent exceptions being thrown. | ||
- [#70023](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70023) | ||
[`e2d35320717b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e2d35320717b) - | ||
Fix types to set either level or variant to be required props to prevent exceptions being | ||
thrown. | ||
@@ -100,7 +134,10 @@ ## 1.5.0 | ||
- [#67463](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67463) [`caac5b953575`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/caac5b953575) - Fixed an issue where typography tokens referenced font family tokens that may not exist on a page, causing fallbacks to break. | ||
- [#67463](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67463) | ||
[`caac5b953575`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/caac5b953575) - | ||
Fixed an issue where typography tokens referenced font family tokens that may not exist on a | ||
page, causing fallbacks to break. | ||
### Patch Changes | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -111,4 +148,6 @@ ## 1.4.4 | ||
- [#63526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63526) [`cae958047771`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cae958047771) - Internal change to how typography tokens are imported. There is no expected behaviour change. | ||
- Updated dependencies | ||
- [#63526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63526) | ||
[`cae958047771`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cae958047771) - | ||
Internal change to how typography tokens are imported. There is no expected behaviour change. | ||
- Updated dependencies | ||
@@ -119,3 +158,8 @@ ## 1.4.3 | ||
- [#41226](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41226) [`fc7aba3cbae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fc7aba3cbae) - [ux] Further fixes related to heading getting into possible invalid state. Heading will now always produce valid markup / aria-attributes for any configuration. Previously if there was no `HeadingContext` in the tree the heading would not produce accessibly correct markup in some cases. This is now resolved. | ||
- [#41226](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41226) | ||
[`fc7aba3cbae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fc7aba3cbae) - [ux] | ||
Further fixes related to heading getting into possible invalid state. Heading will now always | ||
produce valid markup / aria-attributes for any configuration. Previously if there was no | ||
`HeadingContext` in the tree the heading would not produce accessibly correct markup in some | ||
cases. This is now resolved. | ||
@@ -126,3 +170,5 @@ ## 1.4.2 | ||
- [#41124](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41124) [`40cd7f0c882`](https://bitbucket.org/atlassian/atlassian-frontend/commits/40cd7f0c882) - Fix to prevent heading getting into possible invalid state. | ||
- [#41124](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41124) | ||
[`40cd7f0c882`](https://bitbucket.org/atlassian/atlassian-frontend/commits/40cd7f0c882) - Fix to | ||
prevent heading getting into possible invalid state. | ||
@@ -133,4 +179,9 @@ ## 1.4.1 | ||
- [#41032](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41032) [`8d9dad6b977`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d9dad6b977) - Heading will apply an aria level if rendered as a div. This is an accessibility fix for an incomplete feature shipped in the previous minor version. | ||
- [#40299](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40299) [`b1882fdd842`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1882fdd842) - Change typography token naming to be more verbose. | ||
- [#41032](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41032) | ||
[`8d9dad6b977`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d9dad6b977) - | ||
Heading will apply an aria level if rendered as a div. This is an accessibility fix for an | ||
incomplete feature shipped in the previous minor version. | ||
- [#40299](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40299) | ||
[`b1882fdd842`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1882fdd842) - Change | ||
typography token naming to be more verbose. | ||
@@ -141,3 +192,6 @@ ## 1.4.0 | ||
- [#40254](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40254) [`9cc7e23c65b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9cc7e23c65b) - [ux] Adds additional heading types via the `variant` prop. This prop has been added to aid deprecation of the previous `level` prop. The `level` prop will be removed in a future release. | ||
- [#40254](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40254) | ||
[`9cc7e23c65b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9cc7e23c65b) - [ux] | ||
Adds additional heading types via the `variant` prop. This prop has been added to aid | ||
deprecation of the previous `level` prop. The `level` prop will be removed in a future release. | ||
@@ -148,3 +202,5 @@ ## 1.3.8 | ||
- [#40040](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40040) [`ff79902b24c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff79902b24c) - This package is now onboarded onto the product push model. | ||
- [#40040](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40040) | ||
[`ff79902b24c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff79902b24c) - This | ||
package is now onboarded onto the product push model. | ||
@@ -155,3 +211,6 @@ ## 1.3.7 | ||
- [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing. | ||
- [#36754](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/36754) | ||
[`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use | ||
`@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility | ||
testing. | ||
@@ -162,3 +221,5 @@ ## 1.3.6 | ||
- [#35337](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35337) [`529814693a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/529814693a1) - Pin version of @atlaskit/primitives so it resolves to correct version | ||
- [#35337](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35337) | ||
[`529814693a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/529814693a1) - Pin | ||
version of @atlaskit/primitives so it resolves to correct version | ||
@@ -169,3 +230,5 @@ ## 1.3.5 | ||
- [#33833](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33833) [`b8b41649492`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b8b41649492) - Update how certain background colors are referenced by name. Internal changes only. | ||
- [#33833](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33833) | ||
[`b8b41649492`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b8b41649492) - Update | ||
how certain background colors are referenced by name. Internal changes only. | ||
@@ -176,3 +239,5 @@ ## 1.3.4 | ||
- [#34922](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34922) [`779727e307a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/779727e307a) - Internal change only. Replace all instances of Box with stable @atlaskit/primitives version. | ||
- [#34922](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34922) | ||
[`779727e307a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/779727e307a) - | ||
Internal change only. Replace all instances of Box with stable @atlaskit/primitives version. | ||
@@ -183,3 +248,5 @@ ## 1.3.3 | ||
- [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) [`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - Removing unused dependencies and dev dependencies | ||
- [#34443](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34443) | ||
[`61cb5313358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/61cb5313358) - | ||
Removing unused dependencies and dev dependencies | ||
@@ -190,3 +257,5 @@ ## 1.3.2 | ||
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8 | ||
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) | ||
[`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure | ||
legacy types are published for TS 4.5-4.8 | ||
@@ -197,3 +266,5 @@ ## 1.3.1 | ||
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5` | ||
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) | ||
[`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - | ||
Upgrade Typescript from `4.5.5` to `4.9.5` | ||
@@ -204,7 +275,9 @@ ## 1.3.0 | ||
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump | ||
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) | ||
[`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip | ||
minor dependency bump | ||
### Patch Changes | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -215,3 +288,5 @@ ## 1.2.1 | ||
- [#32294](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32294) [`e0460d5d989`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e0460d5d989) - Usages of `process` are now guarded by a `typeof` check. | ||
- [#32294](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32294) | ||
[`e0460d5d989`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e0460d5d989) - Usages | ||
of `process` are now guarded by a `typeof` check. | ||
@@ -222,3 +297,5 @@ ## 1.2.0 | ||
- [#31206](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31206) [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18. | ||
- [#31206](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31206) | ||
[`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - | ||
Upgrades component types to support React 18. | ||
@@ -229,3 +306,6 @@ ## 1.1.4 | ||
- [#31242](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31242) [`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`. | ||
- [#31242](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31242) | ||
[`cfe48bb7ece`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cfe48bb7ece) - | ||
Internal change only. Replace usages of Inline/Stack with stable version from | ||
`@atlaskit/primitives`. | ||
@@ -236,3 +316,5 @@ ## 1.1.3 | ||
- [#31185](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31185) [`b6c5779d358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b6c5779d358) - Internal changes only to restrict usage of `Box` from the primitives package. | ||
- [#31185](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31185) | ||
[`b6c5779d358`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b6c5779d358) - | ||
Internal changes only to restrict usage of `Box` from the primitives package. | ||
@@ -243,3 +325,3 @@ ## 1.1.2 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -250,3 +332,5 @@ ## 1.1.1 | ||
- [#29390](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29390) [`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - Internal change to update token references. There is no expected behaviour or visual change. | ||
- [#29390](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29390) | ||
[`18aeca8c199`](https://bitbucket.org/atlassian/atlassian-frontend/commits/18aeca8c199) - | ||
Internal change to update token references. There is no expected behaviour or visual change. | ||
@@ -257,3 +341,5 @@ ## 1.1.0 | ||
- [#28493](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28493) [`fce52a022f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fce52a022f5) - Adds typography tokens to @atlaskit/heading. | ||
- [#28493](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28493) | ||
[`fce52a022f5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fce52a022f5) - Adds | ||
typography tokens to @atlaskit/heading. | ||
@@ -264,3 +350,3 @@ ## 1.0.4 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -271,3 +357,3 @@ ## 1.0.3 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -278,3 +364,5 @@ ## 1.0.2 | ||
- [#27341](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27341) [`95fdae34c94`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95fdae34c94) - Revert experimental change to `@compiled/react` from `@emotion/react`. | ||
- [#27341](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27341) | ||
[`95fdae34c94`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95fdae34c94) - Revert | ||
experimental change to `@compiled/react` from `@emotion/react`. | ||
@@ -285,3 +373,3 @@ ## 1.0.1 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -292,8 +380,12 @@ ## 1.0.0 | ||
- [#27238](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27238) [`7d92ed50264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d92ed50264) - [ux] This package is still considered to be in an experimental state and is discouraged for use in production. The major is to simplify consumption and versioning in product. | ||
- [#27238](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/27238) | ||
[`7d92ed50264`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d92ed50264) - [ux] | ||
This package is still considered to be in an experimental state and is discouraged for use in | ||
production. The major is to simplify consumption and versioning in product. | ||
Other changes: | ||
Other changes: | ||
- Introduction of a `HeadingContext` provider to aid with creating the right semantic structure for headings. | ||
- Migrated internals to use `@compiled/react` from `@emotion/react`. | ||
- Introduction of a `HeadingContext` provider to aid with creating the right semantic | ||
structure for headings. | ||
- Migrated internals to use `@compiled/react` from `@emotion/react`. | ||
@@ -304,3 +396,5 @@ ## 0.1.18 | ||
- [#26488](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26488) [`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - Internal changes to apply spacing tokens. This should be a no-op change. | ||
- [#26488](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26488) | ||
[`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - | ||
Internal changes to apply spacing tokens. This should be a no-op change. | ||
@@ -311,3 +405,5 @@ ## 0.1.17 | ||
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5` | ||
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874) | ||
[`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - | ||
Upgrade Typescript from `4.3.5` to `4.5.5` | ||
@@ -318,4 +414,6 @@ ## 0.1.16 | ||
- [#24004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24004) [`30b11aab9fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/30b11aab9fb) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change. | ||
- Updated dependencies | ||
- [#24004](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24004) | ||
[`30b11aab9fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/30b11aab9fb) - | ||
Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change. | ||
- Updated dependencies | ||
@@ -326,3 +424,5 @@ ## 0.1.15 | ||
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`. | ||
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492) | ||
[`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - | ||
Upgrade Typescript from `4.2.4` to `4.3.5`. | ||
@@ -333,3 +433,5 @@ ## 0.1.14 | ||
- [#23381](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/23381) [`47b01007f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47b01007f27) - Introduces color prop with values default and inverse. | ||
- [#23381](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/23381) | ||
[`47b01007f27`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47b01007f27) - | ||
Introduces color prop with values default and inverse. | ||
@@ -340,3 +442,5 @@ ## 0.1.13 | ||
- [#22642](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/22642) [`354050b68da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/354050b68da) - Revert font size calculations to raw pixels. | ||
- [#22642](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/22642) | ||
[`354050b68da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/354050b68da) - Revert | ||
font size calculations to raw pixels. | ||
@@ -347,3 +451,3 @@ ## 0.1.12 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -354,3 +458,5 @@ ## 0.1.11 | ||
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4 | ||
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650) | ||
[`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - | ||
Upgrade to TypeScript 4.2.4 | ||
@@ -361,3 +467,3 @@ ## 0.1.10 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -368,3 +474,3 @@ ## 0.1.9 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -375,3 +481,3 @@ ## 0.1.8 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -382,4 +488,7 @@ ## 0.1.7 | ||
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes | ||
- Updated dependencies | ||
- [#16752](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/16752) | ||
[`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - | ||
Updates usage of deprecated token names so they're aligned with the latest naming conventions. | ||
No UI or visual changes | ||
- Updated dependencies | ||
@@ -390,3 +499,3 @@ ## 0.1.6 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -397,4 +506,7 @@ ## 0.1.5 | ||
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size. | ||
- Updated dependencies | ||
- [#15998](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/15998) | ||
[`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds | ||
for this package now pass through a tokens babel plugin, removing runtime invocations of the | ||
tokens() function and improving bundle size. | ||
- Updated dependencies | ||
@@ -405,3 +517,3 @@ ## 0.1.4 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -412,3 +524,3 @@ ## 0.1.3 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -419,3 +531,3 @@ ## 0.1.2 | ||
- Updated dependencies | ||
- Updated dependencies | ||
@@ -426,7 +538,9 @@ ## 0.1.1 | ||
- [#13864](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13864) [`d7a9a4ff7ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d7a9a4ff7ec) - Instrumented heading with the new theming package, `@atlaskit/tokens`. | ||
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha). | ||
These changes are intended to be interoperable with the legacy theme implementation. | ||
Legacy dark mode users should expect no visual or breaking changes. | ||
- Updated dependencies | ||
- [#13864](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/13864) | ||
[`d7a9a4ff7ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d7a9a4ff7ec) - | ||
Instrumented heading with the new theming package, `@atlaskit/tokens`. New tokens will be | ||
visible only in applications configured to use the new Tokens API (currently in alpha). These | ||
changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode | ||
users should expect no visual or breaking changes. | ||
- Updated dependencies | ||
@@ -437,8 +551,13 @@ ## 0.1.0 | ||
- [#12837](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12837) [`ee15e59ba60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ee15e59ba60) - This is the initial release of the Heading package. Typography styles have been duplicated from the `@atlaskit/theme` package as standalone components. | ||
- [#12837](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/12837) | ||
[`ee15e59ba60`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ee15e59ba60) - This | ||
is the initial release of the Heading package. Typography styles have been duplicated from the | ||
`@atlaskit/theme` package as standalone components. | ||
### Patch Changes | ||
- [`46816ee8526`](https://bitbucket.org/atlassian/atlassian-frontend/commits/46816ee8526) - Changes heading element mappings to match '@atlaskit/css-reset'. | ||
- [`f9cd2065648`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9cd2065648) - Removed redundant styles for text-transform, moved font-size to `rem` insteda of `em`. | ||
- Updated dependencies | ||
- [`46816ee8526`](https://bitbucket.org/atlassian/atlassian-frontend/commits/46816ee8526) - | ||
Changes heading element mappings to match '@atlaskit/css-reset'. | ||
- [`f9cd2065648`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f9cd2065648) - | ||
Removed redundant styles for text-transform, moved font-size to `rem` insteda of `em`. | ||
- Updated dependencies |
@@ -14,3 +14,4 @@ "use strict"; | ||
var _heading = _interopRequireDefault(require("./heading.partial")); | ||
var _excluded = ["level", "size"]; | ||
var _excluded = ["level"]; | ||
/* eslint-disable @atlaskit/design-system/no-deprecated-design-token-usage */ | ||
/** @jsx jsx */ | ||
@@ -159,3 +160,2 @@ // https://atlassian.design/foundations/typography | ||
var level = _ref2.level, | ||
size = _ref2.size, | ||
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded); | ||
@@ -168,6 +168,4 @@ return level ? | ||
// eslint-disable-next-line jsx-a11y/heading-has-content, @repo/internal/react/no-unsafe-spread-props | ||
(0, _react.jsx)(_heading.default, (0, _extends2.default)({ | ||
size: size | ||
}, props)); | ||
(0, _react.jsx)(_heading.default, props); | ||
}; | ||
var _default = exports.default = Heading; |
@@ -7,5 +7,6 @@ "use strict"; | ||
}); | ||
exports.default = void 0; | ||
exports.headingColorStylesMap = exports.default = void 0; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _react = require("@emotion/react"); | ||
var _primitives = require("@atlaskit/primitives"); | ||
var _headingContext = require("./heading-context"); | ||
@@ -24,3 +25,2 @@ /** @jsx jsx */ | ||
var headingResetStyles = (0, _react.css)({ | ||
color: "var(--ds-text, #172B4D)", | ||
letterSpacing: 'normal', | ||
@@ -30,6 +30,15 @@ marginBlock: 0, | ||
}); | ||
var inverseStyles = (0, _react.css)({ | ||
color: "var(--ds-text-inverse, #FFF)" | ||
}); | ||
var useColor = function useColor(colorProp) { | ||
var surface = (0, _primitives.UNSAFE_useSurface)(); | ||
/** | ||
* Where the color of the surface is inverted we always override the color | ||
* as there is no valid choice that is not covered by the override. | ||
*/ | ||
if (_primitives.UNSAFE_inverseColorMap.hasOwnProperty(surface)) { | ||
return _primitives.UNSAFE_inverseColorMap[surface]; | ||
} | ||
return colorProp || 'color.text'; | ||
}; | ||
/** | ||
@@ -52,4 +61,3 @@ * __Heading__ | ||
as = _ref.as, | ||
_ref$color = _ref.color, | ||
color = _ref$color === void 0 ? 'default' : _ref$color; | ||
colorProp = _ref.color; | ||
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') { | ||
@@ -67,2 +75,3 @@ throw new Error('`as` prop should be a string.'); | ||
var needsAriaRole = Component === 'div' && hLevel; | ||
var color = useColor(colorProp); | ||
return (0, _react.jsx)(Component, { | ||
@@ -73,9 +82,22 @@ id: id, | ||
"aria-level": needsAriaRole ? hLevel : undefined, | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], color === 'inverse' && inverseStyles] | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], headingColorStylesMap[color]] | ||
}, children); | ||
}; | ||
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css | ||
var headingColorStylesMap = exports.headingColorStylesMap = { | ||
'color.text': (0, _react.css)({ | ||
color: "var(--ds-text, #172B4D)" | ||
}), | ||
'color.text.inverse': (0, _react.css)({ | ||
color: "var(--ds-text-inverse, #FFFFFF)" | ||
}), | ||
'color.text.warning.inverse': (0, _react.css)({ | ||
color: "var(--ds-text-warning-inverse, #172B4D)" | ||
}) | ||
}; | ||
/** | ||
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} | ||
* @codegen <<SignedSource::057c0fe2015c2071afe3d694c5afcc0e>> | ||
* @codegen <<SignedSource::d7d7bb136aa9b7935c15f8e85d0916d7>> | ||
* @codegenId typography | ||
@@ -82,0 +104,0 @@ * @codegenCommand yarn workspace @atlaskit/heading codegen |
import _extends from "@babel/runtime/helpers/extends"; | ||
/* eslint-disable @atlaskit/design-system/no-deprecated-design-token-usage */ | ||
/** @jsx jsx */ | ||
@@ -145,3 +146,2 @@ import { css, jsx } from '@emotion/react'; | ||
level, | ||
size, | ||
...props | ||
@@ -155,6 +155,4 @@ }) => { | ||
// eslint-disable-next-line jsx-a11y/heading-has-content, @repo/internal/react/no-unsafe-spread-props | ||
jsx(NewHeading, _extends({ | ||
size: size | ||
}, props)); | ||
jsx(NewHeading, props); | ||
}; | ||
export default Heading; |
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { UNSAFE_inverseColorMap, UNSAFE_useSurface } from '@atlaskit/primitives'; | ||
import { useHeading } from './heading-context'; | ||
@@ -14,3 +15,2 @@ const sizeTagMap = { | ||
const headingResetStyles = css({ | ||
color: "var(--ds-text, #172B4D)", | ||
letterSpacing: 'normal', | ||
@@ -20,6 +20,15 @@ marginBlock: 0, | ||
}); | ||
const inverseStyles = css({ | ||
color: "var(--ds-text-inverse, #FFF)" | ||
}); | ||
const useColor = colorProp => { | ||
const surface = UNSAFE_useSurface(); | ||
/** | ||
* Where the color of the surface is inverted we always override the color | ||
* as there is no valid choice that is not covered by the override. | ||
*/ | ||
if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) { | ||
return UNSAFE_inverseColorMap[surface]; | ||
} | ||
return colorProp || 'color.text'; | ||
}; | ||
/** | ||
@@ -42,3 +51,3 @@ * __Heading__ | ||
as, | ||
color = 'default' | ||
color: colorProp | ||
}) => { | ||
@@ -54,2 +63,3 @@ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') { | ||
const needsAriaRole = Component === 'div' && hLevel; | ||
const color = useColor(colorProp); | ||
return jsx(Component, { | ||
@@ -60,9 +70,22 @@ id: id, | ||
"aria-level": needsAriaRole ? hLevel : undefined, | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], color === 'inverse' && inverseStyles] | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], headingColorStylesMap[color]] | ||
}, children); | ||
}; | ||
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css | ||
export const headingColorStylesMap = { | ||
'color.text': css({ | ||
color: "var(--ds-text, #172B4D)" | ||
}), | ||
'color.text.inverse': css({ | ||
color: "var(--ds-text-inverse, #FFFFFF)" | ||
}), | ||
'color.text.warning.inverse': css({ | ||
color: "var(--ds-text-warning-inverse, #172B4D)" | ||
}) | ||
}; | ||
/** | ||
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} | ||
* @codegen <<SignedSource::057c0fe2015c2071afe3d694c5afcc0e>> | ||
* @codegen <<SignedSource::d7d7bb136aa9b7935c15f8e85d0916d7>> | ||
* @codegenId typography | ||
@@ -69,0 +92,0 @@ * @codegenCommand yarn workspace @atlaskit/heading codegen |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
var _excluded = ["level", "size"]; | ||
var _excluded = ["level"]; | ||
/* eslint-disable @atlaskit/design-system/no-deprecated-design-token-usage */ | ||
/** @jsx jsx */ | ||
@@ -151,3 +152,2 @@ import { css, jsx } from '@emotion/react'; | ||
var level = _ref2.level, | ||
size = _ref2.size, | ||
props = _objectWithoutProperties(_ref2, _excluded); | ||
@@ -160,6 +160,4 @@ return level ? | ||
// eslint-disable-next-line jsx-a11y/heading-has-content, @repo/internal/react/no-unsafe-spread-props | ||
jsx(NewHeading, _extends({ | ||
size: size | ||
}, props)); | ||
jsx(NewHeading, props); | ||
}; | ||
export default Heading; |
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
/** @jsx jsx */ | ||
import { css, jsx } from '@emotion/react'; | ||
import { UNSAFE_inverseColorMap, UNSAFE_useSurface } from '@atlaskit/primitives'; | ||
import { useHeading } from './heading-context'; | ||
@@ -15,3 +16,2 @@ var sizeTagMap = { | ||
var headingResetStyles = css({ | ||
color: "var(--ds-text, #172B4D)", | ||
letterSpacing: 'normal', | ||
@@ -21,6 +21,15 @@ marginBlock: 0, | ||
}); | ||
var inverseStyles = css({ | ||
color: "var(--ds-text-inverse, #FFF)" | ||
}); | ||
var useColor = function useColor(colorProp) { | ||
var surface = UNSAFE_useSurface(); | ||
/** | ||
* Where the color of the surface is inverted we always override the color | ||
* as there is no valid choice that is not covered by the override. | ||
*/ | ||
if (UNSAFE_inverseColorMap.hasOwnProperty(surface)) { | ||
return UNSAFE_inverseColorMap[surface]; | ||
} | ||
return colorProp || 'color.text'; | ||
}; | ||
/** | ||
@@ -43,4 +52,3 @@ * __Heading__ | ||
as = _ref.as, | ||
_ref$color = _ref.color, | ||
color = _ref$color === void 0 ? 'default' : _ref$color; | ||
colorProp = _ref.color; | ||
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && as && typeof as !== 'string') { | ||
@@ -58,2 +66,3 @@ throw new Error('`as` prop should be a string.'); | ||
var needsAriaRole = Component === 'div' && hLevel; | ||
var color = useColor(colorProp); | ||
return jsx(Component, { | ||
@@ -64,9 +73,22 @@ id: id, | ||
"aria-level": needsAriaRole ? hLevel : undefined, | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], color === 'inverse' && inverseStyles] | ||
css: [headingResetStyles, size && headingSizeStylesMap[size], headingColorStylesMap[color]] | ||
}, children); | ||
}; | ||
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css | ||
export var headingColorStylesMap = { | ||
'color.text': css({ | ||
color: "var(--ds-text, #172B4D)" | ||
}), | ||
'color.text.inverse': css({ | ||
color: "var(--ds-text-inverse, #FFFFFF)" | ||
}), | ||
'color.text.warning.inverse': css({ | ||
color: "var(--ds-text-warning-inverse, #172B4D)" | ||
}) | ||
}; | ||
/** | ||
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} | ||
* @codegen <<SignedSource::057c0fe2015c2071afe3d694c5afcc0e>> | ||
* @codegen <<SignedSource::d7d7bb136aa9b7935c15f8e85d0916d7>> | ||
* @codegenId typography | ||
@@ -73,0 +95,0 @@ * @codegenCommand yarn workspace @atlaskit/heading codegen |
@@ -23,3 +23,3 @@ /** @jsx jsx */ | ||
*/ | ||
declare const Heading: ({ level, size, ...props }: HeadingProps) => jsx.JSX.Element; | ||
declare const Heading: ({ level, ...props }: HeadingProps) => jsx.JSX.Element; | ||
export default Heading; |
/** @jsx jsx */ | ||
import { jsx } from '@emotion/react'; | ||
import type { HeadingProps } from './types'; | ||
import { jsx, type SerializedStyles } from '@emotion/react'; | ||
import type { HeadingColor, NewHeadingProps } from './types'; | ||
/** | ||
@@ -15,6 +15,7 @@ * __Heading__ | ||
*/ | ||
declare const Heading: ({ children, size, id, testId, as, color, }: HeadingProps) => jsx.JSX.Element; | ||
declare const Heading: ({ children, size, id, testId, as, color: colorProp, }: NewHeadingProps) => jsx.JSX.Element; | ||
export declare const headingColorStylesMap: Record<HeadingColor, SerializedStyles>; | ||
/** | ||
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} | ||
* @codegen <<SignedSource::057c0fe2015c2071afe3d694c5afcc0e>> | ||
* @codegen <<SignedSource::d7d7bb136aa9b7935c15f8e85d0916d7>> | ||
* @codegenId typography | ||
@@ -24,9 +25,9 @@ * @codegenCommand yarn workspace @atlaskit/heading codegen | ||
declare const headingSizeStylesMap: { | ||
xxlarge: import("@emotion/react").SerializedStyles; | ||
xlarge: import("@emotion/react").SerializedStyles; | ||
large: import("@emotion/react").SerializedStyles; | ||
medium: import("@emotion/react").SerializedStyles; | ||
small: import("@emotion/react").SerializedStyles; | ||
xsmall: import("@emotion/react").SerializedStyles; | ||
xxsmall: import("@emotion/react").SerializedStyles; | ||
xxlarge: SerializedStyles; | ||
xlarge: SerializedStyles; | ||
large: SerializedStyles; | ||
medium: SerializedStyles; | ||
small: SerializedStyles; | ||
xsmall: SerializedStyles; | ||
xxsmall: SerializedStyles; | ||
}; | ||
@@ -33,0 +34,0 @@ export type HeadingSize = keyof typeof headingSizeStylesMap; |
@@ -1,4 +0,4 @@ | ||
import { ReactNode } from 'react'; | ||
import { HeadingSize } from './heading.partial'; | ||
export type HeadingProps = { | ||
import { type ReactNode } from 'react'; | ||
import { type HeadingSize } from './heading.partial'; | ||
type HeadingPropsBase = { | ||
/** | ||
@@ -22,2 +22,4 @@ * A `testId` prop is provided for specified elements, which is a unique | ||
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span'; | ||
}; | ||
export type OldHeadingProps = HeadingPropsBase & { | ||
/** | ||
@@ -28,3 +30,2 @@ * Text color of the heading. Use `"inverse"` option for a light text color over a dark background. | ||
color?: 'inverse' | 'default'; | ||
} & ({ | ||
/** | ||
@@ -57,5 +58,12 @@ * @private | ||
size?: never; | ||
} | { | ||
level?: never; | ||
}; | ||
export type HeadingColor = 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse'; | ||
export type NewHeadingProps = HeadingPropsBase & { | ||
/** | ||
* Token representing text color with a built-in fallback value. | ||
* Will apply inverse text color automatically if placed within a Box with bold background color. | ||
* Defaults to `color.text`. | ||
*/ | ||
color?: HeadingColor; | ||
/** | ||
* Heading size. This value is detached from the specific heading level applied to allow for more flexibility. | ||
@@ -67,2 +75,5 @@ * Use instead of the deprecated `level` prop. | ||
size: HeadingSize; | ||
}); | ||
level?: never; | ||
}; | ||
export type HeadingProps = OldHeadingProps | NewHeadingProps; | ||
export {}; |
@@ -23,3 +23,3 @@ /** @jsx jsx */ | ||
*/ | ||
declare const Heading: ({ level, size, ...props }: HeadingProps) => jsx.JSX.Element; | ||
declare const Heading: ({ level, ...props }: HeadingProps) => jsx.JSX.Element; | ||
export default Heading; |
/** @jsx jsx */ | ||
import { jsx } from '@emotion/react'; | ||
import type { HeadingProps } from './types'; | ||
import { jsx, type SerializedStyles } from '@emotion/react'; | ||
import type { HeadingColor, NewHeadingProps } from './types'; | ||
/** | ||
@@ -15,6 +15,7 @@ * __Heading__ | ||
*/ | ||
declare const Heading: ({ children, size, id, testId, as, color, }: HeadingProps) => jsx.JSX.Element; | ||
declare const Heading: ({ children, size, id, testId, as, color: colorProp, }: NewHeadingProps) => jsx.JSX.Element; | ||
export declare const headingColorStylesMap: Record<HeadingColor, SerializedStyles>; | ||
/** | ||
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} | ||
* @codegen <<SignedSource::057c0fe2015c2071afe3d694c5afcc0e>> | ||
* @codegen <<SignedSource::d7d7bb136aa9b7935c15f8e85d0916d7>> | ||
* @codegenId typography | ||
@@ -24,9 +25,9 @@ * @codegenCommand yarn workspace @atlaskit/heading codegen | ||
declare const headingSizeStylesMap: { | ||
xxlarge: import("@emotion/react").SerializedStyles; | ||
xlarge: import("@emotion/react").SerializedStyles; | ||
large: import("@emotion/react").SerializedStyles; | ||
medium: import("@emotion/react").SerializedStyles; | ||
small: import("@emotion/react").SerializedStyles; | ||
xsmall: import("@emotion/react").SerializedStyles; | ||
xxsmall: import("@emotion/react").SerializedStyles; | ||
xxlarge: SerializedStyles; | ||
xlarge: SerializedStyles; | ||
large: SerializedStyles; | ||
medium: SerializedStyles; | ||
small: SerializedStyles; | ||
xsmall: SerializedStyles; | ||
xxsmall: SerializedStyles; | ||
}; | ||
@@ -33,0 +34,0 @@ export type HeadingSize = keyof typeof headingSizeStylesMap; |
@@ -1,4 +0,4 @@ | ||
import { ReactNode } from 'react'; | ||
import { HeadingSize } from './heading.partial'; | ||
export type HeadingProps = { | ||
import { type ReactNode } from 'react'; | ||
import { type HeadingSize } from './heading.partial'; | ||
type HeadingPropsBase = { | ||
/** | ||
@@ -22,2 +22,4 @@ * A `testId` prop is provided for specified elements, which is a unique | ||
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span'; | ||
}; | ||
export type OldHeadingProps = HeadingPropsBase & { | ||
/** | ||
@@ -28,3 +30,2 @@ * Text color of the heading. Use `"inverse"` option for a light text color over a dark background. | ||
color?: 'inverse' | 'default'; | ||
} & ({ | ||
/** | ||
@@ -57,5 +58,12 @@ * @private | ||
size?: never; | ||
} | { | ||
level?: never; | ||
}; | ||
export type HeadingColor = 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse'; | ||
export type NewHeadingProps = HeadingPropsBase & { | ||
/** | ||
* Token representing text color with a built-in fallback value. | ||
* Will apply inverse text color automatically if placed within a Box with bold background color. | ||
* Defaults to `color.text`. | ||
*/ | ||
color?: HeadingColor; | ||
/** | ||
* Heading size. This value is detached from the specific heading level applied to allow for more flexibility. | ||
@@ -67,2 +75,5 @@ * Use instead of the deprecated `level` prop. | ||
size: HeadingSize; | ||
}); | ||
level?: never; | ||
}; | ||
export type HeadingProps = OldHeadingProps | NewHeadingProps; | ||
export {}; |
{ | ||
"name": "@atlaskit/heading", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "A heading is a typography component used to display text in different sizes and formats.", | ||
@@ -36,3 +36,4 @@ "publishConfig": { | ||
"dependencies": { | ||
"@atlaskit/tokens": "^1.43.0", | ||
"@atlaskit/primitives": "^6.0.0", | ||
"@atlaskit/tokens": "^1.45.0", | ||
"@babel/runtime": "^7.0.0", | ||
@@ -46,4 +47,6 @@ "@emotion/react": "^11.7.1" | ||
"@af/accessibility-testing": "*", | ||
"@af/formatting": "*", | ||
"@atlaskit/ds-lib": "^2.3.0", | ||
"@atlaskit/ssr": "*", | ||
"@atlaskit/toggle": "^13.1.0", | ||
"@atlaskit/visual-regression": "*", | ||
@@ -54,3 +57,2 @@ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0", | ||
"jscodeshift": "^0.13.0", | ||
"prettier": "^2.8.0", | ||
"react-dom": "^16.8.0", | ||
@@ -57,0 +59,0 @@ "ts-node": "^10.9.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73178
5
13
32
1471
+ Added@atlaskit/primitives@^6.0.0
+ Added@atlaskit/analytics-next@9.3.4(transitive)
+ Added@atlaskit/analytics-next-stable-react-context@1.0.1(transitive)
+ Added@atlaskit/app-provider@1.4.1(transitive)
+ Added@atlaskit/css@0.1.1(transitive)
+ Added@atlaskit/ds-lib@3.2.1(transitive)
+ Added@atlaskit/interaction-context@2.1.6(transitive)
+ Added@atlaskit/primitives@6.5.0(transitive)
+ Added@atlaskit/tokens@2.2.0(transitive)
+ Added@atlaskit/visually-hidden@1.5.0(transitive)
+ Added@compiled/react@0.17.3(transitive)
+ Added@emotion/hash@0.9.2(transitive)
+ Added@emotion/memoize@0.9.0(transitive)
+ Added@emotion/serialize@1.3.2(transitive)
+ Added@emotion/unitless@0.10.0(transitive)
+ Added@emotion/utils@1.4.1(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedreact@16.14.018.2.0(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedtiny-invariant@1.3.3(transitive)
+ Addeduse-memo-one@1.1.3(transitive)
Updated@atlaskit/tokens@^1.45.0