@atlaskit/tile 0.2.1 → 1.0.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,18 @@
1
1
  # @atlaskit/tile
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`951d5982db119`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/951d5982db119) -
8
+ Released for general availability
9
+
10
+ ## 0.2.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 0.2.1
4
17
 
5
18
  ### Patch Changes
@@ -10,40 +10,52 @@ import TileBorder from '../../examples/constellation/tile-border';
10
10
  import TileInset from '../../examples/constellation/tile-inset';
11
11
  import TileLabelling from '../../examples/constellation/tile-labelling';
12
12
  import TileThemed from '../../examples/constellation/tile-themed';
13
+ import TileSkeletonExample from '../../examples/constellation/tile-skeleton';
13
14
 
14
15
  ## Default
15
16
 
16
- The default tile has a medium size, neutral background, and inset enabled – ready to accept any asset as content.
17
+ The default tile has a medium size, neutral background, and inset enabled – ready to accept any
18
+ asset as content.
17
19
 
18
20
  <Example Component={TileDefault} packageName="@atlaskit/tile" />
19
21
 
20
22
  ## Size
21
23
 
22
- Tiles can be set to six different sizes using the <inlineCode>size</inlineCode> prop, from <inlineCode>xxsmall</inlineCode> (16px) to <inlineCode>xlarge</inlineCode> (48px). This defaults to <inlineCode>medium</inlineCode> (32px).
24
+ Tiles can be set to six different sizes using the <inlineCode>size</inlineCode> prop, from
25
+
26
+ <inlineCode>xxsmall</inlineCode> (16px) to <inlineCode>xlarge</inlineCode> (48px). This defaults to
27
+ <inlineCode>medium</inlineCode> (32px).
23
28
 
24
29
  <Example Component={TileSizes} packageName="@atlaskit/tile" />
25
30
 
26
31
  ## Background color
27
32
 
28
- Tiles support a variety of background colors using the <inlineCode>backgroundColor</inlineCode> prop, which can be set to <a href="/components/tokens/all-tokens">design tokens</a>. This defaults to <inlineCode>color.background.neutral</inlineCode>.
33
+ Tiles support a variety of background colors using the <inlineCode>backgroundColor</inlineCode>
34
+ prop, which can be set to <a href="/components/tokens/all-tokens">design tokens</a>. This defaults
35
+ to <inlineCode>color.background.neutral</inlineCode>.
29
36
 
30
37
  <Example Component={TileBackgroundColor} packageName="@atlaskit/tile" />
31
38
 
32
39
  ### Static colors
33
40
 
34
- Alternatively, static <inlineCode>white</inlineCode> or <inlineCode>black</inlineCode> background colors are supported. These will not change with the color mode, unlike design tokens.
41
+ Alternatively, static <inlineCode>white</inlineCode> or <inlineCode>black</inlineCode> background
42
+ colors are supported. These will not change with the color mode, unlike design tokens.
35
43
 
36
44
  <Example Component={TileBackgroundColorStatic} packageName="@atlaskit/tile" />
37
45
 
38
46
  ## Border
39
47
 
40
- Tiles can display a border around the tile with the <inlineCode>hasBorder</inlineCode> prop. This is disabled by default.
48
+ Tiles can display a border around the tile with the <inlineCode>hasBorder</inlineCode> prop. This is
49
+ disabled by default.
41
50
 
42
51
  <Example Component={TileBorder} packageName="@atlaskit/tile" />
43
52
 
44
53
  ## Inset
45
54
 
46
- Tiles can be configured with or without internal inset (padding) using <inlineCode>isInset</inlineCode>. Disabling inset can be used for supplying assets with backgrounds, such as third-party logos.
55
+ Tiles can be configured with or without internal inset (padding) using
56
+
57
+ <inlineCode>isInset</inlineCode>. Disabling inset can be used for supplying assets with backgrounds,
58
+ such as third-party logos.
47
59
 
48
60
  Inset is enabled by default to provide appropriate spacing for assets.
49
61
 
@@ -51,18 +63,34 @@ Inset is enabled by default to provide appropriate spacing for assets.
51
63
 
52
64
  ## Labelling
53
65
 
54
- Use the <inlineCode>label</inlineCode> prop to provide accessible labelling for tiles. Use descriptive labels for meaningful tiles, or empty strings for decorative tiles.
66
+ Use the <inlineCode>label</inlineCode> prop to provide accessible labelling for tiles. Use
67
+ descriptive labels for meaningful tiles, or empty strings for decorative tiles.
55
68
 
56
69
  <Example Component={TileLabelling} packageName="@atlaskit/tile" />
57
70
 
58
71
  ## Themed assets
59
72
 
60
- Tiles can swap assets between light and dark mode, by using existing theming capabilities within the design system.
73
+ Tiles can swap assets between light and dark mode, by using existing theming capabilities within the
74
+ design system.
61
75
 
62
76
  This may be useful if assets need more contrast in either light or dark mode.
63
77
 
64
- Alternatively, suitable SVG assets that use <inlineCode>currentColor</inlineCode> will inherit tile's <inlineCode>color</inlineCode>, which is already themed using the design token <inlineCode>color.text</inlineCode>.
78
+ Alternatively, suitable SVG assets that use <inlineCode>currentColor</inlineCode> will inherit
79
+ tile's <inlineCode>color</inlineCode>, which is already themed using the design token
80
+
81
+ <inlineCode>color.text</inlineCode>.
65
82
 
66
83
  <Example Component={TileThemed} packageName="@atlaskit/tile" appearance="source-only" />
67
84
 
85
+ ## Loading skeleton
86
+
87
+ A loading skeleton is provided called <inlineCode>TileSkeleton</inlineCode>. This can be used in
88
+ conjunction with the [Skeleton component](/components/skeleton), which
89
+
90
+ <inlineCode>TileSkeleton</inlineCode> utilizes internally – with added consistent sizing for tiles
91
+ to prevent layout shift.
92
+
93
+ This is useful for when you need to display a loading state for a tile, such as when fetching data
94
+ or waiting for an API response.
68
95
 
96
+ <Example Component={TileSkeletonExample} packageName="@atlaskit/tile/skeleton" />
@@ -13,18 +13,25 @@ import iconTile from './images/icon-tile-thumbnail-light.png';
13
13
 
14
14
  ## Tile system
15
15
 
16
- The tile component sets the foundation of our tile system, setting a standard for size, space, and shape properties for all tile-shaped elements within Atlassian UI.
16
+ The tile component sets the foundation of our tile system, setting a standard for size, space, and
17
+ shape properties for all tile-shaped elements within Atlassian UI.
17
18
 
18
19
  So far, the properties of tile is inherited by the following components:
20
+
19
21
  - Icon tile
20
22
  - Object tile
21
23
 
22
- Makers should default to using these components, but in cases where a 'custom' tile is needed (for assets such as third-party logos or emojis), the tile component can be leveraged.
23
-
24
- Together, these components make a comprehensive system that brings flexibility and consistency to our apps.
24
+ Makers should default to using these components, but in cases where a 'custom' tile is needed (for
25
+ assets such as third-party logos or emojis), the tile component can be leveraged.
25
26
 
26
- <Image src={tileOverviewLight} srcDark={tileOverviewDark} alt="An overview of the components in the tile system" />
27
+ Together, these components make a comprehensive system that brings flexibility and consistency to
28
+ our apps.
27
29
 
30
+ <Image
31
+ src={tileOverviewLight}
32
+ srcDark={tileOverviewDark}
33
+ alt="An overview of the components in the tile system"
34
+ />
28
35
 
29
36
  ## Tile components
30
37
 
@@ -36,18 +43,35 @@ Together, these components make a comprehensive system that brings flexibility a
36
43
  </THead>
37
44
  <TBody>
38
45
  <Row key={1}>
39
- <Cell width="18%"><a href="/components/tile/examples">Tile</a></Cell>
40
- <Cell>A versatile, foundational container with baked-in sizing and radii properties for displaying elements in a tile shape. It is flexible and can be used as a container to add in any foreground element, background, or color as needed.</Cell>
46
+ <Cell width="18%">
47
+ <a href="/components/tile/examples">Tile</a>
48
+ </Cell>
49
+ <Cell>
50
+ A versatile, foundational container with baked-in sizing and radii properties for displaying
51
+ elements in a tile shape. It is flexible and can be used as a container to add in any
52
+ foreground element, background, or color as needed.
53
+ </Cell>
41
54
  <Cell>Anything that's not an icon or object, such as emojis and third-party logos</Cell>
42
55
  </Row>
43
56
  <Row key={2}>
44
- <Cell width="18%"><a href="/components/icon/icon-tile/examples">Icon tile</a></Cell>
45
- <Cell>Allows icons to be scaled larger than 16px. It has pre-set options for color and size to ensure accessibility and readability, and to prominently highlight icons in a layout.</Cell>
57
+ <Cell width="18%">
58
+ <a href="/components/icon/icon-tile/examples">Icon tile</a>
59
+ </Cell>
60
+ <Cell>
61
+ Allows icons to be scaled larger than 16px. It has pre-set options for color and size to
62
+ ensure accessibility and readability, and to prominently highlight icons in a layout.
63
+ </Cell>
46
64
  <Cell>Icons</Cell>
47
65
  </Row>
48
66
  <Row key={3}>
49
- <Cell width="18%"><a href="/components/object/object-tile/examples">Object tile</a></Cell>
50
- <Cell>Use instead of an icon tile to represent Atlassian-specific content icons, such as pages, live docs, whiteboard, or bugs. Each object tile has a specific color token that cannot be changed.</Cell>
67
+ <Cell width="18%">
68
+ <a href="/components/object/object-tile/examples">Object tile</a>
69
+ </Cell>
70
+ <Cell>
71
+ Use instead of an icon tile to represent Atlassian-specific content icons, such as pages,
72
+ live docs, whiteboard, or bugs. Each object tile has a specific color token that cannot be
73
+ changed.
74
+ </Cell>
51
75
  <Cell>Objects</Cell>
52
76
  </Row>
53
77
  </TBody>
@@ -75,4 +99,3 @@ Together, these components make a comprehensive system that brings flexibility a
75
99
  href="/components/icon/icon-tile/examples"
76
100
  />
77
101
  </RelatedCardGrid>
78
-
@@ -5,10 +5,15 @@ props:
5
5
  includeInternal: true
6
6
  exports:
7
7
  - default
8
+ - TileSkeleton
8
9
  ---
9
10
 
10
- import Tile from '@atlaskit/tile';
11
-
12
11
  ## Props
13
12
 
13
+ ### Tile props
14
+
14
15
  <TSMorphProps exportName="default" packageName="@atlaskit/tile" />
16
+
17
+ ### TileSkeleton props
18
+
19
+ <TSMorphProps exportName="TileSkeleton" packageName="@atlaskit/tile" />
@@ -5,7 +5,6 @@ order: 3
5
5
  import SectionMessage from '@atlaskit/section-message';
6
6
  import Image from '@atlaskit/image';
7
7
 
8
-
9
8
  import tileAnatomyLight from './images/tile-anatomy-light.png';
10
9
  import tileAnatomyDark from './images/tile-anatomy-dark.png';
11
10
  import tileReferenceDo from './images/do-donts/tile-reference-do.png';
@@ -16,12 +15,19 @@ import tileVariantDont from './images/do-donts/tile-variant-dont.png';
16
15
  ## Usage
17
16
 
18
17
  <SectionMessage appearance="warning">
19
- Tile should only be used if existing components (e.g. <a href="/components/icon/icon-tile/examples">Icon tile</a>, <a href="/components/object/object-tile/examples">Object tile</a>, <a href="/components/avatar/examples#square">Square Avatars</a>) do not meet your needs.
18
+ Tile should only be used if existing components (e.g.{' '}
19
+ <a href="/components/icon/icon-tile/examples">Icon tile</a>,{' '}
20
+ <a href="/components/object/object-tile/examples">Object tile</a>,{' '}
21
+ <a href="/components/avatar/examples#square">Square Avatars</a>) do not meet your needs.
20
22
  </SectionMessage>
21
23
 
22
- Tile is a versatile, foundational container with baked in sizing and radii properties for displaying elements in a tile shape. It is unopinionated in its content and can be used to slot in any asset, background, color or foreground element as needed.
24
+ Tile is a versatile, foundational container with baked in sizing and radii properties for displaying
25
+ elements in a tile shape. It is unopinionated in its content and can be used to slot in any asset,
26
+ background, color or foreground element as needed.
23
27
 
24
- Both <a href="/components/icon/icon-tile/examples">Icon tile</a> and <a href="/components/object/object-tile/examples">Object tile</a> inherit properties of tile ensuring a consistent and cohesive tile system across various applications.
28
+ Both [Icon tile](/components/icon/icon-tile/examples) and
29
+ [Object tile](/components/object/object-tile/examples) inherit properties of tile ensuring a
30
+ consistent and cohesive tile system across various applications.
25
31
 
26
32
  Use tiles to slot in elements such as:
27
33
 
@@ -32,7 +38,9 @@ Use tiles to slot in elements such as:
32
38
 
33
39
  <Image src={tileAnatomyLight} srcDark={tileAnatomyDark} alt="Anatomy of a tile" />
34
40
 
35
- 1. **Tile background**: By default, the inset variant has a neutral background set to <inlineCode>color.background.neutral</inlineCode>. This can be switched out with other background tokens, white, or black.
41
+ 1. **Tile background**: By default, the inset variant has a neutral background set to
42
+ <inlineCode>color.background.neutral</inlineCode>. This can be switched out with other background
43
+ tokens, white, or black.
36
44
  2. **Foreground element**: Place any element within the bounds of the slot.
37
45
 
38
46
  ## Best practices
@@ -63,7 +71,8 @@ Use tiles to slot in elements such as:
63
71
 
64
72
  ### Reference height of adjacent content for size
65
73
 
66
- Tiles support a range of sizes from 16px to 48px. As a general rule when selecting size, reference the size of the tile to the height of its adjacent content for visual balance.
74
+ Tiles support a range of sizes from 16px to 48px. As a general rule when selecting size, reference
75
+ the size of the tile to the height of its adjacent content for visual balance.
67
76
 
68
77
  <DoDont
69
78
  type="do"
@@ -86,5 +95,6 @@ Tiles support a range of sizes from 16px to 48px. As a general rule when selecti
86
95
 
87
96
  ## Related
88
97
 
89
- - For icons with colored backgrounds, use <a href="/components/icon/icon-tile/examples">Icon tile</a>
98
+ - For icons with colored backgrounds, use <a href="/components/icon/icon-tile/examples">Icon
99
+ tile</a>
90
100
  - For objects in a tile, use <a href="/components/object/object-tile/examples">Object tile</a>
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "Skeleton", {
7
+ Object.defineProperty(exports, "TileSkeleton", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
10
  return _skeleton.default;
@@ -9,9 +9,9 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
10
10
  var _tile = _interopRequireDefault(require("./tile"));
11
11
  /**
12
- * __Skeleton__
12
+ * __Tile Skeleton__
13
13
  *
14
- * A skeleton is the loading state for the tile component.
14
+ * A tile skeleton is the loading state for the tile component.
15
15
  *
16
16
  */
17
17
  function TileSkeleton(_ref) {
@@ -1,2 +1,2 @@
1
1
  export { default } from './tile';
2
- export { default as Skeleton } from './entry-point/skeleton';
2
+ export { default as TileSkeleton } from './entry-point/skeleton';
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import Skeleton from '@atlaskit/skeleton';
3
3
  import Tile from './tile';
4
4
  /**
5
- * __Skeleton__
5
+ * __Tile Skeleton__
6
6
  *
7
- * A skeleton is the loading state for the tile component.
7
+ * A tile skeleton is the loading state for the tile component.
8
8
  *
9
9
  */
10
10
  export default function TileSkeleton({
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export { default } from './tile';
2
- export { default as Skeleton } from './entry-point/skeleton';
2
+ export { default as TileSkeleton } from './entry-point/skeleton';
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import Skeleton from '@atlaskit/skeleton';
3
3
  import Tile from './tile';
4
4
  /**
5
- * __Skeleton__
5
+ * __Tile Skeleton__
6
6
  *
7
- * A skeleton is the loading state for the tile component.
7
+ * A tile skeleton is the loading state for the tile component.
8
8
  *
9
9
  */
10
10
  export default function TileSkeleton(_ref) {
@@ -1,2 +1,2 @@
1
1
  export { default } from '../skeleton';
2
- export { type SkeletonProps } from '../types';
2
+ export { type TileSkeletonProps } from '../types';
@@ -1,3 +1,3 @@
1
1
  export { default } from './tile';
2
2
  export { type TileProps } from './types';
3
- export { default as Skeleton, type SkeletonProps } from './entry-point/skeleton';
3
+ export { default as TileSkeleton, type TileSkeletonProps } from './entry-point/skeleton';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { SkeletonProps } from './types';
2
+ import type { TileSkeletonProps } from './types';
3
3
  /**
4
- * __Skeleton__
4
+ * __Tile Skeleton__
5
5
  *
6
- * A skeleton is the loading state for the tile component.
6
+ * A tile skeleton is the loading state for the tile component.
7
7
  *
8
8
  */
9
- export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: SkeletonProps): React.JSX.Element;
9
+ export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: TileSkeletonProps): React.JSX.Element;
@@ -47,9 +47,9 @@ export type TileProps = {
47
47
  */
48
48
  testId?: string;
49
49
  };
50
- export type SkeletonProps = {
50
+ export type TileSkeletonProps = {
51
51
  /**
52
- * Overrides the default color of skeleton, and overrides the default shimmering start color if ShimmeringEndColor also provided.
52
+ * Overrides the default color of skeleton, and overrides the default shimmering start color if `shimmeringEndColor` is also provided.
53
53
  */
54
54
  color?: string;
55
55
  /**
@@ -1,2 +1,2 @@
1
1
  export { default } from '../skeleton';
2
- export { type SkeletonProps } from '../types';
2
+ export { type TileSkeletonProps } from '../types';
@@ -1,3 +1,3 @@
1
1
  export { default } from './tile';
2
2
  export { type TileProps } from './types';
3
- export { default as Skeleton, type SkeletonProps } from './entry-point/skeleton';
3
+ export { default as TileSkeleton, type TileSkeletonProps } from './entry-point/skeleton';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { SkeletonProps } from './types';
2
+ import type { TileSkeletonProps } from './types';
3
3
  /**
4
- * __Skeleton__
4
+ * __Tile Skeleton__
5
5
  *
6
- * A skeleton is the loading state for the tile component.
6
+ * A tile skeleton is the loading state for the tile component.
7
7
  *
8
8
  */
9
- export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: SkeletonProps): React.JSX.Element;
9
+ export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: TileSkeletonProps): React.JSX.Element;
@@ -47,9 +47,9 @@ export type TileProps = {
47
47
  */
48
48
  testId?: string;
49
49
  };
50
- export type SkeletonProps = {
50
+ export type TileSkeletonProps = {
51
51
  /**
52
- * Overrides the default color of skeleton, and overrides the default shimmering start color if ShimmeringEndColor also provided.
52
+ * Overrides the default color of skeleton, and overrides the default shimmering start color if `shimmeringEndColor` is also provided.
53
53
  */
54
54
  color?: string;
55
55
  /**
package/package.json CHANGED
@@ -26,9 +26,9 @@
26
26
  "atlaskit:src": "src/index.tsx",
27
27
  "dependencies": {
28
28
  "@atlaskit/skeleton": "^2.1.0",
29
- "@atlaskit/tokens": "^6.5.0",
29
+ "@atlaskit/tokens": "^7.0.0",
30
30
  "@babel/runtime": "^7.0.0",
31
- "@compiled/react": "^0.18.3"
31
+ "@compiled/react": "^0.18.6"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^18.2.0"
@@ -80,7 +80,7 @@
80
80
  }
81
81
  },
82
82
  "name": "@atlaskit/tile",
83
- "version": "0.2.1",
83
+ "version": "1.0.0",
84
84
  "description": "A tile is a rounded square that takes an asset and represents a noun.",
85
85
  "author": "Atlassian Pty Ltd",
86
86
  "license": "Apache-2.0",