Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@atlaskit/portal

atlassian270.9kApache-2.05.1.0TypeScript support: included

A wrapper for rendering components in React portals.

atlaskit, react, ui

readme

Portal

A wrapper for rendering components in React portals.

Installation

yarn add @atlaskit/portal

Usage

View documentation.

changelog

@atlaskit/portal

5.1.0

Minor Changes

  • #124073 97804593b5afb - Adds a React.Suspense boundary around Portal children to avoid bugs in React 18 concurrency (after validating through internal feature gates)

5.0.2

Patch Changes

  • Updated dependencies

5.0.1

Patch Changes

5.0.0

Major Changes

Patch Changes

  • Updated dependencies

4.11.3

Patch Changes

  • Updated dependencies

4.11.2

Patch Changes

  • Updated dependencies

4.11.1

Patch Changes

  • Updated dependencies

4.11.0

Minor Changes

Patch Changes

  • Updated dependencies

4.10.0

Minor Changes

  • 0e8e931171299 - Testing behind a feature gate, adds a Suspense boundary to all created React 18 portals (also behind a feature gate)

4.9.4

Patch Changes

  • #165531 57f451bda8919 - Adds side-effect config to support Compiled css extraction in third-party apps

4.9.3

Patch Changes

  • Updated dependencies

4.9.2

Patch Changes

4.9.1

Patch Changes

  • Updated dependencies

4.9.0

Minor Changes

4.8.0

Minor Changes

  • #127511 db30e29344013 - Widening range of react and react-dom peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0 to the wider range of ^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).

    This change has been done to enable usage of `react@18.3as well as to have a consistent peer dependency range forreactandreact-domfor/platform` packages.

Patch Changes

  • Updated dependencies

4.7.0

Minor Changes

  • 8b8090800a35d - Bump peer dependency for react-dom to include version 17 and 18.

4.6.1

Patch Changes

  • #113286 5e96c34106b2e - DSP-19412 Add optional chaining to document.body function call to resolve type errors

4.6.0

Minor Changes

  • #110836 a8bd419fd70b9 - Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime is implicitly set to automatic.

4.5.0

Minor Changes

4.4.2

Patch Changes

4.4.1

Patch Changes

4.4.0

Minor Changes

4.3.6

Patch Changes

4.3.5

Patch Changes

4.3.4

Patch Changes

4.3.3

Patch Changes

4.3.2

Patch Changes

4.3.1

Patch Changes

4.3.0

Minor Changes

Patch Changes

  • Updated dependencies

4.2.13

Patch Changes

4.2.12

Patch Changes

  • #26303 9827dcb82b8 - No-op change to introduce spacing tokens to design system components.

4.2.11

Patch Changes

4.2.10

Patch Changes

4.2.9

Patch Changes

4.2.8

Patch Changes

  • #22614 8a5bdb3c844 - Upgrading internal dependency (bind-event-listener) for improved internal types

4.2.7

Patch Changes

4.2.6

Patch Changes

  • #20033 b3e5a62a9e3 - Adds static techstack to package, enforcing stricter style linting. In this case the package already satisfied this requirement so there have been no changes to styles.

4.2.5

Patch Changes

  • #14319 cf853e39278 - Retains the portal wrapper in the DOM after the last portal is unmounted. This drastically reduces the style recalculations and improves performance for portalled elements.
  • Updated dependencies

4.2.4

Patch Changes

4.2.3

Patch Changes

  • #12837 ea086afdc2d - Fix bug where Portal was attached to the body after the children were rendered. Now Portal is attached before it's children are rendered.
  • Updated dependencies

4.2.2

Patch Changes

4.2.1

Patch Changes

4.2.0

Minor Changes

  • #12170 f6b951a51f2 - Removes usage of styled-components in favour of standardising on emotion

4.1.2

Patch Changes

4.1.1

Patch Changes

  • #10230 8b360a4ac06 - NO-ISSUE Update modal dialog selector for VR & integration tests
  • Updated dependencies

4.1.0

Minor Changes

  • #9083 d4f0c36ac36 - Converted class based portal component to functional component and dropped unused ie11 specific code

Patch Changes

  • 9e94c1beb76 - Removed deprecated auto entry points and added new entry points in Portal
  • e87c4a5ae8b - Optimisation of z-index to layer name by removing dependency on atlaskit theme package

4.0.5

Patch Changes

4.0.4

Patch Changes

  • #5497 5f58283e1f - Export types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript versions here: https://atlaskit.atlassian.com/get-started Also add typescript to devDependencies to denote version that the package was built with.

4.0.3

Patch Changes

  • Updated dependencies

4.0.2

Patch Changes

  • #3885 6c525a8229 - Upgraded to TypeScript 3.9.6 and tslib to 2.0.0

    Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.

4.0.1

Patch Changes

  • #3428 3414523d6f - Rearange buttons order to align with design guidelines
  • db053b24d8 - Update all the theme imports to be tree-shakable

4.0.0

Major Changes

Patch Changes

  • Updated dependencies

3.1.9

Patch Changes

  • #2866 54a9514fcf - Build and supporting files will no longer be published to npm

3.1.8

Patch Changes

  • #1868 4069606178 - Change imports to comply with Atlassian conventions- Updated dependencies

3.1.7

Patch Changes

3.1.6

Patch Changes

3.1.5

Patch Changes

3.1.4

Patch Changes

3.1.3

Patch Changes

3.1.2

Patch Changes

  • [patch]adc048de7e:

    Fixing ie11 bug caused by using Event constructor

3.1.1

Warning: Do not use this version. It has been deprecated

It is broken for ie11 if you are not polyfilling the new Event constructor

Patch Changes

  • [patch]35d2229b2a:

    Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.

3.1.0

Warning: Do not use this version. It has been deprecated

It is broken for ie11 if you are not polyfilling the new Event constructor

Minor Changes

  • [minor]bf8796cffa:

    Add mount and unmount events to @atlaskit/portal

3.0.13

3.0.12

Patch Changes

  • [patch]097b696613:

    Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports

3.0.11

Patch Changes

3.0.10

Patch Changes

  • [patch]de35ce8c67:

    Updates component maintainers

3.0.9

Patch Changes

  • [patch]bbff8a7d87:

    Fixes bug, missing version.json file

3.0.8

Patch Changes

  • [patch]18dfac7332:

    In this PR, we are:

    • Re-introducing dist build folders
    • Adding back cjs
    • Replacing es5 by cjs and es2015 by esm
    • Creating folders at the root for entry-points
    • Removing the generation of the entry-points at the root Please see this ticket or this page for further details

3.0.7

3.0.6

Patch Changes

  • [patch]4615439434:

    index.ts will now be ignored when publishing to npm

3.0.5

Patch Changes

3.0.4

3.0.3

3.0.2

3.0.1

  • [patch]b0ef06c685:

    • This is just a safety release in case anything strange happened in in the previous one. See Pull Request #5942 for details

3.0.0

2.0.1

2.0.0

  • [major]7c17b35107:

    • Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.

1.0.0

  • [major]5b6b4d6a0f:

    • This major release indicates that this package is no longer under dev preview but is ready for use

0.3.1

0.3.0

  • [minor]ce4e1b4780:

    • zIndex prop now accepts string and number values. Portal consumers can now use css values like "unset" if needed.

0.2.2

  • [patch]98e11001ff:

    • Removes duplicate babel-runtime dependency

0.2.1

0.2.0

  • [minor]76299208e6:

    • Drop ES5 from all the flow modules

    Dropping CJS support in all @atlaskit packages

    As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only distribute esm. This means all distributed code will be transpiled, but will still contain import and export declarations.

    The major reason for doing this is to allow us to support multiple entry points in packages, e.g:

    import colors from `@atlaskit/theme/colors`;

    Previously this was sort of possible for consumers by doing something like:

    import colors from `@atlaskit/theme/dist/esm/colors`;

    This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.

    To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.

    ES Modules are widely supported by all modern bundlers and can be worked around in node environments.

    We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.

    Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support (for external) if you have any questions or queries about this.

0.1.0

  • [minor]27cacd44ab:

    • Components inside Portal render after portal container element is attached to the DOM

0.0.18

0.0.17

0.0.16

0.0.15

0.0.14

  • [patch]1fb2c2a:

    • Fixed issue where tooltips and modals would initially render in the wrong location

0.0.13

  • [patch]3f5a4dd:

    • Replaces our own check for dom in ssr with exenv package

0.0.12

  • [patch] fixes problem with the DOM container for portal not creating a new stacking context aaab348

0.0.11

  • [patch] Adds missing implicit @babel/runtime dependency b71751b

0.0.10

0.0.9

0.0.8

0.0.7

  • [patch] Adds sideEffects: false to allow proper tree shaking b5d6d04

0.0.6

0.0.5

0.0.4

0.0.3

0.0.2

  • [patch] Initial dev release of portal package 6d5c8c0