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

Package detail

@atlaskit/blanket

atlassian187.7kApache-2.015.0.15TypeScript support: included

A blanket covers the underlying UI for a layered component, such as a modal dialog or a tooltip.

atlaskit, react, ui

readme

Blanket

A blanket covers the underlying UI for a layered component, such as a modal dialog or a tooltip.

Installation

yarn add @atlaskit/blanket

Usage

View documentation.

changelog

@atlaskit/blanket

15.0.15

Patch Changes

  • Updated dependencies

15.0.14

Patch Changes

  • Updated dependencies

15.0.13

Patch Changes

  • Updated dependencies

15.0.12

Patch Changes

  • Updated dependencies

15.0.11

Patch Changes

  • 23bcc5bbc9cee - Internal changes to how border radius is applied.
  • Updated dependencies

15.0.10

Patch Changes

  • Updated dependencies

15.0.9

Patch Changes

  • Updated dependencies

15.0.8

Patch Changes

  • Updated dependencies

15.0.7

Patch Changes

  • Updated dependencies

15.0.6

Patch Changes

  • Updated dependencies

15.0.5

Patch Changes

  • Updated dependencies

15.0.4

Patch Changes

  • Updated dependencies

15.0.3

Patch Changes

15.0.2

Patch Changes

  • #129972 b2d69a39e6687 - Update @compiled/react dependency for improved type checking support.
  • Updated dependencies

15.0.1

Patch Changes

  • Updated dependencies

15.0.0

Major Changes

Patch Changes

  • Updated dependencies

14.2.0

Minor Changes

Patch Changes

  • Updated dependencies

14.1.3

Patch Changes

  • Updated dependencies

14.1.2

Patch Changes

14.1.1

Patch Changes

  • Updated dependencies

14.1.0

Minor Changes

Patch Changes

  • Updated dependencies

14.0.3

Patch Changes

14.0.2

Patch Changes

14.0.1

Patch Changes

  • Updated dependencies

14.0.0

Major Changes

  • #176786 30a4108a8fe56 - Migrated from @emotion/react to @compiled/react in order to improve performance, align with the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to use this version of @atlaskit/blanket, you will need to ensure that your bundler is configured to handle .css imports correctly.

    Most bundlers come with built-in support for .css imports, so you may not need to do anything. If you are using a different bundler, please refer to the documentation for that bundler to understand how to handle .css imports. For more information on the migration, please refer to RFC-73 Migrating our components to Compiled CSS-in-JS.

13.3.5

Patch Changes

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

13.3.4

Patch Changes

  • Updated dependencies

13.3.3

Patch Changes

  • Updated dependencies

13.3.2

Patch Changes

  • Updated dependencies

13.3.1

Patch Changes

  • Updated dependencies

13.3.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

13.2.1

Patch Changes

  • Updated dependencies

13.2.0

Minor Changes

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

13.1.0

Minor Changes

13.0.1

Patch Changes

13.0.0

Major Changes

  • #41760 909e4a30fe7 - Removed all remaining legacy theming logic from the Blanket, Breadcrumbs and Checkbox components.

12.4.5

Patch Changes

  • #40123 b289e593932 - Internal change to apply logical properties instead of physical properties for spacing, border, and position.

12.4.4

Patch Changes

  • #36754 4ae083a7e66 - Use @af/accessibility-testing for default jest-axe config and jest-axe import in accessibility testing.

12.4.3

Patch Changes

12.4.2

Patch Changes

12.4.1

Patch Changes

12.4.0

Minor Changes

Patch Changes

  • Updated dependencies

12.3.8

Patch Changes

12.3.7

Patch Changes

  • Updated dependencies

12.3.6

Patch Changes

  • #29669 a7e8a6c3ace - Prevent onBlanketClick function firing on Blanket when mousedown event begins on Blanket children

12.3.5

Patch Changes

  • Updated dependencies

12.3.4

Patch Changes

  • Updated dependencies

12.3.3

Patch Changes

  • Updated dependencies

12.3.2

Patch Changes

  • Updated dependencies

12.3.1

Patch Changes

  • #26488 bc989043572 - Internal changes to apply spacing tokens. This should be a no-op change.

12.3.0

Minor Changes

  • #24710 f2fe91811eb - Updates @emotion/core to @emotion/react; v10 to v11. There is no expected behaviour change.

12.2.16

Patch Changes

12.2.15

Patch Changes

12.2.14

Patch Changes

  • Updated dependencies

12.2.13

Patch Changes

  • Updated dependencies

12.2.12

Patch Changes

12.2.11

Patch Changes

  • Updated dependencies

12.2.10

Patch Changes

  • #19618 dcd92130cc4 - Migrate deleted background accent tokens to replacements
  • Updated dependencies

12.2.9

Patch Changes

12.2.8

Patch Changes

  • Updated dependencies

12.2.7

Patch Changes

  • #16752 19d72473dfb - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
  • Updated dependencies

12.2.6

Patch Changes

  • Updated dependencies

12.2.5

Patch Changes

  • #15998 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

12.2.4

Patch Changes

  • Updated dependencies

12.2.3

Patch Changes

12.2.2

Patch Changes

  • Updated dependencies

12.2.1

Patch Changes

  • Updated dependencies

12.2.0

Minor Changes

  • #13302 9f7f8e0b581 - [ux] Blanket now uses a transparent background color when un-tinted instead of using opacity.

Patch Changes

  • 2d7cc544696 - Updates token usage to match the latest token set
  • Updated dependencies

12.1.1

Patch Changes

  • Updated dependencies

12.1.0

Minor Changes

Patch Changes

  • 8279380176b - Internal code changes.
  • Updated dependencies

12.0.1

Patch Changes

12.0.0

Major Changes

  • #12328 f166f5398b2 - In this version we made Blanket faster and lighter

    • General performance improvements

    • BREAKING Blanket now accepts a children prop whose value is of type ReactElement.

    • BREAKING canClickThrough prop is now renamed to shouldAllowClickThrough.

    Running the codemod cli

    To run the codemod: You first need to have the latest version installed

    yarn upgrade @atlaskit/blanket@^12.0.0

    Once upgraded, use @atlaskit/codemod-cli:

    npx @atlaskit/codemod-cli --parser babel --extensions ts,tsx,js [relativePath]

    The CLI will show a list of components and versions so select @atlaskit/blanket@^12.0.0 and you will automatically be upgraded.

    What will be changed:

    • It will rename the canClickThrough prop to shouldAllowClickThrough.

    Run npx @atlaskit/codemod-cli -h for more details on usage.

    For Atlassians, refer to the documentation for more details on the codemod CLI.

Patch Changes

  • 9c98e8227f6 - Internal refactor for style declarations.
  • Updated dependencies

11.4.1

Patch Changes

11.4.0

Minor Changes

  • #11649 96fda7877a1 - We converted blanket from class to functional component and replaced styled components with emotion

11.3.1

Patch Changes

11.3.0

Minor Changes

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

11.2.1

Patch Changes

11.2.0

Minor Changes

  • #9756 990aefd838b - Blanket now accepts testId prop to be used for automated testing purposes.

Patch Changes

  • Updated dependencies

11.1.1

Patch Changes

  • #8644 79c23df6340 - Use injected package name and version for analytics instead of version.json.

11.1.0

Minor Changes

  • #7170 4f9e6e2db5 - These packages now have defined entry points -- this means that you cannot access internal files in the packages that are not meant to be public. Sub-components in these packages have been explicitly defined, aiding tree-shaking and reducing bundle size.

11.0.4

Patch Changes

11.0.3

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.

11.0.2

Patch Changes

  • Updated dependencies

11.0.1

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.

11.0.0

Major Changes

Patch Changes

  • Updated dependencies

10.0.19

Patch Changes

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

10.0.18

Patch Changes

10.0.17

Patch Changes

10.0.16

Patch Changes

10.0.15

Patch Changes

  • [patch]d222c2b987:

    Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.

    Breaking

    ** getTokens props changes ** When defining the value function passed into a ThemeProvider, the getTokens parameter cannot be called without props; if no props are provided an empty object {} must be passed in:

    <CustomTheme.Provider
      value={t => ({ ...t(), backgroundColor: '#333'})}
    >

    becomes:

    <CustomTheme.Provider
      value={t => ({ ...t({}), backgroundColor: '#333'})}
    >

    ** Color palette changes ** Color palettes have been moved into their own file. Users will need to update imports from this:

    import { colors } from '@atlaskit/theme';
    
    colors.colorPalette('8');

    to this:

    import { colorPalette } from '@atlaskit/theme';
    
    colorPalette.colorPalette('8');

    or for multi entry-point users:

    import * as colors from '@atlaskit/theme/colors';
    
    colors.colorPalette('8');

    to this:

    import * as colorPalettes from '@atlaskit/theme/color-palette';
    
    colorPalettes.colorPalette('8');

10.0.14

Patch Changes

  • [patch]35d2229b2a:

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

10.0.13

Patch Changes

  • [patch]a2d0043716:

    Updated version of analytics-next to fix potential incompatibilities with TS 3.6

10.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

10.0.11

Patch Changes

10.0.10

Patch Changes

  • [patch]708028db86:

    Change all the imports to theme in Core to use multi entry points

10.0.9

Patch Changes

  • [patch]de35ce8c67:

    Updates component maintainers

10.0.8

Patch Changes

  • [patch]926b43142b:

    Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.

    Breaking changes

    • withAnalyticsForSumTypeProps alias has been removed, please use withAnalyticsEvents
    • AnalyticsContextWrappedComp alias has been removed, please use withAnalyticsContext

    Breaking changes to TypeScript annotations

    • withAnalyticsEvents now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • withAnalyticsContext now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • Type WithAnalyticsEventProps has been renamed to WithAnalyticsEventsProps to match source code
    • Type CreateUIAnalyticsEventSignature has been renamed to CreateUIAnalyticsEvent to match source code
    • Type UIAnalyticsEventHandlerSignature has been renamed to UIAnalyticsEventHandler to match source code
    • Type AnalyticsEventsPayload has been renamed to AnalyticsEventPayload
    • Type ObjectType has been removed, please use Record<string, any> or [key: string]: any
    • Type UIAnalyticsEventInterface has been removed, please use UIAnalyticsEvent
    • Type AnalyticsEventInterface has been removed, please use AnalyticsEvent
    • Type CreateAndFireEventFunction removed and should now be inferred by TypeScript
    • Type AnalyticsEventUpdater removed and should now be inferred by TypeScript

10.0.7

Patch Changes

  • [patch]9f8ab1084b:

    Consume analytics-next ts type definitions as an ambient declaration.

10.0.6

Patch Changes

  • [patch]bbff8a7d87:

    Fixes bug, missing version.json file

10.0.5

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

10.0.4

Patch Changes

  • [patch]d0db01b410:

    TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.

    Before:

    withAnalyticsEvents()(Button) as ComponentClass<Props>;

    After:

    withAnalyticsEvents<Props>()(Button);

10.0.3

Patch Changes

  • [patch]29a1f158c1:

    Use default react import in typescript files.

10.0.2

Patch Changes

10.0.1

  • [patch]27cf35ca9d:

    • Updated event type for onBlanketClicked prop

10.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.

9.0.0

  • [major]38dab947e6:

    • Updated Blanket to TypeScript. Flow types are no longer exported.

8.0.3

8.0.2

8.0.1

8.0.0

  • [major]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.

7.0.12

7.0.11

7.0.10

7.0.9

  • [patch]a637f5e:

    • Refine and fix some flow type errors found by fixing @atlaskit/analytics-next HOCs to allow flow to type check properly

7.0.8

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

7.0.7

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

7.0.5

7.0.4

7.0.3

7.0.2

7.0.1

7.0.0

6.0.3

6.0.2

6.0.1

6.0.0

5.0.2

5.0.0

  • [major] Bump to React 16.3. 4251858

4.1.1

  • [patch] Re-releasing due to potentially broken babel release 9ed0bba

4.1.0

  • [minor] Update styled-components dependency to support versions 1.4.6 - 3 ceccf30

4.0.9

4.0.8

  • [patch] Packages Flow types for elements components 3111e74

4.0.7

  • [patch] Minor documentation fixes f0e96bd

4.0.6

  • [patch] Migrate Navigation from Ak repo to ak mk 2 repo, Fixed flow typing inconsistencies in ak mk 2 bdeef5b

4.0.5

  • [patch] Resolved low hanging flow errors in field-base field-text comment icon item and website, $ 007de27

4.0.4

  • [patch] Migration of Blanket to mk2 repo 1c55d97

4.0.3 (2017-12-21)

  • bug fix; Minor change to storybook to test new s3 bucket (97cbb7d)

4.0.2 (2017-11-27)

  • bug fix; bump theme dependency to 2.2.0 (issues closed: nav-27) (2b71345)

4.0.1 (2017-11-15)

  • bug fix; bumping internal dependencies to latest major versions (288935a)

4.0.0 (2017-11-14)

  • bug fix; implemented code review comments: using theme package to get layer value and removed (b1a84f5)
  • breaking; added z-index to blanket (4665973)
  • breaking; aK-3851-fix added z-index to blanket, reverts b344810 (issues closed: ak-3851) (4665973)

3.0.3 (2017-10-26)

  • bug fix; fix to rebuild stories (793b2a7)

3.0.2 (2017-10-22)

  • bug fix; update dependencies for react-16 (077d1ad)

3.0.1 (2017-10-13)

  • bug fix; fix Blanket stories (b9ac4ab)
  • bug fix; other fix for other issue (014f79c)
  • bug fix; fix render issue for Blanket storybook (b277ff3)

3.0.0 (2017-08-31)

  • breaking; removed z-index (b344810)
  • breaking; removed z-index for integration with @atlaskit/layer-manager (b344810)
  • feature; update to use @atlaskit/theme - now supports dark mode (422c74e)

2.4.3 (2017-08-09)

  • bug fix; bump util-shared-styles dependency to latest to reduce app bundle sizes (issues closed: ak-3252) (dbc406c)

2.4.2 (2017-07-27)

  • fix; rename jsnext:main to jsnext:experimental:main temporarily (c7508e0)

2.4.1 (2017-07-25)

  • fix; use class transform in loose mode in babel to improve load performance in apps (fde719a)

2.1.0 (2017-07-17)

  • fix; rerelease, failed prepublish scripts (5fd82f8)

2.1.0 (2017-07-17)

  • feature; added ES module builds to dist and add jsnext:main to most ADG packages (ea76507)

2.0.5 (2017-07-13)

  • fix; testing releasing more than 5 packages at a time (e69b832)
  • fix; add prop-types as a dependency to avoid React 15.x warnings (92598eb)

2.0.4 (2017-04-27)

  • fix; update legal copy to be more clear. Not all modules include ADG license. (f3a945e)

2.0.3 (2017-04-26)

  • fix; update legal copy and fix broken links for component README on npm. New contribution and (0b3e454)

2.0.2 (2017-03-29)

  • fix; repush stories for broken releases (cde4000)

2.0.1 (2017-03-28)

  • fix; update blanket with new structure, use new readme story component (2ecfd11)

2.0.0 (2017-03-27)

  • refactor the blanket component to use styled-components (62dc8f2)
  • breaking; removed dependency "classnames", added peerDependency "styled-components"

1.2.4 (2017-03-23)

  • fix; Empty commit to release the component (49c08ee)

1.2.2 (2017-03-21)

  • fix; maintainers for all the packages were added (261d00a)

1.2.0 (2017-02-27)

  • feature; added canClickThroughBlanket prop to Blanket to make it possible to animate (cacb5cb)

1.1.0 (2017-02-22)

  • feature; add canClickThrough to blanket (c2e31aa)

1.0.2 (2017-02-10)

  • fix; Dummy commit to release components to registry (5bac43b)

1.0.1 (2017-02-06)

  • fix; bumps deps to use scoped packages (9384221)